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