WKWebView snapshots have the wrong scale after rotation
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-07-01  Tim Horton  <timothy_horton@apple.com>
2
3         WKWebView snapshots have the wrong scale after rotation
4         https://bugs.webkit.org/show_bug.cgi?id=146476
5         <rdar://problem/18345247>
6
7         Reviewed by Anders Carlsson.
8
9         * UIProcess/API/Cocoa/WKWebView.mm:
10         (-[WKWebView _didCommitLayerTree:]):
11         "Coordinate" -> "Coordinates".
12
13         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
14         Defer any snapshotting that happens during a resize until after
15         the resize completes. This will ensure that (in the case of an IOSurface
16         snapshot) the tiles are up to date, and (in the case of a software snapshot)
17         that our understanding of the scale and scroll offset of the WKContentView
18         are up to date, so that we can correctly convert from view to content coordinates
19         in the UI process.
20
21         (-[WKWebView _endAnimatedResize]):
22         Perform the deferred snapshotting after the resize completes.
23
24 2015-07-01  Beth Dakin  <bdakin@apple.com>
25
26         This is a quick follow-on to http://trac.webkit.org/changeset/186132
27
28         Rubber-stamped by Darin Adler.
29
30         Make this a one-liner.
31         * WebProcess/WebPage/ios/WebPageIOS.mm:
32         (WebKit::WebPage::getPositionInformation):
33
34 2015-07-01  Matthew Daiter  <mdaiter@apple.com>
35
36         Enable MEDIA_STREAM flag
37         https://bugs.webkit.org/show_bug.cgi?id=145947
38         <rdar://problem/21365829>
39
40         Reviewed by Eric Carlson.
41
42         * Configurations/FeatureDefines.xcconfig: Add MEDIA_STREAM flag
43         * WebKit2.xcodeproj/project.pbxproj: Changed some project to private
44         declarations of headers
45         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
46         * WebProcess/WebPage/WebPage.h:
47         (WebKit::WebPage::userMediaPermissionRequestManager):
48
49 2015-07-01  Brady Eidson  <beidson@apple.com>
50
51         Check shouldOpenExternalURLs instead of isProcessingUserGesture before passing URL to LaunchServices.
52         <rdar://problem/20577859> and https://bugs.webkit.org/show_bug.cgi?id=146513
53
54         Reviewed by Darin Adler.
55
56         * UIProcess/Cocoa/NavigationState.mm:
57         (WebKit::tryAppLink): The expected value of isProcessingUserGesture is lost over redirects.
58           shouldOpenExternalURLs actually fits this role perfectly.
59
60 2015-07-01  Michael Catanzaro  <mcatanzaro@igalia.com>
61
62         [GTK] [Wayland] Build broken with ENABLE_WAYLAND_TARGET=ON
63         https://bugs.webkit.org/show_bug.cgi?id=146512
64
65         Unreviewed, fix build with ENABLE_WAYLAND_TARGET=ON after r185949.
66
67         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
68         (webkitWebViewBaseCreateWebPage):
69
70 2015-06-30  Martin Robinson  <mrobinson@igalia.com>
71
72         [GTK] REGRESSION(r183936): Test /webkit2/WebKitWebContext/spell-checker fails since r183936
73         https://bugs.webkit.org/show_bug.cgi?id=144828
74
75         Reviewed by Carlos Garcia Campos.
76
77         Instead of setting spell checking languages unconditionally when building int
78         developer mode, add some C API that allows setting them in WebKitTestRunner.
79
80         * PlatformGTK.cmake: Add the new C API file to the source list.
81         * UIProcess/API/C/gtk/WKTextCheckerGtk.cpp:
82         (WKTextCheckerSetSpellCheckingLanguages): Added this function which allows settings
83         the spell checking languages from the C API.
84         * UIProcess/API/C/gtk/WKTextCheckerGtk.h: Added.
85         * UIProcess/gtk/TextCheckerGtk.cpp:
86         (WebKit::enchantTextChecker): Remove the hack which sets the spell checking languages automatically
87         for development builds.
88
89 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
90
91         [Mac] Numerous CGColor leaks in swipe gestures
92         https://bugs.webkit.org/show_bug.cgi?id=146501
93
94         Reviewed by Tim Horton.
95
96         * UIProcess/mac/ViewGestureControllerMac.mm:
97         (WebKit::ViewGestureController::beginSwipeGesture):
98
99 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
100
101         [Mac] Confusing RetainPtr use in TiledCoreAnimationDrawingArea
102         https://bugs.webkit.org/show_bug.cgi?id=146503
103
104         Reviewed by Tim Horton.
105
106         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
107         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
108         Simplify adoption into a new RetainPtr.
109
110 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
111
112         Fix CoordinatedGraphics.
113
114         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
115         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
116
117 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
118
119         More Gtk/EFL fixing.
120
121         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
122         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
123         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
124         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
125
126 2015-06-30  Andy VanWagoner  <thetalecrafter@gmail.com>
127
128         Implement ECMAScript Internationalization API
129         https://bugs.webkit.org/show_bug.cgi?id=90906
130
131         Reviewed by Benjamin Poulain.
132
133         * Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag
134
135 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
136
137         Fix Mac and Windows builds.
138
139         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
140         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
141
142 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
143
144         [iOS] Missing tiles inside position:fixed on scrolling
145         https://bugs.webkit.org/show_bug.cgi?id=146485
146         rdar://problem/21226861
147
148         Reviewed by Tim Horton.
149
150         Layer flushing adjusts the coverage rect for tiled layers, but does so at times
151         when position:fixed layers are moved around by the scrolling tree. The computed
152         coverage rect then doesn't reflect the layer's on-screen position, causing missing
153         tiles.
154
155         Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
156         that state into the layer flush. When not in a stable state, flushing doesn't change
157         the visible and coverage rects for layers that are viewport-constrained.
158
159         * WebProcess/WebPage/ios/WebPageIOS.mm:
160         (WebKit::WebPage::updateVisibleContentRects):
161         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
162         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
163
164 2015-06-30  Hyungwook Lee  <hyungwook.lee@navercorp.com>
165
166         [EFL] Implement ewk_favicon_database_clear() API.
167         https://bugs.webkit.org/show_bug.cgi?id=146337
168
169         Reviewed by Gyuyoung Kim.
170
171         We need to provide way to clear favicon data.
172
173         * UIProcess/API/efl/ewk_favicon_database.cpp:
174         (EwkFaviconDatabase::getIconSurfaceSynchronously):
175         (EwkFaviconDatabase::clearFaviconDatabase):
176         (EwkFaviconDatabase::iconDataReadyForPageURL):
177         (ewk_favicon_database_icon_change_callback_del):
178         (ewk_favicon_database_clear):
179         * UIProcess/API/efl/ewk_favicon_database.h:
180         * UIProcess/API/efl/ewk_favicon_database_private.h:
181         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
182         (TEST_F):
183
184 2015-06-30  Andreas Kling  <akling@apple.com>
185
186         [iOS] Ignore viewport rect changes during zoom bouncing.
187         <https://webkit.org/b/146480>
188
189         Reviewed by Benjamin Poulain.
190
191         When the user has pinch-zoomed past the maximum zoom scale and lets go of the screen,
192         we animate a bounce back to the maximum scale.
193
194         Suppress viewport rect updates during this bounce animation since we don't need them
195         anyway. This fixes an issue where we'd sometimes get a weird rect during the animation
196         and if could send that to the web process, causing it to generate tiles for a part of
197         the page that's not actually exposed.
198
199         * UIProcess/API/Cocoa/WKWebView.mm:
200         (-[WKWebView _updateVisibleContentRects]):
201
202 2015-06-30  Enrica Casucci  <enrica@apple.com>
203
204         <rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category
205
206         Reviewed by Benjamin Poulain.
207
208         * Platform/spi/ios/UIKitSPI.h:
209         * Shared/WebEvent.h:
210         (WebKit::WebTouchEvent::WebTouchEvent):
211         (WebKit::WebTouchEvent::position):
212         (WebKit::WebTouchEvent::isPotentialTap):
213         (WebKit::WebTouchEvent::isGesture):
214         (WebKit::WebTouchEvent::gestureScale):
215         (WebKit::WebTouchEvent::gestureRotation):
216         * Shared/WebEventConversion.cpp:
217         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
218         * Shared/ios/NativeWebTouchEventIOS.mm:
219         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
220         * Shared/ios/WebTouchEventIOS.cpp:
221         (WebKit::WebTouchEvent::encode):
222         (WebKit::WebTouchEvent::decode):
223         Pipe isPotentialTap through.
224
225 2015-06-30  Carlos Alberto Lopez Perez  <clopez@igalia.com>
226
227         [GTK] [EFL] Unreviewed build fix after r186118.
228
229         Add if PLATFORM(COCOA) back.
230
231         * WebProcess/WebProcess.cpp:
232         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
233         * WebProcess/WebProcess.h:
234
235 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
236
237         Crash under _layoutForNodeHighlight: when inspecting espn.com
238         https://bugs.webkit.org/show_bug.cgi?id=146422
239
240         Reviewed by Joseph Pecoraro.
241         
242         When inspecting espn.com, MobileSafari sometimes crashes, because
243         highlight.quads is empty. I was not able to quickly determine why.
244
245         Fix by bailing in this case.
246
247         * UIProcess/WKInspectorHighlightView.mm:
248         (-[WKInspectorHighlightView _layoutForNodeHighlight:]):
249
250 2015-06-30  Matt Baker  <mattbaker@apple.com>
251
252         Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
253         https://bugs.webkit.org/show_bug.cgi?id=146168
254
255         Reviewed by Brian Burg.
256
257         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
258         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
259         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
260         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
261         Added CA transaction post-commit handlers to instrument end of composite.
262
263 2015-06-30  Beth Dakin  <bdakin@apple.com>
264
265         The bounds on InteractionInformationAtPosition should be more precise
266         https://bugs.webkit.org/show_bug.cgi?id=146468
267         -and corresponding-
268         rdar://problem/20739834
269
270         Reviewed by Enrica Casucci and Simon Fraser.
271
272         For links, get the TextQuads from the Range, and for images, look at the 
273         absoluteContentQuad(). All other items can continue to use absoluteBoundingBox.
274         * WebProcess/WebPage/ios/WebPageIOS.mm:
275         (WebKit::WebPage::getPositionInformation):
276
277 2015-06-30  Anders Carlsson  <andersca@apple.com>
278
279         Disable Spintracer when getting the list of plug-ins
280         https://bugs.webkit.org/show_bug.cgi?id=146467
281         rdar://problem/21616640
282
283         Reviewed by Tim Horton.
284
285         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
286         (WebKit::WebPlatformStrategies::populatePluginCache):
287
288 2015-06-30  Anders Carlsson  <andersca@apple.com>
289
290         Java Plugin cannot launch JavaUpdater.app after renaming
291         https://bugs.webkit.org/show_bug.cgi?id=146464
292         rdar://problem/19747153
293
294         Reviewed by Tim Horton.
295
296         Check for both "JavaUpdater.app" and "Java Updater.app".
297
298         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
299         (WebKit::isJavaUpdaterURL):
300
301 2015-06-30  Chris Dumez  <cdumez@apple.com>
302
303         [WK2] Avoid taking a useless / blank navigation snapshot when navigating after restoring sessionState
304         https://bugs.webkit.org/show_bug.cgi?id=146446
305         <rdar://problem/21584231>
306
307         Reviewed by Darin Adler.
308
309         We currently take a useless / blank navigation snapshot when navigating
310         after restoring the back / forward list from a sessionState object.
311         This is because we get a current HistoryItem from the sessionState
312         which we have never really navigated to. We then take a navigation
313         snapshot for the current HistoryItem when navigating away as we usually
314         do. However, in this case, the HistoryItem was imported and there is
315         nothing to snapshot.
316
317         Taking this snapshot is not only wasteful, it can also potentially
318         overwrite the snapshot that was set by the client using
319         WKWebView._saveBackForwardSnapshotForItem() SPI.
320
321         To address the problem, this patch suppresses navigation snapshotting
322         after restoring the back / forward list from a session state and until
323         the next load is committed.
324
325         * UIProcess/WebPageProxy.cpp:
326         (WebKit::WebPageProxy::recordNavigationSnapshot):
327         (WebKit::WebPageProxy::restoreFromSessionState):
328         (WebKit::WebPageProxy::didCommitLoadForFrame):
329         * UIProcess/WebPageProxy.h:
330
331 2015-06-29  Anders Carlsson  <andersca@apple.com>
332
333         Get rid of unused WKSI functions
334         https://bugs.webkit.org/show_bug.cgi?id=146443
335
336         Reviewed by Tim Horton.
337
338         * UIProcess/API/Cocoa/WKWebView.mm:
339         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
340         (InitWebCoreSystemInterface): Deleted.
341         * WebProcess/WebProcess.cpp:
342         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
343         * WebProcess/WebProcess.h:
344         * WebProcess/cocoa/WebProcessCocoa.mm:
345         (WebKit::WebProcess::destroyRenderingResources):
346
347 2015-06-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
348
349         [GTK] Unreviewed GTK build fix since r186088 and r186095.
350         https://bugs.webkit.org/show_bug.cgi?id=146449
351
352         * PlatformGTK.cmake:
353         * UIProcess/API/gtk/PageClientImpl.h:
354
355 2015-06-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
356
357         Unreviewed EFL build fix since r186088 and r186095.
358
359         * CMakeLists.txt: Remove ConnectionStack.cpp.
360         * UIProcess/CoordinatedGraphics/WebView.h: Override virtual didFailLoadForMainFrame().
361
362 2015-06-29  Brady Eidson  <beidson@apple.com>
363
364         Flag sync XHRs from the network process so they can be handled appropriately.
365         <rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441
366
367         Reviewed by Darin Adler.
368
369         * NetworkProcess/NetworkResourceLoader.h:
370         (WebKit::NetworkResourceLoader::loadingSynchronousXHR): Return isSynchronous().
371
372 2015-06-29  Anders Carlsson  <andersca@apple.com>
373
374         Remove an empty group from the Xcode project.
375
376         * WebKit2.xcodeproj/project.pbxproj:
377
378 2015-06-29  Anders Carlsson  <andersca@apple.com>
379
380         Get rid of ConnectionStack
381         https://bugs.webkit.org/show_bug.cgi?id=146437
382
383         Reviewed by Andreas Kling.
384
385         Just use a TemporaryChange and a static variable instead.
386
387         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
388         * PluginProcess/WebProcessConnection.cpp:
389         (WebKit::WebProcessConnection::setGlobalException):
390         (WebKit::WebProcessConnection::didReceiveMessage):
391         (WebKit::WebProcessConnection::didReceiveSyncMessage):
392         * Shared/ConnectionStack.cpp: Removed.
393         (WebKit::ConnectionStack::singleton): Deleted.
394         * Shared/ConnectionStack.h: Removed.
395         (WebKit::ConnectionStack::current): Deleted.
396         (WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher): Deleted.
397         (WebKit::ConnectionStack::CurrentConnectionPusher::~CurrentConnectionPusher): Deleted.
398         * WebKit2.xcodeproj/project.pbxproj:
399
400 2015-06-29  Tim Horton  <timothy_horton@apple.com>
401
402         Fix the build.
403
404         * UIProcess/API/Cocoa/WKWebView.mm:
405         (-[WKWebView _didFailLoadForMainFrame]):
406         * UIProcess/API/Cocoa/WKWebViewInternal.h:
407         * UIProcess/ios/PageClientImplIOS.h:
408         * UIProcess/ios/PageClientImplIOS.mm:
409         (WebKit::PageClientImpl::didFailLoadForMainFrame):
410
411 2015-06-29  Dean Jackson  <dino@apple.com>
412
413         Temporarily disable PICTURE_SIZES
414         https://bugs.webkit.org/show_bug.cgi?id=146435
415         <rdar://problem/21087013>
416
417         Temporarily disable PICTURE_SIZES because it causes problems with out
418         of date <picture> polyfills.
419
420         Temporarily disable PICTURE_SIZES until Safari branches.
421
422         * Configurations/FeatureDefines.xcconfig:
423
424 2015-06-29  Anders Carlsson  <andersca@apple.com>
425
426         Don't try to access a possibly deallocated WebFrameProxy object
427         https://bugs.webkit.org/show_bug.cgi?id=146428
428         rdar://problem/21446364
429
430         Reviewed by Tim Horton.
431
432         Make sure to call isMainFrame before calling out to the client inside
433         WebPageProxy::didFailLoadForFrame, matching what we do for WebPageProxy::didFinishLoadForFrame.
434
435         Also, add a ViewGestureController::didFailLoadForMainFrame function and call that instead of
436         calling didFinishLoadForMainFrame in the failure case.
437
438         * UIProcess/API/mac/WKView.mm:
439         (-[WKView _didFailLoadForMainFrame]):
440         * UIProcess/API/mac/WKViewInternal.h:
441         * UIProcess/PageClient.h:
442         * UIProcess/WebPageProxy.cpp:
443         (WebKit::WebPageProxy::didFailLoadForFrame):
444         * UIProcess/ios/ViewGestureControllerIOS.mm:
445         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
446         (WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
447         * UIProcess/mac/PageClientImpl.h:
448         * UIProcess/mac/PageClientImpl.mm:
449         (WebKit::PageClientImpl::didFailLoadForMainFrame):
450         * UIProcess/mac/ViewGestureController.h:
451         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
452         (WebKit::ViewGestureController::didFailLoadForMainFrame):
453         * UIProcess/mac/ViewGestureControllerMac.mm:
454         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
455         (WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
456
457 2015-06-29  Yongjun Zhang  <yongjun_zhang@apple.com>
458
459         Disable default gesture recognizers on preview.
460         https://bugs.webkit.org/show_bug.cgi?id=146424
461         rdar://problem/21572828
462
463         We should disable default gesture recognizers on preview, to avoid activating links or
464         triggering touch events accidentally. We can enable them after preview finishes.
465
466         Reviewed by Beth Dakin.
467
468         * UIProcess/ios/WKContentViewInteraction.mm:
469         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
470         (-[WKContentView didDismissPreviewViewController:committing:]):
471
472 2015-06-27  Ryosuke Niwa  <rniwa@webkit.org>
473
474         Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
475         https://bugs.webkit.org/show_bug.cgi?id=146379
476
477         Reviewed by Darin Adler.
478
479         Since font panel doesn't open in WebKit2 at the moment, just add an empty implementation of didApplyStyle
480
481         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
482         (WebKit::WebEditorClient::didApplyStyle):
483         * WebProcess/WebCoreSupport/WebEditorClient.h:
484         * WebProcess/WebPage/WebPage.h:
485
486 2015-06-29  Dean Jackson  <dino@apple.com>
487
488         Setting to enable/disable media controls sizing on page zoom
489         https://bugs.webkit.org/show_bug.cgi?id=146423
490         <rdar://problem/18379634>
491
492         Reviewed by Eric Carlson.
493
494         Add a new setting "MediaControlsScaleWithPageZoom" that can disable
495         the behaviour we currently implement on iOS, where the media controls
496         attempt to remain at a fixed size independent of page zoom.
497
498         * Shared/WebPreferencesDefinitions.h: Initialize to false on iOS, true otherwise.
499         * UIProcess/API/C/WKPreferences.cpp:
500         (WKPreferencesSetMediaControlsScaleWithPageZoom):
501         (WKPreferencesGetMediaControlsScaleWithPageZoom):
502         * UIProcess/API/C/WKPreferencesRefPrivate.h:
503         * WebProcess/WebPage/WebPage.cpp:
504         (WebKit::WebPage::updatePreferences):
505
506 2015-06-29  Chris Dumez  <cdumez@apple.com>
507
508         [WK2][iOS] Swipe gesture snapshot stays up for 3 seconds when swiping back after top-hit navigation
509         https://bugs.webkit.org/show_bug.cgi?id=146415
510         <rdar://problem/21595801>
511
512         Reviewed by Tim Horton.
513
514         Swipe gesture snapshot previously stayed up for 3 seconds when swiping
515         back after a top-hit navigation. This is because we do not restore the
516         scroll position in this case and the ViewGestureController was waiting
517         for the scroll position to be restored before taking down the snapshot.
518
519         This patch adds a fail-safe mechanism so that the WebProcess can let
520         the UIProcess know (via a CouldNotRestorePageState IPC) that the page
521         state (including scroll position) could not be restored so that it can
522         let the ViewGestureController it should not wait for the scroll
523         position to be restored.
524
525         * UIProcess/API/Cocoa/WKWebView.mm:
526         (-[WKWebView _couldNotRestorePageState]):
527         * UIProcess/API/Cocoa/WKWebViewInternal.h:
528         * UIProcess/PageClient.h:
529         * UIProcess/WebPageProxy.h:
530         * UIProcess/WebPageProxy.messages.in:
531         * UIProcess/ios/PageClientImplIOS.h:
532         * UIProcess/ios/PageClientImplIOS.mm:
533         (WebKit::PageClientImpl::couldNotRestorePageState):
534         * UIProcess/ios/WebPageProxyIOS.mm:
535         (WebKit::WebPageProxy::couldNotRestorePageState):
536         * WebProcess/WebPage/ios/WebPageIOS.mm:
537         (WebKit::WebPage::restorePageState):
538
539 2015-06-29  Chris Dumez  <cdumez@apple.com>
540
541         [WK2][iOS] Add WKWebView private API to save a back/forward snapshot
542         https://bugs.webkit.org/show_bug.cgi?id=146398
543         <rdar://problem/21584231>
544
545         Reviewed by Dan Bernstein.
546
547         Add WKWebView private API to save a back/forward snapshot so that the
548         client can make sure a back/forward snapshot is available even when
549         swapping WKWebView upon navigation.
550
551         This matches the WKView.saveBackForwardSnapshotForItem API we have on
552         Mac.
553
554         * UIProcess/API/Cocoa/WKWebView.mm:
555         (-[WKWebView saveBackForwardSnapshotForItem:]):
556         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
557
558 2015-06-29  Anders Carlsson  <andersca@apple.com>
559
560         Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS
561         https://bugs.webkit.org/show_bug.cgi?id=146413
562
563         Reviewed by Andreas Kling.
564
565         Replace SPI with API.
566
567         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
568         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
569         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
570         (InitWebCoreSystemInterface): Deleted.
571
572 2015-06-29  Enrica Casucci  <enrica@apple.com>
573
574         [iOS] Hardware Keyboard: All combinations of arrow keys and space key do not scroll the view.
575         https://bugs.webkit.org/show_bug.cgi?id=146290
576         rdar://problem/18466015
577
578         We don't normally get called by the keyboard to handle the event if we are not
579         interacting with editable content. In order to receive all the hardware keyboard events
580         we need to implement _handleKeyUIEvent which is called for every key event
581         when the view is first responder. This gives us the opportunity to send each keystroke
582         to the WebProcess to let any Javascript handler intercept it and then perform the default
583         action for the key combination.
584         Unfortunately this mechanism does not provide key repeat, which is implemented in the
585         keyboard layer. In order to have it at least for the arrow keys, we use the keyCommands
586         mechanism only for those.
587
588         Reviewed by Darin Adler.
589
590         * Platform/spi/ios/UIKitSPI.h:
591         * UIProcess/API/Cocoa/WKWebView.mm:
592         (-[WKWebView _scrollByOffset:]):
593         * UIProcess/API/Cocoa/WKWebViewInternal.h:
594         * UIProcess/ios/WKContentViewInteraction.mm:
595         (-[WKContentView canPerformAction:withSender:]):
596         (-[WKContentView keyCommands]):
597         (-[WKContentView _arrowKey:]):
598         (-[WKContentView _handleKeyUIEvent:]):
599         (-[WKContentView handleKeyEvent:]):
600         (-[WKContentView handleKeyWebEvent:]):
601         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
602
603 2015-06-28  Dan Bernstein  <mitz@apple.com>
604
605         Fixed the iOS 8.x build after r186066.
606
607         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
608         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
609         (WebKit::WebVideoFullscreenManagerProxy::create):
610
611 2015-06-28  Dan Bernstein  <mitz@apple.com>
612
613         Fixed the iOS build after r186059.
614
615         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
616
617 2015-06-28  Chris Fleizach  <cfleizach@apple.com>
618
619         AX: iOS: Crash at accessibilityObjectForMainFramePlugin()
620         https://bugs.webkit.org/show_bug.cgi?id=146399
621
622         Reviewed by Darin Adler.
623
624         Could not reproduce issue, but the invalid address seems to indicate this is a nullptr access is happening when we try to get the plugin of the m_page variable when
625         it has not been initialized.
626
627         * WebProcess/WebPage/ios/WebPageIOS.mm:
628         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
629
630 2015-06-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
631
632         Use Ref/RefPtr instead of PassRefPtr in WebKit2
633         https://bugs.webkit.org/show_bug.cgi?id=146190
634
635         Reviewed by Darin Adler.
636
637         As a step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
638
639         * Shared/API/c/WKContextMenuItem.cpp:
640         (WKContextMenuItemCreateAsAction):
641         (WKContextMenuItemCreateAsCheckableAction):
642         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
643         (WebKit::WebCoordinatedSurface::create):
644         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
645         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
646         (WebKit::ThreadSafeCoordinatedSurface::create):
647         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
648         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
649         (WebKit::ThreadedCompositor::create):
650         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
651         * Shared/Plugins/NPRemoteObjectMap.cpp:
652         (WebKit::NPRemoteObjectMap::create):
653         * Shared/Plugins/NPRemoteObjectMap.h:
654         * Shared/WebBatteryStatus.h:
655         (WebKit::WebBatteryStatus::create):
656         * Shared/WebCertificateInfo.h:
657         (WebKit::WebCertificateInfo::create):
658         * Shared/WebContextMenuItem.h:
659         (WebKit::WebContextMenuItem::create):
660         * Shared/WebRenderObject.cpp:
661         (WebKit::WebRenderObject::create):
662         * Shared/WebRenderObject.h:
663         (WebKit::WebRenderObject::create):
664         * UIProcess/API/APINavigationData.h:
665         (API::NavigationData::create):
666         * UIProcess/API/APISession.cpp:
667         (API::Session::createEphemeral):
668         * UIProcess/API/APISession.h:
669         * UIProcess/API/APISessionState.cpp:
670         (API::SessionState::create):
671         * UIProcess/API/APISessionState.h:
672         * UIProcess/API/APIUserScript.h:
673         * UIProcess/API/APIWebsiteDataStore.cpp:
674         (API::WebsiteDataStore::createNonPersistentDataStore):
675         (API::WebsiteDataStore::create):
676         * UIProcess/API/APIWebsiteDataStore.h:
677         * UIProcess/API/C/WKCredential.cpp:
678         (WKCredentialCreate):
679         (WKCredentialCreateWithCertificateInfo):
680         * UIProcess/API/C/WKPage.cpp:
681         (WKPageCopySessionState):
682         (WKPageSetPageContextMenuClient):
683         * UIProcess/API/C/WKSessionStateRef.cpp:
684         (WKSessionStateCreateFromData):
685         * UIProcess/API/C/WKUserScriptRef.cpp:
686         (WKUserScriptCreateWithSource):
687         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
688         (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
689         * UIProcess/API/Cocoa/WKProcessGroup.mm:
690         (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]):
691         * UIProcess/API/Cocoa/WKProcessPool.mm:
692         (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
693         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
694         (+[WKWebsiteDataStore nonPersistentDataStore]):
695         * UIProcess/API/efl/ewk_auth_request_private.h:
696         (EwkAuthRequest::create):
697         * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
698         (EwkBackForwardListItem::create):
699         * UIProcess/API/efl/ewk_context.cpp:
700         (EwkContext::create):
701         * UIProcess/API/efl/ewk_context_menu_private.h:
702         (EwkContextMenu::create):
703         * UIProcess/API/efl/ewk_download_job_private.h:
704         (EwkDownloadJob::create):
705         * UIProcess/API/efl/ewk_file_chooser_request_private.h:
706         (EwkFileChooserRequest::create):
707         * UIProcess/API/efl/ewk_form_submission_request_private.h:
708         (EwkFormSubmissionRequest::create):
709         * UIProcess/API/efl/ewk_navigation_data_private.h:
710         (EwkNavigationData::create):
711         * UIProcess/API/efl/ewk_security_origin_private.h:
712         (EwkSecurityOrigin::create):
713         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
714         (WebKit::AuthenticationChallengeProxy::create):
715         * UIProcess/Authentication/AuthenticationDecisionListener.h:
716         (WebKit::AuthenticationDecisionListener::create):
717         * UIProcess/Authentication/WebCredential.h:
718         (WebKit::WebCredential::create):
719         * UIProcess/Authentication/WebProtectionSpace.h:
720         (WebKit::WebProtectionSpace::create):
721         * UIProcess/Cocoa/NavigationState.mm:
722         (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
723         * UIProcess/Databases/DatabaseProcessProxy.cpp:
724         (WebKit::DatabaseProcessProxy::create):
725         * UIProcess/Databases/DatabaseProcessProxy.h:
726         * UIProcess/Launcher/ProcessLauncher.h:
727         (WebKit::ProcessLauncher::create):
728         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
729         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
730         (WebKit::WebNotificationManagerProxy::create):
731         * UIProcess/Notifications/WebNotificationManagerProxy.h:
732         * UIProcess/Plugins/PluginProcessProxy.cpp:
733         (WebKit::PluginProcessProxy::create):
734         * UIProcess/Plugins/PluginProcessProxy.h:
735         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
736         (WebKit::RemoteScrollingTree::create):
737         * UIProcess/Scrolling/RemoteScrollingTree.h:
738         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
739         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
740         * UIProcess/WebProcessPool.cpp:
741         (WebKit::WebProcessPool::WebProcessPool):
742         * UIProcess/efl/WebPopupMenuListenerEfl.h:
743         (WebKit::WebPopupMenuListenerEfl::create):
744         * UIProcess/efl/WebViewEfl.cpp:
745         (WebKit::WebView::create):
746         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
747         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
748         (WebKit::WebVideoFullscreenManagerProxy::create):
749
750 2015-06-28  Dan Bernstein  <mitz@apple.com>
751
752         [Cocoa] Remove _WKSecurityOrigin.{h,mm}
753         https://bugs.webkit.org/show_bug.cgi?id=146402
754
755         Reviewed by Sam Weinig.
756
757         * UIProcess/API/Cocoa/WKSecurityOrigin.mm: Declare and define _WKSecurityOrigin here.
758         (-[WKSecurityOrigin methodSignatureForSelector:]): Moved into a WKBinaryCompatibility
759         category.
760         (-[WKSecurityOrigin forwardInvocation:]): Ditto.
761         * UIProcess/API/Cocoa/_WKSecurityOrigin.h: Removed.
762         * UIProcess/API/Cocoa/_WKSecurityOrigin.mm: Removed.
763         * WebKit2.xcodeproj/project.pbxproj: Removed references to _WKSecurityOrigin.{h,mm}.
764
765 2015-06-28  Dan Bernstein  <mitz@apple.com>
766
767         Tried to fix the EFL buid after r186046.
768
769         * UIProcess/efl/PageUIClientEfl.cpp:
770         (WebKit::PageUIClientEfl::PageUIClientEfl):
771
772 2015-06-28  Dan Bernstein  <mitz@apple.com>
773
774         <rdar://problem/21581792> REGRESSION (r185915): Source-incompatible change in WKPageUIClient
775         https://bugs.webkit.org/show_bug.cgi?id=146396
776
777         Reviewed by Anders Carlsson.
778
779         * UIProcess/API/C/WKPageUIClient.h: Renamed
780         runJavaScript{Alert,Confirm,Prompt}_deprecatedForUseWithV0 back to runJavaScript{Alert,Confirm,Prompt}
781         in client versions prior to V5.
782
783 2015-06-28  Tim Horton  <timothy_horton@apple.com>
784
785         REGRESSION: Page footers are displayed above the bottom of the WebView due to tiled scaling
786         https://bugs.webkit.org/show_bug.cgi?id=146393
787         <rdar://problem/21113217>
788
789         Reviewed by Sam Weinig.
790
791         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
792         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
793         Don't include the top content inset in the layout size.
794
795 2015-06-26  Antti Koivisto  <antti@apple.com>
796
797         Make NetworkCache::traverse faster
798         https://bugs.webkit.org/show_bug.cgi?id=146354
799
800         Reviewed by Anders Carlsson.
801
802         * NetworkProcess/cache/NetworkCacheIOChannel.h:
803         (WebKit::NetworkCache::IOChannel::path):
804         (WebKit::NetworkCache::IOChannel::type):
805         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
806         (WebKit::NetworkCache::IOChannel::open):
807         (WebKit::NetworkCache::IOChannel::read):
808         (WebKit::NetworkCache::IOChannel::write):
809         (WebKit::NetworkCache::IOChannel::readSync): Deleted.
810
811             Not needed anymore.
812
813         * NetworkProcess/cache/NetworkCacheStorage.cpp:
814         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
815         (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
816
817             Add TraverseOperation, similar to Read/Write.
818
819         (WebKit::NetworkCache::Storage::open):
820         (WebKit::NetworkCache::Storage::traverse):
821
822             Use async I/O.
823             Use condition variable to allow maximum 5 parallel file reads.
824
825         * NetworkProcess/cache/NetworkCacheStorage.h:
826
827 2015-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>
828
829         [SOUP] NetworkCache: Make NetworkProcess::clearDiskCache actually clear the the resources depending on the date
830         https://bugs.webkit.org/show_bug.cgi?id=146316
831
832         Reviewed by Sergio Villar Senin.
833
834         And make sure the completion handler is called, as well. This
835         functionality is already implemented in Storage::clear(), so we
836         just need to pass the time point and completion handler to Cache::clear().
837
838         * NetworkProcess/soup/NetworkProcessSoup.cpp:
839         (WebKit::NetworkProcess::clearDiskCache):
840
841 2015-06-26  Beth Dakin  <bdakin@apple.com>
842
843         Rubber-stamped by Tim Horton.
844
845         As Dan pointed out in https://bugs.webkit.org/show_bug.cgi?id=146350 , this way of  
846         getting the screen size was problematic on multiple counts. Fixed here by using 
847         UIScreen. 
848         * UIProcess/WKImagePreviewViewController.mm:
849         (-[WKImagePreviewViewController initWithCGImage:]):
850
851 2015-06-26  Beth Dakin  <bdakin@apple.com>
852
853         WebPage::getPositionInformation() should not copy an image that is larger than the  
854         screen
855         https://bugs.webkit.org/show_bug.cgi?id=146367
856
857         Reviewed by Tim Horton.
858
859         Maintain aspectRatio, but scale down the buffer size if the image is larger than 
860         the screen.
861         * WebProcess/WebPage/ios/WebPageIOS.mm:
862         (WebKit::WebPage::getPositionInformation):
863
864 2015-06-26  Mark Lam  <mark.lam@apple.com>
865
866         Re-instating the #import and assertion removed in r186014.
867         https://bugs.webkit.org/show_bug.cgi?id=146358
868
869         Not reviewed.
870
871         * UIProcess/API/Cocoa/WKUserContentController.mm:
872         - Speculative fix: should have used <wtf/MainThread.h> instead of <WTF/MainThread.h>.
873
874 2015-06-26  Mark Lam  <mark.lam@apple.com>
875
876         Gardening: remove an assertion and a #import to green the bot.
877         https://bugs.webkit.org/show_bug.cgi?id=146358
878
879         Not reviewed.
880
881         * UIProcess/API/Cocoa/WKUserContentController.mm:
882         - Not sure why the <WTF/MainThread.h> cannot be found on some bots, but I'm
883           removing it (and the assertion that needed it) for now while I investigate
884           further.
885
886 2015-06-26  Mark Lam  <mark.lam@apple.com>
887
888         ScriptMessageHandlerDelegate::didPostMessage() should reuse its JSContext instance.
889         https://bugs.webkit.org/show_bug.cgi?id=146358
890
891         Reviewed by Anders Carlsson.
892
893         Currently, ScriptMessageHandlerDelegate::didPostMessage() creates a new JSContext each
894         time it is called.  This JSContext is used only once to deserialized a JSON object
895         and then destroyed.  We will change ScriptMessageHandlerDelegate to cache the JSContext
896         and reuse it in all subsequent calls to didPostMessage().
897
898         Also added a @autoreleasepool scope in didPostMessage() so that transient ObjC objects
899         will be release sooner.
900
901         * UIProcess/API/Cocoa/WKUserContentController.mm:
902
903 2015-06-26  Beth Dakin  <bdakin@apple.com>
904
905         Add support for image previews
906         https://bugs.webkit.org/show_bug.cgi?id=146350
907         -and corresponding-
908         rdar://problem/20640234
909
910         Reviewed by Tim Horton.
911
912         For images, use the actual image instead of a snapshot.
913         * WebProcess/WebPage/ios/WebPageIOS.mm:
914         (WebKit::WebPage::getPositionInformation):
915
916         ViewController for image preview.
917         * UIProcess/WKImagePreviewViewController.h: Added.
918         * UIProcess/WKImagePreviewViewController.mm: Added.
919         (-[WKImagePreviewViewController loadView]):
920         (-[WKImagePreviewViewController initWithCGImage:]):
921         (-[WKImagePreviewViewController viewDidLayoutSubviews]):
922         (_scaleSizeWithinSize):
923
924         New enum and member variable to keep track of preview type.
925         * UIProcess/ios/WKContentViewInteraction.h:
926         * UIProcess/ios/WKContentViewInteraction.mm:
927
928         Only apply the http restriction to non-image links since we can still preview the 
929         image of a non-http image link.
930         (-[WKContentView gestureRecognizerShouldBegin:]):
931
932         Handle links and images.
933         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
934
935         Return early for non-link previews.
936         (-[WKContentView commitPreviewViewController:]):
937
938         New files.
939         * WebKit2.xcodeproj/project.pbxproj:
940
941         Just use the actual image in the PositionInformation for image elements rather 
942         than taking a screen shot.
943         * WebProcess/WebPage/ios/WebPageIOS.mm:
944         (WebKit::WebPage::getPositionInformation):
945
946 2015-06-26  Matt Rajca  <mrajca@apple.com>
947
948         Wireless Playback Target-related #import should be a #include
949         https://bugs.webkit.org/show_bug.cgi?id=146283
950
951         Reviewed by Eric Carlson.
952
953         * Shared/WebCoreArgumentCoders.cpp:
954
955 2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>
956
957         Web Inspector: Add Support for OS X Full Screen Mode
958         https://bugs.webkit.org/show_bug.cgi?id=123510
959
960         Reviewed by Timothy Hatcher.
961
962         * UIProcess/mac/WebInspectorProxyMac.mm:
963         (WebKit::WebInspectorProxy::createInspectorWindow):
964         Allow full screen.
965
966 2015-06-25  Hyungwook Lee  <hyungwook.lee@navercorp.com>
967
968         [EFL] Make send / receive messages to communicate the Web and UI Processes using Injected Bundle.
969         https://bugs.webkit.org/show_bug.cgi?id=145685
970
971         Reviewed by Gyuyoung Kim.
972
973         To have extensible port specific API facility using Injected Bundle,
974         we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.
975
976         * UIProcess/API/efl/ewk_context.cpp:
977         (EwkContext::EwkContext):
978         (EwkContext::findOrCreateWrapper):
979         (bundlePathForExtension):
980         (EwkContext::create):
981         (EwkContext::allowSpecificHTTPSCertificateForHost):
982         (EwkContext::isDefaultBundle):
983         (ewk_context_default_get):
984         * UIProcess/API/efl/ewk_context_private.h:
985         * WebProcess/efl/ExtensionManagerEfl.cpp:
986         (WebKit::ExtensionManagerEfl::initialize):
987
988 2015-06-25  Simon Fraser  <simon.fraser@apple.com>
989
990         [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
991         https://bugs.webkit.org/show_bug.cgi?id=146329
992         rdar://problem/21233010
993
994         Reviewed by Tim Horton.
995         
996         When doing a back swipe, views interposed between the WKWebView and the WKContentView
997         get positions and animations for the swipe. This -_updateVisibleContentRects to
998         compute bad visible and unobscured rects, so we lose tiles.
999         
1000         Fix by "freezing" the visible and unobscured content rects in the view being
1001         swiped for the duration of the navigation gesture. When swiping the main view,
1002         we just plumb through navigationGestureDidEnd(). When Reader is showing and the
1003         swiped view is different from the navigating view, use the new navigationGestureDidEnd()
1004         override which takes no arguments.
1005
1006         * UIProcess/API/Cocoa/WKWebView.mm:
1007         (-[WKWebView _updateVisibleContentRects]):
1008         (-[WKWebView _navigationGestureDidBegin]):
1009         (-[WKWebView _navigationGestureDidEnd]):
1010         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1011         * UIProcess/API/gtk/PageClientImpl.cpp:
1012         (WebKit::PageClientImpl::navigationGestureDidEnd):
1013         * UIProcess/API/gtk/PageClientImpl.h:
1014         * UIProcess/CoordinatedGraphics/WebView.h:
1015         * UIProcess/PageClient.h:
1016         * UIProcess/WebPageProxy.cpp:
1017         (WebKit::WebPageProxy::navigationGestureDidEnd):
1018         * UIProcess/WebPageProxy.h:
1019         * UIProcess/ios/PageClientImplIOS.h:
1020         * UIProcess/ios/PageClientImplIOS.mm:
1021         (WebKit::PageClientImpl::navigationGestureDidBegin):
1022         (WebKit::PageClientImpl::navigationGestureDidEnd):
1023         * UIProcess/ios/ViewGestureControllerIOS.mm:
1024         (WebKit::ViewGestureController::beginSwipeGesture):
1025         (WebKit::ViewGestureController::endSwipeGesture):
1026         * UIProcess/mac/PageClientImpl.h:
1027         * UIProcess/mac/PageClientImpl.mm:
1028         (WebKit::PageClientImpl::navigationGestureDidEnd):
1029
1030 2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>
1031
1032         [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
1033         https://bugs.webkit.org/show_bug.cgi?id=146324
1034
1035         Reviewed by Timothy Hatcher.
1036
1037         * UIProcess/API/mac/WKViewInternal.h:
1038         * UIProcess/API/mac/WKView.mm:
1039         (-[WKView _startWindowDrag]):
1040         Add a way to start a window drag from a WKView using the most
1041         recent mouse down event.
1042
1043         * WebProcess/WebPage/WebInspectorUI.h:
1044         * WebProcess/WebPage/WebInspectorUI.cpp:
1045         (WebKit::WebInspectorUI::startWindowDrag):
1046         Send a message that we should start a window drag.
1047
1048         * UIProcess/WebInspectorProxy.messages.in:
1049         * UIProcess/WebInspectorProxy.h:
1050         * UIProcess/WebInspectorProxy.cpp:
1051         (WebKit::WebInspectorProxy::startWindowDrag):
1052         (WebKit::WebInspectorProxy::platformStartWindowDrag):
1053         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1054         (WebKit::WebInspectorProxy::platformStartWindowDrag):
1055         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1056         (WebKit::WebInspectorProxy::platformStartWindowDrag):
1057         * UIProcess/mac/WebInspectorProxyMac.mm:
1058         (WebKit::WebInspectorProxy::platformStartWindowDrag):
1059         Let the platform start a window drag. Only implemented by Mac.
1060
1061 2015-06-25  Tim Horton  <timothy_horton@apple.com>
1062
1063         [iOS] When using the back swipe gesture in Safari, the previous webpage will flash for a second
1064         https://bugs.webkit.org/show_bug.cgi?id=146326
1065         <rdar://problem/17811304>
1066
1067         Reviewed by Dean Jackson.
1068
1069         * UIProcess/DrawingAreaProxy.h:
1070         (WebKit::DrawingAreaProxy::hideContentUntilPendingUpdate):
1071         (WebKit::DrawingAreaProxy::hideContentUntilAnyUpdate):
1072         (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate): Deleted.
1073         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1074         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1075         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1076         (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilPendingUpdate):
1077         (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilAnyUpdate):
1078         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Deleted.
1079         (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate): Deleted.
1080         Make it possible to distinguish between hiding the content until *any* commit
1081         comes in (for example, when we're coming back from being suspended and don't want
1082         to show anything until we are sure all the layers are valid) and hiding the content
1083         until the currently pending commit corresponding to the current state in the UI process
1084         has arrived (which is what we want when e.g. hiding content after a gesture navigation
1085         and not showing it until the commit including the navigation lands).
1086
1087         * UIProcess/API/Cocoa/WKWebView.mm:
1088         (-[WKWebView _hideContentUntilNextUpdate]):
1089         * UIProcess/ios/WKContentView.mm:
1090         (-[WKContentView _applicationWillEnterForeground]):
1091         Make use of "hideContentUntilAnyUpdate".
1092
1093         * UIProcess/ios/ViewGestureControllerIOS.mm:
1094         (WebKit::ViewGestureController::endSwipeGesture):
1095         Make use of "hideContentUntilPendingUpdate".
1096
1097 2015-06-25  Tim Horton  <timothy_horton@apple.com>
1098
1099         Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
1100         https://bugs.webkit.org/show_bug.cgi?id=146322
1101         <rdar://problem/21413884>
1102
1103         Reviewed by Simon Fraser.
1104
1105         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1106         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1107         Inflate the fixed layout height (by the viewScale) so that it's the size of the view.
1108
1109 2015-06-25  Chris Dumez  <cdumez@apple.com>
1110
1111         [WK2][iOS] Drop WebKitNetworkCacheTemporarilyDisabledForTesting NSUserDefaults
1112         https://bugs.webkit.org/show_bug.cgi?id=146323
1113         <rdar://problem/21552370>
1114
1115         Reviewed by Antti Koivisto.
1116
1117         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1118         (WebKit::WebProcessPool::isNetworkCacheEnabled):
1119
1120 2015-06-25  Tim Horton  <timothy_horton@apple.com>
1121
1122         Crash in ViewGestureController::didRestoreScrollPosition() running WKWebView.LoadAlternateHTMLStringFromProvisionalLoadError test
1123         https://bugs.webkit.org/show_bug.cgi?id=146309
1124         <rdar://problem/21476651>
1125
1126         Reviewed by Dan Bernstein.
1127
1128         * UIProcess/API/Cocoa/WKWebView.mm:
1129         (-[WKWebView _didCommitLayerTree:]):
1130         Null-check. _gestureController can be null if allowsBackForwardNavigationGestures is NO.
1131
1132 2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1133
1134         [GTK] Add initial WebKitWebsiteDataManager API for process configuration options
1135         https://bugs.webkit.org/show_bug.cgi?id=146149
1136
1137         Reviewed by Sergio Villar Senin.
1138
1139         Add WebKitWebsiteDataManager to replace the different ways we have
1140         to configure data store
1141         directories. WebKitWebContext:indexed-db-directory property has
1142         been removed, since it was added only in trunk, and
1143         WebKitWebContext:local-storage-directory has been deprecated. The
1144         method webkit_web_context_set_disk_cache_directory() has been
1145         deprecated too in favor of WebKitWebsiteDataManager.
1146
1147         * PlatformGTK.cmake: Add new files to compilation.
1148         * UIProcess/API/gtk/WebKitPrivate.h: Move networkCacheSubdirectory
1149         definition here.
1150         * UIProcess/API/gtk/WebKitWebContext.cpp:
1151         (webkitWebContextGetProperty): Replace indexed-db-directory getter
1152         with website-data-manager one.
1153         (webkitWebContextSetProperty): Replace indexed-db-directory setter
1154         with website-data-manager one.
1155         (webkitWebContextConstructed): Use the user provided
1156         WebKitWebsiteDataManager to configure the context or create a
1157         default WebKitWebsiteDataManager if not provided.
1158         (webkit_web_context_class_init): Replace indexed-db-directory
1159         property with website-data-manager.
1160         (webkit_web_context_new_with_website_data_manager):
1161         (webkit_web_context_get_website_data_manager):
1162         (webkitWebContextCreatePageForWebView): Get the WebsiteDataStore
1163         from the WebKitWebsiteDataManager.
1164         * UIProcess/API/gtk/WebKitWebContext.h:
1165         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp: Added.
1166         (webkitWebsiteDataManagerGetProperty):
1167         (webkitWebsiteDataManagerSetProperty):
1168         (webkit_website_data_manager_class_init):
1169         (webkitWebsiteDataManagerCreate):
1170         (webkitWebsiteDataManagerGetDataStore):
1171         (webkit_website_data_manager_new):
1172         (webkit_website_data_manager_get_local_storage_directory):
1173         (webkit_website_data_manager_get_disk_cache_directory):
1174         (webkit_website_data_manager_get_offline_application_cache_directory):
1175         (webkit_website_data_manager_get_indexeddb_directory):
1176         (webkit_website_data_manager_get_websql_directory):
1177         * UIProcess/API/gtk/WebKitWebsiteDataManager.h: Added.
1178         * UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h: Added.
1179         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
1180         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_website_data_manager_get_type.
1181         * UIProcess/API/gtk/webkit2.h: Include WebKitWebsiteDataManager.h.
1182
1183 2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1184
1185         [GTK] Do not use legacy data store options in WebKit2 GTK+ API
1186         https://bugs.webkit.org/show_bug.cgi?id=146145
1187
1188         Reviewed by Gustavo Noronha Silva.
1189
1190         Use a custom WebsiteDataStore in WebKitWebContext, configured with
1191         the context options, and passed to every page created. This is in
1192         preparation for exposing WebsiteDataStore in the public API.
1193
1194         * PlatformGTK.cmake: Add APIWebsiteDataStore.cpp to compilation.
1195         * UIProcess/API/APIWebsiteDataStore.cpp:
1196         * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
1197         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
1198         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
1199         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
1200         (API::WebsiteDataStore::defaultLocalStorageDirectory):
1201         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
1202         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
1203         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
1204         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
1205         (API::WebsiteDataStore::defaultDataStoreConfiguration):
1206         * UIProcess/API/gtk/WebKitWebContext.cpp:
1207         (websiteDataStoreConfigurationForWebProcessPoolConfiguration):
1208         Helper function to create the WebsiteDataStore configuration with
1209         the WebProcessPool configuration options.
1210         (webkitWebContextConstructed): Do not create a
1211         WebProcessPoolConfiguration with legacy options and create a WebsiteDataStore.
1212         (webkitWebContextCreatePageForWebView): Set the WebsiteDataStore
1213         and session ID in web page configuration.
1214         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1215         (webkitWebViewBaseCreate): Create a WebPageConfiguration for the
1216         given options and pass it to webkitWebViewBaseCreateWebPage.
1217         (webkitWebViewBaseCreateWebPage): It receives now a
1218         WebPageConfiguration, instead of creating it based on the given parameters.
1219         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1220         * UIProcess/gtk/WebProcessPoolGtk.cpp: Use WebsiteDataStore default configuration.
1221         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
1222         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
1223         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
1224         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
1225         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
1226         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
1227
1228 2015-06-24  Anders Carlsson  <andersca@apple.com>
1229
1230         Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
1231         https://bugs.webkit.org/show_bug.cgi?id=146301
1232
1233         Reviewed by Tim Horton.
1234
1235         * UIProcess/ApplicationStateTracker.mm:
1236         (WebKit::hasEntitlement):
1237         (WebKit::isViewService):
1238
1239 2015-06-24  Anders Carlsson  <andersca@apple.com>
1240
1241         WebContent process is unreponsive/idle when WKWebView is inside a view service.
1242         https://bugs.webkit.org/show_bug.cgi?id=146296
1243
1244         Reviewed by Tim Horton.
1245
1246         * Platform/spi/ios/AssertionServicesSPI.h: Renamed from Source/WebKit2/Platform/spi/ios/BKSProcessAssertionSPI.h.
1247         Rename this and add SPI for BKSApplicationStateMonitor.
1248
1249         * Platform/spi/ios/UIKitSPI.h:
1250         Add _UIApplicationIsExtension SPI.
1251
1252         * UIProcess/ApplicationStateTracker.mm:
1253         (WebKit::isViewService):
1254         Return whether we're an extension or the safari view controller service.
1255
1256         (WebKit::isBackgroundState):
1257         Helper function that returns whether a given BKSApplicationState is a background state.
1258
1259         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
1260         If we're a view service, create a BKSApplicationStateMonitor and listen for state changes for our pid.
1261
1262         * UIProcess/ios/ProcessAssertionIOS.mm:
1263         Update #import.
1264
1265         * WebKit2.xcodeproj/project.pbxproj:
1266         Update for rename.
1267
1268 2015-06-24  Matt Rajca  <mrajca@apple.com>
1269
1270         MediaSession: propagate MediaSessionMetadata to WebPageProxy
1271         https://bugs.webkit.org/show_bug.cgi?id=146282
1272
1273         Reviewed by Darin Adler and Tim Horton.
1274
1275         * Shared/WebCoreArgumentCoders.cpp: Added ArgumentEncoder support for MediaSessionMetadata so we can send it
1276           through the web page proxy.
1277         (IPC::ArgumentCoder<MediaSessionMetadata>::encode):
1278         (IPC::ArgumentCoder<MediaSessionMetadata>::decode):
1279         * Shared/WebCoreArgumentCoders.h:
1280         * UIProcess/WebPageProxy.cpp:
1281         (WebKit::WebPageProxy::mediaSessionMetadataDidChange):
1282         * UIProcess/WebPageProxy.h: Receive mediaSessionMetadataDidChange in the web page proxy.
1283         * UIProcess/WebPageProxy.messages.in: Added a new MediaSessionMetadataDidChange message.
1284         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1285         (WebKit::WebChromeClient::mediaSessionMetadataDidChange): Push a mediaSessionMetadataDidChange message through the web page proxy.
1286         * WebProcess/WebCoreSupport/WebChromeClient.h:
1287
1288 2015-06-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
1289
1290         [Mac] A checkmark is briefly visible next to the webpage context menu items when they're clicked
1291         https://bugs.webkit.org/show_bug.cgi?id=146284
1292         <rdar://problem/20297182>
1293
1294         Reviewed by Darin Adler.
1295         
1296         The default value of [NSPopUpButtonCell altersStateOfSelectedItem] is YES.
1297         This makes the popup menu items checkable by default. We need to change the
1298         value of this attribute to NO when creating the popup menu, so the items
1299         are uncheckable. The value of this property needs to change back to YES
1300         if context menu is about selecting an option and not executing a command.
1301         
1302         * UIProcess/mac/WebContextMenuProxyMac.mm:
1303         (WebKit::WebContextMenuProxyMac::populate):
1304
1305 2015-06-24  Brady Eidson  <beidson@apple.com>
1306
1307         Update JavaScript dialog delegates to include a WKSecurityOriginRef argument.
1308         <rdar://problem/21269187> and https://bugs.webkit.org/show_bug.cgi?id=146249
1309
1310         Reviewed by Alex Christensen.
1311
1312         * UIProcess/API/C/WKPage.cpp:
1313         (WKPageSetPageUIClient): Call the new signature if the client has it set.
1314           Otherwise fall back to the old signature.
1315         * UIProcess/API/C/WKPageUIClient.h: Deprecate the old method signature, and add the new
1316           one to the newest V5 client structure.
1317
1318 2015-06-24  Ryuan Choi  <ryuan.choi@navercorp.com>
1319
1320         Remove some dead code from Download
1321         https://bugs.webkit.org/show_bug.cgi?id=146268
1322
1323         Reviewed by Darin Adler.
1324
1325         retrieveDestinationWithSuggestedFilename() was introduced for DownloadCFNetWin.cpp since r77585.
1326         didDecideDestination and others are also introduced for WebKit2 Windows port since r77055.
1327         Since WebKit2 Windows port is dropped, no one uses them now.
1328
1329         * Shared/Downloads/Download.cpp:
1330         (WebKit::Download::decideDestinationWithSuggestedFilename):
1331         (WebKit::Download::retrieveDestinationWithSuggestedFilename): Deleted.
1332         * Shared/Downloads/Download.h:
1333         (WebKit::Download::destination): Deleted.
1334         * Shared/Downloads/ios/DownloadIOS.mm:
1335         (WebKit::Download::didDecideDestination): Deleted.
1336         * Shared/Downloads/mac/DownloadMac.mm:
1337         (WebKit::Download::didDecideDestination): Deleted.
1338         * Shared/Downloads/soup/DownloadSoup.cpp:
1339         (WebKit::Download::didDecideDestination): Deleted.
1340
1341 2015-06-23  Anders Carlsson  <andersca@apple.com>
1342
1343         Fix build.
1344
1345         * UIProcess/ios/ProcessAssertionIOS.mm:
1346         (-[WKProcessAssertionBackgroundTaskManager init]):
1347
1348 2015-06-23  Michael Catanzaro  <mcatanzaro@igalia.com>
1349
1350         [GTK] Crash performing drag-and-drop
1351         https://bugs.webkit.org/show_bug.cgi?id=146267
1352
1353         Reviewed by Darin Adler.
1354
1355         Return early if gtk_get_current_event() returns null to avoid a crash. Note that this does
1356         not fix drag-and-drop. Note also this prevents the web process from forcing the UI process
1357         to crash by sending fake startDrag messages.
1358
1359         * UIProcess/gtk/DragAndDropHandler.cpp:
1360         (WebKit::DragAndDropHandler::startDrag):
1361
1362 2015-06-23  Anders Carlsson  <andersca@apple.com>
1363
1364         Add a class that tracks whether we're a background or foreground application
1365         https://bugs.webkit.org/show_bug.cgi?id=146259
1366         rdar://problem/19833808
1367
1368         Reviewed by Darin Adler.
1369
1370         First step towards being able to send out these notifications for view services.
1371
1372         * UIProcess/ApplicationStateTracker.h: Added.
1373         (WebKit::ApplicationStateTracker::isInBackground):
1374         * UIProcess/ApplicationStateTracker.mm: Added.
1375         (WebKit::ApplicationStateTracker::singleton):
1376         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
1377         (WebKit::ApplicationStateTracker::addListener):
1378         (WebKit::ApplicationStateTracker::applicationDidEnterBackground):
1379         (WebKit::ApplicationStateTracker::applicationWillEnterForeground):
1380         (WebKit::ApplicationStateTracker::invokeListeners):
1381         (WebKit::ApplicationStateTracker::pruneListeners):
1382         * UIProcess/ios/ProcessAssertionIOS.mm:
1383         (-[WKProcessAssertionBackgroundTaskManager init]):
1384         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
1385         (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]):
1386         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]):
1387         (-[WKProcessAssertionBackgroundTaskManager dealloc]): Deleted.
1388         (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]): Deleted.
1389         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]): Deleted.
1390         * UIProcess/ios/WKContentView.h:
1391         * UIProcess/ios/WKContentView.mm:
1392         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
1393         (-[WKContentView isBackground]):
1394         (-[WKContentView _applicationDidEnterBackground]):
1395         (-[WKContentView _applicationWillEnterForeground]):
1396         (-[WKContentView _applicationDidEnterBackground:]): Deleted.
1397         (-[WKContentView _applicationWillEnterForeground:]): Deleted.
1398         * WebKit2.xcodeproj/project.pbxproj:
1399
1400 2015-06-23  Anders Carlsson  <andersca@apple.com>
1401
1402         Remove windowResizerRect code, nobody is using it anymore
1403         https://bugs.webkit.org/show_bug.cgi?id=146265
1404
1405         Reviewed by Beth Dakin.
1406
1407         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1408         (WebKit::WebChromeClient::windowResizerRect): Deleted.
1409         * WebProcess/WebCoreSupport/WebChromeClient.h:
1410         * WebProcess/WebPage/WebPage.cpp:
1411         (WebKit::WebPage::windowResizerRect): Deleted.
1412         * WebProcess/WebPage/WebPage.h:
1413
1414 2015-06-23  Dan Bernstein  <mitz@apple.com>
1415
1416         Restore binary compatibility with iOS 8 Safari after r185877
1417         https://bugs.webkit.org/show_bug.cgi?id=146263
1418
1419         Reviewed by Anders Carlsson.
1420
1421         * Platform/spi/Cocoa: Added.
1422         * Platform/spi/Cocoa/NSInvocationSPI.h: Added.
1423
1424         * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
1425         (-[WKSecurityOrigin methodSignatureForSelector:]): Override to check _WKSecurityOrigin for
1426         possible category methods with the specified selector.
1427         (-[WKSecurityOrigin forwardInvocation:]): Invoke using the implementation of the
1428         _WKSecurityOrigin category method.
1429
1430         * WebKit2.xcodeproj/project.pbxproj:
1431
1432 2015-06-23  Anders Carlsson  <andersca@apple.com>
1433
1434         Add operator! and copy/move constructors to WeakObjCPtr
1435         https://bugs.webkit.org/show_bug.cgi?id=146255
1436
1437         Reviewed by Andreas Kling.
1438
1439         * Shared/mac/WeakObjCPtr.h:
1440         (WebKit::WeakObjCPtr::WeakObjCPtr):
1441         (WebKit::WeakObjCPtr::operator!):
1442
1443 2015-06-23  Antti Koivisto  <antti@apple.com>
1444
1445         CrashTracer: com.apple.WebKit.Networking at JavaScriptCore: WTF::String::isolatedCopy const &
1446         https://bugs.webkit.org/show_bug.cgi?id=146236
1447         rdar://problem/21380700
1448
1449         Reviewed by Andreas Kling.
1450
1451         * NetworkProcess/cache/NetworkCache.cpp:
1452         (WebKit::NetworkCache::Cache::clear):
1453
1454             Don't crash if this is called with network cache disabled.
1455
1456 2015-06-23  Simon Fraser  <simon.fraser@apple.com>
1457
1458         Expose some more rendering progress events, and have MiniBrowser log for each of them
1459         https://bugs.webkit.org/show_bug.cgi?id=146227
1460
1461         Reviewed by Darin Adler.
1462
1463         Add _WKRenderingProgressEventFirstLayoutAfterSuppressedIncrementalRendering and 
1464         _WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering to the private
1465         header, and convert them to/from WebCore milestones.
1466
1467         * Shared/API/Cocoa/_WKRenderingProgressEvents.h:
1468         * Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h:
1469         (renderingProgressEvents):
1470         * UIProcess/API/Cocoa/WKWebView.mm:
1471         (layoutMilestones):
1472
1473 2015-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1474
1475         Unreviewed. Fix GTK+ build after r185876 and r185877.
1476
1477         * UIProcess/API/gtk/WebKitUIClient.cpp:
1478         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
1479         * UIProcess/API/gtk/WebKitWebView.cpp:
1480
1481 2015-06-23  Anders Carlsson  <andersca@apple.com>
1482
1483         Get rid of the window resizer size
1484         https://bugs.webkit.org/show_bug.cgi?id=146240
1485
1486         Reviewed by Darin Adler.
1487
1488         This code was only used by older versions of GTK+, so get rid of it.
1489
1490         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1491         (webkitWebViewBaseNotifyResizerSize): Deleted.
1492         (toplevelWindowResizeGripVisibilityChanged): Deleted.
1493         (webkitWebViewBaseSetToplevelOnScreenWindow): Deleted.
1494         (resizeWebKitWebViewBaseFromAllocation): Deleted.
1495         * UIProcess/WebPageProxy.cpp:
1496         (WebKit::WebPageProxy::setWindowResizerSize): Deleted.
1497         * UIProcess/WebPageProxy.h:
1498         * WebProcess/WebPage/WebPage.cpp:
1499         (WebKit::WebPage::windowResizerRect):
1500         (WebKit::WebPage::setWindowResizerSize): Deleted.
1501         * WebProcess/WebPage/WebPage.h:
1502         * WebProcess/WebPage/WebPage.messages.in:
1503
1504 2015-06-23  Brady Eidson  <beidson@apple.com>
1505
1506         WKFrameInfo should have an accessor for the Frame's current security origin.
1507         https://bugs.webkit.org/show_bug.cgi?id=146162
1508
1509         Reviewed by Dan Bernstein.
1510
1511         This patch:
1512         - Promotes _WKSecurityOrigin to API.
1513         - Makes the WKSecurityOrigin Cocoa API object work with API::SecurityOrigin.
1514         - Adds a WKSecurityOrigin accessor to WKFrameInfo.
1515         - Changes IPC messaging so every handler that calls out with a WKFrameInfo object
1516           gets a relevant SecurityOrigin to wrap.
1517
1518         * Shared/API/APISecurityOrigin.h:
1519         (API::SecurityOrigin::create):
1520         (API::SecurityOrigin::SecurityOrigin):
1521
1522         * Shared/API/Cocoa/WebKit.h:
1523
1524         * Shared/API/c/WKSharedAPICast.h:
1525         (WebKit::toCopiedAPI):
1526
1527         * Shared/Cocoa/APIObject.mm:
1528         (API::Object::newObject):
1529
1530         * Shared/SecurityOriginData.cpp:
1531         (WebKit::SecurityOriginData::fromFrame):
1532         * Shared/SecurityOriginData.h:
1533
1534         * UIProcess/API/APIFrameInfo.cpp:
1535         (API::FrameInfo::FrameInfo):
1536         * UIProcess/API/APIFrameInfo.h:
1537
1538         * UIProcess/API/APINavigationClient.h:
1539         (API::NavigationClient::didFailProvisionalLoadInSubframeWithError):
1540
1541         * UIProcess/API/APIUIClient.h:
1542         (API::UIClient::createNewPage):
1543         (API::UIClient::runJavaScriptAlert):
1544         (API::UIClient::runJavaScriptConfirm):
1545         (API::UIClient::runJavaScriptPrompt):
1546
1547         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1548         (WKApplicationCacheManagerGetApplicationCacheOrigins):
1549
1550         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1551         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
1552
1553         * UIProcess/API/C/WKOriginDataManager.cpp:
1554         (WKOriginDataManagerGetOrigins):
1555
1556         * UIProcess/API/C/WKPage.cpp:
1557         (WKPageSetPageUIClient):
1558         (WKPageSetPageNavigationClient):
1559
1560         * UIProcess/API/C/WKResourceCacheManager.cpp:
1561         (WKResourceCacheManagerGetCacheOrigins):
1562
1563         * UIProcess/API/Cocoa/WKFrameInfo.h:
1564         * UIProcess/API/Cocoa/WKFrameInfo.mm:
1565         (-[WKFrameInfo securityOrigin]):
1566
1567         * UIProcess/API/Cocoa/WKSecurityOrigin.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.h.
1568         * UIProcess/API/Cocoa/WKSecurityOrigin.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.mm.
1569         (-[WKSecurityOrigin dealloc]):
1570         (-[WKSecurityOrigin description]):
1571         (-[WKSecurityOrigin protocol]):
1572         (-[WKSecurityOrigin host]):
1573         (-[WKSecurityOrigin port]):
1574         (-[WKSecurityOrigin _apiObject]):
1575         * UIProcess/API/Cocoa/WKSecurityOriginInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOriginInternal.h.
1576         (API::wrapper):
1577
1578         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1579
1580         * UIProcess/API/Cocoa/WKUserContentController.mm:
1581
1582         * UIProcess/API/Cocoa/_WKSecurityOrigin.h:
1583         * UIProcess/API/Cocoa/_WKSecurityOrigin.mm:
1584         (-[_WKSecurityOrigin _initWithSecurityOrigin:]): Deleted.
1585         (-[_WKSecurityOrigin protocol]): Deleted.
1586         (-[_WKSecurityOrigin host]): Deleted.
1587         (-[_WKSecurityOrigin port]): Deleted.
1588
1589         * UIProcess/Cocoa/NavigationState.h:
1590         * UIProcess/Cocoa/NavigationState.mm:
1591         (WebKit::NavigationState::NavigationClient::didFailProvisionalLoadInSubframeWithError):
1592
1593         * UIProcess/Cocoa/UIDelegate.h:
1594         * UIProcess/Cocoa/UIDelegate.mm:
1595         (WebKit::UIDelegate::UIClient::createNewPage):
1596         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
1597         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
1598         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
1599         (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
1600         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
1601
1602         * UIProcess/UserContent/WebScriptMessageHandler.h:
1603
1604         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1605         (WebKit::WebUserContentControllerProxy::didPostMessage):
1606         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1607         * UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
1608
1609         * UIProcess/WebPageProxy.cpp:
1610         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1611         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1612         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1613         (WebKit::WebPageProxy::decidePolicyForResponse):
1614         (WebKit::WebPageProxy::decidePolicyForResponseSync):
1615         (WebKit::WebPageProxy::createNewPage):
1616         (WebKit::WebPageProxy::runJavaScriptAlert):
1617         (WebKit::WebPageProxy::runJavaScriptConfirm):
1618         (WebKit::WebPageProxy::runJavaScriptPrompt):
1619         * UIProcess/WebPageProxy.h:
1620         * UIProcess/WebPageProxy.messages.in:
1621
1622         * WebKit2.xcodeproj/project.pbxproj:
1623
1624         * WebProcess/UserContent/WebUserContentController.cpp:
1625         (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
1626
1627         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1628         (WebKit::WebChromeClient::createWindow):
1629         (WebKit::WebChromeClient::runJavaScriptAlert):
1630         (WebKit::WebChromeClient::runJavaScriptConfirm):
1631         (WebKit::WebChromeClient::runJavaScriptPrompt):
1632
1633         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1634         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1635         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1636         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1637         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1638
1639 2015-06-23  Dan Bernstein  <mitz@apple.com>
1640
1641         <rdar://problem/21342465> Make -[WKWebView _certificateChain] public.
1642         https://bugs.webkit.org/show_bug.cgi?id=145886
1643
1644         Reviewed by Sam Weinig.
1645
1646         * Shared/WebCertificateInfo.h:
1647         (WebKit::WebCertificateInfo::create): Changed to return a Ref rather than a PassRefPtr.
1648
1649         * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
1650         PageLoadState::Observer functions to PageLoadStateObserver.
1651
1652         * UIProcess/API/Cocoa/WKProcessGroup.mm:
1653         (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Updated for change to
1654         WebCertificateInfo::create.
1655
1656         * UIProcess/API/Cocoa/WKProcessPool.mm:
1657         (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto.
1658
1659         * UIProcess/API/Cocoa/WKWebView.h: Declared new certificateChain property on WKWebView.
1660
1661         * UIProcess/API/Cocoa/WKWebView.mm:
1662         (-[WKWebView certificateChain]): Added. Returns the certificate chain from the page load
1663         state, or an empty array if there is no certificate chain.
1664
1665         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Deprecated _certificateChain.
1666
1667         * UIProcess/Cocoa/NavigationState.h: Declared overrides of new PageLoadState::Observer
1668         functions.
1669         * UIProcess/Cocoa/NavigationState.mm:
1670         (WebKit::NavigationState::willChangeCertificateInfo): Override to call
1671         -willChangeValueForKey:.
1672         (WebKit::NavigationState::didChangeCertificateInfo): Override to call
1673         -didChangeValueForKey:.
1674
1675         * UIProcess/PageLoadState.cpp:
1676         (WebKit::PageLoadState::commitChanges): Call the new observer functions
1677         willChangeCertificateInfo and didChangeCertificateInfo.
1678         (WebKit::PageLoadState::didCommitLoad): Added new certificateInfo parameter, which is stored
1679         in the uncommitted state.
1680         * UIProcess/PageLoadState.h:
1681         (WebKit::PageLoadState::certificateInfo): Added this getter.
1682
1683         * UIProcess/WebFrameProxy.cpp:
1684         (WebKit::WebFrameProxy::didCommitLoad): Changed the parameter type from
1685         WebCore::CertificateInfo to WebCertificateInfo.
1686         * UIProcess/WebFrameProxy.h:
1687
1688         * UIProcess/WebPageProxy.cpp:
1689         (WebKit::WebPageProxy::didCommitLoadForFrame): Pass the certificate info to
1690         PageLoadState::didCommitLoad.
1691
1692 2015-06-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1693
1694         [EFL][CustomProtocol] Do not add duplicated custom scheme
1695         https://bugs.webkit.org/show_bug.cgi?id=146199
1696
1697         Reviewed by Carlos Garcia Campos.
1698
1699         WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol generates
1700         a crash when duplicated scheme is registered on debug mode, or just registers it on release mode.
1701         However application can register duplicate scheme by mistake or on purpose. Thus it would be good
1702         if we don't register it instead of registering it or generating a crash when trying to regiseter
1703         duplicated scheme.
1704
1705         EFL port want to allow user to change registered callback, thus EWK2ContextTest::ewk_context_url_scheme_register()
1706         is modified to test it.
1707
1708         Test: ewk_context_url_scheme_register() in test_ewk2_context.cpp.
1709
1710         * UIProcess/API/efl/ewk_context.h: Added a comment to replace registered callback.
1711         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1712         (EWK2ContextTest::schemeRequestCallback1):
1713         (EWK2ContextTest::schemeRequestCallback2):
1714         (TEST_F):
1715         (EWK2ContextTest::schemeRequestCallback): Deleted.
1716         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
1717         (WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
1718
1719 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1720
1721         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.
1722
1723         * gtk/NEWS: Add release notes for 2.9.3.
1724
1725 2015-06-22  Dan Bernstein  <mitz@apple.com>
1726
1727         Part 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
1728         https://bugs.webkit.org/show_bug.cgi?id=146197
1729
1730         Rubber-stamped by Anders Carlsson.
1731
1732         * WebKit2.xcodeproj/project.pbxproj: Deleted the WebKit2SandboxProfiles-IOSOverride target.
1733
1734 2015-06-22  Dean Jackson  <dino@apple.com>
1735
1736         Rename PlatformCA*Mac to PlatformCA*Cocoa
1737         https://bugs.webkit.org/show_bug.cgi?id=146224
1738         <rdar://problem/21497182>
1739
1740         Reviewed by Simon Fraser.
1741
1742         Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
1743         to the more accurate Cocoa suffix.
1744
1745         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1746         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1747         (WebKit::PlatformCALayerRemote::filtersCanBeComposited):
1748         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1749         (WebKit::PlatformCALayerRemoteCustom::create):
1750         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1751         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1752         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1753
1754 2015-06-22  Anders Carlsson  <andersca@apple.com>
1755
1756         Simplify Connection::SyncMessageState
1757         https://bugs.webkit.org/show_bug.cgi?id=146213
1758
1759         Reviewed by Andreas Kling.
1760
1761         Since we no longer support Connections dispatching to multiple threads, we can make SyncMessageState
1762         into a singleton and get rid of the RunLoop -> SyncMessageState hash map.
1763
1764         * Platform/IPC/Connection.cpp:
1765         (IPC::Connection::SyncMessageState::singleton):
1766         (IPC::Connection::SyncMessageState::SyncMessageState):
1767         (IPC::Connection::SyncMessageState::processIncomingMessage):
1768         (IPC::Connection::SyncMessageState::dispatchMessages):
1769         (IPC::Connection::waitForSyncReply):
1770         (IPC::Connection::processIncomingSyncReply):
1771         (IPC::Connection::processIncomingMessage):
1772         (IPC::Connection::connectionDidClose):
1773         (IPC::Connection::SyncMessageState::syncMessageStateMap): Deleted.
1774         (IPC::Connection::SyncMessageState::syncMessageStateMapMutex): Deleted.
1775         (IPC::Connection::SyncMessageState::getOrCreate): Deleted.
1776         (IPC::Connection::SyncMessageState::~SyncMessageState): Deleted.
1777         (IPC::Connection::Connection): Deleted.
1778         * Platform/IPC/Connection.h:
1779
1780 2015-06-20  Alex Christensen  <achristensen@webkit.org>
1781
1782         [Content Extensions] Add SPI to reload without content blocking.
1783         https://bugs.webkit.org/show_bug.cgi?id=146128
1784         rdar://problem/20351903
1785
1786         Reviewed by Sam Weinig.
1787
1788         * Shared/WebPageCreationParameters.cpp:
1789         (WebKit::WebPageCreationParameters::encode):
1790         (WebKit::WebPageCreationParameters::decode):
1791         * Shared/WebPageCreationParameters.h:
1792         * UIProcess/API/C/WKPage.cpp:
1793         (WKPageSetCustomUserAgent):
1794         (WKPageSetUserContentExtensionsEnabled):
1795         (WKPageSupportsTextEncoding):
1796         * UIProcess/API/C/WKPage.h:
1797         * UIProcess/API/Cocoa/WKWebView.mm:
1798         (-[WKWebView _customUserAgent]):
1799         (-[WKWebView _setUserContentExtensionsEnabled:]):
1800         (-[WKWebView _userContentExtensionsEnabled]):
1801         (-[WKWebView _setCustomUserAgent:]):
1802         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1803         * UIProcess/WebPageProxy.cpp:
1804         (WebKit::WebPageProxy::creationParameters):
1805         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
1806         (WebKit::WebPageProxy::setUserContentExtensionsEnabled):
1807         * UIProcess/WebPageProxy.h:
1808         (WebKit::WebPageProxy::userContentExtensionsEnabled):
1809         * WebProcess/WebPage/WebPage.cpp:
1810         (WebKit::WebPage::WebPage):
1811         (WebKit::WebPage::reinitializeWebPage):
1812         (WebKit::WebPage::setShouldScaleViewToFitDocument):
1813         (WebKit::WebPage::setUserContentExtensionsEnabled):
1814         * WebProcess/WebPage/WebPage.h:
1815         * WebProcess/WebPage/WebPage.messages.in:
1816         Pass a boolean from the API to WebCore.
1817
1818 2015-06-22  Anders Carlsson  <andersca@apple.com>
1819
1820         Remove m_clientRunLoop from IPC::Connection
1821         https://bugs.webkit.org/show_bug.cgi?id=146212
1822
1823         Reviewed by Sam Weinig.
1824
1825         We only ever create connections whose messages are dispatched to the main run loop, so we can 
1826         vastly simplify the code by only allowing messages to be dispatched there.
1827
1828         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1829         (WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
1830         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1831         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
1832         * Platform/IPC/Connection.cpp:
1833         (IPC::Connection::createServerConnection):
1834         (IPC::Connection::createClientConnection):
1835         (IPC::Connection::Connection):
1836         (IPC::Connection::addWorkQueueMessageReceiver):
1837         (IPC::Connection::removeWorkQueueMessageReceiver):
1838         (IPC::Connection::waitForMessage):
1839         (IPC::Connection::sendSyncMessage):
1840         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1841         (IPC::Connection::processIncomingMessage):
1842         (IPC::Connection::connectionDidClose):
1843         (IPC::Connection::dispatchDidReceiveInvalidMessage):
1844         (IPC::Connection::enqueueIncomingMessage):
1845         (IPC::Connection::wakeUpRunLoop):
1846         * Platform/IPC/Connection.h:
1847         * Platform/IPC/mac/ConnectionMac.mm:
1848         (IPC::Connection::receiveSourceEventHandler):
1849         * PluginProcess/WebProcessConnection.cpp:
1850         (WebKit::WebProcessConnection::WebProcessConnection):
1851         * Shared/ChildProcess.cpp:
1852         (WebKit::ChildProcess::initialize):
1853         * Shared/ChildProcessProxy.cpp:
1854         (WebKit::ChildProcessProxy::didFinishLaunching):
1855         * UIProcess/Plugins/PluginProcessProxy.cpp:
1856         (WebKit::PluginProcessProxy::didFinishLaunching):
1857         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
1858         (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
1859         * WebProcess/Network/NetworkProcessConnection.cpp:
1860         (WebKit::NetworkProcessConnection::NetworkProcessConnection):
1861         * WebProcess/Plugins/PluginProcessConnection.cpp:
1862         (WebKit::PluginProcessConnection::PluginProcessConnection):
1863         * WebProcess/WebPage/WebInspector.cpp:
1864         (WebKit::WebInspector::createInspectorPage):
1865         * WebProcess/WebPage/WebInspectorUI.cpp:
1866         (WebKit::WebInspectorUI::establishConnection):
1867
1868 2015-06-22  Anders Carlsson  <andersca@apple.com>
1869
1870         Crashes in hit testing under WebPage::acceptsFirstMouse() while handling sync message in plug-in teardown
1871         https://bugs.webkit.org/show_bug.cgi?id=146211
1872         rdar://problem/17180615
1873
1874         Reviewed by Sam Weinig.
1875
1876         If we're inside a sendSync message when we're being called, just bail.
1877
1878         * WebProcess/WebPage/mac/WebPageMac.mm:
1879         (WebKit::WebPage::acceptsFirstMouse):
1880
1881 2015-06-22  Dan Bernstein  <mitz@apple.com>
1882
1883         Part 1 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
1884         https://bugs.webkit.org/show_bug.cgi?id=146197
1885
1886         Reviewed by Anders Carlsson.
1887
1888         * Configurations/SandboxProfiles.xcconfig: Added. Defines INSTALL_PATH based on the value
1889         of WK_INSTALL_OVERRIDE_SANDBOX_PROFILES.
1890         * WebKit2.xcodeproj/project.pbxproj: Use SandboxProfiles.xcconfig for the Sandbox Profiles
1891         target, and change the destination path in its Copy Files build phase to INSTALL_PATH.
1892
1893 2015-06-22  Antti Koivisto  <antti@apple.com>
1894
1895         Crash replacing TabDocument in MobileSafari at WebKit: -[WKWebView(WKPrivate) _beginAnimatedResizeWithUpdates:]
1896         https://bugs.webkit.org/show_bug.cgi?id=146201
1897
1898         Reviewed by Dan Bernstein.
1899
1900         * UIProcess/API/Cocoa/WKWebView.mm:
1901         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1902
1903         No repro but if for some reason [_contentView bounds] width is zero we'll compute +Inf targetScale
1904         and then NaN contentOffset.x. Verified in lldb that this gives the exact crash signature seen.
1905
1906         Fix by checking that [_contentView bounds] is not empty like is done with other inputs.
1907
1908 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1909
1910         REGRESSION(r182303): [GTK] Context menu API is broken since r182303
1911         https://bugs.webkit.org/show_bug.cgi?id=146202
1912
1913         Reviewed by Žan Doberšek.
1914
1915         The problem is that ContextMenuclient API changed in r182303, but
1916         we didn't notice it either, and the default handler for
1917         getContextMenuFromProposedMenu was executed. An override keyword
1918         would have caught this.
1919
1920         * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Build a Vector of
1921         WebContextMenuItemData as expected by our API, and add add
1922         override keyword to ensure this doesn't happen again.
1923
1924 2015-06-22  Zan Dobersek  <zdobersek@igalia.com>
1925
1926         [WK2] ConnectionUnix should use FastMalloc to allocate on-heap resources
1927         https://bugs.webkit.org/show_bug.cgi?id=146143
1928
1929         Reviewed by Carlos Garcia Campos.
1930
1931         IPC handling in Unix-specific IPC::Connection implementation should use
1932         FastMalloc to allocate on-heap resources, instead of allocating via the
1933         system allocator.
1934
1935         The AttachmentInfo class is marked as allocatable through FastMalloc.
1936         That way it can be allocated through FastMalloc while still handled
1937         through std::unique_ptr<>.
1938
1939         The char[] arrays in readBytesFromSocket() and Connection::sendOutgoingMessage()
1940         are now handled through a MallocPtr<> object.
1941
1942         In Connection::sendOutgoingMessage(), both the AttachmentInfo[] and char[]
1943         arrays are now only allocated if there are actual attachments contained
1944         in the message. The code that's conditioned with a non-empty attachments
1945         Vector is now also grouped together, in a single branch.
1946
1947         * Platform/IPC/unix/ConnectionUnix.cpp:
1948         (IPC::readBytesFromSocket):
1949         (IPC::Connection::sendOutgoingMessage):
1950
1951 2015-06-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1952
1953         [EFL] test_ewk2_application_cache_manager has been failed since r185527
1954         https://bugs.webkit.org/show_bug.cgi?id=146016
1955
1956         Reviewed by Csaba Osztrogonác.
1957
1958         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
1959         (TEST_F): Disable this test for now. This test will be enabled again.
1960
1961 2015-06-16  Gavin Barraclough  <barraclough@apple.com>
1962
1963         Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
1964         https://bugs.webkit.org/show_bug.cgi?id=146198
1965
1966         Unreviewed rollout.
1967
1968         * UIProcess/API/gtk/WebKitWebContext.cpp:
1969         (webkit_web_context_prefetch_dns):
1970
1971 2015-06-21  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1972
1973         WKApplicationCacheManagerDeleteEntriesForOrigin() has wrong WebsiteDataTypes.
1974         https://bugs.webkit.org/show_bug.cgi?id=146180
1975
1976         Reviewed by Sam Weinig.
1977
1978         Modify to use correct WebsiteDataTypes in WKApplicationCacheManagerDeleteEntriesForOrigin()
1979
1980         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1981         (WKApplicationCacheManagerDeleteEntriesForOrigin):
1982
1983 2015-06-21  Dan Bernstein  <mitz@apple.com>
1984
1985         <rdar://problem/21444762> REGRESSION (r184215): Plug-in services crash on launch on Yosemite
1986         https://bugs.webkit.org/show_bug.cgi?id=146195
1987
1988         Reviewed by Sam Weinig.
1989
1990         * Configurations/PluginService.32.xcconfig: Changed the Yosemite definition of
1991         INFOPLIST_FILE such that it would also apply to the macosx10.10.internal SDK.
1992         * Configurations/PluginService.64.xcconfig: Ditto.
1993
1994 2015-06-21  Dan Bernstein  <mitz@apple.com>
1995
1996         Build fix.
1997
1998         * Shared/API/Cocoa/WKFoundation.h: Don’t use generics if the SDK doesn’t support them.
1999
2000 2015-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2001
2002         [SOUP] Use GTask in WebKitSoupRequestInputStream
2003         https://bugs.webkit.org/show_bug.cgi?id=146184
2004
2005         Reviewed by Carlos Garcia Campos.
2006
2007         Replace deprecated use of GSimpleAsyncResult with GTask.
2008
2009         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2010         (AsyncReadData::AsyncReadData):
2011         (webkitSoupRequestInputStreamReadAsyncResultComplete):
2012         (webkitSoupRequestInputStreamPendingReadAsyncComplete):
2013         (webkitSoupRequestInputStreamReadAsync):
2014         (webkitSoupRequestInputStreamReadFinish):
2015
2016 2015-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2017
2018         Fix format strings in NetworkCache.cpp and NetworkCacheStatistics.cpp and WebIDBServerConnection.cpp
2019         https://bugs.webkit.org/show_bug.cgi?id=146172
2020
2021         Reviewed by Darin Adler.
2022
2023         Use the correct %"PRIu64" and %"PRIi64" for uint64_t and int64_t, instead of %llu and %lli.
2024
2025         * NetworkProcess/cache/NetworkCache.cpp:
2026         (WebKit::NetworkCache::Cache::retrieve):
2027         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2028         (WebKit::NetworkCache::Statistics::initialize):
2029         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
2030         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
2031         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
2032         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
2033         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2034         (WebKit::WebIDBServerConnection::deleteDatabase):
2035         (WebKit::WebIDBServerConnection::didDeleteDatabase):
2036         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
2037         (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
2038         (WebKit::WebIDBServerConnection::openTransaction):
2039         (WebKit::WebIDBServerConnection::didOpenTransaction):
2040         (WebKit::WebIDBServerConnection::beginTransaction):
2041         (WebKit::WebIDBServerConnection::didBeginTransaction):
2042         (WebKit::WebIDBServerConnection::commitTransaction):
2043         (WebKit::WebIDBServerConnection::didCommitTransaction):
2044         (WebKit::WebIDBServerConnection::resetTransaction):
2045         (WebKit::WebIDBServerConnection::didResetTransaction):
2046         (WebKit::WebIDBServerConnection::rollbackTransaction):
2047         (WebKit::WebIDBServerConnection::didRollbackTransaction):
2048         (WebKit::WebIDBServerConnection::createObjectStore):
2049         (WebKit::WebIDBServerConnection::didCreateObjectStore):
2050         (WebKit::WebIDBServerConnection::createIndex):
2051         (WebKit::WebIDBServerConnection::didCreateIndex):
2052         (WebKit::WebIDBServerConnection::deleteIndex):
2053         (WebKit::WebIDBServerConnection::didDeleteIndex):
2054         (WebKit::WebIDBServerConnection::get):
2055         (WebKit::WebIDBServerConnection::put):
2056         (WebKit::WebIDBServerConnection::didPutRecord):
2057         (WebKit::WebIDBServerConnection::didGetRecord):
2058         (WebKit::WebIDBServerConnection::didOpenCursor):
2059         (WebKit::WebIDBServerConnection::didAdvanceCursor):
2060         (WebKit::WebIDBServerConnection::didIterateCursor):
2061         (WebKit::WebIDBServerConnection::count):
2062         (WebKit::WebIDBServerConnection::didCount):
2063         (WebKit::WebIDBServerConnection::deleteRange):
2064         (WebKit::WebIDBServerConnection::didDeleteRange):
2065         (WebKit::WebIDBServerConnection::clearObjectStore):
2066         (WebKit::WebIDBServerConnection::didClearObjectStore):
2067         (WebKit::WebIDBServerConnection::deleteObjectStore):
2068         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
2069         (WebKit::WebIDBServerConnection::changeDatabaseVersion):
2070         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
2071         (WebKit::WebIDBServerConnection::openCursor):
2072         (WebKit::WebIDBServerConnection::cursorAdvance):
2073         (WebKit::WebIDBServerConnection::cursorIterate):
2074
2075 2015-06-20  Tim Horton  <timothy_horton@apple.com>
2076
2077         Deselection of text causes a noticeable jump on force touch machines
2078         https://bugs.webkit.org/show_bug.cgi?id=146173
2079         <rdar://problem/20992842>
2080
2081         Reviewed by Sam Weinig.
2082
2083         * Shared/WebCoreArgumentCoders.cpp:
2084         (IPC::ArgumentCoder<TextIndicatorData>::encode):
2085         (IPC::ArgumentCoder<TextIndicatorData>::decode):
2086         Encode/decode wantsMargin.
2087
2088         * WebProcess/WebPage/mac/WebPageMac.mm:
2089         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
2090         (WebKit::textIndicatorTransitionForImmediateAction): Deleted.
2091         Get rid of TextIndicatorPresentationTransition::Crossfade.
2092
2093 2015-06-20  Dan Bernstein  <mitz@apple.com>
2094
2095         [Cocoa] Actually use Objective-C lightweight generics when the compiler supports them
2096         https://bugs.webkit.org/show_bug.cgi?id=146183
2097
2098         Reviewed by Sam Weinig.
2099
2100         * Shared/API/Cocoa/WKFoundation.h: When the compiler supports Objective-C generics, define
2101         WK_ARRAY and WK_SET to use them. Also added a definition of WK_DICTIONARY.
2102
2103         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Use WK_DICTIONARY for the options dictionary of
2104         -_loadRequest:withOptions:.
2105
2106         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2107         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]): Made the completion
2108         halder type match the declaration, now that NSArray and WK_ARRAY(WKWebsiteDataRecord *) are
2109         not the same.
2110
2111         * mac/postprocess-framework-headers.sh: Also rewrite WK_DICTIONARY.
2112
2113 2015-06-20  Chris Dumez  <cdumez@apple.com>
2114
2115         [WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible
2116         https://bugs.webkit.org/show_bug.cgi?id=146179
2117         <rdar://problem/20923432>
2118
2119         Reviewed by Tim Horton.
2120
2121         After r170787, viewStateChange() would cause a synchronous IPC between
2122         the UIProcess and the WebProcess when the view becomes visible. This
2123         was to avoid painting empty / black tiles when unsuspending the
2124         WebProcess on tab switch, in the event volatile IOSurfaces were purged.
2125
2126         However, this sync IPC can have performance implications and is not
2127         needed when the content is not actually visible yet (e.g.
2128         hideContentUntilNextUpdate() was called, or the tab was killed).
2129
2130         This patch avoids the synchronous IPC when the content is hidden and
2131         exposes a private API on WKWebView so that clients can ask for the
2132         content to be hidden until the next update. This would allow for
2133         clients to avoid the synchronous IPC if they don't need the content
2134         to be displayed synchronously (e.g. the view is obscured).
2135
2136         * UIProcess/API/Cocoa/WKWebView.mm:
2137         (-[WKWebView _hideContentUntilNextUpdate]):
2138         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2139         * UIProcess/DrawingAreaProxy.h:
2140         (WebKit::DrawingAreaProxy::hasVisibleContent):
2141         * UIProcess/WebPageProxy.cpp:
2142         (WebKit::WebPageProxy::dispatchViewStateChange):
2143         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2144         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2145         (WebKit::RemoteLayerTreeDrawingAreaProxy::isContentHidden):
2146
2147 2015-06-20  Michael Catanzaro  <mcatanzaro@igalia.com>
2148
2149         Check for SHA1 certificates ignores subresources
2150         https://bugs.webkit.org/show_bug.cgi?id=146159
2151
2152         Reviewed by Dan Bernstein.
2153
2154         * UIProcess/WebPageProxy.cpp:
2155         (WebKit::WebPageProxy::didCommitLoadForFrame): Call
2156         PageLoadState::didDisplayOrRunInsecureContent if a certificate chain contains a non-root
2157         SHA1 certificate when the frame is not the main frame.
2158
2159 2015-06-20  Dan Bernstein  <mitz@apple.com>
2160
2161         Added availability information to a recently-added delegate method.
2162
2163         Suggested by Alexey Proskuryakov and Anders Carlsson.
2164
2165         * UIProcess/API/Cocoa/WKUIDelegate.h: Annotated -webViewDidClose:.
2166
2167 2015-06-20  Ryuan Choi  <ryuan.choi@navercorp.com>
2168
2169         [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
2170         https://bugs.webkit.org/show_bug.cgi?id=146171
2171
2172         Reviewed by Gyuyoung Kim.
2173
2174         * PlatformEfl.cmake:
2175         Do not define SOURCE_DIR when DEVELOPER_MODE is OFF for seccomp filter
2176         not to allow jhbuild directory.
2177         * Shared/efl/ProcessExecutablePathEfl.cpp:
2178         (WebKit::findProcessPath): Guard test code to ENABLE(DEVELOPER_MODE).
2179
2180 2015-06-18  Myles C. Maxfield  <mmaxfield@apple.com>
2181
2182         REGRESSION(r185475): [Mac] ASSERT() when clicking on text using web fonts with force touch trackpad
2183         https://bugs.webkit.org/show_bug.cgi?id=145890
2184         <rdar://problem/21390877>
2185
2186         Reviewed by Darin Adler and Tim Horton.
2187
2188         The best place to stop the serialization of unserializable fonts is inside WebKit2's IPC code. We want
2189         this logic to occur when encoding an NSAttributedString, rather than when encoding an NSDictionary,
2190         because changing the shape of an NSAttributedString is less likely to result in problems rather than
2191         changing the shape of an NSDictionary.
2192
2193         * Shared/mac/ArgumentCodersMac.mm:
2194         (IPC::fontIsSerializable):
2195         (IPC::filterUnserializableValues):
2196         (IPC::encode):
2197
2198 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2199
2200         [SOUP] Fix return-type-c-linkage warning after r185553
2201         https://bugs.webkit.org/show_bug.cgi?id=146014
2202
2203         Reviewed by Martin Robinson.
2204
2205         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
2206         (WebKit::CustomProtocolManagerImpl::start): webkitSoupRequestGenericGetRequest now returns
2207         a pointer rather than a reference.
2208
2209 2015-06-19  Brady Eidson  <beidson@apple.com>
2210
2211         Rename WKSecurityOrigin.h/cpp to WKSecurityOriginRef.h/cpp.
2212         https://bugs.webkit.org/show_bug.cgi?id=146152
2213
2214         Reviewed by Dan Bernstein.
2215
2216         * CMakeLists.txt:
2217
2218         * Shared/API/c/WKSecurityOriginRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp.
2219         * Shared/API/c/WKSecurityOriginRef.h: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.h.
2220
2221         * UIProcess/API/efl/ewk_security_origin.cpp:
2222         * UIProcess/API/efl/ewk_storage_manager.cpp:
2223
2224         * WebKit2.xcodeproj/project.pbxproj:
2225
2226 2015-06-18  Brent Fulgham  <bfulgham@apple.com>
2227
2228         [iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
2229         https://bugs.webkit.org/show_bug.cgi?id=145318
2230         <rdar://problem/21081501>
2231
2232         Reviewed by Simon Fraser.
2233
2234         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2235         (ArgumentCoder<ScrollingStateScrollingNode>::encode): Handle scroll snap point offset indices.
2236         (ArgumentCoder<ScrollingStateScrollingNode>::decode): Ditto.
2237         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2238         (WebKit::RemoteScrollingCoordinatorProxy::currentSnapPointIndicesDidChange): Added. Send message
2239         to WebProcess when scroll snap indices have changed.
2240         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2241         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2242         (WebKit::RemoteScrollingTree::currentSnapPointIndicesDidChange): Added. Notify the
2243         RemoteScrollingCoordinatorProxy when scroll snap indices have changed.
2244         * UIProcess/Scrolling/RemoteScrollingTree.h:
2245         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2246         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2247         (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Revised.
2248         Identify changes in the current scroll snap point offset index (in either the horizontal or vertical
2249         directions), and send a notification when this happens.
2250         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::currentSnapPointIndicesDidChange): Added. Notify the
2251         Scrolling Tree when indices changed.
2252         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2253         (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Revised. Always compute
2254         the new scroll snap offset index (even when we will rubber band).
2255         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
2256         * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in: Add a new message to relay changes in scroll
2257         snap index.
2258         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
2259         (WebKit::RemoteScrollingCoordinator::currentSnapPointIndicesChangedForNode): Added.
2260
2261 2015-06-19  Jeremy Jones  <jeremyj@apple.com>
2262
2263         Revert switch to _synchronizedDrawingFence.
2264         https://bugs.webkit.org/show_bug.cgi?id=146136
2265         <rdar://problem/21227992>
2266
2267         Reviewed by Simon Fraser.
2268
2269         Revert _synchronizedDrawingFence code path that leaks a port.
2270
2271         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2272         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2273
2274 2015-06-19  Anders Carlsson  <andersca@apple.com>
2275
2276         Address review feedback from Darin.
2277
2278         * Shared/mac/HangDetectionDisablerMac.mm:
2279         (WebKit::clientsMayIgnoreEvents):
2280
2281 2015-06-19  Anders Carlsson  <andersca@apple.com>
2282
2283         Disable SpinTracer detection while loading sync XHR
2284         https://bugs.webkit.org/show_bug.cgi?id=146150
2285         rdar://problem/21462023
2286
2287         Reviewed by Dan Bernstein.
2288
2289         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2290         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
2291
2292 2015-06-19  Anders Carlsson  <andersca@apple.com>
2293
2294         Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
2295         https://bugs.webkit.org/show_bug.cgi?id=146124
2296         rdar://problem/21449395
2297
2298         Reviewed by Geoffrey Garen.
2299
2300         Add a HangDetectionDisabler RAII object and use it for JavaScript panels.
2301
2302         * Shared/HangDetectionDisabler.h: Added.
2303         (WebKit::HangDetectionDisabler::HangDetectionDisabler):
2304         (WebKit::HangDetectionDisabler::~HangDetectionDisabler):
2305         * Shared/mac/HangDetectionDisablerMac.mm: Added.
2306         (WebKit::clientsMayIgnoreEvents):
2307         (WebKit::setClientsMayIgnoreEvents):
2308         (WebKit::HangDetectionDisabler::HangDetectionDisabler):
2309         (WebKit::HangDetectionDisabler::~HangDetectionDisabler):
2310         * WebKit2.xcodeproj/project.pbxproj:
2311         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2312         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2313         (WebKit::WebChromeClient::runJavaScriptAlert):
2314         (WebKit::WebChromeClient::runJavaScriptConfirm):
2315         (WebKit::WebChromeClient::runJavaScriptPrompt):
2316
2317 2015-06-19  Dan Bernstein  <mitz@apple.com>
2318
2319         Fixed the build for platforms that don’t have SafariServices.
2320
2321         * UIProcess/ios/WKContentViewInteraction.mm:
2322         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2323         (-[WKContentView commitPreviewViewController:]):
2324         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2325
2326 2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
2327
2328         Remove unnecessary svn:executable flags
2329         https://bugs.webkit.org/show_bug.cgi?id=146107
2330
2331         Reviewed by Alexey Proskuryakov.
2332
2333         * UIProcess/API/efl/EwkView.cpp: Removed property svn:executable.
2334
2335 2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
2336
2337         [WK2] Fix unused-private-field warning in WebProcess/Plugins/PluginView.<h|cpp>
2338         https://bugs.webkit.org/show_bug.cgi?id=145252
2339
2340         Reviewed by Tim Horton.
2341
2342         * WebProcess/Plugins/PluginView.cpp:
2343         (WebKit::PluginView::PluginView): Added the necessary ifdef guard.
2344         * WebProcess/Plugins/PluginView.h: Added the necessary ifdef guard.
2345         * WebProcess/WebPage/WebPage.h: Moved the definition of ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC to WTF.
2346
2347 2015-06-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2348
2349         Do not store configuration parameters twice in WebProcessPool
2350         https://bugs.webkit.org/show_bug.cgi?id=146102
2351
2352         Reviewed by Sam Weinig.
2353
2354         Since we are copying the given WebProcessPoolConfiguration and
2355         keeping it as a member, we don't need to keep an additional copy
2356         of its contents as extra members. This also prevents
2357         inconsistencies between the values in the configuration and the
2358         members when any of them are modified by WebProcessPool API.
2359
2360         * UIProcess/API/APIProcessPoolConfiguration.h: Return a const
2361         reference instead of a temporary in methods returning a String.
2362         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2363         (WebKit::WebProcessPool::updateProcessSuppressionState):
2364         (WebKit::WebProcessPool::platformInitializeWebProcess):
2365         * UIProcess/WebProcessPool.cpp:
2366         (WebKit::WebProcessPool::setProcessModel):
2367         (WebKit::WebProcessPool::setMaximumNumberOfProcesses):
2368         (WebKit::WebProcessPool::networkingProcessConnection):
2369         (WebKit::WebProcessPool::languageChanged):
2370         (WebKit::WebProcessPool::setUsesNetworkProcess):
2371         (WebKit::WebProcessPool::usesNetworkProcess):
2372         (WebKit::WebProcessPool::ensureNetworkProcess):
2373         (WebKit::WebProcessPool::ensureDatabaseProcess):
2374         (WebKit::WebProcessPool::ensureSharedWebProcess):
2375         (WebKit::WebProcessPool::createNewWebProcess):
2376         (WebKit::WebProcessPool::warmInitialProcess):
2377         (WebKit::WebProcessPool::disconnectProcess):
2378         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
2379         (WebKit::WebProcessPool::createWebPage):
2380         (WebKit::WebProcessPool::postMessageToInjectedBundle):
2381         (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
2382         (WebKit::WebProcessPool::setCacheModel):
2383         (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
2384         (WebKit::WebProcessPool::requestWebContentStatistics):
2385         (WebKit::WebProcessPool::requestNetworkingStatistics):
2386         * UIProcess/WebProcessPool.h:
2387         (WebKit::WebProcessPool::sendToNetworkingProcess):
2388         (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
2389         (WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
2390         (WebKit::WebProcessPool::sendToOneProcess):
2391         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2392         (WebKit::WebProcessPool::platformInitializeWebProcess):
2393
2394 2015-06-18  Jon Lee  <jonlee@apple.com>
2395
2396         Update AVKit usage of pip
2397         https://bugs.webkit.org/show_bug.cgi?id=146095
2398         <rdar://problem/21386853>
2399
2400         Reviewed by Eric Carlson.
2401
2402         - Rename preference key
2403         - Rename shouldAllowAlternateFullscreen to shouldAllowPictureInPictureMediaPlayback
2404
2405         * Shared/WebPreferencesDefinitions.h:
2406         * UIProcess/API/C/WKPreferences.cpp: Remove unused preference calls.
2407         (WKPreferencesSetAllowsAlternateFullscreen): Deleted.
2408         (WKPreferencesGetAllowsAlternateFullscreen): Deleted.
2409         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2410         * UIProcess/API/Cocoa/WKWebView.mm:
2411         (-[WKWebView _isShowingVideoPictureInPicture]): Renamed.
2412         (-[WKWebView _isShowingVideoOptimized]): Deleted.
2413         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]): Renamed.
2414         (-[WKWebView _mayAutomaticallyShowVideoOptimized]): Deleted.
2415         (shouldAllowPictureInPictureMediaPlayback): Renamed.
2416         (shouldAllowAlternateFullscreen): Deleted.
2417         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2418         * UIProcess/ios/PageClientImplIOS.mm:
2419         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: Rename local variables.
2420         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2421         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2422         (WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoPictureInPicture): Renamed.
2423         (WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoOptimized): Deleted.
2424         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2425         * WebProcess/WebPage/WebPage.cpp:
2426         * WebProcess/ios/WebVideoFullscreenManager.mm:
2427
2428 2015-06-18  Jeremy Jones  <jeremyj@apple.com>
2429
2430         Fix crash when entering fullscreen during exit fullscreen animation.
2431         https://bugs.webkit.org/show_bug.cgi?id=146117
2432
2433         Reviewed by Simon Fraser.
2434
2435         A partial teardown left the LayerHostingContext in a bad state when attempting to reuse the model and interface
2436         objects. Instead, complete the teardown and don't reuse the objects.
2437
2438         * WebProcess/ios/WebVideoFullscreenManager.mm:
2439         (WebKit::WebVideoFullscreenManager::didEnterFullscreen): WebThreadRun is a no-op in WK2. Use dispatch_async.
2440         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Do complete teardown before entering fullscreen again.
2441
2442 2015-06-18  Anders Carlsson  <andersca@apple.com>
2443
2444         Remove shouldInterruptJavaScript
2445         https://bugs.webkit.org/show_bug.cgi?id=146118
2446
2447         Reviewed by Antti Koivisto.
2448
2449         * UIProcess/API/APIUIClient.h:
2450         (API::UIClient::shouldInterruptJavaScript): Deleted.
2451         * UIProcess/API/C/WKPage.cpp:
2452         (WKPageSetPageUIClient): Deleted.
2453         * UIProcess/API/C/WKPageUIClient.h:
2454         * UIProcess/WebPageProxy.cpp:
2455         (WebKit::WebPageProxy::shouldInterruptJavaScript): Deleted.
2456         * UIProcess/WebPageProxy.h:
2457         * UIProcess/WebPageProxy.messages.in:
2458         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2459         (WebKit::WebChromeClient::shouldInterruptJavaScript): Deleted.
2460         * WebProcess/WebCoreSupport/WebChromeClient.h:
2461
2462 2015-06-18  Tim Horton  <timothy_horton@apple.com>
2463
2464         Use SFSafariViewController for previews
2465         https://bugs.webkit.org/show_bug.cgi?id=146092
2466
2467         Reviewed by Darin Adler.
2468
2469         * UIProcess/ios/WKContentViewInteraction.mm:
2470         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2471         (-[WKContentView commitPreviewViewController:]):
2472         * WebKit2.xcodeproj/project.pbxproj:
2473         * Source/WebKit2/Platform/spi/ios/SafariServicesSPI.h:
2474
2475 2015-06-18  Antti Koivisto  <antti@apple.com>
2476
2477         ~4% Membuster regression after WebKit r185452
2478         https://bugs.webkit.org/show_bug.cgi?id=146112
2479         rdar://problem/21406677
2480
2481         Reviewed by Chris Dumez.
2482
2483         Clear the cache write queue on critical memory pressure. There can be substantial amount of memory there and we
2484         don't know how long writing it out will take. System is often under I/O pressure too in low memory situations.
2485
2486         This also makes sense for process suspension where we send simulated critical memory event.
2487
2488         * NetworkProcess/NetworkProcess.cpp:
2489         (WebKit::NetworkProcess::lowMemoryHandler):
2490         * NetworkProcess/cache/NetworkCache.cpp:
2491         (WebKit::NetworkCache::Cache::handleMemoryPressureNotification):
2492         * NetworkProcess/cache/NetworkCache.h:
2493         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2494         (WebKit::NetworkCache::Storage::clearWriteQueue):
2495         * NetworkProcess/cache/NetworkCacheStorage.h:
2496
2497 2015-06-18  Csaba Osztrogonác  <ossy@webkit.org>
2498
2499         Fix missing braces and deprecated declarations warnings in WebKitNotificationProvider.cpp
2500         https://bugs.webkit.org/show_bug.cgi?id=145921
2501
2502         Reviewed by Carlos Garcia Campos.
2503
2504         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
2505         (WebKitNotificationProvider::WebKitNotificationProvider):
2506
2507 2015-06-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2508
2509         [EFL] test_ewk2_context has been failed since r185529
2510         https://bugs.webkit.org/show_bug.cgi?id=146046
2511
2512         Reviewed by Csaba Osztrogonác.
2513
2514         ewk_context_network_process_model test has been failed since r185529.
2515         This patch modifies the test which is similar to ewk_context_network_process_model
2516         based on multiple process model to fix the failure. Besides ewk_context_network_process_model
2517         seems to be fixed indirectly. So we enable it again.
2518
2519         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2520         (TEST_F):
2521
2522 2015-06-17  Yongjun Zhang  <yongjun_zhang@apple.com>
2523
2524         Also turn off long press on link preview.
2525         https://bugs.webkit.org/show_bug.cgi?id=146084
2526
2527         Also turn off long presss gesture when previewing. Turn that back on when preview is completed.
2528
2529         Reviewed by Tim Horton.
2530
2531         * UIProcess/ios/WKContentViewInteraction.mm:
2532         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2533         (-[WKContentView didDismissPreviewViewController:committing:]):
2534
2535 2015-06-17  Brent Fulgham  <bfulgham@apple.com>
2536
2537         Overflow regions with scroll snap points are not reliably rubber banding
2538         https://bugs.webkit.org/show_bug.cgi?id=142522
2539         <rdar://problem/20100726>
2540
2541         Reviewed by Darin Adler.
2542
2543         Make sure we don't block rubberbanding behavior when a scroll gesture should take us past
2544         the end of the scroll container.
2545
2546         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2547         (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Don't adjust
2548         target point if we were going to scroll past the edges of the scroll container.
2549
2550 2015-06-17  Anders Carlsson  <andersca@apple.com>
2551
2552         Would like a way, in the API, to get notified about a web process crash
2553         https://bugs.webkit.org/show_bug.cgi?id=146085
2554         rdar://problem/17358828
2555
2556         Reviewed by Darin Adler.
2557
2558         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
2559         * UIProcess/Cocoa/NavigationState.h:
2560         * UIProcess/Cocoa/NavigationState.mm:
2561         (WebKit::NavigationState::setNavigationDelegate):
2562         (WebKit::NavigationState::NavigationClient::processDidCrash):
2563
2564 2015-06-17  Tim Horton  <timothy_horton@apple.com>
2565
2566         Swipe gesture can get stuck, preventing scrolling and other gestures
2567         https://bugs.webkit.org/show_bug.cgi?id=146088
2568         <rdar://problem/16056087>
2569
2570         Reviewed by Darin Adler.
2571
2572         * UIProcess/mac/ViewGestureControllerMac.mm:
2573         (WebKit::ViewGestureController::trackSwipeGesture):
2574         Ignore mouse events that come in while we're doing a swipe.
2575         This prevents potentially problematic mouse events (especially context menus)
2576         won't be processed during a swipe, avoiding situations that can cause
2577         the swipe gesture to get stuck.
2578
2579 2015-06-17  Sungmann Cho  <sungmann.cho@navercorp.com>
2580
2581         Remove willSendEventToPlugin() from PluginController.h.
2582         https://bugs.webkit.org/show_bug.cgi?id=146054
2583
2584         Reviewed by Darin Adler.
2585
2586         PluginController::willSendEventToPlugin() was introduced by http://webkit.org/b/59124.
2587         This method had been used only for WebKit2 on Windows, and no one uses it now.
2588         So we can remove it.
2589
2590         No new tests, no behavior change.
2591
2592         * PluginProcess/PluginControllerProxy.cpp:
2593         (WebKit::PluginControllerProxy::willSendEventToPlugin): Deleted.
2594         * PluginProcess/PluginControllerProxy.h:
2595         * WebProcess/Plugins/PluginController.h:
2596         * WebProcess/Plugins/PluginView.cpp:
2597         (WebKit::PluginView::willSendEventToPlugin): Deleted.
2598         * WebProcess/Plugins/PluginView.h:
2599
2600 2015-06-17  Tim Horton  <timothy_horton@apple.com>
2601
2602         Repro crash when swiping back from a NY Times article @ WebPageProxy::navigationGestureDidEnd
2603         https://bugs.webkit.org/show_bug.cgi?id=146083
2604         <rdar://problem/20974232>
2605
2606         Reviewed by Darin Adler.
2607
2608         * UIProcess/ios/ViewGestureControllerIOS.mm:
2609         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
2610         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
2611         It is possible to get didSameDocumentNavigationForMainFrame *before*
2612         endSwipeGesture, while the user is still interactively swiping. We
2613         cannot remove the snapshot in this case, nor should we start the active
2614         load monitoring timer; all of these things should happen only after the
2615         swipe is completed and we've performed the navigation.
2616
2617         This was particularly bad (a crash instead of just a disappearing snapshot)
2618         because removing the snapshot also causes m_webPageProxyForBackForwardListForCurrentSwipe
2619         to be nulled out, but then it is dereferenced during endSwipeGesture.
2620
2621         Make sure that we never call removeSwipeSnapshotIfReady unless we were actually
2622         waiting to remove the swipe snapshot (because the gesture had completed).
2623         Most callers already did ensure this, but these two did not.
2624
2625 2015-06-17  Joseph Pecoraro  <pecoraro@apple.com>
2626
2627         Web Inspector: Improve Full Screen support for Web Inspector windows
2628         https://bugs.webkit.org/show_bug.cgi?id=146036
2629
2630         Reviewed by Timothy Hatcher.
2631
2632         * UIProcess/WebInspectorProxy.h:
2633         * UIProcess/mac/WebInspectorProxyMac.mm:
2634         (-[WKWebInspectorProxyObjCAdapter windowDidEnterFullScreen:]):
2635         (-[WKWebInspectorProxyObjCAdapter windowDidExitFullScreen:]):
2636         (WebKit::WebInspectorProxy::platformCanAttach):
2637         (WebKit::WebInspectorProxy::windowFullScreenDidChange):
2638         When entering / leaving full screen update attach availability to
2639         potentially show / hide the frontend's docking buttons.
2640
2641         (WebKit::WebInspectorProxy::createInspectorWindow):
2642         Allow a Web Inspector window to be a full screen auxillary window,
2643         so that if the application with a WebView opens a detached inspector
2644         window it can be shown on the same desktop as the full screen app.
2645         Also, reduce the minimum window size requirements for full screen tiling.
2646
2647 2015-06-17  Tim Horton  <timothy_horton@apple.com>
2648
2649         Safari tabs still have shrunken content after coming out of fullscreen
2650         https://bugs.webkit.org/show_bug.cgi?id=146037
2651         <rdar://problem/21105960>
2652
2653         Reviewed by Simon Fraser and Darin Adler.
2654
2655         * UIProcess/WebPageProxy.h:
2656         (WebKit::WebPageProxy::useFixedLayoutDidChange):
2657         (WebKit::WebPageProxy::fixedLayoutSizeDidChange):
2658         * UIProcess/WebPageProxy.messages.in:
2659         * WebProcess/WebPage/WebPage.cpp:
2660         (WebKit::WebPage::setUseFixedLayout):
2661         (WebKit::WebPage::setFixedLayoutSize):
2662         Keep the UI process up-to-date when fixed layout is enabled or the size changes.
2663         This is important because these things can change from the Web process side too,
2664         and the UI process uses its (potentially stale) version to do some short-circuiting.
2665         This was causing us to fail to turn off fixed layout when it was turned
2666         on from the Web process side (by TiledCoreAnimationDrawingArea).
2667
2668         * UIProcess/mac/WKViewLayoutStrategy.mm:
2669         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
2670         Reset the view scale, which WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy
2671         makes heavy use of, just like the others.
2672
2673 2015-06-17  Dan Bernstein  <mitz@apple.com>
2674
2675         [Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
2676         https://bugs.webkit.org/show_bug.cgi?id=145957
2677
2678         Reviewed by Darin Adler.
2679
2680         * UIProcess/API/Cocoa/WKUIDelegate.h: Added -webViewDidClose: to the protocol.
2681         * UIProcess/Cocoa/UIDelegate.h: Added a webViewDidClose boolean to the delegate methods struct.
2682         * UIProcess/Cocoa/UIDelegate.mm:
2683         (WebKit::UIDelegate::setDelegate): Initialize the webViewDidClose boolean.
2684         (WebKit::UIDelegate::UIClient::close): Changed to call the new delegate method. Left behind
2685         code that calls the old private method if it’s implemented.
2686
2687 2015-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2688
2689         [GTK] WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER doesn't disable memory cache when set before the web process is launched
2690         https://bugs.webkit.org/show_bug.cgi?id=146053
2691
2692         Reviewed by Martin Robinson.
2693
2694         The cache is disabled in WebProcess::platformSetCacheModel() when
2695         the cache model is CacheModelDocumentViewer, but it's enabled
2696         again by WebProcess::setMemoryCacheDisabled() when
2697         memoryCacheDisabled creation parameter is processed. We need to
2698         make sure the cache model and memoryCacheDisabled parameters are consistent.
2699
2700         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2701         (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize
2702         memoryCacheDisabled parameter to true if memory cache was
2703         explicitly disabled or cache model is CacheModelDocumentViewer.
2704
2705 2015-06-17  Zan Dobersek  <zdobersek@igalia.com>
2706
2707         [WK2] valueForKey() shouldn't copy the defaults map
2708         https://bugs.webkit.org/show_bug.cgi?id=146050
2709
2710         Reviewed by Sam Weinig.
2711
2712         * Shared/WebPreferencesStore.cpp:
2713         (WebKit::valueForKey): Avoid copying the defaults HashMap by binding the return value to a reference.
2714
2715 2015-06-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2716
2717         [GTK] Inhibit screen saver when playing full screen video
2718         https://bugs.webkit.org/show_bug.cgi?id=145795
2719
2720         Reviewed by Gustavo Noronha Silva.
2721
2722         Use Freedesktop.org DBus API to inhibit/unhinibit the screen saver
2723         when entering/leaving fullscreen.
2724
2725         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2726         (screenSaverInhibitedCallback):
2727         (webkitWebViewBaseSendInhibitMessageToScreenSaver):
2728         (screenSaverProxyCreatedCallback):
2729         (webkitWebViewBaseInhibitScreenSaver):
2730         (webkitWebViewBaseUninhibitScreenSaver):
2731         (webkitWebViewBaseEnterFullScreen):
2732         (webkitWebViewBaseExitFullScreen):
2733
2734 2015-06-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2735
2736         Purge PassRefPtr with Ref or RefPtr
2737         https://bugs.webkit.org/show_bug.cgi?id=146001
2738
2739         Reviewed by Darin Adler.
2740
2741         As step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
2742         If function can't return nullptr, PassRefPtr is changed with Ref. If not, the function
2743         returns RefPtr.
2744
2745         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
2746         (WebKit::DatabaseToWebProcessConnection::create):
2747         * DatabaseProcess/DatabaseToWebProcessConnection.h:
2748         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2749         (WebKit::DatabaseProcessIDBConnection::create):
2750         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2751         (WebKit::UniqueIDBDatabase::create):
2752         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2753         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2754         (WebKit::NetworkConnectionToWebProcess::create):
2755         * NetworkProcess/NetworkConnectionToWebProcess.h:
2756         * NetworkProcess/RemoteNetworkingContext.h:
2757         * PluginProcess/WebProcessConnection.cpp:
2758         (WebKit::WebProcessConnection::create):
2759         * PluginProcess/WebProcessConnection.h:
2760         * Shared/API/APINumber.h:
2761         (API::Number::create):
2762         * Shared/API/APISecurityOrigin.h:
2763         (API::SecurityOrigin::createFromString):
2764         (API::SecurityOrigin::create):
2765         * Shared/API/APISerializedScriptValue.h:
2766         (API::SerializedScriptValue::create):
2767         (API::SerializedScriptValue::adopt):
2768         * Shared/APIWebArchive.h:
2769         * Shared/APIWebArchive.mm:
2770         (API::WebArchive::create):
2771         * Shared/APIWebArchiveResource.h:
2772         * Shared/APIWebArchiveResource.mm:
2773         (API::WebArchiveResource::create):
2774         * Shared/AsyncRequest.h:
2775         * UIProcess/API/efl/ewk_url_request_private.h:
2776         (EwkUrlRequest::create):
2777         * UIProcess/API/efl/ewk_url_response_private.h:
2778         (EwkUrlResponse::create):
2779         * UIProcess/API/efl/ewk_url_scheme_request_private.h:
2780         (EwkUrlSchemeRequest::create):
2781         * UIProcess/API/efl/ewk_window_features_private.h:
2782         (EwkWindowFeatures::create):
2783         * UIProcess/API/efl/tests/test_ewk2_object.cpp:
2784         (TestEwkObject1::create):
2785         (TestEwkObject2::create):
2786         * UIProcess/API/gtk/WebKitBatteryProvider.cpp:
2787         (WebKitBatteryProvider::create):
2788         * UIProcess/API/gtk/WebKitBatteryProvider.h:
2789         * UIProcess/API/gtk/WebKitColorChooser.cpp:
2790         (WebKit::WebKitColorChooser::create):
2791         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
2792         (WebKitGeolocationProvider::create):
2793         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
2794         (WebKitNotificationProvider::create):
2795         * UIProcess/API/gtk/WebKitNotificationProvider.h:
2796         * UIProcess/GeolocationPermissionRequestProxy.h:
2797         (WebKit::GeolocationPermissionRequestProxy::create):
2798         * UIProcess/InspectorServer/HTTPRequest.h:
2799         (WebKit::HTTPRequest::create):
2800         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
2801         (WebKit::WebSoupCustomProtocolRequestManager::create):
2802         * UIProcess/Network/NetworkProcessProxy.cpp:
2803         (WebKit::NetworkProcessProxy::create):
2804         * UIProcess/Network/NetworkProcessProxy.h:
2805         * UIProcess/Notifications/NotificationPermissionRequest.cpp:
2806         (WebKit::NotificationPermissionRequest::create):
2807         * UIProcess/Notifications/NotificationPermissionRequest.h:
2808         * UIProcess/Notifications/WebNotification.h:
2809         (WebKit::WebNotification::create):
2810         * UIProcess/WebPageProxy.cpp:
2811         (WebKit::WebPageProxy::scriptValueCallback):
2812         * UIProcess/WebVibrationProxy.cpp:
2813         (WebKit::WebVibrationProxy::create):
2814         * UIProcess/WebVibrationProxy.h:
2815         * UIProcess/WebViewportAttributes.h:
2816         (WebKit::WebViewportAttributes::create):
2817         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2818         (WebKit::WebsiteDataStore::createNonPersistent):
2819         (WebKit::WebsiteDataStore::create):
2820         * UIProcess/WebsiteData/WebsiteDataStore.h:
2821         * UIProcess/gtk/WebColorPickerGtk.cpp:
2822         (WebKit::WebColorPickerGtk::create):
2823         * UIProcess/gtk/WebColorPickerGtk.h:
2824         * UIProcess/gtk/WebContextMenuProxyGtk.h:
2825         (WebKit::WebContextMenuProxyGtk::create):
2826         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
2827         (WebKit::WebPopupMenuProxyGtk::create):
2828         * UIProcess/mac/ViewSnapshotStore.h:
2829         * UIProcess/mac/ViewSnapshotStore.mm:
2830         (WebKit::ViewSnapshot::create):
2831         * UIProcess/mac/WebColorPickerMac.h:
2832         * UIProcess/mac/WebColorPickerMac.mm:
2833         (WebKit::WebColorPickerMac::create):
2834         * UIProcess/mac/WebContextMenuProxyMac.h:
2835         (WebKit::WebContextMenuProxyMac::create):
2836         * UIProcess/mac/WebPopupMenuProxyMac.h:
2837         (WebKit::WebPopupMenuProxyMac::create):
2838         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
2839         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
2840         (WebKit::WebToDatabaseProcessConnection::create):
2841         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2842         (WebKit::WebFullScreenManager::create):
2843         * WebProcess/FullScreen/WebFullScreenManager.h:
2844         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2845         (WebKit::InjectedBundleRangeHandle::create):
2846         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
2847         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
2848         (WebKit::InjectedBundleBackForwardList::create):
2849
2850 2015-06-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2851
2852         Unreviewed build fix after r185615.
2853
2854         * UIProcess/API/gtk/WebKitWebContext.cpp:
2855         (webkit_web_context_clear_cache): Comment the call to the code
2856         removed and write down the bugzilla link for reimplementation.
2857
2858 2015-06-16  Anders Carlsson  <andersca@apple.com>
2859
2860         Get rid of performAPICallbackWithSecurityOriginDataVector
2861         https://bugs.webkit.org/show_bug.cgi?id=146039
2862
2863         Reviewed by Andreas Kling.
2864
2865         Get rid of performAPICallbackWithSecurityOriginDataVector since it's now no longer used
2866         and add a bunch of includes to make up for SecurityOriginData.h no longer including GenericCallback.h.
2867         * DatabaseProcess/DatabaseProcess.cpp:
2868         * DatabaseProcess/DatabaseProcess.h:
2869         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2870         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2871         * Shared/SecurityOriginData.cpp:
2872         (WebKit::performAPICallbackWithSecurityOriginDataVector): Deleted.
2873         * Shared/SecurityOriginData.h:
2874         * Shared/WebsiteData/WebsiteData.cpp:
2875         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2876         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
2877
2878 2015-06-16  Ryuan Choi  <ryuan.choi@navercorp.com>
2879
2880         Unreviewed build fix attempt on CMake based port after r185623.
2881
2882         * CMakeLists.txt:
2883
2884 2015-06-16  Anders Carlsson  <andersca@apple.com>
2885
2886         Move LocalStorageDetails into the local storage database tracker
2887         https://bugs.webkit.org/show_bug.cgi?id=146034
2888
2889         Reviewed by Andreas Kling.
2890
2891         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2892         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
2893         (WKKeyValueStorageManagerDeleteAllEntries):
2894         * UIProcess/LocalStorageDetails.h: Removed.
2895         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2896         (WebKit::LocalStorageDatabaseTracker::originDetails):
2897         (WebKit::LocalStorageDatabaseTracker::details): Deleted.
2898         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2899         * UIProcess/Storage/StorageManager.cpp:
2900         (WebKit::StorageManager::getLocalStorageOriginDetails):
2901         (WebKit::StorageManager::getLocalStorageDetailsByOrigin): Deleted.
2902         (WebKit::StorageManager::deleteAllLocalStorageEntries): Deleted.
2903         * UIProcess/Storage/StorageManager.h:
2904         * WebKit2.xcodeproj/project.pbxproj:
2905
2906 2015-06-16  Dan Bernstein  <mitz@apple.com>
2907
2908         Removed the WebKit2SandboxProfiles target.
2909
2910         Rubber-stamped by Anders Carlsson.
2911
2912         WebKit2SandboxProfiles was just an alias for the Sandbox Profiles target, and it’s not
2913         needed anymore.
2914
2915         * WebKit2.xcodeproj/project.pbxproj:
2916
2917 2015-06-16  Anders Carlsson  <andersca@apple.com>
2918
2919         Fold WebKeyValueStorageManager into WKKeyValueStorageManager
2920         https://bugs.webkit.org/show_bug.cgi?id=146030
2921
2922         Reviewed by Andreas Kling.
2923
2924         * UIProcess/API/C/WKAPICast.h:
2925         * UIProcess/API/C/WKContext.cpp:
2926         (WKContextGetKeyValueStorageManager):
2927         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2928         (WKKeyValueStorageManagerGetTypeID):
2929         (WKKeyValueStorageManagerGetOriginKey):
2930         (WKKeyValueStorageManagerGetCreationTimeKey):
2931         (WKKeyValueStorageManagerGetModificationTimeKey):
2932         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
2933         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
2934         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
2935         (WKKeyValueStorageManagerDeleteAllEntries):
2936         * UIProcess/WebKeyValueStorageManager.cpp: Removed.
2937         (WebKit::WebKeyValueStorageManager::supplementName): Deleted.
2938         (WebKit::WebKeyValueStorageManager::originKey): Deleted.
2939         (WebKit::WebKeyValueStorageManager::creationTimeKey): Deleted.
2940         (WebKit::WebKeyValueStorageManager::modificationTimeKey): Deleted.
2941         (WebKit::WebKeyValueStorageManager::create): Deleted.
2942         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager): Deleted.
2943         (WebKit::WebKeyValueStorageManager::~WebKeyValueStorageManager): Deleted.
2944         (WebKit::WebKeyValueStorageManager::refWebContextSupplement): Deleted.
2945         (WebKit::WebKeyValueStorageManager::derefWebContextSupplement): Deleted.
2946         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): Deleted.
2947         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin): Deleted.
2948         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): Deleted.
2949         (WebKit::WebKeyValueStorageManager::deleteAllEntries): Deleted.
2950         * UIProcess/WebKeyValueStorageManager.h: Removed.
2951         * UIProcess/WebProcessPool.cpp:
2952         * WebKit2.xcodeproj/project.pbxproj:
2953
2954 2015-06-16  Alex Christensen  <achristensen@webkit.org>
2955
2956         CMake build fix after r185615.
2957
2958         * CMakeLists.txt:
2959         Remove WebResourceCacheManager from CMake build system.
2960
2961 2015-06-16  Alex Christensen  <achristensen@webkit.org>
2962
2963         [Content Extensions] Implement branch compaction for DFA bytecode.
2964         https://bugs.webkit.org/show_bug.cgi?id=145619
2965
2966         Reviewed by Benjamin Poulain.
2967
2968         * UIProcess/API/APIUserContentExtensionStore.h:
2969         Increment version number to reflect changes to bytecode.
2970
2971 2015-06-16  Anders Carlsson  <andersca@apple.com>
2972
2973         WebResourceCacheManager is unused, get rid of it
2974         https://bugs.webkit.org/show_bug.cgi?id=146027
2975
2976         Reviewed by Sam Weinig.
2977
2978         * DerivedSources.make:
2979         * UIProcess/API/C/WKAPICast.h:
2980         * UIProcess/API/C/WKContext.cpp:
2981         * UIProcess/WebProcessPool.cpp:
2982         * UIProcess/WebResourceCacheManagerProxy.cpp: Removed.
2983         (WebKit::WebResourceCacheManagerProxy::supplementName): Deleted.
2984         (WebKit::WebResourceCacheManagerProxy::create): Deleted.
2985         (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Deleted.
2986         (WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy): Deleted.
2987         (WebKit::WebResourceCacheManagerProxy::processPoolDestroyed): Deleted.
2988         (WebKit::WebResourceCacheManagerProxy::processDidClose): Deleted.
2989         (WebKit::WebResourceCacheManagerProxy::shouldTerminate): Deleted.
2990         (WebKit::WebResourceCacheManagerProxy::refWebContextSupplement): Deleted.
2991         (WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement): Deleted.
2992         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Deleted.
2993         (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Deleted.
2994         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): Deleted.
2995         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Deleted.
2996         * UIProcess/WebResourceCacheManagerProxy.h: Removed.
2997         * UIProcess/WebResourceCacheManagerProxy.messages.in: Removed.
2998         * WebKit2.xcodeproj/project.pbxproj:
2999         * WebProcess/ResourceCache/WebResourceCacheManager.cpp: Removed.
3000         (WebKit::WebResourceCacheManager::supplementName): Deleted.
3001         (WebKit::WebResourceCacheManager::WebResourceCacheManager): Deleted.
3002         (WebKit::WebResourceCacheManager::getCacheOrigins): Deleted.
3003         (WebKit::WebResourceCacheManager::returnCacheOrigins): Deleted.
3004         (WebKit::WebResourceCacheManager::clearCacheForOrigin): Deleted.
3005         (WebKit::WebResourceCacheManager::clearCacheForAllOrigins): Deleted.
3006         * WebProcess/ResourceCache/WebResourceCacheManager.h: Removed.
3007         * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Removed.
3008         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Removed.
3009         (WebKit::partitionName): Deleted.
3010         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): Deleted.
3011         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Deleted.
3012         * WebProcess/WebProcess.cpp:
3013         (WebKit::WebProcess::WebProcess): Deleted.
3014
3015 2015-06-16  Alex Christensen  <achristensen@webkit.org>
3016
3017         CMake build fix after r185601.
3018
3019         * CMakeLists.txt:
3020         Remove application cache manager classes.
3021
3022 2015-06-16  Anders Carlsson  <andersca@apple.com>
3023
3024         Stop calling into WebResourceCacheManager
3025         https://bugs.webkit.org/show_bug.cgi?id=146026
3026
3027         Reviewed by Andreas Kling.
3028
3029         Copy the cache clearing code into NetworkProcessCocoa in preparation of getting rid of
3030         the WebResourceCacheManager code.
3031
3032         * NetworkProcess/NetworkProcess.cpp:
3033         (WebKit::fetchDiskCacheEntries):
3034         (WebKit::clearDiskCacheEntries):
3035         (WebKit::cfURLCacheOrigins): Deleted.
3036         * NetworkProcess/NetworkProcess.h:
3037         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3038         (WebKit::partitionName):
3039         (WebKit::NetworkProcess::cfURLCacheOrigins):
3040         (WebKit::NetworkProcess::clearCFURLCacheForOrigins):
3041
3042 2015-06-16  Anders Carlsson  <andersca@apple.com>
3043
3044         Get rid of the application cache manager classes, they are no longer used
3045         https://bugs.webkit.org/show_bug.cgi?id=146024
3046
3047         Reviewed by Sam Weinig.
3048
3049         * DerivedSources.make:
3050         * UIProcess/API/C/WKAPICast.h:
3051         * UIProcess/API/C/WKContext.cpp:
3052         * UIProcess/WebApplicationCacheManagerProxy.cpp: Removed.
3053         (WebKit::WebApplicationCacheManagerProxy::supplementName): Deleted.
3054         (WebKit::WebApplicationCacheManagerProxy::create): Deleted.
3055         (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy): Deleted.
3056         (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy): Deleted.
3057         (WebKit::WebApplicationCacheManagerProxy::processPoolDestroyed): Deleted.
3058         (WebKit::WebApplicationCacheManagerProxy::processDidClose): Deleted.
3059         (WebKit::WebApplicationCacheManagerProxy::shouldTerminate): Deleted.
3060         (WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement): Deleted.
3061         (WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement): Deleted.
3062         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins): Deleted.
3063         (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Deleted.
3064         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin): Deleted.
3065         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries): Deleted.
3066         * UIProcess/WebApplicationCacheManagerProxy.h: Removed.
3067         * UIProcess/WebApplicationCacheManagerProxy.messages.in: Removed.
3068         * UIProcess/WebProcessPool.cpp:
3069         * WebKit2.xcodeproj/project.pbxproj:
3070         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Removed.
3071         (WebKit::WebApplicationCacheManager::supplementName): Deleted.
3072         (WebKit::WebApplicationCacheManager::WebApplicationCacheManager): Deleted.
3073         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): Deleted.
3074         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): Deleted.
3075         (WebKit::WebApplicationCacheManager::deleteAllEntries): Deleted.
3076         (WebKit::WebApplicationCacheManager::setAppCacheMaximumSize): Deleted.
3077         * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Removed.
3078         * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Removed.
3079         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3080         (WebKit::InjectedBundle::clearApplicationCache):
3081         (WebKit::InjectedBundle::setAppCacheMaximumSize):
3082         * WebProcess/WebProcess.cpp:
3083         (WebKit::WebProcess::WebProcess): Deleted.
3084
3085 2015-06-16  Brady Eidson  <beidson@apple.com>
3086
3087         IDB: Records table migration doesn't work with all versions of SQLite.
3088         https://bugs.webkit.org/show_bug.cgi?id=145993
3089
3090         Reviewed by Darin Adler, provisionally reviewed by Jon Lee.
3091
3092         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
3093         (WebKit::v1RecordsTableSchema):
3094         (WebKit::v1RecordsTableSchemaAlternate):
3095         (WebKit::v2RecordsTableSchema):
3096         (WebKit::v2RecordsTableSchemaAlternate):
3097         (WebKit::createOrMigrateRecordsTableIfNecessary): Check both v1 and v1 Alternate whenever we check for the v1 schema.
3098           Ditto for the v2 schema. Crash all builds if the current schema is none of these.
3099
3100 2015-06-16  Dan Bernstein  <mitz@apple.com>
3101
3102         Build fix.
3103
3104         * mac/postprocess-framework-headers.sh:
3105
3106 2015-06-16  Commit Queue  <commit-queue@webkit.org>
3107
3108         Unreviewed, rolling out r185552.
3109         https://bugs.webkit.org/show_bug.cgi?id=146015
3110
3111          It broke some WK2 API tests on EFL bots (Requested by
3112         gyuyoung on #webkit).
3113
3114         Reverted changeset:
3115
3116         "[EFL] Make send/receive messages to communicate the Web and
3117         UI Processes using Injected Bundle."
3118         https://bugs.webkit.org/show_bug.cgi?id=145685
3119         http://trac.webkit.org/changeset/185552
3120
3121 2015-06-16  Ryuan Choi  <ryuan.choi@navercorp.com>
3122
3123         [EFL] Add API tests for ewk_page
3124         https://bugs.webkit.org/show_bug.cgi?id=146004
3125
3126         Reviewed by Gyuyoung Kim.
3127
3128         Add unit test for load_started/load_finished callbacks of ewk_page.
3129
3130         * PlatformEfl.cmake:
3131         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
3132         * UIProcess/API/efl/tests/test_ewk2_page.cpp: Added.
3133         (EWK2PageTest::messageReceivedCallback):
3134         (EWK2PageTest::EWK2PageTest):
3135         (TEST_F):
3136
3137 2015-06-15  Simon Fraser  <simon.fraser@apple.com>
3138
3139         [iOS WK2] position:fixed elements sometimes truncated on scroll view bouncing
3140         https://bugs.webkit.org/show_bug.cgi?id=146000
3141         rdar://problem/19448439
3142
3143         Reviewed by Benjamin Poulain.
3144         
3145         When in the middle of a rubber-band (UIScrollView bounce), we could send a bad 
3146         fixed position rect down to WebCore, causing 100% height elements to get laid out
3147         at the wrong height, possible too short. This occurred when -_updateVisibleContentRects
3148         said we were in a stable state, but the rubber-band offset caused WebPageProxy::computeCustomFixedPositionRect()
3149         to compute a bad rect via constrainedUnobscuredRect.intersect(documentRect).
3150         
3151         Fix by not claiming to be in a stable state during rubber-banding. Added _scrollViewIsRubberBanding
3152         to compute that, taking care with floating point comparisons for 3x devices.
3153
3154         * UIProcess/API/Cocoa/WKWebView.mm:
3155         (isGreaterInDevicePixels):
3156         (-[WKWebView _scrollViewIsRubberBanding]):
3157         (-[WKWebView _updateVisibleContentRects]):
3158
3159 2015-06-15  Ryuan Choi  <ryuan.choi@navercorp.com>
3160
3161         Fix build break when ENABLE_SECCOMP_FILTERS is ON
3162         https://bugs.webkit.org/show_bug.cgi?id=145967
3163
3164         Reviewed by Carlos Garcia Campos.
3165
3166         Since r183189, ArgumentEncoder::addAttachment requires rvalue reference.
3167
3168         * Shared/linux/SeccompFilters/OpenSyscall.cpp:
3169         (WebKit::OpenSyscallResult::encode): Use WTF::move().
3170
3171 2015-06-15  Chris Dumez  <cdumez@apple.com>
3172
3173         [WK2] BrowsingContextController.loadData API is leaking Navigation objects
3174         https://bugs.webkit.org/show_bug.cgi?id=145977
3175         <rdar://problem/21305706>
3176
3177         Reviewed by Darin Adler.
3178
3179         BrowsingContextController.loadData API was leaking Navigation objects.
3180         The issue was due to WebPageProxy::loadData() creating a Navigation
3181         object but not passing along the navigationID to the WebProcess when
3182         sending the Messages::WebPage::LoadData IPC. As a result, the
3183         WebProcess would use 0 as navigationID and we would end up creating a
3184         new Navigation object later on for the same navigation.
3185
3186         * UIProcess/WebPageProxy.cpp:
3187         (WebKit::WebPageProxy::loadData):
3188         * WebProcess/WebPage/WebPage.cpp:
3189         (WebKit::WebPage::loadData):
3190         * WebProcess/WebPage/WebPage.h:
3191         * WebProcess/WebPage/WebPage.messages.in:
3192
3193 2015-06-15  Dan Bernstein  <mitz@apple.com>
3194
3195         REGRESSION (r185298): Databases service has Web Content service’s entitlements
3196         https://bugs.webkit.org/show_bug.cgi?id=145980
3197
3198         Reviewed by Darin Adler.
3199
3200         * Configurations/DatabaseService.xcconfig: Set WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE to
3201         Databases-iOS.
3202
3203 2015-06-11  Jon Lee  <jonlee@apple.com>
3204
3205         [WK2] Add allowsPictureInPictureMediaPlayback
3206         https://bugs.webkit.org/show_bug.cgi?id=145901
3207         rdar://problem/21349851
3208
3209         Reviewed by Anders Carlsson.
3210
3211         Replace _allowsAlternateFullscreen with allowsPictureInPictureMediaPlayback.
3212
3213         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Add allowsPictureInPictureMediaPlayback.
3214         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3215         (-[WKWebViewConfiguration init]): Remove _allowsAlternateFullscreen.
3216         (-[WKWebViewConfiguration copyWithZone:]): Replace the variable.
3217         (-[WKWebViewConfiguration _allowsAlternateFullscreen]): Deleted.
3218         (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): Deleted.
3219         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Remove the SPI.
3220
3221         * UIProcess/API/Cocoa/WKWebView.mm:
3222         (-[WKWebView initWithFrame:configuration:]): Update to use the new API.
3223
3224 2015-06-12  Alexey Proskuryakov  <ap@apple.com>
3225
3226         -[WKWebView evaluateJavaScript] provides a misleading error when the return cannot be serialized
3227         https://bugs.webkit.org/show_bug.cgi?id=145900
3228
3229         Reviewed by Sam Weinig.
3230
3231         We used to conflate to cases: (1) when there was a JavaScript exception, and
3232         (2) when the result could not be serialized for IPC. Turns out that it was quite
3233         misleading!
3234
3235         * UIProcess/API/C/WKPage.cpp:
3236         (WKPageRunJavaScriptInMainFrame):
3237         * UIProcess/API/Cocoa/WKError.h:
3238         * UIProcess/API/Cocoa/WKError.mm:
3239         (localizedDescriptionForErrorCode):
3240         * UIProcess/API/Cocoa/WKWebView.mm:
3241         (-[WKWebView evaluateJavaScript:completionHandler:]):
3242         * UIProcess/WebPageProxy.cpp:
3243         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
3244         (WebKit::WebPageProxy::scriptValueCallback):
3245         * UIProcess/WebPageProxy.h:
3246         * UIProcess/WebPageProxy.messages.in:
3247         * WebProcess/WebPage/WebPage.cpp:
3248         (WebKit::WebPage::runJavaScriptInMainFrame):
3249         * UIProcess/API/gtk/WebKitWebView.cpp:
3250         (webkit_web_view_run_javascript):
3251         (resourcesStreamReadCallback):
3252
3253 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3254
3255         [SOUP] Custom URI schemes don't work for requests containing a fragment identifier
3256         https://bugs.webkit.org/show_bug.cgi?id=145969
3257
3258         Reviewed by Sergio Villar Senin.
3259
3260         Use the WebKitSoupRequestGeneric request instead of creating a new one
3261         from the SoupRequest URI, since that is the network one and doesn't
3262         contain the fragment identifier part.
3263
3264         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
3265         (WebKit::CustomProtocolManagerImpl::start):
3266
3267 2015-06-15  Hyungwook Lee  <hyungwook.lee@navercorp.com>
3268
3269         [EFL] Make send/receive messages to communicate the Web and UI Processes using Injected Bundle.
3270         https://bugs.webkit.org/show_bug.cgi?id=145685
3271
3272         Reviewed by Gyuyoung Kim.
3273
3274         To have extensible port specific API facility using Injected Bundle,
3275         we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.
3276
3277         * UIProcess/API/efl/ewk_context.cpp:
3278         (EwkContext::EwkContext):
3279         (EwkContext::~EwkContext):
3280         (EwkContext::findOrCreateWrapper):
3281         (bundlePathForExtension):
3282         (EwkContext::create): Deleted.
3283         * UIProcess/API/efl/ewk_context_private.h:
3284         * WebProcess/efl/ExtensionManagerEfl.cpp:
3285         (WebKit::ExtensionManagerEfl::initialize):
3286
3287 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3288
3289         [SOUP] Move WebKitSoupRequestGeneric to platform layer
3290         https://bugs.webkit.org/show_bug.cgi?id=145968
3291
3292         Reviewed by Sergio Villar Senin.
3293
3294         * PlatformEfl.cmake: Remove WebKitSoupRequestGeneric.
3295         * PlatformGTK.cmake: Ditto.
3296         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
3297         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
3298
3299 2015-06-15  Csaba Osztrogonác  <ossy@webkit.org>
3300
3301         Fix unused private field warning in PageBanner.h
3302         https://bugs.webkit.org/show_bug.cgi?id=145925
3303
3304         Reviewed by Darin Adler.
3305
3306         * WebProcess/WebPage/PageBanner.cpp:
3307         (WebKit::PageBanner::~PageBanner):
3308         * WebProcess/WebPage/PageBanner.h: Initialize m_type, m_webPage, m_mouseDownInBanner, and m_isHidden here instead of in the constructor.
3309         * WebProcess/WebPage/mac/PageBannerMac.mm: Use PLATFORM(MAC) instead of !PLATFORM(IOS), they are same in objc files.
3310
3311 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3312
3313         [SOUP] Make WebKitSoupRequestGeneric independent from CustomProtocolManagerImpl
3314         https://bugs.webkit.org/show_bug.cgi?id=145966
3315
3316         Reviewed by Sergio Villar Senin.
3317
3318         Add WebKitSoupRequestGenericClient with start and finish methods,
3319         that are implemented by WebKitSoupRequestGeneric.
3320         This allows us to move WebKitSoupRequestGeneric to platform layer.
3321
3322         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
3323         (WebKit::CustomProtocolManagerImpl::registerScheme):
3324         (WebKit::CustomProtocolManagerImpl::start):
3325         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
3326         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
3327         (webkitSoupRequestGenericSendAsync):
3328         (webkitSoupRequestGenericSendFinish):
3329         * WebProcess/soup/WebKitSoupRequestGeneric.h:
3330         * WebProcess/soup/WebKitSoupRequestGenericClient.h: Added.
3331
3332 2015-06-14  Dan Bernstein  <mitz@apple.com>
3333
3334         Fixed the build.
3335
3336         * mac/postprocess-framework-headers.sh:
3337
3338 2015-06-14  Michael Catanzaro  <mcatanzaro@igalia.com>
3339
3340         Format string misuse in DatabaseProcessIDBConnection.cpp and UniqueIDBDatabaseBackingStoreSQLite.cpp
3341         https://bugs.webkit.org/show_bug.cgi?id=145960
3342
3343         Reviewed by Darin Adler.
3344
3345         Use PRIu64 and PRIi64 to print uint64_t and int64_t, respectively. These things are
3346         different types on x86_64 Linux (unsigned long) and on Mac (unsigned long long).
3347
3348         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
3349         (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata):
3350         (WebKit::DatabaseProcessIDBConnection::deleteDatabase):
3351         (WebKit::DatabaseProcessIDBConnection::openTransaction):
3352         (WebKit::DatabaseProcessIDBConnection::beginTransaction):
3353         (WebKit::DatabaseProcessIDBConnection::commitTransaction):
3354         (WebKit::DatabaseProcessIDBConnection::resetTransaction):
3355         (WebKit::DatabaseProcessIDBConnection::rollbackTransaction):
3356         (WebKit::DatabaseProcessIDBConnection::changeDatabaseVersion):
3357         (WebKit::DatabaseProcessIDBConnection::createObjectStore):
3358         (WebKit::DatabaseProcessIDBConnection::deleteObjectStore):
3359         (WebKit::DatabaseProcessIDBConnection::clearObjectStore):
3360         (WebKit::DatabaseProcessIDBConnection::createIndex):
3361         (WebKit::DatabaseProcessIDBConnection::deleteIndex):
3362         (WebKit::DatabaseProcessIDBConnection::putRecord):
3363         (WebKit::DatabaseProcessIDBConnection::getRecord):
3364         (WebKit::DatabaseProcessIDBConnection::count):
3365         (WebKit::DatabaseProcessIDBConnection::deleteRange):
3366         (WebKit::DatabaseProcessIDBConnection::openCursor):
3367         (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
3368         (WebKit::DatabaseProcessIDBConnection::cursorIterate):
3369         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
3370         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
3371         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
3372         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
3373         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
3374         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
3375         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
3376         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
3377         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
3378         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
3379         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
3380         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
3381
3382 2015-06-14  Dan Bernstein  <mitz@apple.com>
3383
3384         [Cocoa] Clean up postprocess-framework-headers.sh
3385         https://bugs.webkit.org/show_bug.cgi?id=145962
3386
3387         Reviewed by Darin Adler.
3388
3389         * mac/postprocess-framework-headers.sh: Gather all the sed options in a variable, and then
3390         run sed only once on each header. Also, correctly exit with the sed return value if it
3391         fails.
3392
3393 2015-06-13  Chris Dumez  <cdumez@apple.com>
3394
3395         [WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
3396         https://bugs.webkit.org/show_bug.cgi?id=145948
3397
3398         Reviewed by Darin Adler.
3399
3400         API::Navigation objects were leaked on history navigation to
3401         HistoryItems in PageCache. In such case, we would create 2 Navigation
3402         objects instead of 1 and the first one would be leaked. The reason
3403         we create the second one is because we fail to pass along the
3404         navigationID from the UIProcess to the WebProcess and then back to the
3405         UIProcess. On the IPC back to the UIProcess, the navigationID ends up
3406         being 0 so the UIProcess creates a new Navigation object, thinking that
3407         the load was triggered by the WebContent process.
3408
3409         We now pass along the navigationID, even if the HistoryItem is in the
3410         PageCache and we end up reusing the cached DocumentLoader, instead of
3411         creating a new one. A new updateCachedDocumentLoader() delegate is
3412         added to the FrameLoaderClient, similarly to the pre-existing
3413         createDocumentLoader() but for the case where the DocumentLoader gets
3414         reused.
3415
3416         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3417         (WebKit::WebFrameLoaderClient::updateCachedDocumentLoader):
3418         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3419         * WebProcess/WebPage/WebPage.cpp:
3420         (WebKit::WebPage::goForward):
3421         (WebKit::WebPage::goBack):
3422         (WebKit::WebPage::goToBackForwardItem):
3423         (WebKit::WebPage::updateCachedDocumentLoader):
3424         * WebProcess/WebPage/WebPage.h:
3425
3426 2015-06-12  Gavin Barraclough  <barraclough@apple.com>
3427
3428         Add private API to force page to always run at foreground priority
3429         https://bugs.webkit.org/show_bug.cgi?id=145946
3430         <rdar://problem/21267221>
3431
3432         Reviewed by Anders Carlsson.
3433
3434         * UIProcess/API/Cocoa/WKWebView.mm:
3435         (-[WKWebView initWithFrame:configuration:]):
3436             - copy _alwaysRunsAtForegroundPriority to WebPageConfiguration.
3437         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3438         (-[WKWebViewConfiguration copyWithZone:]):
3439         (-[WKWebViewConfiguration _alwaysRunsAtForegroundPriority]):
3440         (-[WKWebViewConfiguration _setAlwaysRunsAtForegroundPriority:]):
3441             - added _alwaysRunsAtForegroundPriority.
3442         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3443             - added _alwaysRunsAtForegroundPriority.
3444         * UIProcess/WebPageProxy.cpp:
3445         (WebKit::WebPageProxy::WebPageProxy):
3446             - initialize m_alwaysRunsAtForegroundPriority.
3447         (WebKit::WebPageProxy::updateActivityToken):
3448             - if m_alwaysRunsAtForegroundPriority is set always take the foreground activity token.
3449         * UIProcess/WebPageProxy.h:
3450             - added m_alwaysRunsAtForegroundPriority, alwaysRunsAtForegroundPriority.
3451
3452 2015-06-12  Anders Carlsson  <andersca@apple.com>
3453
3454         Reimplement WKResourceCacheManagerRef on top of WKWebsiteDataStoreRef
3455         https://bugs.webkit.org/show_bug.cgi?id=145951
3456
3457         Reviewed by Darin Adler.
3458
3459         * UIProcess/API/C/WKContext.cpp:
3460         (WKContextGetResourceCacheManager):
3461         * UIProcess/API/C/WKResourceCacheManager.cpp:
3462         (WKResourceCacheManagerGetTypeID):
3463         (toWebsiteDataTypes):
3464         (WKResourceCacheManagerGetCacheOrigins):
3465         (WKResourceCacheManagerClearCacheForOrigin):
3466         (WKResourceCacheManagerClearCacheForAllOrigins):
3467
3468 2015-06-12  Anders Carlsson  <andersca@apple.com>
3469
3470         Reimplement WKApplicationCacheManagerRef as WKWebsiteDataStoreRef
3471         https://bugs.webkit.org/show_bug.cgi?id=145950
3472
3473         Reviewed by Dan Bernstein.
3474
3475         * UIProcess/API/C/WKAPICast.h:
3476         * UIProcess/API/C/WKApplicationCacheManager.cpp:
3477         (WKApplicationCacheManagerGetTypeID):
3478         (WKApplicationCacheManagerGetApplicationCacheOrigins):
3479         (WKApplicationCacheManagerDeleteEntriesForOrigin):
3480         (WKApplicationCacheManagerDeleteAllEntries):
3481         * UIProcess/API/C/WKContext.cpp:
3482         (WKContextGetApplicationCacheManager):
3483         (WKContextGetPluginSiteDataManager):
3484
3485 2015-06-12  Anders Carlsson  <andersca@apple.com>
3486