[iOS] enable background audio in WK2
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-06-17  Eric Carlson  <eric.carlson@apple.com>
2
3         [iOS] enable background audio in WK2
4         https://bugs.webkit.org/show_bug.cgi?id=133996
5
6         Reviewed by Jer Noble.
7
8         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist: Mark as
9             allowed to play audio when in the background.
10         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.
11
12 2014-06-17  Simon Fraser  <simon.fraser@apple.com>
13
14         [UI-side compositing] fix reflections on composited layers
15         https://bugs.webkit.org/show_bug.cgi?id=133942
16
17         Reviewed by Tim Horton.
18         
19         Fix reflections on composited layers. There are two main set of changes.
20         
21         First, a PlatformCALayerRemote which is a clone has to track the layer
22         it is a clone of, so it knows where to grab the contents from in the UI process.
23         This layer may be told that its contents need updating out of order during
24         recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext
25         to allow a layer to add itself to the set of layers requiring commit.
26         
27         In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree()
28         to go through clones, and copy their contents from the origin layer.
29         
30         The second set of changes makes platformCALayerLayerDidDisplay() work for
31         UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*.
32         PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know
33         what the origin layer is.
34
35         * Shared/mac/RemoteLayerBackingStore.mm:
36         (WebKit::RemoteLayerBackingStore::display): Remove the early return so we can always
37         call platformCALayerLayerDidDisplay().
38         * Shared/mac/RemoteLayerTreeTransaction.h:
39         * Shared/mac/RemoteLayerTreeTransaction.mm:
40         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
41         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
42         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
43         (WebKit::dumpChangedLayers):
44         * UIProcess/mac/RemoteLayerTreeHost.mm:
45         (WebKit::RemoteLayerTreeHost::updateLayerTree):
46         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
47         (WebKit::PlatformCALayerRemote::clone):
48         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
49         (WebKit::PlatformCALayerRemote::copyContentsFromLayer):
50         (WebKit::PlatformCALayerRemote::setClonedLayer):
51         (WebKit::PlatformCALayerRemote::setContentsChanged): Deleted.
52         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
53         (WebKit::PlatformCALayerRemote::properties):
54         (WebKit::PlatformCALayerRemote::context):
55
56 2014-06-17  Anders Carlsson  <andersca@apple.com>
57
58         Remove session state methods from WKBrowsingContextController
59         https://bugs.webkit.org/show_bug.cgi?id=133995
60
61         Reviewed by Dan Bernstein.
62
63         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
64         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
65         (-[WKBrowsingContextController sessionState]): Deleted.
66         (-[WKBrowsingContextController restoreFromSessionState:]): Deleted.
67
68 2014-06-17  Brady Eidson  <beidson@apple.com>
69
70         Only show telephone number highlights if only one number is selected
71         <rdar://problem/16874568> and https://bugs.webkit.org/show_bug.cgi?id=133989
72
73         Reviewed by Tim Horton.
74
75         Add a flag to TelephoneNumberData to remember if it was hovered over:
76         * WebProcess/WebPage/TelephoneNumberOverlayController.h:
77         (WebKit::TelephoneNumberData::hovered):
78         (WebKit::TelephoneNumberData::setHovered):
79         (WebKit::TelephoneNumberData::TelephoneNumberData):
80
81         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
82         (WebKit::TelephoneNumberOverlayController::drawRect): Only draw the highlight if one
83           phone number is selected.
84         (WebKit::TelephoneNumberOverlayController::mouseEvent): Update the hover state of the
85           current phone number, and setNeedsDisplay if the hover state changes.
86         (WebKit::TelephoneNumberOverlayController::clearHighlights):
87
88 2014-06-17  Tim Horton  <timothy_horton@apple.com>
89
90         Remove WKContentView _setFindIndicator:fadeOut:animate:
91         https://bugs.webkit.org/show_bug.cgi?id=133976
92
93         Reviewed by Anders Carlsson.
94
95         Find indicators are totally internal to FindController on iOS,
96         we don't need to push them to the content view via PageClient,
97         so this code was unused.
98
99         * UIProcess/ios/PageClientImplIOS.mm:
100         (WebKit::PageClientImpl::setFindIndicator):
101         * UIProcess/ios/WKContentView.h:
102         * UIProcess/ios/WKContentView.mm:
103         (-[WKContentView _setFindIndicator:WebKit::fadeOut:animate:]): Deleted.
104
105 2014-06-17  Andreas Kling  <akling@apple.com>
106
107         Web process main thread priority is lower than some network process threads.
108         <https://webkit.org/b/133987>
109         <rdar://problem/17330300>
110
111         Mark the main thread as "user initiated" in process entry.
112
113         Reviewed by Maciej Stachowiak.
114
115         * Shared/ChildProcess.cpp:
116         (WebKit::ChildProcess::initialize):
117
118 2014-06-17  Anders Carlsson  <andersca@apple.com>
119
120         Add SPI to get the NSURLRequest from a WKNavigationResponse
121         https://bugs.webkit.org/show_bug.cgi?id=133984
122         <rdar://problem/17006399>
123
124         Reviewed by Dan Bernstein.
125
126         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
127         (-[WKNavigationResponse _request]):
128         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
129         * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h:
130         * UIProcess/Cocoa/NavigationState.mm:
131         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
132
133 2014-06-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
134
135         [EFL][WK2] Skip failing EFL API tests
136         https://bugs.webkit.org/show_bug.cgi?id=133981
137
138         Reviewed by Csaba Osztrogonác.
139
140         UserMessage, WillLoad and test_ewk2_view have been failed since r169784.
141
142         * PlatformEfl.cmake:
143
144 2014-06-17  Zan Dobersek  <zdobersek@igalia.com>
145
146         Unreviewed build fix for the GTK+ port. Removing the *Callback::create() wrappings
147         for lambda callbacks that aren't required anymore after the changes in r170041.
148
149         * UIProcess/API/gtk/WebKitWebView.cpp:
150         (webkit_web_view_can_execute_editing_command):
151         (webkit_web_view_run_javascript):
152         (resourcesStreamReadCallback):
153         (webkit_web_view_save):
154         (webkit_web_view_save_to_file):
155
156 2014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
157
158         Unreviewed build fix when MHTML is enabled after r170041
159
160         * UIProcess/API/C/WKPage.cpp:
161         (WKPageGetContentsAsMHTMLData):
162
163 2014-06-16  Dan Bernstein  <mitz@apple.com>
164
165         Part 2 of: Change GenericCallback<> function parameters into std::function<>
166         https://bugs.webkit.org/show_bug.cgi?id=133927
167
168         Reviewed by Sam Weinig.
169
170         * UIProcess/API/C/WKPage.cpp:
171         (WKPageRunJavaScriptInMainFrame):
172         (WKPageRenderTreeExternalRepresentation):
173         (WKPageGetSourceForFrame):
174         (WKPageGetContentsAsString):
175         (WKPageGetBytecodeProfile):
176         (WKPageGetSelectionAsWebArchiveData):
177         (WKPageValidateCommand):
178         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
179         (WKPluginSiteDataManagerClearSiteData):
180         (WKPluginSiteDataManagerClearAllSiteData):
181         * UIProcess/API/Cocoa/WKWebView.mm:
182         (-[WKWebView evaluateJavaScript:completionHandler:]):
183         * UIProcess/API/mac/WKView.mm:
184         (-[WKView validateUserInterfaceItem:]):
185         (-[WKView startSpeaking:]):
186         (-[WKView selectedRangeWithCompletionHandler:]):
187         (-[WKView markedRangeWithCompletionHandler:]):
188         (-[WKView hasMarkedTextWithCompletionHandler:]):
189         (-[WKView firstRectForCharacterRange:completionHandler:]):
190         (-[WKView characterIndexForPoint:completionHandler:]):
191         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
192         (WebKit::WebPluginSiteDataManager::clearSiteData):
193         * UIProcess/Plugins/WebPluginSiteDataManager.h:
194         * UIProcess/WebPageProxy.cpp:
195         (WebKit::WebPageProxy::validateCommand):
196         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
197         (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
198         (WebKit::WebPageProxy::getSourceForFrame):
199         (WebKit::WebPageProxy::getContentsAsString):
200         (WebKit::WebPageProxy::getBytecodeProfile):
201         (WebKit::WebPageProxy::getContentsAsMHTMLData):
202         (WebKit::WebPageProxy::getSelectionOrContentsAsString):
203         (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
204         (WebKit::WebPageProxy::getMarkedRangeAsync):
205         (WebKit::WebPageProxy::getSelectedRangeAsync):
206         (WebKit::WebPageProxy::characterIndexForPointAsync):
207         (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
208         (WebKit::WebPageProxy::takeSnapshot):
209         * UIProcess/WebPageProxy.h:
210         * UIProcess/ios/WKContentViewInteraction.mm:
211         (-[WKContentView _define:]):
212         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
213         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
214         (-[WKContentView requestDictationContext:]):
215         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
216         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
217         * UIProcess/ios/WebPageProxyIOS.mm:
218         (WebKit::WebPageProxy::updateSelectionWithTouches):
219         (WebKit::WebPageProxy::requestAutocorrectionData):
220         (WebKit::WebPageProxy::applyAutocorrection):
221         (WebKit::WebPageProxy::requestDictationContext):
222         (WebKit::WebPageProxy::requestAutocorrectionContext):
223
224 2014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
225
226         Unreviewed build fix after r170029
227
228         Use String() instead of AtomicString().
229
230         * UIProcess/InspectorServer/HTTPRequest.cpp:
231         (WebKit::HTTPRequest::parseHeaders):
232
233 2014-06-16  Brent Fulgham  <bfulgham@apple.com>
234
235         [Win] Use TileController on Windows
236         https://bugs.webkit.org/show_bug.cgi?id=133895
237
238         Reviewed by Tim Horton.
239
240         * WebProcess/WebPage/mac/PlatformCALayerRemote.h: Remove
241         unneeded overload.
242
243 2014-06-16  Timothy Horton  <timothy_horton@apple.com>
244
245         [iOS][wk2] Swipe snapshots are removed too quickly if there is no saved render tree size
246         https://bugs.webkit.org/show_bug.cgi?id=133891
247
248         Reviewed by Simon Fraser.
249
250         * UIProcess/ios/ViewGestureControllerIOS.mm:
251         (WebKit::ViewGestureController::endSwipeGesture):
252         (WebKit::ViewGestureController::setRenderTreeSize):
253         If we don't know the target render tree size, wait until the first layer tree commit
254         that comes in, instead of removing the snapshot when the gesture ends.
255
256 2014-06-16  Timothy Horton  <timothy_horton@apple.com>
257
258         [iOS][wk2] Swiping back briefly shows the previous page before loading the new one
259         https://bugs.webkit.org/show_bug.cgi?id=133885
260
261         Reviewed by Simon Fraser.
262
263         Remove a race between the UI and Web processes when removing the swipe snapshot.
264         Previously, it was possible to get a commit from the Web process with layer content
265         (and render tree size) from the previous page *after* sending the navigation request
266         to the page, because of the asynchronicity of layer tree commits. This could cause
267         the snapshot to be removed early (if the previous fully-loaded page had a sufficiently
268         large render tree size), revealing the old tiles underneath the snapshot.
269
270         * Shared/mac/RemoteLayerTreeTransaction.h:
271         (WebKit::RemoteLayerTreeTransaction::transactionID):
272         (WebKit::RemoteLayerTreeTransaction::setTransactionID):
273         * Shared/mac/RemoteLayerTreeTransaction.mm:
274         (WebKit::RemoteLayerTreeTransaction::encode):
275         (WebKit::RemoteLayerTreeTransaction::decode):
276         * UIProcess/DrawingAreaProxy.h:
277         (WebKit::DrawingAreaProxy::lastVisibleTransactionID):
278         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
279         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
280         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
281         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
282         (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
283         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
284         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
285         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
286         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
287         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
288         Keep track of an ever-increasing transaction ID in RemoteLayerTreeDrawingArea(Proxy).
289         It increments in the UI process at didUpdate time, because the Web process cannot
290         have started on a new layer tree commit until didUpdate is sent.
291         It increments in the Web process at commit time.
292
293         * UIProcess/ios/ViewGestureControllerIOS.mm:
294         (WebKit::ViewGestureController::endSwipeGesture):
295         (WebKit::ViewGestureController::setRenderTreeSize):
296         * UIProcess/mac/ViewGestureController.h:
297         Adopt transaction IDs; don't remove the snapshot until the commit
298         that includes the navigation arrives.
299
300 2014-06-16  Dan Bernstein  <mitz@apple.com>
301
302         <rdar://problem/17327707> [Cocoa] Expose WebPreferences::storageBlockingPolicy
303         https://bugs.webkit.org/show_bug.cgi?id=133958
304
305         Reviewed by Anders Carlsson.
306
307         * UIProcess/API/Cocoa/WKPreferences.mm:
308         (toStorageBlockingPolicy): Added this helper conversion function.
309         (toAPI): Ditto.
310         (-[WKPreferences _storageBlockingPolicy]): Added this getter.
311         (-[WKPreferences _setStorageBlockingPolicy:]): Added this setter.
312         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Declared new _storageBlockingPolicy property
313         and _WKStorageBlockingPolicy enum. 
314
315 2014-06-16  Anders Carlsson  <andersca@apple.com>
316
317         Don't use AtomicString in HTTPHeaderMap
318         https://bugs.webkit.org/show_bug.cgi?id=133957
319         <rdar://problem/15256572>
320
321         Reviewed by Andreas Kling.
322
323         Update for WebCore changes.
324
325         * Shared/WebCoreArgumentCoders.cpp:
326         (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
327
328 2014-06-15  Anders Carlsson  <andersca@apple.com>
329
330         Change ResourceRequestBase::addHTTPHeaderFields to setHTTPHeaderFields instead
331         https://bugs.webkit.org/show_bug.cgi?id=133925
332
333         Reviewed by Sam Weinig.
334
335         * PluginProcess/PluginControllerProxy.h:
336         * Shared/WebCoreArgumentCoders.cpp:
337         (IPC::ArgumentCoder<ResourceRequest>::decode):
338         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
339         (WebKit::NPN_PostURL):
340         * WebProcess/Plugins/PluginView.cpp:
341         (WebKit::PluginView::loadURL):
342         * WebProcess/Plugins/PluginView.h:
343
344 2014-06-16  Anders Carlsson  <andersca@apple.com>
345
346         Add HTTPHeaderName overloads on ResourceResponseBase
347         https://bugs.webkit.org/show_bug.cgi?id=133946
348
349         Reviewed by Andreas Kling.
350
351         * WebProcess/Plugins/PluginView.cpp:
352         (WebKit::buildHTTPHeaders):
353
354 2014-06-16  Dan Bernstein  <mitz@apple.com>
355
356         Fixed a typo in the last change.
357
358         * UIProcess/API/Cocoa/WKPreferences.mm:
359         (-[WKPreferences init]):
360
361 2014-06-16  Dan Bernstein  <mitz@apple.com>
362
363         [Cocoa] Remove WKPreferences persistence in user defaults
364         https://bugs.webkit.org/show_bug.cgi?id=133945
365
366         Reviewed by Anders Carlsson.
367
368         * UIProcess/API/Cocoa/WKPreferences.h: Removed userDefaultsKeyPrefix property and
369         initializer with userDefaultsKeyPrefix parameter.
370         * UIProcess/API/Cocoa/WKPreferences.mm:
371         (-[WKPreferences init]): Changed to initialize an instance with an empty identifier, which
372         means that it won’t persist to user defaults.
373         (-[WKPreferences initWithUserDefaultsKeyPrefix:]): Deleted.
374         (-[WKPreferences userDefaultsKeyPrefix]): Deleted.
375
376 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
377
378         Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
379         https://bugs.webkit.org/show_bug.cgi?id=133677
380
381         Reviewed by Anders Carlsson.
382
383         * WebProcess/WebPage/FindController.cpp:
384         (WebKit::FindController::findString): Update the call to Page::findStringMatchingRanges() to pass
385         in a Vector<RefPtr<Range>> reference instead of a pointer.
386         (WebKit::FindController::findStringMatches): Ditto.
387
388 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
389
390         Unreviewed build fixes for the EFL and GTK+ ports after r169994 and 170000.
391
392         * UIProcess/API/C/WKPluginSiteDataManager.cpp: Undefine the None macro under X11.
393         * UIProcess/API/gtk/WebKitCookieManager.cpp:
394         (webkit_cookie_manager_get_accept_policy): Remove unnecessary ::create() wrappings.
395         (webkit_cookie_manager_get_domains_with_cookies): Ditto.
396         * UIProcess/API/gtk/WebKitWebResource.cpp:
397         (webkit_web_resource_get_data): Ditto.
398
399 2014-06-15  Dan Bernstein  <mitz@apple.com>
400
401         Part 1 of: Change GenericCallback<> function parameters into std::function<>
402         https://bugs.webkit.org/show_bug.cgi?id=133927
403
404         Reviewed by Sam Weinig.
405
406         * UIProcess/API/C/WKApplicationCacheManager.cpp:
407         (WKApplicationCacheManagerGetApplicationCacheOrigins):
408         * UIProcess/API/C/WKContext.cpp:
409         (WKContextGetStatistics):
410         (WKContextGetStatisticsWithOptions):
411         * UIProcess/API/C/WKCookieManager.cpp:
412         (WKCookieManagerGetHostnamesWithCookies):
413         (WKCookieManagerGetHTTPCookieAcceptPolicy):
414         * UIProcess/API/C/WKDatabaseManager.cpp:
415         (WKDatabaseManagerGetDatabasesByOrigin):
416         (WKDatabaseManagerGetDatabaseOrigins):
417         * UIProcess/API/C/WKFrame.cpp:
418         (WKFrameGetMainResourceData):
419         (WKFrameGetResourceData):
420         (WKFrameGetWebArchive):
421         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
422         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
423         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
424         * UIProcess/API/C/WKMediaCacheManager.cpp:
425         (WKMediaCacheManagerGetHostnamesWithMediaCache):
426         * UIProcess/API/C/WKOriginDataManager.cpp:
427         (WKOriginDataManagerGetOrigins):
428         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
429         (WKPluginSiteDataManagerGetSitesWithData):
430         * UIProcess/API/C/WKResourceCacheManager.cpp:
431         (WKResourceCacheManagerGetCacheOrigins):
432         * UIProcess/API/Cocoa/WKWebView.mm:
433         (-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
434         * UIProcess/API/mac/WKView.mm:
435         (-[WKView attributedSubstringForProposedRange:completionHandler:]):
436         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
437         (WebKit::WebPluginSiteDataManager::getSitesWithData):
438         * UIProcess/Plugins/WebPluginSiteDataManager.h:
439         * UIProcess/WebApplicationCacheManagerProxy.cpp:
440         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
441         * UIProcess/WebApplicationCacheManagerProxy.h:
442         * UIProcess/WebContext.cpp:
443         (WebKit::WebContext::getStatistics):
444         * UIProcess/WebContext.h:
445         * UIProcess/WebCookieManagerProxy.cpp:
446         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
447         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
448         * UIProcess/WebCookieManagerProxy.h:
449         * UIProcess/WebDatabaseManagerProxy.cpp:
450         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
451         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
452         * UIProcess/WebDatabaseManagerProxy.h:
453         * UIProcess/WebFrameProxy.cpp:
454         (WebKit::WebFrameProxy::getWebArchive):
455         (WebKit::WebFrameProxy::getMainResourceData):
456         (WebKit::WebFrameProxy::getResourceData):
457         * UIProcess/WebFrameProxy.h:
458         * UIProcess/WebKeyValueStorageManager.cpp:
459         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
460         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
461         * UIProcess/WebKeyValueStorageManager.h:
462         * UIProcess/WebMediaCacheManagerProxy.cpp:
463         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
464         * UIProcess/WebMediaCacheManagerProxy.h:
465         * UIProcess/WebOriginDataManagerProxy.cpp:
466         (WebKit::WebOriginDataManagerProxy::getOrigins):
467         * UIProcess/WebOriginDataManagerProxy.h:
468         * UIProcess/WebPageProxy.cpp:
469         (WebKit::WebPageProxy::getMainResourceDataOfFrame):
470         (WebKit::WebPageProxy::getResourceDataFromFrame):
471         (WebKit::WebPageProxy::getWebArchiveOfFrame):
472         * UIProcess/WebPageProxy.h:
473         * UIProcess/WebResourceCacheManagerProxy.cpp:
474         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
475         * UIProcess/WebResourceCacheManagerProxy.h:
476         * UIProcess/ios/WKContentViewInteraction.mm:
477         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
478         (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
479         * UIProcess/ios/WebPageProxyIOS.mm:
480         (WebKit::WebPageProxy::selectWithGesture):
481         (WebKit::WebPageProxy::selectWithTwoTouches):
482         * UIProcess/mac/WebPageProxyMac.mm:
483         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
484
485 2014-06-15  Dan Bernstein  <mitz@apple.com>
486
487         <rdar://problem/17291697> [Cocoa] Can’t tell at policy decision time whether WebKit can handle the request
488         https://bugs.webkit.org/show_bug.cgi?id=133930
489
490         Reviewed by Sam Weinig.
491
492         * Shared/NavigationActionData.cpp:
493         (WebKit::NavigationActionData::NavigationActionData): Initialize new member canHandleRequest
494         to false.
495         (WebKit::NavigationActionData::encode): Encode canHandleRequest.
496         (WebKit::NavigationActionData::decode): Decode it.
497         * Shared/NavigationActionData.h: Declared new boolean member canHandleRequest.
498
499         * UIProcess/API/Cocoa/WKNavigationAction.mm:
500         (-[WKNavigationAction _initWithNavigationActionData:]): Set new ivar _canHandleRequest from
501         the action data.
502         (-[WKNavigationAction _canHandleRequest]): Added this getter.
503         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new property _canHandleRequest.
504
505         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
506         (WebKit::WebChromeClient::createWindow): Set canHandleRequest in the NavigationActionData.
507
508         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
509         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
510         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
511
512 2014-06-15  Ryuan Choi  <ryuan.choi@samsung.com>
513
514         [EFL][WK2] Change ewk_view_settings_get to ewk_page_group_settings_get
515         https://bugs.webkit.org/show_bug.cgi?id=133841
516
517         Reviewed by Gyuyoung Kim.
518
519         Ewk_Settings object is a member of Ewk_Page_Group.
520         So, Ewk_Page_Group is better place for the getter of Ewk_Settings.
521
522         * UIProcess/API/efl/ewk_page_group.cpp:
523         (ewk_page_group_settings_get): Added instead of ewk_view_settings_get.
524         * UIProcess/API/efl/ewk_page_group.h:
525         * UIProcess/API/efl/ewk_view.cpp:
526         (ewk_view_settings_get): Deleted.
527         * UIProcess/API/efl/ewk_view.h:
528         * UIProcess/API/efl/tests/test_ewk2_page_group.cpp:
529         (TEST_F):
530         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
531         (TEST_F):
532         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
533         (TEST_F): Deleted.
534
535 2014-06-15  Anders Carlsson  <andersca@apple.com>
536
537         Add an autorelease() member function to RetainPtr
538         https://bugs.webkit.org/show_bug.cgi?id=133929
539
540         Reviewed by Dan Bernstein.
541
542         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
543         (-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
544         * UIProcess/API/Cocoa/WKWebView.mm:
545         (-[WKWebView navigationDelegate]):
546         (-[WKWebView UIDelegate]):
547         (-[WKWebView loadRequest:]):
548         (-[WKWebView loadHTMLString:baseURL:]):
549         (-[WKWebView goToBackForwardListItem:]):
550         (-[WKWebView goBack]):
551         (-[WKWebView goForward]):
552         (-[WKWebView reload]):
553         (-[WKWebView reloadFromOrigin]):
554         (-[WKWebView _historyDelegate]):
555         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
556         (WebKit::animationValueFromKeyframeValue):
557
558 2014-06-15  Dan Bernstein  <mitz@apple.com>
559
560         Get rid of VoidAPICallback
561         https://bugs.webkit.org/show_bug.cgi?id=133928
562
563         Reviewed by Sam Weinig.
564
565         * UIProcess/API/C/WKPage.cpp:
566         (WKPageForceRepaint): Wrap the API callback in a generic callback here.
567
568         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
569         (WKPluginSiteDataManagerClearSiteData): Ditto.
570         (WKPluginSiteDataManagerClearAllSiteData): Ditto.
571
572         * UIProcess/GenericCallback.h:
573         (WebKit::GenericCallback::performCallback): Added this helper for 0-argument callbacks.
574         (WebKit::VoidCallback::create): Deleted.
575         (WebKit::VoidCallback::~VoidCallback): Deleted.
576         (WebKit::VoidCallback::performCallback): Deleted.
577         (WebKit::VoidCallback::invalidate): Deleted.
578         (WebKit::VoidCallback::VoidCallback): Deleted.
579         (WebKit::VoidAPICallback::create): Deleted.
580
581         * UIProcess/mac/WKFullScreenWindowController.h:
582
583 2014-06-15  Zan Dobersek  <zdobersek@igalia.com>
584
585         Unreviewed build fix for the GTK+ port after r169990.
586
587         * UIProcess/WebPageProxy.cpp:
588         (WebKit::WebPageProxy::resetState): Pass the error value to
589         the rest of invalidateCallbackMap calls.
590
591 2014-06-15  Anders Carlsson  <andersca@apple.com>
592
593         Remove WKPageRunJavaScriptInMainFrame_b
594         https://bugs.webkit.org/show_bug.cgi?id=133926
595
596         Reviewed by Dan Bernstein.
597
598         * UIProcess/API/C/WKPage.cpp:
599         (callRunJavaScriptBlockAndRelease): Deleted.
600         (WKPageRunJavaScriptInMainFrame_b): Deleted.
601         * UIProcess/API/C/WKPage.h:
602
603 2014-06-15  Anders Carlsson  <andersca@apple.com>
604
605         invalidateCallbackMap doesn’t pass the error parameter on to invalidate(), so script completion handler is passed the wrong error
606         https://bugs.webkit.org/show_bug.cgi?id=133921
607         <rdar://problem/17316653>
608
609         Reviewed by Dan Bernstein.
610
611         * UIProcess/GenericCallback.h:
612         (WebKit::VoidCallback::performCallback):
613         (WebKit::VoidCallback::invalidate):
614         (WebKit::VoidAPICallback::create):
615         (WebKit::invalidateCallbackMap):
616         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
617         (WebKit::WebPluginSiteDataManager::invalidate):
618         (WebKit::WebPluginSiteDataManager::clearSiteData):
619         * UIProcess/WebApplicationCacheManagerProxy.cpp:
620         (WebKit::WebApplicationCacheManagerProxy::contextDestroyed):
621         (WebKit::WebApplicationCacheManagerProxy::processDidClose):
622         * UIProcess/WebContext.cpp:
623         (WebKit::WebContext::~WebContext):
624         * UIProcess/WebCookieManagerProxy.cpp:
625         (WebKit::WebCookieManagerProxy::contextDestroyed):
626         (WebKit::WebCookieManagerProxy::processDidClose):
627         * UIProcess/WebDatabaseManagerProxy.cpp:
628         (WebKit::WebDatabaseManagerProxy::contextDestroyed):
629         (WebKit::WebDatabaseManagerProxy::processDidClose):
630         * UIProcess/WebMediaCacheManagerProxy.cpp:
631         (WebKit::WebMediaCacheManagerProxy::contextDestroyed):
632         (WebKit::WebMediaCacheManagerProxy::processDidClose):
633         * UIProcess/WebOriginDataManagerProxy.cpp:
634         (WebKit::WebOriginDataManagerProxy::contextDestroyed):
635         (WebKit::WebOriginDataManagerProxy::processDidClose):
636         * UIProcess/WebPageProxy.cpp:
637         (WebKit::WebPageProxy::forceRepaint):
638         (WebKit::WebPageProxy::resetState):
639         * UIProcess/WebResourceCacheManagerProxy.cpp:
640         (WebKit::WebResourceCacheManagerProxy::contextDestroyed):
641         (WebKit::WebResourceCacheManagerProxy::processDidClose):
642         * UIProcess/mac/WKFullScreenWindowController.mm:
643         (-[WKFullScreenWindowController dealloc]):
644         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
645
646 2014-06-15  Zan Dobersek  <zdobersek@igalia.com>
647
648         Unreviewed build fix for the GTK+ port after r169987.
649
650         * UIProcess/API/gtk/WebKitWebView.cpp:
651         (webkit_web_view_can_execute_editing_command): The first passed-in parameter
652         is now a reference to a const String object.
653
654 2014-06-14  Dan Bernstein  <mitz@apple.com>
655
656         Replace StringImpl* callback parameters with const String&
657         https://bugs.webkit.org/show_bug.cgi?id=133922
658
659         Reviewed by Sam Weinig.
660
661         * UIProcess/API/C/WKPage.cpp:
662         (toGenericCallbackFunction): Added this helper function to wrap a WKStringRef-returning
663         API callback in a generic const String&-returning callback.
664         (WKPageRenderTreeExternalRepresentation):
665         (WKPageGetSourceForFrame):
666         (WKPageGetContentsAsString):
667         (WKPageGetBytecodeProfile):
668         (WKPageValidateCommand):
669         * UIProcess/API/mac/WKView.mm:
670         (-[WKView validateUserInterfaceItem:]):
671         (-[WKView startSpeaking:]):
672         * UIProcess/WebPageProxy.h:
673         * UIProcess/ios/WKContentViewInteraction.mm:
674         (-[WKContentView _define:]):
675         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
676
677 2014-06-14  Dan Bernstein  <mitz@apple.com>
678
679         Additional iOS build fix.
680
681         * UIProcess/ios/WKContentViewInteraction.mm:
682         (-[WKContentView _define:]):
683         (selectionChangedWithGesture):
684         (selectionChangedWithTouch):
685         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
686         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
687         (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
688         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
689
690 2014-06-14  Dan Bernstein  <mitz@apple.com>
691
692         iOS build fix.
693
694         * UIProcess/API/Cocoa/WKWebView.mm:
695         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
696
697 2014-06-14  Dan Bernstein  <mitz@apple.com>
698
699         Get rid of GenericAPICallback
700         https://bugs.webkit.org/show_bug.cgi?id=133909
701
702         Reviewed by Sam Weinig.
703
704         In preparation for passing callbacks as functions, replace GenericAPICallback::create, which
705         returned a GenericCallback, with a function template that returns an appropriate callback
706         function.
707
708         * UIProcess/API/C/WKApplicationCacheManager.cpp:
709         (WKApplicationCacheManagerGetApplicationCacheOrigins):
710         * UIProcess/API/C/WKContext.cpp:
711         (WKContextGetStatistics):
712         (WKContextGetStatisticsWithOptions):
713         * UIProcess/API/C/WKCookieManager.cpp:
714         (WKCookieManagerGetHostnamesWithCookies):
715         (WKCookieManagerGetHTTPCookieAcceptPolicy):
716         * UIProcess/API/C/WKDatabaseManager.cpp:
717         (WKDatabaseManagerGetDatabasesByOrigin):
718         (WKDatabaseManagerGetDatabaseOrigins):
719         * UIProcess/API/C/WKFrame.cpp:
720         (WKFrameGetMainResourceData):
721         (WKFrameGetResourceData):
722         (WKFrameGetWebArchive):
723         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
724         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
725         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
726         * UIProcess/API/C/WKMediaCacheManager.cpp:
727         (WKMediaCacheManagerGetHostnamesWithMediaCache):
728         * UIProcess/API/C/WKOriginDataManager.cpp:
729         (WKOriginDataManagerGetOrigins):
730         * UIProcess/API/C/WKPage.cpp:
731         (WKPageRunJavaScriptInMainFrame):
732         (WKPageRenderTreeExternalRepresentation):
733         (WKPageGetSourceForFrame):
734         (WKPageGetContentsAsString):
735         (WKPageGetBytecodeProfile):
736         (WKPageGetSelectionAsWebArchiveData):
737         (WKPageGetContentsAsMHTMLData):
738         (WKPageDrawPagesToPDF):
739         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
740         (WKPluginSiteDataManagerGetSitesWithData):
741         * UIProcess/API/C/WKResourceCacheManager.cpp:
742         (WKResourceCacheManagerGetCacheOrigins):
743
744         * UIProcess/GenericCallback.h:
745         (WebKit::toGenericCallbackFunction): Added. Given a C SPI callback function, returns a generic
746         callback function that wraps it.
747
748 2014-06-14  Dan Bernstein  <mitz@apple.com>
749
750         Reverted the last change, which broken the Mac build.
751
752         * UIProcess/GenericCallback.h:
753         (WebKit::invalidateCallbackMap):
754
755 2014-06-14  Dan Bernstein  <mitz@apple.com>
756
757         Tried to fix the GTK build.
758
759         * UIProcess/GenericCallback.h:
760         (WebKit::invalidateCallbackMap):
761
762 2014-06-14  Anders Carlsson  <andersca@apple.com>
763
764         Fix build.
765
766         * UIProcess/API/mac/WKView.mm:
767         (-[WKView selectedRangeWithCompletionHandler:]):
768         (-[WKView markedRangeWithCompletionHandler:]):
769         (-[WKView hasMarkedTextWithCompletionHandler:]):
770         (-[WKView attributedSubstringForProposedRange:completionHandler:]):
771         (-[WKView firstRectForCharacterRange:completionHandler:]):
772         (-[WKView characterIndexForPoint:completionHandler:]):
773
774 2014-06-14  Zan Dobersek  <zdobersek@igalia.com>
775
776         Unreviewed build fix for the GTK+ port.
777         Fixing the callback lambda parameters after r169962.
778
779         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
780         (webkitPrintOperationPrintPagesForFrame):
781         * UIProcess/API/gtk/WebKitWebResource.cpp:
782         (webkit_web_resource_get_data):
783         * UIProcess/API/gtk/WebKitWebView.cpp:
784         (webkit_web_view_can_execute_editing_command):
785         (webkit_web_view_run_javascript):
786         (resourcesStreamReadCallback):
787         (webkit_web_view_save):
788         (webkit_web_view_save_to_file):
789
790 2014-06-14  Csaba Osztrogonác  <ossy@webkit.org>
791
792         URTBF after r169943 and r169946, use the format of set/get.
793
794         * UIProcess/InspectorServer/WebInspectorServer.cpp:
795         (WebKit::WebInspectorServer::didReceiveUnrecognizedHTTPRequest):
796         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
797         (WebKit::WebSocketServerConnection::readHTTPMessage):
798         (WebKit::WebSocketServerConnection::upgradeToWebSocketServerConnection):
799
800 2014-06-13  Andreas Kling  <akling@apple.com>
801
802         REGRESSION (r167635): Reference leak in NetworkResourceLoader while loads are being deferred.
803         <https://webkit.org/b/133894>
804         <rdar://problem/17312299>
805
806         Don't self-ref() in start() until we actually start; if page loads are being
807         deferred, start() will be called again once deferral stops.
808
809         This was causing us to leak the entire NetworkResourceLoader object graph.
810
811         Reviewed by Brady Eidson.
812
813         * NetworkProcess/NetworkResourceLoader.cpp:
814         (WebKit::NetworkResourceLoader::start):
815
816 2014-06-13  Dan Bernstein  <mitz@apple.com>
817
818         Make GenericCallback variadic
819         https://bugs.webkit.org/show_bug.cgi?id=133897
820
821         Reviewed by Sam Weinig.
822
823         Also eliminated legacy callback functions and all CallbackBase derived classes outside of
824         GenericCallback.h.
825
826         * UIProcess/API/C/WKPage.cpp:
827         (WKPageValidateCommand): Changed legacy callback (with leading bool parameter) into modern
828         callback (with trailing error parameter).
829         (WKPageComputePagesForPrinting): Ditto.
830
831         * UIProcess/API/Cocoa/WKWebView.mm:
832         (-[WKWebView _getWebArchiveDataWithCompletionHandler:]): Ditto.
833         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Ditto.
834
835         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
836         (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
837
838         * UIProcess/API/mac/WKView.mm:
839         (-[WKView validateUserInterfaceItem:]): Ditto.
840         (-[WKView startSpeaking:]): Ditto.
841
842         * UIProcess/AutoCorrectionCallback.h: Replaced CallbackBase derived classes with
843         GenericCallback specializations.
844
845         * UIProcess/GenericCallback.h:
846         - Made GenericCallback variadic:
847         (WebKit::GenericCallback::performCallbackWithReturnValue):
848         (WebKit::GenericCallback::invalidate):
849         (WebKit::GenericAPICallback::create):
850
851         - Replaced CallbackBase derived classes with GenericCallback specializations:
852         (WebKit::GenericCallback::create): Deleted.
853         (WebKit::ComputedPagesCallback::create): Deleted.
854         (WebKit::ComputedPagesCallback::~ComputedPagesCallback): Deleted.
855         (WebKit::ComputedPagesCallback::performCallbackWithReturnValue): Deleted.
856         (WebKit::ComputedPagesCallback::invalidate): Deleted.
857         (WebKit::ComputedPagesCallback::ComputedPagesCallback): Deleted.
858         (WebKit::ImageCallback::create): Deleted.
859         (WebKit::ImageCallback::~ImageCallback): Deleted.
860         (WebKit::ImageCallback::performCallbackWithReturnValue): Deleted.
861         (WebKit::ImageCallback::invalidate): Deleted.
862         (WebKit::ImageCallback::ImageCallback): Deleted.
863
864         * UIProcess/WebPageProxy.h: Replaced CallbackBase derived classes with GenericCallback
865         specializations.
866
867         * UIProcess/ios/WKContentViewInteraction.mm:
868         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): Changed
869         legacy callback (with leading bool parameter) into modern callback (with trailing error
870         parameter).
871         (-[WKContentView requestDictationContext:]): Ditto.
872         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): Ditto.
873
874         * UIProcess/mac/WKPrintingView.mm:
875         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
876         (-[WKPrintingView _askPageToComputePageRects]): Ditto.
877         (-[WKPrintingView _drawPreview:]): Ditto.
878
879 2014-06-13  Tim Horton  <timothy_horton@apple.com>
880
881         Unreviewed; fix the build.
882
883         * Shared/mac/RemoteLayerBackingStore.mm:
884         (WebKit::RemoteLayerBackingStore::drawInContext):
885
886 2014-06-13  Martin Hock  <mhock@apple.com>
887
888         Clean up layers in RemoteLayerTreeHost::clearLayers().
889         https://bugs.webkit.org/show_bug.cgi?id=133888
890
891         Reviewed by Tim Horton.
892
893         * UIProcess/mac/RemoteLayerTreeHost.mm:
894         (WebKit::RemoteLayerTreeHost::clearLayers):
895
896 2014-06-13  Anders Carlsson  <andersca@apple.com>
897
898         Add a HTTPHeaderMap::get overload that takes an HTTPHeaderName
899         https://bugs.webkit.org/show_bug.cgi?id=133877
900
901         Reviewed by Andreas Kling.
902
903         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
904         (WebKit::parsePostBuffer):
905
906 2014-06-13  Dan Bernstein  <mitz@apple.com>
907
908         [iOS] Networking process always decodes keys
909         https://bugs.webkit.org/show_bug.cgi?id=133863
910
911         Reviewed by Anders Carlsson.
912
913         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
914         (WebKit::XPCServiceInitializer): Call checkEntitlements on iOS, too.
915         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
916         (WebKit::XPCServiceInitializerDelegate::checkEntitlements): On iOS, allow decoding keys
917         if the application has the appropriate keychain access group.
918
919         * Shared/cf/ArgumentCodersCF.cpp:
920         (IPC::setAllowsDecodingSecKeyRef): Added. Sets static bool.
921         (IPC::decode): Check the secKeyRefDecodingAllowed bool before decoding a key.
922         * Shared/cf/ArgumentCodersCF.h:
923
924 2014-06-12  Anders Carlsson  <andersca@apple.com>
925
926         Add overloads of HTTPHeaderMap::find and remove that take enums
927         https://bugs.webkit.org/show_bug.cgi?id=133823
928
929         Reviewed by Sam Weinig.
930
931         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
932         (WebKit::parsePostBuffer):
933         Update for WebCore changes.
934
935 2014-06-12  Benjamin Poulain  <bpoulain@apple.com>
936
937         [iOS][WK2] Do not update the viewport configuration on load until the first viewport arguments is received
938         https://bugs.webkit.org/show_bug.cgi?id=133719
939         <rdar://problem/17008149>
940
941         Reviewed by Simon Fraser.
942
943         When pages are loaded from the page cache, we were updating the viewport to the initial values
944         in WebPage::dynamicViewportSizeUpdate(), then update the viewport again when the page's viewport argument
945         are received.
946
947         The problem is that was messing up with text autosizing. The page would relayout with the default viewport
948         configuration, adopt the text autosizing parameters from that size, then remain in that state when
949         the actual viewport configuration would be set.
950
951         With this patch, the viewport configuration is updated from the values in WebCore instead of with default values.
952         For new documents, this is strictly equivalent. For documents coming from the page cache, the values are from
953         the previous state of the page, which ensure we do not restart negotiating a viewport configuration from scratch.
954
955         * WebProcess/WebPage/WebPage.cpp:
956         (WebKit::WebPage::didCommitLoad):
957
958 2014-06-12  Gavin Barraclough  <barraclough@apple.com>
959
960         Add support for thread/WorkQueue QoS
961         https://bugs.webkit.org/show_bug.cgi?id=130688
962
963         Reviewed by Anders Carlson & Simon Fraser.
964
965         The EventDispatcher's WorkQueue should be UserInteractive.
966
967         * Platform/WorkQueue.cpp:
968         (WorkQueue::create):
969             - pass QOS to constructor.
970         (WorkQueue::WorkQueue):
971             - pass QOS to platformInitialize.
972         * Platform/WorkQueue.h:
973             - added enum, arguments.
974         * Platform/efl/WorkQueueEfl.cpp:
975         (WorkQueue::platformInitialize):
976             - has extra argument.
977         * Platform/gtk/WorkQueueGtk.cpp:
978         (WorkQueue::platformInitialize):
979             - has extra argument.
980         * Platform/mac/WorkQueueMac.cpp:
981         (platformQOS):
982             - map from enum to platform type.
983         (WorkQueue::platformInitialize):
984             - set the QoS of the dispatch queue.
985         * WebProcess/WebPage/EventDispatcher.cpp:
986         (WebKit::EventDispatcher::EventDispatcher):
987             - EventDispatcher's WorkQueue should be UserInteractive.
988         * config.h:
989             - added HAVE_QOS_CLASSES
990
991 2014-06-12  Simon Fraser  <simon.fraser@apple.com>
992
993         [iOS] Tiny hack to fix WebKitTestRunner view visibility
994         https://bugs.webkit.org/show_bug.cgi?id=133833
995
996         Reviewed by Tim Horton.
997         
998         PageClientImplIOS in WebKitTestRunner has a null m_webView, so isViewInWindow
999         was returning false, which confused things.
1000         
1001         Fix by falling back to a check on the content view if the m_webView is nil.
1002
1003         * UIProcess/ios/PageClientImplIOS.mm:
1004         (WebKit::PageClientImpl::isViewVisible):
1005         (WebKit::PageClientImpl::isViewInWindow):
1006
1007 2014-06-12  Brady Eidson  <beidson@apple.com>
1008
1009         Add SPI for image controls and service controls preferences.
1010         <rdar://problem/17292209> and https://bugs.webkit.org/show_bug.cgi?id=133820
1011
1012         Reviewed by Anders Carlsson.
1013
1014         * UIProcess/API/C/WKPreferences.cpp:
1015         (WKPreferencesSetServiceControlsEnabled):
1016         (WKPreferencesGetServiceControlsEnabled):
1017         (WKPreferencesSetImageControlsEnabled):
1018         (WKPreferencesGetImageControlsEnabled):
1019         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1020
1021 2014-06-12  Alexey Proskuryakov  <ap@apple.com>
1022
1023         [Mac] Allow reading com.apple.universalaccess preferences
1024         https://bugs.webkit.org/show_bug.cgi?id=133817
1025         <rdar://problem/17028261>
1026
1027         Reviewed by Anders Carlsson.
1028
1029         * WebProcess/com.apple.WebProcess.sb.in:
1030
1031 2014-06-12  Anders Carlsson  <andersca@apple.com>
1032
1033         Fix build.
1034
1035         * Shared/WebCoreArgumentCoders.cpp:
1036         (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
1037         (CoreIPC::ArgumentCoder<ResourceRequest>::decode):
1038
1039 2014-06-12  Dan Bernstein  <mitz@apple.com>
1040
1041         Fixed a harmless error message when rewrite-availability-macros.sh is run in a clean build.
1042
1043         Rubber-stamped by Anders Carlsson.
1044
1045         * mac/rewrite-availability-macros.sh:
1046
1047 2014-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1048
1049         [GTK] Remove view mode API
1050         https://bugs.webkit.org/show_bug.cgi?id=133725
1051
1052         Reviewed by Martin Robinson.
1053
1054         It currently does nothing because support for view source mode was
1055         removed from WebCore.
1056
1057         * UIProcess/API/gtk/WebKitWebView.cpp:
1058         (webkitWebViewSetProperty):
1059         (webkitWebViewGetProperty):
1060         (webkit_web_view_class_init):
1061         (webkit_web_view_set_view_mode): Deleted.
1062         (webkit_web_view_get_view_mode): Deleted.
1063         * UIProcess/API/gtk/WebKitWebView.h:
1064         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1065
1066 2014-06-12  Pratik Solanki  <psolanki@apple.com>
1067
1068         Avoid creating a CFData when checking if a resource is file backed
1069         https://bugs.webkit.org/show_bug.cgi?id=133783
1070
1071         Reviewed by Andreas Kling.
1072
1073         When a resource is file backed, we have it as a single CFDataRef in SharedBuffer. Add an
1074         early return in tryGetShareableHandleFromSharedBuffer() so we don't end up creating a new
1075         CFDataRef if we don't already have one in SharedBuffer. If we had to create a CFDataRef, the
1076         it can't have been a file backed resource.
1077
1078         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1079         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
1080
1081 2014-06-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1082
1083         Fix build break on EFL and GTK ports since r169820
1084         https://bugs.webkit.org/show_bug.cgi?id=133786
1085
1086         Reviewed by Philippe Normand.
1087
1088         ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC macro are missing in PluginView::pluginSnapshotTimerFired().
1089
1090         * WebProcess/Plugins/PluginView.cpp:
1091         (WebKit::PluginView::pluginSnapshotTimerFired):
1092
1093 2014-06-11  Csaba Osztrogonác  <ossy@webkit.org>
1094
1095         [EFL][GTK] Ultimate fix not to have build failures
1096         in the future because of "#if TARGET_OS_IPHONE" guards.
1097
1098         Unreviewed buildfix.
1099
1100         Revert the previous wrong fix attempt r169879.
1101
1102         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1103         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1104
1105 2014-06-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1106
1107         Fix build break on EFL port since r169869
1108         https://bugs.webkit.org/show_bug.cgi?id=133785
1109
1110         Unreviewed, fix a build break on EFL port.
1111
1112         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Use defined(TARGET_OS_IPHONE).
1113         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: ditto.
1114
1115 2014-06-11  Simon Fraser  <simon.fraser@apple.com>
1116
1117         [iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1 for testing
1118         https://bugs.webkit.org/show_bug.cgi?id=133779
1119
1120         Reviewed by Benjamin Poulain.
1121         
1122         Support a custom viewport configuration for testing, on iOS.
1123
1124         * UIProcess/API/ios/WKViewIOS.mm:
1125         (-[WKView _frameOrBoundsChanged]): Call setViewportConfigurationMinimumLayoutSize()
1126         just as WKWebView does.
1127         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1128         (WKBundlePageSetUseTestingViewportConfiguration): New SPI to set a viewport config for testing.
1129         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Ditto.
1130         * WebProcess/WebPage/WebPage.cpp:
1131         (WebKit::WebPage::WebPage):
1132         * WebProcess/WebPage/WebPage.h:
1133         (WebKit::WebPage::setUseTestingViewportConfiguration):
1134         (WebKit::WebPage::isUsingTestingViewportConfiguration):
1135         * WebProcess/WebPage/ios/WebPageIOS.mm:
1136         (WebKit::WebPage::resetViewportDefaultConfiguration):
1137
1138 2014-06-11  Timothy Horton  <timothy_horton@apple.com>
1139
1140         Remove unused VisibleContentRectUpdateInfo update ID
1141         https://bugs.webkit.org/show_bug.cgi?id=133777
1142
1143         Reviewed by Benjamin Poulain.
1144
1145         Remove some unused code.
1146
1147         * Shared/VisibleContentRectUpdateInfo.cpp:
1148         (WebKit::VisibleContentRectUpdateInfo::encode):
1149         (WebKit::VisibleContentRectUpdateInfo::decode):
1150         * Shared/VisibleContentRectUpdateInfo.h:
1151         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1152         (WebKit::operator==):
1153         (WebKit::VisibleContentRectUpdateInfo::updateID): Deleted.
1154         * Shared/mac/RemoteLayerTreeTransaction.h:
1155         (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID): Deleted.
1156         (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID): Deleted.
1157         * Shared/mac/RemoteLayerTreeTransaction.mm:
1158         (WebKit::RemoteLayerTreeTransaction::encode):
1159         (WebKit::RemoteLayerTreeTransaction::decode):
1160         * UIProcess/WebPageProxy.h:
1161         (WebKit::WebPageProxy::nextVisibleContentRectUpdateID): Deleted.
1162         (WebKit::WebPageProxy::lastVisibleContentRectUpdateID): Deleted.
1163         * UIProcess/ios/WKContentView.mm:
1164         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
1165         * WebProcess/WebPage/WebPage.cpp:
1166         (WebKit::WebPage::WebPage):
1167         (WebKit::WebPage::willCommitLayerTree):
1168         * WebProcess/WebPage/WebPage.h:
1169         * WebProcess/WebPage/ios/WebPageIOS.mm:
1170         (WebKit::WebPage::updateVisibleContentRects):
1171
1172 2014-06-11  Dan Bernstein  <mitz@apple.com>
1173
1174         [Cocoa] Move CompletionHandlerCallChecker into a separate file
1175         https://bugs.webkit.org/show_bug.cgi?id=133774
1176
1177         Reviewed by Anders Carlsson.
1178
1179         * Shared/Cocoa/CompletionHandlerCallChecker.h: Added.
1180         * Shared/Cocoa/CompletionHandlerCallChecker.mm: Added.
1181         (WebKit::CompletionHandlerCallChecker::create):
1182         (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
1183         (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
1184         (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
1185         (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
1186
1187         * UIProcess/Cocoa/UIDelegate.mm:
1188         (WebKit::CompletionHandlerCallChecker::create): Deleted.
1189         (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker): Deleted.
1190         (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler): Deleted.
1191         (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker): Deleted.
1192         (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod): Deleted.
1193         * WebKit2.xcodeproj/project.pbxproj:
1194
1195 2014-06-11  Martin Hock  <mhock@apple.com>
1196
1197         [iOS] Clear UIProcess visual state after WebProcess crash
1198         https://bugs.webkit.org/show_bug.cgi?id=133664
1199         <rdar://problem/16952742>
1200
1201         Reviewed by Benjamin Poulain.
1202
1203         * UIProcess/API/Cocoa/WKWebView.mm:
1204         (-[WKWebView _didRelaunchProcess]):
1205         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1206         * UIProcess/ios/PageClientImplIOS.mm:
1207         (WebKit::PageClientImpl::didRelaunchProcess):
1208         * UIProcess/mac/RemoteLayerTreeHost.h:
1209         * UIProcess/mac/RemoteLayerTreeHost.mm:
1210         (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
1211         (WebKit::RemoteLayerTreeHost::clearLayers):
1212
1213 2014-06-11  Tim Horton  <timothy_horton@apple.com>
1214
1215         Implement swipeWithEvent for non-fluid swipes
1216         https://bugs.webkit.org/show_bug.cgi?id=133766
1217         <rdar://problem/17126889>
1218
1219         Reviewed by Anders Carlsson.
1220
1221         * UIProcess/API/mac/WKView.mm:
1222         (-[WKView swipeWithEvent:]):
1223         On non-fluid swipes, go back or forward depending on the swipe direction.
1224
1225 2014-06-11  Dan Bernstein  <mitz@apple.com>
1226
1227         [Cocoa] Xcode cannot infer that the WebKit target implicitly depends on WebCore.framework
1228         https://bugs.webkit.org/show_bug.cgi?id=133765
1229
1230         Reviewed by Anders Carlsson.
1231
1232         * Configurations/WebKit.xcconfig: Move linking against WebCore from OTHER_LDFLAGS here...
1233         * WebKit2.xcodeproj/project.pbxproj: ...to the Link Binary With Libraries build phase here.
1234
1235 2014-06-11  Timothy Horton  <timothy_horton@apple.com>
1236
1237         [wk2] Don't dispatch view state changes immediately
1238         https://bugs.webkit.org/show_bug.cgi?id=133713
1239
1240         Reviewed by Simon Fraser.
1241
1242         * UIProcess/WebPageProxy.cpp:
1243         (WebKit::WebPageProxy::WebPageProxy):
1244         (WebKit::WebPageProxy::viewStateDidChange):
1245         (WebKit::WebPageProxy::dispatchViewStateChange):
1246         (WebKit::WebPageProxy::updateViewState): Deleted.
1247         * UIProcess/WebPageProxy.h:
1248         On PLATFORM(COCOA), wait until just before CA is going to commit the UI process layer
1249         tree to dispatch view state changes to the Web process. This avoids sending multiple
1250         view state change messages to the Web process within one run-loop cycle, for example
1251         when a view is moved around in the view hierarchy but the view state otherwise remains the same.
1252
1253 2014-06-11  Timothy Horton  <timothy_horton@apple.com>
1254
1255         Make it possible for waitForAndDispatchImmediately to bail if a sync message comes in from the other direction
1256         https://bugs.webkit.org/show_bug.cgi?id=133708
1257
1258         Reviewed by Anders Carlsson.
1259
1260         * Platform/IPC/Connection.cpp:
1261         (IPC::WaitForMessageState):
1262         (IPC::Connection::Connection):
1263         (IPC::Connection::waitForMessage):
1264         (IPC::Connection::processIncomingMessage):
1265         (IPC::Connection::connectionDidClose):
1266         * Platform/IPC/Connection.h:
1267         (IPC::Connection::waitForAndDispatchImmediately):
1268         Remove the waitForMessageMap, and assert that we're only ever waiting for one message at a time.
1269         This simplifies this code a bit, and we never wait on more than one message at a time, so it was unnecessary.
1270
1271         Add a flag to waitForAndDispatchImmediately, InterruptWaitingIfSyncMessageArrives, which will cause
1272         waitForAndDispatchImmediately to bail if a sync message arrives, to avoid pointlessly blocking both processes
1273         for the entire timeout.
1274
1275 2014-06-11  Oliver Hunt  <oliver@apple.com>
1276
1277         Restrict database process profile
1278         https://bugs.webkit.org/show_bug.cgi?id=133750
1279
1280         Reviewed by Alexey Proskuryakov.
1281
1282         Make the sandbox profile much more restrictive.
1283
1284         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
1285
1286 2014-06-11  Roger Fong  <roger_fong@apple.com>
1287
1288         Don't snapshot offscreen plugins that would normally be considered primary plugins after they are moved in view.
1289         https://bugs.webkit.org/show_bug.cgi?id=133667.
1290         <rdar://problem/16743250>
1291
1292         Reviewed by Tim Horton.
1293
1294         * WebProcess/Plugins/PluginView.cpp:
1295         (WebKit::PluginView::PluginView):
1296         (WebKit::PluginView::pluginSnapshotTimerFired):
1297         Set the display state to Playing if the following is true:
1298         The plugin in question is large enough to be considered the primary snapshot and either:
1299         a) The maximum number of snapshot retries has been reached and no good snapshot has been found.
1300         b) The plugin is moved to be on-screen while the snapshot attempts are in progress.
1301         * WebProcess/Plugins/PluginView.h:
1302         * WebProcess/WebPage/WebPage.cpp:
1303         (WebKit::WebPage::plugInIntersectsSearchRect): Re-factor out intersection logic.
1304         (WebKit::WebPage::plugInIsPrimarySize): Re-factor out primary plugin size logic.
1305         (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Use the above two methods here.
1306         * WebProcess/WebPage/WebPage.h:
1307
1308 2014-06-11  Anders Carlsson  <andersca@apple.com>
1309
1310         Move more WKPreferences to WKWebViewConfiguration
1311         https://bugs.webkit.org/show_bug.cgi?id=133756
1312         <rdar://problem/17271468>
1313
1314         Reviewed by Tim Horton.
1315
1316         * UIProcess/API/Cocoa/WKPreferences.h:
1317         * UIProcess/API/Cocoa/WKPreferences.mm:
1318         (-[WKPreferences setMinimumFontSize:]):
1319         (-[WKPreferences suppressesIncrementalRendering]): Deleted.
1320         (-[WKPreferences setSuppressesIncrementalRendering:]): Deleted.
1321         (-[WKPreferences allowsInlineMediaPlayback]): Deleted.
1322         (-[WKPreferences setAllowsInlineMediaPlayback:]): Deleted.
1323         (-[WKPreferences mediaPlaybackRequiresUserAction]): Deleted.
1324         (-[WKPreferences setMediaPlaybackRequiresUserAction:]): Deleted.
1325         (-[WKPreferences mediaPlaybackAllowsAirPlay]): Deleted.
1326         (-[WKPreferences setMediaPlaybackAllowsAirPlay:]): Deleted.
1327         * UIProcess/API/Cocoa/WKWebView.mm:
1328         (-[WKWebView initWithFrame:configuration:]):
1329         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1330         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1331         (-[WKWebViewConfiguration copyWithZone:]):
1332         * WebKit2.xcodeproj/project.pbxproj:
1333
1334 2014-06-11  Enrica Casucci  <enrica@apple.com>
1335
1336         WebKit2 iOS: Unable to open UI menu for "open in new tab" for links on yahoo.com.
1337         https://bugs.webkit.org/show_bug.cgi?id=133749
1338         <rdar://problem/17165992>
1339
1340         Reviewed by Brady Eidson.
1341
1342         The URL returned to the UIProcess as string needs to be encoded.
1343
1344         * WebProcess/WebPage/ios/WebPageIOS.mm:
1345         (WebKit::WebPage::getPositionInformation):
1346
1347 2014-06-10  Anders Carlsson  <andersca@apple.com>
1348
1349         Move suppressesIncrementalRendering to WKWebViewConfiguration
1350         https://bugs.webkit.org/show_bug.cgi?id=133707
1351         <rdar://problem/17271468>
1352
1353         Reviewed by Sam Weinig.
1354
1355         * UIProcess/API/Cocoa/WKPreferences.h:
1356         Get rid of suppressesIncrementalRendering.
1357
1358         * UIProcess/API/Cocoa/WKWebView.mm:
1359         (-[WKWebView initWithFrame:configuration:]):
1360         Set the suppressesIncrementalRenderingKey key in webPageConfiguration.preferenceValues.
1361
1362         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1363         Add suppressesIncrementalRendering.
1364
1365         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1366         (-[WKWebViewConfiguration copyWithZone:]):
1367         Assign suppressesIncrementalRendering.
1368
1369         * UIProcess/WebPageProxy.cpp:
1370         (WebKit::WebPageProxy::WebPageProxy):
1371         Copy webPageConfiguration.preferenceValues to m_configurationPreferenceValues.
1372
1373         (WebKit::WebPageProxy::preferencesStore):
1374         If m_configurationPreferenceValues is empty, just return m_preferences->store(). Otherwise,
1375         copy the store and apply the configuration preference values.
1376
1377         (WebKit::WebPageProxy::preferencesDidChange):
1378         Call preferencesStore() so we'll get the configuration preference values as well.
1379
1380         (WebKit::WebPageProxy::creationParameters):
1381         Ditto.
1382
1383         * UIProcess/WebPageProxy.h:
1384
1385 2014-06-11  Antti Koivisto  <antti@apple.com>
1386
1387         Wrap NSURLRequest in bundle API
1388         https://bugs.webkit.org/show_bug.cgi?id=133732
1389         <rdar://problem/17267217>
1390
1391         Reviewed by Andreas Kling.
1392         
1393         Patch by Dan Bernstein.
1394
1395         We don't want to construct actual NSURLRequests in the web process side unless really needed as it is slow.
1396
1397         * Shared/Cocoa/APIObject.mm:
1398         (API::Object::newObject):
1399         * Shared/Cocoa/WKNSURLRequest.h: Added.
1400         (WebKit::wrapper):
1401         * Shared/Cocoa/WKNSURLRequest.mm: Added.
1402         
1403             Add a wrapper object that initializes the underlying NSURLRequest on-demand.
1404
1405         (-[WKNSURLRequest _web_createTarget]):
1406         (-[WKNSURLRequest URL]):
1407         (-[WKNSURLRequest copyWithZone:]):
1408         * WebKit2.xcodeproj/project.pbxproj:
1409         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1410         (willSendRequestForFrame):
1411         (didInitiateLoadForResource):
1412
1413 2014-06-11  Dan Bernstein  <mitz@apple.com>
1414
1415         <rdar://problem/17218629> [Cocoa] WKWebView’s canGoBack and canGoForward properties are not KVO-compliant
1416         https://bugs.webkit.org/show_bug.cgi?id=133722
1417
1418         Reviewed by Anders Carlsson.
1419
1420         * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
1421         PageLoadStateObserver member functions.
1422
1423         * UIProcess/API/Cocoa/WKWebView.h: Documented the canGoBack and canGoForward properties as
1424         being KVO-compliant.
1425         * UIProcess/API/Cocoa/WKWebView.mm:
1426         (-[WKWebView canGoBack]): Changed to get the return value from the page load state.
1427         (-[WKWebView canGoForward]): Ditto.
1428
1429         * UIProcess/Cocoa/NavigationState.h:
1430         * UIProcess/Cocoa/NavigationState.mm:
1431         (WebKit::NavigationState::willChangeCanGoBack): Override this new PageLoadStateObserver
1432         member function by sending the appropriate KVO change message to the WKWebView.
1433         (WebKit::NavigationState::didChangeCanGoBack): Ditto.
1434         (WebKit::NavigationState::willChangeCanGoForward): Ditto.
1435         (WebKit::NavigationState::didChangeCanGoForward): Ditto.
1436
1437         * UIProcess/PageLoadState.cpp:
1438         (WebKit::PageLoadState::commitChanges): Check for changes to canGoBack and canGoForward
1439         and call the observers if needed.
1440         (WebKit::PageLoadState::canGoBack): Added. Returns the value from the committed state.
1441         (WebKit::PageLoadState::setCanGoBack): Added. Sets the value in the uncommitted state.
1442         (WebKit::PageLoadState::canGoForward): Added. Returns the value from the committed state.
1443         (WebKit::PageLoadState::setCanGoForward): Added. Sets the value in the uncommitted state.
1444         * UIProcess/PageLoadState.h:
1445         (WebKit::PageLoadState::Data::Data): Added canGoBack and canGoForward boolean members.
1446
1447         * UIProcess/WebPageProxy.cpp:
1448         (WebKit::WebPageProxy::didChangeBackForwardList): Update the page load state with the new
1449         state of canGoBack and canGoForward.
1450         * UIProcess/WebPageProxy.h: Removed unused member variables m_canGoBack and m_canGoForward.
1451
1452 2014-06-11  Zan Dobersek  <zdobersek@igalia.com>
1453
1454         Avoid Vector copies in WebNotificationManagerProxy::providerDidCloseNotifications(), FindController::findStringMatches()
1455         https://bugs.webkit.org/show_bug.cgi?id=133676
1456
1457         Reviewed by Andreas Kling.
1458
1459         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1460         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Move the newly-created
1461         Vector object into the HashMap<>::add() call.
1462         * WebProcess/WebPage/FindController.cpp:
1463         (WebKit::FindController::findStringMatches): Movethe newly-create Vector object into the
1464         Vector<>::append() call.
1465
1466 2014-06-11  Shivakumar JM  <shiva.jm@samsung.com>
1467
1468         [EFL][WK2] Add missing test cases for EWK2ViewTest.
1469         https://bugs.webkit.org/show_bug.cgi?id=133715
1470
1471         Reviewed by Gyuyoung Kim.
1472
1473         Add missing test cases for ewk_view.h APIs, ewk_view_stop(), ewk_view_html_string_load(), ewk_view_theme_get(), 
1474         ewk_view_feed_touch_event(), ewk_view_text_find_highlight_clear(), ewk_view_text_find(), ewk_view_text_matches_count(),
1475         ewk_view_page_contents_get(), ewk_view_script_execute().
1476
1477         * PlatformEfl.cmake:
1478         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1479         (TEST_F):
1480
1481 2014-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1482
1483         [GTK] Use a different user agent string depending on the site
1484         https://bugs.webkit.org/show_bug.cgi?id=132681
1485
1486         Reviewed by Anders Carlsson.
1487
1488         * UIProcess/API/gtk/WebKitSettings.cpp:
1489         (webkit_settings_class_init): Enable site specific quirks setting
1490         by default.
1491         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1492         (WebKit::WebFrameLoaderClient::userAgent): Pass the given URL to WebPage.
1493         * WebProcess/WebPage/WebPage.cpp:
1494         (WebKit::WebPage::userAgent): Try to get the user agent for the
1495         URL received falling back to the current one otherwise.
1496         * WebProcess/WebPage/WebPage.h:
1497         (WebKit::WebPage::platformUserAgent): Added.
1498         * WebProcess/WebPage/efl/WebPageEfl.cpp:
1499         (WebKit::WebPage::platformUserAgent): Return null String.
1500         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1501         (WebKit::WebPage::platformUserAgent): Use WebCore::standardUserAgentForURL() when site specific quirks
1502         setting is enabled.
1503         * WebProcess/WebPage/ios/WebPageIOS.mm:
1504         (WebKit::WebPage::platformUserAgent): Return null String.
1505         * WebProcess/WebPage/mac/WebPageMac.mm:
1506         (WebKit::WebPage::platformUserAgent): Return null String.
1507
1508 2014-06-10  Benjamin Poulain  <benjamin@webkit.org>
1509
1510         [iOS][WK2] ScrollingTreeOverflowScrollingNode does not use asynchronous touch dispatch
1511         https://bugs.webkit.org/show_bug.cgi?id=133702
1512         <rdar://problem/17259261>
1513
1514         Reviewed by Simon Fraser.
1515
1516         Notify the WKWebView and the TouchGestureRecognizer when on of the internal UIScrollView
1517         starts scrolling in response to a gesture.
1518
1519         * UIProcess/PageClient.h:
1520         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1521         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1522         (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartPanGesture):
1523         * UIProcess/Scrolling/RemoteScrollingTree.h:
1524         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1525         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1526         (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
1527         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewWillStartPanGesture):
1528         * UIProcess/WebPageProxy.h:
1529         * UIProcess/ios/PageClientImplIOS.h:
1530         * UIProcess/ios/PageClientImplIOS.mm:
1531         (WebKit::PageClientImpl::scrollViewWillStartPanGesture):
1532         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1533         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture):
1534         * UIProcess/ios/WebPageProxyIOS.mm:
1535         (WebKit::WebPageProxy::scrollViewWillStartPanGesture):
1536
1537 2014-06-10  Dan Bernstein  <mitz@apple.com>
1538
1539         WebKit2 part of [Cocoa] Handling authentication challenges should not require multiple delegate methods
1540         https://bugs.webkit.org/show_bug.cgi?id=133697
1541
1542         Reviewed by Anders Carlsson.
1543
1544         * Shared/Authentication/AuthenticationManager.cpp:
1545         (WebKit::AuthenticationManager::performDefaultHandling): Added. Calls the new
1546         AuthenticationClient function receivedRequestToPerformDefaultHandling.
1547         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue): Added. Calls the new
1548         AuthenticationClient function receivedChallengeRejection.
1549         * Shared/Authentication/AuthenticationManager.h:
1550         * Shared/Authentication/AuthenticationManager.messages.in: Added new messages
1551         PerformDefaultHandling and RejectProtectionSpaceAndContinue.
1552
1553         * Shared/Downloads/DownloadAuthenticationClient.h: Override new AuthenticationClient member
1554         functions.
1555
1556         * Shared/Downloads/ios/DownloadIOS.mm:
1557         (WebKit::Download::receivedRequestToPerformDefaultHandling): Added empty implementation.
1558         (WebKit::Download::receivedChallengeRejection): Ditto.
1559
1560         * Shared/Downloads/mac/DownloadMac.mm:
1561         (WebKit::Download::receivedRequestToPerformDefaultHandling): Added. Forwards to the sender.
1562         (WebKit::Download::receivedChallengeRejection): Ditto.
1563
1564         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
1565         (checkChallenge): Factored out a bit of code into this helper function.
1566         (-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]): Use new helper.
1567         (-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
1568         Ditto.
1569         (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Ditto.
1570         (-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
1571         Implemented this optional NSURLAuthenticationChallengeSender protocol method by forwarding
1572         to the decision listener.
1573         (-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
1574         Ditto.
1575
1576         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
1577
1578         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
1579         (WebKit::AuthenticationChallengeProxy::performDefaultHandling): Added. Sends a message to
1580         the authentication manager.
1581         (WebKit::AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue): Ditto.
1582         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
1583
1584         * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
1585         (WebKit::AuthenticationDecisionListener::performDefaultHandling): Added. Forwards to the
1586         authentication challenge proxy.
1587         (WebKit::AuthenticationDecisionListener::rejectProtectionSpaceAndContinue): Ditto.
1588         * UIProcess/Authentication/AuthenticationDecisionListener.h:
1589
1590         * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
1591         * UIProcess/Cocoa/NavigationState.mm:
1592         (WebKit::NavigationState::setNavigationDelegate): Initialize
1593         webViewWillSendRequestForAuthenticationChallenge flag in the delegate methods struct.
1594         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
1595         the delegate implements -_webView:willSendRequestForAuthenticationChallenge:, return true
1596         here; the delegate will respond with -rejectProtectionSpaceAndContinueWithChallenge: if
1597         it cannot authenticate.
1598         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
1599         delegate implements -_webView:willSendRequestForAuthenticationChallenge:, send that message.
1600
1601 2014-06-10  Timothy Horton  <timothy_horton@apple.com>
1602
1603         Factor repeated CFRunLoopObserver code out
1604         https://bugs.webkit.org/show_bug.cgi?id=133690
1605
1606         Reviewed by Simon Fraser.
1607
1608         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1609         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1610         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
1611         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
1612         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1613         (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
1614         (WebKit::coreAnimationDidCommitLayersCallback): Deleted.
1615         (WebKit::RemoteLayerTreeDrawingAreaProxy::scheduleCoreAnimationLayerCommitObserver): Deleted.
1616         (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
1617         Make use of WebCore::RunLoopObserver.
1618
1619 2014-06-10  Anders Carlsson  <andersca@apple.com>
1620
1621         Fix availability declaration.
1622
1623         * UIProcess/API/Cocoa/WKError.h:
1624
1625 2014-06-10  Anders Carlsson  <andersca@apple.com>
1626
1627         Address a comment about a comment.
1628
1629         * UIProcess/API/Cocoa/WKWebView.mm:
1630         (-[WKWebView evaluateJavaScript:completionHandler:]):
1631
1632 2014-06-10  Anders Carlsson  <andersca@apple.com>
1633
1634         Add -[WKWebView evaluateJavaScript:completionHandler:]
1635         https://bugs.webkit.org/show_bug.cgi?id=133689
1636         <rdar://problem/17152685>
1637
1638         Reviewed by Geoffrey Garen.
1639
1640         * Shared/API/c/WKErrorRef.h:
1641         Remove WKErrorCode typedef from here.
1642
1643         * UIProcess/API/C/WKPageLoaderClient.h:
1644         Use uint32_t instead of WKErrorCode.
1645
1646         * UIProcess/API/Cocoa/WKError.h:
1647         (NS_ENUM):
1648         Add a WKErrorDomain and a WKErrorCode enum.
1649
1650         * UIProcess/API/Cocoa/WKError.mm:
1651         (localizedDescriptionForErrorCode):
1652         Helper that returns the localized description given an error code.
1653
1654         (createNSError):
1655         Helper that creates an NSError with the correct localized description given an error code.
1656
1657         * UIProcess/API/Cocoa/WKErrorInternal.h:
1658         Add helpers.
1659
1660         * UIProcess/API/Cocoa/WKWebView.h:
1661         Add evaluateJavaScript:completionHandler: method.
1662
1663         * UIProcess/API/Cocoa/WKWebView.mm:
1664         (callbackErrorCode):
1665         Helper that returns a WKErrorCode from a WebKit::CallbackBase::Error enum.
1666
1667         (-[WKWebView evaluateJavaScript:completionHandler:]):
1668         Run the JavaScript code and handle all the error cases.
1669
1670         (-[WKWebView _runJavaScriptInMainFrame:]):
1671         Reimplement this using the API method.
1672
1673         * WebKit2.xcodeproj/project.pbxproj:
1674         Add new files.
1675
1676 2014-06-10  Anders Carlsson  <andersca@apple.com>
1677
1678         Don't call Connection::terminateSoon if the connection is null
1679         https://bugs.webkit.org/show_bug.cgi?id=133695
1680         <rdar://problem/17069024>
1681
1682         Reviewed by Tim Horton.
1683
1684         * UIProcess/WebProcessProxy.cpp:
1685         (WebKit::WebProcessProxy::removeWebPage):
1686
1687 2014-06-10  Oliver Hunt  <oliver@apple.com>
1688
1689         Add process entitlements
1690         https://bugs.webkit.org/show_bug.cgi?id=133693
1691
1692         Reviewed by Alexey Proskuryakov.
1693
1694         Add entitlements description for Database process, and
1695         ensure that we reference the correct seatbelt profiles.
1696
1697         * Configurations/DatabaseService.Development.xcconfig:
1698         * Configurations/DatabaseService.xcconfig:
1699         * Configurations/Databases-iOS.entitlements:
1700         * Configurations/Network-iOS.entitlements:
1701         * Configurations/WebContent-iOS.entitlements:
1702         * WebKit2.xcodeproj/project.pbxproj:
1703
1704 2014-06-10  Alexey Proskuryakov  <ap@apple.com>
1705
1706         Fix crashes on some plug-in tests.
1707         https://bugs.webkit.org/show_bug.cgi?id=133691
1708         <rdar://problem/17255836>
1709
1710         Reviewed by Anders Carlsson.
1711
1712         * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize):
1713         Cannot use TemporaryChange here, because the object may go away before stack unwinds.
1714
1715 2014-06-10  Antti Koivisto  <antti@apple.com>
1716
1717         Serialize ResourceRequests without platform request
1718         https://bugs.webkit.org/show_bug.cgi?id=133679
1719
1720         Reviewed by Alexey Proskuryakov.
1721
1722         * Shared/WebCoreArgumentCoders.cpp:
1723         (IPC::ArgumentCoder<ResourceRequest>::encode):
1724         (IPC::ArgumentCoder<ResourceRequest>::decode):
1725         
1726             Encode ResourceRequest directly if possible.
1727
1728 2014-06-09  Anders Carlsson  <andersca@apple.com>
1729
1730         Fix build.
1731
1732         * UIProcess/WebPageProxy.cpp:
1733         (WebKit::WebPageProxy::resetState):
1734
1735 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
1736
1737         Work towards having frames in the scrolling tree
1738         https://bugs.webkit.org/show_bug.cgi?id=133665
1739
1740         Reviewed by Tim Horton.
1741         
1742         Override coordinatesScrollingForFrameView() to always return true for composited
1743         frames, for iOS WK2 (eventually this class will have to be specialized for iOS and OS X).
1744
1745         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
1746         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
1747         (WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):
1748
1749 2014-06-09  Anders Carlsson  <andersca@apple.com>
1750
1751         Give callbacks real status codes
1752         https://bugs.webkit.org/show_bug.cgi?id=133668
1753
1754         Reviewed by Dan Bernstein.
1755
1756         This makes it possible to know whether a callback was invalidated due to the webpage being closed,
1757         or whether it was due the a web process crash.
1758
1759         * UIProcess/GenericCallback.h:
1760         (WebKit::GenericCallback::create):
1761         (WebKit::GenericCallback::performCallbackWithReturnValue):
1762         (WebKit::GenericCallback::invalidate):
1763         (WebKit::invalidateCallbackMap):
1764         * UIProcess/WebPageProxy.cpp:
1765         (WebKit::WebPageProxy::close):
1766         (WebKit::WebPageProxy::resetState):
1767         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1768         * UIProcess/WebPageProxy.h:
1769
1770 2014-06-09  Enrica Casucci  <enrica@apple.com>
1771
1772         iOS WebKit: Crash in charactersAroundPosition.
1773         https://bugs.webkit.org/show_bug.cgi?id=133659
1774         <rdar://problem/17220870>
1775
1776         Reviewed by Benjamin Poulain.
1777
1778         We only need to compute charactersAroundPosition when we are in
1779         editable content.
1780
1781         * WebProcess/WebPage/WebPage.cpp:
1782         (WebKit::WebPage::editorState):
1783
1784 2014-06-06  Andy Estes  <aestes@apple.com>
1785
1786         [iOS] Expose _WKWebViewPrintFormatter and -_webView:printFrame: as SPI
1787         https://bugs.webkit.org/show_bug.cgi?id=133600
1788
1789         Reviewed by David Kilzer.
1790
1791         Expose -_webView:printFrame: in WKUIDelegatePrivate so that clients can implement support for window.print().
1792         Since window.print() can be called from a subframe, expose _WKWebViewPrintFormatter (renamed from
1793         WKWebViewPrintFormatter to reflect its new SPI status) as SPI and add a frameToPrint property.
1794
1795         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Forward-declared _WKFrameHandle and declared -_webView:printFrame:.
1796         * UIProcess/API/Cocoa/WKWebView.mm:
1797         (-[WKWebView _webViewPrintFormatter]): Added to get a _WKWebViewPrintFormatter.
1798         (-[WKWebView _printFormatterClass]): Updated the class name to _WKWebViewPrintFormatter.
1799         (-[WKWebView _computePageCountAndStartDrawingToPDFForFrame:printInfo:WebKit::firstPage:computedTotalScaleFactor:]):
1800         Added a frame argument. If frame is nil, print the main frame.
1801         (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]): Deleted.
1802         * UIProcess/API/Cocoa/WKWebViewInternal.h: Forward-declared _WKFrameHandle; removed an unneccessary
1803         forward-declaration of WKWebViewPrintFormatter.
1804         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Added a _webViewPrintFormatter property.
1805         * UIProcess/Cocoa/UIDelegate.h:
1806         * UIProcess/Cocoa/UIDelegate.mm:
1807         (WebKit::UIDelegate::setDelegate):
1808         (WebKit::UIDelegate::UIClient::printFrame): Called -_webView:printFrame:.
1809         * UIProcess/_WKWebViewPrintFormatter.h: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.h.
1810         * UIProcess/_WKWebViewPrintFormatter.mm: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.mm.
1811         * WebKit2.xcodeproj/project.pbxproj:
1812
1813 2014-06-09  Beth Dakin  <bdakin@apple.com>
1814
1815         Flash video controls hit-test incorrectly after changing topContentInset
1816         https://bugs.webkit.org/show_bug.cgi?id=133658
1817         -and corresponding-
1818         <rdar://problem/16978590>
1819
1820         Reviewed by Anders Carlsson.
1821
1822         When the topContent changes, the PluginView needs to be informed.
1823
1824         New function PluginView::topContentInsetDidChange() calls viewGeometryDidChange().
1825         * WebProcess/Plugins/PluginView.cpp:
1826         (WebKit::PluginView::topContentInsetDidChange):
1827         * WebProcess/Plugins/PluginView.h:
1828
1829         Call topContentInsetDidChange() after setting an inset only if it is a new inset.
1830         * WebProcess/WebPage/WebPage.cpp:
1831         (WebKit::WebPage::setTopContentInset):
1832
1833 2014-06-09  Daniel Bates  <dabates@apple.com>
1834
1835         Another attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
1836         (https://bugs.webkit.org/show_bug.cgi?id=133657)
1837
1838         Substitute WKErrorRef.h for WKError.h.
1839
1840         * UIProcess/API/efl/ewk_error.cpp:
1841         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
1842         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
1843
1844 2014-06-09  Daniel Bates  <dabates@apple.com>
1845
1846         Attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
1847         (https://bugs.webkit.org/show_bug.cgi?id=133657)
1848
1849         Rename Shared/API/c/WKError.cpp to Shared/API/c/WKErrorRef.cpp.
1850
1851         * CMakeLists.txt:
1852
1853 2014-06-09  Anders Carlsson  <andersca@apple.com>
1854
1855         Address review feedback.
1856
1857         * UIProcess/API/Cocoa/WKWebView.h:
1858
1859 2014-06-09  Anders Carlsson  <andersca@apple.com>
1860
1861         Add a WKError.h header and rename the existing WKError.h to WKErrorRef.h
1862         https://bugs.webkit.org/show_bug.cgi?id=133657
1863
1864         Reviewed by Dan Bernstein.
1865
1866         * Shared/API/Cocoa/WebKit.h:
1867         * Shared/API/c/WKErrorRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKError.cpp.
1868         (WKErrorGetTypeID):
1869         (WKErrorCopyWKErrorDomain):
1870         (WKErrorCopyDomain):
1871         (WKErrorGetErrorCode):
1872         (WKErrorCopyFailingURL):
1873         (WKErrorCopyLocalizedDescription):
1874         * Shared/API/c/WKErrorRef.h: Renamed from Source/WebKit2/Shared/API/c/WKError.h.
1875         * UIProcess/API/C/WKPage.h:
1876         * UIProcess/API/C/WKPageLoaderClient.h:
1877         * UIProcess/API/C/WebKit2_C.h:
1878         * UIProcess/API/Cocoa/WKError.h: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
1879         * UIProcess/API/Cocoa/WKError.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
1880         * WebKit2.xcodeproj/project.pbxproj:
1881         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1882
1883 2014-06-09  Brady Eidson  <beidson@apple.com>
1884
1885         Use different AppKit API for all services menus
1886         <rdar://problem/16874403> and https://bugs.webkit.org/show_bug.cgi?id=133649
1887
1888         Reviewed by Tim Horton.
1889
1890         * UIProcess/mac/WebContextMenuProxyMac.mm:
1891         (WebKit::WebContextMenuProxyMac::showContextMenu):
1892
1893 2014-06-09  Anders Carlsson  <andersca@apple.com>
1894
1895         Add WKWindowFeatures.h to the umbrella header.
1896
1897         Reviewed by Dan Bernstein.
1898
1899         * Shared/API/Cocoa/WebKit.h:
1900
1901 2014-06-09  Anders Carlsson  <andersca@apple.com>
1902
1903         Add -[WKWebView loadHTMLString:baseURL:]
1904         https://bugs.webkit.org/show_bug.cgi?id=133645
1905         <rdar://problem/17170649>
1906
1907         Reviewed by Sam Weinig.
1908
1909         * UIProcess/API/Cocoa/WKWebView.h:
1910         * UIProcess/API/Cocoa/WKWebView.mm:
1911         (-[WKWebView loadHTMLString:baseURL:]):
1912         * UIProcess/Cocoa/NavigationState.h:
1913         * UIProcess/Cocoa/NavigationState.mm:
1914         (WebKit::NavigationState::createLoadDataNavigation):
1915         * UIProcess/WebPageProxy.cpp:
1916         (WebKit::WebPageProxy::loadHTMLString):
1917         * UIProcess/WebPageProxy.h:
1918         * WebProcess/WebPage/WebPage.cpp:
1919         (WebKit::WebPage::loadDataImpl):
1920         (WebKit::WebPage::loadString):
1921         (WebKit::WebPage::loadData):
1922         (WebKit::WebPage::loadHTMLString):
1923         (WebKit::WebPage::loadAlternateHTMLString):
1924         (WebKit::WebPage::loadPlainTextString):
1925         (WebKit::WebPage::loadWebArchiveData):
1926         * WebProcess/WebPage/WebPage.h:
1927         * WebProcess/WebPage/WebPage.messages.in:
1928
1929 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
1930
1931         Fix more latched scrolling test flakiness and slowness
1932         https://bugs.webkit.org/show_bug.cgi?id=133601
1933
1934         Reviewed by Brent Fulgham.
1935
1936         Latched scrolling tests were flakey for two reasons. First, the EventSender
1937         wheel events were async from the web to the UI process, and the resulting
1938         synthetic events also async from the UI to the web process. Make them sync
1939         for testing.
1940         
1941         Secondly, the timer-based scrolling tree commit could result in the scrolling
1942         tree (specifically the frame node's notion of the scrollable area and content
1943         size) not being updated before the scrolling thread starts getting wheel events.
1944         Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
1945         
1946         Finally remove all the now-unnecessary timeouts from the tests.
1947
1948         * WebProcess/WebPage/WebPage.cpp:
1949         (WebKit::WebPage::wheelEventSyncForTesting):
1950
1951 2014-06-09  Andrzej Badowski  <a.badowski@samsung.com>
1952
1953         [EFL] Add parameter to MiniBrowser to disable web security
1954         https://bugs.webkit.org/show_bug.cgi?id=121095
1955
1956         Reviewed by Gyuyoung Kim.
1957
1958         -w (--web-security) commandline allows to disable/enable web security (enabled by default).
1959         The reason for this is to test and debug (using, for example, MiniBrowser) scripts accessing
1960         resources from other domains (cross-domain requests) such as access map location on another server.
1961         Another possibility is to launch in a webkit browser local file tests that will refer to the links
1962         in the http website loaded in an iframe. It will not be possible without deactivation of web security.
1963
1964         * UIProcess/API/efl/ewk_settings.cpp:
1965         (ewk_settings_web_security_enabled_set):
1966         (ewk_settings_web_security_enabled_get):
1967         * UIProcess/API/efl/ewk_settings.h:
1968         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
1969         (TEST_F):
1970
1971 2014-06-08  Sam Weinig  <sam@webkit.org>
1972
1973         [Cocoa] WKScriptMessage should include the frame the message is from
1974         <rdar://problem/17210226>
1975         https://bugs.webkit.org/show_bug.cgi?id=133623
1976
1977         Reviewed by Dan Bernstein.
1978
1979         * UIProcess/API/Cocoa/WKScriptMessage.h:
1980         Add WKFrameInfo property.
1981
1982         * UIProcess/API/Cocoa/WKScriptMessage.mm:
1983         (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
1984         Add WKFrameInfo to the initializer.
1985
1986         (-[WKScriptMessage frameInfo]):
1987         Implement frameInfo accessor.
1988
1989         * UIProcess/API/Cocoa/WKScriptMessageInternal.h:
1990         Add WKFrameInfo to the initializer.
1991
1992         * UIProcess/API/Cocoa/WKUserContentController.mm:
1993         Pass the WKFrameInfo to the WKScriptMessage initializer.
1994
1995 2014-06-08  Dan Bernstein  <mitz@apple.com>
1996
1997         [Cococa] WKWindowFeatures.h is missing from WebKit.framework
1998         https://bugs.webkit.org/show_bug.cgi?id=133622
1999
2000         Reviewed by Sam Weinig.
2001
2002         * WebKit2.xcodeproj/project.pbxproj: Promoted WKWindowFeatures.h to Public.
2003
2004 2014-06-08  Dan Bernstein  <mitz@apple.com>
2005
2006         <rdar://problem/17208234> [Mac] Client-certificate authentication isn’t working when using the modern API
2007         https://bugs.webkit.org/show_bug.cgi?id=133617
2008
2009         Reviewed by Sam Weinig.
2010
2011         * Shared/WebCoreArgumentCoders.cpp:
2012         (IPC::ArgumentCoder<Credential>::encode): Encode certificate credentials on Mac as well.
2013         (IPC::ArgumentCoder<Credential>::decode): Decode certificate credentials on Mac as well.
2014
2015         * Shared/cf/ArgumentCodersCF.cpp:
2016         (IPC::encode): Use OS X API for getting a persistent reference to a key.
2017         (IPC::decode): Use OS X API for getting a key from a persistent reference.
2018
2019         * Shared/cf/ArgumentCodersCF.h: Make identity coding available on Mac as well.
2020
2021 2014-06-07  Anders Carlsson  <andersca@apple.com>
2022
2023         Get rid of _WKScriptWorld
2024         https://bugs.webkit.org/show_bug.cgi?id=133610
2025
2026         Reviewed by Dan Bernstein.
2027
2028         * Shared/API/Cocoa/WebKitPrivate.h:
2029         * UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
2030         * UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
2031         * WebKit2.xcodeproj/project.pbxproj:
2032
2033 2014-05-29  Anders Carlsson  <andersca@apple.com>
2034
2035         HTTPHeaderMap should not derive from HashMap
2036         https://bugs.webkit.org/show_bug.cgi?id=133392
2037
2038         Reviewed by Darin Adler.
2039
2040         * Shared/WebCoreArgumentCoders.cpp:
2041         (IPC::ArgumentCoder<HTTPHeaderMap>::encode):
2042         (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
2043
2044 2014-06-07  Alexey Proskuryakov  <ap@apple.com>
2045
2046         [iOS] Fix a path used for sandbox profiles
2047         https://bugs.webkit.org/show_bug.cgi?id=133602
2048         <rdar://problem/17212011>
2049
2050         Reviewed by David Kilzer.
2051
2052         * WebKit2.xcodeproj/project.pbxproj:
2053
2054 2014-06-06  Enrica Casucci  <enrica@apple.com>
2055
2056         REGRESSION (iOS WebKit2): backspace key does not repeat beyond a single word.
2057         https://bugs.webkit.org/show_bug.cgi?id=133593
2058         <rdar://problem/16352228>
2059
2060         Reviewed by Benjamin Poulain.
2061
2062         We need to provide a way for the keyboard layer to select from
2063         the current position to the beginning of the word moving backwards
2064         and implement the method to know when we have reached the beginning of the document.
2065
2066         * UIProcess/WebPageProxy.h:
2067         * UIProcess/ios/WKContentViewInteraction.mm:
2068         (-[WKContentView selectWordBackward]):
2069         (-[WKContentView _selectionAtDocumentStart]):
2070         * UIProcess/ios/WebPageProxyIOS.mm:
2071         (WebKit::WebPageProxy::selectWordBackward):
2072         * WebProcess/WebPage/WebPage.h:
2073         * WebProcess/WebPage/WebPage.messages.in:
2074         * WebProcess/WebPage/ios/WebPageIOS.mm:
2075         (WebKit::WebPage::selectWordBackward):
2076
2077 2014-06-06  Enrica Casucci  <enrica@apple.com>
2078
2079         Adopt the new UIAlertController API to replace UIActionSheet.
2080         https://bugs.webkit.org/show_bug.cgi?id=133582
2081         <rdar://problem/16845223>
2082
2083         Reviewed by Joseph Pecoraro.
2084
2085         UIActionSheet is deprecated. We need to move out action sheets
2086         implementation to UIAlertView.
2087
2088         * UIProcess/API/Cocoa/_WKElementAction.h:
2089         * UIProcess/API/Cocoa/_WKElementAction.mm:
2090         * UIProcess/ios/WKActionSheet.h:
2091         * UIProcess/ios/WKActionSheet.mm:
2092         (-[WKActionSheet presentSheetFromRect:]):
2093         (-[WKActionSheet doneWithSheet]):
2094         (-[WKActionSheet willRotate]):
2095         (-[WKActionSheet updateSheetPosition]):
2096         (-[WKActionSheet _didRotateAndLayout]):
2097         (-[WKActionSheet didRotate]):
2098         * UIProcess/ios/WKActionSheetAssistant.h:
2099         * UIProcess/ios/WKActionSheetAssistant.mm:
2100         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
2101         (-[WKActionSheetAssistant showImageSheet]):
2102         (-[WKActionSheetAssistant showLinkSheet]):
2103         (-[WKActionSheetAssistant showDataDetectorsSheet]):
2104         (-[WKActionSheetAssistant cleanupSheet]):
2105         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Deleted.
2106         * UIProcess/ios/WKContentViewInteraction.mm:
2107         (-[WKContentView _longPressRecognized:]):
2108
2109 2014-06-06  Gavin Barraclough  <baraclough@apple.com>
2110
2111         Should boost ChildProcesses on iOS
2112         https://bugs.webkit.org/show_bug.cgi?id=133583
2113
2114         Reviewed by Sam Weinig.
2115
2116         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2117         (WebKit::connectToService):
2118             - boost all child processes on iOS.
2119
2120 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
2121
2122         Build fix after <http://trac.webkit.org/changeset/169655>.
2123
2124         The SPIs used do not exist on Mac, limit the code to iOS.
2125
2126         * Shared/Authentication/mac/AuthenticationManager.mac.mm:
2127         * Shared/WebCoreArgumentCoders.cpp:
2128         (IPC::ArgumentCoder<Credential>::encode):
2129         (IPC::ArgumentCoder<Credential>::decode):
2130         * Shared/cf/ArgumentCodersCF.cpp:
2131         (IPC::typeFromCFTypeRef):
2132         (IPC::encode):
2133         (IPC::decode):
2134         * Shared/cf/ArgumentCodersCF.h:
2135
2136 2014-06-06  Dan Bernstein  <mitz@apple.com>
2137
2138         <rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
2139         https://bugs.webkit.org/show_bug.cgi?id=133527
2140
2141         Reviewed by Darin Adler.
2142
2143         * Configurations/Network-iOS.entitlements: Enabled the Network process to access the keys
2144         needed to create identities to authenticate with.
2145
2146         * Shared/WebCoreArgumentCoders.cpp:
2147         (IPC::ArgumentCoder<Credential>::encode): Encode the credential type, and if it is a client
2148         certificate, encode the identity and the certificates.
2149         (IPC::ArgumentCoder<Credential>::decode): Decode the credential type. If it is a client
2150         certificate, decode the identity and the certificates and use the proper Credential
2151         constructor.
2152
2153         * Shared/cf/ArgumentCodersCF.cpp:
2154         (IPC::typeFromCFTypeRef): Handle SecIdentityRef.
2155         (IPC::encode): Encode an identity by encoding its certificate and a persistent reference to
2156         its key.
2157         (IPC::decode): Decode a certificate and a persistent reference to a key, find the key, and
2158         create an identity.
2159         * Shared/cf/ArgumentCodersCF.h:
2160
2161 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
2162
2163         [iOS][WK2] WebPage sometimes forces two resize events on animated resize
2164         https://bugs.webkit.org/show_bug.cgi?id=133534
2165
2166         Reviewed by Enrica Casucci.
2167
2168         When I updated the patch for resize events (r168556) to use the unobscured rect in scrollview coordinates,
2169         I forgot to update a snippet of code in dynamicViewportSizeUpdate(). Since that code was still using
2170         the scaled unobscured rect, there was sometimes a difference of 1 pixel between the size set by that
2171         call site and the others.
2172
2173         This path nukes the bad code and use the unobscured rect in scrollview coordinates given by the UIProcess.
2174
2175         * WebProcess/WebPage/ios/WebPageIOS.mm:
2176         (WebKit::WebPage::dynamicViewportSizeUpdate):
2177
2178 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
2179
2180         [iOS][WK2] Add device orientation
2181         https://bugs.webkit.org/show_bug.cgi?id=133530
2182         <rdar://problem/16680041>
2183
2184         Reviewed by Tim Horton.
2185
2186         Add device orientation for WebKit2.
2187
2188         For the public API, WKWebView get the updates through the notification UIWindowDidRotateNotification.
2189         We do not have any control over how the API is used, but we can expect the size will be updated before
2190         the end of rotation in most cases and the events should be sent in the right order.
2191
2192         For Safari, we use an override to support animated resize (and some tabs corner cases).
2193
2194         On the WebProcess side, we just get the new orientation directly or on DynamicViewportSizeUpdate.
2195
2196         * UIProcess/API/Cocoa/WKWebView.mm:
2197         (deviceOrientationForUIInterfaceOrientation):
2198         (deviceOrientation):
2199         (-[WKWebView initWithFrame:configuration:]):
2200         (-[WKWebView _windowDidRotate:]):
2201         (-[WKWebView _setInterfaceOrientationOverride:]):
2202         (-[WKWebView _interfaceOrientationOverride]):
2203         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2204         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2205         * UIProcess/WebPageProxy.cpp:
2206         (WebKit::WebPageProxy::WebPageProxy):
2207         * UIProcess/WebPageProxy.h:
2208         (WebKit::WebPageProxy::deviceOrientation):
2209         * UIProcess/ios/WebPageProxyIOS.mm:
2210         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2211         (WebKit::WebPageProxy::setDeviceOrientation):
2212         * WebProcess/WebCoreSupport/WebChromeClient.h:
2213         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2214         (WebKit::WebChromeClient::deviceOrientation):
2215         * WebProcess/WebPage/WebPage.cpp:
2216         (WebKit::WebPage::WebPage):
2217         * WebProcess/WebPage/WebPage.h:
2218         (WebKit::WebPage::deviceOrientation):
2219         * WebProcess/WebPage/WebPage.messages.in:
2220         * WebProcess/WebPage/ios/WebPageIOS.mm:
2221         (WebKit::WebPage::setDeviceOrientation):
2222         (WebKit::WebPage::dynamicViewportSizeUpdate):
2223
2224 2014-06-05  Oliver Hunt  <oliver@apple.com>
2225
2226         Enable SANDBOX_EXTENSIONS build flag universally on cocoa
2227         https://bugs.webkit.org/show_bug.cgi?id=133556
2228
2229         Reviewed by Alexey Proskuryakov.
2230
2231         Remove unnecessary iOS exception.
2232
2233         * WebKit2Prefix.h:
2234
2235 2014-06-05  Alexey Proskuryakov  <ap@apple.com>
2236
2237         [Mac] Tweak plug-in sandbox profiles
2238         https://bugs.webkit.org/show_bug.cgi?id=133549
2239
2240         Fix <rdar://problem/17068055> and <rdar://problem/17148837>.
2241
2242         Reviewed by Sam Weinig and Simon Cooper.
2243
2244         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2245         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2246
2247 2014-06-05  Tanay C  <tanay.c@samsung.com>
2248
2249         Resolve compiler error (call of overloaded 'schedule' function is ambiguous) 
2250         https://bugs.webkit.org/show_bug.cgi?id=133467
2251
2252         Reviewed by Carlos Garcia Campos.
2253
2254         * Shared/Downloads/soup/DownloadSoup.cpp:
2255         (WebKit::DownloadClient::handleResponseLater): Explicitly casting second parameter to std::function<void()>
2256
2257 2014-06-04  Benjamin Poulain  <bpoulain@apple.com>
2258
2259         [iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
2260         https://bugs.webkit.org/show_bug.cgi?id=133490
2261
2262         Reviewed by Tim Horton.
2263
2264         Instead of restoring the scroll position, restore the visual position. This makes pages appear at the same position
2265         on screen ignoring changes in the obscured top inset.
2266
2267         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2268         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
2269         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
2270         (WebKit::WebFrameLoaderClient::restoreViewState):
2271         Save and restore userHasChangedPageScaleFactor to handle rescaling correctly.
2272         Limit the scale into valid viewport limits in case the viewport meta tag has changed or the device has rotated.
2273
2274         * WebProcess/WebPage/WebPage.cpp:
2275         (WebKit::WebPage::WebPage):
2276         * WebProcess/WebPage/WebPage.h:
2277         (WebKit::WebPage::userHasChangedPageScaleFactor):
2278         * WebProcess/WebPage/ios/WebPageIOS.mm:
2279         (WebKit::WebPage::restorePageState):
2280         (WebKit::WebPage::updateVisibleContentRects):
2281         In updateVisibleContentRects, we keep track or the current difference between the exposed rect and the unobscured rect.
2282         When restoring the page position, we use the current top inset and the saved exposed rect to restore the visual
2283         scroll position.
2284
2285         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.
2286
2287 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
2288
2289         WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
2290         https://bugs.webkit.org/show_bug.cgi?id=133472
2291         <rdar://problem/15686848>
2292
2293         Reviewed by Simon Fraser.
2294
2295         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2296         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2297         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2298         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
2299         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
2300         Use prepopulateRect() when zooming out to ensure that we have tiles for the current exposed area.
2301
2302         Factor applyTransientZoomToLayers out of adjustTransientZoom, so that
2303         flushLayers can call applyTransientZoomToLayers without ending up calling prepopulateRect()
2304         during layer flushing, which causes trouble.
2305
2306         It is OK to populate layers at the current scale even when zooming out, because the overdraw
2307         already covers most of the zoomed out area, and we're only adding a few more tiles at worst.
2308
2309 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
2310
2311         [iOS][WK2] Align the highlight rects with device pixels
2312         https://bugs.webkit.org/show_bug.cgi?id=133464
2313         <rdar://problem/16708861>
2314
2315         Reviewed by Enrica Casucci.
2316
2317         * UIProcess/ios/WKContentViewInteraction.mm:
2318         (-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
2319
2320 2014-06-02  Enrica Casucci  <enrica@apple.com>
2321
2322         REGRESSION (iOS WebKit2): Single tap in pages with focus on load will clear the selection after the keyboard appears.
2323         https://bugs.webkit.org/show_bug.cgi?id=133465
2324         <rdar://problem/17059189>
2325
2326         Reviewed by Benjamin Poulain.
2327
2328         If a page focuses an input field on load we don't bring the keyboard on screen
2329         since the keyboard is only shown when the user interacts with the page with gestures.
2330         Still the WebProcess sets the focus and the selection according to the rules.
2331         We need to make sure the UI process doesn't accidentally clear this selection
2332         when the user starts the interaction with the page.
2333         This patch also improves the function that retrieves the autocorrection data
2334         to be returned to the keyboard, making sure that we always send back a reply
2335         even when we don't have a valid selection.
2336
2337         * UIProcess/ios/WKContentViewInteraction.mm:
2338         (-[WKContentView _singleTapCommited:]):
2339         * WebProcess/WebPage/ios/WebPageIOS.mm:
2340         (WebKit::WebPage::requestAutocorrectionData):
2341
2342 2014-05-31  Anders Carlsson  <andersca@apple.com>
2343
2344         Change DeferrableOneShotTimer to use std::function instead of being a class template
2345         https://bugs.webkit.org/show_bug.cgi?id=133423
2346
2347         Reviewed by Antti Koivisto.
2348
2349         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2350         (WebKit::NetworkProcess::platformSetCacheModel):
2351         * Shared/CacheModel.cpp:
2352         (WebKit::calculateCacheSizes):
2353         * Shared/CacheModel.h:
2354         * WebProcess/Plugins/PluginView.cpp:
2355         (WebKit::PluginView::pluginSnapshotTimerFired):
2356         * WebProcess/Plugins/PluginView.h:
2357         * WebProcess/cocoa/WebProcessCocoa.mm:
2358         (WebKit::WebProcess::platformSetCacheModel):
2359
2360 2014-06-02  Benjamin Poulain  <bpoulain@apple.com>
2361
2362         [iOS][WK2] Round the UIScrollView content size to device pixel
2363         https://bugs.webkit.org/show_bug.cgi?id=133417
2364         <rdar://problem/15922440>
2365
2366         Reviewed by Simon Fraser.
2367
2368         We should really have the scaled content size floored to device pixels, but that will be for another
2369         time.
2370         This patch ensure the content size as seen by the API is rounded to device pixels. The value is floored
2371         to avoid showing partial pixels when the content is stable.
2372
2373         * UIProcess/API/Cocoa/WKWebView.mm:
2374         (floorFloatToPixels):
2375         (roundScrollViewCountentSize):
2376         (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
2377         (-[WKWebView _didCommitLayerTree:WebKit::]):
2378         (-[WKWebView scrollView:contentSizeForZoomScale:withProposedSize:]):
2379         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2380         (-[WKWebView _endAnimatedResize]):
2381
2382 2014-06-02  Oliver Hunt  <oliver@apple.com>
2383
2384         Move ifdef to the right place.
2385
2386         RS=Enrica
2387
2388         * WebProcess/cocoa/WebProcessCocoa.mm:
2389         (WebKit::WebProcess::initializeSandbox):
2390
2391 2014-06-02  Gavin Barraclough  <barraclough@apple.com>
2392
2393         Set default voucher for XPC client processes
2394         https://bugs.webkit.org/show_bug.cgi?id=133458
2395
2396         Reviewed by Geoff Garen.
2397
2398         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2399         (WebKit::XPCServiceInitializer):
2400             - add voucher_replace_default_voucher.
2401         * config.h:
2402             - add HAVE_VOUCHERS.
2403
2404 2014-06-02  Jeremy Jones  <jeremyj@apple.com>
2405
2406         Send external playback properties to fullscreen.
2407         https://bugs.webkit.org/show_bug.cgi?id=133366
2408
2409         Reviewed by Simon Fraser.
2410
2411         Forward setExternalPlayback.
2412
2413         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: add setExternalPlaybackProperties
2414         * WebProcess/ios/WebVideoFullscreenManager.h: add setExternalPlaybackProperties
2415         * WebProcess/ios/WebVideoFullscreenManager.mm: add setExternalPlaybackProperties
2416         (WebKit::WebVideoFullscreenManager::setExternalPlaybackProperties): added
2417
2418 2014-06-02  Enrica Casucci  <enrica@apple.com>
2419
2420         Remove unintentional changes to WKContentViewInteraction.mm
2421         introduced in r169500.
2422
2423         Unreviewed.
2424
2425         * UIProcess/ios/WKContentViewInteraction.mm:
2426         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
2427
2428 2014-06-02  Geoffrey Garen  <ggaren@apple.com>
2429
2430         Address some review comments on bug 133408
2431         https://bugs.webkit.org/show_bug.cgi?id=133410
2432
2433         Reviewed by Anders Carlsson.
2434
2435         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
2436         * UIProcess/API/Cocoa/WKUIDelegate.h:
2437
2438 2014-06-02  Dan Bernstein  <mitz@apple.com>
2439
2440         [Cocoa] -[WKWebView activeURL] is unused
2441         https://bugs.webkit.org/show_bug.cgi?id=133440
2442
2443         Reviewed by Mark Rowe.
2444
2445         * UIProcess/API/Cocoa/WKWebView.mm:
2446         (-[WKWebView activeURL]): Deleted.
2447         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed the property declaration.
2448
2449 2014-05-31  Oliver Hunt  <oliver@apple.com>
2450
2451         Restructure initial distinct sandbox profiles
2452         https://bugs.webkit.org/show_bug.cgi?id=133415
2453
2454         Reviewed by Alexey Proskuryakov.
2455
2456         Add support for manually instantiating the network and
2457         content process sandboxes, and add initial profiles.
2458         These profiles are completely generic so we can make sure
2459         nothing is broken by enabling them.
2460
2461         This also adds a target to the WebKit2 project to correctly
2462         process the profiles.
2463
2464         * DatabaseProcess/ios/DatabaseProcessIOS.mm:
2465         (WebKit::DatabaseProcess::initializeSandbox):
2466         * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Removed.
2467         * NetworkProcess/ios/NetworkProcessIOS.mm:
2468         (WebKit::NetworkProcess::initializeSandbox):
2469         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Added.
2470         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Added.
2471         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Added.
2472         * WebKit2.xcodeproj/project.pbxproj:
2473         * WebProcess/cocoa/WebProcessCocoa.mm:
2474         (WebKit::WebProcess::initializeSandbox):
2475
2476 2014-06-01  Sam Weinig  <sam@webkit.org>
2477
2478         [Cocoa] Add SPI to get a WebArchive of the WKWebView
2479         <rdar://problem/16748120>
2480         https://bugs.webkit.org/show_bug.cgi?id=133439
2481
2482         Reviewed by Anders Carlsson.
2483
2484         * UIProcess/API/Cocoa/WKWebView.mm:
2485         (-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
2486         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2487
2488 2014-05-31  Anders Carlsson  <andersca@apple.com>
2489
2490         Add a LazyNeverDestroyed class template and use it
2491         https://bugs.webkit.org/show_bug.cgi?id=133425
2492
2493         Reviewed by Darin Adler.
2494
2495         * Shared/mac/SecItemShim.cpp:
2496         (WebKit::responseMap):
2497
2498 2014-05-31  Timothy Horton  <timothy_horton@apple.com>
2499
2500         View snapshots are sometimes taken at the wrong scale
2501         https://bugs.webkit.org/show_bug.cgi?id=133419
2502         <rdar://problem/17087497>
2503
2504         Reviewed by Sam Weinig.
2505
2506         * UIProcess/API/mac/WKView.mm:
2507         (-[WKView _takeViewSnapshot]):
2508         Work around <rdar://problem/17084993> by re-requesting the snapshot at
2509         kCGWindowImageNominalResolution if it was captured at the wrong scale.
2510
2511 2014-05-31  Dan Bernstein  <mitz@apple.com>
2512
2513         [iOS] WebKit2.framework is unused
2514         https://bugs.webkit.org/show_bug.cgi?id=133424
2515
2516         Reviewed by Anders Carlsson.
2517
2518         * Configurations/WebKit2.xcconfig: Set SKIP_INSTALL to YES when targeting iOS.
2519
2520 2014-05-30  Benjamin Poulain  <bpoulain@apple.com>
2521
2522         [iOS][WK2] When a page does not finish rotation before the end of the animation, synchronize explicitely
2523         https://bugs.webkit.org/show_bug.cgi?id=133364
2524         <rdar://problem/17026333>
2525
2526         Reviewed by Sam Weinig.
2527
2528         When a page that does layout on rotation does not respond before the end of the animation, we end up with
2529         a completely inconsistent state on the UIProcess (because it is unware of the new states).
2530
2531         The perfect way to fix this would be to make animated resize transactional and have the WebProcess resolve
2532         conflicts. That is very complicated and the issue is uncommon, so this patch does not do that.
2533
2534         This patch force the synchronization whenever we finish the animation before we heard back
2535         from the WebProcess.
2536
2537         * UIProcess/API/Cocoa/WKWebView.mm:
2538         (-[WKWebView _endAnimatedResize]):
2539         * UIProcess/WebPageProxy.cpp:
2540         (WebKit::WebPageProxy::WebPageProxy):
2541         (WebKit::WebPageProxy::resetState):
2542         * UIProcess/WebPageProxy.h:
2543         * UIProcess/ios/WebPageProxyIOS.mm:
2544         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2545         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2546         (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
2547         * WebProcess/WebPage/WebPage.h:
2548         * WebProcess/WebPage/WebPage.messages.in:
2549         * WebProcess/WebPage/ios/WebPageIOS.mm:
2550         (WebKit::WebPage::dynamicViewportSizeUpdate):
2551         (WebKit::WebPage::synchronizeDynamicViewportUpdate):
2552
2553 2014-05-30  Enrica Casucci  <enrica@apple.com>
2554
2555         REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
2556         https://bugs.webkit.org/show_bug.cgi?id=133413
2557         <rdar://problem/16948333>
2558
2559         Reviewed by Benjamin Poulain.
2560
2561         iOS TextInput needs to know about content surrounding the
2562         current position while editing. Since we don't want to
2563         query this information synchronously when asked, we cache it
2564         as part of the EditorState. EditorState now contains a vector of
2565         three characters representing the content after, before and two
2566         position before the caret position.
2567         The patch also replaces all calls to plainText with plainTextReplacingNoBreakSpace
2568         to work well with iOS text input.
2569
2570         * Shared/EditorState.cpp:
2571         (WebKit::EditorState::encode):
2572         (WebKit::EditorState::decode):
2573         * Shared/EditorState.h:
2574         (WebKit::EditorState::EditorState):
2575         * UIProcess/ios/WKContentViewInteraction.mm:
2576         (-[WKContentView _characterInRelationToCaretSelection:]):
2577         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
2578         * WebProcess/WebPage/WebPage.cpp:
2579         (WebKit::WebPage::editorState):
2580         * WebProcess/WebPage/ios/WebPageIOS.mm:
2581         (WebKit::WebPage::requestDictationContext):
2582         (WebKit::WebPage::replaceSelectedText):
2583         (WebKit::WebPage::replaceDictatedText):
2584         (WebKit::WebPage::requestAutocorrectionData):
2585         (WebKit::WebPage::syncApplyAutocorrection):
2586         (WebKit::computeAutocorrectionContext):
2587
2588 2014-05-30  Geoffrey Garen  <ggaren@apple.com>
2589
2590         Fixed the build by adding back a declaration I deleted by accident :(.
2591
2592         Unreviewed.
2593
2594         * UIProcess/API/Cocoa/WKWebView.h:
2595
2596 2014-05-30  Geoffrey Garen  <ggaren@apple.com>
2597
2598         Unreviewed, rolling in r169490.
2599
2600         I changed a non-ASCII apostrophe to ASCII.
2601
2602         Restored changeset:
2603
2604         "Some more copy-editing of the Modern WebKit headerdoc"
2605         https://bugs.webkit.org/show_bug.cgi?id=133408
2606         http://trac.webkit.org/changeset/169490
2607
2608         * UIProcess/API/Cocoa/WKBackForwardList.h:
2609         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
2610         * UIProcess/API/Cocoa/WKFrameInfo.h:
2611         * UIProcess/API/Cocoa/WKNavigation.h:
2612         * UIProcess/API/Cocoa/WKNavigationAction.h:
2613         (NS_ENUM):
2614         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
2615         (NS_ENUM):
2616         * UIProcess/API/Cocoa/WKNavigationResponse.h:
2617         * UIProcess/API/Cocoa/WKPreferences.h:
2618         * UIProcess/API/Cocoa/WKProcessPool.h:
2619         * UIProcess/API/Cocoa/WKScriptMessage.h:
2620         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
2621         * UIProcess/API/Cocoa/WKUIDelegate.h:
2622         * UIProcess/API/Cocoa/WKUserContentController.h:
2623         * UIProcess/API/Cocoa/WKWebView.h:
2624         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2625
2626 2014-05-30  Geoffrey Garen  <ggaren@apple.com>
2627
2628         Unreviewed, rolling out r169490.
2629
2630         It broke the build with a mysterious warning about ASCII.
2631
2632         Reverted changeset:
2633
2634         "Some more copy-editing of the Modern WebKit headerdoc"
2635         https://bugs.webkit.org/show_bug.cgi?id=133408
2636         http://trac.webkit.org/changeset/169490
2637
2638 2014-05-30  Geoffrey Garen  <ggaren@apple.com>
2639
2640         Some more copy-editing of the Modern WebKit headerdoc
2641         https://bugs.webkit.org/show_bug.cgi?id=133408
2642
2643         Reviewed by Beth Dakin.
2644
2645         A copy-editor suggested some edits to the headerdoc for clarity,
2646         style, and formatting.
2647
2648         I reviewed the edits and accepted about 80% of them.
2649
2650         * UIProcess/API/Cocoa/WKBackForwardList.h:
2651         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
2652         * UIProcess/API/Cocoa/WKFrameInfo.h:
2653         * UIProcess/API/Cocoa/WKNavigation.h:
2654         * UIProcess/API/Cocoa/WKNavigationAction.h:
2655         (NS_ENUM):
2656         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
2657         (NS_ENUM):
2658         * UIProcess/API/Cocoa/WKNavigationResponse.h:
2659         * UIProcess/API/Cocoa/WKPreferences.h:
2660         * UIProcess/API/Cocoa/WKProcessPool.h:
2661         * UIProcess/API/Cocoa/WKScriptMessage.h:
2662         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
2663         * UIProcess/API/Cocoa/WKUIDelegate.h:
2664         * UIProcess/API/Cocoa/WKUserContentController.h:
2665         * UIProcess/API/Cocoa/WKWebView.h:
2666         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2667
2668 2014-05-30  Timothy Horton  <timothy_horton@apple.com>
2669
2670         Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
2671         https://bugs.webkit.org/show_bug.cgi?id=133370
2672         <rdar://problem/17061361>
2673
2674         Reviewed by Darin Adler.
2675
2676         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2677         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2678         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2679         (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
2680         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
2681         Post-landing review comments from Darin noted that checking if the
2682         DrawingArea's m_displayRefreshMonitors contains the monitor in the
2683         list to notify is insufficient, because a new one could have been
2684         added with the same address. Instead, copy the HashSet, removing
2685         at random from it and firing didUpdateLayers, but *also* removing
2686         from it in the willDestroyDisplayRefreshMonitor callback.
2687         This is very similar to what DisplayRefreshMonitor itself does internally
2688         (we don't have to duplicate its code to avoid re-entry because it is
2689         already impossible to re-enter didUpdate).
2690
2691 2014-05-29  Anders Carlsson  <andersca@apple.com>
2692
2693         -[WKProcessPoolConfiguration setCachePartitionedURLSchemes:] should do a deep copy
2694         https://bugs.webkit.org/show_bug.cgi?id=133393
2695
2696         Reviewed by Dan Bernstein.
2697
2698         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2699         (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
2700
2701 2014-05-29  Mark Lam  <mark.lam@apple.com>
2702
2703         Restoring FloatingPointEnvironment initialization that was accidentally rolled out by r169176.
2704         <https://webkit.org/b/133389>
2705
2706         Rubber stamped by Oliver Hunt.
2707
2708         * Shared/ios/ChildProcessIOS.mm:
2709         (WebKit::ChildProcess::platformInitialize):
2710
2711 2014-05-29  Enrica Casucci  <enrica@apple.com>
2712
2713         Need to notify the keyboard about every KeyDown event.
2714         https://bugs.webkit.org/show_bug.cgi?id=133383
2715         <rdar://problem/16633975>
2716
2717         Reviewed by Benjamin Poulain.
2718         
2719         A key down will generate most of the time a call to the keyboard to add input or delete.
2720         But the event could be handled by JavaScript and its default prevented.
2721         We need to notify the keyboard in every case to allow updating its internal state about what has been typed.
2722
2723         * UIProcess/ios/PageClientImplIOS.mm:
2724         (WebKit::PageClientImpl::doneWithKeyEvent):
2725         * UIProcess/ios/WKContentViewInteraction.h:
2726         * UIProcess/ios/WKContentViewInteraction.mm:
2727         (-[WKContentView _didHandleKeyEvent:]):
2728
2729 2014-05-29  Matthew Hanson  <matthew_hanson@apple.com>
2730
2731         Roll out r169439. <rdar://problem/17069364>
2732
2733     2014-05-28  Gavin Barraclough  <baraclough@apple.com> 
2734
2735             viewStateDidChange should always fully update ViewState
2736             https://bugs.webkit.org/show_bug.cgi?id=133159
2737
2738             Reviewed by Anders Carlson.
2739
2740             Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
2741
2742             This has the following negative consequences:
2743              – WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
2744              – Updates may unnecessarily be split over multiple IPC messages.
2745              – In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls. 
2746
2747             Better to just always update the entire ViewState. 
2748
2749             * UIProcess/API/Cocoa/WKWebView.mm:
2750             (-[WKWebView didMoveToWindow]):
2751                 - removed argument to viewStateDidChange.
2752             * UIProcess/API/gtk/PageClientImpl.cpp:
2753             (WebKit::PageClientImpl::viewState):
2754             (WebKit::PageClientImpl::isViewWindowActive): Deleted.
2755             (WebKit::PageClientImpl::isViewFocused): Deleted.
2756             (WebKit::PageClientImpl::isViewVisible): Deleted.
2757             (WebKit::PageClientImpl::isViewInWindow): Deleted.
2758             * UIProcess/API/gtk/PageClientImpl.h:
2759                 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
2760             * UIProcess/API/mac/WKView.mm:
2761             (-[WKView becomeFirstResponder]):
2762             (-[WKView resignFirstResponder]):
2763             (-[WKView viewDidMoveToWindow]):
2764             (-[WKView _windowDidBecomeKey:]):
2765             (-[WKView _windowDidResignKey:]):
2766             (-[WKView _windowDidMiniaturize:]):
2767             (-[WKView _windowDidDeminiaturize:]):
2768             (-[WKView _windowDidOrderOffScreen:]):
2769             (-[WKView _windowDidOrderOnScreen:]):
2770             (-[WKView _windowDidChangeOcclusionState:]):
2771             (-[WKView viewDidHide]):
2772             (-[WKView viewDidUnhide]):
2773             (-[WKView _activeSpaceDidChange:]):
2774             (-[WKView _setThumbnailView:]):
2775             (-[WKView endDeferringViewInWindowChanges]):
2776             (-[WKView endDeferringViewInWindowChangesSync]):
2777                 - removed argument to viewStateDidChange.
2778             * UIProcess/CoordinatedGraphics/WebView.cpp:
2779             (WebKit::WebView::viewState):
2780             (WebKit::WebView::isViewWindowActive): Deleted.
2781             (WebKit::WebView::isViewFocused): Deleted.
2782             (WebKit::WebView::isViewVisible): Deleted.
2783             (WebKit::WebView::isViewInWindow): Deleted.
2784             * UIProcess/CoordinatedGraphics/WebView.h:
2785                 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
2786             * UIProcess/PageClient.h:
2787             (WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
2788             (WebKit::PageClient::isVisuallyIdle): Deleted.
2789                 - merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
2790             * UIProcess/WebPageProxy.cpp:
2791             (WebKit::WebPageProxy::WebPageProxy):
2792             (WebKit::WebPageProxy::reattachToWebProcess):
2793                 - updateViewState -> PageClient::viewState
2794             (WebKit::WebPageProxy::viewStateDidChange):
2795                 - argument removed; updateViewState -> PageClient::viewState.
2796             (WebKit::WebPageProxy::setCursor):
2797                 - call isViewWindowActive on WebPageProxy, rather than PageClient.
2798             (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
2799                 - call isViewWindowActive on WebPageProxy, rather than PageClient.
2800             (WebKit::WebPageProxy::updateViewState): Deleted.
2801                 - removed - viewState method moved to PageClient.
2802             * UIProcess/WebPageProxy.h:
2803             (WebKit::WebPageProxy::isViewWindowActive):
2804                 - added missing implementation.
2805             (WebKit::WebPageProxy::isViewVisible):
2806                 - removed argument to viewStateDidChange.
2807             * UIProcess/WebProcessProxy.cpp:
2808             (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
2809                 - removed argument to viewStateDidChange.
2810             * UIProcess/ios/PageClientImplIOS.h:
2811             * UIProcess/ios/PageClientImplIOS.mm:
2812             (WebKit::PageClientImpl::viewState):
2813             (WebKit::PageClientImpl::isViewWindowActive): Deleted.
2814             (WebKit::PageClientImpl::isViewFocused): Deleted.
2815             (WebKit::PageClientImpl::isViewVisible): Deleted.
2816             (WebKit::PageClientImpl::isViewInWindow): Deleted.
2817             (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
2818             (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
2819                 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
2820             * UIProcess/ios/WKContentView.mm:
2821             (-[WKContentView didMoveToWindow]):
2822             (-[WKContentView _applicationDidEnterBackground:]):
2823             (-[WKContentView _applicationWillEnterForeground:]):
2824                 - removed argument to viewStateDidChange.
2825             * UIProcess/mac/PageClientImpl.h:
2826             * UIProcess/mac/PageClientImpl.mm:
2827             (WebKit::PageClientImpl::viewState):
2828             (WebKit::PageClientImpl::showCorrectionPanel):
2829             (WebKit::PageClientImpl::showDictationAlternativeUI):
2830             (WebKit::PageClientImpl::isViewWindowActive): Deleted.
2831             (WebKit::PageClientImpl::isViewFocused): Deleted.
2832             (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
2833             (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
2834                 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
2835
2836 2014-05-29  Dan Bernstein  <mitz@apple.com>
2837
2838         [Cocoa] Can’t recover from subframe load errors
2839         https://bugs.webkit.org/show_bug.cgi?id=133385
2840
2841         Reviewed by Anders Carlsson.
2842
2843         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
2844         * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
2845         * UIProcess/Cocoa/NavigationState.mm:
2846         (WebKit::NavigationState::setNavigationDelegate): Initialize
2847         webViewNavigationDidFailProvisionalLoadInSubframeWithError flag in the delegate methods
2848         struct.
2849         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): If the
2850         error occurred in a subframe, invoke the new delegate method.
2851
2852 2014-05-29  Geoffrey Garen  <ggaren@apple.com>
2853
2854         Added a missing @result to WKPreferences headerdoc
2855         https://bugs.webkit.org/show_bug.cgi?id=133381
2856
2857         Reviewed by Dan Bernstein.
2858
2859         * UIProcess/API/Cocoa/WKPreferences.h:
2860
2861 2014-05-29  Alexey Proskuryakov  <ap@apple.com>
2862
2863         [Mac] Always use plug-in sandbox with sandboxed clients
2864         https://bugs.webkit.org/show_bug.cgi?id=133358
2865         <rdar://problem/15637695>
2866
2867         Reviewed by Anders Carlsson.
2868
2869         * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::initializeSandbox):
2870         Refuse to start if parent process is sandboxed, and plug-in process is not going to be.
2871         None of this should run in normal case, because there are also checks on UI process side.
2872         
2873         * Shared/Plugins/PluginModuleInfo.h:
2874         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2875         (WebKit::NetscapePluginModule::getPluginInfo):
2876         Added a member to PluginModuleInfo, telling whether the plug-in has a sandbox profile.
2877
2878         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
2879         (WebKit::getPlatformPluginModuleInformation): Use the new PluginModuleInfo member,
2880         we no longer need to check the file system here.
2881
2882         * WebKit2.xcodeproj/project.pbxproj:
2883         * Shared/mac/SandboxUtilities.h: Added.
2884         * Shared/mac/SandboxUtilities.cpp: Added. (WebKit::processIsSandboxed):
2885         This code is simple, but include magic is not. Moved it to a separate file to
2886         avoid repeating.
2887
2888         * UIProcess/API/C/mac/WKContextPrivateMac.mm: Removed an unused include.
2889
2890         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2891         (WebKit::PluginInfoStore::shouldUsePlugin): Don't use unsandboxed plug-ins in
2892         sandboxed applications.
2893
2894         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2895         (WebKit::PluginProcessProxy::platformGetLaunchOptions): Don't ever pass disable-sandbox
2896         from sandboxed processes.
2897
2898         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2899         (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
2900         Use the new shared code in SandboxUtilities.h.
2901
2902 2014-05-29  Timothy Horton  <timothy_horton@apple.com>
2903
2904         Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
2905         https://bugs.webkit.org/show_bug.cgi?id=133370
2906         <rdar://problem/17061361>
2907
2908         Reviewed by Anders Carlsson.
2909
2910         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2911         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
2912         Copy the set of refresh monitors so that we don't try to mutate the list we're iterating,
2913         and don't try to fire refresh monitors that were removed in a previous iteration of the loop.
2914
2915 2014-05-29  Timothy Horton  <timothy_horton@apple.com>
2916
2917         REGRESSION (iOS WebKit2): Find-in-Page doesn't work in subframes
2918         https://bugs.webkit.org/show_bug.cgi?id=133372
2919         <rdar://problem/17045070>
2920
2921         Reviewed by Simon Fraser.
2922
2923         * WebProcess/WebPage/ios/FindControllerIOS.mm:
2924         (WebKit::FindController::willFindString):
2925         (WebKit::FindController::didFailToFindString):
2926         (WebKit::FindController::didHideFindIndicator):
2927         Flip ignoreCompositionSelectionChange and updateAppearanceEnabled on all
2928         frames, not just the main frame, because the found string can be in a subframe.
2929         Ideally we would flip it on/off for each frame as we move the selection between them,
2930         but would require a lot of work (and the overhead of touching each frame shouldn't be significant).
2931
2932 2014-05-29  Dan Bernstein  <mitz@apple.com>
2933
2934         WKBundleActivateMacFontAscentHack is unused
2935         https://bugs.webkit.org/show_bug.cgi?id=133379
2936
2937         Reviewed by Anders Carlsson.
2938
2939         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2940         (WKBundleActivateMacFontAscentHack): Deleted.
2941         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2942         * WebProcess/InjectedBundle/InjectedBundle.h:
2943         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
2944         (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
2945         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2946         (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
2947         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2948         (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
2949
2950 2014-05-29  Alexey Proskuryakov  <ap@apple.com>
2951
2952         Add a sandbox profile for com.apple.appstore.CodeRedeemerNetscapePlugin
2953         https://bugs.webkit.org/show_bug.cgi?id=133360
2954
2955         Reviewed by Sam Weinig.
2956
2957         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Looks like
2958         anyone using camera would need access to CoreMedia preferences.
2959
2960         * Resources/PlugInSandboxProfiles/com.apple.appstore.CodeRedeemerNetscapePlugin.sb: Added.
2961
2962         * WebKit2.xcodeproj/project.pbxproj: Added the profile.
2963
2964 2014-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2965
2966         [GTK] Add support for HiDPI icons
2967         https://bugs.webkit.org/show_bug.cgi?id=133377
2968
2969         Reviewed by Martin Robinson.
2970
2971         * PlatformGTK.cmake: Compile also the @2x versions for the builtin icons.
2972
2973 2014-05-29  Owen Taylor  <otaylor@redhat.com>
2974
2975         [GTK] Add HighDPI support for non-accelerated compositing contents
2976         https://bugs.webkit.org/show_bug.cgi?id=131562
2977
2978         Reviewed by Anders Carlsson.
2979
2980         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2981         (deviceScaleFactorChanged): Added this callback to pass scale changes to the page proxy.
2982         (webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
2983         * UIProcess/WebPageProxy.cpp:
2984         * UIProcess/cairo/BackingStoreCairo.cpp:
2985         (WebKit::WebPageProxy::setCustomDeviceScaleFactor): Do not set a
2986         custom device scale factor for cairo when it's not supported.
2987         (WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
2988         (WebKit::BackingStore::incorporateUpdate): Ditto.
2989
2990 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2991
2992         [GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
2993         https://bugs.webkit.org/show_bug.cgi?id=130081
2994
2995         Reviewed by Martin Robinson.
2996
2997         * Platform/WorkQueue.h:
2998         * Platform/gtk/WorkQueueGtk.cpp:
2999         (WorkQueue::registerSocketEventHandler): Stop pretending it's
3000         possible to register a socket event handler for more than one
3001         descriptor.
3002         (WorkQueue::unregisterSocketEventHandler):
3003         (WorkQueue::dispatch):
3004         (WorkQueue::dispatchAfter):
3005         * Shared/Downloads/soup/DownloadSoup.cpp:
3006         (WebKit::DownloadClient::DownloadClient):
3007         (WebKit::DownloadClient::~DownloadClient):
3008         (WebKit::DownloadClient::didReceiveData):
3009         (WebKit::DownloadClient::handleResponse):
3010         (WebKit::DownloadClient::handleResponseLater):
3011         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
3012         (WebKit::PluginInfoCache::PluginInfoCache):
3013         (WebKit::PluginInfoCache::~PluginInfoCache):
3014         (WebKit::PluginInfoCache::saveToFile):
3015         (WebKit::PluginInfoCache::updatePluginInfo):
3016         * UIProcess/Plugins/gtk/PluginInfoCache.h:
3017         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3018         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
3019         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
3020         (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
3021         (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
3022         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
3023
3024 2014-05-28  Gavin Barraclough  <baraclough@apple.com>
3025
3026         viewStateDidChange should always fully update ViewState
3027         https://bugs.webkit.org/show_bug.cgi?id=133159
3028
3029         Reviewed by Anders Carlson.
3030
3031         Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
3032
3033         This has the following negative consequences:
3034          – WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
3035          – Updates may unnecessarily be split over multiple IPC messages.
3036          – In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls.
3037
3038         Better to just always update the entire ViewState.
3039
3040         * UIProcess/API/Cocoa/WKWebView.mm:
3041         (-[WKWebView didMoveToWindow]):
3042             - removed argument to viewStateDidChange.
3043         * UIProcess/API/gtk/PageClientImpl.cpp:
3044         (WebKit::PageClientImpl::viewState):
3045         (WebKit::PageClientImpl::isViewWindowActive): Deleted.
3046         (WebKit::PageClientImpl::isViewFocused): Deleted.
3047         (WebKit::PageClientImpl::isViewVisible): Deleted.
3048         (WebKit::PageClientImpl::isViewInWindow): Deleted.
3049         * UIProcess/API/gtk/PageClientImpl.h:
3050             - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
3051         * UIProcess/API/mac/WKView.mm:
3052         (-[WKView becomeFirstResponder]):
3053         (-[WKView resignFirstResponder]):
3054         (-[WKView viewDidMoveToWindow]):
3055         (-[WKView _windowDidBecomeKey:]):
3056         (-[WKView _windowDidResignKey:]):
3057         (-[WKView _windowDidMiniaturize:]):
3058         (-[WKView _windowDidDeminiaturize:]):
3059         (-[WKView _windowDidOrderOffScreen:]):
3060         (-[WKView _windowDidOrderOnScreen:]):
3061         (-[WKView _windowDidChangeOcclusionState:]):
3062         (-[WKView viewDidHide]):
3063         (-[WKView viewDidUnhide]):
3064         (-[WKView _activeSpaceDidChange:]):
3065         (-[WKView _setThumbnailView:]):
3066         (-[WKView endDeferringViewInWindowChanges]):
3067         (-[WKView endDeferringViewInWindowChangesSync]):
3068             - removed argument to viewStateDidChange.
3069         * UIProcess/CoordinatedGraphics/WebView.cpp:
3070         (WebKit::WebView::viewState):
3071         (WebKit::WebView::isViewWindowActive): Deleted.
3072         (WebKit::WebView::isViewFocused): Deleted.
3073         (WebKit::WebView::isViewVisible): Deleted.
3074         (WebKit::WebView::isViewInWindow): Deleted.
3075         * UIProcess/CoordinatedGraphics/WebView.h:
3076             - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
3077         * UIProcess/PageClient.h:
3078         (WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
3079         (WebKit::PageClient::isVisuallyIdle): Deleted.
3080             - merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
3081         * UIProcess/WebPageProxy.cpp:
3082         (WebKit::WebPageProxy::WebPageProxy):
3083         (WebKit::WebPageProxy::reattachToWebProcess):
3084             - updateViewState -> PageClient::viewState
3085         (WebKit::WebPageProxy::viewStateDidChange):
3086             - argument removed; updateViewState -> PageClient::viewState.
3087         (WebKit::WebPageProxy::setCursor):
3088             - call isViewWindowActive on WebPageProxy, rather than PageClient.
3089         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
3090             - call isViewWindowActive on WebPageProxy, rather than PageClient.
3091         (WebKit::WebPageProxy::updateViewState): Deleted.
3092             - removed - viewState method moved to PageClient.
3093         * UIProcess/WebPageProxy.h:
3094         (WebKit::WebPageProxy::isViewWindowActive):
3095             - added missing implementation.
3096         (WebKit::WebPageProxy::isViewVisible):
3097             - removed argument to viewStateDidChange.
3098         * UIProcess/WebProcessProxy.cpp:
3099         (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
3100             - removed argument to viewStateDidChange.
3101         * UIProcess/ios/PageClientImplIOS.h:
3102         * UIProcess/ios/PageClientImplIOS.mm:
3103         (WebKit::PageClientImpl::viewState):
3104         (WebKit::PageClientImpl::isViewWindowActive): Deleted.
3105         (WebKit::PageClientImpl::isViewFocused): Deleted.
3106         (WebKit::PageClientImpl::isViewVisible): Deleted.
3107         (WebKit::PageClientImpl::isViewInWindow): Deleted.
3108         (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
3109         (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
3110             - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
3111         * UIProcess/ios/WKContentView.mm:
3112         (-[WKContentView didMoveToWindow]):
3113         (-[WKContentView _applicationDidEnterBackground:]):
3114         (-[WKContentView _applicationWillEnterForeground:]):
3115             - removed argument to viewStateDidChange.
3116         * UIProcess/mac/PageClientImpl.h:
3117         * UIProcess/mac/PageClientImpl.mm:
3118         (WebKit::PageClientImpl::viewState):
3119         (WebKit::PageClientImpl::showCorrectionPanel):
3120         (WebKit::PageClientImpl::showDictationAlternativeUI):
3121         (WebKit::PageClientImpl::isViewWindowActive): Deleted.
3122         (WebKit::PageClientImpl::isViewFocused): Deleted.
3123         (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
3124         (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
3125             - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
3126
3127 2014-05-28  Jeffrey Pfau  <jpfau@apple.com>
3128
3129         Add Obj-C API for cache partitioned URL schemes
3130         https://bugs.webkit.org/show_bug.cgi?id=133361
3131         <rdar://problem/17035415>
3132
3133         Reviewed by Anders Carlsson.
3134
3135         * UIProcess/API/Cocoa/WKProcessPool.mm:
3136         (-[WKProcessPool _initWithConfiguration:]):
3137         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
3138         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3139         (-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
3140         (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
3141         (-[_WKProcessPoolConfiguration copyWithZone:]):
3142
3143 2014-05-28  Sam Weinig  <sam@webkit.org>
3144
3145         [iOS WebKit2] Sometimes Safari gets into a limbo state after web process crash
3146         <rdar://problem/17029526>
3147         https://bugs.webkit.org/show_bug.cgi?id=133362
3148
3149         Reviewed by Dan Bernstein.
3150
3151         * UIProcess/WebPageProxy.cpp:
3152         (WebKit::WebPageProxy::WebPageProxy):
3153         Remove unnecessary initialization of a unique_ptr.
3154
3155         (WebKit::WebPageProxy::reattachToWebProcess):
3156         Move calls to update the view state and activity tokens to after we have swapped in the new process.
3157
3158         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3159         Clear the activity token on process exit.
3160
3161 2014-05-28  Timothy Horton  <timothy_horton@apple.com>
3162
3163         Add WKWebView SPI to forcefully kill the associated Web process
3164         https://bugs.webkit.org/show_bug.cgi?id=133357
3165
3166         Reviewed by Anders Carlsson.
3167
3168         * UIProcess/API/Cocoa/WKWebView.mm:
3169         (-[WKWebView _killWebContentProcess]):
3170         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3171
3172 2014-05-28  Dan Bernstein  <mitz@apple.com>
3173
3174         [Cocoa] Crash when trying to decode an instance of a class inheriting from WKObject
3175         https://bugs.webkit.org/show_bug.cgi?id=133355
3176
3177         Reviewed by Anders Carlsson.
3178
3179         * Shared/Cocoa/WKObject.mm:
3180         (-[WKObject classForCoder]): Override this NSObject method to forward to the
3181         target object.
3182         (-[WKObject classForKeyedArchiver]): Ditto.
3183
3184 2014-05-28  Simon Fraser  <simon.fraser@apple.com>
3185
3186         [iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
3187         https://bugs.webkit.org/show_bug.cgi?id=133352
3188
3189         Reviewed by Tim Horton.
3190
3191         Pass the correct delta down to descendant nodes.
3192
3193         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3194         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
3195
3196 2014-05-28  Andy Estes  <aestes@apple.com>
3197
3198         [iOS] REGRESSION (r168388): DidNotHandleTapAsClick not sent when commitPotentialTap() fails
3199         https://bugs.webkit.org/show_bug.cgi?id=133349
3200
3201         Reviewed by Benjamin Poulain.
3202
3203         WebPage::commitPotentialTap() fails when a recognized single tap cannot be sent as a synthetic click event.
3204         We should send WebPageProxy::DidNotHandleTapAsClick in these cases.
3205
3206         * WebProcess/WebPage/WebPage.h:
3207         * WebProcess/WebPage/ios/WebPageIOS.mm:
3208         (WebKit::WebPage::commitPotentialTap):
3209         (WebKit::WebPage::commitPotentialTapFailed):
3210
3211 2014-05-28  Commit Queue  <commit-queue@webkit.org>
3212
3213         Unreviewed, rolling out r169423.
3214         https://bugs.webkit.org/show_bug.cgi?id=133348
3215
3216         It makes a lot of tests crash in assert (Requested by KaL on
3217         #webkit).
3218
3219         Reverted changeset:
3220
3221         "[GTK] Use GMainLoopSource for idle and timeout sources in
3222         WebKit2"
3223         https://bugs.webkit.org/show_bug.cgi?id=130081
3224         http://trac.webkit.org/changeset/169423
3225
3226 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3227
3228         [GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
3229         https://bugs.webkit.org/show_bug.cgi?id=130081
3230
3231         Reviewed by Martin Robinson.
3232
3233         * Platform/WorkQueue.h:
3234         * Platform/gtk/WorkQueueGtk.cpp:
3235         (WorkQueue::registerSocketEventHandler): Stop pretending it's
3236         possible to register a socket event handler for more than one
3237         descriptor.
3238         (WorkQueue::unregisterSocketEventHandler):
3239         (WorkQueue::dispatch):
3240         (WorkQueue::dispatchAfter):
3241         * Shared/Downloads/soup/DownloadSoup.cpp:
3242         (WebKit::DownloadClient::DownloadClient):
3243         (WebKit::DownloadClient::~DownloadClient):
3244         (WebKit::DownloadClient::didReceiveData):
3245         (WebKit::DownloadClient::handleResponse):
3246         (WebKit::DownloadClient::handleResponseLater):
3247         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
3248         (WebKit::PluginInfoCache::PluginInfoCache):
3249         (WebKit::PluginInfoCache::~PluginInfoCache):
3250         (WebKit::PluginInfoCache::saveToFile):
3251         (WebKit::PluginInfoCache::updatePluginInfo):
3252         * UIProcess/Plugins/gtk/PluginInfoCache.h:
3253         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3254         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
3255         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
3256         (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
3257         (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
3258         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
3259
3260 2014-05-28  Dan Bernstein  <mitz@apple.com>
3261
3262         [Cocoa] Can't use bundle-defined classes for bundle parameters
3263         https://bugs.webkit.org/show_bug.cgi?id=133339
3264
3265         Reviewed by Anders Carlsson.
3266
3267         Ensure that bundle parameters are decoded only after the injected bundle is loaded.
3268
3269         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3270         (WebKit::InjectedBundle::create): Moved the definition from the header to here, added the
3271         lagacy initializationUserData as a parameter, and made this function set the sandbox
3272         extension and load the bundle.
3273         (WebKit::InjectedBundle::InjectedBundle): Removed call to platformInitialize.
3274         * WebProcess/InjectedBundle/InjectedBundle.h:
3275         (WebKit::InjectedBundle::setSandboxExtension): Deleted.
3276         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
3277         (WebKit::InjectedBundle::initialize): Renamed the load function to this, and added the
3278         creation parameters as a parameter. Moved code to initialize the bundle paramters from
3279         platformInitialize to here. Changed the class passed to -decodeObjectOfClass:forKey: to
3280         NSObject, to allow arbitrary types in the values, and added an assertion that the
3281         top-level object is a dictionary.
3282         (WebKit::InjectedBundle::platformInitialize): Deleted.
3283         * WebProcess/WebProcess.cpp:
3284         (WebKit::WebProcess::initializeWebProcess): Changed to pass the legacy initialization user
3285         data to InjectedBundle::create() and removed code to separately set the sandbox extension
3286         and load the bundle, which is now done by create().
3287
3288 2014-05-28  Alberto Garcia  <berto@igalia.com>
3289
3290         Unreviewed. Fix warning: unused parameter 'frame'
3291
3292         * WebProcess/WebPage/WebPage.cpp:
3293         (WebKit::WebPage::didFinishDocumentLoad):
3294
3295 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
3296
3297         [iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
3298         https://bugs.webkit.org/show_bug.cgi?id=133334
3299         <rdar://problem/16462535>
3300
3301         Reviewed by Tim Horton.
3302
3303         When the scroll position changes in an accelerated overflow-scroll element, we have
3304         to update child nodes in the scrolling tree for position:sticky. That requires a
3305         more generic ability to update the scrolling tree after some arbitrary zoom or
3306         scroll. To do this, we need to know the current fixed position rect, rather than
3307         having it passed in.
3308         
3309         So make the fixed position rect available from ScrollingTree, and make it possible
3310         to get the current scrollPosition() from any ScrollingTreeScrollingNode.
3311         
3312         Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
3313         and have it update descendant layers.
3314         
3315         Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
3316         constraints math, using the scroll position of the parent node if appropriate.
3317
3318         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3319         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
3320         (WebKit::RemoteScrollingTree::fixedPositionRect):
3321         * UIProcess/Scrolling/RemoteScrollingTree.h:
3322         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
3323         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3324         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterDelegatedScroll):
3325         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
3326         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
3327         (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
3328
3329 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
3330
3331         Do some renaming in the scrolling tree
3332         https://bugs.webkit.org/show_bug.cgi?id=133333
3333
3334         Reviewed by Tim Horton.
3335         
3336         Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
3337         since this goes deep and to indicate that it's about layer updating.
3338         
3339         Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
3340         this is the custom fixed-position rect that changes on zooming.
3341
3342         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3343         (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
3344         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3345         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
3346         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
3347
3348 2014-05-27  Geoffrey Garen  <ggaren@apple.com>
3349
3350         Some proof-reading of the WebKit2 API headerdoc
3351         https://bugs.webkit.org/show_bug.cgi?id=133328
3352
3353         Reviewed by Anders Carlsson.
3354
3355         Consistently say "item" to reference back-forward list items.
3356
3357         Consistently say "webpage" instead of "page" or "web page".
3358
3359         Consistently say "navigation" instead of "load".
3360
3361         Plus a few fix-ups for run-on sentences, mismatched verb tense, and
3362         mismatched singular vs plural.
3363
3364         * UIProcess/API/Cocoa/WKBackForwardList.h:
3365         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
3366         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
3367         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
3368         * UIProcess/API/Cocoa/WKFrameInfo.h:
3369         * UIProcess/API/Cocoa/WKNavigation.h:
3370         * UIProcess/API/Cocoa/WKNavigationAction.h:
3371         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
3372         * UIProcess/API/Cocoa/WKProcessPool.h:
3373         * UIProcess/API/Cocoa/WKUIDelegate.h:
3374         * UIProcess/API/Cocoa/WKWebView.h:
3375
3376 2014-05-27  Timothy Horton  <timothy_horton@apple.com>
3377
3378         [wk2] PDFPlugin snapshots are misplaced
3379         https://bugs.webkit.org/show_bug.cgi?id=133323
3380
3381         Reviewed by Simon Fraser.
3382
3383         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3384         (WebKit::PDFPlugin::paintControlForLayerInContext):
3385         (WebKit::PDFPlugin::snapshot):
3386         Include the scroll offset in the snapshot translation,
3387         and use the whole document size instead of just the view size.
3388
3389 2014-05-27  Sam Weinig  <sam@webkit.org>
3390
3391         [WebKit2] Move WebPreferences macro definitions and key names into their own files
3392         https://bugs.webkit.org/show_bug.cgi?id=133315
3393
3394         Reviewed by Anders Carlsson.
3395
3396         * CMakeLists.txt:
3397         * Shared/WebPreferencesDefinitions.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
3398         * Shared/WebPreferencesKeys.cpp: Copied from Source/WebKit2/Shared/WebPreferencesStore.cpp.
3399         * Shared/WebPreferencesKeys.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
3400         * Shared/WebPreferencesStore.cpp:
3401         * Shared/WebPreferencesStore.h:
3402         * UIProcess/WebPreferences.cpp:
3403         * UIProcess/WebPreferences.h:
3404         * UIProcess/mac/WebContextMac.mm:
3405         * UIProcess/mac/WebPreferencesMac.mm:
3406         * UIProcess/mac/WebProcessProxyMac.mm:
3407         * WebKit2.xcodeproj/project.pbxproj:
3408         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3409         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3410         * WebProcess/WebPage/WebPage.cpp:
3411         * WebProcess/WebProcess.cpp:
3412
3413 2014-05-27  Gavin Barraclough  <baraclough@apple.com>
3414
3415         Add UI process watchdog on iOS to ensure WebProcess connections close
3416         https://bugs.webkit.org/show_bug.cgi?id=133200
3417         <rdar://problem/16997983>
3418
3419         Mountain Lion build fix
3420
3421         * Platform/IPC/mac/ConnectionMac.mm:
3422         (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
3423
3424 2014-05-27  Gavin Barraclough  <baraclough@apple.com>
3425
3426         importance_assertion -> denap_assertion
3427         https://bugs.webkit.org/show_bug.cgi?id=133294
3428
3429         iOS build fix
3430
3431         * Platform/IPC/mac/ConnectionMac.mm:
3432         (IPC::Connection::open):
3433
3434 2014-05-27  Gavin Barraclough  <baraclough@apple.com>
3435
3436         Add UI process watchdog on iOS to ensure WebProcess connections close
3437         https://bugs.webkit.org/show_bug.cgi?id=133200
3438         <rdar://problem/16997983>
3439
3440         Reviewed by Darin Adler.
3441
3442         When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
3443         and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
3444         happens.
3445
3446         On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
3447         the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
3448
3449         * Platform/IPC/Connection.h:
3450             - added terminateSoon.
3451         * Platform/IPC/mac/ConnectionMac.mm:
3452         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
3453             - take an assertion to make the process runnable, and start a watchdog timer.
3454         (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
3455             - if the process hasn't quit by the timer the watchdog fires, kill it.
3456         (IPC::Connection::terminateSoon):
3457             - create a ConnectionTerminationWatchdog.
3458         * UIProcess/WebProcessProxy.cpp:
3459         (WebKit::WebProcessProxy::removeWebPage):
3460             - when disconnecting from a process, first tell it to terminateSoon.
3461
3462 2014-05-26  Gavin Barraclough  <barraclough@apple.com>
3463
3464         importance_assertion -> denap_assertion
3465         https://bugs.webkit.org/show_bug.cgi?id=133294
3466
3467         Reviewed by Sam Weinig.
3468
3469         Update in accordance with API change. The importance assertion is used on
3470         Mavericks & newer to ensure the WebContent process wakes from AppNap.
3471
3472         * Platform/IPC/mac/ConnectionMac.mm:
3473         (IPC::Connection::open):
3474             - MACH_PORT_IMPORTANCE_RECEIVER -> MACH_PORT_DENAP_RECEIVER
3475         * Platform/IPC/mac/ImportanceAssertion.h:
3476         (IPC::ImportanceAssertion::ImportanceAssertion):
3477         (IPC::ImportanceAssertion::~ImportanceAssertion):
3478             - proc_importance_assertion -> proc_denap_assertion
3479
3480 2014-05-27  Jessie Berlin  <jberlin@apple.com>
3481
3482         Revert r169362 since it broke the ML build.
3483
3484         * Platform/IPC/Connection.h:
3485         * Platform/IPC/mac/ConnectionMac.mm: