05be9d3b9c43ac1e25550b4485ff8cd6b9b7d7f5
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-03-15  David Kilzer  <ddkilzer@apple.com>
2
3         [iOS] Define SYSTEM_VERSION_PREFIX consistently
4         <http://webkit.org/b/130293>
5         <rdar://problem/15926359>
6
7         Reviewed by Dan Bernstein.
8
9         * Configurations/Version.xcconfig:
10         (SYSTEM_VERSION_PREFIX): Sync with
11         Source/WebKit/mac/Version.xcconfig.
12
13 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
14
15         [Mac] Sync extended attribute related rules with AppSandbox profile
16         https://bugs.webkit.org/show_bug.cgi?id=130263
17         <rdar://problem/16318965>
18
19         Reviewed by Sam Weinig.
20
21         Update the fix to use a different syntax in some OS versions.
22
23         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
24         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
25         * WebProcess/com.apple.WebProcess.sb.in:
26
27 2014-03-14  Ryosuke Niwa  <rniwa@webkit.org>
28
29         Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
30
31         * UIProcess/API/Cocoa/WKBackForwardList.h:
32         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
33         * UIProcess/API/Cocoa/WKNavigation.h:
34         * UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
35         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
36         (NS_ENUM):
37         * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
38         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
39         * UIProcess/API/Cocoa/WKWebView.h:
40
41 2014-03-14  Mark Rowe  <mrowe@apple.com>
42
43         Fix the production build.
44
45         Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
46         be at the expected relative path when working from installed source.
47
48         * Configurations/Base.xcconfig:
49
50 2014-03-14  Maciej Stachowiak  <mjs@apple.com>
51
52         Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
53         https://bugs.webkit.org/show_bug.cgi?id=130276
54         <rdar://problem/16266927>
55         
56         Reviewed by Simon Fraser.
57
58         * Shared/AsyncRequest.cpp:
59         * Shared/AsyncRequest.h:
60         * Shared/ContextMenuContextData.cpp:
61         * Shared/ContextMenuContextData.h:
62         * Shared/Databases/DatabaseProcessCreationParameters.h:
63         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
64         * Shared/Databases/IndexedDB/IDBUtilities.h:
65         * Shared/mac/RemoteLayerBackingStore.h:
66         * Shared/mac/RemoteLayerBackingStore.mm:
67         * UIProcess/API/Cocoa/WKBackForwardList.h:
68         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Removed.
69         * UIProcess/API/Cocoa/WKNavigation.h:
70         * UIProcess/API/Cocoa/WKNavigationAction.h: Removed.
71         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
72         * UIProcess/API/Cocoa/WKNavigationResponse.h: Removed.
73         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Added.
74         (NS_ENUM):
75         * UIProcess/API/Cocoa/WKWebView.h:
76         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
77         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
78         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
79         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
80         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
81         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
82         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
83         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
84         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
85         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
86         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
87         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
88         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
89         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
90         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
91         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
92         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
93         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
94         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
95         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
96
97 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
98
99         [iOS WK2] background-attachment: fixed renders oddly, moves around
100         https://bugs.webkit.org/show_bug.cgi?id=130277
101         <rdar://problem/16332883>
102
103         Reviewed by Tim Horton.
104         
105         Actually send scrolling and counter-scrolling layers to the UI process!
106
107         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
108         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
109         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
110
111 2014-03-14  Anders Carlsson  <andersca@apple.com>
112
113         Try to fix the iOS build.
114
115         * UIProcess/mac/WebContextMac.mm:
116
117 2014-03-14  Anders Carlsson  <andersca@apple.com>
118
119         Begin work on the bundle parameter API
120         https://bugs.webkit.org/show_bug.cgi?id=130267
121
122         Reviewed by Dan Bernstein.
123
124         * Shared/WebProcessCreationParameters.cpp:
125         (WebKit::WebProcessCreationParameters::encode):
126         (WebKit::WebProcessCreationParameters::decode):
127         * Shared/WebProcessCreationParameters.h:
128         * UIProcess/API/Cocoa/WKProcessPool.mm:
129         (-[WKProcessPool _objectForBundleParameter:]):
130         (-[WKProcessPool _setObject:forBundleParameter:]):
131         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
132         * UIProcess/WebContext.h:
133         (WebKit::WebContext::bundleParameters):
134         * UIProcess/mac/WebContextMac.mm:
135         (WebKit::WebContext::ensureBundleParameters):
136         (WebKit::WebContext::platformInitializeWebProcess):
137
138 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
139
140         [Mac] Sync extended attribute related rules with AppSandbox profile
141         https://bugs.webkit.org/show_bug.cgi?id=130263
142         <rdar://problem/16318965>
143
144         Reviewed by Sam Weinig.
145
146         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
147         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
148         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
149         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
150         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
151         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
152         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
153         * WebProcess/com.apple.WebProcess.sb.in:
154
155 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
156
157         [iOS WK2] Improve behavior of fixed elments on zooming
158         https://bugs.webkit.org/show_bug.cgi?id=130253
159
160         Reviewed by Beth Dakin.
161
162         Correctly reposition right- and bottom-relative position:fixed
163         elements on zooming in WK2 iOS by telling the scrolling tree
164         about zoom-related viewport changes.
165
166         * Shared/mac/RemoteLayerTreeTransaction.h:
167         (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged):
168         Drive-by cleanup; typedef the flags field to an unsigned, to avoid ugly casting.
169         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
170         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Pass out a flag to say
171         if the update contained a new fixed or sticky layer.
172         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
173         (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
174         Call into the new ScrolingTree::viewportChangedViaDelegatedScrolling().
175         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
176         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: If we got a new fixed
177         or sticky layer, set fixedOrStickyLayerChanged to true.
178         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
179         * UIProcess/ios/WKContentView.mm:
180         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
181         Remember both the old zoomScale and the filteredScale, since the fixed position rect
182         should be computed using the unfiltered scale.
183         Some FloatRect -> CGRect changes.
184         Now call viewportChangedViaDelegatedScrolling() on the scrolling coordinator.
185         (-[WKContentView fixedPositionRectFromExposedRect:scale:]): Call the
186         FrameView function to compute the iOS fixed position rect.
187         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
188         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): If the update
189         got a new fixed or sticky layer, run the scrolling tree logic to make sure
190         it gets into the right place.
191         * UIProcess/mac/RemoteLayerTreeHost.mm:
192         (WebKit::RemoteLayerTreeHost::updateLayerTree): If we logged here,
193         we'd log twice if the tiled scrolling indicator was enabled, so 
194         hoisted the logging out into the caller.
195
196 2014-03-14  Landry Breuil  <landry@openbsd.org>
197
198         Use the correct type in webkitSoupRequestInputStreamNew()'s declaration.
199         Nhttps://bugs.webkit.org/show_bug.cgi?id=129974
200
201         Reviewed by Andreas Kling.
202
203         * WebProcess/soup/WebKitSoupRequestInputStream.h:
204
205 2014-03-14  Anders Carlsson  <andersca@apple.com>
206
207         Fix crash when resizing the visited link table
208         https://bugs.webkit.org/show_bug.cgi?id=130257
209         <rdar://problem/16328177>
210
211         Reviewed by Dan Bernstein.
212
213         We're iterating over the old table, so use currentTableSize in the loop termination condition.
214
215         * UIProcess/VisitedLinkProvider.cpp:
216         (WebKit::VisitedLinkProvider::resizeTable):
217
218 2014-03-14  Dan Bernstein  <mitz@apple.com>
219
220         [Cocoa] Expose a way to set the cookie accept policy
221         https://bugs.webkit.org/show_bug.cgi?id=130251
222
223         Reviewed by Anders Carlsson.
224
225         * UIProcess/API/Cocoa/WKProcessPool.mm:
226         (toHTTPCookieAcceptPolicy): Added a helper function that maps from NSHTTPCookieAcceptPolicy
227         values to WebKit::HTTPCookieAcceptPolicy values.
228         (-[WKProcessPool _setCookieAcceptPolicy:]): Added. Calls
229         WebCookieManagerProxy::setHTTPCookieAcceptPolicy. 
230         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared new method.
231
232 2014-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
233
234         [GTK] WebKit2WebExtension GIR can't be used in vala
235         https://bugs.webkit.org/show_bug.cgi?id=127179
236
237         Reviewed by Martin Robinson.
238
239         Do not include all WebKit2 gir symbols from WebKit2WebExtension gir
240         file.
241
242         * GNUmakefile.am:
243         * PlatformGTK.cmake:
244
245 2014-03-14  Csaba Osztrogonác  <ossy@webkit.org>
246
247         [CMake] URTBF after r165619.
248
249         * CMakeLists.txt: Add new files.
250
251 2014-03-14  Anders Carlsson  <andersca@apple.com>
252
253         Remove WebContext::addVisitedLink
254         https://bugs.webkit.org/show_bug.cgi?id=130242
255
256         Reviewed by Dan Bernstein.
257
258         Fold the function into WKContextAddVisitedLink instead.
259
260         * UIProcess/API/C/WKContext.cpp:
261         (WKContextAddVisitedLink):
262         * UIProcess/WebContext.cpp:
263         * UIProcess/WebContext.h:
264         (WebKit::WebContext::visitedLinkProvider):
265
266 2014-03-13  Anders Carlsson  <andersca@apple.com>
267
268         Move visited link handling to VisitedLinkTableController and VisitedLinkProvider
269         https://bugs.webkit.org/show_bug.cgi?id=130223
270         <rdar://problem/16315792>
271
272         Reviewed by Dan Bernstein.
273
274         * DerivedSources.make:
275         Generate messages for VisitedLinkProvider and VisitedLinkTableController.
276         
277         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
278         (-[WKWebViewConfiguration copyWithZone:]):
279         Set the visited link provider.
280
281         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
282         Add addVisitedLinkWithURL: method.
283
284         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
285         (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]):
286         Compute a link hash from the absolute URL string and pass it to the underlying VisitedLinkProvider object.
287
288         * UIProcess/VisitedLinkProvider.cpp:
289         (WebKit::VisitedLinkProvider::addProcess):
290         Add the process to the m_processes HashCountedSet. If it's the first time we're adding the process, 
291         add the VisitedLinkProvider object as a message receiver and send the visited link table to the process.
292
293         (WebKit::VisitedLinkProvider::removeProcess):
294         Remove the process from the m_processes HashCountedSet. If we're removing the last reference to the process,
295         remove ourselves as a  message receiver.
296
297         (WebKit::VisitedLinkProvider::addVisitedLinkHash):
298         Rename this from addVisitedLink to better indicate what it's doing.
299
300         (WebKit::tableSizeForKeyCount):
301         Update for constant rename.
302
303         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
304         Compute the new pending visited links table size. If it's bigger than our current table, resize the table
305         by calling resizeTable. Otherwise, simply try to add the pending hashes to our shared hash table. If successful,
306         add the link hash to the addedVisitedLinks table and eventually send it to all processes associated with the visited link provider.
307
308         (WebKit::VisitedLinkProvider::resizeTable):
309         Create a new shared memory segment, Set it as the table backing store and add all visited links from the old table. Finally,
310         add our pending visited link hashes and send the new table memory to all processes associated with the visited link provider.
311
312         (WebKit::VisitedLinkProvider::sendTable):
313         Helper function that creates a shared memory handle and sends it to a given web process.
314
315         * UIProcess/VisitedLinkProvider.h:
316         Add new members.
317
318         * UIProcess/VisitedLinkProvider.messages.in:
319         Add messages.
320
321         * UIProcess/WebContext.cpp:
322         (WebKit::WebContext::processDidFinishLaunching):
323         (WebKit::WebContext::disconnectProcess):
324         The WebContext no longer needs to inform the visited link provider about the processes coming and going, that's already handled
325         by the WebPageProxy objects.
326
327         (WebKit::WebContext::addVisitedLink):
328         Call addVisitedLinkHash on the visited link provider.
329
330         * UIProcess/WebContext.h:
331         * UIProcess/WebContext.messages.in:
332         Remove a message that is now implemented by the visited link provider.
333
334         * WebKit2.xcodeproj/project.pbxproj:
335         Add new files.
336
337         * WebProcess/WebPage/VisitedLinkTableController.cpp:
338         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
339         Add the table controller as a message receiver.
340
341         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
342         Remove the table controller as a message receiver.
343
344         (WebKit::VisitedLinkTableController::isLinkVisited):
345         Check if the link is visited according to the visited link table.
346
347         (WebKit::VisitedLinkTableController::addVisitedLink):
348         Send the link hash to the UI process if it's not already visited.
349
350         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
351         Set the backing store memory and invalidate all styles.
352
353         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
354         Invalidate the styles for the given links.
355
356         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
357         Invalidate the styles for all links.
358
359         * WebProcess/WebPage/VisitedLinkTableController.h:
360         Add new members.
361
362         * WebProcess/WebPage/VisitedLinkTableController.messages.in:
363         Add new messages.
364
365         * WebProcess/WebProcess.cpp:
366         Remove unused functions; these are handled by VisitedLinkTableController now.
367
368         * WebProcess/WebProcess.h:
369         (WebKit::WebProcess::shouldTrackVisitedLinks):
370         Add getter.
371
372         * WebProcess/WebProcess.messages.in:
373         Remove messages.
374
375 2014-03-12  Sergio Villar Senin  <svillar@igalia.com>
376
377         Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
378         https://bugs.webkit.org/show_bug.cgi?id=129612
379
380         Reviewed by Darin Adler.
381
382         For new code use static NeverDestroyed<T> instead.
383
384         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
385         (WebKit::getIndexStatement):
386         (WebKit::getObjectStoreStatement):
387         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
388         (WebKit::SeccompBrokerClient::shared):
389         * UIProcess/InspectorServer/WebInspectorServer.cpp:
390         (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
391
392 2014-03-14  Dan Bernstein  <mitz@apple.com>
393
394         <rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
395         https://bugs.webkit.org/show_bug.cgi?id=130228
396
397         Reviewed by Mark Rowe.
398
399         * UIProcess/Cocoa/HistoryClient.mm:
400         (WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
401         main frame.
402         (WebKit::HistoryClient::didPerformClientRedirect): Ditto.
403         (WebKit::HistoryClient::didPerformServerRedirect): Ditto.
404         (WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
405
406 2014-03-13  Jinwoo Jeong  <jw00.jeong@samsung.com>
407
408         Refactor Vibration algorithm to use only one timer.
409         https://bugs.webkit.org/show_bug.cgi?id=130059
410
411         Reviewed by Darin Adler.
412
413         This patch adds a vibration unit test regression after r161257.
414         It consists of two short term requests to check
415         that Vibration could work properly by sequential requests.
416
417         Indeed this patch tightens condition of existing tests.
418
419         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
420         (TEST_F):
421
422 2014-03-13  Paul Hankes Drielsma  <phd@apple.com>
423
424         Add SPI to set a custom user agent on WKWebView
425         https://bugs.webkit.org/show_bug.cgi?id=130164
426
427         Reviewed by Dan Bernstein.
428
429         * UIProcess/API/Cocoa/WKWebView.mm:
430         (-[WKWebView _customUserAgent]):
431         (-[WKWebView _setCustomUserAgent:]):
432         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
433
434 2014-03-13  Paul Hankes Drielsma  <phd@apple.com>
435
436         Add SPI to run javascript in main frame on WKWebView
437         https://bugs.webkit.org/show_bug.cgi?id=130047
438
439         Reviewed by Anders Carlsson.
440
441         * UIProcess/API/Cocoa/WKWebView.mm:
442         (-[WKWebView _runJavaScriptInMainFrame:]):
443
444 2014-03-13  Benjamin Poulain  <bpoulain@apple.com>
445
446         The viewport code should not depend on WebKitSystemInterface
447         https://bugs.webkit.org/show_bug.cgi?id=130218
448
449         Reviewed by Tim Horton.
450
451         Get the viewport size from the UIProcess when creating a new WebProcess.
452         From there, the value is stored in WebPage and used whenever we need to update
453         the viewport parameters.
454
455         * Shared/WebPageCreationParameters.cpp:
456         (WebKit::WebPageCreationParameters::encode):
457         (WebKit::WebPageCreationParameters::decode):
458         * Shared/WebPageCreationParameters.h:
459         * UIProcess/WebPageProxy.cpp:
460         (WebKit::WebPageProxy::internalShowContextMenu):
461         * UIProcess/WebPageProxy.h:
462         * UIProcess/ios/WebPageProxyIOS.mm:
463         (WebKit::WebPageProxy::viewportScreenSize):
464         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
465         (WebKit::WebChromeClient::viewportScreenSize):
466         * WebProcess/WebCoreSupport/WebChromeClient.h:
467         * WebProcess/WebPage/WebPage.cpp:
468         (WebKit::WebPage::WebPage):
469         * WebProcess/WebPage/WebPage.h:
470         * WebProcess/WebPage/ios/WebPageIOS.mm:
471         (WebKit::WebPage::viewportScreenSize):
472
473 2014-03-13  Beth Dakin  <bdakin@apple.com>
474
475         Do not show extended background during a pinch gesture on iOS
476         https://bugs.webkit.org/show_bug.cgi?id=130152
477         -and corresponding-
478         <rdar://problem/16303819>
479
480         Reviewed by Simon Fraser.
481
482         This patch refactors the backgroundColor-setting logic into its own method so that 
483         it can be called from both _didCommitLayerTree and scrollViewDidZoom.
484
485         Only set the UIScrollView’s background color when the zoomScale is greater than or 
486         equal to the minimumZoomScale. Also do not set it during the zoom bounce 
487         animation. Otherwise, clear the background color by setting it to nil.
488         * UIProcess/API/Cocoa/WKWebView.mm:
489         (-[WKWebView updateScrollViewBackground]):
490         (-[WKWebView _didCommitLayerTree:WebKit::]):
491         (-[WKWebView scrollViewDidZoom:]):
492
493 2014-03-13  Enrica Casucci  <enrica@apple.com>
494
495         [iOS WebKit2] block selection should avoid large blocks.
496         https://bugs.webkit.org/show_bug.cgi?id=130208
497         <rdar://problem/16251785>
498
499         Reviewed by Benjamin Poulain.
500
501         When creating a block selection, we should discard blocks that
502         are larger than most of the visible portion of the document.
503         This prevents the accidental selection the entire document, which
504         is fairly common when tapping over empty areas.
505
506         * Shared/InteractionInformationAtPosition.cpp:
507         (WebKit::InteractionInformationAtPosition::encode):
508         (WebKit::InteractionInformationAtPosition::decode):
509         * Shared/InteractionInformationAtPosition.h: Removed selectionRects that was not really needed and
510         added isSelectable to indicate whether the selection can start.
511         (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
512         * UIProcess/ios/WKContentViewInteraction.mm:
513         (-[WKContentView hasSelectablePositionAtPoint:]): Now uses isSelectable.
514         * WebProcess/WebPage/ios/WebPageIOS.mm:
515         (WebKit::WebPage::getPositionInformation): Takes into account the userSelect property
516         to figure out if the element can be selected and discards blocks that are
517         larger than 97% of the visible area of the document.
518
519 2014-03-13  Anders Carlsson  <andersca@apple.com>
520
521         Rename WKVisitedLinkProvider to _WKVisitedLinkProvider and make it private
522         https://bugs.webkit.org/show_bug.cgi?id=130207
523
524         Reviewed by Dan Bernstein.
525
526         * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Removed.
527         * UIProcess/API/Cocoa/WKWebView.mm:
528         (-[WKWebView initWithFrame:configuration:]):
529         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
530         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
531         (-[WKWebViewConfiguration _visitedLinkProvider]):
532         (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
533         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
534         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.h.
535         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.mm.
536         (-[_WKVisitedLinkProvider init]):
537         * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h.
538         * WebKit2.xcodeproj/project.pbxproj:
539
540 2014-03-13  Anders Carlsson  <andersca@apple.com>
541
542         Remove a commented out member function
543         https://bugs.webkit.org/show_bug.cgi?id=130204
544
545         Reviewed by Tim Horton.
546
547         * Shared/ChildProcessProxy.h:
548         (WebKit::ChildProcessProxy::canSendMessage):
549
550 2014-03-13  Enrica Casucci  <enrica@apple.com>
551
552         [iOS WebKit2] Crash on iPad when displaying a select element with options.
553         https://bugs.webkit.org/show_bug.cgi?id=130200
554         <rdar://problem/16316187>
555
556         Reviewed by Simon Fraser.
557
558         _singleSelectionIndex should be initialized to NSNotFound for multiSelect elements.
559
560         * UIProcess/ios/forms/WKFormSelectPopover.mm:
561         (-[WKSelectTableViewController initWithView:hasGroups:]):
562
563 2014-03-13  Carlos Garcia Campos  <cgarcia@igalia.com>
564
565         [GTK] Close the connection when we fail to read from the socket for any unhandled error
566         https://bugs.webkit.org/show_bug.cgi?id=130191
567
568         Reviewed by Martin Robinson.
569
570         We currently show an error message, but we should close the
571         connection avoid entering an infinite loop. Also provide more
572         information in the error message to help when debugging the issue.
573
574         * Platform/IPC/unix/ConnectionUnix.cpp:
575         (IPC::Connection::readyReadHandler):
576
577 2014-03-13  Radu Stavila  <stavila@adobe.com>
578
579         Webkit not building on XCode 5.1 due to garbage collection no longer being supported
580         https://bugs.webkit.org/show_bug.cgi?id=130087
581
582         Reviewed by Mark Rowe.
583
584         Disable garbage collection on macosx when not using internal SDK.
585
586         * Configurations/Base.xcconfig:
587
588 2014-03-10  Darin Adler  <darin@apple.com>
589
590         Avoid copy-prone idiom "for (auto item : collection)"
591         https://bugs.webkit.org/show_bug.cgi?id=129990
592
593         Reviewed by Geoffrey Garen.
594
595         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
596         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&.
597
598         * Shared/mac/RemoteLayerTreeTransaction.mm:
599         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&
600         even though the type is a scalar. This does no harm and makes it easier
601         to spot uses that trigger unnecessary copying with grep.
602         (WebKit::RemoteLayerTreeTransaction::decode): Ditto.
603         (WebKit::dumpChangedLayers): Ditto.
604         * UIProcess/mac/RemoteLayerTreeHost.mm:
605         (WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
606         * WebProcess/WebProcess.cpp:
607         (WebKit::WebProcess::visitedLinkStateChanged): Ditto.
608
609 2014-03-12  Brian Burg  <bburg@apple.com>
610
611         Web Inspector: Remove unused callId parameter from evaluateInWebInspector
612         https://bugs.webkit.org/show_bug.cgi?id=129744
613
614         Reviewed by Timothy Hatcher.
615
616         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
617         (WKBundleInspectorEvaluateScriptForTest):
618         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
619         * WebProcess/WebPage/WebInspector.cpp:
620         (WebKit::WebInspector::evaluateScriptForTest):
621         * WebProcess/WebPage/WebInspector.h:
622
623 2014-03-13  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
624
625         Fix the !ENABLE(SQL_DATABASE) build
626         https://bugs.webkit.org/show_bug.cgi?id=130130
627
628         Reviewed by Csaba Osztrogonác.
629
630         Add missing #ifdef guard to typedef.
631
632         * UIProcess/API/C/WKDatabaseManager.cpp:
633
634 2014-03-12  Dean Jackson  <dino@apple.com>
635
636         [WebGL] WebKit1 + WebKit2 iOS clients should check load policy
637         https://bugs.webkit.org/show_bug.cgi?id=130162
638
639         Reviewed by Simon Fraser.
640
641         Implement webGLPolicyForURL() methods for iOS.
642
643         * Configurations/WebContent-iOS.entitlements: Add the MobileAsset asset type.
644         * Configurations/WebKit2.xcconfig: Add MobileAsset to iOS link list.
645         * WebProcess/WebPage/WebPage.cpp: Exclude iOS.
646         * WebProcess/WebPage/ios/WebPageIOS.mm:
647         (WebKit::WebPage::webGLPolicyForURL): Call into WKSI.
648         (WebKit::WebPage::resolveWebGLPolicyForURL):
649
650 2014-03-12  Joseph Pecoraro  <pecoraro@apple.com>
651
652         Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
653         https://bugs.webkit.org/show_bug.cgi?id=130118
654
655         Reviewed by Timothy Hatcher.
656
657         * Configurations/FeatureDefines.xcconfig:
658
659 2014-03-12  Enrica Casucci  <enrica@apple.com>
660
661         [iOS WebKit2] Crash when trying to select inside a video element with longpress..
662         https://bugs.webkit.org/show_bug.cgi?id=130095
663         <rdar://problem/16294534>
664
665         Reviewed by Benjamin Poulain.
666
667         We only need to set the assisted node for nodes that will receive an
668         input peripheral (keyboard, picker, popover, etc.).
669
670         * WebProcess/WebPage/ios/WebPageIOS.mm:
671         (WebKit::WebPage::rangeForWebSelectionAtPosition):
672         (WebKit::WebPage::elementDidFocus):
673
674 2014-03-12  Simon Fraser  <simon.fraser@apple.com>
675
676         Have the scrolling tree track the viewport size, not the viewport rect
677         https://bugs.webkit.org/show_bug.cgi?id=130141
678
679         Reviewed by Beth Dakin.
680
681         The scrolling tree only needs to know the size of the viewport, not its
682         origin, since the origin is deduced from the updated scroll position.
683
684         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
685         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
686         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
687
688 2014-03-12  Commit Queue  <commit-queue@webkit.org>
689
690         Unreviewed, rolling out r165481.
691         https://bugs.webkit.org/show_bug.cgi?id=130151
692
693         That didn't go well. (Requested by kling on #webkit).
694
695         Reverted changeset:
696
697         https://bugs.webkit.org/show_bug.cgi?id=130140
698         http://trac.webkit.org/changeset/165481
699
700 2014-03-12  Carlos Garcia Campos  <cgarcia@igalia.com>
701
702         [GTK] Runtime error when page is closed while print operation is in progress
703         https://bugs.webkit.org/show_bug.cgi?id=129869
704
705         Reviewed by Anders Carlsson.
706
707         Sometimes when the page is closed right after printing the web
708         process aborts with the runtime message "pure virtual method
709         called terminate called without an active exception".
710         This happens because the page is closed when the pages have been
711         printed, but print job is still ongoing sending the data to the
712         printer. When print job finishes, we try to notify the UI process
713         sending the print callback message using WebPage::send(), but the
714         web page object has been destroyed. The virtual method it complains
715         about is probably MessageSender::messageSenderDestinationID() used
716         by send(). Since our print operation is always asynchronous, we
717         need a way to notify the web page when the print operation has
718         actually finished to clean it up, but also notify the print
719         operation when the page has been closed to not try to notify the
720         UI process in that case.
721
722         * WebProcess/WebPage/WebPage.cpp:
723         (WebKit::WebPage::close): Call disconnectFromPage to notify the
724         print operation in case there's an ongoing print job.
725         (WebKit::WebPage::endPrinting): Do not cleanup the print operation
726         here, since the print opertation might not have finished yet.
727         (WebKit::WebPage::didFinishPrintOperation): Send
728         PrintFinishedCallback message to the Ui process and cleanup the
729         print operation.
730         * WebProcess/WebPage/WebPage.h:
731         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
732         (WebKit::WebPrintOperationGtk::disconnectFromPage): Set m_webPage
733         to nullptr.
734         (WebKit::WebPrintOperationGtk::printDone): Call
735         didFinishPrintOperation() is the web page hasn't been closed.
736         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
737
738 2014-03-12  Andreas Kling  <akling@apple.com>
739
740         BundlePageDiagnosticLoggingClient leaks every string passing through it.
741         <https://webkit.org/b/130140>
742         <rdar://problem/15416838>
743
744         Use toAPI() instead of toCopiedAPI() so the receiving end doesn't need
745         to worry about adopting the WKStringRef.
746
747         Reviewed by Anders Carlsson.
748
749         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
750         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
751
752 2014-03-12  Tim Horton  <timothy_horton@apple.com>
753
754         Hook up image controls for WebKit1
755         https://bugs.webkit.org/show_bug.cgi?id=130062
756         <rdar://problem/15964809>
757
758         Reviewed by Brady Eidson.
759
760         * Shared/ContextMenuContextData.cpp:
761         (WebKit::ContextMenuContextData::ContextMenuContextData):
762
763 2014-03-11  Alexey Proskuryakov  <ap@apple.com>
764
765         REGRESSION (r165356): [Mac] Multi-part key bindings don't work
766         https://bugs.webkit.org/show_bug.cgi?id=130100
767
768         Reviewed by Darin Adler.
769
770         Restore the previous behavior, where we only interpreted keydowns (including those
771         coming through performKeyEquivalent).
772
773         In the future, we might send all events to input methods, but not to key bindings.
774
775         * UIProcess/API/mac/WKView.mm:
776         (-[WKView keyUp:]):
777         (-[WKView flagsChanged:]):
778
779 2014-03-11  Beth Dakin  <bdakin@apple.com>
780
781         _pageExtendedBackgroundColor should not be exposed on WKWebView
782         https://bugs.webkit.org/show_bug.cgi?id=130093
783
784         Reviewed by Simon Fraser.
785
786         Added comment indicating that _pageExtendedBackgroundColor is deprecated.
787         * UIProcess/API/Cocoa/WKViewPrivate.h:
788
789         _pageExtendedBackgroundColor now returns nil, but the conversation functionality 
790         is maintained with a convenience method pageExtendedBackgroundColor.
791         * UIProcess/API/Cocoa/WKWebView.mm:
792         (-[WKWebView pageExtendedBackgroundColor]):
793         (-[WKWebView _didCommitLayerTree:WebKit::]):
794         (-[WKWebView _pageExtendedBackgroundColor]):
795
796         Added comment indicating that _pageExtendedBackgroundColor is deprecated.
797         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
798
799         Return nil.
800         * UIProcess/API/ios/WKViewIOS.mm:
801         (-[WKView _pageExtendedBackgroundColor]):
802
803 2014-03-11  Jae Hyun Park  <jaepark@webkit.org>
804
805         [GTK][CMake] Add HARFBUZZ_INCLUDE_DIRS to WebKit and WebKit2
806         https://bugs.webkit.org/show_bug.cgi?id=130070
807
808         Reviewed by Martin Robinson.
809
810         * PlatformGTK.cmake:
811
812 2014-03-10  Dan Bernstein  <mitz@apple.com>
813
814         [Cocoa] Expose WebPageProxy::close
815         https://bugs.webkit.org/show_bug.cgi?id=130068
816
817         Reviewed by Adele Peterson.
818
819         * UIProcess/API/Cocoa/WKWebView.mm:
820         (-[WKWebView _close]):
821         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
822
823 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
824
825         [iOS][WebKit 2] Wire the unobscured rect in the WebProcess
826         https://bugs.webkit.org/show_bug.cgi?id=130058
827
828         Reviewed by Simon Fraser.
829
830         * WebProcess/WebPage/ios/WebPageIOS.mm:
831         (WebKit::WebPage::updateVisibleContentRects):
832
833 2014-03-10  Simon Fraser  <simon.fraser@apple.com>
834
835         Fix three leaks
836         https://bugs.webkit.org/show_bug.cgi?id=130048
837
838         Reviewed by Anders Carlsson.
839
840         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
841         (decodeObject): Code is simpler and less leaky without the RetainPtr.
842         * UIProcess/API/Cocoa/WKNavigationAction.mm: Fix _originalURL leak
843         by making it a RetainPtr and implementing the getter and setter.
844         (-[WKNavigationAction _setOriginalURL:]):
845         (-[WKNavigationAction _originalURL]):
846
847 2014-03-10  Beth Dakin  <bdakin@apple.com>
848
849         Set background color of WK2's UIScrollView to the pageExtendedBackgroundColor
850         https://bugs.webkit.org/show_bug.cgi?id=129919
851
852         Reviewed by Benjamin Poulain.
853
854         Make the pageExtendedBackgroundColor part of a RemoteLayerTreeTransaction.
855         * Shared/mac/RemoteLayerTreeTransaction.h:
856         (WebKit::RemoteLayerTreeTransaction::pageExtendedBackgroundColor):
857         (WebKit::RemoteLayerTreeTransaction::setPageExtendedBackgroundColor):
858         * Shared/mac/RemoteLayerTreeTransaction.mm:
859         (WebKit::RemoteLayerTreeTransaction::encode):
860         (WebKit::RemoteLayerTreeTransaction::decode):
861
862         Set the background color of the UIScrollView based on the 
863         pageExtendedBackgroundColor.
864         * UIProcess/API/Cocoa/WKWebView.mm:
865         (-[WKWebView _didCommitLayerTree:WebKit::]):
866
867         For the sake of PLATFORM(MAC), continue to support the fact that this color can be 
868         set via a message from the WebProcess or the new RemoteLayerTreeTransaction.
869         * UIProcess/WebPageProxy.h:
870
871         Cache the pageExtendedBackgroundColor as provided by the 
872         RemoteLayerTreeTransaction.
873         * UIProcess/ios/WebPageProxyIOS.mm:
874         (WebKit::WebPageProxy::didCommitLayerTree):
875
876         It’s not necessary to do anything here in non-Mac platforms anymore.
877         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
878         (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
879
880         Include the pageExtendedBackgroundColor in the RemoteLayerTreeTransaction.
881         * WebProcess/WebPage/WebPage.cpp:
882         (WebKit::WebPage::willCommitLayerTree):
883
884 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
885
886         Generalize unobscured rect to all ports
887         https://bugs.webkit.org/show_bug.cgi?id=130036
888
889         Reviewed by Simon Fraser.
890
891         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
892         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
893         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
894         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
895         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
896
897 2014-03-10  Dan Bernstein  <mitz@apple.com>
898
899         <rdar://problem/16278716> [Cocoa] Allow setting a custom group identifier on a WKWebView
900         https://bugs.webkit.org/show_bug.cgi?id=130033
901
902         Reviewed by Tim Horton.
903
904         * UIProcess/API/Cocoa/WKWebView.mm:
905         (-[WKWebView initWithFrame:configuration:]): Create a page group with the group identifier
906         from the configuration, if it’s non-empty.
907         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
908         (-[WKWebViewConfiguration _groupIdentifier]): Added this accessor.
909         (-[WKWebViewConfiguration _setGroupIdentifier:]): Ditto.
910         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared _groupIdentifier property.
911
912 2014-03-10  Enrica Casucci  <enrica@apple.com>
913
914         WebKit2: Crash in WebPage::getPositionInformation.
915         https://bugs.webkit.org/show_bug.cgi?id=129936
916         <rdar://problem/16264550>
917  
918         Reviewed by Eric Carlson.
919  
920         Missing null check on the node renderer in one code path.
921         If the page body is smaller than the document, hit testing
922         will return HTMLHtmlElement that has no renderer.
923
924         * WebProcess/WebPage/ios/WebPageIOS.mm:
925         (WebKit::WebPage::getPositionInformation):
926
927 2014-03-10  Martin Robinson  <mrobinson@igalia.com>
928
929         [GTK] [CMake] Clean up library linking
930         https://bugs.webkit.org/show_bug.cgi?id=129782
931
932         Reviewed by Philippe Normand.
933
934         * PlatformGTK.cmake: Use the new macro.
935
936 2014-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
937
938         [GTK] The web process can finish while a print operation is still ongoing
939         https://bugs.webkit.org/show_bug.cgi?id=129871
940
941         Reviewed by Martin Robinson.
942
943         This can happen when the last page is closed while the print job
944         is sending data to the printer.
945
946         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web
947         process termination when the print job is sending data to the
948         printer and enable it again when job finishes.
949
950 2014-03-09  Jeong Yong-uk  <yong@company100.com>
951
952         Update comment in NetworkResourceLoader
953         https://bugs.webkit.org/show_bug.cgi?id=129997
954
955         Reviewed by Andreas Kling.
956
957         NetworkResourceLoader::resourceHandleStopped() has been renamed to
958         NetworkResourceLoader::cleanup() but the comment is not updated.
959
960         * NetworkProcess/NetworkResourceLoader.cpp:
961         (WebKit::NetworkResourceLoader::start):
962
963 2014-03-09  Alexey Proskuryakov  <ap@apple.com>
964
965         iOS build fix.
966
967         * WebProcess/WebPage/ios/WebPageIOS.mm: Include WebCore/KeyboardEvent.h.
968
969 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
970
971         [Mac] Don't perform a round-trip through WebProcess before interpreting key events
972         https://bugs.webkit.org/show_bug.cgi?id=129812
973
974         Reviewed by Darin Adler.
975
976         * Shared/NativeWebKeyboardEvent.h:
977         * Shared/WebEvent.h:
978         (WebKit::WebKeyboardEvent::handledByInputMethod):
979         (WebKit::WebKeyboardEvent::commands):
980         * Shared/WebEventConversion.cpp:
981         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
982         * Shared/WebKeyboardEvent.cpp:
983         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
984         (WebKit::WebKeyboardEvent::~WebKeyboardEvent):
985         (WebKit::WebKeyboardEvent::encode):
986         (WebKit::WebKeyboardEvent::decode):
987         * Shared/mac/NativeWebKeyboardEventMac.mm:
988         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
989         * Shared/mac/WebEventFactory.h:
990         * Shared/mac/WebEventFactory.mm:
991         (WebKit::WebEventFactory::createWebKeyboardEvent):
992         Keyboard events now carry results of interpretation with them.
993         Ideally, mouse events should also have a handledByInputMethod member, because IMs
994         can handle events, but that can wait until we have actual bugs caused by not diabling
995         default processing for these.
996
997         * UIProcess/API/mac/WKView.mm:
998         (-[WKView becomeFirstResponder]): Updated for new NativeWebKeyboardEvent contructor
999         signature. We don't interpret the event in this code path.
1000         (-[WKView doCommandBySelector:]): Added logging.
1001         (-[WKView performKeyEquivalent:]): Reimplemented Esc and Cmd+period handling to avoid
1002         infinite loops and re-entrancy. These two work in a unique way in AppKit.
1003         Interpret key event before sending it down to WebProcess.
1004         (-[WKView keyUp:]): Interpret key event before sending it down to WebProcess.
1005         We need to tell IMs about the event, but key binding processing is moot, all commands
1006         are executed on keydown.
1007         (-[WKView keyDown:]): Interpret the event.
1008         (-[WKView flagsChanged:]): Ditto.
1009         (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): Added an assertion in
1010         consumedByIM code path.
1011         (-[WKView _executeSavedCommandBySelector:]): Added logging.
1012
1013         * UIProcess/PageClient.h:
1014         * UIProcess/ios/PageClientImplIOS.h:
1015         * UIProcess/ios/PageClientImplIOS.mm:
1016         * UIProcess/mac/PageClientImpl.h:
1017         * UIProcess/mac/PageClientImpl.mm:
1018         * UIProcess/WebPageProxy.h:
1019         * UIProcess/WebPageProxy.messages.in:
1020         * UIProcess/ios/WebPageProxyIOS.mm:
1021         * UIProcess/mac/WebPageProxyMac.mm:
1022         Removed interpretQueuedKeyEvent/interpretKeyEvent, WebProcess no longer asks UIProcess to do this.
1023
1024         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1025         (WebKit::WebEditorClient::handleKeyboardEvent):
1026         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1027         (WebKit::WebEditorClient::handleKeyboardEvent):
1028         (WebKit::WebEditorClient::handleInputMethodKeydown):
1029         WebPage::handleEditingKeyboardEvent is now one function instead of two with a boolean
1030         switch between two behaviors.
1031
1032         * WebProcess/WebPage/WebPage.cpp:(WebKit::WebPage::WebPage):
1033         * WebProcess/WebPage/WebPage.h:
1034         Removed m_keyboardEventBeingInterpreted, as we no longer send the event for interpretation.
1035         This means that we sometimes have to pass a null event down to WebCore, but I wasn't
1036         able to find any behavior differences from us doing so.
1037
1038         * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent):
1039         Added a FIXME.
1040
1041         * WebProcess/WebPage/mac/WebPageMac.mm:
1042         (WebKit::WebPage::executeKeypressCommandsInternal): When we don't have an event,
1043         use current frame as a target, just like input method messages do.
1044         (WebKit::WebPage::handleEditingKeyboardEvent): This function no longer saves commands,
1045         it only interprets them.
1046         Added a check for Esc, as we don't want to handle it in keydown event handler.
1047         (WebKit::WebPage::insertText): Pass 0 instead of m_keyboardEventBeingInterpreted.
1048         (WebKit::WebPage::insertDictatedText): Ditto.
1049         (WebKit::WebPage::executeKeypressCommands): Ditto.
1050
1051 2014-03-09  Zalan Bujtas  <zalan@apple.com>
1052
1053         Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
1054         https://bugs.webkit.org/show_bug.cgi?id=129985
1055
1056         Reviewed by Simon Fraser.
1057
1058         This is in preparation to stop passing integral positioned boxes to transform animations.
1059
1060         No change in behavior.
1061
1062         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1063
1064 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
1065
1066         [iOS Wk2] Can't scroll after going back to page in page cache
1067         https://bugs.webkit.org/show_bug.cgi?id=129989
1068         <rdar://problem/16217588>
1069
1070         Reviewed by Dan Bernstein.
1071
1072         iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
1073         function that is called instead of FrameView::forceLayout(). This was unimplemented
1074         for the WK2 FrameLoaderClient, so no layout was forced, with the result
1075         that the contentSize was never updated and scrolling was broken.
1076         
1077         Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
1078         and having it return a bool to say whether the default forceLayout()
1079         should be done. WK1 can then continue to have its custom behavior,
1080         and Wk2 will simply do a forceLayout().
1081         
1082         Also remove FrameLaoderClient::forceLayout(), which was never called.
1083
1084         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1085         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1086         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
1087         (WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
1088
1089 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
1090
1091         [iOS WK2] Get position:fixed working slighlty better
1092         https://bugs.webkit.org/show_bug.cgi?id=129988
1093
1094         Reviewed by Dan Bernstein.
1095         
1096         iOS uses fixed layout, but does not want fixed elements laid
1097         out relative to the frame.
1098
1099         * WebProcess/WebPage/WebPage.cpp:
1100         (WebKit::WebPage::setUseFixedLayout):
1101
1102 2014-03-08  Jon Lee  <jonlee@apple.com>
1103
1104         iOS broken after r165342
1105         https://bugs.webkit.org/show_bug.cgi?id=129987
1106
1107         Reviewed by Simon Fraser.
1108
1109         * NetworkProcess/ios/NetworkProcessIOS.mm:
1110         (WebKit::NetworkProcess::platformLowMemoryHandler): Add missing stub implementation for
1111         platformLowMemoryHandler().
1112
1113 2014-03-08  Eric Carlson  <eric.carlson@apple.com>
1114
1115         [iOS] media preferences not initialized correctly in WebKit2
1116         https://bugs.webkit.org/show_bug.cgi?id=129983
1117
1118         Reviewed by Dan Bernstein.
1119
1120         * Shared/WebPreferencesStore.h: Initialize mediaPlaybackAllowsInline and 
1121         mediaPlaybackRequiresUserGesture correctly for iOS.
1122
1123 2014-03-08  Jeremy Jones  <jeremyj@apple.com>
1124
1125         Allow media element to supply the video layer after fullscreen transition has already begun.
1126         https://bugs.webkit.org/show_bug.cgi?id=129870
1127
1128         Reviewed by Eric Carlson.
1129
1130         WebVideoFullscreenManager and WebVideoFullscreenManagerProxy do their own remote hosting of the video layer instead of needing the video layer to have already been hosted elsewhere. This allows the removal of the coordination with WebPageProxy via a RemoteLayerTreeTransaction.
1131
1132         * Shared/mac/RemoteLayerTreeTransaction.h:
1133         Remove m_videoLayerIDsPendingFullscreen and accessors.
1134
1135         * Shared/mac/RemoteLayerTreeTransaction.mm:
1136         (WebKit::RemoteLayerTreeTransaction::encode):
1137         Don't encode m_videoLayerIDsPendingFullscreen
1138
1139         (WebKit::RemoteLayerTreeTransaction::decode):
1140         Don't decode m_videoLayerIDsPendingFullscreen
1141
1142         * UIProcess/ios/WebPageProxyIOS.mm:
1143         (WebKit::WebPageProxy::didCommitLayerTree):
1144         Don't forward didCommitLayerTree to m_videoFullscreenManager.
1145
1146         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1147         Remove code for synchronizing with the RenderTree.
1148         Add a hosting layer and methods to keep video layer frame and video gravity synchronized.
1149
1150         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1151         Change IPC interface to fascilitate rehosting video layer with a instead of coordinating with the RenderTree by PlatformLayerID.
1152
1153         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1154         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
1155         Remove initialization for removed members.
1156
1157         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID):
1158         Rehost the video layer by id and pass on the layer.
1159         This replaces didCommitLayerTree() and  willLendVideoLayerWithID(). 
1160
1161         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
1162         Cleanup the hosting layer.
1163
1164         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
1165         Forward on the video layer's frame to keep the hosted layer in sync with the interface.
1166
1167         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
1168         Forward the videolayer gravity.
1169
1170         * WebKit2.xcodeproj/project.pbxproj:
1171         Rename WebVideoFullscreenManager.cpp to WebVideoFullscreenManager.mm
1172
1173         * WebProcess/WebPage/WebPage.cpp:
1174         (WebKit::WebPage::willCommitLayerTree):
1175         Don't invovle the m_videoFullscreenManager in layer tree transactions.
1176
1177         * WebProcess/ios/WebVideoFullscreenManager.h:
1178         Remove code that synchronizes with the render tree via RemoteLayerTreeTransaction.
1179         Instead rehost the video layer directly.
1180         Instead of hoping the WebVideoFullscreenModel has a videoLayer, supply one into which
1181         it can add whatever it likes as needed.
1182
1183         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
1184         No more explicit borrowing and returning video layers.
1185         Add functions to keep video layer bounds and gravity in sync with the UI. 
1186
1187         * WebProcess/ios/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.cpp.
1188         Removed code for synchronizing via RemoteLAyerTreeTransaction.
1189
1190         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
1191         Remove initialization for removed memeber m_sendUnparentVideoLayerTransaction.
1192
1193         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
1194         Creates a fullscreen layer, gives it to the WebVideoFullscreenModel to fill in,
1195         and hosts it in a context to send to the UIProcess.
1196
1197         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
1198         remove enterFullscreen() and just directly send the IPC message. 
1199
1200         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
1201         Clean up the hosting context.
1202
1203         (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
1204         Forward on the video gravity. Type convert from unsigned to MediaPlayer::VideoGravity.
1205
1206 2014-03-08  Andreas Kling  <akling@apple.com>
1207
1208         [WK2] Improve the network process low memory handler.
1209         <https://webkit.org/b/129977>
1210
1211         Split the network process low memory handler into platform-specific
1212         and shared parts. The shared part tells FastMalloc to release freed
1213         pages back to the OS.
1214
1215         For Mac, added a call to purge the in-memory part of CFURLCache.
1216         Remove the malloc_zone_pressure_relief() since that is now taken care
1217         of by the shared MemoryPressureHandler code.
1218
1219         Reviewed by Darin Adler.
1220
1221         * NetworkProcess/NetworkProcess.cpp:
1222         (WebKit::NetworkProcess::initializeNetworkProcess):
1223         (WebKit::NetworkProcess::lowMemoryHandler):
1224         (WebKit::NetworkProcess::platformLowMemoryHandler):
1225         * NetworkProcess/NetworkProcess.h:
1226         * NetworkProcess/mac/NetworkProcessMac.mm:
1227         (WebKit::NetworkProcess::platformLowMemoryHandler):
1228         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1229
1230 2014-03-08  Jae Hyun Park  <jaepark@webkit.org>
1231
1232         Remove unnecessary casting in NetworkProcessMainUnix.cpp
1233         https://bugs.webkit.org/show_bug.cgi?id=129968
1234
1235         Reviewed by Andreas Kling.
1236
1237         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1238         Since socket is an int, int casting is not necessary.
1239
1240         (WebKit::NetworkProcessMain):
1241
1242 2014-03-08  Aaron Golden  <golden@inkling.com>
1243
1244         Prevent processes spawned by WebProcess from trying to insert the SecItem shim.
1245         https://bugs.webkit.org/show_bug.cgi?id=129864
1246
1247         Reviewed by Anders Carlsson.
1248
1249         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
1250         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
1251
1252 2014-03-07  Tim Horton  <timothy_horton@apple.com>
1253
1254         [WebKit2][iOS] PDF
1255         https://bugs.webkit.org/show_bug.cgi?id=129600
1256         <rdar://problem/15260216>
1257
1258         Reviewed by Anders Carlsson.
1259
1260         Add a single custom content provider which installs a very primitive PDF view
1261         in place of the WKContentView if a PDF is loaded in the main frame.
1262
1263         * Configurations/WebKit2.xcconfig:
1264         Link against CorePDF, for UIPDFPageView.
1265
1266         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
1267         (-[WKWebViewContentProviderRegistry init]):
1268         Initialize the registry, using WKPDFView for all PDF MIME types.
1269
1270         * WebKit2.xcodeproj/project.pbxproj:
1271         * UIProcess/ios/WKPDFView.h: Added.
1272         * UIProcess/ios/WKPDFView.mm: Added.
1273         Add a very simple PDF view based on UIPDFPageView. Additional functionality
1274         can come in the future; right now, we just create one view for each page, and
1275         depend on CATiledLayer to only paint the pages that are being displayed.
1276
1277 2014-03-07  Andreas Kling  <akling@apple.com>
1278
1279         ArgumentEncoder and ArgumentDecoder should be fastmalloced.
1280         <https://webkit.org/b/129960>
1281
1282         Reviewed by Ryosuke Niwa.
1283
1284         * Platform/IPC/ArgumentDecoder.h:
1285         * Platform/IPC/ArgumentEncoder.h:
1286
1287 2014-03-07  Martin Robinson  <mrobinson@igalia.com>
1288
1289         Fix the GTK+ build after the recent iOS merge.
1290
1291         * UIProcess/API/gtk/PageClientImpl.cpp: Make some methods available to non-Cocoa ports and fix some signatures.
1292         * UIProcess/WebPageProxy.h: Ditto.
1293
1294 2014-03-07  Ryuan Choi  <ryuan.choi@samsung.com>
1295
1296         Unreviewed. Fix build on the EFL port after r165303
1297
1298         * UIProcess/CoordinatedGraphics/WebView.cpp:
1299         (WebKit::WebView::didCommitLoadForMainFrame): Added new parameters.
1300         * UIProcess/CoordinatedGraphics/WebView.h: Ditto.
1301         * UIProcess/WebPageProxy.h:
1302         * UIProcess/efl/WebViewEfl.cpp: Added dummy didFinishLoadingDataForCustomContentProvider()
1303         (WebKit::WebViewEfl::exitFullScreen):
1304         (WebKit::WebViewEfl::didFinishLoadingDataForCustomContentProvider):
1305         * UIProcess/efl/WebViewEfl.h: Ditto.
1306
1307 2014-03-07  Enrica Casucci  <enrica@apple.com>
1308
1309         [iOS WebKit2] Keyboard accessory comes up when I click a link.
1310         https://bugs.webkit.org/show_bug.cgi?id=129949
1311         <rdar://problem/16265305>
1312
1313         Reviewed by Simon Fraser.
1314
1315         We need to create the accessory view only when needed.
1316
1317         * UIProcess/ios/WKContentViewInteraction.mm:
1318         (-[WKContentView requiresAccessoryView]):
1319         (-[WKContentView inputAccessoryView]):
1320
1321 2014-03-07  Enrica Casucci  <enrica@apple.com>
1322
1323         [iOS WebKit2] Long-press on a link shows just "Copy".
1324         https://bugs.webkit.org/show_bug.cgi?id=129938
1325         <rdar://problem/16266054>
1326
1327         Reviewed by Benjamin Poulain.
1328
1329         When adding a FIXME comment, I accidentally removed the ! on
1330         the if (!element) condition.
1331
1332         * WebProcess/WebPage/ios/WebPageIOS.mm:
1333         (WebKit::WebPage::getPositionInformation):
1334
1335 2014-03-07  Tim Horton  <timothy_horton@apple.com>
1336
1337         [WebKit2][iOS] Main-frame custom content providers
1338         https://bugs.webkit.org/show_bug.cgi?id=129809
1339
1340         Reviewed by Dan Bernstein.
1341
1342         Re-introduce custom content providers to WebKit2 (removed in r152841), but
1343         for iOS this time.
1344
1345         * UIProcess/API/Cocoa/WKWebView.mm:
1346         (-[WKWebView initWithFrame:configuration:]):
1347         Send the initial MIME types that have custom content providers to the WebProcess.
1348
1349         (-[WKWebView dealloc]):
1350         Unregister our page from the content provider registry.
1351         
1352         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
1353         Install/uninstall the custom content provider. Create a view, if needed,
1354         based on the class that the registry has associated with the given MIME type.
1355         We unparent the WKContentView while the custom content provider is active,
1356         and re-use the existing WKScrollView to contain the custom content provider.
1357
1358         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:dataReference:]):
1359         Forward loaded data on to the custom content provider for display.
1360
1361         (-[WKWebView _didCommitLayerTree:WebKit::]):
1362         Assert that we aren't getting layer tree commits while using a custom content provider.
1363
1364         (-[WKWebView viewForZoomingInScrollView:]):
1365         If we're using a custom content provider, its view should be used for zooming
1366         instead of the (unparented) web content view.
1367
1368         (-[WKWebView hasContentView]):
1369         (-[WKWebView scrollViewWillBeginZooming:withView:]):
1370         (-[WKWebView scrollViewWillBeginDragging:]):
1371         (-[WKWebView _didFinishScrolling]):
1372         (-[WKWebView _updateVisibleContentRects]):
1373         If we do not have a parented WKContentView because we are using a custom
1374         content provider, we should not forward scroll view related changes to it.
1375
1376         (-[WKWebView _frameOrBoundsChanged]):
1377         Update the minimum size of the custom content provider if the web view size changes.
1378
1379         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1380         (-[WKWebViewConfiguration copyWithZone:]):
1381         (-[WKWebViewConfiguration _contentProviderRegistry]):
1382         (-[WKWebViewConfiguration _setContentProviderRegistry:]):
1383         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h: Added.
1384         Add an internal WKWebViewConfiguration property, the WKWebViewContentProviderRegistry.
1385
1386         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1387
1388         * UIProcess/Cocoa/WKWebViewContentProvider.h: Added.
1389         A minimal protocol for informing custom content providers of changes to
1390         the size of the view, the represented data, and the owning scroll view.
1391
1392         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h: Added.
1393         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Added.
1394         (-[WKWebViewContentProviderRegistry addPage:]):
1395         (-[WKWebViewContentProviderRegistry removePage:]):
1396         (-[WKWebViewContentProviderRegistry registerProvider:forMIMEType:]):
1397         (-[WKWebViewContentProviderRegistry providerForMIMEType:]):
1398         (-[WKWebViewContentProviderRegistry mimeTypesWithContentProviders]):
1399         New class, keeps track of a mapping from MIME types to UIViews that
1400         conform to the WKWebViewContentProvider protocol.
1401
1402         * UIProcess/WebPageProxy.cpp:
1403         (WebKit::WebPageProxy::WebPageProxy):
1404         (WebKit::WebPageProxy::didCommitLoadForFrame):
1405         * UIProcess/WebPageProxy.h:
1406         * UIProcess/WebPageProxy.messages.in:
1407
1408         * UIProcess/PageClient.h:
1409         * UIProcess/ios/PageClientImplIOS.h:
1410         * UIProcess/ios/PageClientImplIOS.mm:
1411         (WebKit::PageClientImpl::PageClientImpl):
1412         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
1413         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
1414         * UIProcess/mac/PageClientImpl.h:
1415         * UIProcess/mac/PageClientImpl.mm:
1416         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
1417         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
1418         Add parameters to didCommitLoadForMainFrame, indicating if we should use
1419         a custom content provider to display the main frame, and what MIME type
1420         was loaded in said frame, and add didFinishLoadingDataForCustomContentProvider.
1421         On iOS, forward these to the WKWebView.
1422         Also, give PageClientImplIOS a reference to the WKWebView.
1423         
1424         * UIProcess/ios/WKContentView.mm:
1425         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
1426         
1427         * WebKit2.xcodeproj/project.pbxproj:
1428         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1429         (-[WKWebProcessPlugInFrame _hasCustomContentProvider]):
1430         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
1431         Expose whether or not a given frame has a custom content provider to the plug-in.
1432
1433         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1434         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
1435         (WebKit::WebFrameLoaderClient::hasHTMLView):
1436         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1437         (WebKit::WebFrameLoaderClient::committedLoad):
1438         (WebKit::WebFrameLoaderClient::finishedLoading):
1439         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
1440         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1441         (WebKit::WebFrameLoaderClient::canCachePage):
1442         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1443         (WebKit::WebFrameLoaderClient::frameHasCustomContentProvider):
1444         Restore WebFrameLoaderClient custom representation code, which ensures
1445         that data is routed correctly (to the UI process, and not to WebCore) and
1446         that we don't try to use the page cache for frames with content providers.
1447
1448         * WebProcess/WebPage/WebPage.cpp:
1449         (WebKit::WebPage::mainFrameHasCustomContentProvider):
1450         (WebKit::WebPage::addMIMETypeWithCustomContentProvider):
1451         (WebKit::WebPage::shouldUseCustomContentProviderForResponse):
1452         (WebKit::WebPage::canShowMIMEType):
1453         * WebProcess/WebPage/WebPage.h:
1454         * WebProcess/WebPage/WebPage.messages.in:
1455         Keep a list of MIME types which can be displayed via custom content providers
1456         in WebPage, which will be pushed down from the registry as new providers
1457         are added. Plug-ins still take precendence over custom content providers.
1458
1459 2014-03-07  Anders Carlsson  <andersca@apple.com>
1460
1461         MigrateHeaders.make should remove C SPI includes from WebKit2 headers
1462         https://bugs.webkit.org/show_bug.cgi?id=129937
1463         <rdar://problem/15920020>
1464
1465         Reviewed by Tim Horton.
1466
1467         * WebKit2.xcodeproj/project.pbxproj:
1468         Make WKPreferences.h and all headers it includes public. Update the post processing of WKBase.h
1469         to account for WKBase.h now being a public header again.
1470
1471 2014-03-07  Alexey Proskuryakov  <ap@apple.com>
1472
1473         REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
1474         https://bugs.webkit.org/show_bug.cgi?id=129872
1475
1476         Reviewed by Tim Horton.
1477
1478         * UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
1479         were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
1480         But this SPI is unused, and can be simply removed.
1481
1482         * UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
1483         locationInWindow is undefined for keyboard events, so we have to use current location.
1484         Thankfully, there is a method that returns the location in appropriate coordinate
1485         space, unlike +[NSEvent mouseLocation] that we used before.
1486
1487 2014-03-07  Andy Estes  <aestes@apple.com>
1488
1489         [iOS] Install WebKit2 XPC services to the correct place during iOS Simulator builds
1490         https://bugs.webkit.org/show_bug.cgi?id=129914
1491
1492         Reviewed by Dan Bernstein.
1493
1494         We weren't specifying INSTALL_PATH for iOS Simulator builds in
1495         BaseXPCService.xcconfig, and r164576 changed INSTALL_PATH to
1496         INSTALL_PATH_ACTUAL. This caused XPC services to start being installed
1497         to the root of the iOS Simulator SDK. Fix this by setting
1498         INSTALL_PATH_ACTUAL for iphonesimulator.
1499
1500         * Configurations/BaseXPCService.xcconfig:
1501
1502 2014-03-07  Andreas Kling  <akling@apple.com>
1503
1504         [Mac] Notify system malloc of fake memory pressure.
1505         <https://webkit.org/b/129908>
1506
1507         Reviewed by Anders Carlsson.
1508
1509         * NetworkProcess/mac/NetworkProcessMac.mm:
1510         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1511
1512             Listen for the fake memory pressure notification and respond by
1513             just forwarding to system malloc. We don't do the full WebCore
1514             memory pressure handling here, since that will cause stuff that
1515             the network process doesn't need to get instantiated.
1516
1517 2014-03-07  Dean Jackson  <dino@apple.com>
1518
1519         Attempt to fix the iOS build.
1520
1521         * Configurations/WebKit2.xcconfig: Add -framework OpenGLES to linking.
1522
1523 2014-03-07  Simon Fraser  <simon.fraser@apple.com>
1524
1525         [iOS] Add an updateID to visibleContentRect updates which is passed back in layer transactions, so we know whether transactions are stale
1526         https://bugs.webkit.org/show_bug.cgi?id=129897
1527
1528         Reviewed by Benjamin Poulain.
1529
1530         In WebKit2 on iOS we need to know when layer updates from the web process
1531         are stale with respect to visible rect updates from the UI process. Do so
1532         by adding an updateID to VisibleContentRectUpdateInfo, and storing it
1533         on each side, returning it in RemoteLayerTreeTransaction.
1534         
1535         Did some re-ordering of members and encoding order in RemoteLayerTreeTransaction
1536         to group like data members together.
1537         
1538         * Shared/VisibleContentRectUpdateInfo.cpp:
1539         (WebKit::VisibleContentRectUpdateInfo::encode):
1540         (WebKit::VisibleContentRectUpdateInfo::decode):
1541         * Shared/VisibleContentRectUpdateInfo.h:
1542         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1543         (WebKit::VisibleContentRectUpdateInfo::updateID):
1544         (WebKit::operator==):
1545         * Shared/mac/RemoteLayerTreeTransaction.h:
1546         (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID):
1547         (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID):
1548         * Shared/mac/RemoteLayerTreeTransaction.mm:
1549         (WebKit::RemoteLayerTreeTransaction::encode):
1550         (WebKit::RemoteLayerTreeTransaction::decode):
1551         * UIProcess/WebPageProxy.h:
1552         (WebKit::WebPageProxy::nextVisibleContentRectUpdateID):
1553         (WebKit::WebPageProxy::lastVisibleContentRectUpdateID):
1554         * UIProcess/ios/WKContentView.mm:
1555         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1556         * WebProcess/WebPage/WebPage.cpp:
1557         (WebKit::WebPage::WebPage):
1558         (WebKit::WebPage::willCommitLayerTree):
1559         * WebProcess/WebPage/WebPage.h:
1560         * WebProcess/WebPage/ios/WebPageIOS.mm:
1561         (WebKit::WebPage::updateVisibleContentRects):
1562
1563 2014-03-07  Roger Fong  <roger_fong@apple.com>
1564
1565         Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
1566         https://bugs.webkit.org/show_bug.cgi?id=129873.
1567
1568         Reviewed by Dean Jackson.
1569
1570         Remove setSystemWebGLLoadPolicy API.
1571         * UIProcess/API/APILoaderClient.h:
1572         (API::LoaderClient::resolveWebGLLoadPolicy):
1573         * UIProcess/API/C/WKPage.cpp:
1574         (WKPageSetPageLoaderClient):
1575         * UIProcess/API/C/WKPageLoaderClient.h:
1576         * UIProcess/WebPageProxy.cpp:
1577         (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
1578         * UIProcess/WebPageProxy.h:
1579         * UIProcess/WebPageProxy.messages.in:
1580         * WebProcess/WebPage/mac/WebPageMac.mm:
1581         (WebKit::WebPage::webGLPolicyForURL):
1582
1583         Add API to directly query the WebGL blocking policies from WKSI.
1584         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1585         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1586         (WKContextShouldBlockWebGL):
1587         (WKContextShouldSuggestBlockWebGL):
1588
1589 2014-03-07  Eric Carlson  <eric.carlson@apple.com>
1590
1591         Initialize new WKSI functions for WebKit2
1592         https://bugs.webkit.org/show_bug.cgi?id=129889
1593
1594         Reviewed by Simon Fraser.
1595
1596         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1597         (InitWebCoreSystemInterface):
1598
1599 2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1600
1601         [GTK] Use final and override in WebPrintOperationGtk
1602         https://bugs.webkit.org/show_bug.cgi?id=129868
1603
1604         Reviewed by Sergio Villar Senin.
1605
1606         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1607
1608 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
1609
1610         [Mac] Allow com.apple.GSSCred in WebKit sandbox profiles
1611         https://bugs.webkit.org/show_bug.cgi?id=129777
1612         <rdar://problem/16050832>
1613
1614         Reviewed by Anders Carlsson.
1615
1616         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1617         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
1618         * WebProcess/com.apple.WebProcess.sb.in:
1619
1620 2014-03-06  Filip Pizlo  <fpizlo@apple.com>
1621
1622         If the FTL is build-time enabled then it should be run-time enabled.
1623
1624         Rubber stamped by Geoffrey Garen.
1625
1626         * Shared/WebProcessCreationParameters.cpp:
1627         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1628         (WebKit::WebProcessCreationParameters::encode):
1629         (WebKit::WebProcessCreationParameters::decode):
1630         * Shared/WebProcessCreationParameters.h:
1631         * UIProcess/mac/WebContextMac.mm:
1632         (WebKit::registerUserDefaultsIfNeeded):
1633         (WebKit::WebContext::platformInitializeWebProcess):
1634         * WebProcess/cocoa/WebProcessCocoa.mm:
1635         (WebKit::WebProcess::platformInitializeWebProcess):
1636
1637 2014-03-06  Hyowon Kim  <hw1008.kim@samsung.com>
1638
1639         [EFL] Move EvasGL classes from WebKit to WebCore namespace.
1640         https://bugs.webkit.org/show_bug.cgi?id=129797
1641
1642         Reviewed by Gyuyoung Kim.
1643
1644         * UIProcess/API/efl/EwkView.h: namespace changes for EvasGLContext/Surface.
1645
1646 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1647
1648         Remove one more setCustomFixedPositionRect() that I missed.
1649
1650         * UIProcess/DrawingAreaProxy.h:
1651
1652 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1653
1654         Send the fixed position rect to the WebProcess along with the other rects
1655         https://bugs.webkit.org/show_bug.cgi?id=129856
1656
1657         Reviewed by Benjamin Poulain.
1658         
1659         Remove the functions that pass the custom fixed position rect through
1660         the DrawingArea, and replace them by adding this rect to the
1661         VisibleContentRectUpdateInfo, along with the "is stable" flag. We
1662         then set the custom fixed position rect in the web process for
1663         stable updates.
1664
1665         * Shared/VisibleContentRectUpdateInfo.cpp:
1666         (WebKit::VisibleContentRectUpdateInfo::encode):
1667         (WebKit::VisibleContentRectUpdateInfo::decode):
1668         * Shared/VisibleContentRectUpdateInfo.h:
1669         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1670         (WebKit::VisibleContentRectUpdateInfo::customFixedPositionRect):
1671         (WebKit::VisibleContentRectUpdateInfo::inStableState):
1672         (WebKit::operator==):
1673         * UIProcess/DrawingAreaProxy.cpp:
1674         * UIProcess/ios/WKContentView.mm:
1675         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1676         * WebProcess/WebPage/DrawingArea.h:
1677         * WebProcess/WebPage/DrawingArea.messages.in:
1678         * WebProcess/WebPage/ios/WebPageIOS.mm:
1679         (WebKit::WebPage::updateVisibleContentRects):
1680         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1681         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1682         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1683
1684 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1685
1686         Remove empty class extension in WKContentViewInteraction
1687         https://bugs.webkit.org/show_bug.cgi?id=129849
1688
1689         Reviewed by Enrica Casucci.
1690         
1691         This empty class extension is cruft left over from refactoring.
1692         It can be removed.
1693
1694         * UIProcess/ios/WKContentViewInteraction.mm:
1695
1696 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1697
1698         [iOS] didUpdateVisibleRect: should use fabs, not abs
1699         https://bugs.webkit.org/show_bug.cgi?id=129843
1700
1701         Reviewed by Benjamin Poulain.
1702         
1703         When zooming we sent messages to the web process with an unchanging
1704         zoom scale because of use of abs() rather than fabs().
1705
1706         * UIProcess/ios/WKContentView.mm:
1707         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1708
1709 2014-03-06  Anders Carlsson  <andersca@apple.com>
1710
1711         Remove WebKit1 header includes from WebKit2
1712         https://bugs.webkit.org/show_bug.cgi?id=129824
1713
1714         Reviewed by Dan Bernstein.
1715
1716         * UIProcess/mac/WKFullScreenWindowController.mm:
1717         (makeResponderFirstResponderIfDescendantOfView):
1718         Add a new function instead of calling an NSWindow category method that's defined in WebKit1.
1719
1720         (-[WKFullScreenWindowController enterFullScreen:]):
1721         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
1722         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
1723         Call makeResponderFirstResponderIfDescendantOfView.
1724
1725         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1726         Remove unused WebKit1 header import.
1727
1728         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1729         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
1730         Change a category to be on NSObject instead of WebResource.
1731
1732 2014-03-06  Jon Lee  <jonlee@apple.com>
1733
1734         iOS build fix.
1735
1736         Reviewed by Simon Fraser.
1737
1738         * UIProcess/ios/SmartMagnificationController.mm:
1739
1740 2014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1741
1742         Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
1743         https://bugs.webkit.org/show_bug.cgi?id=127944
1744
1745         Reviewed by Geoffrey Garen.
1746
1747         * WebProcess/WebCoreSupport/WebChromeClient.h:
1748         Update namespaces.
1749
1750 2014-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1751
1752         [GTK] Close the page when the view is disposed instead of when finalized
1753         https://bugs.webkit.org/show_bug.cgi?id=129783
1754
1755         Reviewed by Sergio Villar Senin.
1756
1757         When a GtkWidget is destroyed, the GObject is disposed, but not
1758         finalized if it has additional references. When the destroyed
1759         widget is leaked by the application, we leak the page proxy and
1760         what is more important the web process in multi-process mode.
1761
1762         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1763         (webkitWebViewBaseDispose): Close the WebPageProxy.
1764
1765 2014-03-05  Chris Fleizach  <cfleizach@apple.com>
1766
1767         AX: Support IOS Accessibility in WK2
1768         https://bugs.webkit.org/show_bug.cgi?id=129527
1769
1770         Build fix.
1771
1772         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1773         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1774
1775 2014-03-05  Chris Fleizach  <cfleizach@apple.com>
1776
1777         AX: Support IOS Accessibility in WK2
1778         https://bugs.webkit.org/show_bug.cgi?id=129527
1779
1780         Address review comments from Simon noted in bug.
1781
1782         * UIProcess/ios/WKContentView.mm:
1783         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
1784         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
1785         (-[WKAccessibilityWebPageObject init]):
1786         (-[WKAccessibilityWebPageObject dealloc]):
1787         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
1788         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1789         (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
1790         (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
1791         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
1792         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
1793         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1794
1795 2014-03-05  Dean Jackson  <dino@apple.com>
1796
1797         [WebGL] Use WKSI to see what the system policy for WebGL is
1798         https://bugs.webkit.org/show_bug.cgi?id=129722
1799         <rdar://problem/15790542>
1800
1801         Reviewed by Tim Horton.
1802
1803         Use the WebKitSystemInterface methods WKShouldBlockWebGL
1804         and WKShouldSuggestBlockingWebGL to query what the host
1805         system thinks about the hardware. Tell the client about
1806         the result in a new WebPage method setSystemWebGLPolicy.
1807
1808         * UIProcess/API/APILoaderClient.h:
1809         (API::LoaderClient::setSystemWebGLLoadPolicy): New empty definition.
1810         * UIProcess/API/C/WKAPICast.h:
1811         (WebKit::toAPI): Convert a WebGLLoadPolicy into a WKWebGLLoadPolicy.
1812         * UIProcess/API/C/WKPage.cpp: Call setSystemWebGLLoadPolicy.
1813         (WKPageSetPageLoaderClient):
1814         * UIProcess/API/C/WKPageLoaderClient.h: New typedef and entry in client structure.
1815         * UIProcess/WebPageProxy.cpp:
1816         (WebKit::WebPageProxy::setSystemWebGLPolicy):
1817         * UIProcess/WebPageProxy.h:
1818         * UIProcess/WebPageProxy.messages.in: Add SetSystemWebGLPolicy.
1819         * Source/WebKit2/Configurations/WebKit2.xcconfig: We have to link against OpenGL now, because WKSI
1820         uses it for hardware detection.
1821         * WebProcess/WebPage/WebPage.cpp: Remove the implementation here, but leave
1822         empty methods for non-Apple platforms.
1823         (WebKit::WebPage::WebPage):
1824         (WebKit::WebPage::webGLPolicyForURL):
1825         (WebKit::WebPage::resolveWebGLPolicyForURL):
1826         * WebProcess/WebPage/WebPage.h: Add m_systemWebGLPolicy.
1827         * WebProcess/WebPage/mac/WebPageMac.mm:
1828         (WebKit::WebPage::webGLPolicyForURL): Moved in from WebPage, but now they call
1829         into WKSI and send the result to the client if necessary.
1830         (WebKit::WebPage::resolveWebGLPolicyForURL):
1831
1832 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
1833
1834         Fix a stupid error in r165118 that caused userVisibleString()
1835         to call itself recursively.
1836
1837         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1838         (WebKit::WebEditorClient::userVisibleString):
1839
1840 2014-03-05  Benjamin Poulain  <bpoulain@apple.com>
1841
1842         [iOS] Rename the various VisibleExtent variations to exposedContentRect
1843         https://bugs.webkit.org/show_bug.cgi?id=129728
1844
1845         Reviewed by Simon Fraser.
1846
1847         * WebProcess/WebPage/DrawingArea.h:
1848         * WebProcess/WebPage/ios/WebPageIOS.mm:
1849         (WebKit::WebPage::updateVisibleContentRects):
1850         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1851         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1852         (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
1853
1854 2014-03-05  Dean Jackson  <dino@apple.com>
1855
1856         Unreviewed. Fix the Apple-internal builds.
1857
1858         * Configurations/WebKit2.xcconfig: Add -framework OpenGL.
1859
1860 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
1861
1862         ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
1863         https://bugs.webkit.org/show_bug.cgi?id=129752
1864
1865         Reviewed by Enrica Casucci.
1866         
1867         Get WebDragClientMac off of all WebKit headers, and WebEditorClientMac off
1868         all but one by using C functions from WebCoreNSURLExtras.h rather than
1869         the NSURL category.
1870
1871         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1872         (WebKit::WebDragClient::declareAndWriteDragImage):
1873         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1874         (WebKit::WebEditorClient::userVisibleString):
1875         (WebKit::WebEditorClient::canonicalizeURL):
1876         (WebKit::WebEditorClient::canonicalizeURLString):
1877
1878 2014-03-05  Martin Hock  <mhock@apple.com>
1879
1880         Add support for sessions to MemoryCache.
1881         https://bugs.webkit.org/show_bug.cgi?id=127794
1882
1883         Reviewed by Sam Weinig.
1884
1885         * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
1886         (WebKit::NetworkResourceLoader::sessionID):
1887         * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
1888         * NetworkProcess/mac/DiskCacheMonitor.mm:
1889         (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
1890         * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
1891         (WebKit::NetworkProcessConnection::didCacheResource):
1892         * WebProcess/Network/NetworkProcessConnection.h: Ditto.
1893         * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
1894
1895 2014-03-05  Enrica Casucci  <enrica@apple.com>
1896
1897         [iOS WebKit2] support multi-select and select with groups for iPhone.
1898         https://bugs.webkit.org/show_bug.cgi?id=129344
1899         <rdar://problem/16206928>
1900
1901         Reviewed by Simon Fraser.
1902
1903         This is the remaining work on select element support on iOS.
1904         This adds multi-select and select with group support with UI
1905         for iPhone that uses UIPickerView.
1906
1907         * UIProcess/ios/WKContentViewInteraction.mm:
1908         (-[WKContentView resignFirstResponder]):
1909         (-[WKContentView inputAccessoryView]): Removed incorrect early return.
1910         (-[WKContentView _stopAssistingNode]):
1911         * UIProcess/ios/forms/WKFormSelectControl.h:
1912         * UIProcess/ios/forms/WKFormSelectControl.mm:
1913         (adjustedFontSize): Moved here to make it available to both picker and
1914         popover based implementations.
1915         (-[WKFormSelectControl initWithView:]):
1916         * UIProcess/ios/forms/WKFormSelectPicker.mm:
1917         (-[WKOptionPickerCell _isSelectable]):
1918         (-[WKOptionPickerCell initCommon]):
1919         (-[WKOptionPickerCell initWithOptionItem:]):
1920         (-[WKOptionGroupPickerCell initWithOptionItem:]):
1921         (-[WKOptionGroupPickerCell labelWidthForBounds:]):
1922         (-[WKOptionGroupPickerCell layoutSubviews]):
1923         (-[WKMultipleSelectPicker initWithView:]):
1924         (-[WKMultipleSelectPicker dealloc]):
1925         (-[WKMultipleSelectPicker controlView]):
1926         (-[WKMultipleSelectPicker controlBeginEditing]):
1927         (-[WKMultipleSelectPicker controlEndEditing]):
1928         (-[WKMultipleSelectPicker layoutSubviews]):
1929         (-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
1930         (-[WKMultipleSelectPicker numberOfComponentsInPickerView:]):
1931         (-[WKMultipleSelectPicker pickerView:numberOfRowsInComponent:]):
1932         (-[WKMultipleSelectPicker findItemIndexAt:]):
1933         (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
1934         (-[WKSelectSinglePicker initWithView:]):
1935         (-[WKSelectSinglePicker controlEndEditing]):
1936         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1937
1938 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
1939
1940         [GTK][CMake] Generate documentation for the DOM bindings
1941         https://bugs.webkit.org/show_bug.cgi?id=126211
1942
1943         Reviewed by Carlos Garcia Campos.
1944
1945         * PlatformGTK.cmake: The list of headers for GIR generation has a better name now.
1946
1947 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
1948
1949         Fix the build after r165095
1950
1951         * UIProcess/API/Cocoa/WKWebView.mm:
1952         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
1953
1954 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
1955
1956         [iOS][WK2] Account for the keyboard when computing the unobscuredRect
1957         https://bugs.webkit.org/show_bug.cgi?id=129660
1958
1959         Reviewed by Enrica Casucci.
1960
1961         Adjust the unobscuredRect when a docked keyboard is on screen.
1962
1963         * UIProcess/API/Cocoa/WKWebView.mm:
1964         (-[WKWebView _updateVisibleContentRectsWithStableState:]):
1965         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
1966
1967 2014-03-04  Andy Estes  <aestes@apple.com>
1968
1969         [iOS][WebKit2] Exclude plug-in sandbox profiles from the build
1970         https://bugs.webkit.org/show_bug.cgi?id=129719
1971
1972         Reviewed by Simon Fraser.
1973
1974         * Configurations/WebKit2.xcconfig:
1975
1976 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
1977
1978         [iOS][WK2] WKScrollView should be able to cancel touches in content view
1979         https://bugs.webkit.org/show_bug.cgi?id=129711
1980
1981         Reviewed by Simon Fraser.
1982
1983         * UIProcess/ios/WKScrollView.mm:
1984         We should not override UIWebScrollView behavior regarding touch cancellation otherwise we force
1985         other gesture recognizers to fail if delayed touches have been dispatched.
1986
1987 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
1988
1989         [iOS][WK2] Consider the entire view state on update to find if a change is stable or not
1990         https://bugs.webkit.org/show_bug.cgi?id=129721
1991
1992         Reviewed by Simon Fraser.
1993
1994         Changes in scroll, zoom and obscuredRect can happen simultaneously. To compute if the current state
1995         is stable or not, we should consider the complete picture from all the type of updates.
1996
1997         * UIProcess/API/Cocoa/WKWebView.mm:
1998         (-[WKWebView _didFinishScrolling]):
1999         (-[WKWebView scrollViewDidScroll:]):
2000         (-[WKWebView scrollViewDidZoom:]):
2001         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
2002         (-[WKWebView _frameOrBoundsChanged]):
2003         (-[WKWebView _updateVisibleContentRects]):
2004         (-[WKWebView _setObscuredInsets:]):
2005         (-[WKWebView _endInteractiveObscuredInsetsChange]):
2006
2007 2014-03-04  Jeremy Jones  <jeremyj@apple.com>
2008
2009         WebVideoFullscreen, should make the hand off of the video layer explicit.
2010         https://bugs.webkit.org/show_bug.cgi?id=128844
2011
2012         Reviewed by Simon Fraser.
2013
2014         This change introduces a more explicit hand-off of the video layer and fullscreen transition.
2015         This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
2016         WebVideoFullscreenModel <-> WebVideoFullscreenInterface
2017               enterFullScreen(*) ->
2018                                 <- borrowVideoLayer
2019               willLendVideoLayer ->
2020                didLendVideoLayer ->
2021                                 <- didEnterFullscreen
2022                                 ...
2023                                 <- requestExitFullscreen
2024                   exitFullscreen ->
2025                                 <- returnVideoLayer
2026                                 <- didExitFullscreen
2027         (*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
2028
2029         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2030         Implement WebVideoFullscreenChangeObserver.
2031         Add support for explicit video layer hand-off.
2032         Add m_videoView to retain the videoLayer's UIView.
2033
2034         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2035         WillLendVideoLayerWithID replaces SetVideoLayerID
2036
2037         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2038         Adopt new methods for explicit video layer hand-off.
2039
2040         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
2041         Observe fullscreen changes.
2042
2043         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
2044         Pending fullscreen transition now does didLendVideoLayer instead of calling enter fullscreen.
2045         It also removes the videoView from it's super view now that it is safe to do so.
2046
2047         (WebKit::WebVideoFullscreenManagerProxy::willLendVideoLayerWithID):
2048         This replaces setVideoLayerID. It retains the UIView for the layer to keep it alive before it is unparented.
2049
2050         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
2051         Adopt more explicit fullscreen transition.
2052
2053         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2054         Adopt more explicit fullscreen transition.
2055
2056         (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2057         Adopt more explicit fullscreen transition.
2058
2059         (WebKit::WebVideoFullscreenManagerProxy::borrowVideoLayer):
2060         Adopt more explicit video layer hand-off.
2061
2062         (WebKit::WebVideoFullscreenManagerProxy::returnVideoLayer):
2063         Adopt more explicit video layer hand-off.
2064
2065         * WebProcess/ios/WebVideoFullscreenManager.cpp:
2066         Manage state of fullscreen transition more competently. Wait till an animation is complete to begin the next one.
2067
2068         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
2069         Init three new state members.
2070
2071         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
2072         Update animation state. Don't procede if animation is in progress.
2073
2074         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
2075         Update animation state. Don't procede if animation is in progress.
2076
2077         (WebKit::WebVideoFullscreenManager::willLendVideoLayer):
2078         Adopt more explicit video layer hand-off.
2079         This replaces SetVideoLayer.
2080
2081         (WebKit::WebVideoFullscreenManager::didLendVideoLayer):
2082         This is a no-op as this will be sent through a RemoteLayerTreeTransaction.
2083
2084         (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
2085         Adopt more explicit fullscreen transition.
2086
2087         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2088         Adopt more explicit fullscreen transition.
2089
2090         * WebProcess/ios/WebVideoFullscreenManager.h:
2091         Adopt more explicit fullscreen transition.
2092
2093         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2094         Adopt more explicit fullscreen/video layer transition.
2095
2096 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2097
2098         Get position:fixed working slightly better on iOS WK2
2099         https://bugs.webkit.org/show_bug.cgi?id=129714
2100
2101         Reviewed by Benjamin Poulain.
2102         
2103         Start telling the RemoteScrollingCoordinatorProxy about scroll position changes
2104         again, so it can update fixed and sticky layers.
2105         
2106         Send the scroll position as a FloatPoint, rather than an IntPoint.
2107
2108         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2109         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
2110         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
2111         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2112         * UIProcess/WebPageProxy.h:
2113         * UIProcess/ios/WKContentView.mm:
2114         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2115         Tell the RemoteScrollingCoordinatorProxy about the scroll update.
2116         Only update the customFixedPositionRect if we've finished scrolling or zooming.
2117         * UIProcess/ios/WebPageProxyIOS.mm:
2118         (WebKit::WebPageProxy::updateVisibleContentRects): Return a bool indicating
2119         whether the visible rects changed.
2120
2121 2014-03-04  Conrad Shultz  <conrad_shultz@apple.com>
2122
2123         WKPage's pageExtendedBackgroundColor API exposed through WKView/WKWebView should support NSColor
2124         https://bugs.webkit.org/show_bug.cgi?id=129704
2125
2126         Reviewed by Beth Dakin.
2127
2128         Add NSColor-returning methods to complement the existing UIColor-returning methods.
2129
2130         * UIProcess/API/Cocoa/WKViewPrivate.h:
2131         Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
2132
2133         * UIProcess/API/Cocoa/WKWebView.mm:
2134         (-[WKWebView _pageExtendedBackgroundColor]):
2135         Return an NSColor created from the pageExtendedBackgroundColor.
2136
2137         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2138         Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
2139
2140         * UIProcess/API/mac/WKView.mm:
2141         (-[WKView _pageExtendedBackgroundColor]):
2142         Return an NSColor created from the pageExtendedBackgroundColor.
2143
2144 2014-03-04  Joseph Pecoraro  <pecoraro@apple.com>
2145
2146         Web Inspector: Give WebProcess private RWI entitlement
2147         https://bugs.webkit.org/show_bug.cgi?id=129710
2148
2149         Reviewed by Timothy Hatcher.
2150
2151         * Configurations/WebContent-iOS.entitlements:
2152         Add entitlements to "WebProcess" when code signing.
2153
2154         * Configurations/WebContentProcess.xcconfig:
2155         Add the private RWI entitlement.
2156
2157 2014-03-04  Enrica Casucci  <enrica@apple.com>
2158
2159         [iOS WebKit2]: Next/Prev button in the accessory bar do not work.
2160         https://bugs.webkit.org/show_bug.cgi?id=129690
2161         <rdar://problem/16073569>
2162
2163         Reviewed by Simon Fraser.
2164
2165         Adding support for Next and Previous buttons in the accessory bar.
2166         When the request is processed by the WebProcess, we identify the next
2167         focusable node that needs to be assisted and we call focus() on the element
2168         letting the focus changing machinery take care of updating the assisted node.
2169         This change also add support for the Clear button, when appropriate and hooks up
2170         the call to the WebProcess.
2171
2172         * UIProcess/WebPageProxy.h:
2173         * UIProcess/ios/WKContentViewInteraction.mm:
2174         (-[WKContentView accessoryTab:]):
2175         (-[WKContentView accessoryClear]):
2176         (-[WKContentView _updateAccessory]):
2177         * UIProcess/ios/WebPageProxyIOS.mm:
2178         (WebKit::WebPageProxy::focusNextAssistedNode):
2179         * WebProcess/WebPage/WebPage.h:
2180         * WebProcess/WebPage/WebPage.messages.in:
2181         * WebProcess/WebPage/ios/WebPageIOS.mm:
2182         (WebKit::nextFocusableElement):
2183         (WebKit::hasFocusableElement):
2184         (WebKit::WebPage::focusNextAssistedNode):
2185         (WebKit::WebPage::getAssistedNodeInformation):
2186
2187 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2188
2189         Allow iOS DumpRenderTree crashes to show application-specific information
2190         https://bugs.webkit.org/show_bug.cgi?id=129705
2191
2192         Reviewed by David Kilzer.
2193         
2194         Make the WKSI function SetCrashReportApplicationSpecificInformation available
2195         in iOS simulator builds.
2196
2197         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2198         (InitWebCoreSystemInterface):
2199
2200 2014-03-04  Mark Hahnenberg  <mhahnenberg@apple.com>
2201
2202         Merge API shims and JSLock
2203         https://bugs.webkit.org/show_bug.cgi?id=129650
2204
2205         Reviewed by Mark Lam.
2206
2207         JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason 
2208         to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
2209
2210         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2211         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
2212         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
2213
2214 2014-03-03  Enrica Casucci  <enrica@apple.com>
2215
2216         [WK2] Selection remains after reload.
2217         https://bugs.webkit.org/show_bug.cgi?id=129648
2218         <rdar://problem/16207547>
2219
2220         Reviewed by Sam Weinig.
2221
2222         We normally clear the selection when resigninig first responder but
2223         that doesn't get called when reloading the page or when navigating with
2224         back/forward buttons. The correct place to do this is when we get
2225         _didCommitLoadForMainFrame where we already stop assisting the node.
2226         The method we call into webselectionassistant is resignedFirstResponder
2227         which takes care of clearing the selection and removing the selection view.
2228
2229         * UIProcess/ios/WKContentViewInteraction.mm:
2230         (-[WKContentView _stopAssistingNode]):
2231
2232 2014-03-04  Hyowon Kim  <hw1008.kim@samsung.com>
2233
2234         Move EvasGLContext and EvasGLSurface files into the efl common directory.
2235         https://bugs.webkit.org/show_bug.cgi?id=129603
2236
2237         Reviewed by Gyuyoung Kim.
2238
2239         * PlatformEfl.cmake: Update for removed files.
2240
2241 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2242
2243         [iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
2244         https://bugs.webkit.org/show_bug.cgi?id=129649
2245
2246         Reviewed by Sam Weinig.
2247
2248         * WebProcess/WebPage/ios/WebPageIOS.mm:
2249         (WebKit::WebPage::updateVisibleContentRects):
2250         Update my workaround from r165003. We should not use programmatic scrolling when the scroll position is changed
2251         from the UI.
2252
2253 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2254
2255         [iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
2256         https://bugs.webkit.org/show_bug.cgi?id=129641
2257
2258         Reviewed by Sam Weinig.
2259
2260         * UIProcess/API/Cocoa/WKWebView.mm:
2261         (-[WKWebView _didCommitLayerTree:WebKit::]):
2262         Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
2263         In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
2264         did not match the actual WKContentView's area on screen.
2265
2266 2014-03-03  Jeremy Jones  <jeremyj@apple.com>
2267
2268         Forward application suspend resume notifications to the web process.
2269         https://bugs.webkit.org/show_bug.cgi?id=129356
2270
2271         Reviewed by Eric Carlson.
2272
2273         Repost UIApplicationWillEnterForegroundNotification,
2274         UIApplicationDidBecomeActiveNotification and 
2275         UIApplicationWillResignActiveNotification from UIProcess to WebProcess.
2276         As WebUIApplicationWillEnterForegroundNotification,
2277         WebUIApplicationDidBecomeActiveNotification, and
2278         WebUIApplicationWillResignActiveNotification
2279
2280         * UIProcess/WebPageProxy.h:
2281         Add applicationWillEnterForeground()
2282         applicationWillResignActive()
2283         applicationDidBecomeActive()
2284
2285         * UIProcess/ios/WKContentView.mm:
2286         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
2287         Observe notifications.
2288
2289         (-[WKContentView dealloc]):
2290         Stop observing notifications.
2291
2292         (-[WKContentView _applicationWillResignActive:]):
2293         Notify WebPageProxy of the event.
2294
2295         (-[WKContentView _applicationWillEnterForeground:]):
2296         Notify WebPageProxy of the event.
2297
2298         (-[WKContentView _applicationDidBecomeActive:]):
2299         Notify WebPageProxy of the event.
2300
2301         * UIProcess/ios/WebPageProxyIOS.mm:
2302         (WebKit::WebPageProxy::applicationWillEnterForeground):
2303         Send corresponding Message to WebPage.
2304
2305         (WebKit::WebPageProxy::applicationWillResignActive):
2306         Send corresponding Message to WebPage.
2307
2308         (WebKit::WebPageProxy::applicationDidBecomeActive):
2309         Send corresponding Message to WebPage.
2310
2311         * WebProcess/WebPage/WebPage.h:
2312         Add applicationWillEnterForeground()
2313         applicationWillResignActive()
2314         applicationDidBecomeActive()
2315
2316         * WebProcess/WebPage/WebPage.messages.in:
2317         Add applicationWillEnterForeground()
2318         applicationWillResignActive()
2319         applicationDidBecomeActive()
2320
2321         * WebProcess/WebPage/ios/WebPageIOS.mm:
2322         (WebKit::WebPage::applicationWillResignActive):
2323         Post corresponding NSNotification.
2324
2325         (WebKit::WebPage::applicationWillEnterForeground):
2326         Post corresponding NSNotification.
2327
2328         (WebKit::WebPage::applicationDidBecomeActive):
2329         Post corresponding NSNotification.
2330
2331 2014-03-03  Commit Queue  <commit-queue@webkit.org>
2332
2333         Unreviewed, rolling out r165013.
2334         http://trac.webkit.org/changeset/165013
2335         https://bugs.webkit.org/show_bug.cgi?id=129646
2336
2337         New code is not thread safe, asserting on a worker test
2338         (Requested by ap on #webkit).
2339
2340         * NetworkProcess/NetworkResourceLoader.h:
2341         * NetworkProcess/mac/DiskCacheMonitor.h:
2342         * NetworkProcess/mac/DiskCacheMonitor.mm:
2343         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
2344         * WebProcess/Network/NetworkProcessConnection.cpp:
2345         (WebKit::NetworkProcessConnection::didCacheResource):
2346         * WebProcess/Network/NetworkProcessConnection.h:
2347         * WebProcess/Network/NetworkProcessConnection.messages.in:
2348
2349 2014-03-03  Enrica Casucci  <enrica@apple.com>
2350
2351         [iOS WebKit2]: Text fields don't zoom in when focused
2352         https://bugs.webkit.org/show_bug.cgi?id=129632
2353         <rdar://problem/16185230>
2354
2355         Reviewed by Benjamin Poulain.
2356
2357         When focusing the node we need to zoom and center it and possibly
2358         scroll to make it visible.
2359         On iPad we only scroll, without zooming.
2360
2361         * Shared/AssistedNodeInformation.cpp:
2362         (WebKit::AssistedNodeInformation::encode):
2363         (WebKit::AssistedNodeInformation::decode):
2364         * Shared/AssistedNodeInformation.h:
2365         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2366         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2367         * UIProcess/ios/WKContentView.h:
2368         * UIProcess/ios/WKContentView.mm:
2369         (-[WKContentView _scrollToRect:withOrigin:minimumScrollDistance:]):
2370         * UIProcess/ios/WKContentViewInteraction.mm:
2371         (-[WKContentView _displayFormNodeInputView]):
2372         (-[WKContentView _startAssistingNode:]):
2373         * WebProcess/WebPage/ios/WebPageIOS.mm:
2374         (WebKit::WebPage::getAssistedNodeInformation):
2375
2376 2014-03-03  Sam Weinig  <sam@webkit.org>
2377
2378         Fix ASSERT and leaks introduced in recent "Support IOS Accessibility in WK2" patch
2379
2380         Reviewed by Simon Fraser.
2381
2382         * UIProcess/ios/WKContentView.mm:
2383         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
2384         * WebProcess/WebPage/ios/WebPageIOS.mm:
2385         (WebKit::WebPage::platformInitializeAccessibility):
2386
2387 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
2388
2389         Composited masks not working on iOS after r164890 
2390         https://bugs.webkit.org/show_bug.cgi?id=129630
2391
2392         Reviewed by Jer Noble.
2393         
2394         Fix typo in UIView-related masks code; set the mask layer
2395         on the view, not the maskView.
2396
2397         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2398         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
2399
2400 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
2401
2402         AX: Support IOS Accessibility in WK2
2403         https://bugs.webkit.org/show_bug.cgi?id=129527
2404
2405         Reviewed by Sam Weinig.
2406
2407         Implement enough AX hooks so that accessibility can work in WebKit2.
2408
2409         * Platform/IPC/Connection.h:
2410         * Platform/IPC/mac/ConnectionMac.cpp:
2411         (IPC::Connection::identifier):
2412         * UIProcess/ios/PageClientImplIOS.mm:
2413         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
2414         * UIProcess/ios/WKContentView.h:
2415         * UIProcess/ios/WKContentView.mm:
2416         (-[WKContentView _updateForScreen:]):
2417         (-[WKContentView _setAccessibilityWebProcessToken:]):
2418         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
2419         (-[WKContentView _didRelaunchProcess]):
2420         * UIProcess/ios/WebPageProxyIOS.mm:
2421         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
2422         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
2423         * WebKit2.xcodeproj/project.pbxproj:
2424         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2425         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h: Added.
2426         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: Added.
2427         (-[WKAccessibilityWebPageObject init]):
2428         (-[WKAccessibilityWebPageObject _accessibilityCategoryInstalled:]):
2429         (-[WKAccessibilityWebPageObject pageScale]):
2430         (-[WKAccessibilityWebPageObject dealloc]):
2431         * WebProcess/WebPage/WebPage.h:
2432         * WebProcess/WebPage/ios/WebPageIOS.mm:
2433         (WebKit::WebPage::platformInitialize):
2434         (WebKit::WebPage::platformInitializeAccessibility):
2435         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
2436         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
2437         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h.
2438         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm.
2439         (-[WKAccessibilityWebPageObjectBase accessibilityFocusedUIElement]):
2440         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h: Added.
2441         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Added.
2442         (-[WKAccessibilityWebPageObject accessibilityIsIgnored]):
2443         (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
2444         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
2445         (-[WKAccessibilityWebPageObject accessibilityIsAttributeSettable:]):
2446         (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
2447         (-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
2448         (-[WKAccessibilityWebPageObject accessibilityActionNames]):
2449         (-[WKAccessibilityWebPageObject accessibilityChildren]):
2450         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
2451         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
2452         (-[WKAccessibilityWebPageObject accessibilityShouldUseUniqueId]):
2453         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2454         * WebProcess/WebPage/mac/WebPageMac.mm:
2455         * WebProcess/cocoa/WebProcessCocoa.mm:
2456         (WebKit::WebProcess::platformInitializeProcess):
2457
2458 2014-03-03  Martin Hock  <mhock@apple.com>
2459
2460         Add support for sessions to MemoryCache.
2461         https://bugs.webkit.org/show_bug.cgi?id=127794
2462
2463         Reviewed by Sam Weinig.
2464
2465         * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
2466         (WebKit::NetworkResourceLoader::sessionID):
2467         * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
2468         * NetworkProcess/mac/DiskCacheMonitor.mm:
2469         (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
2470         * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
2471         (WebKit::NetworkProcessConnection::didCacheResource):
2472         * WebProcess/Network/NetworkProcessConnection.h: Ditto.
2473         * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
2474
2475 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2476
2477         [iOS][WK2] Regression: ScrollView's scroll offset is never set after r164702
2478         https://bugs.webkit.org/show_bug.cgi?id=129620
2479
2480         Reviewed by Simon Fraser.
2481
2482         * WebProcess/WebPage/ios/WebPageIOS.mm:
2483         (WebKit::WebPage::updateVisibleContentRects):
2484
2485 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
2486
2487         Crash when going into video fullscreen on iOS
2488         https://bugs.webkit.org/show_bug.cgi?id=129613
2489
2490         Reviewed by Dean Jackson.
2491         
2492         We shouldn't reparent a UIView's layer without unparenting
2493         the view first.
2494
2495         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2496         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
2497
2498 2014-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2499
2500         [GTK] WebKit2WebExtension GIR can't be used in vala
2501         https://bugs.webkit.org/show_bug.cgi?id=127179
2502
2503         Reviewed by Martin Robinson.
2504
2505         Add a different pkg-config file for the web extensions API.
2506
2507         * GNUmakefile.am:
2508         * PlatformGTK.cmake:
2509         * webkit2gtk-web-extension.pc.in: Added.
2510
2511 2014-03-02  Darin Adler  <darin@apple.com>
2512
2513         Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
2514         https://bugs.webkit.org/show_bug.cgi?id=129592
2515
2516         Reviewed by Sam Weinig.
2517
2518         * UIProcess/WebPageProxy.cpp: Added now-needed include.
2519         * WebProcess/WebPage/WebPage.cpp: Ditto.
2520
2521 2014-03-02  Enrica Casucci  <enrica@apple.com>
2522
2523         [iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
2524         https://bugs.webkit.org/show_bug.cgi?id=129594
2525         <rdar://problem/16168978>
2526
2527         Reviewed by Sam Weinig.
2528
2529         As a temporary fix, we are using a synchronous
2530         message to accept autocorrection until we implement
2531         a solution that processes these requests on a thread that
2532         is not the main thread.
2533
2534         * UIProcess/WebPageProxy.h:
2535         * UIProcess/ios/WKContentViewInteraction.mm:
2536         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
2537         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
2538         * UIProcess/ios/WebPageProxyIOS.mm:
2539         (WebKit::WebPageProxy::applyAutocorrection):
2540         * WebProcess/WebPage/WebPage.h:
2541         * WebProcess/WebPage/WebPage.messages.in:
2542         * WebProcess/WebPage/ios/WebPageIOS.mm:
2543         (WebKit::WebPage::applyAutocorrection):
2544         (WebKit::WebPage::syncApplyAutocorrection):
2545
2546 2014-03-02  Dan Bernstein  <mitz@apple.com>
2547
2548         Try to fix the 32-bit build.
2549
2550         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2551         (adjustedFontSize):
2552
2553 2014-03-02  Sam Weinig  <sam@webkit.org>
2554
2555         Page Cache is not enabled when using the modern WebKit2 API
2556         https://bugs.webkit.org/show_bug.cgi?id=129585
2557
2558         Reviewed by Dan Bernstein.
2559
2560         * UIProcess/API/Cocoa/WKProcessPool.mm:
2561         (-[WKProcessPool initWithConfiguration:]):
2562         Default to CacheModelPrimaryWebBrowser until there is a way to configure it.
2563
2564 2014-03-02  Enrica Casucci  <enrica@apple.com>
2565
2566         [iOS WebKit2] Form controls handling
2567         https://bugs.webkit.org/show_bug.cgi?id=129344
2568         <rdar://problem/16053643>
2569
2570         Reviewed by Simon Fraser.
2571
2572         Adding support for select elements on iOS.
2573         There is full support on iPad, while on iPhone it is
2574         still limited to single select with no groups.
2575         The change also fixes the issue of the keyboard appearing
2576         on screen for types of elements that are implemented with
2577         a popover or a picker.
2578
2579         * Scripts/webkit2/messages.py:
2580         * Shared/AssistedNodeInformation.cpp:
2581         (WebKit::WKOptionItem::encode):
2582         (WebKit::WKOptionItem::decode):
2583         (WebKit::AssistedNodeInformation::encode):
2584         (WebKit::AssistedNodeInformation::decode):
2585         * Shared/AssistedNodeInformation.h:
2586         (WebKit::WKOptionItem::WKOptionItem):
2587         * UIProcess/WebPageProxy.h:
2588         * UIProcess/ios/WKContentViewInteraction.h:
2589         * UIProcess/ios/WKContentViewInteraction.mm:
2590         (-[WKContentView inputView]):
2591         (-[WKContentView assistedNodeSelectOptions]):
2592         (-[WKContentView _startAssistingNode:]):
2593         * UIProcess/ios/WebPageProxyIOS.mm:
2594         (WebKit::WebPageProxy::setAssistedNodeSelectedIndex):
2595         * UIProcess/ios/forms/WKFormSelectControl.h:
2596         * UIProcess/ios/forms/WKFormSelectControl.mm: Added.
2597         (-[WKFormSelectControl initWithView:]):
2598         (+[WKFormSelectControl createPeripheralWithView:]):
2599         (-[WKFormSelectControl assistantView]):
2600         (-[WKFormSelectControl beginEditing]):
2601         (-[WKFormSelectControl endEditing]):
2602         * UIProcess/ios/forms/WKFormSelectPicker.mm: Added.
2603         (-[WKSelectSinglePicker initWithView:]):
2604         (-[WKSelectSinglePicker dealloc]):
2605         (-[WKSelectSinglePicker controlView]):
2606         (-[WKSelectSinglePicker controlBeginEditing]):
2607         (-[WKSelectSinglePicker controlEndEditing]):
2608         (-[WKSelectSinglePicker numberOfComponentsInPickerView:]):
2609         (stringByTrimmingWhitespaceAndNewlines):
2610         (-[WKSelectSinglePicker pickerView:numberOfRowsInComponent:]):
2611         (-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
2612         (-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
2613         * UIProcess/ios/forms/WKFormSelectPopover.mm: Added.
2614         (stringWithWritingDirection):
2615         (adjustedFontSize):
2616         (-[WKSelectTableViewController initWithView:hasGroups:]):
2617         (-[WKSelectTableViewController viewWillAppear:]):
2618         (-[WKSelectTableViewController numberOfSectionsInTableView:]):
2619         (-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
2620         (-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
2621         (-[WKSelectTableViewController populateCell:withItem:]):
2622         (-[WKSelectTableViewController findItemIndexAt:]):
2623         (-[WKSelectTableViewController findItemAt:]):
2624         (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
2625         (-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
2626         (-[WKSelectTableViewController hasText]):
2627         (-[WKSelectTableViewController insertText:]):
2628         (-[WKSelectTableViewController deleteBackward]):
2629         (-[WKSelectPopover initWithView:hasGroups:]):
2630         (-[WKSelectPopover dealloc]):
2631         (-[WKSelectPopover controlView]):
2632         (-[WKSelectPopover controlBeginEditing]):
2633         (-[WKSelectPopover controlEndEditing]):
2634         (-[WKSelectPopover _userActionDismissedPopover:]):
2635         * WebKit2.xcodeproj/project.pbxproj:
2636         * WebProcess/WebPage/WebPage.h:
2637         * WebProcess/WebPage/WebPage.messages.in:
2638         * WebProcess/WebPage/ios/WebPageIOS.mm:
2639         (WebKit::WebPage::setAssistedNodeSelectedIndex):
2640         (WebKit::innerFrameQuad):
2641         (WebKit::WebPage::getPositionInformation):
2642         (WebKit::hasFocusableNode):
2643         (WebKit::WebPage::getAssistedNodeInformation):
2644         (WebKit::WebPage::elementDidFocus):
2645
2646 2014-03-02  Benjamin Poulain  <bpoulain@apple.com>
2647
2648         [iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
2649         https://bugs.webkit.org/show_bug.cgi?id=129471
2650
2651         Reviewed by Simon Fraser.
2652
2653         * WebProcess/WebPage/DrawingArea.h:
2654         * WebProcess/WebPage/ios/WebPageIOS.mm:
2655         (WebKit::WebPage::updateVisibleContentRects):
2656         A few interesting changes here:
2657         -Now that we do not use setExposedRect, we can pass the exposed area directly
2658          to the drawing area since everything is now in content coordinates :)
2659         -The scale is now converted to float before being compared to the Page's scaleFactor.
2660          The page's scalefactor being a float, the comparison was failing most of the time.
2661
2662         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2663         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2664         (WebKit::RemoteLayerTreeDrawingArea::setVisibleExtentContentRect):
2665
2666 2014-03-02  Darin Adler  <darin@apple.com>
2667
2668         Change public text iterator API implementations to not depend on 16-bit character pointers
2669         https://bugs.webkit.org/show_bug.cgi?id=129566
2670
2671         Reviewed by Anders Carlsson.
2672
2673         * WebView/WebTextIterator.mm:
2674         (-[WKDOMTextIterator initWithRange:]): Use make_unique instead of adoptPtr.
2675         (-[WKDOMTextIterator advance]): Clear out the upconverted text since we are moving on to the
2676         next text.
2677         (-[WKDOMTextIterator currentTextPointer]): Upconvert if we have 8-bit text.
2678         (-[WKDOMTextIterator currentTextLength]): Call TextIterator::text().length() since we will
2679         probably be removing TextIterator::length eventually.
2680
2681         * WebProcess/WebCoreSupport/WebEditorClient.cpp: Removed unneded include of TextIterator.h.
2682         * WebProcess/WebPage/WebPage.cpp: Ditto.
2683
2684 2014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2685
2686         [GTK] Make impossible to build with <webkit2/webkit2.h> and <webkit2/webkit-web-extension.h> included together
2687         https://bugs.webkit.org/show_bug.cgi?id=129549
2688
2689         Reviewed by Martin Robinson.
2690
2691         Add a compile error to prevent mixing the UI and web process APIs.
2692
2693         * UIProcess/API/gtk/webkit2.h:
2694         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2695
2696 2014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2697
2698         [GTK] Remove the include dir of the C API from the WebKit2 pkg-config file
2699         https://bugs.webkit.org/show_bug.cgi?id=129543
2700
2701         Reviewed by Martin Robinson.
2702
2703         We are not installing the C API headers anymore.
2704
2705         * webkit2gtk.pc.in:
2706
2707 2014-03-01  Tim Horton  <timothy_horton@apple.com>
2708
2709         Fix the Mac build.
2710
2711         * UIProcess/mac/ViewGestureController.messages.in:
2712
2713 2014-03-01  Tim Horton  <timothy_horton@apple.com>
2714
2715         WebKit2 View Gestures (Smart Magnification): Support for iOS
2716         https://bugs.webkit.org/show_bug.cgi?id=129146
2717         <rdar://problem/16032668>
2718
2719         Reviewed by Benjamin Poulain.
2720
2721         Add support for double-tap smart magnification on iOS.
2722
2723         * DerivedSources.make:
2724         * UIProcess/API/Cocoa/WKWebView.mm:
2725         (-[WKWebView initWithFrame:configuration:]):
2726         WKContentView is no longer API, so it can know about WKWebView
2727         and will always have one.
2728
2729         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
2730         Don't replace the zoom scale if we're currently animating.
2731
2732         (-[WKWebView _takeViewSnapshot]):
2733         Rename.
2734
2735         (-[WKWebView _zoomToPoint:WebCore::atScale:]):
2736         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
2737         (constrainContentOffset):
2738         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
2739         (-[WKWebView _zoomOutWithOrigin:]):
2740         (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
2741         Add _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:
2742         and _zoomOutWithOrigin: as internal API, for use by SmartMagnificationController via WKContentView.
2743         These will use some heuristics to generally center the target rect in the view
2744         in a way that should match WebKit1 fairly closely.
2745
2746         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2747         Don't use the WKContentViewDelegate protocol for things that don't belong there.
2748
2749         * UIProcess/ios/SmartMagnificationController.h: Added.
2750         * UIProcess/ios/SmartMagnificationController.messages.in: Added.
2751         * UIProcess/ios/SmartMagnificationController.mm: Added.
2752         (WebKit::SmartMagnificationController::SmartMagnificationController):
2753         (WebKit::SmartMagnificationController::~SmartMagnificationController):
2754         (WebKit::SmartMagnificationController::handleSmartMagnificationGesture):
2755         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
2756         SmartMagnificationController sits off of WKContentView, and sends/receives
2757         messages to the WebProcess to do the smart magnification hit-testing.
2758
2759         * UIProcess/ios/WKContentView.h:
2760         * UIProcess/ios/WKContentView.mm:
2761         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
2762         As before, teach WKContentView about its owning WKWebView.
2763
2764         (-[WKContentView _takeViewSnapshot]):
2765         Rename.
2766
2767         (-[WKContentView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
2768         (-[WKContentView _zoomOutWithOrigin:]):
2769         Forward _zoomToRect:::::: and _zoomOutWithOrigin: to WKWebView.
2770
2771         * UIProcess/ios/WKContentViewInteraction.h:
2772         * UIProcess/ios/WKContentViewInteraction.mm:
2773         (-[WKContentView setupInteraction]):
2774         (-[WKContentView _doubleTapRecognized:]):
2775         (-[WKContentView _twoFingerDoubleTapRecognized:]):
2776         Forward double tap to the SmartMagnificationController.
2777
2778         * UIProcess/mac/ViewGestureController.h:
2779         * UIProcess/mac/ViewGestureController.messages.in:
2780         * UIProcess/mac/ViewGestureControllerMac.mm:
2781         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
2782         Retrieve the minimum/maximum viewport scale from the WebProcess.
2783
2784         * WebKit2.xcodeproj/project.pbxproj:
2785         Add new files.
2786
2787         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
2788         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
2789         (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
2790         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2791         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
2792         Factor out code to send the geometry back to the UI process.
2793
2794         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
2795         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
2796         * WebProcess/WebPage/WebPage.cpp:
2797         (WebKit::WebPage::WebPage):
2798         * WebProcess/WebPage/WebPage.h:
2799         We should have a ViewGestureGeometryCollector on iOS too.
2800
2801 2014-03-01  Zan Dobersek  <zdobersek@igalia.com>
2802
2803         Unreviewed follow-up to r164905 and r164912.
2804
2805         * Platform/IPC/Connection.h: Only declare setShouldCloseConnectionOnMachExceptions() for the Mac port.
2806         * UIProcess/Plugins/PluginProcessProxy.cpp:
2807         (WebKit::PluginProcessProxy::didFinishLaunching): Only call setShouldCloseConnectionOnMachExceptions() on the Mac port.
2808
2809 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
2810
2811         Split UserActivity/CountedUserActivity
2812         https://bugs.webkit.org/show_bug.cgi?id=129520
2813
2814         Reviewed by Sam Weinig.
2815
2816         UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
2817         In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
2818
2819         * PluginProcess/PluginProcess.h:
2820         (WebKit::PluginProcess::connectionActivity):
2821             - UserActivity->CountedUserActivity
2822         * PluginProcess/mac/PluginProcessMac.mm:
2823         (WebKit::PluginProcess::platformInitializeProcess):
2824             - beginActivity->start
2825         * Shared/ActivityAssertion.cpp:
2826         (WebKit::ActivityAssertion::ActivityAssertion):
2827         (WebKit::ActivityAssertion::~ActivityAssertion):
2828             - beginActivity->increment, endActivity->decrement.
2829         * Shared/ActivityAssertion.h:
2830             - UserActivity->CountedUserActivity
2831         * Shared/ChildProcess.cpp:
2832         (WebKit::ChildProcess::setProcessSuppressionEnabled):
2833             - beginActivity->start, endActivity->stop.
2834         * Shared/ChildProcess.h:
2835             - removed processSuppressionEnabled()
2836         * WebProcess/WebPage/WebPage.cpp:
2837         (WebKit::WebPage::updatePreferences):
2838             - beginActivity->start, endActivity->stop.
2839
2840 2014-03-01  Csaba Osztrogonác  <ossy@webkit.org>
2841
2842         Unreviewed trivial Linux buildfix after r164905.
2843
2844         setShouldCloseConnectionOnMachExceptions() is defined in the Mac only
2845         Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp inside !PLATFORM(IOS)
2846         which means PLATFORM(MAC), because nobody else uses this source file.
2847
2848         But ChildProcessProxy.cpp is used by Linux ports too, so we have to
2849         use the most specific #if guard here, which is PLATFORM(MAC).
2850
2851         * Shared/ChildProcessProxy.cpp:
2852         (WebKit::ChildProcessProxy::didFinishLaunching):
2853
2854 2014-02-28  Simon Fraser  <simon.fraser@apple.com>
2855
2856         [iOS] Assertions and bad behavior when zooming into an iframe containing apple.com
2857         https://bugs.webkit.org/show_bug.cgi?id=129537
2858
2859         Reviewed by Benjamin Poulain.
2860         
2861         When building RemoteLayerTreeTransactions, the ordering of setting created
2862         layers and doing the recursive tree walk was wrong, such that we failed
2863         to noticed layers created during the recursiveBuildTransaction().
2864         
2865         Also harden the UI-side code against Obj-C exceptions thrown when layers
2866         are missing.
2867
2868         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2869         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Assert when 
2870         children are not found, and protect against Obj-C exceptions.
2871         * Shared/mac/RemoteLayerTreeTransaction.mm:
2872         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
2873         Initialize the members.
2874         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2875         (WebKit::RemoteLayerTreeContext::buildTransaction): Do the recursive walk
2876         before setting created and destroyed layers, since the walk can create
2877         layers (especially when swapping into tiled layers).
2878
2879 2014-02-28  Jinwoo Song  <jinwoo7.song@samsung.com>
2880
2881         Fix WebKit2 build after r164890
2882         https://bugs.webkit.org/show_bug.cgi?id=129533
2883
2884         Reviewed by Simon Fraser.
2885
2886         LayerRepresentation.h is included to WebPageProxy.h in r164890
2887         but it is not used in non Mac or iOS port.
2888
2889         * UIProcess/WebPageProxy.h:
2890
2891 2014-02-28  Alexey Proskuryakov  <ap@apple.com>
2892
2893         [Mac] Extract _data->_thumbnailView checks into a helper function
2894         https://bugs.webkit.org/show_bug.cgi?id=129517
2895
2896         Reviewed by Sam Weinig.
2897
2898         * UIProcess/API/mac/WKView.mm:
2899         (-[WKView shouldIgnoreMouseEvents]):
2900         (-[WKView scrollWheel:]):
2901         (-[WKView mouseMoved:]):
2902         (-[WKView mouseDown:]):
2903         (-[WKView mouseUp:]):
2904         (-[WKView mouseDragged:]):
2905
2906 2014-02-28  Pratik Solanki  <psolanki@apple.com>
2907
2908         [iOS][WebKit2] Don't use any of the mach exception handling code on iOS
2909         https://bugs.webkit.org/show_bug.cgi?id=129516
2910
2911         Reviewed by Sam Weinig.
2912
2913         This code is not used on iOS after my fix in r164883. We can just move it all under
2914         !PLATFORM(IOS).
2915
2916         * Platform/IPC/Connection.h:
2917         * Platform/IPC/mac/ConnectionMac.cpp:
2918         (IPC::Connection::platformInvalidate):
2919         (IPC::Connection::platformInitialize):
2920         (IPC::Connection::open):
2921         * Shared/ChildProcessProxy.cpp:
2922         (WebKit::ChildProcessProxy::didFinishLaunching):
2923
2924 2014-02-28  Benjamin Poulain  <bpoulain@apple.com>
2925
2926         [iOS][WK2] highlight rects should never big bigger than the view
2927         https://bugs.webkit.org/show_bug.cgi?id=129472
2928         <rdar://problem/15673655>
2929
2930         Reviewed by Enrica Casucci.
2931
2932         The unobscuredRect on WebPageProxy is the "true" view rect as seen by the user.
2933         Use that to constrain our highlight rects.
2934
2935         * UIProcess/ios/WKContentViewInteraction.mm:
2936         (highlightedQuadsFitInRect):
2937         (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
2938
2939 2014-02-28  Simon Fraser  <simon.fraser@apple.com>
2940
2941         Make UIViews for compositing layers in the UI process on iOS
2942         https://bugs.webkit.org/show_bug.cgi?id=129508
2943
2944         Reviewed by Sam Weinig.
2945         
2946         In order to parent UIScrollViews for -webkit-overflow-scrolling:touch,
2947         we need to use UIViews in the compositing layer hierarchy on iOS.
2948         
2949         Make much of the code that currently uses CALayers layer-or-view
2950         agnostic by using a typedef LayerOrView.
2951         
2952         Fix RemoteLayerTreePropertyApplier to apply properties to UIViews
2953         or CALayers; on iOS, we need both paths because we have to set properties
2954         on CALayer for remotely hosted content.
2955         
2956         Add iOS-specific implementation files for RemoteLayerTreeHost and RemoteScrollingCoordinatorProxy,
2957         since these need to see the UIView implementation. WebVideoFullscreenManagerProxy.cpp also needs
2958         to be come a .mm file.
2959
2960         * Shared/mac/RemoteLayerTreePropertyApplier.h:
2961         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2962         (-[UIView setSubviews:]):
2963         (WebKit::applyPropertiesToLayer):
2964         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
2965         * UIProcess/Cocoa/LayerRepresentation.h: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
2966         (asLayer):
2967         * UIProcess/PageClient.h:
2968         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2969         * UIProcess/WebPageProxy.h:
2970         * UIProcess/ios/LayerRepresentation.mm: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
2971         (asLayer):
2972         * UIProcess/ios/PageClientImplIOS.h:
2973         * UIProcess/ios/PageClientImplIOS.mm:
2974         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
2975         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
2976         * UIProcess/ios/RemoteLayerTreeHostIOS.mm: Added.
2977         (+[WKTransformView layerClass]):
2978         (-[WKRemoteView initWithFrame:contextID:]):
2979         (+[WKRemoteView layerClass]):
2980         (WebKit::RemoteLayerTreeHost::createLayer):
2981         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: Added.
2982         (WebKit::layerRepresentationFromLayerOrView):
2983         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2984         * UIProcess/ios/WKContentView.h:
2985         * UIProcess/ios/WKContentView.mm:
2986         (-[WKContentView _setAcceleratedCompositingRootView:]):
2987         * UIProcess/ios/WebPageProxyIOS.mm:
2988         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
2989         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.cpp.
2990         (WebKit::WebVideoFullscreenManagerProxy::create):
2991         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
2992         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
2993         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
2994         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
2995         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
2996         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
2997         (WebKit::WebVideoFullscreenManagerProxy::play):
2998         (WebKit::WebVideoFullscreenManagerProxy::pause):
2999         (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
3000         (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
3001         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
3002         * UIProcess/mac/PageClientImpl.h:
3003         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3004         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3005         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
3006         * UIProcess/mac/RemoteLayerTreeHost.h:
3007         (WebKit::RemoteLayerTreeHost::rootLayer):
3008         * UIProcess/mac/RemoteLayerTreeHost.mm:
3009         (WebKit::RemoteLayerTreeHost::updateLayerTree):
3010         (WebKit::RemoteLayerTreeHost::getLayer):
3011         (WebKit::RemoteLayerTreeHost::createLayer):
3012         * UIProcess/mac/WebPageProxyMac.mm:
3013         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
3014         (WebKit::WebPageProxy::acceleratedCompositingRootLayer):
3015         * WebKit2.xcodeproj/project.pbxproj:
3016         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3017         (PlatformCALayerRemote::recursiveBuildTransaction):
3018
3019 2014-02-28  Anders Carlsson  <andersca@apple.com>
3020
3021         WebKit2.TerminateTwice test is failing.
3022
3023         * UIProcess/WebPageProxy.cpp:
3024         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3025         Turns out this can be called even when we're in the launching state so don't try to
3026         remove the process from the visited link provider when in that state.
3027
3028 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
3029
3030         AX: Crash in WebKit::WebPageProxy::registerWebProcessAccessibilityToken
3031         https://bugs.webkit.org/show_bug.cgi?id=127387
3032
3033         Reviewed by Alexey Proskuryakov.
3034
3035         Speculative fix for crasher. We should check if the connection is still valid before proceeding.
3036
3037         * UIProcess/mac/WebPageProxyMac.mm:
3038         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
3039
3040 2014-02-28  Timothy Hatcher  <timothy@apple.com>
3041
3042         Properly handle when Test.html is not present in Production builds.
3043
3044         https://bugs.webkit.org/show_bug.cgi?id=129506
3045
3046         Reviewed by Joseph Pecoraro.
3047
3048         * UIProcess/WebInspectorProxy.cpp:
3049         (WebKit::isMainOrTestInspectorPage):
3050         * UIProcess/mac/WebInspectorProxyMac.mm:
3051         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3052
3053 2014-02-28  Pratik Solanki  <psolanki@apple.com>
3054
3055         [iOS][WebKit2] Don't grab mach exception port on iOS
3056         https://bugs.webkit.org/show_bug.cgi?id=129505
3057         <rdar://problem/15972749>
3058
3059         Reviewed by Anders Carlsson.
3060
3061         Don't grab the mach exception port on iOS so we get crash logs for web process and network
3062         process.
3063
3064         * Shared/ChildProcessProxy.cpp:
3065         (WebKit::ChildProcessProxy::didFinishLaunching):
3066
3067 2014-02-28  Brent Fulgham  <bfulgham@apple.com>
3068
3069         Unreviewed build fix after r164832.
3070
3071         * UIProcess/ios/WebProcessProxyIOS.mm:
3072         (WebKit::WebProcessProxy::updateProcessState): Switch from removed
3073         'isValid' to 'state() != State::Running'
3074
3075 2014-02-28  Anders Carlsson  <andersca@apple.com>
3076
3077         VisitedLinkProvider should keep track of processes, not pages
3078         https://bugs.webkit.org/show_bug.cgi?id=129497
3079
3080         Reviewed by Dan Bernstein.
3081
3082         Use a counted set of WebProcessProxy pointers instead of a set of pages.
3083
3084         * UIProcess/VisitedLinkProvider.cpp:
3085         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
3086         Assert that m_processes is null.
3087
3088         (WebKit::VisitedLinkProvider::addProcess):
3089         Add the process to the set.
3090
3091         (WebKit::VisitedLinkProvider::removeProcess):
3092         Remove the process from the set.
3093
3094         * UIProcess/VisitedLinkProvider.h:
3095         
3096         * UIProcess/WebPageProxy.cpp:
3097         (WebKit::WebPageProxy::WebPageProxy):
3098         If our process is currently running, add it to the visited link provider.
3099         Otherwise it will be added in connectionWillOpen.
3100
3101         (WebKit::WebPageProxy::close):
3102         If our process is running, remove it from the visited link provider. 
3103         Otherwise it's either crashed or not yet launched and will not have been added.
3104
3105         (WebKit::WebPageProxy::connectionWillOpen):
3106         Add the process to the visited link provider.
3107
3108         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3109         Remove the process from the visited link provider.
3110
3111 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
3112
3113         [Mac] Stop using some deprecated functions in WKView.mm
3114         https://bugs.webkit.org/show_bug.cgi?id=129455
3115
3116         Reviewed by Anders Carlsson.
3117
3118         * UIProcess/API/mac/WKView.mm:
3119         (-[WKView firstRectForCharacterRange:actualRange:]): Use convertRectToScreen,
3120         which is a replacement for convertBaseToScreen. Don't check for window being null,
3121         because isn't that crazy talk?
3122         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Use event's location
3123         in window instead of current mouse location. Using location that is not synced to
3124         event stream rarely makes sense, and it doesn't look like this is one of those cases.
3125         (-[WKView performDictionaryLookupAtCurrentMouseLocation]): Ditto.
3126
3127 2014-02-27  Jaehun Lim  <ljaehun.lim@samsung.com>
3128
3129         Unreviewed. Fix build after r164832
3130
3131         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
3132         (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
3133
3134 2014-02-27  Martin Robinson  <mrobinson@igalia.com>
3135
3136         Fix build after r164832
3137
3138         * UIProcess/DrawingAreaProxyImpl.cpp:
3139         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): WebProcessProxy::isLaunching() has been replaced
3140         by WebProcessProxy::state().
3141
3142 2014-02-27  Tim Horton  <timothy_horton@apple.com>
3143
3144         Crash in RemoteLayerTreePropertyApplier::applyPropertiesToLayer
3145         https://bugs.webkit.org/show_bug.cgi?id=129456
3146         <rdar://problem/16182676>
3147
3148         Reviewed by Simon Fraser.
3149
3150         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3151         (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
3152         We were dereferencing the RemoteLayerBackingStore without checking if it exists,
3153         in the accelerated drawing codepath. This case will occur if a layer
3154         previously drew contents, but now does not.
3155
3156 2014-02-27  Anders Carlsson  <andersca@apple.com>
3157
3158         Simplify WebProcessProxy state accessors
3159         https://bugs.webkit.org/show_bug.cgi?id=129453
3160
3161         Reviewed by Andreas Kling.
3162
3163         Replace WebProcessProxy::isLaunching() and WebProcessProxy::isValid() with a single
3164         WebProcessProxy::state() that return one of three values: Launching, Running or Terminated.
3165
3166         * Shared/ChildProcessProxy.cpp:
3167         (WebKit::ChildProcessProxy::state):
3168         (WebKit::ChildProcessProxy::sendMessage):
3169         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
3170         * Shared/ChildProcessProxy.h:
3171         (WebKit::ChildProcessProxy::canSendMessage):
3172         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3173         (WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
3174         * UIProcess/Network/NetworkProcessProxy.cpp:
3175         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
3176         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
3177         (WebKit::NetworkProcessProxy::setProcessSuppressionEnabled):
3178         * UIProcess/Plugins/PluginProcessProxy.cpp:
3179         (WebKit::PluginProcessProxy::getPluginProcessConnection):
3180         (WebKit::PluginProcessProxy::getSitesWithData):
3181         (WebKit::PluginProcessProxy::clearSiteData):
3182         * UIProcess/WebPageProxy.cpp:
3183         (WebKit::WebPageProxy::WebPageProxy):
3184         (WebKit::WebPageProxy::reattachToWebProcess):
3185         (WebKit::WebPageProxy::waitForDidUpdateViewState):
3186         * UIProcess/WebProcessProxy.cpp:
3187         (WebKit::WebProcessProxy::requestTermination):
3188         (WebKit::WebProcessProxy::enableSuddenTermination):
3189         (WebKit::WebProcessProxy::disableSuddenTermination):
3190         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3191         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
3192         * UIProcess/mac/WebPageProxyMac.mm:
3193         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
3194         * UIProcess/mac/WebProcessProxyMac.mm:
3195         (WebKit::WebProcessProxy::updateProcessSuppressionState):
3196
3197 2014-02-27  Simon Fraser  <simon.fraser@apple.com>
3198
3199         Crash tapping on play button on video on iOS
3200         https://bugs.webkit.org/show_bug.cgi?id=129452
3201
3202         Reviewed by Benjamin Poulain.
3203         
3204         node->computedStyle() can return null. Just use
3205         renderer->style() to get the tap highlight color.
3206
3207         * WebProcess/WebPage/ios/WebPageIOS.mm:
3208         (WebKit::WebPage::tapHighlightAtPosition):
3209
3210 2014-02-27  Brian Burg  <bburg@apple.com>
3211
3212         Web Inspector: model tests should use a special Test.html inspector page
3213         https://bugs.webkit.org/show_bug.cgi?id=129190
3214
3215         Reviewed by Timothy Hatcher.
3216
3217         Support creating a separate test inspector page, based on the value of
3218         InspectorController::isUnderTest(). Add this as a separate API call for
3219         WebInspectorProxy. Modify the navigation policy to check the URL against
3220         both normal and test inspector pages.
3221
3222         * UIProcess/WebInspectorProxy.cpp:
3223         (WebKit::isMainOrTestInspectorPage):
3224         (WebKit::decidePolicyForNavigationAction):
3225         (WebKit::WebInspectorProxy::createInspectorPageForTest):
3226         * UIProcess/WebInspectorProxy.h:
3227         * UIProcess/WebInspectorProxy.messages.in:
3228         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3229         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3230         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3231         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3232         * UIProcess/ios/WebInspectorProxyIOS.mm:
3233         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3234         * UIProcess/mac/WebInspectorProxyMac.mm:
3235         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3236         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3237         (WebKit::WebInspectorClient::openInspectorFrontend):
3238         * WebProcess/WebPage/WebInspector.cpp: Some drive-by nullptr refactorings.
3239         (WebKit::WebInspector::WebInspector):
3240         (WebKit::WebInspector::createInspectorPage):
3241         (WebKit::WebInspector::createInspectorPageForTest):
3242         (WebKit::WebInspector::destroyInspectorPage):
3243         * WebProcess/WebPage/WebInspector.h:
3244
3245 2014-02-27  Anders Carlsson  <andersca@apple.com>
3246
3247         Make WebProcessProxy::pages() return an IteratorRange
3248         https://bugs.webkit.org/show_bug.cgi?id=129440
3249
3250         Reviewed by Dan Bernstein.
3251
3252         * UIProcess/API/C/WKPage.cpp:
3253         (WKPageCopyRelatedPages):
3254         Move the implementation of WebPageProxy::relatedPages here.
3255
3256         * UIProcess/WebContext.cpp:
3257         (WebKit::WebContext::createNewWebProcessRespectingProcessCountLimit):
3258         Use std::min_element here instead of a manual loop.
3259
3260         * UIProcess/WebPageProxy.cpp:
3261         Remove WebPageProxy::relatedPages().
3262
3263         * UIProcess/WebProcessProxy.cpp:
3264         Remove WebProcessProxy::pages().
3265
3266         * UIProcess/WebProcessProxy.h:
3267         (WebKit::WebProcessProxy::pages):
3268         Make this return an IteratorRange.
3269
3270         (WebKit::WebProcessProxy::pageCount):
3271         New function that returns the page count.
3272
3273 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
3274
3275         [Mac][WK2] Remove hardcoded Cmd+B and Cmd+I from WKView.mm
3276         https://bugs.webkit.org/show_bug.cgi?id=129436
3277
3278         Reviewed by Darin Adler.
3279
3280         * UIProcess/API/mac/WKView.mm: Removed a historic WebKit1 behavior that we don't
3281         need to preserve in WebKit2.
3282
3283 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
3284
3285         [Mac] Remove unused SPI declarations from WKView.mm
3286         https://bugs.webkit.org/show_bug.cgi?id=129434
3287
3288         Reviewed by Sam Weinig.
3289
3290         * UIProcess/API/mac/WKView.mm:
3291
3292 2014-02-26  Michael Saboff  <msaboff@apple.com>
3293
3294         Auto generate bytecode information for bytecode parser and LLInt
3295         https://bugs.webkit.org/show_bug.cgi?id=129181
3296
3297         Reviewed by Mark Lam.
3298
3299         Added ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} to WebKit2_INCLUDE_DIRECTORIES due to new
3300         generated Bytecodes.h include file.
3301
3302         * CMakeLists.txt:
3303
3304 2014-02-27  Anders Carlsson  <andersca@apple.com>
3305
3306         Look up already existing VisitedLinkTableController objects by identifier
3307         https://bugs.webkit.org/show_bug.cgi?id=129431
3308
3309         Reviewed by Dan Bernstein.
3310
3311         * WebProcess/WebPage/VisitedLinkTableController.cpp:
3312         (WebKit::visitedLinkTableControllers):
3313         (WebKit::VisitedLinkTableController::getOrCreate):
3314         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
3315         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
3316         * WebProcess/WebPage/VisitedLinkTableController.h:
3317         * WebProcess/WebPage/WebPage.cpp:
3318         (WebKit::WebPage::WebPage):
3319
3320 2014-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3321
3322         [GTK][WK2] Blocks when fetching plugins information
3323         https://bugs.webkit.org/show_bug.cgi?id=115650
3324
3325         Reviewed by Gustavo Noronha Silva.
3326
3327         Use a persistent cache to store the plugins metadata to avoid
3328         having to load all the plugins everytime a plugin is used for the
3329         first time.
3330
3331         * GNUmakefile.am:
3332         * GNUmakefile.list.am:
3333         * PlatformGTK.cmake:
3334         * Shared/Plugins/Netscape/NetscapePluginModule.h:
3335         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
3336         (WebKit::NetscapePluginModule::parseMIMEDescription): Make this
3337         method public.
3338         (WebKit::NetscapePluginModule::buildMIMEDescription): Added this
3339         helper to build the MIME description string.
3340         * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Added.
3341         (WebKit::PluginInfoCache::shared):
3342         (WebKit::PluginInfoCache::PluginInfoCache):
3343         (WebKit::PluginInfoCache::~PluginInfoCache):
3344         (WebKit::PluginInfoCache::saveToFileIdleCallback):
3345         (WebKit::PluginInfoCache::saveToFile):
3346         (WebKit::PluginInfoCache::getPluginInfo):
3347         (WebKit::PluginInfoCache::updatePluginInfo):
3348         * UIProcess/Plugins/gtk/PluginInfoCache.h: Added.
3349         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
3350         (WebKit::PluginInfoStore::getPluginInfo): Check first if we have
3351         metadata of the plugin in the cache and update the cache if we
3352         loaded the plugin to get its metadata.
3353
3354 2014-02-27  Ryan Lortie  <desrt@desrt.ca>
3355
3356         need to #include <libgen.h> for basename
3357         https://bugs.webkit.org/show_bug.cgi?id=128597
3358
3359         Reviewed by Carlos Garcia Campos.
3360
3361         * PluginProcess/unix/PluginProcessMainUnix.cpp: include <libgen.h> as required by POSIX for basename
3362
3363 2014-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3364
3365         [GTK] Web Inspector doesn't work with network process enabled
3366         https://bugs.webkit.org/show_bug.cgi?id=127651
3367
3368         Reviewed by Sergio Villar Senin.
3369
3370         The problem is that the web inspector loads so many resources,
3371         that when using the network process, a lot of IPC traffic is
3372         generated causing the send buffer of the socket to be full. When
3373         that happens sendmsg() fails with EAGAIN, because we are using non
3374         blocking sockets, and we are not handling neither EAGAIN nor
3375         EWOULDBLOCK errors (we do when reading from the socket, though).
3376
3377         * Platform/IPC/unix/ConnectionUnix.cpp:
3378         (IPC::Connection::readyReadHandler): Add a log message to know
3379         when reading from the socket fails for any unhandled error.
3380         (IPC::Connection::sendOutgoingMessage): Handle EAGAIN and
3381         EWOULDBLOCK errors to try again in those cases. Also add a log
3382         message for unhandled errors.
3383
3384 2014-02-26  Philippe Normand  <pnormand@igalia.com>
3385
3386         Unreviewed GTK build fix after r164751.
3387
3388         * GNUmakefile.list.am:
3389
3390 2014-02-26  Dan Bernstein  <mitz@apple.com>
3391
3392         iOS build fix.
3393
3394         * UIProcess/ios/forms/WKFormPopover.h:
3395         * UIProcess/ios/forms/WKFormPopover.mm:
3396
3397 2014-02-26  Dan Bernstein  <mitz@apple.com>
3398
3399         Replaced use of the EXCLUDED_SOURCE_FILE_NAMES build setting with #if PLATFORM(…) guards in
3400         the files themselves.
3401
3402         Rubber-stamped by Sam Weinig.
3403
3404         * Configurations/WebKit2.xcconfig: Cleared out EXCLUDED_SOURCE_FILE_NAMES_macosx, and left
3405         EXCLUDED_SOURCE_FILE_NAMES_iphoneos containing just the names of resources the should be
3406         excluded from Copy Files build phases.
3407         * NetworkProcess/ios/NetworkProcessIOS.mm:
3408         * NetworkProcess/mac/NetworkProcessMac.mm:
3409         * Shared/Downloads/ios/DownloadIOS.mm:
3410         * Shared/Downloads/mac/DownloadMac.mm:
3411         * Shared/NativeWebTouchEvent.h:
3412         * Shared/WebPlatformTouchPoint.cpp:
3413         * Shared/WebTouchEvent.cpp:
3414         * Shared/ios/NativeWebKeyboardEventIOS.mm:
3415         * Shared/ios/NativeWebTouchEventIOS.mm:
3416         * Shared/ios/WebIOSEventFactory.h:
3417         * Shared/ios/WebIOSEventFactory.mm:
3418         * Shared/mac/PasteboardTypes.h:
3419         * Shared/mac/PasteboardTypes.mm:
3420         * Shared/mac/PrintInfoMac.mm:
3421         * UIProcess/API/C/WKInspector.cpp:
3422         * UIProcess/API/Cocoa/WKThumbnailView.h:
3423         * UIProcess/API/Cocoa/WKThumbnailView.mm:
3424         * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
3425         * UIProcess/API/ios/WKViewIOS.mm:
3426         * UIProcess/API/mac/WKView.mm:
3427         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3428         * UIProcess/ios/PageClientImplIOS.h:
3429         * UIProcess/ios/PageClientImplIOS.mm:
3430         * UIProcess/ios/TextCheckerIOS.mm:
3431         * UIProcess/ios/ViewGestureControllerIOS.mm:
3432         * UIProcess/ios/WKActionSheet.h:
3433         * UIProcess/ios/WKActionSheet.mm:
3434         * UIProcess/ios/WKActionSheetAssistant.h:
3435         * UIProcess/ios/WKActionSheetAssistant.mm:
3436         * UIProcess/ios/WKContentView.mm:
3437         * UIProcess/ios/WKContentViewInteraction.h:
3438         * UIProcess/ios/WKContentViewInteraction.mm:
3439         * UIProcess/ios/WKGeolocationProviderIOS.h:
3440         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3441         * UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:
3442         * UIProcess/ios/WKScrollView.h:
3443         * UIProcess/ios/WKScrollView.mm:
3444         * UIProcess/ios/WebInspectorProxyIOS.mm:
3445         * UIProcess/ios/WebPageProxyIOS.mm:
3446         * UIProcess/ios/WebProcessProxyIOS.mm:
3447         * UIProcess/ios/forms/WKFormInputControl.h:
3448         * UIProcess/ios/forms/WKFormInputControl.mm:
3449         * UIProcess/ios/forms/WKFormPopover.h:
3450         * UIProcess/ios/forms/WKFormPopover.mm:
3451         * UIProcess/mac/FindIndicatorWindow.h:
3452         * UIProcess/mac/FindIndicatorWindow.mm:
3453         * UIProcess/mac/PageClientImpl.h:
3454         * UIProcess/mac/PageClientImpl.mm:
3455         * UIProcess/mac/TextCheckerMac.mm:
3456         * UIProcess/mac/WKFullKeyboardAccessWatcher.h:
3457         * UIProcess/mac/WKFullKeyboardAccessWatcher.mm:
3458         * UIProcess/mac/WKPrintingView.h:
3459         * UIProcess/mac/WKPrintingView.mm:
3460         * UIProcess/mac/WebContextMenuProxyMac.h:
3461         * UIProcess/mac/WebContextMenuProxyMac.mm:
3462         * UIProcess/mac/WebInspectorProxyMac.mm:
3463         * UIProcess/mac/WebPageProxyMac.mm:
3464         * UIProcess/mac/WebProcessProxyMac.mm:
3465         * WebProcess/WebCoreSupport/WebChromeClient.h:
3466         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3467         * WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm:
3468         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
3469         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
3470         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3471         * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm:
3472         * WebProcess/WebPage/ios/WebPageIOS.mm:
3473         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h:
3474         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
3475         * WebProcess/WebPage/mac/WebPageMac.mm:
3476
3477 2014-02-26  Anders Carlsson  <andersca@apple.com>
3478
3479         VisitedLinkProvider should know which pages it belongs to
3480         https://bugs.webkit.org/show_bug.cgi?id=129410
3481
3482         Reviewed by Dan Bernstein.
3483
3484         * UIProcess/VisitedLinkProvider.cpp:
3485         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
3486         (WebKit::VisitedLinkProvider::addPage):
3487         (WebKit::VisitedLinkProvider::removePage):
3488         * UIProcess/VisitedLinkProvider.h:
3489         * UIProcess/WebPageProxy.cpp:
3490         (WebKit::WebPageProxy::WebPageProxy):
3491         (WebKit::WebPageProxy::close):
3492
3493 2014-02-26  Enrica Casucci  <enrica@apple.com>
3494
3495         Build fix.
3496
3497         Unexpected line break.
3498
3499         * Configurations/WebKit2.xcconfig:
3500
3501 2014-02-26  Enrica Casucci  <enrica@apple.com>
3502
3503         Build fix.
3504
3505         WKFormInputControl.mm and WKFormPopover.mm should be excluded from OS X builds.
3506
3507         * Configurations/WebKit2.xcconfig:
3508
3509 2014-02-26  Enrica Casucci  <enrica@apple.com>
3510
3511         [iOS WebKit2] Form controls handling: implement date and time controls.
3512         https://bugs.webkit.org/show_bug.cgi?id=129344
3513
3514         Reviewed by Simon Fraser and Joseph Pecoraro.
3515
3516         This is another step in the implementation of form controls on iOS
3517         for WebKit2. This adds support for date and time input elements supporting
3518         the different look and feel for iPhone and iPad.
3519         WKDateTimePicker implements iPhone UI and
3520         WKDateTimePopover implements iPad UI.
3521         WKFormRotatingAccessoryPopover and WKRotatingPopover are
3522         classes that implement the popover object handling the rotation
3523         and they will be used as base class for the select controls as well.
3524
3525         * UIProcess/WebPageProxy.h:
3526         * UIProcess/ios/WKContentViewInteraction.h:
3527         * UIProcess/ios/WKContentViewInteraction.mm:
3528         (-[WKContentView _displayFormNodeInputView]):
3529         (-[WKContentView inputView]):
3530         (-[WKContentView _startAssistingNode:]):
3531         (-[WKContentView _stopAssistingNode]):
3532         * UIProcess/ios/WKFormInputControl.h: Added.
3533         * UIProcess/ios/WKFormInputControl.mm: Added.
3534         (-[WKDateTimePicker datePicker]):
3535         (-[WKDateTimePicker initWithView:datePickerMode:]):
3536         (-[WKDateTimePicker dealloc]):
3537         (-[WKDateTimePicker controlView]):
3538         (-[WKDateTimePicker _timeZoneOffsetFromGMT:]):
3539         (-[WKDateTimePicker _sanitizeInputValueForFormatter:]):
3540         (-[WKDateTimePicker _dateChangedSetAsNumber]):
3541         (-[WKDateTimePicker _dateChangedSetAsString]):
3542         (-[WKDateTimePicker _dateChanged]):
3543         (-[WKDateTimePicker _dateChangeHandler:]):
3544         (-[WKDateTimePicker controlBeginEditing]):
3545         (-[WKDateTimePicker controlEndEditing]):
3546         (-[WKFormInputControl initWithView:]):
3547         (+[WKFormInputControl createPeripheralWithView:]):
3548         (-[WKFormInputControl beginEditing]):
3549         (-[WKFormInputControl endEditing]):
3550         (-[WKFormInputControl assistantView]):
3551         (-[WKDateTimePopoverViewController initWithView:datePickerMode:]):
3552         (-[WKDateTimePopoverViewController innerControl]):
3553         (-[WKDateTimePopoverViewController loadView]):
3554         (-[WKDateTimePopover clear:]):
3555         (-[WKDateTimePopover initWithView:datePickerMode:]):
3556         (-[WKDateTimePopover viewController]):
3557         (-[WKDateTimePopover controlBeginEditing]):
3558         (-[WKDateTimePopover controlEndEditing]):
3559         (-[WKDateTimePopover controlView]):
3560         * UIProcess/ios/WKFormPeripheral.h: Added.
3561         * UIProcess/ios/WKFormPopover.h: Added.
3562         * UIProcess/ios/WKFormPopover.mm: Added.
3563         (-[WKFormRotatingAccessoryPopover initWithView:]):
3564         (-[WKFormRotatingAccessoryPopover accessoryDone]):
3565         (-[WKFormRotatingAccessoryPopover popoverArrowDirections]):
3566         (-[WKFormRotatingAccessoryPopover popoverWasDismissed:]):
3567         (-[WKRotatingPopover initWithView:]):
3568         (-[WKRotatingPopover dealloc]):
3569         (-[WKRotatingPopover popoverController]):
3570         (-[WKRotatingPopover setPopoverController:]):
3571         (-[WKRotatingPopover popoverArrowDirections]):
3572         (-[WKRotatingPopover presentPopoverAnimated:]):
3573         (-[WKRotatingPopover dismissPopoverAnimated:]):
3574         (-[WKRotatingPopover willRotate:]):
3575         (-[WKRotatingPopover didRotate:]):
3576         (-[WKRotatingPopover popoverControllerDidDismissPopover:]):
3577         * UIProcess/ios/WKFormSelectControl.h: Added.
3578         * UIProcess/ios/WebPageProxyIOS.mm:
3579         (WebKit::WebPageProxy::setAssistedNodeValue):
3580         (WebKit::WebPageProxy::setAssistedNodeValueAsNumber):
3581         * WebKit2.xcodeproj/project.pbxproj:
3582         * WebProcess/WebPage/WebPage.h:
3583         * WebProcess/WebPage/WebPage.messages.in:
3584         * WebProcess/WebPage/ios/WebPageIOS.mm:
3585         (WebKit::WebPage::setAssistedNodeValue):
3586         (WebKit::WebPage::setAssistedNodeValueAsNumber):
3587
3588 2014-02-26  Pratik Solanki  <psolanki@apple.com>
3589
3590         [iOS][Webkit2] Enable codesigning entitlement for web process
3591         https://bugs.webkit.org/show_bug.cgi?id=129401
3592         <rdar://problem/16173873>
3593
3594         Reviewed by Geoffrey Garen.
3595
3596         * Configurations/WebContent-iOS.entitlements:
3597
3598 2014-02-26  Anders Carlsson  <andersca@apple.com>
3599
3600         Give VisitedLinkProviders an identifier and send them to the web process
3601         https://bugs.webkit.org/show_bug.cgi?id=129400
3602
3603         Reviewed by Dan Bernstein.
3604
3605         * Shared/WebPageCreationParameters.cpp:
3606         (WebKit::WebPageCreationParameters::encode):
3607         (WebKit::WebPageCreationParameters::decode):
3608         * Shared/WebPageCreationParameters.h:
3609         * UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h:
3610         * UIProcess/VisitedLinkProvider.cpp:
3611         (WebKit::generateIdentifier):
3612         (WebKit::VisitedLinkProvider::VisitedLinkProvider):
3613         * UIProcess/VisitedLinkProvider.h:
3614         (WebKit::VisitedLinkProvider::identifier):
3615         * UIProcess/WebContext.cpp:
3616         (WebKit::WebContext::createWebPage):
3617         * UIProcess/WebPageProxy.cpp:
3618         (WebKit::WebPageProxy::WebPageProxy):
3619         (WebKit::WebPageProxy::internalShowContextMenu):
3620         * UIProcess/WebPageProxy.h:
3621
3622 2014-02-26  Jinwoo Song  <jinwoo7.song@samsung.com>
3623
3624         Unreviewed CMAKE build fix after r164751.
3625
3626         * CMakeLists.txt: Renamed WebVisitedLinkProvider.cpp to VisitedLinkTableController.cpp.
3627
3628 2014-02-26  Anders Carlsson  <andersca@apple.com>
3629
3630         Rename WebVisitedLinkProvider to VisitedLinkTableController
3631         https://bugs.webkit.org/show_bug.cgi?id=129396
3632
3633         Reviewed by Dan Bernstein.
3634
3635         * WebKit2.xcodeproj/project.pbxproj:
3636         * WebProcess/WebPage/VisitedLinkTableController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/WebVisitedLinkProvider.cpp.
3637         (WebKit::VisitedLinkTableController::create):
3638         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
3639         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
3640         (WebKit::VisitedLinkTableController::isLinkVisited):
3641         (WebKit::VisitedLinkTableController::addVisitedLink):
3642         * WebProcess/WebPage/VisitedLinkTableController.h: Renamed from Source/WebKit2/WebProcess/WebPage/WebVisitedLinkProvider.h.
3643         * WebProcess/WebPage/WebPage.cpp:
3644         (WebKit::WebPage::WebPage):
3645
3646 2014-02-26  Enrica Casucci  <enrica@apple.com>
3647
3648         Keyboard keeps showing up when clicking links after being shown once.
3649         https://bugs.webkit.org/show_bug.cgi?id=129392
3650
3651         Reviewed by Benjamin Poulain.
3652
3653         This is a regression introduced by http://trac.webkit.org/changeset/164690.
3654         _requiresKeyboardWhenFirstResponder should always return NO, if there is
3655         no assisted node.
3656
3657         * UIProcess/ios/WKContentViewInteraction.mm:
3658         (-[WKContentView _requiresKeyboardWhenFirstResponder]):
3659
3660 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
3661
3662         WebProcessProxy::updateProcessState() is causing duplicate symbol linker errors
3663         https://bugs.webkit.org/show_bug.cgi?id=129390
3664
3665         Reviewed by Tim Horton.
3666
3667         Caused by r164737. WebProcessProxy::updateProcessState() is defined in a header, outside of
3668         a class, but isn't inlined.
3669
3670         * UIProcess/WebProcessProxy.h:
3671         (WebKit::WebProcessProxy::updateProcessState):
3672
3673 2014-02-26  Brian Burg  <bburg@apple.com>
3674
3675         Web Replay: route through UserInputBridge when delivering user inputs to WebCore
3676         https://bugs.webkit.org/show_bug.cgi?id=128150
3677
3678         Reviewed by Timothy Hatcher.
3679
3680         When delivering user inputs to WebCore, route calls through the page's UserInputBridge.
3681         This allows us to capture and replay user inputs from WebKit2 solely within WebCore.
3682
3683         * WebProcess/WebPage/WebPage.cpp:
3684         (WebKit::WebPage::tryClose):
3685         (WebKit::WebPage::loadRequest):
3686         (WebKit::WebPage::stopLoadingFrame):
3687         (WebKit::WebPage::stopLoading):
3688         (WebKit::WebPage::reload):
3689         (WebKit::WebPage::contextMenuAtPointInWindow):
3690         (WebKit::handleContextMenuEvent):
3691         (WebKit::handleMouseEvent):
3692         (WebKit::handleWheelEvent):
3693         (WebKit::handleKeyEvent):
3694         (WebKit::WebPage::scroll):
3695         (WebKit::WebPage::logicalScroll):
3696
3697 2014-02-26  Pratik Solanki  <psolanki@apple.com>
3698
3699         [iOS][WebKit2] Adopt SPI for managing tabs
3700         https://bugs.webkit.org/show_bug.cgi?id=129188
3701         <rdar://problem/15939827>
3702
3703         Reviewed by Gavin Barraclough.
3704
3705         Call into assertions SPI to mark tabs as foreground and background.
3706
3707         * Configurations/WebKit2.xcconfig:
3708         * Platform/IPC/Connection.h:
3709         (IPC::Connection::xpcConnection): Expose the xpc_connection_t.
3710         * UIProcess/WebPageProxy.cpp:
3711         (WebKit::WebPageProxy::viewStateDidChange):
3712         * UIProcess/WebProcessProxy.cpp:
3713         (WebKit::WebProcessProxy::didFinishLaunching):
3714         * UIProcess/WebProcessProxy.h:
3715         (WebKit::WebProcessProxy::updateProcessState):
3716         * UIProcess/ios/WebProcessProxyIOS.mm:
3717         (WebKit::WebProcessProxy::updateProcessState): Added. This goes through the list of
3718         WebPageProxies and sets the process state to foreground if one of them is in a window.
3719         Otherwise, it sets it to background.
3720
3721 2014-02-26  Commit Queue  <commit-queue@webkit.org>
3722
3723         Unreviewed, rolling out r164725 and r164731.
3724         http://trac.webkit.org/changeset/164725
3725         http://trac.webkit.org/changeset/164731
3726         https://bugs.webkit.org/show_bug.cgi?id=129382
3727
3728         WebKitTestRunner build is broken on IOS (Requested by smfr on
3729         #webkit).
3730
3731         * UIProcess/API/Cocoa/WKView.h:
3732         * UIProcess/API/ios/WKViewIOS.mm: Added.
3733         (-[WKView initWithCoder:]):
3734         (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
3735         (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
3736         (-[WKView dealloc]):
3737         (-[WKView setFrame:]):
3738         (-[WKView setBounds:]):
3739         (-[WKView scrollView]):
3740         (-[WKView browsingContextController]):
3741         (-[WKView setAllowsBackForwardNavigationGestures:]):
3742         (-[WKView allowsBackForwardNavigationGestures]):
3743         (-[WKView viewForZoomingInScrollView:]):
3744         (-[WKView scrollViewWillBeginZooming:withView:]):
3745         (-[WKView scrollViewWillBeginDragging:]):
3746         (-[WKView _didFinishScrolling]):
3747         (-[WKView scrollViewDidEndDragging:willDecelerate:]):
3748         (-[WKView scrollViewDidEndDecelerating:]):
3749         (-[WKView scrollViewDidScrollToTop:]):
3750         (-[WKView scrollViewDidScroll:]):
3751         (-[WKView scrollViewDidZoom:]):
3752         (-[WKView scrollViewDidEndZooming:withView:atScale:]):
3753         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
3754         (-[WKView _frameOrBoundsChanged]):
3755         (-[WKView _updateVisibleContentRects]):
3756         (-[WKView _keyboardChangedWithInfo:adjustScrollView:]):
3757         (-[WKView _keyboardWillChangeFrame:]):
3758         (-[WKView _keyboardDidChangeFrame:]):
3759         (-[WKView _keyboardWillShow:]):
3760         (-[WKView _keyboardWillHide:]):
3761         (-[WKView pageRef]):
3762         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3763         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
3764         (-[WKView minimumLayoutSizeOverride]):
3765         (-[WKView setMinimumLayoutSizeOverride:]):
3766         (-[WKView _obscuredInsets]):
3767         (-[WKView _setObscuredInsets:]):
3768         (-[WKView _beginInteractiveObscuredInsetsChange]):
3769         (-[WKView _endInteractiveObscuredInsetsChange]):
3770         (-[WKView _pageExtendedBackgroundColor]):
3771         (-[WKView _setBackgroundExtendsBeyondPage:]):
3772         (-[WKView _backgroundExtendsBeyondPage]):
3773         * WebKit2.xcodeproj/project.pbxproj:
3774
3775 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
3776
3777         Build fix: ContextMenuContextData.* should not be in the Copy Files
3778         phase.
3779
3780         * WebKit2.xcodeproj/project.pbxproj:
3781
3782 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
3783
3784         Fix MiniBrowser/WebKitTestRunner link errors; WKView still
3785         needs to be exported while these tools are using it.
3786
3787         * UIProcess/API/Cocoa/WKView.h:
3788
3789 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
3790
3791         Fix the iOS build by wrapping some context menu stuff in #if ENABLE(CONTEXT_MENUS)
3792
3793         * UIProcess/WebPageProxy.h:
3794
3795 2014-02-26  Martin Hock  <mhock@apple.com>
3796
3797         Create SessionID value-style class for session IDs.
3798         https://bugs.webkit.org/show_bug.cgi?id=129141
3799
3800         The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
3801
3802         Reviewed by Sam Weinig.
3803
3804         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3805         (WebKit::storageSession):
3806         (WebKit::NetworkConnectionToWebProcess::startDownload):
3807         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3808         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3809         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
3810         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
3811         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
3812         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
3813         * NetworkProcess/NetworkConnectionToWebProcess.h:
3814         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3815         * NetworkProcess/NetworkProcess.cpp:
3816         (WebKit::NetworkProcess::initializeNetworkProcess):
3817         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
3818         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
3819         * NetworkProcess/NetworkProcess.h:
3820         * NetworkProcess/NetworkProcess.messages.in:
3821         * NetworkProcess/NetworkResourceLoader.h:
3822         * NetworkProcess/RemoteNetworkingContext.h:
3823         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3824         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3825         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3826         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3827         * Shared/Network/NetworkResourceLoadParameters.cpp:
3828         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
3829         * Shared/Network/NetworkResourceLoadParameters.h:
3830         * Shared/SessionTracker.cpp:
3831         (WebKit::staticSessionMap):
3832         (WebKit::storageSessionToID):
3833         (WebKit::SessionTracker::sessionMap):
3834         (WebKit::SessionTracker::session):
3835         (WebKit::SessionTracker::sessionID):
3836         (WebKit::SessionTracker::setSession):
3837         (WebKit::SessionTracker::destroySession):
3838         * Shared/SessionTracker.h: Move code to SessionID class.
3839         * Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
3840         (IPC::ArgumentCoder<SessionID>::encode):
3841         (IPC::ArgumentCoder<SessionID>::decode):
3842         * Shared/WebCoreArgumentCoders.h:
3843         * Shared/mac/CookieStorageShim.mm:
3844         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
3845         * UIProcess/APISession.cpp:
3846         (API::generateID):
3847         (API::Session::defaultSession):
3848         (API::Session::legacyPrivateSession):
3849         (API::Session::Session):
3850         (API::Session::isEphemeral):
3851         (API::Session::getID):
3852         * UIProcess/APISession.h:
3853         * UIProcess/WebContext.cpp:
3854         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
3855         (WebKit::WebContext::createNewWebProcess):
3856         * UIProcess/WebContext.h:
3857         * UIProcess/WebPageProxy.h:
3858         (WebKit::WebPageProxy::sessionID):
3859         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3860         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
3861         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3862         (WebKit::WebResourceLoadScheduler::scheduleLoad):
3863         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3864         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
3865         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3866         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3867         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3868         (WebKit::WebFrameNetworkingContext::storageSession):
3869         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3870         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3871         (WebKit::WebFrameNetworkingContext::storageSession):
3872         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
3873         * WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
3874         (WebKit::WebPage::WebPage):
3875         (WebKit::WebPage::sessionID):
3876         (WebKit::WebPage::isUsingEphemeralSession):
3877         (WebKit::WebPage::setSessionID):
3878         (WebKit::WebPage::updatePreferences):
3879         * WebProcess/WebPage/WebPage.h:
3880         * WebProcess/WebPage/WebPage.messages.in:
3881         * WebProcess/WebProcess.cpp:
3882         (WebKit::WebProcess::ensurePrivateBrowsingSession):
3883         (WebKit::WebProcess::destroyPrivateBrowsingSession):
3884         * WebProcess/WebProcess.h:
3885         * WebProcess/WebProcess.messages.in:
3886
3887 2014-02-26  Anders Carlsson  <andersca@apple.com>
3888
3889         Get rid of WKViewIOS.mm
3890         https://bugs.webkit.org/show_bug.cgi?id=129378
3891
3892         Reviewed by Simon Fraser.
3893
3894         * UIProcess/API/Cocoa/WKView.h:
3895         * UIProcess/API/ios/WKViewIOS.mm: Removed.
3896         * WebKit2.xcodeproj/project.pbxproj:
3897
3898 2014-02-26  Alexey Proskuryakov  <ap@apple.com>
3899
3900         [iOS] Remove some erroneously captured blocks
3901         https://bugs.webkit.org/show_bug.cgi?id=129362
3902
3903         Reviewed by Sam Weinig.
3904
3905         Remove unused captured Objective-C block variables (capturing these doesn't work anyway).
3906
3907         * UIProcess/ios/WKContentViewInteraction.mm:
3908         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
3909         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
3910
3911 2014-02-26  Brady Eidson  <beidson@apple.com>
3912
3913         Pipe experimental image controls menu up to WebKit2
3914         https://bugs.webkit.org/show_bug.cgi?id=129339
3915
3916         Reviewed by Simon Fraser.
3917
3918         Add a WebKit object to represent the data from a ContextMenuContext object that can be shared via IPC:
3919         * Shared/ContextMenuContextData.cpp: Added.
3920         (WebKit::ContextMenuContextData::ContextMenuContextData):
3921         (WebKit::ContextMenuContextData::encode):
3922         (WebKit::ContextMenuContextData::decode):
3923         * Shared/ContextMenuContextData.h: Added.
3924         (WebKit::ContextMenuContextData::webHitTestResultData):
3925         (WebKit::ContextMenuContextData::isImageControl):
3926
3927         Update the rest of WK2 to use this object instead of WebHitTestResult::Data directly:
3928         * UIProcess/WebPageProxy.cpp:
3929         (WebKit::WebPageProxy::showContextMenu):
3930         (WebKit::WebPageProxy::internalShowContextMenu): Also make an ENABLE(IMAGE_CONTROLS) change here.
3931         * UIProcess/WebPageProxy.h:
3932         * UIProcess/WebPageProxy.messages.in:
3933
3934         * WebProcess/WebPage/WebContextMenu.cpp:
3935         (WebKit::WebContextMenu::show):
3936
3937         * CMakeLists.txt:
3938         * GNUmakefile.list.am:
3939         * WebKit2.xcodeproj/project.pbxproj:
3940
3941 2014-02-26  Enrique Ocaña González  <eocanha@igalia.com>
3942
3943         WebKitFindOptions shouldn't expose WEBKIT_FIND_OPTIONS_SHOW_{OVERLAY,FIND_INDICATOR,HIGHLIGHT}
3944         https://bugs.webkit.org/show_bug.cgi?id=129263
3945
3946         Reviewed by Sergio Villar Senin.
3947
3948         Avoided the need of WEBKIT_FIND_OPTIONS_SHOW_* fields by changing the semantics
3949         of the findOptions field in WebKitFindOptions.
3950
3951         * UIProcess/API/gtk/WebKitFindController.cpp: Now
3952         _WebKitFindControllerPrivate.findOptions is interpreted as WebKit::FindOptions
3953         instead of WebKitFindOptions like before. Now the conversion has to be done in
3954         both ways.
3955         (toWebKitFindOptions): Added conversion function from WebKit::FindOptions to
3956         WebKitFindOptions.
3957         (webkit_find_controller_get_options):
3958         (webKitFindControllerPerform):
3959         (webkit_find_controller_search):
3960         (webkit_find_controller_search_next):
3961         (webkit_find_controller_search_previous):
3962         (webkit_find_controller_count_matches):
3963         * UIProcess/API/gtk/WebKitFindController.h: Removed values that shouldn't be
3964         exposed.
3965
3966 2014-02-26  Gergo Balogh  <gbalogh.u-szeged@partner.samsung.com>
3967
3968         Inspector server should be enabled only when the web sockets is enabled too.
3969         https://bugs.webkit.org/show_bug.cgi?id=129304
3970
3971         Reviewed by Csaba Osztrogonác.
3972
3973         * config.h:
3974
3975 2014-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3976
3977         Unreviewed. Fix GTK+ build after r164702.
3978
3979         * UIProcess/DrawingAreaProxy.cpp:
3980
3981 2014-02-26  Martin Robinson  <mrobinson@igalia.com>
3982
3983         [GTK] generate-gtkdoc can fail with WebKit1 or WebKit2 only builds
3984         https://bugs.webkit.org/show_bug.cgi?id=129319
3985
3986         Reviewed by Carlos Garcia Campos.
3987
3988         * GNUmakefile.am: Do not generate the documentation configuration file if the port
3989         is disabled.
3990
3991 2014-02-25  Benjamin Poulain  <bpoulain@apple.com>
3992
3993         [iOS][WK2] Split the rects/scale updates in 3 internally consistent groups
3994         https://bugs.webkit.org/show_bug.cgi?id=129354
3995
3996         Reviewed by Sam Weinig.
3997
3998         During scaling, the scale and rect of UIScrollView, WebPageProxy, DrawingAreaProxy,
3999         DrawingArea and WebPage were in completely inconsistent states.
4000
4001         Some of those disconnect were temporary (like when setting the rect and scale in two different
4002         messages), some were lasting the time of a tile update (like the UIProcess view of the scale).
4003         This was causing various visual glitches.
4004
4005         To fix this, all the updates from the UIProcess are funneled through a single path and the values
4006         are split into 3 different groups/types.
4007         When updating the scale/rects, the UIProcess sends the new information to the WebProcess on a queue
4008         through ViewUpdateDispatcher. There, the updates are accumulated until the MainThread is available.
4009         Once the main thread is "unblocked" from the previous frame, all the data are updated at once from
4010         the last known state in ViewUpdateDispatcher. The new tiles are created for the new converage information
4011         and they are sent to the UIProcess.
4012
4013         At any point, there are 3 types of scale and rects used for different purpose:
4014         -In the UIProcess, there is the UIScrollView scale and rects which represent the "true" state or what
4015          is currently on screen.
4016          That information is mirrored into WebPageProxy for the other classes needing it like DrawingAreaProxy.
4017         -In the WebProcess, there is the last known state. That state is always lagging a little behind the "true"
4018          state.
4019         -Back in the UIProcess, we have the tile states that is attached to RemoteLayerTreeTransaction. It is used
4020          to setup the rendering.
4021
4022         With this change, there are two paths for updating the page scale factor:
4023         -The UI drives the change, the updates goes WKWebView->WKContentView->WebPageProxy->ViewUpdateDispatcher
4024          ->WebPage->RemoteLayerTreeDrawingArea->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
4025         -If changes in the content force scaling parameters, the updates goes: WebPage->RemoteLayerTreeDrawingArea
4026          ->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
4027         The two kind of updates frequently conflicts during loading. We differentiate those through the flag
4028         scaleWasSetByUIProcess passed with the updates. In cases of conflicts, the user always wins.
4029
4030         * DerivedSources.make:
4031         * Scripts/webkit2/messages.py:
4032         (struct_or_class):
4033         * Shared/VisibleContentRectUpdateInfo.cpp: Added.
4034         (WebKit::VisibleContentRectUpdateInfo::encode):
4035         (WebKit::VisibleContentRectUpdateInfo::decode):
4036         * Shared/VisibleContentRectUpdateInfo.h: Added.
4037         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
4038         (WebKit::VisibleContentRectUpdateInfo::exposedRect):
4039         (WebKit::VisibleContentRectUpdateInfo::unobscuredRect):
4040         (WebKit::VisibleContentRectUpdateInfo::scale):
4041         (WebKit::operator==):
4042         * Shared/mac/RemoteLayerTreeTransaction.h:
4043         (WebKit::RemoteLayerTreeTransaction::scaleWasSetByUIProcess):
4044         (WebKit::RemoteLayerTreeTransaction::setScaleWasSetByUIProcess):
4045         * Shared/mac/RemoteLayerTreeTransaction.mm:
4046         (WebKit::RemoteLayerTreeTransaction::encode):
4047         (WebKit::RemoteLayerTreeTransaction::decode):
4048         * UIProcess/API/Cocoa/WKWebView.mm:
4049         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
4050         (-[WKWebView _didFinishScrolling]):
4051         (-[WKWebView scrollViewDidScroll:]):
4052         (-[WKWebView scrollViewDidZoom:]):
4053         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
4054         (-[WKWebView _frameOrBoundsChanged]):
4055         (-[WKWebView _updateVisibleContentRectsWithStableState:]):
4056         (-[WKWebView _setObscuredInsets:]):
4057         (-[WKWebView _endInteractiveObscuredInsetsChange]):
4058         * UIProcess/API/ios/WKViewIOS.mm:
4059         (-[WKView _updateVisibleContentRects]):
4060         * UIProcess/DrawingAreaProxy.cpp:
4061         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
4062         (WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
4063         * UIProcess/DrawingAreaProxy.h:
4064         (WebKit::DrawingAreaProxy::updateDebugIndicator):
4065         * UIProcess/WebPageProxy.h:
4066         (WebKit::WebPageProxy::displayedContentScale):
4067         (WebKit::WebPageProxy::exposedContentRect):
4068         (WebKit::WebPageProxy::unobscuredContentRect):
4069         * UIProcess/ios/WKContentView.h:
4070         * UIProcess/ios/WKContentView.mm:
4071         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
4072         (-[WKContentView didFinishScrolling]):
4073         (-[WKContentView didZoomToScale:]):
4074         * UIProcess/ios/WebPageProxyIOS.mm:
4075         (WebKit::WebPageProxy::updateVisibleContentRects):
4076         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
4077         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
4078         (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
4079         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
4080         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
4081         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
4082         * WebKit2.xcodeproj/project.pbxproj:
4083         * WebProcess/WebPage/ViewUpdateDispatcher.cpp: Added.
4084         (WebKit::ViewUpdateDispatcher::create):
4085         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
4086         (WebKit::ViewUpdateDispatcher::~ViewUpdateDispatcher):
4087         (WebKit::ViewUpdateDispatcher::initializeConnection):
4088         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
4089         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
4090         * WebProcess/WebPage/ViewUpdateDispatcher.h: Added.
4091         * WebProcess/WebPage/ViewUpdateDispatcher.messages.in: Added.