20752431f2a6ea390c9194cd20b9bb551672a9ec
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-06-07  Alexey Proskuryakov  <ap@apple.com>
2
3         [iOS] Fix a path used for sandbox profiles
4         https://bugs.webkit.org/show_bug.cgi?id=133602
5         <rdar://problem/17212011>
6
7         Reviewed by David Kilzer.
8
9         * WebKit2.xcodeproj/project.pbxproj:
10
11 2014-06-06  Enrica Casucci  <enrica@apple.com>
12
13         REGRESSION (iOS WebKit2): backspace key does not repeat beyond a single word.
14         https://bugs.webkit.org/show_bug.cgi?id=133593
15         <rdar://problem/16352228>
16
17         Reviewed by Benjamin Poulain.
18
19         We need to provide a way for the keyboard layer to select from
20         the current position to the beginning of the word moving backwards
21         and implement the method to know when we have reached the beginning of the document.
22
23         * UIProcess/WebPageProxy.h:
24         * UIProcess/ios/WKContentViewInteraction.mm:
25         (-[WKContentView selectWordBackward]):
26         (-[WKContentView _selectionAtDocumentStart]):
27         * UIProcess/ios/WebPageProxyIOS.mm:
28         (WebKit::WebPageProxy::selectWordBackward):
29         * WebProcess/WebPage/WebPage.h:
30         * WebProcess/WebPage/WebPage.messages.in:
31         * WebProcess/WebPage/ios/WebPageIOS.mm:
32         (WebKit::WebPage::selectWordBackward):
33
34 2014-06-06  Enrica Casucci  <enrica@apple.com>
35
36         Adopt the new UIAlertController API to replace UIActionSheet.
37         https://bugs.webkit.org/show_bug.cgi?id=133582
38         <rdar://problem/16845223>
39
40         Reviewed by Joseph Pecoraro.
41
42         UIActionSheet is deprecated. We need to move out action sheets
43         implementation to UIAlertView.
44
45         * UIProcess/API/Cocoa/_WKElementAction.h:
46         * UIProcess/API/Cocoa/_WKElementAction.mm:
47         * UIProcess/ios/WKActionSheet.h:
48         * UIProcess/ios/WKActionSheet.mm:
49         (-[WKActionSheet presentSheetFromRect:]):
50         (-[WKActionSheet doneWithSheet]):
51         (-[WKActionSheet willRotate]):
52         (-[WKActionSheet updateSheetPosition]):
53         (-[WKActionSheet _didRotateAndLayout]):
54         (-[WKActionSheet didRotate]):
55         * UIProcess/ios/WKActionSheetAssistant.h:
56         * UIProcess/ios/WKActionSheetAssistant.mm:
57         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
58         (-[WKActionSheetAssistant showImageSheet]):
59         (-[WKActionSheetAssistant showLinkSheet]):
60         (-[WKActionSheetAssistant showDataDetectorsSheet]):
61         (-[WKActionSheetAssistant cleanupSheet]):
62         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Deleted.
63         * UIProcess/ios/WKContentViewInteraction.mm:
64         (-[WKContentView _longPressRecognized:]):
65
66 2014-06-06  Gavin Barraclough  <baraclough@apple.com>
67
68         Should boost ChildProcesses on iOS
69         https://bugs.webkit.org/show_bug.cgi?id=133583
70
71         Reviewed by Sam Weinig.
72
73         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
74         (WebKit::connectToService):
75             - boost all child processes on iOS.
76
77 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
78
79         Build fix after <http://trac.webkit.org/changeset/169655>.
80
81         The SPIs used do not exist on Mac, limit the code to iOS.
82
83         * Shared/Authentication/mac/AuthenticationManager.mac.mm:
84         * Shared/WebCoreArgumentCoders.cpp:
85         (IPC::ArgumentCoder<Credential>::encode):
86         (IPC::ArgumentCoder<Credential>::decode):
87         * Shared/cf/ArgumentCodersCF.cpp:
88         (IPC::typeFromCFTypeRef):
89         (IPC::encode):
90         (IPC::decode):
91         * Shared/cf/ArgumentCodersCF.h:
92
93 2014-06-06  Dan Bernstein  <mitz@apple.com>
94
95         <rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
96         https://bugs.webkit.org/show_bug.cgi?id=133527
97
98         Reviewed by Darin Adler.
99
100         * Configurations/Network-iOS.entitlements: Enabled the Network process to access the keys
101         needed to create identities to authenticate with.
102
103         * Shared/WebCoreArgumentCoders.cpp:
104         (IPC::ArgumentCoder<Credential>::encode): Encode the credential type, and if it is a client
105         certificate, encode the identity and the certificates.
106         (IPC::ArgumentCoder<Credential>::decode): Decode the credential type. If it is a client
107         certificate, decode the identity and the certificates and use the proper Credential
108         constructor.
109
110         * Shared/cf/ArgumentCodersCF.cpp:
111         (IPC::typeFromCFTypeRef): Handle SecIdentityRef.
112         (IPC::encode): Encode an identity by encoding its certificate and a persistent reference to
113         its key.
114         (IPC::decode): Decode a certificate and a persistent reference to a key, find the key, and
115         create an identity.
116         * Shared/cf/ArgumentCodersCF.h:
117
118 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
119
120         [iOS][WK2] WebPage sometimes forces two resize events on animated resize
121         https://bugs.webkit.org/show_bug.cgi?id=133534
122
123         Reviewed by Enrica Casucci.
124
125         When I updated the patch for resize events (r168556) to use the unobscured rect in scrollview coordinates,
126         I forgot to update a snippet of code in dynamicViewportSizeUpdate(). Since that code was still using
127         the scaled unobscured rect, there was sometimes a difference of 1 pixel between the size set by that
128         call site and the others.
129
130         This path nukes the bad code and use the unobscured rect in scrollview coordinates given by the UIProcess.
131
132         * WebProcess/WebPage/ios/WebPageIOS.mm:
133         (WebKit::WebPage::dynamicViewportSizeUpdate):
134
135 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
136
137         [iOS][WK2] Add device orientation
138         https://bugs.webkit.org/show_bug.cgi?id=133530
139         <rdar://problem/16680041>
140
141         Reviewed by Tim Horton.
142
143         Add device orientation for WebKit2.
144
145         For the public API, WKWebView get the updates through the notification UIWindowDidRotateNotification.
146         We do not have any control over how the API is used, but we can expect the size will be updated before
147         the end of rotation in most cases and the events should be sent in the right order.
148
149         For Safari, we use an override to support animated resize (and some tabs corner cases).
150
151         On the WebProcess side, we just get the new orientation directly or on DynamicViewportSizeUpdate.
152
153         * UIProcess/API/Cocoa/WKWebView.mm:
154         (deviceOrientationForUIInterfaceOrientation):
155         (deviceOrientation):
156         (-[WKWebView initWithFrame:configuration:]):
157         (-[WKWebView _windowDidRotate:]):
158         (-[WKWebView _setInterfaceOrientationOverride:]):
159         (-[WKWebView _interfaceOrientationOverride]):
160         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
161         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
162         * UIProcess/WebPageProxy.cpp:
163         (WebKit::WebPageProxy::WebPageProxy):
164         * UIProcess/WebPageProxy.h:
165         (WebKit::WebPageProxy::deviceOrientation):
166         * UIProcess/ios/WebPageProxyIOS.mm:
167         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
168         (WebKit::WebPageProxy::setDeviceOrientation):
169         * WebProcess/WebCoreSupport/WebChromeClient.h:
170         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
171         (WebKit::WebChromeClient::deviceOrientation):
172         * WebProcess/WebPage/WebPage.cpp:
173         (WebKit::WebPage::WebPage):
174         * WebProcess/WebPage/WebPage.h:
175         (WebKit::WebPage::deviceOrientation):
176         * WebProcess/WebPage/WebPage.messages.in:
177         * WebProcess/WebPage/ios/WebPageIOS.mm:
178         (WebKit::WebPage::setDeviceOrientation):
179         (WebKit::WebPage::dynamicViewportSizeUpdate):
180
181 2014-06-05  Oliver Hunt  <oliver@apple.com>
182
183         Enable SANDBOX_EXTENSIONS build flag universally on cocoa
184         https://bugs.webkit.org/show_bug.cgi?id=133556
185
186         Reviewed by Alexey Proskuryakov.
187
188         Remove unnecessary iOS exception.
189
190         * WebKit2Prefix.h:
191
192 2014-06-05  Alexey Proskuryakov  <ap@apple.com>
193
194         [Mac] Tweak plug-in sandbox profiles
195         https://bugs.webkit.org/show_bug.cgi?id=133549
196
197         Fix <rdar://problem/17068055> and <rdar://problem/17148837>.
198
199         Reviewed by Sam Weinig and Simon Cooper.
200
201         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
202         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
203
204 2014-06-05  Tanay C  <tanay.c@samsung.com>
205
206         Resolve compiler error (call of overloaded 'schedule' function is ambiguous) 
207         https://bugs.webkit.org/show_bug.cgi?id=133467
208
209         Reviewed by Carlos Garcia Campos.
210
211         * Shared/Downloads/soup/DownloadSoup.cpp:
212         (WebKit::DownloadClient::handleResponseLater): Explicitly casting second parameter to std::function<void()>
213
214 2014-06-04  Benjamin Poulain  <bpoulain@apple.com>
215
216         [iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
217         https://bugs.webkit.org/show_bug.cgi?id=133490
218
219         Reviewed by Tim Horton.
220
221         Instead of restoring the scroll position, restore the visual position. This makes pages appear at the same position
222         on screen ignoring changes in the obscured top inset.
223
224         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
225         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
226         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
227         (WebKit::WebFrameLoaderClient::restoreViewState):
228         Save and restore userHasChangedPageScaleFactor to handle rescaling correctly.
229         Limit the scale into valid viewport limits in case the viewport meta tag has changed or the device has rotated.
230
231         * WebProcess/WebPage/WebPage.cpp:
232         (WebKit::WebPage::WebPage):
233         * WebProcess/WebPage/WebPage.h:
234         (WebKit::WebPage::userHasChangedPageScaleFactor):
235         * WebProcess/WebPage/ios/WebPageIOS.mm:
236         (WebKit::WebPage::restorePageState):
237         (WebKit::WebPage::updateVisibleContentRects):
238         In updateVisibleContentRects, we keep track or the current difference between the exposed rect and the unobscured rect.
239         When restoring the page position, we use the current top inset and the saved exposed rect to restore the visual
240         scroll position.
241
242         It is not very robust as it does not resolve races between the two processes, but that is not worse than what we is there now.
243
244 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
245
246         WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
247         https://bugs.webkit.org/show_bug.cgi?id=133472
248         <rdar://problem/15686848>
249
250         Reviewed by Simon Fraser.
251
252         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
253         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
254         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
255         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
256         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
257         Use prepopulateRect() when zooming out to ensure that we have tiles for the current exposed area.
258
259         Factor applyTransientZoomToLayers out of adjustTransientZoom, so that
260         flushLayers can call applyTransientZoomToLayers without ending up calling prepopulateRect()
261         during layer flushing, which causes trouble.
262
263         It is OK to populate layers at the current scale even when zooming out, because the overdraw
264         already covers most of the zoomed out area, and we're only adding a few more tiles at worst.
265
266 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
267
268         [iOS][WK2] Align the highlight rects with device pixels
269         https://bugs.webkit.org/show_bug.cgi?id=133464
270         <rdar://problem/16708861>
271
272         Reviewed by Enrica Casucci.
273
274         * UIProcess/ios/WKContentViewInteraction.mm:
275         (-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
276
277 2014-06-02  Enrica Casucci  <enrica@apple.com>
278
279         REGRESSION (iOS WebKit2): Single tap in pages with focus on load will clear the selection after the keyboard appears.
280         https://bugs.webkit.org/show_bug.cgi?id=133465
281         <rdar://problem/17059189>
282
283         Reviewed by Benjamin Poulain.
284
285         If a page focuses an input field on load we don't bring the keyboard on screen
286         since the keyboard is only shown when the user interacts with the page with gestures.
287         Still the WebProcess sets the focus and the selection according to the rules.
288         We need to make sure the UI process doesn't accidentally clear this selection
289         when the user starts the interaction with the page.
290         This patch also improves the function that retrieves the autocorrection data
291         to be returned to the keyboard, making sure that we always send back a reply
292         even when we don't have a valid selection.
293
294         * UIProcess/ios/WKContentViewInteraction.mm:
295         (-[WKContentView _singleTapCommited:]):
296         * WebProcess/WebPage/ios/WebPageIOS.mm:
297         (WebKit::WebPage::requestAutocorrectionData):
298
299 2014-05-31  Anders Carlsson  <andersca@apple.com>
300
301         Change DeferrableOneShotTimer to use std::function instead of being a class template
302         https://bugs.webkit.org/show_bug.cgi?id=133423
303
304         Reviewed by Antti Koivisto.
305
306         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
307         (WebKit::NetworkProcess::platformSetCacheModel):
308         * Shared/CacheModel.cpp:
309         (WebKit::calculateCacheSizes):
310         * Shared/CacheModel.h:
311         * WebProcess/Plugins/PluginView.cpp:
312         (WebKit::PluginView::pluginSnapshotTimerFired):
313         * WebProcess/Plugins/PluginView.h:
314         * WebProcess/cocoa/WebProcessCocoa.mm:
315         (WebKit::WebProcess::platformSetCacheModel):
316
317 2014-06-02  Benjamin Poulain  <bpoulain@apple.com>
318
319         [iOS][WK2] Round the UIScrollView content size to device pixel
320         https://bugs.webkit.org/show_bug.cgi?id=133417
321         <rdar://problem/15922440>
322
323         Reviewed by Simon Fraser.
324
325         We should really have the scaled content size floored to device pixels, but that will be for another
326         time.
327         This patch ensure the content size as seen by the API is rounded to device pixels. The value is floored
328         to avoid showing partial pixels when the content is stable.
329
330         * UIProcess/API/Cocoa/WKWebView.mm:
331         (floorFloatToPixels):
332         (roundScrollViewCountentSize):
333         (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
334         (-[WKWebView _didCommitLayerTree:WebKit::]):
335         (-[WKWebView scrollView:contentSizeForZoomScale:withProposedSize:]):
336         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
337         (-[WKWebView _endAnimatedResize]):
338
339 2014-06-02  Oliver Hunt  <oliver@apple.com>
340
341         Move ifdef to the right place.
342
343         RS=Enrica
344
345         * WebProcess/cocoa/WebProcessCocoa.mm:
346         (WebKit::WebProcess::initializeSandbox):
347
348 2014-06-02  Gavin Barraclough  <barraclough@apple.com>
349
350         Set default voucher for XPC client processes
351         https://bugs.webkit.org/show_bug.cgi?id=133458
352
353         Reviewed by Geoff Garen.
354
355         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
356         (WebKit::XPCServiceInitializer):
357             - add voucher_replace_default_voucher.
358         * config.h:
359             - add HAVE_VOUCHERS.
360
361 2014-06-02  Jeremy Jones  <jeremyj@apple.com>
362
363         Send external playback properties to fullscreen.
364         https://bugs.webkit.org/show_bug.cgi?id=133366
365
366         Reviewed by Simon Fraser.
367
368         Forward setExternalPlayback.
369
370         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: add setExternalPlaybackProperties
371         * WebProcess/ios/WebVideoFullscreenManager.h: add setExternalPlaybackProperties
372         * WebProcess/ios/WebVideoFullscreenManager.mm: add setExternalPlaybackProperties
373         (WebKit::WebVideoFullscreenManager::setExternalPlaybackProperties): added
374
375 2014-06-02  Enrica Casucci  <enrica@apple.com>
376
377         Remove unintentional changes to WKContentViewInteraction.mm
378         introduced in r169500.
379
380         Unreviewed.
381
382         * UIProcess/ios/WKContentViewInteraction.mm:
383         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
384
385 2014-06-02  Geoffrey Garen  <ggaren@apple.com>
386
387         Address some review comments on bug 133408
388         https://bugs.webkit.org/show_bug.cgi?id=133410
389
390         Reviewed by Anders Carlsson.
391
392         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
393         * UIProcess/API/Cocoa/WKUIDelegate.h:
394
395 2014-06-02  Dan Bernstein  <mitz@apple.com>
396
397         [Cocoa] -[WKWebView activeURL] is unused
398         https://bugs.webkit.org/show_bug.cgi?id=133440
399
400         Reviewed by Mark Rowe.
401
402         * UIProcess/API/Cocoa/WKWebView.mm:
403         (-[WKWebView activeURL]): Deleted.
404         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed the property declaration.
405
406 2014-05-31  Oliver Hunt  <oliver@apple.com>
407
408         Restructure initial distinct sandbox profiles
409         https://bugs.webkit.org/show_bug.cgi?id=133415
410
411         Reviewed by Alexey Proskuryakov.
412
413         Add support for manually instantiating the network and
414         content process sandboxes, and add initial profiles.
415         These profiles are completely generic so we can make sure
416         nothing is broken by enabling them.
417
418         This also adds a target to the WebKit2 project to correctly
419         process the profiles.
420
421         * DatabaseProcess/ios/DatabaseProcessIOS.mm:
422         (WebKit::DatabaseProcess::initializeSandbox):
423         * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Removed.
424         * NetworkProcess/ios/NetworkProcessIOS.mm:
425         (WebKit::NetworkProcess::initializeSandbox):
426         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Added.
427         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Added.
428         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Added.
429         * WebKit2.xcodeproj/project.pbxproj:
430         * WebProcess/cocoa/WebProcessCocoa.mm:
431         (WebKit::WebProcess::initializeSandbox):
432
433 2014-06-01  Sam Weinig  <sam@webkit.org>
434
435         [Cocoa] Add SPI to get a WebArchive of the WKWebView
436         <rdar://problem/16748120>
437         https://bugs.webkit.org/show_bug.cgi?id=133439
438
439         Reviewed by Anders Carlsson.
440
441         * UIProcess/API/Cocoa/WKWebView.mm:
442         (-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
443         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
444
445 2014-05-31  Anders Carlsson  <andersca@apple.com>
446
447         Add a LazyNeverDestroyed class template and use it
448         https://bugs.webkit.org/show_bug.cgi?id=133425
449
450         Reviewed by Darin Adler.
451
452         * Shared/mac/SecItemShim.cpp:
453         (WebKit::responseMap):
454
455 2014-05-31  Timothy Horton  <timothy_horton@apple.com>
456
457         View snapshots are sometimes taken at the wrong scale
458         https://bugs.webkit.org/show_bug.cgi?id=133419
459         <rdar://problem/17087497>
460
461         Reviewed by Sam Weinig.
462
463         * UIProcess/API/mac/WKView.mm:
464         (-[WKView _takeViewSnapshot]):
465         Work around <rdar://problem/17084993> by re-requesting the snapshot at
466         kCGWindowImageNominalResolution if it was captured at the wrong scale.
467
468 2014-05-31  Dan Bernstein  <mitz@apple.com>
469
470         [iOS] WebKit2.framework is unused
471         https://bugs.webkit.org/show_bug.cgi?id=133424
472
473         Reviewed by Anders Carlsson.
474
475         * Configurations/WebKit2.xcconfig: Set SKIP_INSTALL to YES when targeting iOS.
476
477 2014-05-30  Benjamin Poulain  <bpoulain@apple.com>
478
479         [iOS][WK2] When a page does not finish rotation before the end of the animation, synchronize explicitely
480         https://bugs.webkit.org/show_bug.cgi?id=133364
481         <rdar://problem/17026333>
482
483         Reviewed by Sam Weinig.
484
485         When a page that does layout on rotation does not respond before the end of the animation, we end up with
486         a completely inconsistent state on the UIProcess (because it is unware of the new states).
487
488         The perfect way to fix this would be to make animated resize transactional and have the WebProcess resolve
489         conflicts. That is very complicated and the issue is uncommon, so this patch does not do that.
490
491         This patch force the synchronization whenever we finish the animation before we heard back
492         from the WebProcess.
493
494         * UIProcess/API/Cocoa/WKWebView.mm:
495         (-[WKWebView _endAnimatedResize]):
496         * UIProcess/WebPageProxy.cpp:
497         (WebKit::WebPageProxy::WebPageProxy):
498         (WebKit::WebPageProxy::resetState):
499         * UIProcess/WebPageProxy.h:
500         * UIProcess/ios/WebPageProxyIOS.mm:
501         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
502         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
503         (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
504         * WebProcess/WebPage/WebPage.h:
505         * WebProcess/WebPage/WebPage.messages.in:
506         * WebProcess/WebPage/ios/WebPageIOS.mm:
507         (WebKit::WebPage::dynamicViewportSizeUpdate):
508         (WebKit::WebPage::synchronizeDynamicViewportUpdate):
509
510 2014-05-30  Enrica Casucci  <enrica@apple.com>
511
512         REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
513         https://bugs.webkit.org/show_bug.cgi?id=133413
514         <rdar://problem/16948333>
515
516         Reviewed by Benjamin Poulain.
517
518         iOS TextInput needs to know about content surrounding the
519         current position while editing. Since we don't want to
520         query this information synchronously when asked, we cache it
521         as part of the EditorState. EditorState now contains a vector of
522         three characters representing the content after, before and two
523         position before the caret position.
524         The patch also replaces all calls to plainText with plainTextReplacingNoBreakSpace
525         to work well with iOS text input.
526
527         * Shared/EditorState.cpp:
528         (WebKit::EditorState::encode):
529         (WebKit::EditorState::decode):
530         * Shared/EditorState.h:
531         (WebKit::EditorState::EditorState):
532         * UIProcess/ios/WKContentViewInteraction.mm:
533         (-[WKContentView _characterInRelationToCaretSelection:]):
534         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
535         * WebProcess/WebPage/WebPage.cpp:
536         (WebKit::WebPage::editorState):
537         * WebProcess/WebPage/ios/WebPageIOS.mm:
538         (WebKit::WebPage::requestDictationContext):
539         (WebKit::WebPage::replaceSelectedText):
540         (WebKit::WebPage::replaceDictatedText):
541         (WebKit::WebPage::requestAutocorrectionData):
542         (WebKit::WebPage::syncApplyAutocorrection):
543         (WebKit::computeAutocorrectionContext):
544
545 2014-05-30  Geoffrey Garen  <ggaren@apple.com>
546
547         Fixed the build by adding back a declaration I deleted by accident :(.
548
549         Unreviewed.
550
551         * UIProcess/API/Cocoa/WKWebView.h:
552
553 2014-05-30  Geoffrey Garen  <ggaren@apple.com>
554
555         Unreviewed, rolling in r169490.
556
557         I changed a non-ASCII apostrophe to ASCII.
558
559         Restored changeset:
560
561         "Some more copy-editing of the Modern WebKit headerdoc"
562         https://bugs.webkit.org/show_bug.cgi?id=133408
563         http://trac.webkit.org/changeset/169490
564
565         * UIProcess/API/Cocoa/WKBackForwardList.h:
566         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
567         * UIProcess/API/Cocoa/WKFrameInfo.h:
568         * UIProcess/API/Cocoa/WKNavigation.h:
569         * UIProcess/API/Cocoa/WKNavigationAction.h:
570         (NS_ENUM):
571         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
572         (NS_ENUM):
573         * UIProcess/API/Cocoa/WKNavigationResponse.h:
574         * UIProcess/API/Cocoa/WKPreferences.h:
575         * UIProcess/API/Cocoa/WKProcessPool.h:
576         * UIProcess/API/Cocoa/WKScriptMessage.h:
577         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
578         * UIProcess/API/Cocoa/WKUIDelegate.h:
579         * UIProcess/API/Cocoa/WKUserContentController.h:
580         * UIProcess/API/Cocoa/WKWebView.h:
581         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
582
583 2014-05-30  Geoffrey Garen  <ggaren@apple.com>
584
585         Unreviewed, rolling out r169490.
586
587         It broke the build with a mysterious warning about ASCII.
588
589         Reverted changeset:
590
591         "Some more copy-editing of the Modern WebKit headerdoc"
592         https://bugs.webkit.org/show_bug.cgi?id=133408
593         http://trac.webkit.org/changeset/169490
594
595 2014-05-30  Geoffrey Garen  <ggaren@apple.com>
596
597         Some more copy-editing of the Modern WebKit headerdoc
598         https://bugs.webkit.org/show_bug.cgi?id=133408
599
600         Reviewed by Beth Dakin.
601
602         A copy-editor suggested some edits to the headerdoc for clarity,
603         style, and formatting.
604
605         I reviewed the edits and accepted about 80% of them.
606
607         * UIProcess/API/Cocoa/WKBackForwardList.h:
608         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
609         * UIProcess/API/Cocoa/WKFrameInfo.h:
610         * UIProcess/API/Cocoa/WKNavigation.h:
611         * UIProcess/API/Cocoa/WKNavigationAction.h:
612         (NS_ENUM):
613         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
614         (NS_ENUM):
615         * UIProcess/API/Cocoa/WKNavigationResponse.h:
616         * UIProcess/API/Cocoa/WKPreferences.h:
617         * UIProcess/API/Cocoa/WKProcessPool.h:
618         * UIProcess/API/Cocoa/WKScriptMessage.h:
619         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
620         * UIProcess/API/Cocoa/WKUIDelegate.h:
621         * UIProcess/API/Cocoa/WKUserContentController.h:
622         * UIProcess/API/Cocoa/WKWebView.h:
623         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
624
625 2014-05-30  Timothy Horton  <timothy_horton@apple.com>
626
627         Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
628         https://bugs.webkit.org/show_bug.cgi?id=133370
629         <rdar://problem/17061361>
630
631         Reviewed by Darin Adler.
632
633         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
634         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
635         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
636         (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
637         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
638         Post-landing review comments from Darin noted that checking if the
639         DrawingArea's m_displayRefreshMonitors contains the monitor in the
640         list to notify is insufficient, because a new one could have been
641         added with the same address. Instead, copy the HashSet, removing
642         at random from it and firing didUpdateLayers, but *also* removing
643         from it in the willDestroyDisplayRefreshMonitor callback.
644         This is very similar to what DisplayRefreshMonitor itself does internally
645         (we don't have to duplicate its code to avoid re-entry because it is
646         already impossible to re-enter didUpdate).
647
648 2014-05-29  Anders Carlsson  <andersca@apple.com>
649
650         -[WKProcessPoolConfiguration setCachePartitionedURLSchemes:] should do a deep copy
651         https://bugs.webkit.org/show_bug.cgi?id=133393
652
653         Reviewed by Dan Bernstein.
654
655         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
656         (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
657
658 2014-05-29  Mark Lam  <mark.lam@apple.com>
659
660         Restoring FloatingPointEnvironment initialization that was accidentally rolled out by r169176.
661         <https://webkit.org/b/133389>
662
663         Rubber stamped by Oliver Hunt.
664
665         * Shared/ios/ChildProcessIOS.mm:
666         (WebKit::ChildProcess::platformInitialize):
667
668 2014-05-29  Enrica Casucci  <enrica@apple.com>
669
670         Need to notify the keyboard about every KeyDown event.
671         https://bugs.webkit.org/show_bug.cgi?id=133383
672         <rdar://problem/16633975>
673
674         Reviewed by Benjamin Poulain.
675         
676         A key down will generate most of the time a call to the keyboard to add input or delete.
677         But the event could be handled by JavaScript and its default prevented.
678         We need to notify the keyboard in every case to allow updating its internal state about what has been typed.
679
680         * UIProcess/ios/PageClientImplIOS.mm:
681         (WebKit::PageClientImpl::doneWithKeyEvent):
682         * UIProcess/ios/WKContentViewInteraction.h:
683         * UIProcess/ios/WKContentViewInteraction.mm:
684         (-[WKContentView _didHandleKeyEvent:]):
685
686 2014-05-29  Matthew Hanson  <matthew_hanson@apple.com>
687
688         Roll out r169439. <rdar://problem/17069364>
689
690     2014-05-28  Gavin Barraclough  <baraclough@apple.com> 
691
692             viewStateDidChange should always fully update ViewState
693             https://bugs.webkit.org/show_bug.cgi?id=133159
694
695             Reviewed by Anders Carlson.
696
697             Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
698
699             This has the following negative consequences:
700              – WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
701              – Updates may unnecessarily be split over multiple IPC messages.
702              – In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls. 
703
704             Better to just always update the entire ViewState. 
705
706             * UIProcess/API/Cocoa/WKWebView.mm:
707             (-[WKWebView didMoveToWindow]):
708                 - removed argument to viewStateDidChange.
709             * UIProcess/API/gtk/PageClientImpl.cpp:
710             (WebKit::PageClientImpl::viewState):
711             (WebKit::PageClientImpl::isViewWindowActive): Deleted.
712             (WebKit::PageClientImpl::isViewFocused): Deleted.
713             (WebKit::PageClientImpl::isViewVisible): Deleted.
714             (WebKit::PageClientImpl::isViewInWindow): Deleted.
715             * UIProcess/API/gtk/PageClientImpl.h:
716                 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
717             * UIProcess/API/mac/WKView.mm:
718             (-[WKView becomeFirstResponder]):
719             (-[WKView resignFirstResponder]):
720             (-[WKView viewDidMoveToWindow]):
721             (-[WKView _windowDidBecomeKey:]):
722             (-[WKView _windowDidResignKey:]):
723             (-[WKView _windowDidMiniaturize:]):
724             (-[WKView _windowDidDeminiaturize:]):
725             (-[WKView _windowDidOrderOffScreen:]):
726             (-[WKView _windowDidOrderOnScreen:]):
727             (-[WKView _windowDidChangeOcclusionState:]):
728             (-[WKView viewDidHide]):
729             (-[WKView viewDidUnhide]):
730             (-[WKView _activeSpaceDidChange:]):
731             (-[WKView _setThumbnailView:]):
732             (-[WKView endDeferringViewInWindowChanges]):
733             (-[WKView endDeferringViewInWindowChangesSync]):
734                 - removed argument to viewStateDidChange.
735             * UIProcess/CoordinatedGraphics/WebView.cpp:
736             (WebKit::WebView::viewState):
737             (WebKit::WebView::isViewWindowActive): Deleted.
738             (WebKit::WebView::isViewFocused): Deleted.
739             (WebKit::WebView::isViewVisible): Deleted.
740             (WebKit::WebView::isViewInWindow): Deleted.
741             * UIProcess/CoordinatedGraphics/WebView.h:
742                 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
743             * UIProcess/PageClient.h:
744             (WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
745             (WebKit::PageClient::isVisuallyIdle): Deleted.
746                 - merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
747             * UIProcess/WebPageProxy.cpp:
748             (WebKit::WebPageProxy::WebPageProxy):
749             (WebKit::WebPageProxy::reattachToWebProcess):
750                 - updateViewState -> PageClient::viewState
751             (WebKit::WebPageProxy::viewStateDidChange):
752                 - argument removed; updateViewState -> PageClient::viewState.
753             (WebKit::WebPageProxy::setCursor):
754                 - call isViewWindowActive on WebPageProxy, rather than PageClient.
755             (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
756                 - call isViewWindowActive on WebPageProxy, rather than PageClient.
757             (WebKit::WebPageProxy::updateViewState): Deleted.
758                 - removed - viewState method moved to PageClient.
759             * UIProcess/WebPageProxy.h:
760             (WebKit::WebPageProxy::isViewWindowActive):
761                 - added missing implementation.
762             (WebKit::WebPageProxy::isViewVisible):
763                 - removed argument to viewStateDidChange.
764             * UIProcess/WebProcessProxy.cpp:
765             (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
766                 - removed argument to viewStateDidChange.
767             * UIProcess/ios/PageClientImplIOS.h:
768             * UIProcess/ios/PageClientImplIOS.mm:
769             (WebKit::PageClientImpl::viewState):
770             (WebKit::PageClientImpl::isViewWindowActive): Deleted.
771             (WebKit::PageClientImpl::isViewFocused): Deleted.
772             (WebKit::PageClientImpl::isViewVisible): Deleted.
773             (WebKit::PageClientImpl::isViewInWindow): Deleted.
774             (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
775             (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
776                 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
777             * UIProcess/ios/WKContentView.mm:
778             (-[WKContentView didMoveToWindow]):
779             (-[WKContentView _applicationDidEnterBackground:]):
780             (-[WKContentView _applicationWillEnterForeground:]):
781                 - removed argument to viewStateDidChange.
782             * UIProcess/mac/PageClientImpl.h:
783             * UIProcess/mac/PageClientImpl.mm:
784             (WebKit::PageClientImpl::viewState):
785             (WebKit::PageClientImpl::showCorrectionPanel):
786             (WebKit::PageClientImpl::showDictationAlternativeUI):
787             (WebKit::PageClientImpl::isViewWindowActive): Deleted.
788             (WebKit::PageClientImpl::isViewFocused): Deleted.
789             (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
790             (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
791                 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
792
793 2014-05-29  Dan Bernstein  <mitz@apple.com>
794
795         [Cocoa] Can’t recover from subframe load errors
796         https://bugs.webkit.org/show_bug.cgi?id=133385
797
798         Reviewed by Anders Carlsson.
799
800         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
801         * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
802         * UIProcess/Cocoa/NavigationState.mm:
803         (WebKit::NavigationState::setNavigationDelegate): Initialize
804         webViewNavigationDidFailProvisionalLoadInSubframeWithError flag in the delegate methods
805         struct.
806         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): If the
807         error occurred in a subframe, invoke the new delegate method.
808
809 2014-05-29  Geoffrey Garen  <ggaren@apple.com>
810
811         Added a missing @result to WKPreferences headerdoc
812         https://bugs.webkit.org/show_bug.cgi?id=133381
813
814         Reviewed by Dan Bernstein.
815
816         * UIProcess/API/Cocoa/WKPreferences.h:
817
818 2014-05-29  Alexey Proskuryakov  <ap@apple.com>
819
820         [Mac] Always use plug-in sandbox with sandboxed clients
821         https://bugs.webkit.org/show_bug.cgi?id=133358
822         <rdar://problem/15637695>
823
824         Reviewed by Anders Carlsson.
825
826         * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::initializeSandbox):
827         Refuse to start if parent process is sandboxed, and plug-in process is not going to be.
828         None of this should run in normal case, because there are also checks on UI process side.
829         
830         * Shared/Plugins/PluginModuleInfo.h:
831         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
832         (WebKit::NetscapePluginModule::getPluginInfo):
833         Added a member to PluginModuleInfo, telling whether the plug-in has a sandbox profile.
834
835         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
836         (WebKit::getPlatformPluginModuleInformation): Use the new PluginModuleInfo member,
837         we no longer need to check the file system here.
838
839         * WebKit2.xcodeproj/project.pbxproj:
840         * Shared/mac/SandboxUtilities.h: Added.
841         * Shared/mac/SandboxUtilities.cpp: Added. (WebKit::processIsSandboxed):
842         This code is simple, but include magic is not. Moved it to a separate file to
843         avoid repeating.
844
845         * UIProcess/API/C/mac/WKContextPrivateMac.mm: Removed an unused include.
846
847         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
848         (WebKit::PluginInfoStore::shouldUsePlugin): Don't use unsandboxed plug-ins in
849         sandboxed applications.
850
851         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
852         (WebKit::PluginProcessProxy::platformGetLaunchOptions): Don't ever pass disable-sandbox
853         from sandboxed processes.
854
855         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
856         (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
857         Use the new shared code in SandboxUtilities.h.
858
859 2014-05-29  Timothy Horton  <timothy_horton@apple.com>
860
861         Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
862         https://bugs.webkit.org/show_bug.cgi?id=133370
863         <rdar://problem/17061361>
864
865         Reviewed by Anders Carlsson.
866
867         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
868         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
869         Copy the set of refresh monitors so that we don't try to mutate the list we're iterating,
870         and don't try to fire refresh monitors that were removed in a previous iteration of the loop.
871
872 2014-05-29  Timothy Horton  <timothy_horton@apple.com>
873
874         REGRESSION (iOS WebKit2): Find-in-Page doesn't work in subframes
875         https://bugs.webkit.org/show_bug.cgi?id=133372
876         <rdar://problem/17045070>
877
878         Reviewed by Simon Fraser.
879
880         * WebProcess/WebPage/ios/FindControllerIOS.mm:
881         (WebKit::FindController::willFindString):
882         (WebKit::FindController::didFailToFindString):
883         (WebKit::FindController::didHideFindIndicator):
884         Flip ignoreCompositionSelectionChange and updateAppearanceEnabled on all
885         frames, not just the main frame, because the found string can be in a subframe.
886         Ideally we would flip it on/off for each frame as we move the selection between them,
887         but would require a lot of work (and the overhead of touching each frame shouldn't be significant).
888
889 2014-05-29  Dan Bernstein  <mitz@apple.com>
890
891         WKBundleActivateMacFontAscentHack is unused
892         https://bugs.webkit.org/show_bug.cgi?id=133379
893
894         Reviewed by Anders Carlsson.
895
896         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
897         (WKBundleActivateMacFontAscentHack): Deleted.
898         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
899         * WebProcess/InjectedBundle/InjectedBundle.h:
900         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
901         (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
902         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
903         (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
904         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
905         (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
906
907 2014-05-29  Alexey Proskuryakov  <ap@apple.com>
908
909         Add a sandbox profile for com.apple.appstore.CodeRedeemerNetscapePlugin
910         https://bugs.webkit.org/show_bug.cgi?id=133360
911
912         Reviewed by Sam Weinig.
913
914         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Looks like
915         anyone using camera would need access to CoreMedia preferences.
916
917         * Resources/PlugInSandboxProfiles/com.apple.appstore.CodeRedeemerNetscapePlugin.sb: Added.
918
919         * WebKit2.xcodeproj/project.pbxproj: Added the profile.
920
921 2014-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
922
923         [GTK] Add support for HiDPI icons
924         https://bugs.webkit.org/show_bug.cgi?id=133377
925
926         Reviewed by Martin Robinson.
927
928         * PlatformGTK.cmake: Compile also the @2x versions for the builtin icons.
929
930 2014-05-29  Owen Taylor  <otaylor@redhat.com>
931
932         [GTK] Add HighDPI support for non-accelerated compositing contents
933         https://bugs.webkit.org/show_bug.cgi?id=131562
934
935         Reviewed by Anders Carlsson.
936
937         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
938         (deviceScaleFactorChanged): Added this callback to pass scale changes to the page proxy.
939         (webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
940         * UIProcess/WebPageProxy.cpp:
941         * UIProcess/cairo/BackingStoreCairo.cpp:
942         (WebKit::WebPageProxy::setCustomDeviceScaleFactor): Do not set a
943         custom device scale factor for cairo when it's not supported.
944         (WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
945         (WebKit::BackingStore::incorporateUpdate): Ditto.
946
947 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
948
949         [GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
950         https://bugs.webkit.org/show_bug.cgi?id=130081
951
952         Reviewed by Martin Robinson.
953
954         * Platform/WorkQueue.h:
955         * Platform/gtk/WorkQueueGtk.cpp:
956         (WorkQueue::registerSocketEventHandler): Stop pretending it's
957         possible to register a socket event handler for more than one
958         descriptor.
959         (WorkQueue::unregisterSocketEventHandler):
960         (WorkQueue::dispatch):
961         (WorkQueue::dispatchAfter):
962         * Shared/Downloads/soup/DownloadSoup.cpp:
963         (WebKit::DownloadClient::DownloadClient):
964         (WebKit::DownloadClient::~DownloadClient):
965         (WebKit::DownloadClient::didReceiveData):
966         (WebKit::DownloadClient::handleResponse):
967         (WebKit::DownloadClient::handleResponseLater):
968         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
969         (WebKit::PluginInfoCache::PluginInfoCache):
970         (WebKit::PluginInfoCache::~PluginInfoCache):
971         (WebKit::PluginInfoCache::saveToFile):
972         (WebKit::PluginInfoCache::updatePluginInfo):
973         * UIProcess/Plugins/gtk/PluginInfoCache.h:
974         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
975         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
976         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
977         (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
978         (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
979         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
980
981 2014-05-28  Gavin Barraclough  <baraclough@apple.com>
982
983         viewStateDidChange should always fully update ViewState
984         https://bugs.webkit.org/show_bug.cgi?id=133159
985
986         Reviewed by Anders Carlson.
987
988         Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
989
990         This has the following negative consequences:
991          – WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
992          – Updates may unnecessarily be split over multiple IPC messages.
993          – In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls.
994
995         Better to just always update the entire ViewState.
996
997         * UIProcess/API/Cocoa/WKWebView.mm:
998         (-[WKWebView didMoveToWindow]):
999             - removed argument to viewStateDidChange.
1000         * UIProcess/API/gtk/PageClientImpl.cpp:
1001         (WebKit::PageClientImpl::viewState):
1002         (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1003         (WebKit::PageClientImpl::isViewFocused): Deleted.
1004         (WebKit::PageClientImpl::isViewVisible): Deleted.
1005         (WebKit::PageClientImpl::isViewInWindow): Deleted.
1006         * UIProcess/API/gtk/PageClientImpl.h:
1007             - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1008         * UIProcess/API/mac/WKView.mm:
1009         (-[WKView becomeFirstResponder]):
1010         (-[WKView resignFirstResponder]):
1011         (-[WKView viewDidMoveToWindow]):
1012         (-[WKView _windowDidBecomeKey:]):
1013         (-[WKView _windowDidResignKey:]):
1014         (-[WKView _windowDidMiniaturize:]):
1015         (-[WKView _windowDidDeminiaturize:]):
1016         (-[WKView _windowDidOrderOffScreen:]):
1017         (-[WKView _windowDidOrderOnScreen:]):
1018         (-[WKView _windowDidChangeOcclusionState:]):
1019         (-[WKView viewDidHide]):
1020         (-[WKView viewDidUnhide]):
1021         (-[WKView _activeSpaceDidChange:]):
1022         (-[WKView _setThumbnailView:]):
1023         (-[WKView endDeferringViewInWindowChanges]):
1024         (-[WKView endDeferringViewInWindowChangesSync]):
1025             - removed argument to viewStateDidChange.
1026         * UIProcess/CoordinatedGraphics/WebView.cpp:
1027         (WebKit::WebView::viewState):
1028         (WebKit::WebView::isViewWindowActive): Deleted.
1029         (WebKit::WebView::isViewFocused): Deleted.
1030         (WebKit::WebView::isViewVisible): Deleted.
1031         (WebKit::WebView::isViewInWindow): Deleted.
1032         * UIProcess/CoordinatedGraphics/WebView.h:
1033             - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1034         * UIProcess/PageClient.h:
1035         (WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
1036         (WebKit::PageClient::isVisuallyIdle): Deleted.
1037             - merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
1038         * UIProcess/WebPageProxy.cpp:
1039         (WebKit::WebPageProxy::WebPageProxy):
1040         (WebKit::WebPageProxy::reattachToWebProcess):
1041             - updateViewState -> PageClient::viewState
1042         (WebKit::WebPageProxy::viewStateDidChange):
1043             - argument removed; updateViewState -> PageClient::viewState.
1044         (WebKit::WebPageProxy::setCursor):
1045             - call isViewWindowActive on WebPageProxy, rather than PageClient.
1046         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
1047             - call isViewWindowActive on WebPageProxy, rather than PageClient.
1048         (WebKit::WebPageProxy::updateViewState): Deleted.
1049             - removed - viewState method moved to PageClient.
1050         * UIProcess/WebPageProxy.h:
1051         (WebKit::WebPageProxy::isViewWindowActive):
1052             - added missing implementation.
1053         (WebKit::WebPageProxy::isViewVisible):
1054             - removed argument to viewStateDidChange.
1055         * UIProcess/WebProcessProxy.cpp:
1056         (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
1057             - removed argument to viewStateDidChange.
1058         * UIProcess/ios/PageClientImplIOS.h:
1059         * UIProcess/ios/PageClientImplIOS.mm:
1060         (WebKit::PageClientImpl::viewState):
1061         (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1062         (WebKit::PageClientImpl::isViewFocused): Deleted.
1063         (WebKit::PageClientImpl::isViewVisible): Deleted.
1064         (WebKit::PageClientImpl::isViewInWindow): Deleted.
1065         (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
1066         (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
1067             - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1068         * UIProcess/ios/WKContentView.mm:
1069         (-[WKContentView didMoveToWindow]):
1070         (-[WKContentView _applicationDidEnterBackground:]):
1071         (-[WKContentView _applicationWillEnterForeground:]):
1072             - removed argument to viewStateDidChange.
1073         * UIProcess/mac/PageClientImpl.h:
1074         * UIProcess/mac/PageClientImpl.mm:
1075         (WebKit::PageClientImpl::viewState):
1076         (WebKit::PageClientImpl::showCorrectionPanel):
1077         (WebKit::PageClientImpl::showDictationAlternativeUI):
1078         (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1079         (WebKit::PageClientImpl::isViewFocused): Deleted.
1080         (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
1081         (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
1082             - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1083
1084 2014-05-28  Jeffrey Pfau  <jpfau@apple.com>
1085
1086         Add Obj-C API for cache partitioned URL schemes
1087         https://bugs.webkit.org/show_bug.cgi?id=133361
1088         <rdar://problem/17035415>
1089
1090         Reviewed by Anders Carlsson.
1091
1092         * UIProcess/API/Cocoa/WKProcessPool.mm:
1093         (-[WKProcessPool _initWithConfiguration:]):
1094         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
1095         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1096         (-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
1097         (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
1098         (-[_WKProcessPoolConfiguration copyWithZone:]):
1099
1100 2014-05-28  Sam Weinig  <sam@webkit.org>
1101
1102         [iOS WebKit2] Sometimes Safari gets into a limbo state after web process crash
1103         <rdar://problem/17029526>
1104         https://bugs.webkit.org/show_bug.cgi?id=133362
1105
1106         Reviewed by Dan Bernstein.
1107
1108         * UIProcess/WebPageProxy.cpp:
1109         (WebKit::WebPageProxy::WebPageProxy):
1110         Remove unnecessary initialization of a unique_ptr.
1111
1112         (WebKit::WebPageProxy::reattachToWebProcess):
1113         Move calls to update the view state and activity tokens to after we have swapped in the new process.
1114
1115         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1116         Clear the activity token on process exit.
1117
1118 2014-05-28  Timothy Horton  <timothy_horton@apple.com>
1119
1120         Add WKWebView SPI to forcefully kill the associated Web process
1121         https://bugs.webkit.org/show_bug.cgi?id=133357
1122
1123         Reviewed by Anders Carlsson.
1124
1125         * UIProcess/API/Cocoa/WKWebView.mm:
1126         (-[WKWebView _killWebContentProcess]):
1127         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1128
1129 2014-05-28  Dan Bernstein  <mitz@apple.com>
1130
1131         [Cocoa] Crash when trying to decode an instance of a class inheriting from WKObject
1132         https://bugs.webkit.org/show_bug.cgi?id=133355
1133
1134         Reviewed by Anders Carlsson.
1135
1136         * Shared/Cocoa/WKObject.mm:
1137         (-[WKObject classForCoder]): Override this NSObject method to forward to the
1138         target object.
1139         (-[WKObject classForKeyedArchiver]): Ditto.
1140
1141 2014-05-28  Simon Fraser  <simon.fraser@apple.com>
1142
1143         [iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
1144         https://bugs.webkit.org/show_bug.cgi?id=133352
1145
1146         Reviewed by Tim Horton.
1147
1148         Pass the correct delta down to descendant nodes.
1149
1150         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1151         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
1152
1153 2014-05-28  Andy Estes  <aestes@apple.com>
1154
1155         [iOS] REGRESSION (r168388): DidNotHandleTapAsClick not sent when commitPotentialTap() fails
1156         https://bugs.webkit.org/show_bug.cgi?id=133349
1157
1158         Reviewed by Benjamin Poulain.
1159
1160         WebPage::commitPotentialTap() fails when a recognized single tap cannot be sent as a synthetic click event.
1161         We should send WebPageProxy::DidNotHandleTapAsClick in these cases.
1162
1163         * WebProcess/WebPage/WebPage.h:
1164         * WebProcess/WebPage/ios/WebPageIOS.mm:
1165         (WebKit::WebPage::commitPotentialTap):
1166         (WebKit::WebPage::commitPotentialTapFailed):
1167
1168 2014-05-28  Commit Queue  <commit-queue@webkit.org>
1169
1170         Unreviewed, rolling out r169423.
1171         https://bugs.webkit.org/show_bug.cgi?id=133348
1172
1173         It makes a lot of tests crash in assert (Requested by KaL on
1174         #webkit).
1175
1176         Reverted changeset:
1177
1178         "[GTK] Use GMainLoopSource for idle and timeout sources in
1179         WebKit2"
1180         https://bugs.webkit.org/show_bug.cgi?id=130081
1181         http://trac.webkit.org/changeset/169423
1182
1183 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1184
1185         [GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
1186         https://bugs.webkit.org/show_bug.cgi?id=130081
1187
1188         Reviewed by Martin Robinson.
1189
1190         * Platform/WorkQueue.h:
1191         * Platform/gtk/WorkQueueGtk.cpp:
1192         (WorkQueue::registerSocketEventHandler): Stop pretending it's
1193         possible to register a socket event handler for more than one
1194         descriptor.
1195         (WorkQueue::unregisterSocketEventHandler):
1196         (WorkQueue::dispatch):
1197         (WorkQueue::dispatchAfter):
1198         * Shared/Downloads/soup/DownloadSoup.cpp:
1199         (WebKit::DownloadClient::DownloadClient):
1200         (WebKit::DownloadClient::~DownloadClient):
1201         (WebKit::DownloadClient::didReceiveData):
1202         (WebKit::DownloadClient::handleResponse):
1203         (WebKit::DownloadClient::handleResponseLater):
1204         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1205         (WebKit::PluginInfoCache::PluginInfoCache):
1206         (WebKit::PluginInfoCache::~PluginInfoCache):
1207         (WebKit::PluginInfoCache::saveToFile):
1208         (WebKit::PluginInfoCache::updatePluginInfo):
1209         * UIProcess/Plugins/gtk/PluginInfoCache.h:
1210         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1211         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
1212         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
1213         (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
1214         (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
1215         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1216
1217 2014-05-28  Dan Bernstein  <mitz@apple.com>
1218
1219         [Cocoa] Can't use bundle-defined classes for bundle parameters
1220         https://bugs.webkit.org/show_bug.cgi?id=133339
1221
1222         Reviewed by Anders Carlsson.
1223
1224         Ensure that bundle parameters are decoded only after the injected bundle is loaded.
1225
1226         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1227         (WebKit::InjectedBundle::create): Moved the definition from the header to here, added the
1228         lagacy initializationUserData as a parameter, and made this function set the sandbox
1229         extension and load the bundle.
1230         (WebKit::InjectedBundle::InjectedBundle): Removed call to platformInitialize.
1231         * WebProcess/InjectedBundle/InjectedBundle.h:
1232         (WebKit::InjectedBundle::setSandboxExtension): Deleted.
1233         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1234         (WebKit::InjectedBundle::initialize): Renamed the load function to this, and added the
1235         creation parameters as a parameter. Moved code to initialize the bundle paramters from
1236         platformInitialize to here. Changed the class passed to -decodeObjectOfClass:forKey: to
1237         NSObject, to allow arbitrary types in the values, and added an assertion that the
1238         top-level object is a dictionary.
1239         (WebKit::InjectedBundle::platformInitialize): Deleted.
1240         * WebProcess/WebProcess.cpp:
1241         (WebKit::WebProcess::initializeWebProcess): Changed to pass the legacy initialization user
1242         data to InjectedBundle::create() and removed code to separately set the sandbox extension
1243         and load the bundle, which is now done by create().
1244
1245 2014-05-28  Alberto Garcia  <berto@igalia.com>
1246
1247         Unreviewed. Fix warning: unused parameter 'frame'
1248
1249         * WebProcess/WebPage/WebPage.cpp:
1250         (WebKit::WebPage::didFinishDocumentLoad):
1251
1252 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
1253
1254         [iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
1255         https://bugs.webkit.org/show_bug.cgi?id=133334
1256         <rdar://problem/16462535>
1257
1258         Reviewed by Tim Horton.
1259
1260         When the scroll position changes in an accelerated overflow-scroll element, we have
1261         to update child nodes in the scrolling tree for position:sticky. That requires a
1262         more generic ability to update the scrolling tree after some arbitrary zoom or
1263         scroll. To do this, we need to know the current fixed position rect, rather than
1264         having it passed in.
1265         
1266         So make the fixed position rect available from ScrollingTree, and make it possible
1267         to get the current scrollPosition() from any ScrollingTreeScrollingNode.
1268         
1269         Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
1270         and have it update descendant layers.
1271         
1272         Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
1273         constraints math, using the scroll position of the parent node if appropriate.
1274
1275         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1276         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1277         (WebKit::RemoteScrollingTree::fixedPositionRect):
1278         * UIProcess/Scrolling/RemoteScrollingTree.h:
1279         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1280         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1281         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterDelegatedScroll):
1282         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
1283         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1284         (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
1285
1286 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
1287
1288         Do some renaming in the scrolling tree
1289         https://bugs.webkit.org/show_bug.cgi?id=133333
1290
1291         Reviewed by Tim Horton.
1292         
1293         Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
1294         since this goes deep and to indicate that it's about layer updating.
1295         
1296         Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
1297         this is the custom fixed-position rect that changes on zooming.
1298
1299         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1300         (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
1301         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1302         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1303         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
1304
1305 2014-05-27  Geoffrey Garen  <ggaren@apple.com>
1306
1307         Some proof-reading of the WebKit2 API headerdoc
1308         https://bugs.webkit.org/show_bug.cgi?id=133328
1309
1310         Reviewed by Anders Carlsson.
1311
1312         Consistently say "item" to reference back-forward list items.
1313
1314         Consistently say "webpage" instead of "page" or "web page".
1315
1316         Consistently say "navigation" instead of "load".
1317
1318         Plus a few fix-ups for run-on sentences, mismatched verb tense, and
1319         mismatched singular vs plural.
1320
1321         * UIProcess/API/Cocoa/WKBackForwardList.h:
1322         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
1323         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
1324         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
1325         * UIProcess/API/Cocoa/WKFrameInfo.h:
1326         * UIProcess/API/Cocoa/WKNavigation.h:
1327         * UIProcess/API/Cocoa/WKNavigationAction.h:
1328         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1329         * UIProcess/API/Cocoa/WKProcessPool.h:
1330         * UIProcess/API/Cocoa/WKUIDelegate.h:
1331         * UIProcess/API/Cocoa/WKWebView.h:
1332
1333 2014-05-27  Timothy Horton  <timothy_horton@apple.com>
1334
1335         [wk2] PDFPlugin snapshots are misplaced
1336         https://bugs.webkit.org/show_bug.cgi?id=133323
1337
1338         Reviewed by Simon Fraser.
1339
1340         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1341         (WebKit::PDFPlugin::paintControlForLayerInContext):
1342         (WebKit::PDFPlugin::snapshot):
1343         Include the scroll offset in the snapshot translation,
1344         and use the whole document size instead of just the view size.
1345
1346 2014-05-27  Sam Weinig  <sam@webkit.org>
1347
1348         [WebKit2] Move WebPreferences macro definitions and key names into their own files
1349         https://bugs.webkit.org/show_bug.cgi?id=133315
1350
1351         Reviewed by Anders Carlsson.
1352
1353         * CMakeLists.txt:
1354         * Shared/WebPreferencesDefinitions.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
1355         * Shared/WebPreferencesKeys.cpp: Copied from Source/WebKit2/Shared/WebPreferencesStore.cpp.
1356         * Shared/WebPreferencesKeys.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
1357         * Shared/WebPreferencesStore.cpp:
1358         * Shared/WebPreferencesStore.h:
1359         * UIProcess/WebPreferences.cpp:
1360         * UIProcess/WebPreferences.h:
1361         * UIProcess/mac/WebContextMac.mm:
1362         * UIProcess/mac/WebPreferencesMac.mm:
1363         * UIProcess/mac/WebProcessProxyMac.mm:
1364         * WebKit2.xcodeproj/project.pbxproj:
1365         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1366         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1367         * WebProcess/WebPage/WebPage.cpp:
1368         * WebProcess/WebProcess.cpp:
1369
1370 2014-05-27  Gavin Barraclough  <baraclough@apple.com>
1371
1372         Add UI process watchdog on iOS to ensure WebProcess connections close
1373         https://bugs.webkit.org/show_bug.cgi?id=133200
1374         <rdar://problem/16997983>
1375
1376         Mountain Lion build fix
1377
1378         * Platform/IPC/mac/ConnectionMac.mm:
1379         (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
1380
1381 2014-05-27  Gavin Barraclough  <baraclough@apple.com>
1382
1383         importance_assertion -> denap_assertion
1384         https://bugs.webkit.org/show_bug.cgi?id=133294
1385
1386         iOS build fix
1387
1388         * Platform/IPC/mac/ConnectionMac.mm:
1389         (IPC::Connection::open):
1390
1391 2014-05-27  Gavin Barraclough  <baraclough@apple.com>
1392
1393         Add UI process watchdog on iOS to ensure WebProcess connections close
1394         https://bugs.webkit.org/show_bug.cgi?id=133200
1395         <rdar://problem/16997983>
1396
1397         Reviewed by Darin Adler.
1398
1399         When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
1400         and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
1401         happens.
1402
1403         On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
1404         the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
1405
1406         * Platform/IPC/Connection.h:
1407             - added terminateSoon.
1408         * Platform/IPC/mac/ConnectionMac.mm:
1409         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
1410             - take an assertion to make the process runnable, and start a watchdog timer.
1411         (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
1412             - if the process hasn't quit by the timer the watchdog fires, kill it.
1413         (IPC::Connection::terminateSoon):
1414             - create a ConnectionTerminationWatchdog.
1415         * UIProcess/WebProcessProxy.cpp:
1416         (WebKit::WebProcessProxy::removeWebPage):
1417             - when disconnecting from a process, first tell it to terminateSoon.
1418
1419 2014-05-26  Gavin Barraclough  <barraclough@apple.com>
1420
1421         importance_assertion -> denap_assertion
1422         https://bugs.webkit.org/show_bug.cgi?id=133294
1423
1424         Reviewed by Sam Weinig.
1425
1426         Update in accordance with API change. The importance assertion is used on
1427         Mavericks & newer to ensure the WebContent process wakes from AppNap.
1428
1429         * Platform/IPC/mac/ConnectionMac.mm:
1430         (IPC::Connection::open):
1431             - MACH_PORT_IMPORTANCE_RECEIVER -> MACH_PORT_DENAP_RECEIVER
1432         * Platform/IPC/mac/ImportanceAssertion.h:
1433         (IPC::ImportanceAssertion::ImportanceAssertion):
1434         (IPC::ImportanceAssertion::~ImportanceAssertion):
1435             - proc_importance_assertion -> proc_denap_assertion
1436
1437 2014-05-27  Jessie Berlin  <jberlin@apple.com>
1438
1439         Revert r169362 since it broke the ML build.
1440
1441         * Platform/IPC/Connection.h:
1442         * Platform/IPC/mac/ConnectionMac.mm:
1443         (IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog): Deleted.
1444         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): Deleted.
1445         (IPC::ConnectionTerminationWatchdog::watchdogTimerFired): Deleted.
1446         (IPC::Connection::terminateSoon): Deleted.
1447         * UIProcess/WebProcessProxy.cpp:
1448         (WebKit::WebProcessProxy::removeWebPage):
1449
1450 2014-05-27  Jon Lee  <jonlee@apple.com>
1451
1452         Update ENABLE(MEDIA_SOURCE) on Mac
1453         https://bugs.webkit.org/show_bug.cgi?id=133141
1454
1455         Reviewed by Darin Adler.
1456
1457         * Configurations/FeatureDefines.xcconfig:
1458
1459 2014-05-27  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
1460
1461         Remove BLOB guards
1462         https://bugs.webkit.org/show_bug.cgi?id=132863
1463
1464         Reviewed by Csaba Osztrogonác.
1465
1466         * Configurations/FeatureDefines.xcconfig:
1467         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1468         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1469         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1470         (WebKit::NetworkConnectionToWebProcess::didClose):
1471         (WebKit::NetworkConnectionToWebProcess::blobSize):
1472         * NetworkProcess/NetworkConnectionToWebProcess.h:
1473         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1474         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
1475         * NetworkProcess/NetworkProcessPlatformStrategies.h:
1476         * NetworkProcess/NetworkResourceLoader.cpp:
1477         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1478         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
1479         * WebProcess/FileAPI/BlobRegistryProxy.h:
1480         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1481         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1482         * WebProcess/WebPage/WebPage.cpp:
1483         (WebKit::WebPage::canHandleRequest):
1484
1485 2014-05-26  Tim Horton  <timothy_horton@apple.com>
1486
1487         [wk2] RemoteLayerBackingStore front buffers should be purgeable when unparented
1488         https://bugs.webkit.org/show_bug.cgi?id=133020
1489         <rdar://problem/16521736>
1490
1491         Reviewed by Simon Fraser.
1492
1493         * Shared/mac/RemoteLayerBackingStore.mm:
1494         (WebKit::RemoteLayerBackingStore::display):
1495         Let the context know whenever a RemoteLayerBackingStore is displayed, so that
1496         RemoteLayerBackingStoreCollection can (if needed) note that the backing store
1497         is active once again (because we only display parented backing store).
1498
1499         (WebKit::RemoteLayerBackingStore::setBufferVolatility):
1500         Ensure that we never have live contexts attached to any buffers when
1501         marking them volatile, because checking isInUse() with live contexts is futile.
1502
1503         * Shared/mac/RemoteLayerBackingStoreCollection.h:
1504         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1505         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1506         (WebKit::RemoteLayerBackingStoreCollection::willFlushLayers):
1507         (WebKit::RemoteLayerBackingStoreCollection::willCommitLayerTree):
1508         (WebKit::RemoteLayerBackingStoreCollection::didFlushLayers):
1509         (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDestroyed):
1510         (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed):
1511         (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately):
1512         (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
1513         (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable):
1514         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
1515         (WebKit::RemoteLayerBackingStoreCollection::scheduleVolatilityTimer):
1516         (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired): Deleted.
1517         (WebKit::RemoteLayerBackingStoreCollection::schedulePurgeabilityTimer): Deleted.
1518         Rename purgeable->volatile for accuracy.
1519         Keep track of two sets of backing store: those which are active/parented, and
1520         those which are not. Backing store is moved to the inactive set after building
1521         the transaction in which its owning layer is unparented.
1522         When backing store is unparented, try to mark it volatile immediately. Also,
1523         mark the backing store property as dirty on the owning layer so that when
1524         said layer is reparented, we encode the backing store in the commit that reparents it,
1525         as the UI process will throw away its reference to the backing store when
1526         the layer is unparented. Mark the front buffers of unparented layers as volatile,
1527         in addition to the others.
1528
1529         * Shared/mac/RemoteLayerTreeTransaction.h:
1530         (WebKit::RemoteLayerTreeTransaction::layerIDsWithNewlyUnreachableBackingStore):
1531         * Shared/mac/RemoteLayerTreeTransaction.mm:
1532         (WebKit::RemoteLayerTreeTransaction::encode):
1533         (WebKit::RemoteLayerTreeTransaction::decode):
1534         (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore):
1535         Include the list of layers (by ID) with backing store which just became unreachable in the transaction.
1536
1537         * UIProcess/mac/RemoteLayerTreeHost.mm:
1538         (WebKit::RemoteLayerTreeHost::updateLayerTree):
1539         Clear the contents of layers which now have unreachable backing store.
1540         Otherwise, the UI process would hold a 'use' on the IOSurface, and prevent
1541         the Web process from marking it volatile.
1542
1543         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1544         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1545         (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
1546         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1547         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1548         Give RemoteLayerBackingStoreCollection a shot at the RemoteLayerTreeTransaction,
1549         so that it can fill in layerIDsWithNewlyUnreachableBackingStore.
1550         Also, let it know when the flush begins and ends, so that it can keep track
1551         of which layers were reached in the flush.
1552
1553 2014-05-26  Shivakumar JM  <shiva.jm@samsung.com>
1554
1555         [EFL][WK2] Fix EWK2BackForwardListTest test fails.
1556         https://bugs.webkit.org/show_bug.cgi?id=133171
1557
1558         Reviewed by Gyuyoung Kim.
1559
1560         Use local test html pages instead of EWK2UnitTestServer, call ewk_view_url_set() to load test html pages.
1561         Since even after setting no_proxy="localhost,127.0.0.1", still test server was unable to load the test 
1562         html pages for ewk2_back_forward_list tests, so changed to use local html pages.
1563
1564         * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
1565         (TEST_F):
1566
1567 2014-05-26  Shivakumar JM  <shiva.jm@samsung.com>
1568
1569         [EFL][WK2] Fix code style check errors in EFL API tests.
1570         https://bugs.webkit.org/show_bug.cgi?id=133170
1571
1572         Reviewed by Gyuyoung Kim.
1573
1574         Omit int when using unsigned modifier, as per coding style rules.
1575
1576         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1577         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
1578         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
1579         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultWidth):
1580         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultHeight):
1581
1582 2014-05-22  Gavin Barraclough  <baraclough@apple.com>
1583
1584         Add UI process watchdog on iOS to ensure WebProcess connections close
1585         https://bugs.webkit.org/show_bug.cgi?id=133200
1586         <rdar://problem/16997983>
1587
1588         Reviewed by Darin Adler.
1589
1590         When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
1591         and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
1592         happens.
1593
1594         On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
1595         the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
1596
1597         * Platform/IPC/Connection.h:
1598             - added terminateSoon.
1599         * Platform/IPC/mac/ConnectionMac.mm:
1600         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
1601             - take an assertion to make the process runnable, and start a watchdog timer.
1602         (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
1603             - if the process hasn't quit by the timer the watchdog fires, kill it.
1604         (IPC::Connection::terminateSoon):
1605             - create a ConnectionTerminationWatchdog.
1606         * UIProcess/WebProcessProxy.cpp:
1607         (WebKit::WebProcessProxy::removeWebPage):
1608             - when disconnecting from a process, first tell it to terminateSoon.
1609
1610 2014-05-26  Sam Weinig  <sam@webkit.org>
1611
1612         [WebKit2] Add better default preferences while keeping backward compatibility for the C-SPI
1613         https://bugs.webkit.org/show_bug.cgi?id=133289
1614
1615         Reviewed by Anders Carlsson.
1616
1617         * Shared/WebPreferencesStore.h:
1618         Change a few defaults:
1619         - PluginsEnabled -> false
1620         - JavaEnabled -> false
1621         - JavaEnabledForLocalFiles -> false
1622         - StorageBlockingPolicy -> BlockThirdPartyStorage
1623
1624         * UIProcess/API/C/WKPreferences.cpp:
1625         (WKPreferencesCreate):
1626         (WKPreferencesCreateWithIdentifier):
1627         * UIProcess/WebPageGroup.cpp:
1628         (WebKit::WebPageGroup::WebPageGroup):
1629         Switch to using WebPreferences::createWithLegacyDefaults().
1630
1631         * UIProcess/WebPreferences.cpp:
1632         (WebKit::WebPreferences::create):
1633         (WebKit::WebPreferences::createWithLegacyDefaults):
1634         * UIProcess/WebPreferences.h:
1635         Move create functions to the cpp file and add createWithLegacyDefaults() which keeps
1636         the old defaults;
1637
1638         * UIProcess/API/C/WKPreferencesRef.h:
1639         Fix the comment.
1640
1641         * UIProcess/API/Cocoa/WKPreferences.h:
1642         Update the comment to reflect the new defaults.
1643
1644         * WebProcess/WebPage/WebPage.cpp:
1645         (WebKit::WebPage::updatePreferences):
1646         Unconditionally set setShouldDispatchJavaScriptWindowOnErrorEvents() to true. This setting only
1647         exists for legacy WebKit.
1648
1649 2014-05-26  Dan Bernstein  <mitz@apple.com>
1650
1651         [Cocoa] Rewrite WK_DESIGNATED_INITIALIZER in installed headers
1652         https://bugs.webkit.org/show_bug.cgi?id=133290
1653
1654         Reviewed by Anders Carlsson.
1655
1656         * Shared/API/Cocoa/WKFoundation.h: When WK_API_AVAILABILITY_ENABLED is defined, don’t
1657         provide definitions of WK_DESIGNATED_INITIALIZER and WK_UNAVAILABLE, since those macros will
1658         be rewritten out of the headers. When WK_API_AVAILABILITY_ENABLED isn’t defined, provide
1659         definitions of the other two macros as appropriate for the target OS.
1660         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Removed WK_DESIGNATED_INITIALIZER from a
1661         category method declaration.
1662         * UIProcess/API/Cocoa/WKWebView.h: Mark the superclass designated initializer
1663         -initWithCoder: as unavailable.
1664         * UIProcess/API/Cocoa/WKWebView.mm:
1665         (-[WKWebView initWithCoder:]): Override this designated initializer of the superclass by
1666         returning nil.
1667         * mac/rewrite-availability-macros.sh: Rewrite WK_DESIGNATED_INITIALIZER to
1668         NS_DESIGNATED_INITIALIZER and WK_UNAVAILABLE to NS_UNAVAILABLE. Also make sure to process
1669         all headers if the script has changed since the last time it was run.
1670
1671 2014-05-26  Commit Queue  <commit-queue@webkit.org>
1672
1673         Unreviewed, rolling out r169122.
1674         https://bugs.webkit.org/show_bug.cgi?id=133288
1675
1676         Broke CJK font fallback (Requested by ap on #webkit).
1677
1678         Reverted changeset:
1679
1680         "[Mac] WebProcess doesn't follow localization of UI process
1681         when run as a service"
1682         https://bugs.webkit.org/show_bug.cgi?id=133126
1683         http://trac.webkit.org/changeset/169122
1684
1685 2014-05-26  Anders Carlsson  <andersca@apple.com>
1686
1687         Convert a couple of loops over to range-based for
1688         https://bugs.webkit.org/show_bug.cgi?id=133287
1689
1690         Reviewed by Simon Fraser.
1691
1692         * UIProcess/Plugins/PluginInfoStore.cpp:
1693         (WebKit::PluginInfoStore::findPluginForMIMEType):
1694         (WebKit::PluginInfoStore::findPluginForExtension):
1695         (WebKit::PluginInfoStore::infoForPluginWithPath):
1696         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
1697         (WebKit::PluginProcessManager::setProcessSuppressionEnabled):
1698
1699 2014-05-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1700
1701         [GTK] WebProcess leaked when closing pages with network process enabled
1702         https://bugs.webkit.org/show_bug.cgi?id=129684
1703
1704         Reviewed by Anders Carlsson.
1705
1706         The problem is that the web process is not notified when the UI
1707         process closes the connection, because when close() is called on
1708         the socket by the UI process, the socket is shared by another web
1709         process launched later, preventing the connection from being
1710         shut down. We need to set the CLOEXEC flag on the sockets file
1711         descriptor to make sure they are not exposed to other processes.
1712
1713         * Platform/IPC/Connection.h: Add ConnectionOptions parameter to
1714         createPlatformConnection() with a default value compatible with
1715         existing callers.
1716         * Platform/IPC/unix/ConnectionUnix.cpp:
1717         (IPC::Connection::createPlatformConnection): Set the CLOEXEC flag
1718         on the client and server socket file descriptors depending on the
1719         options passed.
1720         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1721         (WebKit::ProcessLauncher::launchProcess): Use
1722         IPC::Connection::createPlatformConnection() instead of
1723         socketpair() directly, setting the CLOEXEC flag on the server
1724         before spawning the new process and on the client right after
1725         spawning the new process.
1726
1727 2014-05-25  Anders Carlsson  <andersca@apple.com>
1728
1729         Initialize WKWebViewConfiguration ivars lazily
1730         https://bugs.webkit.org/show_bug.cgi?id=133270
1731         <rdar://problem/17027606>
1732
1733         Reviewed by Sam Weinig.
1734
1735         Create a LazyInitialized class template and use it to lazily initialize WKWebViewConfiguration properties.
1736
1737         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1738         (LazyInitialized::get):
1739         Initialize m_value with the given function if it hasn't been initialized already.
1740
1741         (LazyInitialized::set):
1742         Update m_value and set m_isInitialized to true.
1743
1744         (LazyInitialized::peek):
1745         Return m_value without initializing it.
1746
1747         (-[WKWebViewConfiguration description]):
1748         Use getters so we'll initialize variables if needed.
1749
1750         (-[WKWebViewConfiguration copyWithZone:]):
1751         Ditto.
1752
1753         (-[WKWebViewConfiguration processPool]):
1754         (-[WKWebViewConfiguration setProcessPool:]):
1755         (-[WKWebViewConfiguration preferences]):
1756         (-[WKWebViewConfiguration setPreferences:]):
1757         (-[WKWebViewConfiguration userContentController]):
1758         (-[WKWebViewConfiguration setUserContentController:]):
1759         (-[WKWebViewConfiguration _visitedLinkProvider]):
1760         (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
1761         (-[WKWebViewConfiguration _websiteDataStore]):
1762         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
1763         (-[WKWebViewConfiguration _contentProviderRegistry]):
1764         (-[WKWebViewConfiguration _setContentProviderRegistry:]):
1765         Pass initialization code to all getters.
1766
1767         (-[WKWebViewConfiguration _validate]):
1768         Use getters.
1769
1770         (-[WKWebViewConfiguration init]): Deleted.
1771
1772 2014-05-26  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1773
1774         Remove WebKit2 framework from generate-forwarding-headers.pl
1775         https://bugs.webkit.org/show_bug.cgi?id=133214
1776
1777         Since renaming WebKit2.framework to WebKit.framework is done and all WebKit2/*.h includes
1778         were renamed to WebKit/*.h, generating forwarding headers for WebKit2/*.h framework style
1779         headers is not necessary anymore.
1780
1781         Reviewed by Darin Adler.
1782
1783         * Scripts/generate-forwarding-headers.pl:
1784
1785 2014-05-26  Zan Dobersek  <zdobersek@igalia.com>
1786
1787         WebPage::setComposition(), WebPageProxy::didFindStringMatches() should take Vector parameters by const reference
1788         https://bugs.webkit.org/show_bug.cgi?id=133264
1789
1790         Reviewed by Darin Adler.
1791
1792         Taking the Vector parameters in the two methods (invoked through the IPC message handling)
1793         by value causes unnecessary copies. The methods don't modify the objects and don't want
1794         or need fresh copies, hence they should take in const references to Vector objects.
1795
1796         * UIProcess/WebPageProxy.cpp:
1797         (WebKit::WebPageProxy::didFindStringMatches):
1798         * UIProcess/WebPageProxy.h:
1799         * WebProcess/WebPage/WebPage.cpp:
1800         (WebKit::WebPage::setComposition):
1801         * WebProcess/WebPage/WebPage.h:
1802
1803 2014-05-25  Benjamin Poulain  <benjamin@webkit.org>
1804
1805         [iOS][WK2] Fix some state reset on crash on the WKWebView
1806         https://bugs.webkit.org/show_bug.cgi?id=133039
1807
1808         Reviewed by Sam Weinig.
1809
1810         This is in no way complete, but this should reduce the undefined states on crash.
1811
1812         * UIProcess/API/Cocoa/WKWebView.mm:
1813         (-[WKWebView _processDidExit]):
1814         If the view is animating, nuke the resize animation. That should be invisible to the user
1815         because the background color is reset to white below.
1816
1817         Reset the contentView frame and scrollview state.
1818
1819         Reset the runtime states. We do not strictly need to reset _needsResetViewStateAfterCommitLoadForMainFrame,
1820         _delayUpdateVisibleContentRects and _hadDelayedUpdateVisibleContentRects but it seems better to have
1821         a clean slate.
1822
1823         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1824         (-[WKWebView _endAnimatedResize]):
1825         We could have crashes during rotation. To simplify the reset code, the animated resize code
1826         no longer change any state when WKWebView is using a custom content view.
1827
1828         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1829         * UIProcess/ios/PageClientImplIOS.mm:
1830         (WebKit::PageClientImpl::processDidExit):
1831         Send a _processDidExit on the WKWebView too.
1832
1833 2014-05-25  Anders Carlsson  <andersca@apple.com>
1834
1835         Use the right paths for website data
1836         https://bugs.webkit.org/show_bug.cgi?id=133267
1837         <rdar://problem/17027698>
1838
1839         Reviewed by Sam Weinig.
1840
1841         * UIProcess/API/Cocoa/WKProcessPool.mm:
1842         (-[WKProcessPool _initWithConfiguration:]):
1843         Get the path of the absolute URL.
1844
1845         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1846         (WebKit::LocalStorageDatabaseTracker::databasePath):
1847         Fix spelling error.
1848
1849         * WebProcess/Network/NetworkProcessConnection.cpp:
1850         (WebKit::NetworkProcessConnection::didCacheResource):
1851         Ditto.
1852
1853 2014-05-25  Benjamin Poulain  <bpoulain@apple.com>
1854
1855         [iOS][WK2] Use ScrollView's scrollOffset as the unobscuredContentRect
1856         https://bugs.webkit.org/show_bug.cgi?id=133262
1857
1858         Reviewed by Simon Fraser.
1859
1860         * WebProcess/WebPage/ios/WebPageIOS.mm:
1861         (WebKit::WebPage::dynamicViewportSizeUpdate):
1862         (WebKit::WebPage::viewportConfigurationChanged):
1863         (WebKit::WebPage::updateVisibleContentRects):
1864
1865 2014-05-25  Sam Weinig  <sam@webkit.org>
1866
1867         Build fix 2.
1868
1869         * UIProcess/API/Cocoa/WKPreferences.h:
1870
1871 2014-05-25  Sam Weinig  <sam@webkit.org>
1872
1873         Fix build.
1874
1875         * UIProcess/API/Cocoa/WKPreferences.h:
1876
1877 2014-05-24  Sam Weinig  <sam@webkit.org>
1878
1879         [WebKit2] Rework WebPreferencesStore to allow easier overriding of defaults
1880         https://bugs.webkit.org/show_bug.cgi?id=133258
1881
1882         Reviewed by Anders Carlsson.
1883
1884         To support changing default values of preferences based on which API you are using (either
1885         the legacy C-SPI or the Objective-C API), overhaul the WebPreferencesStore to use a single
1886         HashMap of String -> Value (where Value is new type that can be a String, bool, uint32_t or double)
1887         instead of four HashMaps.  This allows us to use two of these new HashMaps, one for the actual
1888         set values, and one for overridden defaults. This new Value class will also allow easier incremental
1889         updating of preferences in the future.
1890         
1891         Other notable changes:
1892         - Removed Float kind of preferences. There were none.
1893         - Move StorageBlockingPolicy preference to the correct group, it's a uint32_t, not bool.
1894
1895         * Shared/WebPreferencesStore.cpp:
1896         * Shared/WebPreferencesStore.h:
1897
1898 2014-05-25  David Kilzer  <ddkilzer@apple.com>
1899
1900         Add type-checked casts for TransformOperations
1901         <http://webkit.org/b/133217>
1902
1903         Reviewed by Simon Fraser.
1904
1905         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1906         (IPC::ArgumentCoder<TransformOperations>::encode):
1907         - Switch to type-checked casts.
1908
1909 2014-05-25  David Kilzer  <ddkilzer@apple.com>
1910
1911         Use type-checking FilterOperation casts in CoordinatedGraphicsArgumentCoders.cpp
1912         <http://webkit.org/b/133203>
1913
1914         Reviewed by Simon Fraser.
1915
1916         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1917         (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
1918         - Replace static_cast<>() operators with type-checking
1919           FilterOperation casts.
1920         - Replace 'default' statement with 'case' statements so new
1921           filters added later require an explicit decision to be made.
1922         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
1923         - Replace 'default' statement with 'case' statements so new
1924           filters added later require an explicit decision to be made.
1925
1926 2014-05-24  Jon Honeycutt  <jhoneycutt@apple.com>
1927
1928         Potential null dereference in
1929         WebFrameLoaderClient::dispatchDidFailProvisionalLoad()
1930         <https://bugs.webkit.org/show_bug.cgi?id=133193>
1931
1932         WebFrameLoaderClient::dispatchDidFailProvisionalLoad() calls the
1933         InjectedBundleLoaderClient's didFailProvisionalLoadWithErrorForFrame()
1934         before sending a message to the UI process that a provisional load has
1935         failed. It's possible for the provisional document loader to become
1936         null while calling into the InjectedBundleLoaderClient (as is the case
1937         with the WebKitTestRunner's injected bundle), leading to a null
1938         dereference when trying to send the DidFailProvisionalLoadForFrame
1939         message.
1940
1941         Reviewed by Darin Adler.
1942
1943         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1944         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1945         Get the navigation ID before calling into the injected bundle.
1946
1947 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
1948
1949         Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
1950         https://bugs.webkit.org/show_bug.cgi?id=133254
1951
1952         Reviewed by Tim Horton.
1953         
1954         Override scrollPosition() on ScrollingTreeOverflowScrollingNodeIOS.
1955
1956         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1957         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1958         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollPosition):
1959
1960 2014-05-24  Chris Fleizach  <cfleizach@apple.com>
1961
1962         AX: fix coordinate mapping for iOS accessibility
1963         https://bugs.webkit.org/show_bug.cgi?id=133188
1964
1965         Reviewed by Sam Weinig.
1966
1967         Add in accessibility conversion methods that will check if the methods are present 
1968         (if accessibility is not on, they won't be)
1969         and use those to convert points into the right coordinate space that VoiceOver is expecting.
1970
1971         * UIProcess/PageClient.h:
1972         * UIProcess/WebPageProxy.cpp:
1973         (WebKit::WebPageProxy::accessibilityScreenToRootView):
1974         (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
1975         * UIProcess/WebPageProxy.h:
1976         * UIProcess/WebPageProxy.messages.in:
1977         * UIProcess/ios/PageClientImplIOS.h:
1978         * UIProcess/ios/PageClientImplIOS.mm:
1979         (WebKit::PageClientImpl::accessibilityScreenToRootView):
1980         (WebKit::PageClientImpl::rootViewToAccessibilityScreen):
1981         * UIProcess/mac/PageClientImpl.h:
1982         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1983         (WebKit::WebChromeClient::accessibilityScreenToRootView):
1984         (WebKit::WebChromeClient::rootViewToAccessibilityScreen):
1985         * WebProcess/WebCoreSupport/WebChromeClient.h:
1986         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
1987         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1988         * WebProcess/WebPage/WebPage.cpp:
1989         (WebKit::WebPage::accessibilityScreenToRootView):
1990         (WebKit::WebPage::rootViewToAccessibilityScreen):
1991         * WebProcess/WebPage/WebPage.h:
1992
1993 2014-05-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1994
1995         REGRESSION(r165841): Messages sent before the child process is launched are never sent after r165841
1996         https://bugs.webkit.org/show_bug.cgi?id=131675
1997
1998         Reviewed by Anders Carlsson.
1999
2000         Since r165841 the connection is opened after the pending messages
2001         are sent, because connectionWillOpen might send messages that we
2002         want to happen after the ones already pending. The problem is that
2003         Connection::canSendOutgoingMessages() returns false when
2004         connection hasn't been opened. We should ensure no messages are
2005         sent by connectionWillOpen.
2006
2007         * Shared/ChildProcessProxy.cpp:
2008         (WebKit::ChildProcessProxy::didFinishLaunching): Open the
2009         connection before sending pending messages.
2010         * UIProcess/WebPageProxy.cpp:
2011         (WebKit::WebPageProxy::connectionWillOpen): Do not call
2012         VisitedLinkProvider::addProcess() here because it tries to send a
2013         message to the web process, but the connection hasn't be opened yet.
2014         (WebKit::WebPageProxy::processDidFinishLaunching): Call
2015         VisitedLinkProvider::addProcess() here instead.
2016         * UIProcess/WebPageProxy.h:
2017         * UIProcess/WebProcessProxy.cpp:
2018         (WebKit::WebProcessProxy::didFinishLaunching): Call
2019         WebPageProxy::processDidFinishLaunching() for every web page.
2020
2021 2014-05-23  Ian Henderson  <ianh@apple.com>
2022
2023         REGRESSION: Rubberbanding out jumps to top left corner on google.com
2024         https://bugs.webkit.org/show_bug.cgi?id=133253
2025         <rdar://problem/17025664>
2026
2027         Reviewed by Benjamin Poulain.
2028
2029         * UIProcess/API/Cocoa/WKWebView.mm:
2030         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
2031         Avoid deceleration during zooming to work around a UIKit bug.
2032
2033 2014-05-23  Benjamin Poulain  <bpoulain@apple.com>
2034
2035         [iOS][WK2] Avoid updating the view from the viewport configuration unnecessarily
2036         https://bugs.webkit.org/show_bug.cgi?id=133255
2037         <rdar://problem/16890926>
2038
2039         Reviewed by Simon Fraser.
2040
2041         All the updates were mostly harmless since they are pretty cheap, but they can be
2042         very annoying for debugging.
2043
2044         This patch skips viewportUpdates in the trivial cases.
2045
2046         * UIProcess/API/Cocoa/WKWebView.mm:
2047         (-[WKWebView _setMinimumLayoutSizeOverride:]):
2048         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2049         * WebProcess/WebPage/WebPage.cpp:
2050         (WebKit::WebPage::mainFrameDidLayout):
2051         * WebProcess/WebPage/ios/WebPageIOS.mm:
2052         (WebKit::WebPage::viewportPropertiesDidChange):
2053
2054 2014-05-23  Benjamin Poulain  <bpoulain@apple.com>
2055
2056         [iOS][WK2] The page scale factor randomly resets to initial scale when editing
2057         https://bugs.webkit.org/show_bug.cgi?id=133244
2058
2059         Reviewed by Enrica Casucci.
2060
2061         We were never telling the WebProcess that zoom is used triggered. As a result, the ViewportConfiguration was free
2062         to reset the scale whenever it felt like it. The fix is to call willStartUserTriggeredZoom before changing the scale.
2063
2064         This patch also split _willStartUserTriggeredScrollingOrZooming from willStartUserTriggeredZoom
2065         and rename it to willStartPanOrPinchGesture. This is just a tiny cleanup since the only thing left in _willStartUserTriggeredScrollingOrZooming
2066         was gesture related.
2067
2068         * UIProcess/API/Cocoa/WKWebView.mm:
2069         (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
2070         (-[WKWebView scrollViewWillBeginZooming:withView:]):
2071         (-[WKWebView scrollViewWillBeginDragging:]):
2072         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2073         * UIProcess/API/ios/WKViewIOS.mm:
2074         (-[WKView scrollViewWillBeginDragging:]):
2075         * UIProcess/ios/WKContentView.h:
2076         * UIProcess/ios/WKContentView.mm:
2077         (-[WKContentView willStartUserTriggeredZoom]):
2078         (-[WKContentView willStartUserTriggeredScroll]): Deleted.
2079         * UIProcess/ios/WKContentViewInteraction.h:
2080         * UIProcess/ios/WKContentViewInteraction.mm:
2081         (-[WKContentView willStartPanOrPinchGesture]):
2082         (-[WKContentView _willStartUserTriggeredScrollingOrZooming]): Deleted.
2083
2084 2014-05-23  Tim Horton  <timothy_horton@apple.com>
2085
2086         REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
2087         https://bugs.webkit.org/show_bug.cgi?id=132794
2088         <rdar://problem/16877909>
2089
2090         Reviewed by Simon Fraser.
2091
2092         * WebKit2.xcodeproj/project.pbxproj:
2093         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2094         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
2095         * WebProcess/WebCoreSupport/WebChromeClient.h:
2096         * WebProcess/WebPage/DrawingArea.h:
2097         (WebKit::DrawingArea::graphicsLayerFactory):
2098         (WebKit::DrawingArea::createDisplayRefreshMonitor):
2099         Plumb the DisplayRefreshMonitor request through to the DrawingArea.
2100         RemoteLayerTreeDrawingArea will implement and return a RemoteLayerTreeDisplayRefreshMonitor.
2101
2102         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Added.
2103         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
2104         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm: Added.
2105         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
2106         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor):
2107         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
2108         When requesting a display refresh callback, schedule a layer commit.
2109         It may end up being empty, but will still call us back with a didUpdate,
2110         upon which we'll fire the callback.
2111
2112         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers):
2113
2114         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2115         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2116         (WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):
2117         (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
2118         Keep track of the set of DisplayRefreshMonitors.
2119
2120         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
2121         Fire requestAnimationFrame callbacks once the UI process commits the new layer tree.
2122
2123 2014-05-23  Jeremy Jones  <jeremyj@apple.com>
2124
2125         Hide fullscreen immediately when switching tabs.
2126         https://bugs.webkit.org/show_bug.cgi?id=133239
2127
2128         Reviewed by Eric Carlson.
2129
2130         Renamed a function to better describe it's new functionality.
2131
2132         * UIProcess/WebPageProxy.cpp:
2133         (WebKit::WebPageProxy::viewStateDidChange):
2134         now calls: requestHideAndExitFullscreen
2135
2136 2014-05-23  Enrica Casucci  <enrica@apple.com>
2137
2138         REGRESSION (WebKit2): Keyboard disappears/appears automatically between text boxes.
2139         https://bugs.webkit.org/show_bug.cgi?id=133243
2140         <rdar://problem/16761913>
2141
2142         Reviewed by Benjamin Poulain.
2143
2144         We need to ensure that when an element loses focus and another one gets it,
2145         this is handled in one single message in the UI process to avoid seeing
2146         the keyboard animating in and out.
2147         This is accomplished by always postponing the blur notification until all events
2148         have been processed.
2149         If a new node is focused before the delayed blur notification is sent to the UI
2150         process, the message we send includes both blur and focus notification. In this case,
2151         the postponed blur notification is not sent.
2152
2153         * UIProcess/PageClient.h:
2154         * UIProcess/WebPageProxy.h:
2155         * UIProcess/WebPageProxy.messages.in:
2156         * UIProcess/ios/PageClientImplIOS.h:
2157         * UIProcess/ios/PageClientImplIOS.mm:
2158         (WebKit::PageClientImpl::startAssistingNode):
2159         * UIProcess/ios/WKContentViewInteraction.h:
2160         * UIProcess/ios/WKContentViewInteraction.mm:
2161         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2162         (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]): Deleted.
2163         * UIProcess/ios/WebPageProxyIOS.mm:
2164         (WebKit::WebPageProxy::startAssistingNode):
2165         * WebProcess/WebPage/WebPage.cpp:
2166         (WebKit::WebPage::WebPage):
2167         * WebProcess/WebPage/WebPage.h:
2168         * WebProcess/WebPage/ios/WebPageIOS.mm:
2169         (WebKit::WebPage::elementDidFocus):
2170         (WebKit::WebPage::elementDidBlur):
2171
2172 2014-05-23  Anders Carlsson  <andersca@apple.com>
2173
2174         Remove an assertion.
2175
2176         * WebProcess/WebPage/WebPage.cpp:
2177         (WebKit::WebPage::loadRequest):
2178
2179 2014-05-23  Tim Horton  <timothy_horton@apple.com>
2180
2181         [iOS] WKPDFView should have a page indicator
2182         https://bugs.webkit.org/show_bug.cgi?id=133109
2183         <rdar://problem/16383003>
2184
2185         Reviewed by Anders Carlsson.
2186
2187         * UIProcess/API/Cocoa/WKWebView.mm:
2188         (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
2189         (-[WKWebView _setObscuredInsets:]):
2190         Forward obscured insets changes to the custom content view.
2191
2192         (-[WKWebView _updateScrollViewBackground]):
2193         If we have a custom content view, use its background instead of the
2194         (likely nonexistent) page's when updaing the scroll view's background color.
2195
2196         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2197         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2198         * UIProcess/Cocoa/WKWebViewContentProvider.h:
2199         * UIProcess/Cocoa/WKWebViewContentProviderDelegate.h: Added.
2200         * UIProcess/API/Cocoa/WKWebView.mm:
2201         (-[WKWebView _setInsetForOverlaidAccessoryViews:]):
2202         Add SPI for clients to inform us about potential overlaid accessory views
2203         which should be taken into account e.g. for positioning the page indicator.
2204
2205         Add a view that sits fixed on top of the WKWebView, ignores interaction,
2206         but provides the WKWebViewContentProvider a place to install views
2207         that don't scroll along with the content.
2208
2209         * UIProcess/ios/WKPDFPageNumberIndicator.h: Added.
2210         * UIProcess/ios/WKPDFPageNumberIndicator.mm: Added.
2211         (-[WKPDFPageNumberIndicator initWithFrame:]):
2212         (-[WKPDFPageNumberIndicator dealloc]):
2213         (-[WKPDFPageNumberIndicator setCurrentPageNumber:]):
2214         (-[WKPDFPageNumberIndicator setPageCount:]):
2215         (-[WKPDFPageNumberIndicator show]):
2216         (-[WKPDFPageNumberIndicator hide:]):
2217         (-[WKPDFPageNumberIndicator moveToPoint:animated:]):
2218         (-[WKPDFPageNumberIndicator sizeThatFits:]):
2219         (-[WKPDFPageNumberIndicator _updateLabel]):
2220         (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
2221         Add a page number indicator.
2222
2223         * UIProcess/ios/WKPDFView.mm:
2224         (-[WKPDFView dealloc]):
2225         (-[WKPDFView web_setScrollView:]):
2226         (-[WKPDFView _revalidateViews]):
2227         (-[WKPDFView _offsetForPageNumberIndicator]):
2228         (-[WKPDFView _updatePageNumberIndicator]):
2229         (-[WKPDFView web_setObscuredInsets:]):
2230         (-[WKPDFView web_setInsetForOverlaidAccessoryViews:]):
2231         (-[WKPDFView web_setFixedOverlayView:]):
2232         (-[WKPDFView _computePageAndDocumentFrames]):
2233         Update the page number indicator when the topmost visible page changes.
2234         Move the page number indicator around when the obscured insets change.
2235
2236         * WebKit2.xcodeproj/project.pbxproj:
2237
2238 2014-05-23  Anders Carlsson  <andersca@apple.com>
2239
2240         Fix test failures on the bot.
2241
2242         * UIProcess/API/Cocoa/WKProcessPool.mm:
2243         (websiteDataDirectoryURL):
2244         If we have no bundle identifier, use the process name.
2245
2246 2014-05-23  Enrica Casucci  <enrica@apple.com>
2247
2248         REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
2249         https://bugs.webkit.org/show_bug.cgi?id=133237
2250         <rdar://problem/16655776>
2251
2252         Reviewed by Ryosuke Niwa.
2253
2254         * UIProcess/ios/WKContentViewInteraction.mm:
2255         (-[WKContentView beginSelectionChange]):
2256         (-[WKContentView endSelectionChange]):
2257
2258         When the selection is changed with a gesture in an editable element,
2259         we must notify the keyboard to make sure the autocorrection engine 
2260         updates its typing context. WKContentView must implement
2261         beginSelectionChange and endSelectionChange to call into
2262         the keyboard layer.
2263
2264 2014-05-22  Brent Fulgham  <bfulgham@apple.com>
2265
2266         [iOS] WK2: Provide implementation for windowFrame
2267         https://bugs.webkit.org/show_bug.cgi?id=133205
2268         <rdar://problem/16894890>
2269
2270         Reviewed by Benjamin Poulain.
2271
2272         * UIProcess/Cocoa/UIDelegate.h:
2273         * UIProcess/Cocoa/UIDelegate.mm:
2274         (WebKit::UIDelegate::UIClient::windowFrame): Added.
2275         * UIProcess/ios/PageClientImplIOS.mm:
2276         (WebKit::PageClientImpl::convertToUserSpace): Added.
2277
2278 2014-05-20  Anders Carlsson  <andersca@apple.com>
2279
2280         Use a per app directory structure for website data
2281         https://bugs.webkit.org/show_bug.cgi?id=133125
2282         <rdar://problem/16830143>
2283
2284         Reviewed by Dan Bernstein, Sam Weinig and Tim Horton.
2285
2286         Put website data in subdirectories of ~/Library/WebKit/<bundle ID>/WebsiteData.
2287         We use "LocalStorage", "WebSQL", and "IndexedDB" subdirectories.
2288
2289         * UIProcess/API/Cocoa/WKProcessPool.mm:
2290         (websiteDataDirectoryURL):
2291         (-[WKProcessPool _initWithConfiguration:]):
2292
2293 2014-05-23  Dan Bernstein  <mitz@apple.com>
2294
2295         [Cocoa] WKNavigationResponsePrivate.h is internal
2296         https://bugs.webkit.org/show_bug.cgi?id=133218
2297
2298         Reviewed by Dean Jackson.
2299
2300         * WebKit2.xcodeproj/project.pbxproj: Promote WKNavigationResponsePrivate.h to private.
2301
2302 2014-05-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2303
2304         [UNIX] Reorganize and cleanup main functions of GTK and EFL ports
2305         https://bugs.webkit.org/show_bug.cgi?id=131024
2306
2307         Reviewed by Gustavo Noronha Silva.
2308
2309         Move main function implementation files to <process-dir>/EntryPoint/unix/<ProcessName>Main.cpp
2310         files that are now shared by GTK and EFL ports. These files call a
2311         main method that wraps a new method ChildProcessMain that contains
2312         the common code and uses a helper class for the platform specific
2313         code. GTK+ and EFL ports implement that helper class for every process type.
2314
2315         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: Renamed from Source/WebKit2/efl/MainEfl.cpp.
2316         (main):
2317         * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Renamed from Source/WebKit2/unix/NetworkMainUnix.cpp.
2318         (WebKit::NetworkProcessMainUnix):
2319         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp: Renamed from Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp.
2320         (WebKit::NetworkProcessMainUnix):
2321         * NetworkProcess/unix/NetworkProcessMainUnix.h:
2322         * PlatformEfl.cmake:
2323         * PlatformGTK.cmake:
2324         * PluginProcess/EntryPoint/unix/PluginProcessMain.cpp: Renamed from Source/WebKit2/unix/PluginMainUnix.cpp.
2325         (main):
2326         * PluginProcess/unix/PluginProcessMainUnix.cpp:
2327         (WebKit::webkitXError):
2328         (WebKit::PluginProcessMainUnix):
2329         * PluginProcess/unix/PluginProcessMainUnix.h:
2330         * Shared/unix/ChildProcessMain.cpp: Copied from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
2331         (WebKit::ChildProcessMainBase::parseCommandLine):
2332         * Shared/unix/ChildProcessMain.h: Renamed from Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h.
2333         (WebKit::ChildProcessMainBase::platformInitialize):
2334         (WebKit::ChildProcessMainBase::platformFinalize):
2335         (WebKit::ChildProcessMainBase::initializationParameters):
2336         (WebKit::ChildProcessMain):
2337         * WebProcess/EntryPoint/unix/WebProcessMain.cpp: Renamed from Source/WebKit2/gtk/MainGtk.cpp.
2338         (main):
2339         * WebProcess/efl/WebProcessMainEfl.cpp:
2340         (WebKit::WebProcessMainUnix):
2341         (dummyExtensionErrorHandler): Deleted.
2342         * WebProcess/gtk/WebProcessMainGtk.cpp:
2343         (WebKit::WebProcessMainUnix):
2344         * WebProcess/unix/WebProcessMainUnix.h: Renamed from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
2345
2346 2014-05-22  Zan Dobersek  <zdobersek@igalia.com>
2347
2348         Have the decoded element in VectorArgumentCoder::decode() moved into Vector::append()
2349         https://bugs.webkit.org/show_bug.cgi?id=133082
2350
2351         Reviewed by Andreas Kling.
2352
2353         * Platform/IPC/ArgumentCoders.h: Move the decoded element into the Vector::append() call.
2354         This enforces a move instead of a copy if the decoded element's type is move-constructible.
2355
2356 2014-05-22  Zan Dobersek  <zdobersek@igalia.com>
2357
2358         Move the passed-in Vector<Attachment> in MessageDecoder constructor down into ArgumentDecoder
2359         https://bugs.webkit.org/show_bug.cgi?id=133080
2360
2361         Reviewed by Andreas Kling.
2362
2363         * Platform/IPC/MessageDecoder.cpp:
2364         (IPC::MessageDecoder::MessageDecoder): The Vector<Attachment> object was passed in by value.
2365         Move it into the ArgumentDecoder constructor as it is not used elsewhere in this constructor
2366         and produces a copy otherwise.
2367
2368 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
2369
2370         [iOS][WK2] Add support for minimal-ui viewports
2371         https://bugs.webkit.org/show_bug.cgi?id=133162
2372
2373         Reviewed by Simon Fraser.
2374
2375         In the WebKit2 layers, we have two parts to minimal-ui.
2376         -In WebPage, we need to get the values from the UIProcess and setup the ViewportConfiguration.
2377          Another part is freezing the state on page load.
2378         -In the UIProcess, we need to get the right information for layout and styling, and we need to tell
2379          the UI clients about minimal-ui changes.
2380
2381         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2382         * UIProcess/API/Cocoa/WKWebView.mm:
2383         (-[WKWebView _setUsesMinimalUI:]):
2384         (-[WKWebView _usesMinimalUI]):
2385         (-[WKWebView _didCommitLayerTree:WebKit::]):
2386         (-[WKWebView _frameOrBoundsChanged]):
2387         (-[WKWebView _minimumLayoutSizeOverride]):
2388         (-[WKWebView _setMinimumLayoutSizeOverride:]):
2389         (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
2390         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2391         (-[WKWebView _largestUnobscuredSizeOverride]):
2392         (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
2393         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2394         (setViewportConfigurationMinimumLayoutSize): Deleted.
2395         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2396         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2397         * UIProcess/PageClient.h:
2398         * UIProcess/WebPageProxy.h:
2399         * UIProcess/WebPageProxy.messages.in:
2400         * UIProcess/ios/PageClientImplIOS.h:
2401         * UIProcess/ios/PageClientImplIOS.mm:
2402         (WebKit::PageClientImpl::setUsesMinimalUI):
2403         * UIProcess/ios/WebPageProxyIOS.mm:
2404         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2405         (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
2406         (WebKit::WebPageProxy::setMaximumUnobscuredSize):
2407         (WebKit::WebPageProxy::setUsesMinimalUI):
2408         (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI): Deleted.
2409         * WebProcess/WebPage/WebPage.cpp:
2410         (WebKit::WebPage::WebPage):
2411         (WebKit::WebPage::didCommitLoad):
2412         * WebProcess/WebPage/WebPage.h:
2413         * WebProcess/WebPage/WebPage.messages.in:
2414         * WebProcess/WebPage/ios/WebPageIOS.mm:
2415         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
2416         (WebKit::WebPage::setMaximumUnobscuredSize):
2417         (WebKit::WebPage::willFlushLayers):
2418         (WebKit::WebPage::dynamicViewportSizeUpdate):
2419         (WebKit::WebPage::viewportConfigurationChanged):
2420         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
2421         (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI): Deleted.
2422         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2423         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2424
2425 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
2426
2427         [iOS][WK2] Reset the special action-target of WKSyntheticClickTapGestureRecognizer on destruction
2428         https://bugs.webkit.org/show_bug.cgi?id=133165
2429         <rdar://problem/16283914>
2430
2431         Reviewed by Andy Estes.
2432
2433         It is unclear why, but the WKSyntheticClickTapGestureRecognizer sometimes survives its own view
2434         and is reset after WKContentView was destructed.
2435         This patch cleans up the target-action on destruction to avoid accessing a destructed object.
2436
2437         * UIProcess/ios/WKContentViewInteraction.mm:
2438         (-[WKContentView cleanupInteraction]):
2439
2440 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
2441
2442         Do not force a layout when changing the FixedLayoutSize in WebPage
2443         https://bugs.webkit.org/show_bug.cgi?id=133167
2444
2445         Reviewed by Andreas Kling.
2446
2447         WebPage::setFixedLayoutSize was forcing a layout immediately after changing the layout size on FrameView.
2448         This is forcing plenty of extra layouts since the fixed layout size is one of many properties updated on the FrameView.
2449
2450         FrameView marks that layout is needed. It is not clear why a layout was performed immediately.
2451
2452         * WebProcess/WebPage/WebPage.cpp:
2453         (WebKit::WebPage::setFixedLayoutSize):
2454
2455 2014-05-22  Andreas Kling  <akling@apple.com>
2456
2457         [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
2458         <https://webkit.org/b/133197>
2459         <rdar://problem/17011561>
2460
2461         Try to free up as much memory as possible before going into background.
2462
2463         Reviewed by Gavin Barraclough.
2464
2465         * WebProcess/WebProcess.cpp:
2466         (WebKit::WebProcess::processWillSuspend):
2467
2468 2014-05-22  Andreas Kling  <akling@apple.com>
2469
2470         Hook up a setting for showing detailed logging during memory pressure relief.
2471         <https://webkit.org/b/133194>
2472
2473         Plumb through the same setting that we used for detailed logging in WK1.
2474
2475         Reviewed by Gavin Barraclough.
2476
2477         * Shared/WebProcessCreationParameters.cpp:
2478         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2479         (WebKit::WebProcessCreationParameters::encode):
2480         (WebKit::WebProcessCreationParameters::decode):
2481         * Shared/WebProcessCreationParameters.h:
2482         * UIProcess/mac/WebContextMac.mm:
2483         (WebKit::WebContext::platformInitializeWebProcess):
2484         * WebProcess/cocoa/WebProcessCocoa.mm:
2485         (WebKit::WebProcess::platformInitializeWebProcess):
2486
2487 2014-05-22  Andy Estes  <aestes@apple.com>
2488
2489         [iOS] Send shareable resources to QuickLook if enabled
2490         https://bugs.webkit.org/show_bug.cgi?id=133189
2491         <rdar://problem/17003995>
2492
2493         Reviewed by Brady Eidson.
2494
2495         Like we do for didReceiveData(), we need to pass an incoming ShareableResource to QuickLook if a QuickLook
2496         handle exists.
2497
2498         * Shared/ShareableResource.cpp:
2499         (WebKit::ShareableResource::Handle::tryWrapInCFData): Return the shared resource in a CFDataRef.
2500         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Implemented in terms of tryWrapInCFData().
2501         * Shared/ShareableResource.h:
2502         * WebProcess/Network/WebResourceLoader.cpp:
2503         (WebKit::WebResourceLoader::didReceiveResource): If a QuickLook handle exists, send the shareable resource to
2504         it via a CFDataRef.
2505
2506 2014-05-22  Martin Hock  <mhock@apple.com>
2507
2508         [iOS] Enable -apple-system- styled elements to respond to system font size changes.
2509         https://bugs.webkit.org/show_bug.cgi?id=133186
2510         <rdar://problem/16583782>
2511
2512         Reviewed by Enrica Casucci.
2513
2514         * UIProcess/API/Cocoa/WKWebView.mm:
2515         (-[WKWebView initWithFrame:configuration:]):
2516         (-[WKWebView _contentSizeCategoryDidChange:]):
2517         (-[WKWebView _contentSizeCategory]):
2518         * UIProcess/WebPageProxy.h:
2519         * UIProcess/ios/WebPageProxyIOS.mm:
2520         (WebKit::WebPageProxy::contentSizeCategoryDidChange):
2521         * WebProcess/WebPage/WebPage.h:
2522         * WebProcess/WebPage/WebPage.messages.in:
2523         * WebProcess/WebPage/ios/WebPageIOS.mm:
2524         (WebKit::WebPage::contentSizeCategoryDidChange):
2525
2526 2014-05-22  Alexey Proskuryakov  <ap@apple.com>
2527
2528         [iOS] Add CFBundleAllowMixedLocalizations to WebContentService
2529         https://bugs.webkit.org/show_bug.cgi?id=133187
2530         <rdar://problem/16561084>
2531
2532         Reviewed by Tim Horton.
2533
2534         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
2535         We already had it in WebContentService.Development, just not here.
2536
2537 2014-05-22  Alexey Proskuryakov  <ap@apple.com>
2538
2539         [iOS][WK2] Application cache is broken
2540         https://bugs.webkit.org/show_bug.cgi?id=133172
2541         <rdar://problem/16994593>
2542
2543         Reviewed by Andy Estes.
2544
2545         * UIProcess/mac/WebContextMac.mm:
2546         (WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
2547         path for application cache database (same as WebKit1).
2548
2549 2014-05-22  Enrica Casucci  <enrica@apple.com>
2550
2551         REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
2552         https://bugs.webkit.org/show_bug.cgi?id=133183
2553         <rdar://problem/17004207>
2554
2555         Reviewed by Geoff Garen.
2556
2557         The keyboard type should be search if the input type is search
2558         or if it is text and it is inside a form with an action and either
2559         name, id or title contain the word search. This matches the
2560         heuristics we have in WK1 for iOS.
2561
2562         * WebProcess/WebPage/ios/WebPageIOS.mm:
2563         (WebKit::WebPage::getAssistedNodeInformation):
2564
2565 2014-05-21  Oliver Hunt  <oliver@apple.com>
2566
2567         Only enable sandbox extensions on mac.
2568
2569         RS = Alexey.
2570
2571         * WebKit2Prefix.h:
2572
2573 2014-05-21  Oliver Hunt  <oliver@apple.com>
2574
2575         [iOS] Enable sandboxing for the database process
2576         https://bugs.webkit.org/show_bug.cgi?id=132963
2577
2578         Reviewed by Alexey Proskuryakov.
2579
2580         Simply ensure that the database process is running in a tight
2581         sandbox. As part of this i've separated out ChildProcessIOS
2582         and ensures that the database process loads a custom sandbox.
2583
2584         * Configurations/WebKit.xcconfig:
2585         * DatabaseProcess/ios/DatabaseProcessIOS.mm:
2586         (WebKit::DatabaseProcess::initializeSandbox):
2587         * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Added.
2588         * Shared/ios/ChildProcessIOS.mm: Added.
2589         Essentially cloned from the Mac version, only all the OSX
2590         specific logic has been stripped.
2591         (WebKit::ChildProcess::setApplicationIsDaemon):
2592         (WebKit::ChildProcess::platformInitialize):
2593         (WebKit::ChildProcess::initializeSandbox):
2594         (WebKit::ChildProcess::setQOS):
2595         * Shared/mac/ChildProcessMac.mm:
2596         Remove all the IOS ifdefs.
2597         (WebKit::ChildProcess::setApplicationIsDaemon):
2598         (WebKit::ChildProcess::platformInitialize):
2599         (WebKit::ChildProcess::initializeSandbox):
2600         (WebKit::ChildProcess::setQOS):
2601         * WebKit2.xcodeproj/project.pbxproj:
2602
2603 2014-05-21  Andy Estes  <aestes@apple.com>
2604
2605         [iOS] Create a UIPrintFormatter for WKWebView
2606         https://bugs.webkit.org/show_bug.cgi?id=133005
2607
2608         Reviewed by Tim Horton.
2609
2610         Implemented a UIPrintFormatter subclass to support printing WKWebViews using UIPrintInteractionController.
2611         Overrode -_recalcPageCount: to synchronously ask the web process to lay out for printing and return the number
2612         of page rects. The web process returns the page rects immediately and then starts rendering the page to a PDF,
2613         returning the PDF data to the UI process asynchronously. When UIPrintInteractionController later calls our
2614         overridden -drawInRect:forPageAtIndex:, we block and wait for the PDF data to be returned. Since
2615         UIPrintInteractionController draws each page after a delay, it's possible that the web process has already
2616         returned the PDF data to us by the time we print the first page.
2617
2618         * Shared/WebPreferencesStore.h: Correctly initialized shouldPrintBackgrounds for iOS.
2619         * UIProcess/API/Cocoa/WKWebView.mm:
2620         (-[WKWebView _dataForDisplayedPDF]): Now that WKPDFView vends its CGPDFDocument directly, extract its data here.
2621         (-[WKWebView _printFormatterClass]): Tell UIView which UIPrintFormatter to alloc.
2622         (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]):
2623         If we're displaying a PDF, return its page count directly. Otherwise, synchronously ask the web process to
2624         compute page rects for printing and then return the number of rects.
2625         (-[WKWebView _endPrinting]): Cleared state and sent the WebPage::EndPrinting message to the web process.
2626         (-[WKWebView _printedDocument]): If we're displaying a PDF, return its data directly. Otherwise, if we haven't
2627         received PDF data from the web process yet, wait for it indefinitely (there's no sensible timeout to use here
2628         since failing to receive the data results in printing some number of blank pages).
2629         (-[WKWebView _setPrintedDocument:]): Set the CGPDFDocument received from the web process.
2630         * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared methods called by WKWebViewPrintFormatter.
2631         * UIProcess/PageClient.h: Declared didFinishDrawingPagesToPDF.
2632         * UIProcess/WKWebViewPrintFormatter.h: Added.
2633         * UIProcess/WKWebViewPrintFormatter.mm: Added.
2634         (-[WKWebViewPrintFormatter dealloc]): Cleared state and called -[WKWebView _endPrinting].
2635         (-[WKWebViewPrintFormatter webView]): Returned the WKWebView for this print formatter.
2636         (-[WKWebViewPrintFormatter _recalcPageCount]): Set up a PrintInfo object given the formatter's content rect
2637         and called -_computePageCountAndStartDrawingToPDFWithPrintInfo:...
2638         (-[WKWebViewPrintFormatter rectForPageAtIndex:]): Called -_recalcIfNecessary and then returned the rect from
2639         -_pageContentRect.
2640         (-[WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Taught to draw the given page of the printed PDF
2641         document into the given rect and context provided to us.
2642         * UIProcess/WebPageProxy.h: Declared didFinishDrawingPagesToPDF.
2643         * UIProcess/WebPageProxy.messages.in: Added DidFinishDrawingPagesToPDF. Made this a delayed syncrhonous message
2644         so that additoinal work could be performed after sending the response.
2645         * UIProcess/ios/PageClientImplIOS.h:
2646         * UIProcess/ios/PageClientImplIOS.mm:
2647         (WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Created a CGPDFDocument from the data sent to us by the
2648         web process and called -[WKWebView _setPrintedDocument:].
2649         * UIProcess/ios/WKPDFView.h:
2650         * UIProcess/ios/WKPDFView.mm:
2651         (-[WKPDFView pdfDocument]): Returned the underlying CGPDFDocument.
2652         (-[WKPDFView documentData]): Deleted.
2653         * UIProcess/ios/WebPageProxyIOS.mm:
2654         (WebKit::WebPageProxy::didFinishDrawingPagesToPDF):
2655         * WebKit2.xcodeproj/project.pbxproj:
2656         * WebProcess/WebPage/WebPage.cpp:
2657         (WebKit::WebPage::computePagesForPrinting): Changed to call computePagesForPrintingImpl.
2658         (WebKit::WebPage::computePagesForPrintingImpl): Moved the common logic of computePagesForPrinting to here so it
2659         could be called by computePagesForPrintingAndStartDrawingToPDF.
2660         (WebKit::WebPage::drawPagesToPDF): Changed to call drawPagesToPDFImpl
2661         (WebKit::WebPage::drawPagesToPDFImpl): Moved the common logic of drawPagesToPDF to here so it could be called
2662         by computePagesForPrintingAndStartDrawingToPDF.
2663         * WebProcess/WebPage/WebPage.h:
2664         * WebProcess/WebPage/WebPage.messages.in:
2665         * WebProcess/WebPage/ios/WebPageIOS.mm:
2666         (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Computed page rects and returned them as a
2667         synchronous response. Afterwards called drawPagesToPDFImpl() and returned the PDF data by sending
2668         WebPageProxy::DidFinishDrawingPagesToPDF.
2669
2670 2014-05-21  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2671
2672         [EFL] Turn on ENABLE_CSS_FILTERS
2673         https://bugs.webkit.org/show_bug.cgi?id=133153
2674
2675         Reviewed by Gyuyoung Kim.
2676
2677         Make WebKit2 compile after r166741 when CSS_FILTERS are enabled.
2678
2679         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2680         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
2681
2682 2014-05-21  Brady Eidson  <beidson@apple.com>
2683
2684         Special handling of telephone number detection menu.
2685         <rdar://problem/16967971> and https://bugs.webkit.org/show_bug.cgi?id=133143
2686
2687         Reviewed by Geoff Garen.
2688
2689         Add a bool to ContextMenuContextData to represent telephone number menus:
2690         * Shared/ContextMenuContextData.cpp:
2691         (WebKit::ContextMenuContextData::ContextMenuContextData):
2692         (WebKit::ContextMenuContextData::operator=):
2693         (WebKit::ContextMenuContextData::encode):
2694         (WebKit::ContextMenuContextData::decode):
2695         * Shared/ContextMenuContextData.h:
2696         (WebKit::ContextMenuContextData::ContextMenuContextData):
2697         (WebKit::ContextMenuContextData::isTelephoneNumberContext):
2698
2699         * UIProcess/mac/WebContextMenuProxyMac.mm:
2700         (WebKit::WebContextMenuProxyMac::showContextMenu): If the menu is a telephone
2701           number menu then display it using a specific AppKit API.
2702
2703         * UIProcess/mac/WebPageProxyMac.mm:
2704         (WebKit::WebPageProxy::showTelephoneNumberMenu): Filter the array of menu items
2705           through a new WKSI call, and then show it using a telephone number context.
2706
2707 2014-05-21  Alexey Proskuryakov  <ap@apple.com>
2708
2709         [Mac] REGRESSION (Async text input): Asian text input doesn't work in Flash
2710         https://bugs.webkit.org/show_bug.cgi?id=133128
2711         <rdar://problem/16890920>
2712
2713         Reviewed by Anders Carlsson.
2714
2715         * UIProcess/API/mac/WKView.mm:
2716         (-[WKView _interpretKeyEvent:completionHandler:]): Added a separate code path for
2717         plug-in input. Before async text input, we used to provide a nil input context due
2718         to having _data->_interpretKeyEventsParameters while this function was executing,
2719         and thus took a shortcut. The new behavior is different from pre-async in that
2720         we don't collect commands at all, but I couldn't find any case where that mattered.
2721         (-[WKView inputContext]): The _collectedKeypressCommands check was not a correct
2722         replacement for _interpretKeyEventsParameters one, because this variable is not
2723         always set within -_interpretKeyEvent:completionHandler:.
2724
2725         * UIProcess/mac/WKTextInputWindowController.mm:
2726         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
2727         While at it, fixed a separate issue with Cangjie predictive input. We shouldn't
2728         keep prediction pop-up on screen after hiding the bottom input window.
2729
2730 2014-05-16  Martin Robinson  <mrobinson@igalia.com>
2731
2732         [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
2733         https://bugs.webkit.org/show_bug.cgi?id=132819
2734
2735         Reviewed by Carlos Garcia Campos.
2736
2737         * PlatformEfl.cmake: No need to prefix EXEC_INSTALL_DIR with the prefix any longer.
2738         * PlatformGtk.cmake: No longer use CMAKE_INSTALL_FULL_FOO variables, instead using the WebKit-specific ones.
2739         * efl/EWebKit2Config.cmake.in: Ditto.
2740         * efl/ewebkit2.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
2741         * webkit2gtk-web-extension.pc.in: No longer use the pkg-config only variables. Instead use
2742         the common CMake ones.
2743         * webkit2gtk.pc.in: Ditto.
2744
2745 2014-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2746
2747         REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker
2748         https://bugs.webkit.org/show_bug.cgi?id=133118
2749
2750         Reviewed by Philippe Normand.
2751
2752         Call WebContext::applyPlatformSpecificConfigurationDefaults() to
2753         initialize the WebContextConfiguration before creating the default WebContext.
2754
2755         * UIProcess/API/gtk/WebKitWebContext.cpp:
2756         (createDefaultWebContext):
2757
2758 2014-05-21  Shivakumar JM  <shiva.jm@samsung.com>
2759
2760         [WebKit2] Cleanup the build from unused variable in WebProcess module
2761         https://bugs.webkit.org/show_bug.cgi?id=133062
2762
2763         Reviewed by Csaba Osztrogonác.
2764
2765         Fix unused parameter by using UNUSED_PARAM macro
2766
2767         * WebProcess/UserContent/WebUserContentController.cpp:
2768         (WebKit::WebUserContentController::addUserScriptMessageHandlers):
2769         (WebKit::WebUserContentController::removeUserScriptMessageHandler):
2770
2771 2014-05-20  Enrica Casucci  <enrica@apple.com>
2772
2773         REGRESSION (WK2): Tapping on the input field in duckduckgo.com shows the keyboard but not the caret.
2774         https://bugs.webkit.org/show_bug.cgi?id=133140
2775         <rdar://problem/16980898>
2776
2777         Reviewed by Benjamin Poulain.
2778
2779         When a page focuses a field on load, we receive the call to startAssistingNode
2780         but we don't create a text interaction assistant if the focus is not originated
2781         by a user action. Upon receiving the selection change notification we don't
2782         call the text interaction assistant, since we don't have one, but we do call
2783         the web selection assistant. We don't have any valid rects for web selection
2784         and we clear the selection on the page, causing the caret not to appear and
2785         the typing to have no effect.
2786
2787         * UIProcess/ios/WKContentViewInteraction.mm:
2788         (-[WKContentView _updateChangedSelection]):
2789
2790 2014-05-20  Dean Jackson  <dino@apple.com>
2791
2792         [Mac] Allow popup menus to override default appearance
2793         https://bugs.webkit.org/show_bug.cgi?id=133129
2794
2795         Reviewed by Tim Horton.
2796
2797         Add an extra "hideArrows" flag to PlatformPopupMenuData
2798         and replace the call to WKPopupMenuWithSize with WKPopupMenu.
2799
2800         * Shared/PlatformPopupMenuData.cpp: Encode and decode the new data value.
2801         (WebKit::PlatformPopupMenuData::encode):
2802         (WebKit::PlatformPopupMenuData::decode):
2803         * Shared/PlatformPopupMenuData.h: Add hideArrows boolean.
2804         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2805         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2806         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
2807         (WebKit::WebPopupMenu::setUpPlatformData): The hideArrows flag is
2808         true if we don't have the default appearance.
2809
2810 2014-05-20  Eric Carlson  <eric.carlson@apple.com>
2811
2812         [Mac] do not deactivate an audio session that has running I/O
2813         https://bugs.webkit.org/show_bug.cgi?id=133127
2814
2815         Reviewed by Jer Noble.
2816
2817         * WebProcess/WebPage/WebPage.cpp:
2818         (WebKit::WebPage::WebPage): Settings::setShouldManageAudioSession renamed to 
2819             setShouldManageAudioSessionCategory, deal with it.
2820
2821 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
2822
2823         REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
2824         https://bugs.webkit.org/show_bug.cgi?id=133106
2825         <rdar://problem/16967648>
2826
2827         Reviewed by Sam Weinig.
2828
2829         Fix regression from r169063. That commit removed scrolledContentsLayers from 
2830         frame scrolling nodes, but they do actually use them.
2831         
2832         So put them back; not in the base class, because they have a somewhat different
2833         meaning for overflow scrolling and frame scrolling.
2834
2835         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2836         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
2837         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
2838         (WebKit::RemoteScrollingTreeTextStream::dump):
2839         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2840         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2841
2842 2014-05-20  Alexey Proskuryakov  <ap@apple.com>
2843
2844         [Mac] WebProcess doesn't follow localization of UI process when run as a service
2845         https://bugs.webkit.org/show_bug.cgi?id=133126
2846         <rdar://problem/13396515>
2847         <rdar://problem/16561084>
2848
2849         Reviewed by Sam Weinig and Tim Horton.
2850
2851         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2852         (WebKit::handleXPCBootstrap):
2853         (main):
2854         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2855         (WebKit::handleXPCBootstrap):
2856         (main):
2857         Set localization very early in process lifetime (in development builds, that's
2858         even before WebKit framework is loaded).
2859
2860         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService):
2861         Pass UI process localization to the service, computing it in the same way we do
2862         for child processes.
2863
2864 2014-05-20  Anders Carlsson  <andersca@apple.com>
2865
2866         Fix a header comment
2867         https://bugs.webkit.org/show_bug.cgi?id=133123
2868         <rdar://problem/16973783>
2869
2870         Reviewed by Geoffrey Garen.
2871
2872         * UIProcess/API/Cocoa/WKUserContentController.h:
2873
2874 2014-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2875
2876         [GTK] WebKitWebPage::send-request always pass a valid pointer for redirected response
2877         https://bugs.webkit.org/show_bug.cgi?id=133119
2878
2879         Reviewed by Sergio Villar Senin.
2880
2881         The problem is that we were checking whether the passed in
2882         WKURLResponseRef is NULL or not, but it's always a valid object
2883         that can contain a NULL WebCore::ResourceResponse.
2884
2885         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2886         (willSendRequestForFrame): Pass NULL as redirect-response
2887         parameter of WebKitWebPage::send-request signal when the
2888         WebCore::ResourceResponse of the passed in WKURLResponseRef is NULL.
2889
2890 2014-05-20  Antti Koivisto  <antti@apple.com>
2891
2892         Double-tap zoom does not take obscuring insets into account
2893         https://bugs.webkit.org/show_bug.cgi?id=133116
2894         <rdar://problem/16765604>
2895
2896         Reviewed by Anders Carlsson.
2897
2898         * UIProcess/API/Cocoa/WKWebView.mm:
2899         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
2900         
2901             Compute the zoom target taking insets into account.
2902
2903 2014-05-19  Gavin Barraclough  <baraclough@apple.com>
2904
2905         WebKit2/iOS: parented view should be considered hidden if app is backgrounded
2906         https://bugs.webkit.org/show_bug.cgi?id=133099
2907         radar://16942183
2908
2909         Reviewed by Simon Fraser.
2910
2911         * UIProcess/ios/PageClientImplIOS.mm:
2912         (WebKit::PageClientImpl::isViewWindowActive):
2913             - implemented in terms of isViewVisible.
2914             - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
2915         (WebKit::PageClientImpl::isViewFocused):
2916             - implemented in terms of isViewWindowActive.
2917             - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
2918         (WebKit::PageClientImpl::isViewVisible):
2919             - take UIApplication applicationState into account in determining visibility.
2920         (WebKit::PageClientImpl::isViewVisibleOrOccluded):
2921             - implemented in terms of isViewVisible.
2922         (WebKit::PageClientImpl::isVisuallyIdle):
2923             - implemented in terms of isViewVisible.
2924         * UIProcess/ios/WKContentView.mm:
2925         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
2926             - register for UIApplicationDidEnterBackgroundNotification.
2927         (-[WKContentView _applicationDidEnterBackground:]):
2928         (-[WKContentView _applicationWillEnterForeground:]):
2929             - when the application state changes all flags except IsInWindow may be affected.
2930
2931 2014-05-19  Enrica Casucci  <enrica@apple.com>
2932
2933         WK2 iOS: Pressing the form navigation button causes the keyboard to be dismissed.
2934         https://bugs.webkit.org/show_bug.cgi?id=133100
2935         <rdar://problem/16808673>
2936
2937         Reviewed by Benjamin Poulain.
2938
2939         The call to focusNextAssistedNode is the result of a user action, since
2940         it is called when the user pressed the form navigation buttons.
2941         Therefore we must set m_userIsInteracting to true before changing the focus
2942         to make sure the focus change is honored.
2943
2944         * WebProcess/WebPage/ios/WebPageIOS.mm:
2945         (WebKit::WebPage::focusNextAssistedNode):
2946
2947 2014-05-19  Beth Dakin  <bdakin@apple.com>
2948
2949         TelephoneNumberOverlayController should use a modern loop for text quad bounding 
2950         boxes
2951         https://bugs.webkit.org/show_bug.cgi?id=133096
2952
2953         Reviewed by Anders Carlsson.
2954
2955         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
2956         (WebKit::textQuadsToBoundingRectForRange):
2957
2958 2014-05-19  Jeremy Jones  <jeremyj@apple.com>
2959
2960         PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
2961         https://bugs.webkit.org/show_bug.cgi?id=133025
2962
2963         Reviewed by Simon Fraser.
2964
2965         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
2966         (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
2967         Initialize PlatformCALayerRemote properties from the PlatformLayer.
2968
2969 2014-05-19  Benjamin Poulain  <bpoulain@apple.com>
2970
2971         [iOS][WK2] When a page relayout on dynamic resize, keep the same relative width in view
2972         https://bugs.webkit.org/show_bug.cgi?id=133026
2973         <rdar://problem/16833971>
2974
2975         Reviewed by Simon Fraser.
2976
2977         When a page does not relayout, we keep the same width in view.
2978         When a page relayout, we should keep the same relative width in view.
2979
2980         * WebProcess/WebPage/ios/WebPageIOS.mm:
2981         (WebKit::isResponsiveDesignWithContentLargerThanLayout):
2982         (WebKit::WebPage::dynamicViewportSizeUpdate):
2983
2984 2014-05-19  Benjamin Poulain  <benjamin@webkit.org>
2985
2986         [WK2] Add some missing state reset on crash
2987         https://bugs.webkit.org/show_bug.cgi?id=133036
2988
2989         Reviewed by Sam Weinig.
2990
2991         * UIProcess/WebPageProxy.cpp:
2992         (WebKit::WebPageProxy::resetState):
2993         The missing reset for m_isTrackingTouchEvents would cause the WebPageProxy to send
2994         touch events when it shouldn't. That would only be for an active touch sequence.
2995
2996         The missing reset m_lastVisibleContentRectUpdate would prevent pushing the new UI state
2997         to the new page on reload, that is very bad.
2998
2999         Also moved m_videoFullscreenManager to be in the same order as initialization, and invalidate
3000         the callbacks for dictation.
3001
3002 2014-05-19  Benjamin Poulain  <bpoulain@apple.com>
3003
3004         [iOS][WK2] Move scale noise filtering to the WebProcess
3005         https://bugs.webkit.org/show_bug.cgi?id=133021
3006
3007         Reviewed by Darin Adler.
3008
3009         Filtering in the UIProcess was stupid. It forces to handle a third kind of scale just for updates.
3010
3011         The WebProcess already adjusts the input scale based on the viewport. Changing the input scale at that level
3012         is already supported. It is a better place to have the filtering.
3013
3014         * UIProcess/ios/WKContentView.mm:
3015         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
3016         * WebProcess/WebPage/ios/WebPageIOS.mm:
3017         (WebKit::WebPage::updateVisibleContentRects):
3018
3019 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
3020
3021         Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
3022         https://bugs.webkit.org/show_bug.cgi?id=133022
3023
3024         Reviewed by Sam Weinig.
3025         
3026         In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
3027         into FrameScrolling and OverflowScrolling nodes.
3028         
3029         Move what was the "viewportSize" property onto the base class for the scrolling
3030         nodes, calling it "scrollableAreaSize".
3031         
3032         Make minimum/maximumScrollPosition() virtual so we can share more code (and there
3033         is more code sharing to be done in future).
3034
3035         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3036         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
3037         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
3038         (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
3039         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
3040         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
3041         (ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode):
3042         (WebKit::encodeNodeAndDescendants):
3043         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
3044         (WebKit::RemoteScrollingTreeTextStream::dump):
3045         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3046         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
3047         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
3048         (WebKit::RemoteScrollingTree::createNode):
3049         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
3050         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollLayer):
3051         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
3052         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3053         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
3054         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
3055         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
3056         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
3057         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
3058         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
3059         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
3060
3061 2014-05-19  Alexey Proskuryakov  <ap@apple.com>
3062
3063         [Mac] Fix a typo in plug-in sandbox
3064         https://bugs.webkit.org/show_bug.cgi?id=133074
3065
3066         Reviewed by Anders Carlsson.
3067
3068         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3069
3070 2014-05-16  Andy Estes  <aestes@apple.com>
3071
3072         [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
3073         https://bugs.webkit.org/show_bug.cgi?id=133010
3074
3075         Reviewed by Geoffrey Garen.
3076
3077         If a thread is blocked on m_waitForMessageCondition and we lose our connection, treat that like we do a timeout.
3078
3079         * Platform/IPC/Connection.cpp:
3080         (IPC::Connection::Connection):
3081         (IPC::Connection::waitForMessage):
3082         (IPC::Connection::connectionDidClose):
3083         * Platform/IPC/Connection.h:
3084
3085 2014-05-19  Mark Rowe  <mrowe@apple.com>
3086
3087         Build fix after r169023.
3088
3089         * Shared/API/Cocoa/WebKitPrivate.h: Stop including headers that no longer exist.
3090         I hope for weinig's sake that no-one was relying on them.
3091
3092 2014-05-18  Anders Carlsson  <andersca@apple.com>
3093
3094         Relax an assertion when creating document loaders
3095         https://bugs.webkit.org/show_bug.cgi?id=133058
3096
3097         Reviewed by Sam Weinig.
3098
3099         When navigating back/forward items recursively, createDocumentLoader will be called
3100         for subframes before main frames so only associate the navigation with main frames.
3101
3102         * WebProcess/WebPage/WebPage.cpp:
3103         (WebKit::WebPage::createDocumentLoader):
3104
3105 2014-05-18  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
3106
3107         CMake Buildfix after r169023.
3108
3109         Reviewed by Csaba Osztrogonác.
3110
3111         * CMakeLists.txt: Add new files after r168994.
3112
3113 2014-05-18  Sam Weinig  <sam@webkit.org>
3114
3115         [WebKit2] Implement ScriptMessageHandlers
3116         https://bugs.webkit.org/show_bug.cgi?id=133053
3117
3118         Reviewed by Anders Carlsson.
3119
3120         * DerivedSources.make:
3121         * Scripts/webkit2/messages.py:
3122         (struct_or_class):
3123         (argument_coder_headers_for_type):
3124         (headers_for_type):
3125         * UIProcess/API/Cocoa/WKScriptMessage.mm:
3126         (-[WKScriptMessage _initWithBody:webView:name:]):
3127         (-[WKScriptMessage body]):
3128         (-[WKScriptMessage webView]):
3129         (-[WKScriptMessage name]):
3130         (-[WKScriptMessage _scriptWorld]): Deleted.
3131         * UIProcess/API/Cocoa/WKScriptMessageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessagePrivate.h.
3132         * UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Removed.
3133         * UIProcess/API/Cocoa/WKUserContentController.mm:
3134         (-[WKUserContentController addScriptMessageHandler:name:]):
3135         (-[WKUserContentController removeScriptMessageHandlerForName:]):
3136         (-[WKUserContentController _addScriptMessageHandler:name:world:]): Deleted.
3137         (-[WKUserContentController _removeScriptMessageHandlerForName:world:]): Deleted.
3138         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
3139         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Removed.
3140         * UIProcess/API/Cocoa/WKWebView.mm:
3141         (pageToViewMap):
3142         (fromWebPageProxy):
3143         (-[WKWebView initWithFrame:configuration:]):
3144         (-[WKWebView dealloc]):
3145         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3146         * UIProcess/UserContent/WebScriptMessageHandler.cpp: Added.
3147         (WebKit::WebScriptMessageHandlerHandle::encode):
3148         (WebKit::WebScriptMessageHandlerHandle::decode):
3149         (WebKit::generateIdentifier):
3150         (WebKit::WebScriptMessageHandler::create):
3151         (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
3152         (WebKit::WebScriptMessageHandler::~WebScriptMessageHandler):
3153         * UIProcess/UserContent/WebScriptMessageHandler.h: Added.
3154         (WebKit::WebScriptMessageHandler::Client::~Client):
3155         (WebKit::WebScriptMessageHandler::handle):
3156         (WebKit::WebScriptMessageHandler::identifier):
3157         (WebKit::WebScriptMessageHandler::name):
3158         (WebKit::WebScriptMessageHandler::client):
3159         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3160         (WebKit::WebUserContentControllerProxy::addProcess):
3161         (WebKit::WebUserContentControllerProxy::removeProcess):
3162         (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
3163         (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
3164         (WebKit::WebUserContentControllerProxy::didPostMessage):
3165         * UIProcess/UserContent/WebUserContentControllerProxy.h:
3166         * UIProcess/UserContent/WebUserContentControllerProxy.messages.in: Added.
3167         * WebKit2.xcodeproj/project.pbxproj:
3168         * WebProcess/UserContent/WebUserContentController.cpp:
3169         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
3170         (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
3171         (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
3172         (WebKit::WebUserMessageHandlerDescriptorProxy::descriptor):
3173         (WebKit::WebUserMessageHandlerDescriptorProxy::identifier):
3174         (WebKit::WebUserMessageHandlerDescriptorProxy::WebUserMessageHandlerDescriptorProxy):
3175         (WebKit::WebUserContentController::addUserScriptMessageHandlers):
3176         (WebKit::WebUserContentController::removeUserScriptMessageHandler):
3177         * WebProcess/UserContent/WebUserContentController.h:
3178         * WebProcess/UserContent/WebUserContentController.messages.in:
3179
3180 2014-05-18  Rik Cabanier  <cabanier@adobe.com>
3181
3182         support for navigator.hardwareConcurrency
3183         https://bugs.webkit.org/show_bug.cgi?id=132588
3184
3185         Reviewed by Filip Pizlo.
3186
3187         * Configurations/FeatureDefines.xcconfig:
3188
3189 2014-05-18  Anders Carlsson  <andersca@apple.com>
3190
3191         Implement Navigations for all methods declared returning one
3192         https://bugs.webkit.org/show_bug.cgi?id=133048
3193         <rdar://problem/16830064>
3194
3195         Reviewed by Sam Weinig.
3196
3197         * UIProcess/API/Cocoa/WKWebView.mm:
3198         (-[WKWebView goToBackForwardListItem:]):
3199         (-[WKWebView goBack]):
3200         (-[WKWebView goForward]):
3201         (-[WKWebView reload]):
3202         (-[WKWebView reloadFromOrigin]):
3203         Create and return navigations.
3204
3205         (-[WKWebView _reload]):
3206         Call -[WKWebView reload].
3207
3208         * UIProcess/Cocoa/NavigationState.h:
3209         * UIProcess/Cocoa/NavigationState.mm:
3210         (WebKit::NavigationState::createBackForwardNavigation):
3211         Create a back/forward navigation.
3212
3213         (WebKit::NavigationState::createReloadNavigation):
3214         Create a reload navigation.
3215
3216         * UIProcess/WebPageProxy.cpp:
3217         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3218         Generate a navigation ID and send it with the GoToBackForwardItem message.
3219
3220         (WebKit::WebPageProxy::reload):
3221         Return a navigation ID.
3222
3223         (WebKit::WebPageProxy::goForward):
3224         Generate a navigation ID and send it with the GoForward message.
3225         
3226         (WebKit::WebPageProxy::goBack):
3227         Generate a navigation ID and send it with the GoBack message.
3228
3229         (WebKit::WebPageProxy::goToBackForwardItem):
3230         Generate a navigation ID and send it with the GoToBackForwardItem message.
3231
3232         * UIProcess/WebPageProxy.h:
3233         Return navigation IDs where appropriate.
3234
3235         * UIProcess/cf/WebPageProxyCF.cpp:
3236         (WebKit::WebPageProxy::restoreFromSessionStateData):
3237         Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.
3238         
3239         * WebProcess/WebPage/WebPage.cpp:
3240         (WebKit::WebPage::goForward):
3241         (WebKit::WebPage::goBack):
3242         (WebKit::WebPage::goToBackForwardItem):
3243         Set up the pending navigation ID.
3244
3245         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
3246         Call goToBackForwardItem with a navigation ID.
3247
3248         * WebProcess/WebPage/WebPage.h:
3249         Add navigation IDs.
3250
3251         * WebProcess/WebPage/WebPage.messages.in:
3252         Add navigation IDs.
3253
3254 2014-05-18  Commit Queue  <commit-queue@webkit.org>
3255
3256         Unreviewed, rolling out r169001.
3257         https://bugs.webkit.org/show_bug.cgi?id=133050
3258
3259         We can't expose the C SPI from WKWebView (Requested by
3260         andersca on #webkit).
3261
3262         Reverted changeset:
3263
3264         "Need a way to get a WKPageRef from a WKWebView"
3265         https://bugs.webkit.org/show_bug.cgi?id=133015
3266         http://trac.webkit.org/changeset/169001
3267
3268 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
3269
3270         [WK2][GTK] Buildfix after r168999.
3271
3272         Reviewed by Csaba Osztrogonác.
3273
3274         * UIProcess/gtk/WebContextGtk.cpp:
3275         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
3276         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
3277
3278 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
3279
3280         [WK2][EFL] Buildfix after r168999.
3281
3282         Reviewed by Csaba Osztrogonác.
3283
3284         * UIProcess/efl/WebContextEfl.cpp:
3285         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
3286         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
3287
3288 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
3289
3290         [WK2][cmake] Buildfix after r168994.
3291
3292         Reviewed by Csaba Osztrogonác.
3293
3294         * CMakeLists.txt: Added new files to the build system introduced in r168994.
3295
3296 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
3297
3298         REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
3299         https://bugs.webkit.org/show_bug.cgi?id=133007
3300         <rdar://problem/13702706>
3301
3302         appcache tests often fail on the Mac WebKit2 bot
3303         https://bugs.webkit.org/show_bug.cgi?id=82061
3304
3305         Reviewed by Maciej Stachowiak.
3306
3307         * WebProcess/Network/WebResourceLoader.cpp:
3308         (WebKit::WebResourceLoader::willSendRequest):
3309         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
3310         (WebKit::WebResourceLoader::didFailResourceLoad):
3311         Perform the same appcache checks that ResourceHandleClient implementation in ResourceLoader
3312         does. We should eventually come up with a way to share the code. Perhaps add a class that
3313         isolates ResourceLoader from networking details? But ResourceLoader was itself supposed
3314         to be the class that isolates DocumentLoader from networking details. So, unsure.
3315
3316 2014-05-17  Jae Hyun Park  <jaepark@webkit.org>
3317
3318         [EFL] Remove m_contentPosition from PageViewportControllerClientEfl
3319         https://bugs.webkit.org/show_bug.cgi?id=132774
3320
3321         Reviewed by Anders Carlsson.
3322
3323         m_contentPosition is not used anywhere. So, this patch removes
3324         m_contentPosition and reduces one unnecessary assignment in
3325         setViewportPosition. Also, it renames contentsPoint to contentsPosition.
3326
3327         * UIProcess/PageViewportControllerClient.h:
3328         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
3329         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
3330         * UIProcess/efl/PageViewportControllerClientEfl.h:
3331
3332 2014-05-17  David Kilzer  <ddkilzer@apple.com>
3333
3334         Need a way to get a WKPageRef from a WKWebView
3335         <http://webkit.org/b/133015>
3336
3337         Reviewed by Benjamin Poulain.
3338
3339         * UIProcess/API/Cocoa/WKWebView.mm:
3340         (-[WKWebView _pageRef]): Added.
3341         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3342         (-[WKWebView _pageRef]): Added declaration.
3343
3344 2014-05-17  Anders Carlsson  <andersca@apple.com>
3345
3346         Give user scripts custom URLs
3347         https://bugs.webkit.org/show_bug.cgi?id=133035
3348
3349         Reviewed by Beth Dakin.
3350
3351         * UIProcess/API/Cocoa/WKUserContentController.mm:
3352         (-[WKUserContentController addUserScript:]):
3353         Create a user-script:<number> URL for user scripts.
3354
3355         * UIProcess/API/Cocoa/WKUserScript.h:
3356         Move the init method after the properties.
3357
3358 2014-05-17  Anders Carlsson  <andersca@apple.com>
3359
3360         Replace WKContextSetDatabaseDirectory with two WKContextConfiguration parameters
3361         https://bugs.webkit.org/show_bug.cgi?id=133033
3362         <rdar://problem/16830143>
3363
3364         Reviewed by Sam Weinig.
3365
3366         * Shared/WebProcessCreationParameters.cpp:
3367         (WebKit::WebProcessCreationParameters::encode):
3368         (WebKit::WebProcessCreationParameters::decode):
3369         * Shared/WebProcessCreationParameters.h:
3370         Rename databaseDirectory to webSQLDatabaseDirectory to better indicate the directory type.
3371
3372         * UIProcess/API/C/WKContext.cpp:
3373         (WKContextSetDatabaseDirectory): Deleted.
3374         This is no longer needed.
3375
3376         * UIProcess/API/C/WKContextConfigurationRef.cpp:
3377         (WKContextConfigurationCopyIndexedDBDatabaseDirectory):
3378         (WKContextConfigurationSetIndexedDBDatabaseDirectory):
3379         (WKContextConfigurationCopyWebSQLDatabaseDirectory):
3380         (WKContextConfigurationSetWebSQLDatabaseDirectory):
3381         * UIProcess/API/C/WKContextConfigurationRef.h:
3382         Add setters and getters.
3383
3384         * UIProcess/API/C/WKContextPrivate.h:
3385         Remove WKContextSetDatabaseDirectory.
3386
3387         * UIProcess/APIContextConfiguration.cpp:
3388         (API::ContextConfiguration::webContextConfiguration):
3389         Set m_indexedDBDatabaseDirectory and m_webSQLDatabaseDirectory on the configuration.
3390
3391         * UIProcess/APIContextConfiguration.h:
3392         (API::ContextConfiguration::indexedDBDatabaseDirectory):
3393         (API::ContextConfiguration::setIndexedDBDatabaseDirectory):
3394         (API::ContextConfiguration::webSQLDatabaseDirectory):
3395         (API::ContextConfiguration::setWebSQLDatabaseDirectory):
3396         Add getters and setters to the C++ part of WKContextConfigurationRef.
3397
3398         * UIProcess/WebContext.cpp:
3399         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
3400         Set webSQLDatabaseDirectory and indexedDBDatabaseDirectory.
3401
3402         (WebKit::WebContext::WebContext):
3403         Initialize m_webSQLDatabaseDirectory and m_indexedDBDatabaseDirectory.
3404
3405         (WebKit::WebContext::ensureDatabaseProcess):
3406         Set parameters.indexedDatabaseDirectory from m_indexedDBDatabaseDirectory.
3407
3408         (WebKit::WebContext::createNewWebProcess):
3409         Set parameters.webSQLDatabaseDirectory from m_webSQLDatabaseDirectory.
3410
3411         * UIProcess/mac/WebContextMac.mm:
3412         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
3413         Rename this to indicate that it's about WebSQL databases.
3414
3415         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
3416         Add this.
3417
3418         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3419         (WebKit::WebDatabaseManager::initialize):
3420         Update for WebProcessCreationParameters rename.
3421
3422         * WebProcess/cocoa/WebProcessCocoa.mm:
3423         (WebKit::WebProcess::platformInitializeWebProcess):
3424         Update for WebProcessCreationParameters rename.
3425
3426 2014-05-17  Brent Fulgham  <bfulgham@apple.com>
3427
3428         [Phone Number Detection] drop-down menu in the phone number detection box doesn't appear.
3429         https://bugs.webkit.org/show_bug.cgi?id=133024
3430
3431         Reviewed by Sam Weinig.
3432
3433         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
3434         (WebKit::TelephoneNumberOverlayController::drawRect): Don't clear the set of found phone numbers each
3435         time we call drawRect. This gets called ~9 times per screen refresh, so end up with no active
3436         phone numbers to interact with.
3437
3438 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
3439
3440         NetworkProcess can repeatedly crash handling Blob messages after any unrelated crash
3441         https://bugs.webkit.org/show_bug.cgi?id=133032
3442         <rdar://problem/16951630>
3443
3444         Reviewed by Geoffrey Garen.
3445
3446         Replaced assertions with runtime checks. This can happen if NetworkProcess previously
3447         crashed for any unrelated reason.
3448
3449         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3450         (WebKit::NetworkBlobRegistry::registerBlobURL):
3451         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
3452         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
3453
3454 2014-05-17  Anders Carlsson  <andersca@apple.com>
3455
3456         -[WKWebView dealloc] should close the page
3457         https://bugs.webkit.org/show_bug.cgi?id=133031
3458         <rdar://problem/16929815>
3459
3460         Reviewed by Simon Fraser.
3461
3462         * UIProcess/API/Cocoa/WKWebView.mm:
3463         (-[WKWebView dealloc]):
3464
3465 2014-05-16  Anders Carlsson  <andersca@apple.com>
3466
3467         Expose WKUserScript as API
3468         https://bugs.webkit.org/show_bug.cgi?id=133017
3469         <rdar://problem/16948059>
3470
3471         Reviewed by Sam Weinig.
3472
3473         * DerivedSources.make:
3474         Add WebUserContentController.
3475
3476         * Shared/API/Cocoa/WebKit.h:
3477         Add WKUserScript.h
3478
3479         * Shared/API/c/WKSharedAPICast.h:
3480         (WebKit::toUserScriptInjectionTime):
3481         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
3482
3483         * Shared/API/c/WKUserScriptInjectionTime.h:
3484         Rename WKUserScriptInjectionTime to _WKUserScriptInjectionTime to free up the name for the Objective-C API
3485
3486         * Shared/WebPageCreationParameters.cpp:
3487         (WebKit::WebPageCreationParameters::encode):
3488         Encode the user content controller ID.
3489
3490         (WebKit::WebPageCreationParameters::decode):
3491         Decode the user content controller ID.
3492
3493         * Shared/WebPageCreationParameters.h:
3494         Add userContentControllerID.
3495
3496         * UIProcess/API/C/WKPageGroup.cpp:
3497         (WKPageGroupAddUserScript):
3498         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
3499
3500         * UIProcess/API/C/WKPageGroup.h:
3501         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
3502
3503         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
3504         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
3505
3506         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
3507         (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
3508         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
3509
3510         * UIProcess/API/Cocoa/WKUserContentController.h:
3511         Add new methods.
3512
3513         * UIProcess/API/Cocoa/WKUserContentController.mm:
3514         (-[WKUserContentController init]):
3515         Create the WebUserContentControllerProxy object and user scripts array.
3516
3517         (-[WKUserContentController userScripts]):
3518         Return the user scripts array.
3519
3520         (toWebCoreUserScriptInjectionTime):
3521         Helper for converting from a WKUserScriptInjectionTime enum to WebCore::UserScriptInjectionTime.
3522
3523         (-[WKUserContentController addUserScript:]):
3524         Call through to the _userContentControllerProxy object.
3525
3526         (-[WKUserContentController removeAllUserScripts]):
3527         Call through to the _userContentControllerProxy object.
3528         
3529         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h: Added.
3530         Add WebUserContentControllerProxy ivar.
3531
3532         * UIProcess/API/Cocoa/WKUserScript.h: Added.
3533         Add new header.
3534
3535         * UIProcess/API/Cocoa/WKUserScript.mm:
3536         (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
3537         Initialize the WKUserScript object.
3538
3539         (-[WKUserScript source]):
3540         (-[WKUserScript injectionTime]):
3541         (-[WKUserScript isForMainFrameOnly]):
3542         Add getters.
3543
3544         (-[WKUserScript copyWithZone:]):
3545         Since WKUserScript is immutable, just return a retained object.
3546
3547         * UIProcess/API/Cocoa/WKUserScriptInternal.h:
3548         Add ivars.
3549
3550         * UIProcess/API/Cocoa/WKWebView.mm:
3551         (-[WKWebView initWithFrame:configuration:]):
3552         Set the user content controller from the configuration.
3553
3554         * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added.
3555         (WebKit::generateIdentifier):
3556         Return a unique identifier.
3557
3558         (WebKit::WebUserContentControllerProxy::create):
3559         Return a new WebUserContentControllerProxy object.
3560
3561         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
3562         Initialize m_identifier.
3563
3564         (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
3565         Add destructor.
3566
3567         (WebKit::WebUserContentControllerProxy::addProcess):
3568         Add the process to the m_processes set. If it's the first time doing so, add the user scripts we know about.
3569
3570         (WebKit::WebUserContentControllerProxy::removeProcess):
3571         Remove the process from m_processes.
3572
3573         (WebKit::WebUserContentControllerProxy::addUserScript):
3574         Add the user script and let all the web processes know that it was added.
3575
3576         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
3577         Remove all user scripts and tell all the web processes about it.
3578         
3579         * UIProcess/UserContent/WebUserContentControllerProxy.h:
3580         Add new class.
3581
3582         * UIProcess/WebPageProxy.cpp:
3583         (WebKit::WebPageProxy::WebPageProxy):
3584         If the process is already running, add it to the user content controller.
3585
3586         (WebKit::WebPageProxy::close):
3587         If the process is running, remove it from the user content controller.
3588
3589         (WebKit::WebPageProxy::connectionWillOpen):
3590         Add the process to the user content controller.
3591
3592         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3593         Remove the process from the user content controller.
3594
3595         (WebKit::WebPageProxy::creationParameters):
3596         Pass along the user content controller ID when creating the web page.
3597
3598         * UIProcess/WebPageProxy.h:
3599         Add a WebUserContentControllerProxy object to the web page configuration.
3600
3601         * WebKit2.xcodeproj/project.pbxproj:
3602         Add new files.
3603
3604         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3605         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3606         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
3607         
3608         * WebProcess/UserContent/WebUserContentController.cpp: Added.
3609         New class that manages a WebCore::UserContentController object.
3610
3611         (WebKit::WebUserContentController::getOrCreate):
3612         Look up (or create) a WebUserContentController object given its identifier.
3613
3614         (WebKit::WebUserContentController::WebUserContentController):
3615         Add ourselves as a message receiver.
3616
3617         (WebKit::WebUserContentController::~WebUserContentController):
3618         Remove ourselves as a message receiver.
3619
3620         (WebKit::WebUserContentController::addUserScripts):
3621         Add all passed in user scripts to the WebCore user content controller object.
3622
3623         (WebKit::WebUserContentController::removeAllUserScripts):
3624         Remove all user scripts from the WebCore user content controller object.
3625
3626         * WebProcess/UserContent/WebUserContentController.messages.in: Added.
3627         Add new messages file.
3628
3629         * WebProcess/WebPage/WebPage.cpp:
3630         (WebKit::WebPage::WebPage):
3631         Get a WebUserContentController object and pass it along to WebCore.
3632
3633         * WebProcess/WebPage/WebPage.h:
3634         Add WebUserContentController member.
3635
3636 2014-05-16  Piotr Grad  <p.grad@samsung.com>
3637
3638         [GTK] Build break after 168978.
3639         https://bugs.webkit.org/show_bug.cgi?id=133012.
3640
3641         Reviewed by Simon Fraser.
3642
3643         * UIProcess/API/gtk/WebKitSettings.cpp:
3644         (webKitSettingsConstructed):
3645
3646 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
3647
3648         Put back a symbol removed in r168978 that Safari needs, but deprecate it.
3649
3650         Reviewed by Anders Carlsson.
3651
3652         * Shared/API/c/WKDeprecatedFunctions.cpp:
3653         (WKPreferencesSetRegionBasedColumnsEnabled):
3654         (WKPreferencesGetRegionBasedColumnsEnabled):
3655
3656 2014-05-16  Oliver Hunt  <oliver@apple.com>
3657
3658         Separate enabling sandbox extensions from the WEB_PROCESS_SANDBOX flag
3659         https://bugs.webkit.org/show_bug.cgi?id=133016
3660
3661         Reviewed by Alexey Proskuryakov.
3662
3663         Add a distinct SANDBOX_EXTENSIONS flag to guard sandbox extensions
3664         and switch over to it in the places that extensions are used.
3665
3666         * Shared/SandboxExtension.h:
3667         * Shared/mac/SandboxExtensionMac.mm:
3668         * UIProcess/WebPageProxy.cpp:
3669         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
3670         * WebKit2Prefix.h:
3671         * WebProcess/WebPage/WebPage.cpp:
3672         * WebProcess/WebPage/WebPage.h:
3673         * WebProcess/WebPage/WebPage.messages.in:
3674         * WebProcess/cocoa/WebProcessCocoa.mm:
3675         (WebKit::WebProcess::platformInitializeWebProcess):
3676
3677 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
3678
3679         [iOS][WK2] Add a heuristic to set the right horizontal offset on rotation for responsive websites
3680         https://bugs.webkit.org/show_bug.cgi?id=132937
3681         <rdar://problem/16710097>
3682
3683         Reviewed by Simon Fraser.
3684
3685         When responsive websites have the content size lay out larger than the minimal layout size,
3686         we should not keep the relative horizontal position into view,
3687         many of those websites have all the content on the left.
3688
3689         * WebProcess/WebPage/ios/WebPageIOS.mm:
3690         (WebKit::WebPage::dynamicViewportSizeUpdate):
3691
3692 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
3693
3694         [iOS][WK2] On dynamic resize, the content offset is contrained to the old content size
3695         https://bugs.webkit.org/show_bug.cgi?id=132972
3696
3697         Reviewed by Simon Fraser.
3698
3699         When we set the content offset, UIScrollView limits the value to the current valid range for
3700         content size. Since the content size was only updated after the animation, when the first frame
3701         comes in, the content offset would sometimes be limited to a smaller rect that the actual content.
3702
3703         To fix this, set the expected future content size before changing the offset.
3704
3705         During the animation, the content size could have changed arbitrarily. At the end of the animation,
3706         we take the actual frame and set the definite content size.
3707         Any update after that will be regular updates through didCommitLayer. 
3708
3709         * UIProcess/API/Cocoa/WKWebView.mm:
3710         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3711         (-[WKWebView _endAnimatedResize]):
3712
3713 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
3714
3715         Remove "region-based columns" prefs
3716         https://bugs.webkit.org/show_bug.cgi?id=133006
3717         <rdar://problem/16945824>
3718
3719         Reviewed by Dave Hyatt.
3720
3721         Remove "region-based columns" prefs and related code, since this is only
3722         way to render columns now.
3723
3724         * Shared/WebPreferencesStore.h:
3725         * UIProcess/API/C/WKPreferences.cpp:
3726         (WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
3727         (WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
3728         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3729         * WebProcess/WebPage/WebPage.cpp:
3730         (WebKit::WebPage::updatePreferences):
3731
3732 2014-05-16  Brent Fulgham  <bfulgham@apple.com>
3733
3734         Work around bug in Silverlight
3735         https://bugs.webkit.org/show_bug.cgi?id=133004
3736
3737         Reviewed by Anders Carlsson.
3738
3739         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
3740         (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Add low-resolution flag
3741         to user defaults prior to NSApplication invocation. This code was moved from
3742         PluginProcess::platformInitializeProcess.
3743         * PluginProcess/mac/PluginProcessMac.mm:
3744         (WebKit::PluginProcess::platformInitializeProcess): Move low-resolution flag
3745         setting to PluginProcessMainDelegate.
3746
3747 2014-05-16  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
3748
3749         [WK2] Change the remaining framework includes from WebKit2 to WebKit
3750         https://bugs.webkit.org/show_bug.cgi?id=132956
3751
3752         Reviewed by Sam Weinig.
3753
3754         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
3755         * NetworkProcess/unix/NetworkProcessMainUnix.h:
3756         * PluginProcess/unix/PluginProcessMainUnix.h:
3757         * Shared/API/c/cairo/WKImageCairo.h:
3758         * Shared/API/c/cf/WKURLRequestCF.h:
3759         * Shared/API/c/cf/WKURLResponseCF.h:
3760         * Shared/API/c/efl/WKArrayEfl.cpp:
3761         * Shared/API/c/efl/WKArrayEfl.h:
3762         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3763         * UIProcess/API/C/WKBatteryManager.h:
3764         * UIProcess/API/C/WKBatteryStatus.h:
3765         * UIProcess/API/C/WKGrammarDetail.h:
3766         * UIProcess/API/C/WKTextChecker.h:
3767         * UIProcess/API/C/WKVibration.h:
3768         * UIProcess/API/C/WKViewportAttributes.h:
3769         * UIProcess/API/C/cairo/WKIconDatabaseCairo.h:
3770         * UIProcess/API/C/efl/WKAPICastEfl.h:
3771         * UIProcess/API/C/efl/WKColorPickerResultListener.h:
3772         * UIProcess/API/C/efl/WKEventEfl.h:
3773         * UIProcess/API/C/efl/WKPageEfl.h:
3774         * UIProcess/API/C/efl/WKPopupItem.h:
3775         * UIProcess/API/C/efl/WKPopupMenuListener.h:
3776         * UIProcess/API/C/efl/WKViewEfl.cpp:
3777         * UIProcess/API/C/efl/WKViewEfl.h:
3778         * UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
3779         * UIProcess/API/C/gtk/WKInspectorClientGtk.h:
3780         * UIProcess/API/C/gtk/WKView.h:
3781         * UIProcess/API/C/gtk/WKViewPrivate.h:
3782         * UIProcess/API/C/soup/WKContextSoup.h:
3783         * UIProcess/API/C/soup/WKCookieManagerSoup.h:
3784         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h:
3785         * UIProcess/API/C/soup/WKSoupRequestManager.h:
3786         * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h:
3787         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
3788         * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
3789         * UIProcess/API/cpp/efl/WKEinaSharedString.h:
3790         * UIProcess/API/efl/EwkView.cpp:
3791         * UIProcess/API/efl/EwkView.h:
3792         * UIProcess/API/efl/EwkViewCallbacks.h:
3793         * UIProcess/API/efl/GestureRecognizer.h:
3794         * UIProcess/API/efl/ewk_application_cache_manager_private.h:
3795         * UIProcess/API/efl/ewk_auth_request_private.h:
3796         * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
3797         * UIProcess/API/efl/ewk_back_forward_list_private.h:
3798         * UIProcess/API/efl/ewk_context_menu_item.cpp:
3799         * UIProcess/API/efl/ewk_context_private.h:
3800         * UIProcess/API/efl/ewk_cookie_manager_private.h:
3801         * UIProcess/API/efl/ewk_database_manager_private.h:
3802         * UIProcess/API/efl/ewk_error_private.h:
3803         * UIProcess/API/efl/ewk_favicon_database_private.h:
3804         * UIProcess/API/efl/ewk_file_chooser_request_private.h:
3805         * UIProcess/API/efl/ewk_page_group_private.h:
3806         * UIProcess/API/efl/ewk_popup_menu_item_private.h:
3807         * UIProcess/API/efl/ewk_popup_menu_private.h:
3808         * UIProcess/API/efl/ewk_security_origin_private.h:
3809         * UIProcess/API/efl/ewk_settings_private.h:
3810         * UIProcess/API/efl/ewk_storage_manager_private.h:
3811         * UIProcess/API/efl/ewk_view.cpp:
3812         * UIProcess/API/efl/ewk_view_private.h:
3813         * UIProcess/API/efl/ewk_window_features_private.h:
3814         * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp:
3815         * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
3816         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
3817         * UIProcess/API/gtk/WebKitPrivate.h:
3818         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
3819         * UIProcess/efl/BatteryProvider.h:
3820         * UIProcess/efl/ContextHistoryClientEfl.h:
3821         * UIProcess/efl/DownloadManagerEfl.h:
3822         * UIProcess/efl/FindClientEfl.h:
3823         * UIProcess/efl/FormClientEfl.h:
3824         * UIProcess/efl/PageLoadClientEfl.h:
3825         * UIProcess/efl/PagePolicyClientEfl.h:
3826         * UIProcess/efl/PageUIClientEfl.h:
3827         * UIProcess/efl/RequestManagerClientEfl.h:
3828         * UIProcess/efl/TextCheckerClientEfl.h:
3829         * UIProcess/efl/VibrationClientEfl.h:
3830         * UIProcess/efl/ViewClientEfl.cpp:
3831         * UIProcess/efl/ViewClientEfl.h:
3832         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3833         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
3834         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
3835         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
3836         * WebProcess/efl/SeccompFiltersWebProcessEfl.h:
3837         * WebProcess/efl/WebProcessMainEfl.cpp:
3838         * WebProcess/efl/WebProcessMainEfl.h:
3839         * WebProcess/gtk/WebGtkInjectedBundleMain.cpp:
3840         * WebProcess/gtk/WebProcessMainGtk.cpp:
3841         * WebProcess/gtk/WebProcessMainGtk.h:
3842         * mac/WKPreferences.h:
3843
3844 2014-05-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3845
3846         [EFL][WK2] Skip failing unit tests
3847         https://bugs.webkit.org/show_bug.cgi?id=132979
3848
3849         Reviewed by Daniel Bates.
3850
3851         * PlatformEfl.cmake: Skip failing unit tests for now.
3852
3853 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
3854
3855         [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
3856         https://bugs.webkit.org/show_bug.cgi?id=132978
3857         <rdar://problem/16894428>
3858
3859         Reviewed by Benjamin Poulain.
3860         
3861         Move the static function fixedPositionRectFromExposedRect() to a member function on
3862         WebPageProxy so we can call it from more places. Also never give WebCore a customFixedPosition
3863         rect that extends past the document bounds, but allow rubber-banding/pinching in the UI process to
3864         move fixed elements outside the document.
3865         
3866         * UIProcess/PageClient.h: Need to expose minimumZoomScale() and contentsSize() to WebPageProxy.
3867         * UIProcess/WebPageProxy.h:
3868         * UIProcess/ios/PageClientImplIOS.h:
3869         * UIProcess/ios/PageClientImplIOS.mm:
3870         (WebKit::PageClientImpl::minimumZoomScale):
3871         (WebKit::PageClientImpl::contentsSize):
3872         * UIProcess/ios/WKContentView.mm:
3873         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
3874         Pass the computeCustomFixedPositionRect(ConstrainedToDocumentRect) to WebCore, but use computeCustomFixedPositionRect()
3875         for the ScrollingCoordinator update.
3876         (adjustedUnexposedEdge): Deleted.
3877         (adjustedUnexposedMaxEdge): Deleted.
3878         (fixedPositionRectFromExposedRect): Deleted.
3879         * UIProcess/ios/WebPageProxyIOS.mm:
3880         (WebKit::adjustedUnexposedEdge):
3881         (WebKit::adjustedUnexposedMaxEdge):
3882         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
3883         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3884         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): This fixes some flashing when the scrolling tree
3885         was being updated while scrolling; we now pass the correct rect.
3886
3887 2014-05-15  Mark Rowe  <mrowe@apple.com>
3888
3889         <https://webkit.org/b/132976> Move discovery of sharing services off the main thread
3890
3891         Discovery of sharing services can require disk access and IPC. Since the interface to
3892         ServicesController is already asynchronous, we can easily perform the discovery on a
3893         background queue. This can eliminate tens to hundreds of milliseconds worth of work
3894         from the main thread when creating the first web process.
3895
3896         Reviewed by Brady Eidson.
3897
3898         * UIProcess/mac/ServicesController.h:
3899         * UIProcess/mac/ServicesController.mm:
3900         (WebKit::ServicesController::ServicesController):
3901         (WebKit::ServicesController::refreshExistingServices): Bail out early if we're already
3902         in the process of refreshing the services. Kick the discovery over to a background queue,
3903         with it hopping back to the main queue to update the actual state and notify any contexts
3904         that were interested.
3905
3906 2014-05-15  Dan Bernstein  <mitz@apple.com>
3907
3908         Fixed a typo in a comment and updated previous change log entry.
3909
3910         * WebProcess/WebPage/ios/WebPageIOS.mm:
3911         (WebKit::WebPage::elementDidFocus):
3912
3913 2014-05-15  Dan Bernstein  <mitz@apple.com>
3914
3915         <rdar://problem/16844952> [iOS] www.wikipedia.org is loading much slower due to FormClient::willBeginInputSession
3916         https://bugs.webkit.org/show_bug.cgi?id=132974
3917
3918         Reviewed by Enrica Casucci.
3919
3920         * WebProcess/WebPage/ios/WebPageIOS.mm:
3921         (WebKit::WebPage::elementDidFocus): Don’t call FormClient::willBeginInputSession if the
3922         focus isn’t user-initiated, because in that case the UI process will bail out of
3923         -_startAssistingNode:userIsInteracting:userObject: before creating an input session and
3924         calling the -_webView:didStartInputSession:.
3925
3926 2014-05-15  Benjamin Poulain  <bpoulain@apple.com>
3927
3928         [iOS][WK2] WKWebView sends invalid content offsets at the end of animated resize
3929         https://bugs.webkit.org/show_bug.cgi?id=132941
3930         <rdar://problem/16921557>
3931
3932         Reviewed by Tim Horton.
3933
3934         Since we cannot change the scale and content inset simultaneously while accounting for the obscured insets,
3935         we end up with invalid contentOffsets.
3936
3937         To work around the problem, change the content scale outside of UIScrollView to ensure none of the side effect
3938         happens.
3939
3940         * UIProcess/API/Cocoa/WKWebView.mm:
3941         (-[WKWebView _endAnimatedResize]):
3942
3943 2014-05-15  Tim Horton  <timothy_horton@apple.com>
3944
3945         WebKit2 View Gestures (Zoom): Document size changes during zoom gesture cause erratic scrolling
3946         https://bugs.webkit.org/show_bug.cgi?id=132944
3947         <rdar://problem/15769454>
3948
3949         Reviewed by Simon Fraser.
3950
3951         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3952         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3953         If a layer flush occurs and we have an active transient zoom,
3954         re-apply the transient zoom to the relevant platform layers, because
3955         WebCore might have overwritten the relevant layer properties.
3956
3957         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
3958         Reset m_transientZoomScale before flushLayers() so that we don't
3959         re-apply the transient zoom when we're actually trying to commit it.
3960
3961 2014-05-15  Alex Christensen  <achristensen@webkit.org>
3962
3963         Add pointer lock to features without enabling it.
3964         https://bugs.webkit.org/show_bug.cgi?id=132961
3965
3966         Reviewed by Sam Weinig.
3967
3968         * Configurations/FeatureDefines.xcconfig:
3969         Added ENABLE_POINTER_LOCK to list of features.
3970
3971 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
3972
3973         [UI-side compositing] Fix copying animations between layers, and pausing them
3974         https://bugs.webkit.org/show_bug.cgi?id=132943
3975         <rdar://problem/16906369&16906541>
3976
3977         Reviewed by Tim Horton.
3978         
3979         Fix PlatformCAAnimationRemote to support animation copying, and to record
3980         the beginTime for implicitly started animations. This fixes animation pausing,
3981         and copying of animations between layers when they go between tiled and non-tiled.
3982         
3983         This requires sending the animation key back through animationDidStart() so that
3984         we can record this beginTime on the PlatformCAAnimationRemote in the web process.
3985         This path doesn't set the "hasExplicitBeginTime" flag.
3986         
3987         PlatformCAAnimationRemote also now stores a hash of active animations, so that
3988         it can implement animationForKey(), and record the beginTime.
3989
3990         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3991         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3992         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
3993         * UIProcess/mac/RemoteLayerTreeHost.h:
3994         * UIProcess/mac/RemoteLayerTreeHost.mm:
3995         (WebKit::RemoteLayerTreeHost::animationDidStart): Grovel for the key for this
3996         animation; sadly CA doesn't give us an easier way.
3997         * WebProcess/WebPage/DrawingArea.h:
3998         (WebKit::DrawingArea::acceleratedAnimationDidStart):
3999         * WebProcess/WebPage/DrawingArea.messages.in:
4000         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
4001         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
4002         (-[WKAnimationDelegate animationDidStart:]):
4003         (WebKit::PlatformCAAnimationRemote::copy):
4004         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
4005         (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
4006         (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
4007         (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
4008         (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
4009         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
4010         (WebKit::addAnimationToLayer):
4011         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
4012         (WebKit::PlatformCALayerRemote::addAnimationForKey):
4013         (WebKit::PlatformCALayerRemote::removeAnimationForKey):
4014         (WebKit::PlatformCALayerRemote::animationForKey):
4015         (WebKit::PlatformCALayerRemote::animationStarted):
4016         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
4017         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
4018         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
4019         (WebKit::RemoteLayerTreeContext::animationDidStart):
4020         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
4021         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
4022         (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
4023
4024 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
4025
4026         Clean up "has non-zero begin time" terminology in animations
4027         https://bugs.webkit.org/show_bug.cgi?id=132942
4028
4029         Reviewed by Tim Horton.
4030
4031         Change the "non-zero beginTime" terminology in the platform CA animations
4032         code to "explicit beginTime": this flag really means that we explicitly set
4033         the beginTime of the animation, rather than let CA set the beginTime when
4034         committing the animation. This flag is used for animations with negative
4035         delay, and when pausing.
4036
4037         * Shared/mac/RemoteLayerTreeTransaction.mm:
4038         (WebKit::RemoteLayerTreeTextStream::operator<<):
4039         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
4040         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: