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