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