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