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