97ca38b464cd95f9a10a2cd9dfcc529132a5f09b
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2
3         [GTK] [Wayland] Build is broken on trunk
4         https://bugs.webkit.org/show_bug.cgi?id=142879
5
6         Reviewed by Carlos Garcia Campos.
7
8         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
9         (WebKit::LayerTreeHostGtk::makeContextCurrent): When Wayland target
10         is enabled GLNativeWindowType is not an u_int64 type.
11         Cast contextID to avoid a build failure.
12
13 2015-06-03  Dan Bernstein  <mitz@apple.com>
14
15         Made WKBackForwardListItemPrivate.h a private header after it was added as internal in r185183.
16
17         * WebKit2.xcodeproj/project.pbxproj:
18
19 2015-06-03  Hyungwook Lee  <hyungwook.lee@navercorp.com>
20
21         [EFL] Implement window_object_cleared callback in EwkPageClient.
22         https://bugs.webkit.org/show_bug.cgi?id=145603
23
24         Reviewed by Gyuyoung Kim.
25
26         We need to provide right timing for custom JS API that may need to work at the beginning of the page.
27
28         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
29         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
30         (EwkPage::EwkPage):
31         (EwkPage::didStartProvisionalLoadForFrame):
32         (EwkPage::didClearWindowObjectForFrame):
33         (EwkPage::didFinishDocumentLoadForFrame):
34         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
35         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
36
37 2015-06-03  Anders Carlsson  <andersca@apple.com>
38
39         Add SPI that returns the snapshot layer contents for a given back/forward list item
40         https://bugs.webkit.org/show_bug.cgi?id=145621
41
42         Reviewed by Dan Bernstein.
43
44         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
45         (-[WKBackForwardListItem _snapshotLayerContents]):
46         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
47         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItemInternal.h.
48         * WebKit2.xcodeproj/project.pbxproj:
49
50 2015-06-02  Hyungwook Lee  <hyungwook.lee@navercorp.com>
51
52         [EFL] Implement load_started callback in EwkPageClient.
53         https://bugs.webkit.org/show_bug.cgi?id=145545
54
55         Reviewed by Gyuyoung Kim.
56
57         We need to provide load_started callback to web extension module.
58
59         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
60         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
61         (EwkPage::EwkPage):
62         (EwkPage::remove):
63         (EwkPage::didStartProvisionalLoadForFrame):
64         (EwkPage::didFinishDocumentLoadForFrame):
65         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
66         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
67
68 2015-06-02  Gavin Barraclough  <barraclough@apple.com>
69
70         PDFs always think they're visible on iOS.
71         https://bugs.webkit.org/show_bug.cgi?id=145493
72         <rdar://problem/19668879>
73
74         Reviewed by Andreas Kling & Sam Weinig.
75
76         The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
77         that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
78         the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView
79         (which is in the view hierarchy) does not listen for these events.
80
81         Visibility of the page should really just track the visibility of the WKWebView (and when
82         actually assessing the visibility it largely does - the page client checks the web view's
83         visibility, bar a FIXME, and the foreground/background check, which needs to change).
84         So notifications should really just come from the WKWebView.
85
86         The WKWebView already listens for the didMoveToWindow notification, it just was only updating
87         the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
88         WKContentView can just be removed.
89
90         There is one problem with this in that it would reverse the order of the calls to
91         viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
92         updating the screen pixel density. To fix this, moving the call to _updateForScreen:
93         to willMoveToWindow:, to ensure it occurs before the page becomes visible.
94
95         This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
96         within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
97         to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
98         IPC traffic).
99
100         * UIProcess/API/Cocoa/WKWebView.mm:
101         (-[WKWebView didMoveToWindow]):
102             - should update all view state flags.
103         * UIProcess/API/ios/WKViewIOS.mm:
104         (-[WKView didMoveToWindow]):
105             - added to match WKWebView.mm, for WebKitTestRunner.
106         * UIProcess/ios/WKContentView.mm:
107         (-[WKContentView willMoveToWindow:]):
108             - should _updateForScreen:
109         (-[WKContentView didMoveToWindow]): Deleted.
110             - functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].
111
112 2015-06-02  Chris Dumez  <cdumez@apple.com>
113
114         [iOS][WK2] Always mark layers as volatile for background pages
115         https://bugs.webkit.org/show_bug.cgi?id=145547
116         <rdar://problem/20663184>
117
118         Reviewed by Simon Fraser.
119
120         We previously marked layers as volatile when the WebProcess was about
121         to be suspended. Most of the time the WebProcess gets suspended when a
122         page goes into the background. However, it is not always true (see
123         radar), in which case the layers won't be marked as volatile and use
124         memory even though they are not visible.
125
126         We now mark layers as volatile as soon as the page goes into the
127         background, instead of relying on the WebProcess suspension mechanism
128         to do so.
129
130         A new ApplicationDidEnterBackground IPC message from the UIProcess to
131         the WebProcess is added (in addition to the pre-existing
132         ApplicationWillEnterForeground one). When the WebProcess receives this
133         message, it will freeze the layer tree state and mark the layers as
134         volatile (with a timer to keep retrying if needed), similarly to what
135         is already done in WebProcess::actualPrepareToSuspend().
136         When the ApplicationWillEnterForeground is received, we unfreeze the
137         layer tree state. The layers' volatile state will be automatically
138         updated when they are displayed (see setBufferVolatility() call in
139         RemoteLayerBackingStore::display()).
140
141         * UIProcess/WebPageProxy.h:
142         * UIProcess/ios/WKContentView.mm:
143         (-[WKContentView _applicationDidEnterBackground:]):
144         * UIProcess/ios/WebPageProxyIOS.mm:
145         (WebKit::WebPageProxy::applicationDidEnterBackground):
146         * WebProcess/WebPage/WebPage.cpp:
147         (WebKit::WebPage::WebPage):
148         (WebKit::WebPage::setLayerTreeStateIsFrozen):
149         (WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
150         * WebProcess/WebPage/WebPage.h:
151         * WebProcess/WebPage/WebPage.messages.in:
152         * WebProcess/WebPage/ios/WebPageIOS.mm:
153         (WebKit::WebPage::volatilityTimerFired):
154         (WebKit::WebPage::applicationDidEnterBackground):
155         (WebKit::WebPage::applicationWillEnterForeground):
156         * WebProcess/WebProcess.cpp:
157         (WebKit::WebProcess::markAllLayersVolatileIfPossible):
158         (WebKit::WebProcess::setAllLayerTreeStatesFrozen):
159
160 2015-06-02  Brady Eidson  <beidson@apple.com>
161
162         WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
163         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
164         
165         Reviewed by Alex Christensen.
166
167         * WebProcess/Plugins/PDF/PDFPlugin.mm:
168         (WebKit::PDFPlugin::clickedLink):
169         
170         * WebProcess/Plugins/PluginView.cpp:
171         (WebKit::PluginView::performFrameLoadURLRequest):
172         (WebKit::PluginView::loadURL):
173         
174         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
175         (WebKit::WebContextMenuClient::searchWithGoogle):
176         
177         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
178         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
179         
180         * WebProcess/WebPage/WebInspector.cpp:
181         (WebKit::WebInspector::openInNewTab):
182         
183         * WebProcess/WebPage/WebPage.cpp:
184         (WebKit::WebPage::loadURLInFrame):
185         (WebKit::WebPage::loadRequest):
186         (WebKit::WebPage::loadDataImpl):
187         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
188
189 2015-06-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
190
191         REGRESSION(r185091): Crash happens on indexdb tests
192         https://bugs.webkit.org/show_bug.cgi?id=145549
193
194         Reviewed by Csaba Osztrogonác.
195
196         r185091 caused crash on some indexeddb tests. The crash happens because IDBDatabaseError::create() doesn't
197         dereference count by using ptr(). It makes a crash when dereferencing on ~Ref() destructor. To fix this issue,
198         this patch uses leakRef() instead of ptr().
199
200         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
201         (WebKit::WebIDBServerConnection::didCreateObjectStore):
202         (WebKit::WebIDBServerConnection::didCreateIndex):
203         (WebKit::WebIDBServerConnection::didDeleteIndex):
204         (WebKit::WebIDBServerConnection::didPutRecord):
205         (WebKit::WebIDBServerConnection::didGetRecord):
206         (WebKit::WebIDBServerConnection::didOpenCursor):
207         (WebKit::WebIDBServerConnection::didAdvanceCursor):
208         (WebKit::WebIDBServerConnection::didIterateCursor):
209         (WebKit::WebIDBServerConnection::didCount):
210         (WebKit::WebIDBServerConnection::didDeleteRange):
211         (WebKit::WebIDBServerConnection::didClearObjectStore):
212         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
213         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
214
215 2015-06-01  Enrica Casucci  <enrica@apple.com>
216
217         [iOS] Hardware Keyboard: All combinations for arrow keys with Shift do not extend the selection.
218         https://bugs.webkit.org/show_bug.cgi?id=145538
219         rdar://problem/18504199
220
221         Reviewed by Darin Adler.
222
223         The extend parameter was ignored in all the functions below.
224
225         * UIProcess/ios/WKContentViewInteraction.mm:
226         (-[WKContentView _moveUp:withHistory:]):
227         (-[WKContentView _moveDown:withHistory:]):
228         (-[WKContentView _moveLeft:withHistory:]):
229         (-[WKContentView _moveRight:withHistory:]):
230         (-[WKContentView _moveToStartOfWord:withHistory:]):
231         (-[WKContentView _moveToStartOfParagraph:withHistory:]):
232         (-[WKContentView _moveToStartOfLine:withHistory:]):
233         (-[WKContentView _moveToStartOfDocument:withHistory:]):
234         (-[WKContentView _moveToEndOfWord:withHistory:]):
235         (-[WKContentView _moveToEndOfParagraph:withHistory:]):
236         (-[WKContentView _moveToEndOfLine:withHistory:]):
237         (-[WKContentView _moveToEndOfDocument:withHistory:]):
238
239 2015-06-01  Anders Carlsson  <andersca@apple.com>
240
241         Use xpc_connection_set_oneshot_instance where possible
242         https://bugs.webkit.org/show_bug.cgi?id=145535
243         rdar://problem/21109994
244
245         Reviewed by Sam Weinig.
246
247         Use xpc_connection_set_oneshot_instance where possible; this will make sure that the 
248         web process instances go away when the web process exits.
249
250         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
251         (WebKit::connectToService):
252         (WebKit::connectToReExecService):
253
254 2015-06-01  Enrica Casucci  <enrica@apple.com>
255
256         [iOS] Hardware Keyboard: Command + left arrow does not work.
257         https://bugs.webkit.org/show_bug.cgi?id=145531
258         rdar://problem/18576402
259
260         Reviewed by Anders Carlsson.
261
262         We were calling a non existent command (moveToStartOfLine) instead of
263         moveToBeginningOfLine.
264
265         * UIProcess/ios/WKContentViewInteraction.mm:
266         (-[WKContentView _moveToStartOfLine:withHistory:]):
267
268 2015-06-01  Brady Eidson  <beidson@apple.com>
269
270         Add WKTR support for "should open external URLs".
271         https://bugs.webkit.org/show_bug.cgi?id=145505
272
273         Reviewed by Darin Adler.
274
275         Expose C-spi to allow WKTR to set this bit on new loads:
276         * UIProcess/API/C/WKPage.cpp:
277         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
278         * UIProcess/API/C/WKPagePrivate.h:
279         
280         Expose the bit on NavigationAction for the policy delegate:        
281         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
282         (WKBundleNavigationActionGetShouldOpenExternalURLs):
283         * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h.
284
285         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
286         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
287         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
288         (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
289     
290         * WebKit2.xcodeproj/project.pbxproj:
291
292 2015-06-01  Gavin Barraclough  <barraclough@apple.com>
293
294         PDFs always think they're visible on iOS.
295         https://bugs.webkit.org/show_bug.cgi?id=145493
296         <rdar://problem/19668879>
297
298         Unreviewed roll-out.
299
300         Temporarily reverting this change – will need a workaround for test harness craziness.
301
302         * UIProcess/API/Cocoa/WKWebView.mm:
303         (-[WKWebView didMoveToWindow]):
304         (-[WKWebView setOpaque:]):
305         * UIProcess/ios/WKContentView.mm:
306         (-[WKContentView willMoveToWindow:]):
307         (-[WKContentView didMoveToWindow]):
308         (-[WKContentView browsingContextController]):
309
310 2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>
311
312         [EFL] Remove unused const variable from EwkView.cpp
313         https://bugs.webkit.org/show_bug.cgi?id=145512
314
315         Reviewed by Gyuyoung Kim.
316
317         * UIProcess/API/efl/EwkView.cpp:
318
319 2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>
320
321         [cmake] Suppress unused parameter warnings in WebKit2 and TestNetscapePlugIn
322         https://bugs.webkit.org/show_bug.cgi?id=145264
323
324         Reviewed by Carlos Garcia Campos.
325
326         * CMakeLists.txt: Use COMPILE_FLAGS instead of CMAKE_<C|CXX>_FLAGS to put -Wno-unused-parameter after -Wextra.
327
328 2015-05-31  Gavin Barraclough  <barraclough@apple.com>
329
330         PDFs always think they're visible on iOS.
331         https://bugs.webkit.org/show_bug.cgi?id=145493
332         <rdar://problem/19668879>
333
334         Reviewed by Andreas Kling.
335
336         The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
337         that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
338         the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView
339         (which is in the view hierarchy) does not listen for these events.
340
341         Visibility of the page should really just track the visibility of the WKWebView (and when
342         actually assessing the visibility it largely does - the page client checks the web view's
343         visibility, bar a FIXME, and the foreground/background check, which needs to change).
344         So notifications should really just come from the WKWebView.
345
346         The WKWebView already listens for the didMoveToWindow notification, it just was only updating
347         the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
348         WKContentView can just be removed.
349
350         There is one problem with this in that it would reverse the order of the calls to
351         viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
352         updating the screen pixel density. To fix this, move the call to _updateForScreen: to
353         willMoveToWindow:, to ensure it occurs before the page becomes visible.
354
355         This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
356         within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
357         to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
358         IPC traffic).
359
360         * UIProcess/API/Cocoa/WKWebView.mm:
361         (-[WKWebView didMoveToWindow]):
362             - should update all view state flags.
363         * UIProcess/ios/WKContentView.mm:
364         (-[WKContentView willMoveToWindow:]):
365             - should _updateForScreen:
366         (-[WKContentView didMoveToWindow]): Deleted.
367             - functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].
368
369 2015-05-30  Brady Eidson  <beidson@apple.com>
370
371         Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
372         https://bugs.webkit.org/show_bug.cgi?id=145495
373
374         Reviewed by Alexey Proskuryakov.
375
376         * WebProcess/WebPage/WebPage.cpp:
377         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
378
379 2015-05-29  Joseph Pecoraro  <pecoraro@apple.com>
380
381         Web Inspector: Crash closing a related tab with Web Inspector open while page is refreshing
382         https://bugs.webkit.org/show_bug.cgi?id=145488
383
384         Reviewed by Alexey Proskuryakov.
385
386         * WebProcess/WebPage/WebInspector.h:
387         * WebProcess/WebPage/WebInspector.cpp:
388         (WebKit::WebInspector::~WebInspector):
389         Ensure, no matter how we close, that we have invalidated the
390         frontend connection of which we are the client.
391
392         (WebKit::WebInspector::createInspectorPage):
393         This member variable will never be null.
394
395 2015-05-29  Andreas Kling  <akling@apple.com>
396
397         [iOS] When bouncing back from max pinch zoom scale, scaleChangeRate should be 0.
398         <https://webkit.org/b/145487>
399         <rdar://problem/20989389>
400
401         Reviewed by Benjamin Poulain.
402
403         Make sure we don't send WebCore some velocity data with non-zero scaleChangeRate
404         when we bounce back from being pinch-zoomed past the maximum scale.
405
406         This fixes an issue where the bounce-back animation would cause a burst of
407         unnecessary tile generation.
408
409         * WebProcess/WebPage/ios/WebPageIOS.mm:
410         (WebKit::adjustVelocityDataForBoundedScale):
411         (WebKit::WebPage::updateVisibleContentRects):
412
413 2015-05-29  Jon Lee  <jonlee@apple.com>
414
415         Fix preferences for wireless playback
416         https://bugs.webkit.org/show_bug.cgi?id=145477
417         rdar://problem/21166767
418
419         Reviewed by Anders Carlsson.
420
421         * UIProcess/API/C/WKPreferences.cpp: Add missing preference calls in C API.
422         * UIProcess/API/C/WKPreferencesRef.h:
423
424 2015-05-29  Enrica Casucci  <enrica@apple.com>
425
426         [iOS] Cursor hidden in text area once it scrolls.
427         https://bugs.webkit.org/show_bug.cgi?id=145451
428         rdar://problem/20356413
429
430         Reviewed by Simon Fraser.
431
432         This patch fixes both the touch scrolling inside the
433         overflow area as well as the programmatic scroll that
434         occurs when inserting a new line. The first issue is fixed by
435         implementing the chrome client methods didLayout,
436         didStartOverflowScroll and didEndOverflowScroll. The second
437         required changing the implementation of notifyRevealedSelectionByScrollingFrame.
438         We not only need to notify the client to redraw the selection,
439         but we also need to recompute the editorState, because scrolling
440         might have occurred.
441         I've removed the NotifyRevealedSelection message that was not needed
442         any longer, since EditorStateChanged will do exactly what we want.
443
444         * UIProcess/WebPageProxy.h:
445         * UIProcess/WebPageProxy.messages.in:
446         * UIProcess/ios/WebPageProxyIOS.mm:
447         (WebKit::WebPageProxy::editorStateChanged):
448         (WebKit::WebPageProxy::notifyRevealedSelection): Deleted.
449         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
450         (WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
451         (WebKit::WebChromeClient::didLayout):
452         (WebKit::WebChromeClient::didStartOverflowScroll):
453         (WebKit::WebChromeClient::didEndOverflowScroll):
454
455 2015-05-29  Chris Dumez  <cdumez@apple.com>
456
457         [iOS] Update WebContent process sandbox profile for AWD logging
458         https://bugs.webkit.org/show_bug.cgi?id=145473
459         <rdar://problem/20543269>
460
461         Reviewed by Darin Adler.
462
463         Update WebContent process sandbox profile for AWD logging.
464
465         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
466
467 2015-05-29  Anders Carlsson  <andersca@apple.com>
468
469         WebKit.framework installs or references Mac-only headers on iOS
470         https://bugs.webkit.org/show_bug.cgi?id=145471
471         rdar://problem/21161459
472
473         Reviewed by Dan Bernstein.
474
475         * UIProcess/API/C/mac/WKInspectorPrivateMac.h:
476         Add an #if !TARGET_OS_IPHONE guard around the entire header.
477
478 2015-05-29  Anders Carlsson  <andersca@apple.com>
479
480         WKScriptMessageInternal.h should be a project header, not a private header
481         https://bugs.webkit.org/show_bug.cgi?id=145464
482         rdar://problem/21161639
483
484         Reviewed by Dan Bernstein.
485
486         * WebKit2.xcodeproj/project.pbxproj:
487
488 2015-05-28  Alexey Proskuryakov  <ap@apple.com>
489
490         Clean up VisitedLinkProvider teardown
491         https://bugs.webkit.org/show_bug.cgi?id=145450
492         rdar://problem/20244726
493
494         Reviewed by Brady Eidson.
495
496         * UIProcess/VisitedLinkProvider.cpp:
497         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
498
499 2015-05-28  Brady Eidson  <beidson@apple.com>
500
501         Change method of signaling "should open external urls" to WebKit.
502         https://bugs.webkit.org/show_bug.cgi?id=145454
503
504         Reviewed by Dan Bernstein.
505
506         Making this a property on the request was never a good idea.
507
508         Adding a new extensible load SPI seems much better.
509
510         * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Removed.
511         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Removed.
512
513         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
514         (-[WKBrowsingContextController loadRequest:userData:]): Since this API is deprecated,
515           it always gets the default restrictive behavior.
516
517         * UIProcess/API/Cocoa/WKWebView.mm:
518         (-[WKWebView loadRequest:]):
519         (-[WKWebView loadRequest:withOptions:]): Take an options dictionary that, for now, 
520           only supports one option.
521         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
522
523         * WebKit2.xcodeproj/project.pbxproj:
524
525 2015-05-28  Anders Carlsson  <andersca@apple.com>
526
527         Make sure that we create the private WebKit.framework symlinks last
528         https://bugs.webkit.org/show_bug.cgi?id=145442
529         <rdar://problem/21142213>
530
531         Reviewed by Dan Bernstein.
532
533         Move the "Add Symlinks in /System/Library/PrivateFrameworks/WebKit.framework" build phase to
534         the "All" aggregate target. Also update the script now that INSTALL_PATH is different.
535
536         * WebKit2.xcodeproj/project.pbxproj:
537
538 2015-05-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
539
540         Code clean up for extracting information from the mix of WritingMode and TextDirection
541         https://bugs.webkit.org/show_bug.cgi?id=143399
542
543         Reviewed by Darin Adler.
544
545         * Shared/WebPopupItem.h:
546         * UIProcess/API/C/efl/WKAPICastEfl.h:
547         * UIProcess/WebPopupMenuProxy.h:
548         enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
549         WritingMode.h instead of including TextFlags.h.
550
551 2015-05-28  Antti Koivisto  <antti@apple.com>
552
553         Disable network cache for old clients
554         https://bugs.webkit.org/show_bug.cgi?id=145418
555
556         Reviewed by Andreas Kling.
557
558         Follow-up: Don't do linked-on-or-after checks for iOS Safari.
559
560         * UIProcess/Cocoa/VersionChecks.mm:
561         (WebKit::linkTimeVersion):
562         (WebKit::linkedOnOrAfter):
563
564 2015-05-28  Matt Rajca  <mrajca@apple.com>
565
566         Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
567         https://bugs.webkit.org/show_bug.cgi?id=145415
568
569         Reviewed by Eric Carlson.
570
571         * Configurations/FeatureDefines.xcconfig:
572
573 2015-05-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
574
575         Unreviewed, Fix build break since r184930.
576
577         * UIProcess/Storage/StorageManager.cpp:
578         (WebKit::StorageManager::createTransientLocalStorageMap): Pass a pointer of SecurityOrigin
579         in isSameSchemeHostPort().
580
581 2015-05-28  Zan Dobersek  <zdobersek@igalia.com>
582
583         Unreviewed. Fixing the build after r184950.
584
585         * UIProcess/Storage/StorageManager.cpp:
586         (WebKit::StorageManager::createSessionStorageMap): getOrCreateStorageArea()
587         now expects a Ref<WebCore::SecurityOrigin> object.
588
589 2015-05-28  Zan Dobersek  <zdobersek@igalia.com>
590
591         [WK2] Handle WebCore::SecurityOrigin objects through Ref<> where possible
592         https://bugs.webkit.org/show_bug.cgi?id=145373
593
594         Reviewed by Andreas Kling.
595
596         WebCore::SecurityOrigin creation functions in most cases return a
597         Ref<WebCore::SecurityOrigin> object. In the WebKit2 layer, those objects
598         were still largely converted to RefPtr<>s.
599
600         This patch switches to using Ref<> where possible. The remaining uses of
601         RefPtr<WebCore::SecurityOrigin> are present due to HashTables, to-be-copied
602         Vectors, WebCore::DatabaseManager::origins() API and code where non-null
603         WebCore::SecurityOrigin can't be guaranteed.
604
605         * DatabaseProcess/DatabaseProcess.cpp:
606         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
607         * NetworkProcess/NetworkProcess.cpp:
608         (WebKit::cfURLCacheOrigins):
609         * UIProcess/Storage/LocalStorageDatabase.cpp:
610         (WebKit::LocalStorageDatabase::create):
611         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
612         (WebKit::LocalStorageDatabase::openDatabase):
613         (WebKit::LocalStorageDatabase::close):
614         * UIProcess/Storage/LocalStorageDatabase.h:
615         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
616         (WebKit::LocalStorageDatabaseTracker::origins):
617         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
618         * UIProcess/Storage/StorageManager.cpp:
619         (WebKit::StorageManager::StorageArea::securityOrigin):
620         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
621         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
622         (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
623         (WebKit::StorageManager::StorageArea::create):
624         (WebKit::StorageManager::StorageArea::StorageArea):
625         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
626         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
627         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
628         (WebKit::StorageManager::SessionStorageNamespace::origins):
629         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
630         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
631         * UIProcess/WebPageProxy.cpp:
632         (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
633         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
634         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
635         * WebProcess/InjectedBundle/InjectedBundle.cpp:
636         (WebKit::InjectedBundle::setApplicationCacheOriginQuota):
637         (WebKit::InjectedBundle::resetApplicationCacheOriginQuota):
638         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
639         (WebKit::WebResourceCacheManager::returnCacheOrigins):
640         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
641         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
642         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
643         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
644         (WebKit::WebDatabaseManager::setQuotaForOrigin):
645
646 2015-05-19  Jon Honeycutt  <jhoneycutt@apple.com>
647
648         [iOS] When viewing an MJPEG stream as the main resource, only the first
649         frame paints
650
651         <https://bugs.webkit.org/show_bug.cgi?id=145185>
652         <rdar://problem/20124694>
653
654         Reviewed by Darin Adler.
655
656         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
657         (WebKit::WebFrameLoaderClient::willReplaceMultipartContent):
658         Tell the WebPage that we will replace multipart content.
659
660         (WebKit::WebFrameLoaderClient::didReplaceMultipartContent):
661         Tell the WebPage that we did replace multipart content.
662
663         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
664         * WebProcess/WebPage/DrawingArea.h:
665
666         * WebProcess/WebPage/WebPage.cpp:
667         (WebKit::WebPage::willReplaceMultipartContent):
668         Save the exposed content rect.
669         (WebKit::WebPage::didReplaceMultipartContent):
670         Restore the exposed content rect that was saved before this load. This
671         fixes the issue for WK2.
672
673         * WebProcess/WebPage/WebPage.h:
674
675         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
676         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
677         (WebKit::RemoteLayerTreeDrawingArea::exposedContentRect):
678
679 2015-05-22  Jon Lee  <jonlee@apple.com>
680
681         Fix macros for wireless playback
682         https://bugs.webkit.org/show_bug.cgi?id=145239
683         rdar://problem/21049541
684
685         Reviewed by Anders Carlsson.
686
687         Encompass the logic within ENABLE(WIRELESS_TARGET_PLAYBACK). Update property name.
688
689         * UIProcess/API/Cocoa/WKWebView.mm:
690         (-[WKWebView initWithFrame:configuration:]):
691         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Update names. Add a WKDeprecated
692         category section.
693         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
694         (-[WKWebViewConfiguration init]): Update name of variables to reflect new property names.
695         (-[WKWebViewConfiguration copyWithZone:]): Ditto.
696         (-[WKWebViewConfiguration mediaPlaybackAllowsAirPlay]): Get and set off of the new
697         variable.
698         (-[WKWebViewConfiguration setMediaPlaybackAllowsAirPlay:]): Ditto.
699         (-[WKWebViewConfiguration mediaPlaybackRequiresUserAction]): Ditto.
700         (-[WKWebViewConfiguration setMediaPlaybackRequiresUserAction:]): Ditto.
701
702 2015-05-27  Brady Eidson  <beidson@apple.com>
703
704         Add a "should open urls externally" flag to DocumentLoader.
705         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417
706
707         Reviewed by Geoff Garen.
708
709         Rename "user initiated" to "should open external URLs":
710         * Shared/API/Cocoa/_WKNSURLRequestExtras.h:
711         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
712         (-[NSURLRequest _web_shouldOpenExternalURLs]):
713         (-[NSMutableURLRequest _web_setShouldOpenExternalURLs:]):
714         (-[NSURLRequest _web_isUserInitiated]): Deleted.
715         (-[NSMutableURLRequest _web_setIsUserInitiated:]): Deleted.
716         
717         Hold the new flag as a bool, and encode/decode it across IPC:
718         * Shared/NavigationActionData.cpp:
719         (WebKit::NavigationActionData::encode):
720         (WebKit::NavigationActionData::decode):
721         (WebKit::NavigationActionData::NavigationActionData): Deleted.
722         * Shared/NavigationActionData.h:
723
724         * UIProcess/API/APINavigationAction.h: Add accessor for the bool flag.
725
726         * UIProcess/API/C/WKPage.cpp:
727         (WKPageLoadURLWithUserData): Use "ShouldNotAllow" in the legacy C API for now.
728         (WKPageLoadURLRequestWithUserData): Ditto.
729
730         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
731         (-[WKBrowsingContextController loadRequest:userData:]): Set the value of the flag
732           based on whether or not the initiating NSURLRequest was user initiated.
733
734         * UIProcess/API/Cocoa/WKNavigationAction.mm:
735         (-[WKNavigationAction _shouldOpenExternalURLs]): Add accessor for the bool flag.
736         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
737
738         * UIProcess/API/Cocoa/WKWebView.mm:
739         (-[WKWebView loadRequest:]): Set the value of the flag based on whether or not the
740           initiating NSURLRequest was user initiated.
741
742         * UIProcess/WebPageProxy.cpp:
743         (WebKit::WebPageProxy::loadRequest): Pass the value down to the WebProcess to load.
744         (WebKit::WebPageProxy::loadFile): Ditto, but always with "ShouldNotAllow".
745         * UIProcess/WebPageProxy.h:
746
747         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
748         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Translate 
749           the NavigationAction flag to a bool in the NavigationActionData object.
750
751         * WebProcess/WebPage/WebPage.cpp:
752         (WebKit::WebPage::loadRequest): Set the value of the flag in the FrameLoadRequest that
753           will be loaded.
754         * WebProcess/WebPage/WebPage.h:
755         * WebProcess/WebPage/WebPage.messages.in:
756
757 2015-05-27  Anders Carlsson  <andersca@apple.com>
758
759         Can't load local files in WKWebView from containerized app
760         https://bugs.webkit.org/show_bug.cgi?id=145424
761         rdar://problem/20831176
762
763         Reviewed by Dan Bernstein.
764
765         Allow the network process to load local files from its bundle as long as it has
766         the sandbox extensions to do so.
767
768         This was originally added to only allow SSO to read the Info.plist inside its own application
769         bundle, but being able to read the application bundle from within the network process should be OK.
770
771         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
772
773 2015-05-27  Andreas Kling  <akling@apple.com>
774
775         [WK2] Local storage areas should get torn down when they have no remaining references.
776         <https://webkit.org/b/143339>
777         <rdar://problem/20156436>
778
779         Reviewed by Darin Adler.
780
781         Let StorageNamespaceImpl own its StorageAreaMaps weakly instead of through RefPtr.
782         Ownership is flipped so that StorageAreaMap refs the StorageNamespaceImpl instead.
783         This allows the StorageAreaMaps to get destroyed once all of its clients are gone.
784
785         Practically speaking, this means that the garbage collector now decides when local
786         storage databases can be closed, instead of us keeping them open for the lifetime
787         of the web process.
788
789         For session storage, it works a bit differently. In the web process, they get torn
790         down when their last client disappears, but they stay alive in the UI process.
791         If/when the web process asks the UI process to open session storage for an origin,
792         the UI process checks if one already exists, and if so, just updates the ID of the
793         old storage with the new one provided by the web process.
794
795         * UIProcess/Storage/StorageManager.cpp:
796         (WebKit::StorageManager::StorageArea::isSessionStorage):
797         (WebKit::StorageManager::createTransientLocalStorageMap):
798         (WebKit::StorageManager::createSessionStorageMap):
799         (WebKit::StorageManager::destroyStorageMap):
800         * WebProcess/Storage/StorageAreaImpl.cpp:
801         (WebKit::StorageAreaImpl::securityOrigin):
802         * WebProcess/Storage/StorageAreaImpl.h:
803         * WebProcess/Storage/StorageAreaMap.cpp:
804         (WebKit::StorageAreaMap::StorageAreaMap):
805         (WebKit::StorageAreaMap::~StorageAreaMap):
806         * WebProcess/Storage/StorageAreaMap.h:
807         (WebKit::StorageAreaMap::securityOrigin):
808         * WebProcess/Storage/StorageNamespaceImpl.cpp:
809         (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
810         (WebKit::StorageNamespaceImpl::storageArea):
811         * WebProcess/Storage/StorageNamespaceImpl.h:
812
813 2015-05-27  Antti Koivisto  <antti@apple.com>
814
815         Disable network cache for old clients
816         https://bugs.webkit.org/show_bug.cgi?id=145418
817         rdar://problem/21126587
818
819         Reviewed by Andy Estes.
820
821         Old clients might use NSURLCache API to clear the cache. New cache requires use of new APIs.
822
823         * UIProcess/Cocoa/VersionChecks.h: Added.
824         * UIProcess/Cocoa/VersionChecks.mm: Added.
825
826             Add linked-on-or-after check mechanism similar to WebKit1.
827
828         (WebKit::linkTimeVersion):
829         (WebKit::linkedOnOrAfter):
830         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
831         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
832
833             Use it when deciding whether to enable the cache.
834
835         * WebKit2.xcodeproj/project.pbxproj:
836
837 2015-05-27  Dean Jackson  <dino@apple.com>
838
839         img.currentSrc problem in strict mode with old picturefill
840         https://bugs.webkit.org/show_bug.cgi?id=144095
841         <rdar://problem/21087013>
842
843         Reviewed by Simon Fraser.
844
845         Add a PICTURE_SIZES flag.
846
847         * Configurations/FeatureDefines.xcconfig:
848
849 2015-05-27  Chris Dumez  <cdumez@apple.com>
850
851         Assertion hit in WebPage::didChangeSelection()
852         https://bugs.webkit.org/show_bug.cgi?id=145413
853         <rdar://problem/21001129>
854
855         Reviewed by Ryosuke Niwa.
856
857         We sometimes hit the "ASSERT(layoutCount == view->layoutCount())"
858         assertion in WebPage::didChangeSelection(). We manage to prevent
859         synchronous layouts in most cases when calling editorState(). However,
860         it seems it can still happen in some cases. Crashing in this case seems
861         overkill and can be annoying to other developers, especially
862         considering the implications are only on performance.
863
864         This patch drops the assertion.
865
866         * WebProcess/WebPage/WebPage.cpp:
867         (WebKit::WebPage::didChangeSelection): Deleted.
868
869 2015-05-27  Anders Carlsson  <andersca@apple.com>
870
871         Address a follow-up review comment from Darin.
872
873         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
874         (WebKit::WebsiteDataStore::removeMediaKeys):
875
876 2015-05-26  Anders Carlsson  <andersca@apple.com>
877
878         WKWebsiteDataStore should handle media keys
879         https://bugs.webkit.org/show_bug.cgi?id=145394
880         rdar://problem/20617794.
881
882         Reviewed by Darin Adler.
883
884         * Shared/WebsiteData/WebsiteDataTypes.h:
885         Add WebsiteDataTypeMediaKeys enum.
886
887         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
888         (API::WebsiteDataStore::defaultDataStoreConfiguration):
889         Set up mediaKeysStorageDirectory.
890
891         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
892         (dataTypesToString):
893         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
894         (WebKit::toWebsiteDataTypes):
895         (WebKit::toWKWebsiteDataTypes):
896         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Added.
897         Add _WKWebsiteDataTypeMediaKeys.
898
899         * UIProcess/WebProcessPool.cpp:
900         (WebKit::legacyWebsiteDataStoreConfiguration):
901         Set up mediaKeysStorageDirectory.
902
903         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
904         (WebKit::WebsiteDataStore::WebsiteDataStore):
905         Set m_mediaKeysStorageDirectory.
906
907         (WebKit::WebsiteDataStore::fetchData):
908         Make CallbackAggregator ThreadSafeRefCounted.
909         Handle WebsiteDataTypeMediaKeys by calling mediaKeyOrigins on our background queue.
910
911         (WebKit::WebsiteDataStore::removeData):
912         Make CallbackAggregator ThreadSafeRefCounted.
913         Handle WebsiteDataTypeMediaKeys by calling removeMediaKeys on our background queue.
914
915         (WebKit::WebsiteDataStore::mediaKeyOrigins):
916         Compute the origins.
917
918         (WebKit::computeMediaKeyFile):
919         Add helper function that returns the media key given a containing directory.
920
921         (WebKit::WebsiteDataStore::removeMediaKeys):
922         Remove media key files.
923
924         * UIProcess/WebsiteData/WebsiteDataStore.h:
925         Add new members.
926
927         * WebKit2.xcodeproj/project.pbxproj:
928         Add new files.
929
930 2015-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
931
932         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.2 release.
933
934         * gtk/NEWS: Add release notes for 2.9.2.
935
936 2015-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
937
938         [SOUP] Network Cache: Handle the case when we fail to create the IO stream
939         https://bugs.webkit.org/show_bug.cgi?id=145406
940
941         Reviewed by Sergio Villar Senin.
942
943         We were asserting in that case, but it can happen that we
944         fail to create the stream. It happened to me after r184690, that
945         changed the NetworkCache::Key hash. Since this was not expected to
946         happen, the async operation never finished and the completion
947         handler never called, leaving resources loading forever. We
948         should make sure we call the completion handler with an error
949         code, so that the load finishes and the entry is silently removed
950         from the cache.
951
952         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
953         (WebKit::NetworkCache::IOChannel::read):
954         (WebKit::NetworkCache::IOChannel::readSync):
955         (WebKit::NetworkCache::IOChannel::write):
956
957 2015-05-26  Carlos Garcia Campos  <cgarcia@igalia.com>
958
959         Network Cache: Add cache capacity to the totals of JSON file
960         https://bugs.webkit.org/show_bug.cgi?id=145246
961
962         Reviewed by Antti Koivisto.
963
964         * NetworkProcess/cache/NetworkCache.cpp:
965         (WebKit::NetworkCache::Cache::dumpContentsToFile):
966         * NetworkProcess/cache/NetworkCacheStorage.h:
967         (WebKit::NetworkCache::Storage::capacity):
968
969 2015-05-26  Anders Carlsson  <andersca@apple.com>
970
971         Add a symlink for every file inside /S/L/F/WebKit.framework to the PrivateFrameworks mirror.
972
973         rdar://problem/21111232.
974
975         Reviewed by Dan Bernstein.
976
977         * WebKit2.xcodeproj/project.pbxproj:
978
979 2015-05-26  Hunseop Jeong  <hs85.jeong@samsung.com>
980
981         [EFL] webview should be updated from (0,0) when using the evasGL.
982         https://bugs.webkit.org/show_bug.cgi?id=137948
983
984         Reviewed by Gyuyoung Kim.
985
986         Changed the point of the start position to update the evasObject
987         correctly when using the evasGL for graphics backend.
988
989         * UIProcess/API/efl/EwkView.cpp:
990         (EwkView::displayTimerFired):
991
992 2015-05-26  Dan Bernstein  <mitz@apple.com>
993
994         <rdar://problem/21104551> Update build settings
995
996         Reviewed by Anders Carlsson.
997
998         * Configurations/DebugRelease.xcconfig:
999         * Configurations/FeatureDefines.xcconfig:
1000         * Configurations/Version.xcconfig:
1001         * Configurations/WebContentService.Development.xcconfig:
1002         * Configurations/WebContentService.xcconfig:
1003
1004 2015-05-26  Milan Crha  <mcrha@redhat.com>
1005
1006         [GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
1007         https://bugs.webkit.org/show_bug.cgi?id=138134
1008
1009         Reviewed by Žan Doberšek.
1010
1011         * PlatformGTK.cmake: Command line with expanded resources exceeds 32KB, which
1012         is a limit on Windows. It's better to expand wildcards inside the python script.
1013
1014 2015-05-25  Dan Bernstein  <mitz@apple.com>
1015
1016         ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
1017         https://bugs.webkit.org/show_bug.cgi?id=145372
1018
1019         Reviewed by Sam Weinig.
1020
1021         * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
1022
1023 2015-05-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1024
1025         [GTK] Add construct property to WebKitWebContext to set the IndexedDB database directory
1026         https://bugs.webkit.org/show_bug.cgi?id=140882
1027
1028         Reviewed by Gustavo Noronha Silva.
1029
1030         Add WebKitWebContext:indexed-db-database-directory construct only property.
1031
1032         * UIProcess/API/gtk/WebKitWebContext.cpp:
1033         (webkitWebContextGetProperty):
1034         (webkitWebContextSetProperty):
1035         (webkitWebContextConstructed):
1036         (webkit_web_context_class_init):
1037
1038 2015-05-24  Sam Weinig  <sam@webkit.org>
1039
1040         Crash when using a removed ScriptMessageHandler
1041         <rdar://problem/20888499>
1042         https://bugs.webkit.org/show_bug.cgi?id=145359
1043
1044         Reviewed by Dan Bernstein.
1045
1046         * WebProcess/UserContent/WebUserContentController.cpp:
1047         (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
1048         Invalidate the descriptor when the message handler client (as implemented by WebUserMessageHandlerDescriptorProxy)
1049         goes away. This will happen if a script message handler is removed at the API level or the WebUserContentController
1050         is destroyed (which will happen if all the pages get destroyed).
1051
1052 2015-05-23  Dan Bernstein  <mitz@apple.com>
1053
1054         <rdar://problem/21090327> /S/L/PrivateFrameworks/WebKit.framework is missing Headers and PrivateHeaders symlinks
1055         https://bugs.webkit.org/show_bug.cgi?id=145354
1056
1057         Reviewed by David Kilzer.
1058
1059         * WebKit2.xcodeproj/project.pbxproj: Create Headers and PrivateHeaders symlinks alongside
1060         the dylib symlink.
1061
1062 2015-05-23  Sungmann Cho  <sungmann.cho@navercorp.com>
1063
1064         Rename ShareableResource::create(Handle&) to map(Handle&) to match SharedMemory.
1065         https://bugs.webkit.org/show_bug.cgi?id=145288
1066
1067         Reviewed by Sam Weinig.
1068
1069         * Shared/ShareableResource.cpp:
1070         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
1071         (WebKit::ShareableResource::map):
1072         (WebKit::ShareableResource::create): Deleted.
1073         * Shared/ShareableResource.h:
1074
1075 2015-05-22  Jon Lee  <jonlee@apple.com>
1076
1077         Rename MediaPlaybackAllowsInline
1078         https://bugs.webkit.org/show_bug.cgi?id=145315
1079
1080         Reviewed by Eric Carlson.
1081
1082         Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.
1083
1084         * Shared/WebPreferencesDefinitions.h:
1085         * UIProcess/API/C/WKPreferences.cpp:
1086         (WKPreferencesSetMediaPlaybackAllowsInline): Update the call to preferences.
1087         The C API will not change in a future patch.
1088         (WKPreferencesGetMediaPlaybackAllowsInline): Ditto.
1089         * UIProcess/API/Cocoa/WKWebView.mm:
1090         (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
1091         * WebProcess/WebPage/WebPage.cpp:
1092         (WebKit::WebPage::updatePreferences): Ditto.
1093
1094         * UIProcess/API/gtk/WebKitSettings.cpp: Update the call.
1095         (webkit_settings_get_media_playback_allows_inline):
1096         (webkit_settings_set_media_playback_allows_inline):
1097
1098 2015-05-22  Jon Lee  <jonlee@apple.com>
1099
1100         Rename MediaPlaybackAllowsAirPlay
1101         https://bugs.webkit.org/show_bug.cgi?id=145316
1102
1103         Reviewed by Eric Carlson.
1104
1105         In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
1106         to allowsAirPlayForMediaPlayback.
1107
1108         * Shared/WebPreferencesDefinitions.h: Update the name.
1109         * UIProcess/API/Cocoa/WKWebView.mm:
1110         (-[WKWebView initWithFrame:configuration:]): Ditto.
1111         * WebProcess/WebPage/WebPage.cpp:
1112         (WebKit::WebPage::updatePreferences): Update the call to settings.
1113
1114 2015-05-22  Jon Lee  <jonlee@apple.com>
1115
1116         Unreviewed GTK fix after r184802.
1117
1118         * UIProcess/API/gtk/WebKitSettings.cpp:
1119         (webkit_settings_get_media_playback_requires_user_gesture):
1120         (webkit_settings_set_media_playback_requires_user_gesture):
1121
1122 2015-05-22  Jon Lee  <jonlee@apple.com>
1123
1124         Rename MediaPlaybackRequiresUserGesture
1125         https://bugs.webkit.org/show_bug.cgi?id=145314
1126
1127         Reviewed by Anders Carlsson.
1128
1129         In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
1130         to requiresUserGestureForMediaPlayback.
1131
1132         No changes are being made to the API in this patch.
1133
1134         * Shared/WebPreferencesDefinitions.h: Update the name of the macro and the setting.
1135         * UIProcess/API/C/WKPreferences.cpp: The C API will not change in a future patch.
1136         (WKPreferencesSetMediaPlaybackRequiresUserGesture): Update the call to preferences.
1137         (WKPreferencesGetMediaPlaybackRequiresUserGesture): Ditto.
1138         * UIProcess/API/Cocoa/WKWebView.mm:
1139         (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
1140         * WebProcess/WebPage/WebPage.cpp:
1141         (WebKit::WebPage::updatePreferences): Ditto.
1142
1143 2015-05-22  Commit Queue  <commit-queue@webkit.org>
1144
1145         Unreviewed, rolling out r183647.
1146         https://bugs.webkit.org/show_bug.cgi?id=145326
1147
1148         broke some toolbar blurring behavior (Requested by thorton on
1149         #webkit).
1150
1151         Reverted changeset:
1152
1153         "Asynchronous (or timed-out synchronous) resize flashes white
1154         instead of page background color"
1155         https://bugs.webkit.org/show_bug.cgi?id=144468
1156         http://trac.webkit.org/changeset/183647
1157
1158 2015-05-22  Yongjun Zhang  <yongjun_zhang@apple.com>
1159
1160         Image link doesn't create a preview view controller.
1161         https://bugs.webkit.org/show_bug.cgi?id=145320
1162
1163         Also try to create the preview view controller if the hit-tested node
1164         is a image link.
1165
1166         Reviewed by Beth Dakin.
1167
1168         * UIProcess/ios/WKContentViewInteraction.mm:
1169         (-[WKContentView gestureRecognizerShouldBegin:]):
1170         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1171
1172 2015-05-22  Tim Horton  <timothy_horton@apple.com>
1173
1174         Avoid doing an extra layout in some cases while doing scale-to-fit
1175         https://bugs.webkit.org/show_bug.cgi?id=145321
1176         <rdar://problem/21051165>
1177
1178         Reviewed by Beth Dakin.
1179
1180         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1181         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1182         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1183         If we make it to scaleViewToFitDocumentIfNeeded with valid layout,
1184         the view width is still less than the last-known minimum document size,
1185         and the document size hasn't changed, update the view scale without
1186         doing an extra layout, keeping the fixed layout size at the previously
1187         computed minimum document size.
1188
1189 2015-05-22  Beth Dakin  <bdakin@apple.com>
1190
1191         Yellow highlight and DD popover don't go away when scrolling an iframe
1192         https://bugs.webkit.org/show_bug.cgi?id=145312
1193         -and corresponding-
1194         rdar://problem/19692334
1195
1196         Reviewed by Tim Horton.
1197
1198         Match what Lookup already does for their popover and dismiss our popovers on 
1199         scroll.
1200         * UIProcess/API/mac/WKView.mm:
1201         (-[WKView scrollWheel:]):
1202
1203         This should not be needed anymore.
1204         * UIProcess/WebPageProxy.cpp:
1205         (WebKit::WebPageProxy::pageDidScroll):
1206
1207 2015-05-22  Tim Horton  <timothy_horton@apple.com>
1208
1209         Remove action menu support
1210         https://bugs.webkit.org/show_bug.cgi?id=145305
1211         <rdar://problem/21070771>
1212
1213         Reviewed by Anders Carlsson.
1214
1215         * Configurations/WebKit.xcconfig:
1216         * Shared/API/c/WKActionMenuItemTypes.h:
1217         * Shared/API/c/WKActionMenuTypes.h:
1218         * UIProcess/API/Cocoa/WKViewPrivate.h:
1219         * UIProcess/API/mac/WKView.mm:
1220         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
1221         (-[WKView dealloc]): Deleted.
1222         (-[WKView mouseDown:]): Deleted.
1223         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
1224         (-[WKView prepareForMenu:withEvent:]): Deleted.
1225         (-[WKView willOpenMenu:withEvent:]): Deleted.
1226         (-[WKView didCloseMenu:withEvent:]): Deleted.
1227         (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]): Deleted.
1228         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]): Deleted.
1229         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]): Deleted.
1230         * UIProcess/API/mac/WKViewInternal.h:
1231         * UIProcess/PageClient.h:
1232         * UIProcess/WebPageProxy.cpp:
1233         (WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
1234         (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
1235         (WebKit::WebPageProxy::performActionMenuHitTestAtLocation): Deleted.
1236         (WebKit::WebPageProxy::selectLastActionMenuRange): Deleted.
1237         (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult): Deleted.
1238         (WebKit::WebPageProxy::didPerformActionMenuHitTest): Deleted.
1239         * UIProcess/WebPageProxy.h:
1240         * UIProcess/WebPageProxy.messages.in:
1241         * UIProcess/mac/PageClientImpl.h:
1242         * UIProcess/mac/PageClientImpl.mm:
1243         (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
1244         (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
1245         * UIProcess/mac/WKActionMenuController.h: Removed.
1246         * UIProcess/mac/WKActionMenuController.mm: Removed.
1247         * UIProcess/mac/WKImmediateActionController.h:
1248         * UIProcess/mac/WKImmediateActionController.mm:
1249         (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
1250         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
1251         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1252         (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]): Deleted.
1253         * WebKit2.xcodeproj/project.pbxproj:
1254         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
1255         (API::InjectedBundle::PageContextMenuClient::prepareForImmediateAction):
1256         (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu): Deleted.
1257         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
1258         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1259         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
1260         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1261         (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
1262         (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu): Deleted.
1263         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
1264         * WebProcess/WebPage/WebPage.h:
1265         * WebProcess/WebPage/WebPage.messages.in:
1266         * WebProcess/WebPage/WebPageOverlay.cpp:
1267         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
1268         * WebProcess/WebPage/WebPageOverlay.h:
1269         (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
1270         * WebProcess/WebPage/mac/WebPageMac.mm:
1271         (WebKit::textIndicatorTransitionForImmediateAction):
1272         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
1273         (WebKit::textIndicatorTransitionForActionMenu): Deleted.
1274         (WebKit::WebPage::performActionMenuHitTestAtLocation): Deleted.
1275         (WebKit::WebPage::selectLastActionMenuRange): Deleted.
1276         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult): Deleted.
1277         Remove everything, except some enums that clients still refer to.
1278         Also, leave SPI that used to be shared between immediate actions and
1279         action menus intact, even if it had "action menu" in the name. We can
1280         deprecate and rename in another patch... except for the very recently-added
1281         support from r184106, which we'll revert entirely, removing WKBundlePageOverlayV2, 
1282         which was not adopted by any clients.
1283
1284 2015-05-22  Brady Eidson  <beidson@apple.com>
1285
1286         Rework how the ResourceRequest user initiated property key is used.
1287         Followup to https://bugs.webkit.org/show_bug.cgi?id=145281
1288
1289         Reviewed by Dan Bernstein.
1290
1291         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
1292         (-[NSURLRequest _web_isUserInitiated]):
1293         (-[NSMutableURLRequest _web_setIsUserInitiated:]):
1294
1295         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1296         (WKResourceRequestIsUserInitiatedKey): Deleted.
1297         (InitWebCoreSystemInterface): Deleted.
1298
1299 2015-05-21  Gavin Barraclough  <barraclough@apple.com>
1300
1301         Networking process sometimes suspended while WebContent runnable
1302         https://bugs.webkit.org/show_bug.cgi?id=145291
1303         <rdar://problem/21033029>
1304
1305         Reviewed by Andreas Kling.
1306
1307         There is an asymmetry in how the Networking process suspension is managed.
1308         We drop the assertion (& suspend the process) whenever the WebProcess says
1309         it is ready to suspend, but we only take the assertion (& resume execution)
1310         when the WebContent process is actually resumed. This leaves a race – where
1311         the WebContent process was willing to be suspended, but the UI app changed
1312         its mind suspending it. Since the WebContent process never actually suspended
1313         (we only prepared it to), we never send a resume, and since we never resume,
1314         we never wake the Networking process.
1315
1316         The fix is pretty clean. A web process should take a token on the networking
1317         process precisely whenever it holds an assertion on the web content process.
1318         This also enables a nice refinement, that when holding a BG assertion on the
1319         WebContent process we only need to hold a BG assertion on the networking
1320         process.
1321
1322         * UIProcess/Network/NetworkProcessProxy.cpp:
1323         (WebKit::NetworkProcessProxy::didSetAssertionState):
1324             - no-op
1325         * UIProcess/Network/NetworkProcessProxy.h:
1326             - added didSetAssertionState.
1327         * UIProcess/ProcessThrottler.cpp:
1328         (WebKit::ProcessThrottler::updateAssertionNow):
1329         (WebKit::ProcessThrottler::updateAssertion):
1330         (WebKit::ProcessThrottler::didConnectToProcess):
1331             - whenever taking/updating the assertion, inform the client via didSetAssertionState.
1332         * UIProcess/ProcessThrottlerClient.h:
1333             - added didSetAssertionState.
1334         * UIProcess/WebProcessProxy.cpp:
1335         (WebKit::WebProcessProxy::didFinishLaunching):
1336             removed initializeNetworkProcessActivityToken - this is taken via ProcessThrottler::didConnectToProcess.
1337         (WebKit::WebProcessProxy::sendProcessDidResume):
1338             - removed call to initializeNetworkProcessActivityToken - updated via didSetAssertionState.
1339         (WebKit::WebProcessProxy::processReadyToSuspend):
1340             - removed update of m_tokenForNetworkProcess - updated via didSetAssertionState.
1341         (WebKit::WebProcessProxy::didSetAssertionState):
1342             - update m_backgroundTokenForNetworkProcess/m_foregroundTokenForNetworkProcess.
1343         (WebKit::WebProcessProxy::initializeNetworkProcessActivityToken): Deleted.
1344             - updated via didSetAssertionState.
1345         * UIProcess/WebProcessProxy.h:
1346             - added didSetAssertionState, added separate FG/BG activity tokens for Networking process.
1347
1348 2015-05-22  Dan Bernstein  <mitz@apple.com>
1349
1350         Fixed the fix for <rdar://problem/20830673> Symlink the WebKit dylib instead of just the framework directory
1351         https://bugs.webkit.org/show_bug.cgi?id=145287
1352
1353         Reviewed by Anders Carlsson.
1354
1355         * WebKit2.xcodeproj/project.pbxproj: Give the symlink the correct destination.
1356
1357 2015-05-21  Brady Eidson  <beidson@apple.com>
1358
1359         Add an "initiated by user gesture" flag to ResourceRequest.
1360         https://bugs.webkit.org/show_bug.cgi?id=145281
1361
1362         Reviewed by Alex Christensen.
1363
1364         Expose a new category on NSURLRequest to allow SPI clients to easily set/get the flag:
1365         * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Added.
1366         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Added.
1367         (-[NSURLRequest _web_isUserInitiated]):
1368         (-[NSMutableURLRequest _web_setIsUserInitiated:]):
1369
1370         * WebKit2.xcodeproj/project.pbxproj:
1371
1372         Expose the new property key to WebCore:
1373         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1374         (WKResourceRequestIsUserInitiatedKey):
1375         (InitWebCoreSystemInterface):
1376
1377 2015-05-21  Daniel Bates  <dabates@apple.com>
1378
1379         Rollout <http://trac.webkit.org/changeset/183909>
1380         (https://bugs.webkit.org/show_bug.cgi?id=144657)
1381
1382         Revert <http://trac.webkit.org/changeset/183909> since pausing the database
1383         thread prevents in-progress transactions from completing. We need to think
1384         about this change some more.
1385
1386         * UIProcess/WebPageProxy.h:
1387         * UIProcess/ios/WKContentView.mm:
1388         (-[WKContentView _applicationDidEnterBackground:]): Deleted.
1389         * UIProcess/ios/WebPageProxyIOS.mm:
1390         (WebKit::WebPageProxy::applicationDidEnterBackground): Deleted.
1391         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1392         (WebKit::WebDatabaseManager::setPauseAllDatabases): Deleted.
1393         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1394         * WebProcess/WebPage/WebPage.h:
1395         * WebProcess/WebPage/WebPage.messages.in:
1396         * WebProcess/WebPage/ios/WebPageIOS.mm:
1397         (WebKit::WebPage::applicationWillEnterForeground): Deleted.
1398         (WebKit::WebPage::applicationDidEnterBackground): Deleted.
1399
1400 2015-05-21  Enrica Casucci  <enrica@apple.com>
1401
1402         [iOS] Crash when taking a snapshot of a large PDF.
1403         https://bugs.webkit.org/show_bug.cgi?id=145286
1404         rdar://problem/20892362
1405
1406         Reviewed by Tim Horton.
1407
1408         The code for the PDF case was incorrectly computing the snapshot rect.
1409         On top of that drawViewHierarchyInRect was ignoring the rect and
1410         always creating an image using the view bounds causing the crash.
1411         We are now always using the IOSurface if we are parented or
1412         an image context when we are not.
1413
1414         * UIProcess/API/Cocoa/WKWebView.mm:
1415         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1416
1417 2015-05-21  Anders Carlsson  <andersca@apple.com>
1418
1419         Symlink the WebKit dylib instead of just the framework directory
1420         https://bugs.webkit.org/show_bug.cgi?id=145287
1421         rdar://problem/20830673
1422
1423         Reviewed by Dan Bernstein.
1424
1425         * WebKit2.xcodeproj/project.pbxproj:
1426
1427 2015-05-21  Anders Carlsson  <andersca@apple.com>
1428
1429         WKWebsiteDataStore doesn't track and remove iOS Safari's offline application cache entries
1430         https://bugs.webkit.org/show_bug.cgi?id=145279
1431         rdar://problem/20657912
1432
1433         Reviewed by Dan Bernstein.
1434
1435         Special-case iOS Safari and WebApp when computing the default application cache directory.
1436
1437         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1438         (API::applicationCacheDirectory):
1439         (API::WebsiteDataStore::defaultDataStoreConfiguration):
1440
1441 2015-05-21  Brian Weinstein  <bweinstein@apple.com>
1442
1443         Add a _WKWebKitContentExtensionStore initializer that takes a path.
1444         https://bugs.webkit.org/show_bug.cgi?id=145269 and work towards <rdar://problem/21031414>
1445
1446         Reviewed by Anders Carlsson.
1447
1448         * UIProcess/API/APIUserContentExtensionStore.cpp:
1449         (API::UserContentExtensionStore::storeWithPath):
1450         * UIProcess/API/APIUserContentExtensionStore.h:
1451         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
1452         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
1453         (+[_WKUserContentExtensionStore storeWithURL:]):
1454
1455 2015-05-21  Alexey Proskuryakov  <ap@apple.com>
1456
1457         Build fix. Silence some deprecation warnings.
1458
1459         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1460         (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
1461         * UIProcess/ios/forms/WKFormInputControl.mm:
1462         (-[WKDateTimePopover initWithView:datePickerMode:]):
1463         * UIProcess/ios/forms/WKFormPopover.h:
1464         * UIProcess/ios/forms/WKFormPopover.mm:
1465         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1466         (-[WKSelectPopover initWithView:hasGroups:]):
1467
1468 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
1469
1470         [EFL] Remove an unused private field from EwkPopupMenuItem class
1471         https://bugs.webkit.org/show_bug.cgi?id=145249
1472
1473         Reviewed by Gyuyoung Kim.
1474
1475         * UIProcess/API/efl/ewk_popup_menu.cpp:
1476         (EwkPopupMenu::EwkPopupMenu):
1477         * UIProcess/API/efl/ewk_popup_menu_private.h:
1478
1479 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
1480
1481         [EFL] Fix mismatched-tags warnings in UIProcess/API/efl
1482         https://bugs.webkit.org/show_bug.cgi?id=145129
1483
1484         Reviewed by Gyuyoung Kim.
1485
1486         * UIProcess/API/efl/EwkViewCallbacks.h:
1487         * UIProcess/API/efl/ewk_application_cache_manager.h:
1488         * UIProcess/API/efl/ewk_auth_request.h:
1489         * UIProcess/API/efl/ewk_back_forward_list.h:
1490         * UIProcess/API/efl/ewk_back_forward_list_item.h:
1491         * UIProcess/API/efl/ewk_color_picker.h:
1492         * UIProcess/API/efl/ewk_context.h:
1493         * UIProcess/API/efl/ewk_context_menu_item.h:
1494         * UIProcess/API/efl/ewk_cookie_manager.h:
1495         * UIProcess/API/efl/ewk_database_manager.h:
1496         * UIProcess/API/efl/ewk_download_job.h:
1497         * UIProcess/API/efl/ewk_error.h:
1498         * UIProcess/API/efl/ewk_favicon_database.h:
1499         * UIProcess/API/efl/ewk_file_chooser_request.h:
1500         * UIProcess/API/efl/ewk_form_submission_request.h:
1501         * UIProcess/API/efl/ewk_navigation_data.h:
1502         * UIProcess/API/efl/ewk_navigation_policy_decision.h:
1503         * UIProcess/API/efl/ewk_object.h:
1504         * UIProcess/API/efl/ewk_page_group.h:
1505         * UIProcess/API/efl/ewk_popup_menu.h:
1506         * UIProcess/API/efl/ewk_popup_menu_item.h:
1507         * UIProcess/API/efl/ewk_security_origin.h:
1508         * UIProcess/API/efl/ewk_settings.h:
1509         * UIProcess/API/efl/ewk_storage_manager.h:
1510         * UIProcess/API/efl/ewk_url_request.h:
1511         * UIProcess/API/efl/ewk_url_response.h:
1512         * UIProcess/API/efl/ewk_url_scheme_request.h:
1513         * UIProcess/API/efl/ewk_view.h:
1514         * UIProcess/API/efl/ewk_window_features.h:
1515         * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
1516         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
1517
1518 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
1519
1520         Fix mismatched-tags warnings related to CoordinatedGraphics
1521         https://bugs.webkit.org/show_bug.cgi?id=145130
1522
1523         Reviewed by Darin Adler.
1524
1525         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1526         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
1527         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1528
1529 2015-05-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1530
1531         Unreviewed GTK build fix since r184686.
1532
1533         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1534         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
1535         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
1536
1537 2015-05-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1538
1539         Unreviewed EFL build fix since r184686.
1540
1541         * UIProcess/efl/WebProcessPoolEfl.cpp:
1542         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
1543         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
1544
1545 2015-05-20  Chris Dumez  <cdumez@apple.com>
1546
1547         [WK2][iOS] Update WebContent process sandbox profile for AWD logging
1548         https://bugs.webkit.org/show_bug.cgi?id=145229
1549         <rdar://problem/20543269>
1550
1551         Reviewed by Alexey Proskuryakov.
1552
1553         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1554
1555 2015-05-20  Gavin Barraclough  <barraclough@apple.com>
1556
1557         dispatchViewStateChange should not wait for sync reply if the page isn't visible
1558         https://bugs.webkit.org/show_bug.cgi?id=145242
1559         <rdar://problem/20967937>
1560
1561         Reviewed by Ben Poulain.
1562
1563         This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.
1564
1565
1566         * UIProcess/WebPageProxy.cpp:
1567         (WebKit::WebPageProxy::dispatchViewStateChange):
1568         (WebKit::WebPageProxy::waitForDidUpdateViewState):
1569
1570 2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>
1571
1572         Enable disk cache for range requests
1573         https://bugs.webkit.org/show_bug.cgi?id=144682
1574
1575         Reviewed by Antti Koivisto.
1576
1577         Add Range header value to the network cache key constructor so we take
1578         into account this value. The 206 response code is also marked to be cached.
1579
1580         * NetworkProcess/cache/NetworkCache.cpp:
1581         (WebKit::NetworkCache::makeCacheKey):
1582         (WebKit::NetworkCache::isStatusCodeCacheableByDefault):
1583         * NetworkProcess/cache/NetworkCacheKey.cpp:
1584         (WebKit::NetworkCache::Key::Key):
1585         (WebKit::NetworkCache::Key::operator=):
1586         (WebKit::NetworkCache::Key::computeHash):
1587         (WebKit::NetworkCache::Key::operator==):
1588         (WebKit::NetworkCache::Key::encode):
1589         (WebKit::NetworkCache::Key::decode):
1590         (WebKit::NetworkCache::Key::stringToHash): Deleted.
1591         * NetworkProcess/cache/NetworkCacheKey.h:
1592
1593 2015-05-20  Anders Carlsson  <andersca@apple.com>
1594
1595         WKWebsiteDataStore API doesn't report webkit.org as using Databases or App Cache after visiting http://www.webkit.org/demos/sticky-notes/
1596         https://bugs.webkit.org/show_bug.cgi?id=145238
1597         rdar://problem/20581175
1598
1599         Reviewed by Tim Horton.
1600
1601         Make sure to set the application cache and WebSQL directories when using the legacy data store.
1602
1603         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1604         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
1605         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
1606         Rename this and move it to the right place.
1607
1608         * UIProcess/WebProcessPool.cpp:
1609         (WebKit::legacyWebsiteDataStoreConfiguration):
1610         Rename this and add the application cache and WebSQL directories.
1611
1612         (WebKit::WebProcessPool::WebProcessPool):
1613         Call legacyWebsiteDataStoreConfiguration.
1614
1615         (WebKit::WebProcessPool::applicationCacheDirectory):
1616         Call legacyPlatformDefaultApplicationCacheDirectory.
1617
1618         * UIProcess/WebProcessPool.h:
1619
1620 2015-05-20  Enrica Casucci  <enrica@apple.com>
1621
1622         [iOS] Using CSS viewport units causes incorrect layout.
1623         https://bugs.webkit.org/show_bug.cgi?id=145225
1624         rdar://problem/20924495
1625
1626         Reviewed by Benjamin Poulain.
1627
1628         * WebProcess/WebPage/ios/WebPageIOS.mm:
1629         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
1630
1631 2015-05-20  Tim Horton  <timothy_horton@apple.com>
1632
1633         Allow overriding the waitForDidUpdateViewState timeout
1634         https://bugs.webkit.org/show_bug.cgi?id=145230
1635         <rdar://problem/20990162>
1636
1637         Reviewed by Darin Adler.
1638
1639         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1640         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
1641         Use the value from NSUserDefaults, if it exists.
1642         We'll only check once, so changing the default requires a restart of the UI process.
1643
1644 2015-05-20  Anders Carlsson  <andersca@apple.com>
1645
1646         Make sure we always have a process pool to perform data store operations with
1647         https://bugs.webkit.org/show_bug.cgi?id=145231
1648         rdar://problem/20618248
1649
1650         Reviewed by Tim Horton.
1651
1652         Make sure that we always return a process pool. If we're a legacy C SPI per-context data store,
1653         find the process pool we're a part of and use that. Otherwise, create a new one.
1654     
1655         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1656         (WebKit::WebsiteDataStore::processPools):
1657
1658 2015-05-19  Jer Noble  <jer.noble@apple.com>
1659
1660         Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
1661         https://bugs.webkit.org/show_bug.cgi?id=145193
1662
1663         Reviewed by Eric Carlson.
1664
1665         Use HTMLMediaElementEnums instead of HTMLMediaElement.
1666
1667         * UIProcess/API/Cocoa/WKWebView.mm:
1668         (-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
1669         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1670         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1671         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1672         (WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
1673         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
1674         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
1675         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
1676         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1677         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
1678         * WebProcess/WebCoreSupport/WebChromeClient.h:
1679         * WebProcess/ios/WebVideoFullscreenManager.h:
1680         (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.
1681         (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode): Ditto.
1682         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
1683         * WebProcess/ios/WebVideoFullscreenManager.mm:
1684         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
1685         (WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Ditto.
1686         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
1687
1688 2015-05-20  Anders Carlsson  <andersca@apple.com>
1689
1690         Refactor process pool enumeration code in WebsiteDataStore
1691         https://bugs.webkit.org/show_bug.cgi?id=145218
1692
1693         Reviewed by Tim Horton.
1694
1695         Also make sure to keep the WebProcessPool objects alive for the duration of the various data store
1696         operations. This is the first step towards having the data store create a single process pool lazily if
1697         there are no web views associated with the data store.
1698
1699         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1700         (WebKit::WebsiteDataStore::fetchData):
1701         (WebKit::WebsiteDataStore::removeData):
1702         (WebKit::WebsiteDataStore::processPools):
1703         * UIProcess/WebsiteData/WebsiteDataStore.h:
1704
1705 2015-05-20  Alex Christensen  <achristensen@webkit.org>
1706
1707         [Content Extensions] Relax restrictions on triggers that match everything.
1708         https://bugs.webkit.org/show_bug.cgi?id=145069
1709
1710         Reviewed by Benjamin Poulain.
1711
1712         * UIProcess/API/APIUserContentExtensionStore.h:
1713         Increment version number to reflect changes in DFABytecode.
1714
1715 2015-05-20  Sungmann Cho  <sungmann.cho@navercorp.com>
1716
1717         Minor cleanups to PluginProcessProxy.
1718         https://bugs.webkit.org/show_bug.cgi?id=145199
1719
1720         Reviewed by Anders Carlsson.
1721
1722         1. Remove unnecessary forward declaration.
1723         2. Remove unnecessary #include.
1724
1725         * UIProcess/Plugins/PluginProcessProxy.cpp:
1726         * UIProcess/Plugins/PluginProcessProxy.h:
1727
1728 2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>
1729
1730         [GTK] Add some documentation to WebKitWebExtension
1731         https://bugs.webkit.org/show_bug.cgi?id=142786
1732
1733         Reviewed by Carlos Garcia Campos.
1734
1735         WebKitWebExtension API documentation lacks of some details and the information
1736         available is in some contributors blog posts. I add the section
1737         documentation with a small guide about how to use WebExtensions.
1738
1739         The code examples were taken from Carlos García and Adrián Pérez blog
1740         posts.
1741
1742         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
1743
1744 2015-05-20  Sungmann Cho  <sungmann.cho@navercorp.com>
1745
1746         Rename WebsiteDataStore::isNonPersistent() to WebsiteDataStore::isPersistent().
1747         https://bugs.webkit.org/show_bug.cgi?id=145111
1748
1749         Reviewed by Darin Adler.
1750
1751         This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=144158.
1752
1753         * UIProcess/API/APIWebsiteDataStore.cpp:
1754         (API::WebsiteDataStore::isPersistent):
1755         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1756         (WebKit::WebsiteDataStore::fetchData):
1757         (WebKit::WebsiteDataStore::removeData):
1758         * UIProcess/WebsiteData/WebsiteDataStore.h:
1759         (WebKit::WebsiteDataStore::isPersistent):
1760         (WebKit::WebsiteDataStore::isNonPersistent): Deleted.
1761
1762 2015-05-20  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1763
1764         [EFL] Fix build failure, linker does not find libXext.
1765         https://bugs.webkit.org/show_bug.cgi?id=144100
1766
1767         Reviewed by Gyuyoung Kim.
1768
1769         Move Xext library from WebProcess_LIBRARIES to WebKit2_LIBRARIES.
1770
1771         * PlatformEfl.cmake:
1772
1773 2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1774
1775         [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
1776         https://bugs.webkit.org/show_bug.cgi?id=144380
1777
1778         Reviewed by Antti Koivisto.
1779
1780         It improves the network cache performance, by mmaping big
1781         resources and sending only the file descriptor to the web process
1782         instead of the actual file data. It needs some changes in
1783         cross-platform code, because we can't use the same approach as
1784         mac (it uses a platform specific implementation not available in
1785         other platforms).
1786
1787         * NetworkProcess/cache/NetworkCache.cpp:
1788         (WebKit::NetworkCache::Cache::store): Use
1789         Data::tryCreateSharedMemory() to create the shared memory used by
1790         the ShareableResource. Also add an ASSERT instead of checking the
1791         shareable resource created is not nullptr, because the
1792         ShareableResource::create() that receives a shared memory should
1793         never return nullptr.
1794         * NetworkProcess/cache/NetworkCacheData.h:
1795         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
1796         (WebKit::NetworkCache::Data::tryCreateSharedMemory):
1797         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
1798         (WebKit::NetworkCache::Data::tryCreateSharedMemory): Create a
1799         SharedMemory object to wrap the mapped file, but keeping the ownership.
1800         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1801         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
1802         Use Data::tryCreateSharedMemory() to create the shared memory used
1803         bythe ShareableResource. Also add an ASSERT instead of checking
1804         the shareable resource created is not nullptr, because the
1805         ShareableResource::create() that receives a shared memory should
1806         never return nullptr.
1807         * Platform/SharedMemory.h:
1808         * Platform/unix/SharedMemoryUnix.cpp:
1809         (WebKit::SharedMemory::map): Use wrapMap() and initialize
1810         m_isWrappingMap to false.
1811         (WebKit::SharedMemory::wrapMap): Create a SharedMemory object for
1812         the given map, without taking its ownership.
1813         (WebKit::SharedMemory::~SharedMemory): Do not unmap and close the
1814         file descriptor if m_isWrappingMap is true.
1815         * Shared/ShareableResource.cpp:
1816         (WebKit::createShareableResourceDeallocator):
1817         (WebKit::ShareableResource::wrapInSharedBuffer): Create a SharedBuffer
1818         wrapping the ShareableResource data.
1819         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Create
1820         a ShareableResource for the handle and create a SharedBuffer
1821         wrapping it.
1822         * Shared/ShareableResource.h:
1823         * WebKit2Prefix.h: Enable ENABLE_SHAREABLE_RESOURCE for GTK.
1824         * WebProcess/Network/WebResourceLoader.cpp:
1825         (WebKit::WebResourceLoader::didReceiveResource): Get the CFData
1826         from the SharedBuffer for QuickLook instead of wrapping the handle again.
1827
1828 2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1829
1830         [SOUP] Network Cache: Disable network cache efficacy logging
1831         https://bugs.webkit.org/show_bug.cgi?id=145172
1832
1833         Reviewed by Martin Robinson.
1834
1835         Disable network cache efficacy logging by default, since we are
1836         not currently using the collected data.
1837
1838         * UIProcess/soup/WebProcessPoolSoup.cpp:
1839         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1840
1841 2015-05-19  Michael Saboff  <msaboff@apple.com>
1842
1843         REGRESSION(183787): JIT is enabled for all builds
1844         https://bugs.webkit.org/show_bug.cgi?id=145179
1845
1846         Reviewed by Geoffrey Garen.
1847
1848         Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
1849         set it depending on OS and CPU type.
1850
1851         * Configurations/FeatureDefines.xcconfig:
1852
1853 2015-05-19  Brady Eidson  <beidson@apple.com>
1854
1855         X-Frame-Options headers not respected when loading from application cache.
1856         <rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800
1857
1858         Reviewed by Alexey Proskuryakov.
1859
1860         * WebProcess/WebPage/WebPage.cpp:
1861         (WebKit::WebPage::loadDataImpl):
1862
1863 2015-05-19  Sungmann Cho  <sungmann.cho@navercorp.com>
1864
1865         Add PLUGIN_ARCHITECTURE(MAC) around WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h.
1866         https://bugs.webkit.org/show_bug.cgi?id=145173
1867
1868         Reviewed by Anders Carlsson.
1869
1870         WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h is meaningful only for Mac.
1871         So we need to add PLUGIN_ARCHITECTURE(MAC) around it.
1872
1873         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
1874
1875 2015-05-19  Brent Fulgham  <bfulgham@apple.com>
1876
1877         REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread) 
1878         https://bugs.webkit.org/show_bug.cgi?id=145175
1879         <rdar://problem/21023785>
1880
1881         Reviewed by Beth Dakin.
1882
1883         Add a stub implementation of isScrollSnapInProgress to match ScrollingCoordinator signature.
1884
1885         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
1886         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
1887         (WebKit::RemoteScrollingCoordinator::isScrollSnapInProgress): Added stub.
1888
1889 2015-05-19  Jeremy Jones  <jeremyj@apple.com>
1890
1891         WebVideoFullscreenManagerProxy has incorrect OS_VERSION_MIN_REQUIRED conditionals.
1892         https://bugs.webkit.org/show_bug.cgi?id=145158
1893
1894         Reviewed by Eric Carlson.
1895
1896         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1897         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
1898
1899 2015-05-19  Ting-Wei Lan  <lantw44@gmail.com>
1900
1901         [SOUP] Use st_birthtime to get creation time of files on systems support it
1902         https://bugs.webkit.org/show_bug.cgi?id=144989
1903
1904         Reviewed by Carlos Garcia Campos.
1905
1906         FreeBSD and NetBSD have either st_birthtime field or compatiblity macro
1907         with the same name in stat. It is better to use it instead of manually
1908         setting xattr, which is unreliable because both operating systems and
1909         file systems support are required.
1910
1911         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1912         (WebKit::NetworkCache::fileTimes):
1913         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1914         (WebKit::NetworkCache::IOChannel::IOChannel):
1915
1916 2015-05-19  Chris Dumez  <cdumez@apple.com>
1917
1918         Mark static variables as const when possible
1919         https://bugs.webkit.org/show_bug.cgi?id=145161
1920
1921         Reviewed by Andreas Kling.
1922
1923         * Platform/IPC/MessageEncoder.cpp:
1924         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1925         (WebKit::networkProcessLatencyQOS):
1926         (WebKit::networkProcessThroughputQOS):
1927         (WebKit::webProcessLatencyQOS):
1928         (WebKit::webProcessThroughputQOS):
1929         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1930         (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
1931         (WebKit::pluginProcessLatencyQOS):
1932         (WebKit::pluginProcessThroughputQOS):
1933         * WebProcess/WebPage/WebPage.cpp:
1934
1935 2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
1936
1937         [CMake] Ignore warnings in system headers
1938         https://bugs.webkit.org/show_bug.cgi?id=144747
1939
1940         Reviewed by Darin Adler.
1941
1942         Separate include directories into WebKit project includes and system includes. Suppress all
1943         warnings from headers in system include directories using the SYSTEM argument to
1944         the include_directories command.
1945
1946         * CMakeLists.txt:
1947         * PlatformEfl.cmake:
1948         * PlatformGTK.cmake:
1949
1950 2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>
1951
1952         Fix return-type warnings in test_ewk2_color_picker.cpp
1953         https://bugs.webkit.org/show_bug.cgi?id=145122
1954
1955         Reviewed by Gyuyoung Kim.
1956
1957         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
1958         (EWK2ColorPickerTest::hideColorPicker):
1959         (EWK2ColorPickerTest::hideColorPickerByRemovingElement):
1960
1961 2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>
1962
1963         [ES6] Arrow function syntax. Feature flag for arrow function
1964         https://bugs.webkit.org/show_bug.cgi?id=145108
1965
1966         Reviewed by Ryosuke Niwa.
1967
1968         Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
1969
1970         * Configurations/FeatureDefines.xcconfig:
1971
1972 2015-05-18  Anders Carlsson  <andersca@apple.com>
1973
1974         WKWebsiteDataStore should fully support session storage
1975         https://bugs.webkit.org/show_bug.cgi?id=145145
1976         rdar://problem/10690447
1977
1978         Reviewed by Sam Weinig.
1979
1980         Add a session store data type and handle it when clearing and fetching data.
1981
1982         * Shared/WebsiteData/WebsiteDataTypes.h:
1983         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1984         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1985         (dataTypesToString):
1986         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1987         (WebKit::toWebsiteDataTypes):
1988         (WebKit::toWKWebsiteDataTypes):
1989         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1990         (+[WKWebsiteDataStore allWebsiteDataTypes]):
1991         * UIProcess/Storage/StorageManager.cpp:
1992         (WebKit::StorageManager::SessionStorageNamespace::origins):
1993         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
1994         (WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas):
1995         (WebKit::StorageManager::getSessionStorageOrigins):
1996         (WebKit::StorageManager::deleteSessionStorageOrigins):
1997         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
1998         * UIProcess/Storage/StorageManager.h:
1999         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2000         (WebKit::WebsiteDataStore::fetchData):
2001         (WebKit::WebsiteDataStore::removeData):
2002
2003 2015-05-18  Brady Eidson  <beidson@apple.com>
2004
2005         Followup to: Networking process on iOS can be suspended and never exit
2006         https://bugs.webkit.org/show_bug.cgi?id=144971.
2007
2008         Unreviewed. Fixing API tests that revealed the unintentional change in behavior.
2009
2010         * Shared/ChildProcessProxy.cpp:
2011         (WebKit::ChildProcessProxy::shutDownProcess): The on WebProcessProxy code path that this
2012           was adopted from had an m_connection null check, and that null check needs to remain.
2013
2014 2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>
2015
2016         [GTK] URTBF after r184503.
2017
2018         * PlatformGTK.cmake:
2019
2020 2015-05-18  Brady Eidson  <beidson@apple.com>
2021
2022         Networking process on iOS can be suspended and never exit.
2023         <rdar://problem/20368630> and https://bugs.webkit.org/show_bug.cgi?id=144971
2024
2025         Reviewed by Darin Adler.
2026
2027         There's a few issues here.
2028         
2029         1 - When the NetworkProcessProxy goes away, it takes its process assertion with it. This causes
2030             the Network process to suspend indefinitely, unable to ever respond to IPC::Connection callbacks.
2031             We already solved this with WebProcess with a watchdog timer keeping both the process assertion
2032             and xpc_connection alive while the process shuts down. This patch expands that to the network
2033             process, and it will be easy to expand that to database and plugin processes doing forward.
2034         
2035         2 - All of our child processes either decide to self-terminate or listen for their connection to
2036             close at which point they terminate. This leads to various races. We should
2037             move to a model where the UI process explicitly tells them to shutdown, and this patch starts us 
2038             down that path.
2039         
2040         * CMakeLists.txt:
2041         * DerivedSources.make:
2042         * WebKit2.xcodeproj/project.pbxproj:
2043         
2044         * NetworkProcess/NetworkProcess.cpp:
2045         (WebKit::NetworkProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess.
2046         
2047         * Shared/ChildProcess.cpp:
2048         (WebKit::ChildProcess::shutDown): For now, just terminate the process. In the future have the
2049           process do cleanup work before it is terminated.
2050         * Shared/ChildProcess.h:
2051         * Shared/ChildProcess.messages.in: Added.
2052         
2053         * Shared/ChildProcessProxy.cpp:
2054         (WebKit::ChildProcessProxy::shutDownProcess): Set a watchdog and - if possible - explicitly message 
2055           the process to ShutDown.
2056         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded): Deleted.
2057         * Shared/ChildProcessProxy.h:
2058         
2059         * UIProcess/WebProcessPool.cpp:
2060         (WebKit::WebProcessPool::~WebProcessPool): Explicitly tell the network process to shut down.
2061         
2062         * UIProcess/WebProcessProxy.cpp:
2063         (WebKit::WebProcessProxy::removeWebPage): Move abortProcessLaunchIfNeeded() and the watchdog timer
2064           code to ChildProcessProxy::shutDownProcess.
2065         
2066         * WebProcess/WebProcess.cpp:
2067         (WebKit::WebProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess::didReceiveMessage.
2068
2069 2015-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2070
2071         Network Cache: Make Data::adoptMap take the ownership of the file descriptor
2072         https://bugs.webkit.org/show_bug.cgi?id=144950
2073
2074         Reviewed by Antti Koivisto.
2075
2076         It will be required to implement ShareableResource for soup
2077         network backend. Also move the common code of Data to a common
2078         file and add mapToFile(). The mapFile version that receives a file
2079         descriptor has been renamed to adoptAndMapFile().
2080
2081         * CMakeLists.txt: Add new file to compilation.
2082         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2083         (WebKit::NetworkCache::BlobStorage::add): Use mapToFile().
2084         * NetworkProcess/cache/NetworkCacheData.cpp: Added.
2085         (WebKit::NetworkCache::Data::mapToFile): Write the data to the
2086         given file and map it.
2087         (WebKit::NetworkCache::mapFile):
2088         (WebKit::NetworkCache::adoptAndMapFile):
2089         (WebKit::NetworkCache::computeSHA1):
2090         (WebKit::NetworkCache::bytesEqual):
2091         * NetworkProcess/cache/NetworkCacheData.h:
2092         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
2093         (WebKit::NetworkCache::Data::adoptMap): Close the file descriptor.
2094         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
2095         (WebKit::NetworkCache::Data::Data): Use a constructor that
2096         receives a file descriptor instead of the one receiving
2097         Backing. If the file descriptor is not -1 then the Data is a map.
2098         (WebKit::NetworkCache::MapWrapper::~MapWrapper): Also close the
2099         file descriptor.
2100         (WebKit::NetworkCache::Data::adoptMap): Pass the file descriptor
2101         to the MapWrapper and create the Data passing the file descriptor.
2102         * UIProcess/API/APIUserContentExtensionStore.cpp:
2103         (API::openAndMapContentExtension): Use mapFile that receives a
2104         file path.
2105         (API::compiledToFile): Use adoptAndMapFile() and don't close the
2106         descriptor.
2107
2108 2015-05-16  Andy Estes  <aestes@apple.com>
2109
2110         [iOS] WKPDFView should not follow javascript: links
2111         https://bugs.webkit.org/show_bug.cgi?id=145101
2112
2113         Reviewed by Dan Bernstein.
2114
2115         * UIProcess/WebPageProxy.cpp:
2116         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick): Returned early if url's protocol is javascript:.
2117         (WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick to
2118         reflect that this function is exclusively for following PDF links.
2119         * UIProcess/WebPageProxy.h:
2120         * UIProcess/ios/WKPDFView.mm:
2121         (-[WKPDFView annotation:wasTouchedAtPoint:controller:]):
2122         (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
2123         * WebProcess/WebPage/WebPage.cpp:
2124         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Renamed from navigateToURLWithSimulatedClick.
2125         (WebKit::WebPage::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick.
2126         * WebProcess/WebPage/WebPage.h:
2127         * WebProcess/WebPage/WebPage.messages.in:
2128
2129 2015-05-16  Brent Fulgham  <bfulgham@apple.com>
2130
2131         [iOS] Remote scrolling tree needs to coordinate scroll snap state during resize/rotations
2132         https://bugs.webkit.org/show_bug.cgi?id=145059
2133         <rdar://problem/20975978>
2134
2135         Reviewed by Simon Fraser.
2136
2137         The web view needs to update its scroll snap point offsets to take into account any
2138         adjustments to the view size caused by content insets. We also need to update the
2139         offstes after device rotation.
2140
2141         * UIProcess/API/Cocoa/WKWebView.mm:
2142         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Retrieve the proper
2143         computed content inset for the view and incorporate into any scroll snap point adjustments.
2144         (-[WKWebView _updateVisibleContentRects]): If we have active scroll snap points, 
2145         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2146         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2147         (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Update to account
2148         for content inset.
2149         (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Also validate that the
2150         active index is valid.
2151         (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Update to track
2152         current active snap offset index.
2153         (WebKit::RemoteScrollingCoordinatorProxy::hasActiveSnapPoint): Added.
2154         (WebKit::RemoteScrollingCoordinatorProxy::nearestActiveSnapPoint): Added. It calculates the proper
2155         scroll position incorporating any snap point and content insets.
2156
2157 2015-05-15  Yongjun Zhang  <yongjun_zhang@apple.com>
2158
2159         Don't reset the preview recognizer in [WKContentViewInteraction cleanupInteraction]
2160         https://bugs.webkit.org/show_bug.cgi?id=145081
2161
2162         We shouldn't reset the recognizer in [WKContentViewInteraction cleanupInteraction] since we don't re-add it
2163         back to WKContentView when the process relaunched. Since we already add/remove it when the view is move into/
2164         removed from the window, we don't need reset it in cleanupInteraction.
2165
2166         Reviewed by Dan Bernstein.
2167
2168         * UIProcess/ios/WKContentViewInteraction.mm:
2169         (-[WKContentView cleanupInteraction]):
2170
2171 2015-05-15  James Savage  <james.savage@apple.com>
2172
2173         REGRESSION (r181910): WKWebView incorrectly scales snapshot
2174         https://bugs.webkit.org/show_bug.cgi?id=145076
2175
2176         Reviewed by Tim Horton.
2177
2178         We added a fast path to snapshotting using IOSurfaces with
2179         http://trac.webkit.org/changeset/181910 which incorrectly determined
2180         scale and transform and resulted in bad snapshots in some situations.
2181
2182         * UIProcess/API/Cocoa/WKWebView.mm:
2183         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2184         When snapshotting an IOSurface we need to compute our scale based off of
2185         the rect in the WKWebView coordinates, we also failed to account for
2186         non-zero origins in the snapshot rect. Remove an unused varible while
2187         we're here.
2188
2189 2015-05-15  Alex Christensen  <achristensen@webkit.org>
2190
2191         [Content Extensions] Fail to load old content extension files
2192         https://bugs.webkit.org/show_bug.cgi?id=145027
2193
2194         Reviewed by Eric Carlson.
2195
2196         * UIProcess/API/APIUserContentExtensionStore.cpp:
2197         (API::openAndMapContentExtension):
2198         * UIProcess/API/APIUserContentExtensionStore.h:
2199
2200 2015-05-15  Jeremy Jones  <jeremyj@apple.com>
2201
2202         Limit alternate fullscreen with linked on or after.
2203         https://bugs.webkit.org/show_bug.cgi?id=144894
2204
2205         Reviewed by Dean Jackson.
2206
2207         * UIProcess/API/Cocoa/WKWebView.mm:
2208         (shouldAllowAlternateFullscreen): Added.
2209         (-[WKWebView initWithFrame:configuration:]):
2210
2211 2015-05-15  Chris Dumez  <cdumez@apple.com>
2212
2213         [WK2][Cocoa] Back swipe tab snapshot takes a long time to be removed on bing.com
2214         https://bugs.webkit.org/show_bug.cgi?id=145061
2215         <rdar://problem/20939743>
2216
2217         Reviewed by Tim Horton.
2218
2219         When swiping back from a video search result to the list of video
2220         search results on bing.com, the back swipe gesture tab snapshot takes
2221         ~3 seconds to be removed, even though the page gets loaded almost
2222         instantly from PageCache. The tab snapshot should be removed as soon as
2223         the load is done.
2224
2225         The issue is that we only cleared the back swipe gesture tab snapshot
2226         after PageClient::didFinishLoadForMainFrame() has been called. However,
2227         PageClient::didFinishLoadForMainFrame() was only being called by
2228         WebPageProxy if the main frame loaded *without* error. In case the main
2229         frame loaded with an error, only WebPageProxy::didFailLoadForFrame() is
2230         called, not WebPageProxy::didFinishLoadForFrame() and we would fail to
2231         remove the gesture snapshot until the 3 seconds timeout.
2232
2233         This patch calls PageClient::didFinishLoadForMainFrame() from
2234         WebPageProxy::didFailLoadForFrame() so we remove the snapshot in the
2235         error case as well.
2236
2237         The reason didFailLoadForFrame() is being called on bing.com video
2238         search results is because a "ping" load is aborted when the page is
2239         entering PageCache. Aborting any kind of resource load sets a
2240         "cancellation" error on the main document.
2241
2242         * UIProcess/WebPageProxy.cpp:
2243         (WebKit::WebPageProxy::didFailLoadForFrame):
2244
2245 2015-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2246
2247         REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process
2248         https://bugs.webkit.org/show_bug.cgi?id=144738
2249
2250         Reviewed by Alexey Proskuryakov.
2251
2252         When converting the main resource handle to a download, the
2253         NetworkResourceLoader is aborted, and the ResourceHandle is
2254         cleaned up aborting the download operation. We need to use a
2255         different ResourceHandle for the download operation.
2256
2257         * Shared/Downloads/soup/DownloadSoup.cpp:
2258         (WebKit::Download::startWithHandle): Use ResourceHandle::releaseForDownload()
2259         instead of reusing the given handle.
2260
2261 2015-05-14  Brady Eidson  <beidson@apple.com>
2262
2263         Rename connectionDidClose and related methods to be more clear.
2264         https://bugs.webkit.org/show_bug.cgi?id=145030
2265
2266         Reviewed by Darin Adler.
2267
2268         These methods were easy to confuse with "Connection::Client::didClose()", yet they
2269         were about something much more explicit: A child process being shut down by the UI Process.
2270
2271         Let's call them as such.
2272
2273         * Shared/ChildProcessProxy.cpp:
2274         (WebKit::ChildProcessProxy::shutDownProcess):
2275         (WebKit::ChildProcessProxy::clearConnection): Deleted.
2276         (WebKit::ChildProcessProxy::connectionDidClose): Deleted.
2277         * Shared/ChildProcessProxy.h:
2278
2279         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2280         (WebKit::DatabaseProcessProxy::processWillShutDown):
2281         * UIProcess/Databases/DatabaseProcessProxy.h:
2282
2283         * UIProcess/Network/NetworkProcessProxy.cpp:
2284         (WebKit::NetworkProcessProxy::processWillShutDown):
2285         * UIProcess/Network/NetworkProcessProxy.h:
2286
2287         * UIProcess/Plugins/PluginProcessProxy.cpp:
2288         (WebKit::PluginProcessProxy::processWillShutDown):
2289         * UIProcess/Plugins/PluginProcessProxy.h:
2290
2291         * UIProcess/WebFrameProxy.cpp:
2292         (WebKit::WebFrameProxy::webProcessWillShutDown):
2293         (WebKit::WebFrameProxy::disconnect): Deleted.
2294         * UIProcess/WebFrameProxy.h:
2295
2296         * UIProcess/WebPageProxy.cpp:
2297         (WebKit::WebPageProxy::webProcessWillShutDown):
2298         (WebKit::WebPageProxy::connectionDidClose): Deleted.
2299         * UIProcess/WebPageProxy.h:
2300
2301         * UIProcess/WebProcessLifetimeTracker.cpp:
2302         (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown):
2303         (WebKit::WebProcessLifetimeTracker::connectionDidClose): Deleted.
2304         * UIProcess/WebProcessLifetimeTracker.h:
2305
2306         * UIProcess/WebProcessProxy.cpp:
2307         (WebKit::WebProcessProxy::processWillShutDown):
2308         (WebKit::WebProcessProxy::shutDown):
2309         (WebKit::WebProcessProxy::removeWebPage):
2310         (WebKit::WebProcessProxy::didClose):
2311         (WebKit::WebProcessProxy::disconnectFramesFromPage):
2312         (WebKit::WebProcessProxy::shouldTerminate):
2313         (WebKit::WebProcessProxy::requestTermination):
2314         (WebKit::WebProcessProxy::connectionDidClose): Deleted.
2315         (WebKit::WebProcessProxy::disconnect): Deleted.
2316         * UIProcess/WebProcessProxy.h:
2317
2318 2015-05-14  Zhuo Li  <zachli@apple.com>
2319
2320         Some CFNetwork SPI to reset HSTS hosts added since a date should not be used on Yosemite.
2321         https://bugs.webkit.org/show_bug.cgi?id=145025.
2322         and
2323         rdar://problem/20646308.
2324
2325         Reviewed by Alexey Proskuryakov.
2326
2327         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2328         (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate):
2329
2330 2015-05-14  Timothy Horton  <timothy_horton@apple.com>
2331
2332         Add a layout mode that scales down the view to try to fit the document
2333         https://bugs.webkit.org/show_bug.cgi?id=145022
2334         <rdar://problem/19790341>
2335
2336         Reviewed by Dean Jackson.
2337
2338         * Shared/WebPageCreationParameters.cpp:
2339         (WebKit::WebPageCreationParameters::encode):
2340         (WebKit::WebPageCreationParameters::decode):
2341         * Shared/WebPageCreationParameters.h:
2342         * UIProcess/WebPageProxy.cpp:
2343         (WebKit::WebPageProxy::creationParameters):
2344         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
2345         * UIProcess/WebPageProxy.h:
2346         * WebProcess/WebPage/DrawingArea.h:
2347         (WebKit::DrawingArea::setShouldScaleViewToFitDocument):
2348         * WebProcess/WebPage/WebPage.cpp:
2349         (WebKit::WebPage::WebPage):
2350         (WebKit::WebPage::setShouldScaleViewToFitDocument):
2351         * WebProcess/WebPage/WebPage.h:
2352         * WebProcess/WebPage/WebPage.messages.in:
2353         Plumb shouldScaleViewToFitDocument through to the DrawingArea.
2354
2355         * UIProcess/mac/WKViewLayoutStrategy.mm:
2356         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
2357         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]):
2358         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy updateLayout]):
2359         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
2360         * UIProcess/API/C/WKLayoutMode.h:
2361         * UIProcess/API/Cocoa/_WKLayoutMode.h:
2362         Add a new layout mode, which just turns on shouldScaleViewToFitDocument,
2363         and otherwise behaves as normal.
2364
2365         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2366         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2367         (WebKit::TiledCoreAnimationDrawingArea::setShouldScaleViewToFitDocument):
2368         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2369         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2370         On every flush where either the document size or view size has changed,
2371         or layout is outstanding, do a layout with fixed layout off to determine
2372         whether the document fits inside the view. If it doesn't, scale it down
2373         to fit. This will require an extra layout for every resize while in the
2374         scaled-down state, but there is potential for future optimization.
2375
2376 2015-05-14  Anders Carlsson  <andersca@apple.com>
2377
2378         Local storage origins should include origins with transient local storage
2379         https://bugs.webkit.org/show_bug.cgi?id=145017
2380         rdar://problem/10690447
2381
2382         Reviewed by Sam Weinig.
2383
2384         The transient local storage namespaces are used for third party data blocking and will stay
2385         around until the UI process exits so we need to be able to include website data from transient storage
2386         in the website data store APIs.
2387
2388         * UIProcess/Storage/StorageManager.cpp:
2389         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
2390         (WebKit::StorageManager::getLocalStorageOrigins):
2391         * UIProcess/Storage/StorageManager.h:
2392         * UIProcess/WebKeyValueStorageManager.cpp:
2393         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2394         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2395         (WebKit::WebsiteDataStore::fetchData):
2396
2397 2015-05-14  Beth Dakin  <bdakin@apple.com>
2398
2399         Change range of possible forces for mouseforcechanged DOM event
2400         https://bugs.webkit.org/show_bug.cgi?id=144987
2401         -and corresponding-
2402         rdar://problem/20472802
2403
2404         Reviewed by Tim Horton.
2405
2406         Change to a 0-3 range.
2407         * Shared/mac/WebEventFactory.mm:
2408         (WebKit::WebEventFactory::createWebMouseEvent):
2409
2410 2015-05-14  Zan Dobersek  <zdobersek@igalia.com>
2411
2412         [GTK] Add missing ENABLE(NETSCAPE_PLUGIN_API) build guards
2413         https://bugs.webkit.org/show_bug.cgi?id=144994
2414
2415         Reviewed by Carlos Garcia Campos.
2416
2417         This fixes the build when configured with Netscape plugin API
2418         support disabled.
2419
2420         * UIProcess/API/gtk/WebKitWebContext.cpp:
2421         (webkit_web_context_set_additional_plugins_directory):
2422         (webkitWebContextGetPluginThread):
2423         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2424         (WebKit::ProcessLauncher::launchProcess):
2425
2426 2015-05-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2427
2428         [SOUP] Network Cache: NetworkProcess segfault when file system doesn't support xattrs
2429         https://bugs.webkit.org/show_bug.cgi?id=144953
2430
2431         Reviewed by Martin Robinson.
2432
2433         Return early if we fail to get the birthtime xattr.
2434
2435         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2436         (WebKit::NetworkCache::fileTimes):
2437
2438 2015-05-13  Daniel Bates  <dabates@apple.com>
2439
2440         Rename ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() to {send, cancel}PrepareToSuspend()
2441         https://bugs.webkit.org/show_bug.cgi?id=144619
2442         <rdar://problem/20812779>
2443
2444         Reviewed by Andy Estes.
2445
2446         The names of the functions ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() are misnomers. These
2447         functions are called when the ProcessThrottler wants to prepare the process that it manages for suspension
2448         and changes its mind, respectively. That is, these functions do not actually correspond to the OS decision
2449         to suspend a process or cancel the suspension of a process, respectively. So, rename these functions and
2450         associated {Network, Web}ProcessProxy message names to better describe their purpose.
2451
2452         * NetworkProcess/NetworkProcess.cpp:
2453         (WebKit::NetworkProcess::prepareToSuspend):
2454         (WebKit::NetworkProcess::cancelPrepareToSuspend):
2455         (WebKit::NetworkProcess::processWillSuspend): Deleted.
2456         (WebKit::NetworkProcess::cancelProcessWillSuspend): Deleted.
2457         * NetworkProcess/NetworkProcess.h:
2458         * NetworkProcess/NetworkProcess.messages.in:
2459         * UIProcess/Network/NetworkProcessProxy.cpp:
2460         (WebKit::NetworkProcessProxy::sendPrepareToSuspend):
2461         (WebKit::NetworkProcessProxy::sendCancelPrepareToSuspend):
2462         (WebKit::NetworkProcessProxy::sendProcessWillSuspend): Deleted.
2463         (WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend): Deleted.
2464         * UIProcess/Network/NetworkProcessProxy.h:
2465         * UIProcess/ProcessThrottler.cpp:
2466         (WebKit::ProcessThrottler::updateAssertion):
2467         * UIProcess/ProcessThrottlerClient.h:
2468         * UIProcess/WebProcessProxy.cpp:
2469         (WebKit::WebProcess::actualPrepareToSuspend): Formerly named prepareToSuspend.
2470         (WebKit::WebProcessProxy::sendPrepareToSuspend):
2471         (WebKit::WebProcessProxy::sendCancelPrepareToSuspend):
2472         (WebKit::WebProcessProxy::sendProcessWillSuspend): Deleted.
2473         (WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Deleted.
2474         * UIProcess/WebProcessProxy.h:
2475         * WebProcess/WebProcess.cpp:
2476         (WebKit::WebProcess::prepareToSuspend):
2477         (WebKit::WebProcess::cancelPrepareToSuspend):
2478         (WebKit::WebProcess::processWillSuspend): Deleted.
2479         (WebKit::WebProcess::cancelProcessWillSuspend): Deleted.
2480         * WebProcess/WebProcess.h:
2481         * WebProcess/WebProcess.messages.in:
2482
2483 2015-05-13  Anders Carlsson  <andersca@apple.com>
2484
2485         Don't create a per-pool data store when using the modern API
2486         https://bugs.webkit.org/show_bug.cgi?id=144963
2487         rdar://problem/20331756
2488
2489         Reviewed by Tim Horton.
2490
2491         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2492         (API::ProcessPoolConfiguration::createWithLegacyOptions):
2493         (API::ProcessPoolConfiguration::copy):
2494         * UIProcess/API/APIProcessPoolConfiguration.h:
2495         Keep track of whether the process pool should have a data store.
2496
2497         * UIProcess/API/C/WKContext.cpp:
2498         (WKContextGetWebsiteDataStore):
2499         * UIProcess/WebKeyValueStorageManager.cpp:
2500         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2501         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
2502         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
2503         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
2504         Update now that WebProcessPool::dataStore() no longer returns a reference.
2505
2506         * UIProcess/WebProcessPool.cpp:
2507         (WebKit::WebProcessPool::WebProcessPool):
2508         Only create a data store if the configuration states that we should.
2509
2510         * UIProcess/WebProcessPool.h:
2511         Change dataStore() to return a pointer instead of a reference.
2512
2513 2015-05-13  Alexey Proskuryakov  <ap@apple.com>
2514
2515         [Mac] Sandbox violation reading SubmitDiagInfo.domains
2516         https://bugs.webkit.org/show_bug.cgi?id=144962
2517         rdar://problem/20719330
2518
2519         Reviewed by Darin Adler.
2520
2521         * WebProcess/com.apple.WebProcess.sb.in:
2522
2523 2015-05-13  Beth Dakin  <bdakin@apple.com>
2524
2525         Speculative build fix.
2526
2527         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
2528
2529 2015-05-13  Michael Catanzaro  <mcatanzaro@igalia.com>
2530
2531         [GTK][CMake] Extra include directory when libnotify is present but disabled
2532         https://bugs.webkit.org/show_bug.cgi?id=144941
2533
2534         Reviewed by Martin Robinson.
2535
2536         Add LIBNOTIFY_INCLUDE_DIRS to WebKit2_INCLUDE_DIRECTORIES only if USE_LIBNOTIFY is true,
2537         rather than checking LIBNOTIFY_FOUND.
2538
2539         * PlatformGTK.cmake:
2540
2541 2015-05-13  Beth Dakin  <bdakin@apple.com>
2542
2543         Need SPI to set the overlay scroll bar style
2544         https://bugs.webkit.org/show_bug.cgi?id=144928
2545         -and corresponding-
2546         rdar://problem/20143614
2547
2548         Reviewed by Anders Carlsson.
2549
2550         Make scrollbarOverlayStyle a part of the creation parameters. 
2551         * Shared/WebPageCreationParameters.cpp:
2552         (WebKit::WebPageCreationParameters::encode):
2553         (WebKit::WebPageCreationParameters::decode):
2554         * Shared/WebPageCreationParameters.h:
2555
2556         New SPI.
2557         * UIProcess/API/Cocoa/WKViewPrivate.h:
2558         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h: Added.
2559         * UIProcess/API/mac/WKView.mm:
2560         (-[WKView _setOverlayScrollbarStyle:]):
2561         (-[WKView _overlayScrollbarStyle]):
2562
2563         Store m_scrollbarOverlayStyle on WebPageProxy, and set it to the WebProcess.
2564         * UIProcess/WebPageProxy.cpp:
2565         (WebKit::WebPageProxy::WebPageProxy):
2566         (WebKit::WebPageProxy::creationParameters):
2567         (WebKit::WebPageProxy::setOverlayScrollbarStyle):
2568         * UIProcess/WebPageProxy.h:
2569         (WebKit::WebPageProxy::overlayScrollbarStyle):
2570         * WebKit2.xcodeproj/project.pbxproj:
2571
2572         Return WebPage’s scrollbarOverlayStyle().
2573         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2574         (WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
2575         * WebProcess/WebCoreSupport/WebChromeClient.h:
2576
2577         Cache the scrollbarOverlayStyle() here for the WebProcess. 
2578         * WebProcess/WebPage/WebPage.cpp:
2579         (WebKit::WebPage::WebPage):
2580         (WebKit::WebPage::setScrollbarOverlayStyle):
2581         * WebProcess/WebPage/WebPage.h:
2582         (WebKit::WebPage::scrollbarOverlayStyle):
2583         * WebProcess/WebPage/WebPage.messages.in:
2584
2585 2015-05-13  Anders Carlsson  <andersca@apple.com>
2586
2587         Rename some StorageManager functions to indicate that they work on local storage entries
2588         https://bugs.webkit.org/show_bug.cgi?id=144958
2589         First part of rdar://problem/10690447.
2590
2591         Reviewed by Beth Dakin.
2592
2593         * UIProcess/Storage/StorageManager.cpp:
2594         (WebKit::StorageManager::getLocalStorageOrigins):
2595         (WebKit::StorageManager::getLocalStorageDetailsByOrigin):
2596         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
2597         (WebKit::StorageManager::deleteAllLocalStorageEntries):
2598         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
2599         (WebKit::StorageManager::getOrigins): Deleted.
2600         (WebKit::StorageManager::getStorageDetailsByOrigin): Deleted.
2601         (WebKit::StorageManager::deleteEntriesForOrigin): Deleted.
2602         (WebKit::StorageManager::deleteAllEntries): Deleted.
2603         (WebKit::StorageManager::deleteEntriesForOrigins): Deleted.
2604         * UIProcess/Storage/StorageManager.h:
2605         * UIProcess/WebKeyValueStorageManager.cpp:
2606         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2607         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
2608         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
2609         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
2610         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2611         (WebKit::WebsiteDataStore::fetchData):
2612         (WebKit::WebsiteDataStore::removeData):
2613
2614 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2615
2616         Crash under WebKit::WebInspectorProxy::attachAvailabilityChanged sometimes opening new page
2617         https://bugs.webkit.org/show_bug.cgi?id=144957
2618
2619         Reviewed by Simon Fraser.
2620
2621         * UIProcess/WebInspectorProxy.cpp:
2622         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
2623
2624 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2625
2626         Pass String as reference in more places
2627         https://bugs.webkit.org/show_bug.cgi?id=144769
2628
2629         Reviewed by Daniel Bates.
2630
2631         * WebProcess/WebPage/WebInspectorUI.cpp:
2632         (WebKit::WebInspectorUI::showMainResourceForFrame):
2633         * WebProcess/WebPage/WebInspectorUI.h:
2634
2635 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
2636
2637         View scale changes are temporarily lost after restoring a page from the page cache
2638         https://bugs.webkit.org/show_bug.cgi?id=144934
2639
2640         Reviewed by Brady Eidson.
2641
2642         * WebProcess/WebPage/WebPage.cpp:
2643         (WebKit::WebPage::WebPage):
2644         (WebKit::WebPage::scalePage):
2645         (WebKit::WebPage::scalePageInViewCoordinates):
2646         (WebKit::WebPage::pageScaleFactor):
2647         (WebKit::WebPage::viewScaleFactor):
2648         (WebKit::WebPage::scaleView):
2649         * WebProcess/WebPage/WebPage.h:
2650         (WebKit::WebPage::viewScaleFactor): Deleted.
2651         Get rid of m_viewScaleFactor, instead using Page::viewScaleFactor.
2652
2653 2015-05-13  Sungmann Cho  <sungmann.cho@navercorp.com>
2654
2655         Minor cleanups to PluginProxy.cpp.
2656         https://bugs.webkit.org/show_bug.cgi?id=144948
2657
2658         Reviewed by Gyuyoung Kim.
2659
2660         1. Remove unnecessary #include.
2661         2. Remove unnecessary return statement from PluginProxy::paint().
2662
2663         No new tests, no behavior change.
2664
2665         * WebProcess/Plugins/PluginProxy.cpp:
2666         (WebKit::PluginProxy::paint):
2667
2668 2015-05-13  Daegyu Lee  <daegyu.lee@navercorp.com>
2669
2670         REGRESSION(r176631): [EFL] Fullscreen feature doesn't work correctly on MiniBrowser
2671         https://bugs.webkit.org/show_bug.cgi?id=144906
2672
2673         Reviewed by Gyuyoung Kim.
2674
2675         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
2676         (WebKit::PageViewportController::updateMinimumScaleToFit): Recover the r176631 condition to
2677         call applyScaleAfterRenderingContents function to apply correct scale.
2678
2679 2015-05-12  Dan Bernstein  <mitz@apple.com>
2680
2681         In Safari, Debug > Get Bytecode Profile crashes the Web Content process
2682         https://bugs.webkit.org/show_bug.cgi?id=144944
2683
2684         Reviewed by Darin Adler.
2685
2686         * WebProcess/WebPage/WebPage.cpp:
2687         (WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
2688         because it is when the profiler is disabled, which is the default. In that case, return
2689         after sending back the empty string, rather than continuing to dereference a null pointer.
2690
2691 2015-05-12  Jon Honeycutt  <jhoneycutt@apple.com>
2692
2693         Crash when using <input type=file>
2694
2695         <https://bugs.webkit.org/show_bug.cgi?id=144939>
2696         <rdar://problem/20172315>
2697
2698         Reviewed by Andy Estes.
2699
2700         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2701         Use a RefPtr to hold the WebOpenPanelResultListenerProxy, because the
2702         WKFileUploadPanel can outlive it.
2703
2704 2015-05-12  Simon Fraser  <simon.fraser@apple.com>
2705
2706         Turn antialiased font dilation off by default
2707         https://bugs.webkit.org/show_bug.cgi?id=144940
2708         rdar://problem/20923031
2709
2710         Reviewed by Sam Weinig.
2711
2712         Turn antialised font dilation off by default.
2713
2714         * Shared/WebPreferencesDefinitions.h:
2715         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2716
2717 2015-05-12  Daniel Bates  <dabates@apple.com>
2718
2719         Make {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
2720         https://bugs.webkit.org/show_bug.cgi?id=144886
2721
2722         Reviewed by Darin Adler.
2723
2724         {Network, Web}ProcessProxy are implemented in terms of ProcessThrottleClient, an
2725         interface that defines the callbacks that ProcessThrottler makes to a client. We
2726         do not want to allow arbitrary callers to make use of the interface ProcessThrottleClient.
2727         So, we should use private inheritance to represent the relationship between
2728         {Network, Web}ProcessProxy and ProcessThrottleClient instead of public inheritance.
2729
2730         Additionally make ProcessThrottler a instance variable of {Network, Web}ProcessProxy instead
2731         of holding a smart pointer to a ProcessThrottler instance because we always want to
2732         have a ProcessThrottler for each instance of {Network, Web}ProcessProxy.
2733
2734         * UIProcess/Network/NetworkProcessProxy.cpp:
2735         (WebKit::NetworkProcessProxy::NetworkProcessProxy): Update code to work now that m_throttler
2736         is an instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
2737         (WebKit::NetworkProcessProxy::didFinishLaunching): Update code to access functions of
2738         m_throttler by reference instead of by pointer.
2739         (WebKit::NetworkProcessProxy::didCancelProcessSuspension): Ditto.
2740         (WebKit::NetworkProcessProxy::processReadyToSuspend): Ditto.
2741         (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Ditto.
2742         * UIProcess/Network/NetworkProcessProxy.h: Inherit from ProcessThrottleClient privately.
2743         (WebKit::NetworkProcessProxy::throttler): Update code to work now that m_throttler is an
2744         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
2745         * UIProcess/ProcessThrottler.cpp:
2746         (WebKit::ProcessThrottler::ProcessThrottler): Update code to work now that m_process is
2747         a lvalue reference instead of a pointer.
2748         (WebKit::ProcessThrottler::updateAssertion): Ditto.
2749         (WebKit::ProcessThrottler::assertionWillExpireImminently): Ditto.
2750         * UIProcess/ProcessThrottler.h: Ditto.
2751         * UIProcess/WebProcessProxy.cpp:
2752         (WebKit::WebProcessProxy::WebProcessProxy): Update code to work now that m_throttler is an
2753         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance. 
2754         (WebKit::WebProcessProxy::didFinishLaunching): Update code to access functions of
2755         m_throttler by reference instead of by pointer.
2756         (WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
2757         (WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
2758         (WebKit::WebProcessProxy::setIsHoldingLockedFiles): Ditto.
2759         * UIProcess/WebProcessProxy.h: Inherit from ProcessThrottleClient privately.
2760         (WebKit::WebProcessProxy::throttler): Update code to work now that m_throttler is an
2761         instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
2762
2763 2015-05-12  Anders Carlsson  <andersca@apple.com>
2764
2765         Production builds should link against the shims directly
2766         https://bugs.webkit.org/show_bug.cgi?id=144922
2767         rdar://problem/19708579
2768
2769         Reviewed by Dan Bernstein.
2770
2771         * Configurations/NetworkService.xcconfig:
2772         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
2773         Link directly against SecItemShim.dylib where possible.
2774
2775         * Configurations/PluginProcessShim.xcconfig:
2776         Set the install name and install path.
2777
2778         * Configurations/PluginService.32.xcconfig:
2779         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
2780         Link directly against PluginProcessShim.dylib where possible.
2781
2782         * Configurations/PluginService.64.xcconfig:
2783         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
2784         Link directly against PluginProcessShim.dylib where possible.
2785
2786         * Configurations/SecItemShim.xcconfig:
2787         Set the install name and install path.
2788
2789         * Configurations/WebContentService.xcconfig:
2790         Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
2791         Link directly against WebProcessShim.dylib where possible.
2792
2793         * Configurations/WebProcessShim.xcconfig:
2794         Set the install name and install path.
2795
2796         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist.
2797         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
2798         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
2799
2800         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Copied from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
2801         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
2802         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
2803
2804         * WebKit2.xcodeproj/project.pbxproj:
2805         Add new files.
2806
2807         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist.
2808         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
2809         Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
2810
2811 2015-05-12  Alexey Proskuryakov  <ap@apple.com>
2812
2813         Undo a mistaken part of r184211.
2814
2815         * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::cookieStorageDirectory):
2816         * UIProcess/WebProcessPool.h:
2817         cookieStorageDirectory() is used on iOS, so bring it back.
2818
2819 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
2820
2821         [Mac] Share cookie storage between UI process and secondary processes
2822         https://bugs.webkit.org/show_bug.cgi?id=144820
2823         rdar://problem/20572830
2824
2825         Reviewed by Darin Adler.
2826
2827         Pass a cookie storage descriptor that includes file path as well as other data that
2828         CFNetwork needs to use the same cookies storage as in another process (session cookies
2829         are still separate).
2830
2831         While at it, started to clean up code that passes cookie storage path. It was mostly
2832         dead and unimplemented, only used in child processes when USE(SECCOMP_FILTERS) was enabled.
2833
2834         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2835         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2836         * Shared/Network/NetworkProcessCreationParameters.cpp:
2837         (WebKit::NetworkProcessCreationParameters::encode):
2838         (WebKit::NetworkProcessCreationParameters::decode):
2839         * Shared/Network/NetworkProcessCreationParameters.h:
2840         * Shared/WebProcessCreationParameters.cpp:
2841         (WebKit::WebProcessCreationParameters::encode):
2842         (WebKit::WebProcessCreationParameters::decode):
2843         * Shared/WebProcessCreationParameters.h:
2844         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2845         (WebKit::WebProcessPool::platformInitializeWebProcess):
2846         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2847         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
2848         * UIProcess/WebProcessPool.cpp:
2849         (WebKit::WebProcessPool::ensureNetworkProcess):
2850         (WebKit::WebProcessPool::createNewWebProcess):
2851         (WebKit::WebProcessPool::cookieStorageDirectory):
2852         * UIProcess/WebProcessPool.h:
2853         * UIProcess/efl/WebProcessPoolEfl.cpp:
2854         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
2855         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2856         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
2857         * WebProcess/cocoa/WebProcessCocoa.mm:
2858         (WebKit::WebProcess::platformInitializeWebProcess):
2859
2860 2015-05-12  Chris Dumez  <cdumez@apple.com>
2861
2862         [WK2] Log using diagnostic logging how far back in history we navigate
2863         https://bugs.webkit.org/show_bug.cgi?id=144919
2864         <rdar://problem/20920043>
2865
2866         Reviewed by Gavin Barraclough.
2867
2868         Log using diagnostic logging how far back in history we navigate.
2869         When a back navigation or a backward indexed navigation occurs, we
2870         log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.
2871
2872         * UIProcess/WebBackForwardList.cpp:
2873         (WebKit::WebBackForwardList::goToItem):
2874
2875 2015-05-11  Sam Weinig  <sam@webkit.org>
2876
2877         ChildProcess should take an os_activity
2878         https://bugs.webkit.org/show_bug.cgi?id=141781
2879
2880         Reviewed by Ryosuke Niwa.
2881
2882         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
2883         (DatabaseServiceInitializer):
2884         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
2885         (NetworkServiceInitializer):
2886         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
2887         (PluginServiceInitializer):
2888         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
2889         (WebContentServiceInitializer):
2890         Start an os_activity in the initializer for each XPC service.
2891
2892         * config.h:
2893         Add HAVE_OS_ACTIVITY where available.
2894
2895 2015-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2896
2897         Unreviewed. Fix GTK+ debug build after r184197.
2898
2899         * UIProcess/gtk/RedirectedXCompositeWindow.cpp: Add missing include.
2900
2901 2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2902
2903         [X11] Add XUniquePtr and XUniqueResource to automatically free X resources
2904         https://bugs.webkit.org/show_bug.cgi?id=144521
2905
2906         Reviewed by Darin Adler.
2907
2908         Use XUniquePtr and XUniqueResource to free X resources.
2909
2910         * PlatformEfl.cmake: Add Source/WebCore/platform/graphics/x11 dir
2911         to the include dir list.
2912         * PlatformGTK.cmake: Ditto.
2913         * UIProcess/cairo/BackingStoreCairo.cpp:
2914         (WebKit::BackingStore::createBackend): Do not pass the display to
2915         the BackingStoreBackendCairoX11 constructor.
2916         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
2917         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
2918         (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
2919         (WebKit::RedirectedXCompositeWindow::resize):
2920         (WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
2921         (WebKit::RedirectedXCompositeWindow::surface):
2922         * UIProcess/gtk/RedirectedXCompositeWindow.h:
2923         (WebKit::RedirectedXCompositeWindow::windowID):
2924         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2925         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2926         (WebKit::NetscapePlugin::platformPostInitializeWindowless):
2927         (WebKit::NetscapePlugin::platformDestroy):
2928         (WebKit::NetscapePlugin::platformGeometryDidChange):
2929         (WebKit::NetscapePlugin::platformPaint):
2930
2931 2015-05-11  Dan Bernstein  <mitz@apple.com>
2932
2933         WebKit2 part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
2934
2935         Reviewed by Alexey Proskuryakov.
2936
2937         * UIProcess/WebPageProxy.cpp:
2938         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): Added. Update internal state the
2939         same way we update it for server redirects, but don’t make client callbacks. Clients
2940         observing the URL property will see it change.
2941         * UIProcess/WebPageProxy.h:
2942
2943         * UIProcess/WebPageProxy.messages.in: Added DidChangeProvisionalURLForFrame.
2944
2945         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2946         (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL): Override this new
2947         FrameLoaderClient function to send a DidChangeProvisionalURLForFrame message to the UI
2948         process.
2949         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2950
2951 2015-05-11  Dan Bernstein  <mitz@apple.com>
2952
2953         <rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
2954         https://bugs.webkit.org/show_bug.cgi?id=144891
2955
2956         Reviewed by Darin Adler.
2957
2958         Sometimes, Find on Page’s constant 1.6 scale factor is too much. Smart magnification is
2959         designed to choose a scale factor that is just right.
2960
2961         * UIProcess/ios/SmartMagnificationController.h:
2962         * UIProcess/ios/SmartMagnificationController.messages.in: Added Magnify message.
2963         * UIProcess/ios/SmartMagnificationController.mm:
2964         (WebKit::SmartMagnificationController::magnify): Added. Handle the new message using
2965         -[WKContentView _soomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:].
2966         * WebProcess/WebPage/ios/FindControllerIOS.mm:
2967         (WebKit::FindController::updateFindIndicator): Instead of zooming to the selection rect,
2968         get the surrounding render rect (the area we would target for a double-tap at the beginning
2969         of the selection), and tell the magnification controller to target it. Use the center of the
2970         start of the selection as the origin.
2971
2972 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
2973
2974         Scroll snap logic should be triggered when resizing the WebView
2975         https://bugs.webkit.org/show_bug.cgi?id=142590
2976         <rdar://problem/20125088>
2977
2978         Reviewed by Simon Fraser.
2979
2980         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2981         (RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Modify use of 'closestSnapOffset' to satisfy the additional
2982         argument I added. This is currently not used for anything on iOS.
2983         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Ditto.
2984
2985 2015-05-11  Andreas Kling  <akling@apple.com>
2986
2987         Force a rebuild of JSNPObject.cpp on bots.
2988
2989         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2990         (WebKit::JSNPObject::callMethod):
2991
2992 2015-05-11  Anders Carlsson  <andersca@apple.com>
2993
2994         Simplify shim path computation
2995         https://bugs.webkit.org/show_bug.cgi?id=144884
2996         Part of rdar://problem/19708579.
2997
2998         Reviewed by Sam Weinig.
2999
3000         Factor the code that computes the shim path out into a separate function. Also make this mac only
3001         since we don't have any shims on iOS.
3002
3003         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3004         (WebKit::computeProcessShimPath):
3005         (WebKit::addDYLDEnvironmentAdditions):
3006
3007 2015-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
3008
3009         Unreviewed build fix
3010
3011         Unreviewed.
3012
3013         * UIProcess/API/APIUserContentExtensionStore.cpp:
3014         (API::compiledToFile):
3015
3016 2015-05-11  Alex Christensen  <achristensen@webkit.org>
3017
3018         [Content Extensions] Support domain-specific rules and exceptions.
3019         https://bugs.webkit.org/show_bug.cgi?id=144833
3020
3021         Reviewed by Darin Adler.
3022
3023         * Shared/WebCompiledContentExtension.cpp:
3024         (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode):
3025         (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength):
3026         (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode):
3027         (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength):
3028         (WebKit::WebCompiledContentExtension::domainFiltersBytecode):
3029         (WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength):
3030         (WebKit::WebCompiledContentExtension::bytecode): Deleted.
3031         (WebKit::WebCompiledContentExtension::bytecodeLength): Deleted.
3032         * Shared/WebCompiledContentExtension.h:
3033         * Shared/WebCompiledContentExtensionData.cpp:
3034         (WebKit::WebCompiledContentExtensionData::encode):
3035         (WebKit::WebCompiledContentExtensionData::decode):
3036         * Shared/WebCompiledContentExtensionData.h:
3037         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
3038         * UIProcess/API/APIUserContentExtensionStore.cpp:
3039         (API::ContentExtensionMetaData::fileSize):
3040         (API::encodeContentExtensionMetaData):
3041         (API::decodeContentExtensionMetaData):
3042         (API::compiledToFile):
3043         (API::createExtension):
3044         Keep track of 3 different types of bytecode to be able to handle domain-specific rules.
3045
3046 2015-05-11  Tim Horton  <timothy_horton@apple.com>
3047
3048         Page overlay action context override should indicate the source of the request
3049         https://bugs.webkit.org/show_bug.cgi?id=144832
3050         <rdar://problem/20562594>
3051
3052         Reviewed by Darin Adler.
3053
3054         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3055         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
3056         * WebProcess/WebPage/WebPageOverlay.cpp:
3057         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
3058         * WebProcess/WebPage/WebPageOverlay.h:
3059         (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
3060         * WebProcess/WebPage/mac/WebPageMac.mm:
3061         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3062         Add a parameter to WKBundlePageOverlayActionContextForResultAtPoint so that
3063         clients can tell whether the requested action context should be targetted
3064         at an action menu or immediate action.
3065
3066 2015-05-11  Daniel Bates  <dabates@apple.com>
3067
3068         [iOS] Close all open databases in expiration handler of process assertion
3069         https://bugs.webkit.org/show_bug.cgi?id=144661
3070         <rdar://problem/20845052>
3071
3072         Reviewed by Darin Adler.
3073
3074         For WebKit2, close all open databases when the process assertion expiration
3075         handler is called.
3076
3077         When the process assertion expiration handler is called we dispatch a synchronous
3078         message called ProcessWillSuspendImminently to the {Web, Network} processes to inform
3079         them that they will be suspended imminently. The {Web, Network} process will always
3080         service this message regardless if they were waiting for another message. In the
3081         WebProcess, we will close all open databases among other tasks upon receiving this
3082         message. In the NetworkProcess, we will purge some data from memory.
3083
3084         * NetworkProcess/NetworkProcess.cpp:
3085         (WebKit::NetworkProcess::didReceiveSyncMessage): Modified to call NetworkProcess::didReceiveSyncNetworkProcessMessage()
3086         to process the synchronous ProcessWillSuspendImminently message.
3087         (WebKit::NetworkProcess::processWillSuspendImminently): Added; free some memory.
3088         * NetworkProcess/NetworkProcess.h:
3089         * NetworkProcess/NetworkProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
3090         * Shared/ChildProcessProxy.h:
3091         (WebKit::ChildProcessProxy::sendSync): Added parameter sendSyncFlags so that we can send
3092         a sync message with flag IPC::InterruptWaitingIfSyncMessageArrives to cause the {Web, Network}Process
3093         to process the message regardless of whether it is waiting for another message.
3094         * UIProcess/Network/NetworkProcessProxy.cpp:
3095         (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
3096         ProcessWillSuspendImminently to the NetworkProcess.
3097         * UIProcess/Network/NetworkProcessProxy.h:
3098         * UIProcess/ProcessAssertion.cpp:
3099         (WebKit::ProcessAndUIAssertion::setClient): Added.
3100         * UIProcess/ProcessAssertion.h: Added abstract class ProcessAssertionClient.
3101         (WebKit::ProcessAssertionClient::~ProcessAssertionClient): Added.
3102         (WebKit::ProcessAssertion::setClient): Added.
3103         (WebKit::ProcessAssertion::client): Added.
3104         * UIProcess/ProcessThrottler.cpp:
3105         (WebKit::ProcessThrottler::didConnectToProcess):
3106         (WebKit::ProcessThrottler::assertionWillExpireImminently): Added; implements the ProcessAssertionClient
3107         interface. Notify the process throttler clients that the assertion is near expiration.
3108         * UIProcess/ProcessThrottler.h:
3109         * UIProcess/ProcessThrottlerClient.h: Added 
3110         * UIProcess/WebProcessProxy.cpp:
3111         (WebKit::WebProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
3112         ProcessWillSuspendImminently to the WebProcess.
3113         * UIProcess/WebProcessProxy.h:
3114         * UIProcess/ios/ProcessAssertionIOS.mm:
3115         (-[WKProcessAssertionBackgroundTaskManager addClient:]): Added.
3116         (-[WKProcessAssertionBackgroundTaskManager removeClient:]): Added.
3117         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): Modified expiration handler
3118         to notify ProcessAssertionClient clients that the assertion is near expiration.
3119         (WebKit::ProcessAssertion::~ProcessAssertion): Remove the client on destruction.
3120         (WebKit::ProcessAndUIAssertion::setClient): Added.
3121         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3122         (WebKit::WebDatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseManager::closeAllDatabases().
3123         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
3124         * WebProcess/WebProcess.cpp:
3125         (WebKit::WebProcess::didReceiveSyncMessage): Call WebProcess::didReceiveSyncWebProcessMessage() to process
3126         the synchronous ProcessWillSuspendImminently message. Removed logging for an unhandled synchronous message
3127         since WebProcess::didReceiveSyncWebProcessMessage() will ASSERT_NOT_REACHED() for such a message.
3128         (WebKit::WebProcess::prepareToSuspend): Extracted code from WebProcess::processWillSuspend() so that it can
3129         be used from both WebProcess::processWillSuspend() and WebProcess::processWillSuspendImminently(). And modified
3130         it to conditionally dispatch a ProcessReadyToSuspend message to the WebProcessProxy. We only want to dispatch
3131         such a message as part of a coordinated suspension by the ProcessThrottler. That is, we do not want to dispatch
3132         the ProcessReadyToSuspend message when the background assertion is near expiration (i.e. WebProcess::processWillSuspendImminently()
3133         is called).
3134         (WebKit::WebProcess::processWillSuspendImminently): Added. Suspend all open databases among other tasks.
3135         (WebKit::WebProcess::processWillSuspend): Implemented in terms of WebProcess::prepareToSuspend().
3136         (WebKit::WebProcess::processSuspensionCleanupTimerFired): Modified to conditionally dispatch a ProcessReadyToSuspend
3137         message to the WebProcessProxy.
3138         (WebKit::WebProcess::processDidResume): Stop the suspension cleanup timer, which may be active if the WebProcess
3139         did not mark all its graphics layers as volatile before process suspension.
3140         * WebProcess/WebProcess.h:
3141         * WebProcess/WebProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
3142
3143 2015-05-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3144
3145         Use Ref instead of PassRefPtr in WebCore/page
3146         https://bugs.webkit.org/show_bug.cgi?id=144841
3147
3148         Reviewed by Darin Adler.
3149
3150         To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
3151         in WebCore/page.
3152
3153         (WebKit::WebUserContentController::WebUserContentController):
3154         * UIProcess/WebPageProxy.cpp:
3155         (WebKit::WebPageProxy::setTextIndicator):
3156         * UIProcess/mac/PageClientImpl.mm:
3157         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3158         * WebProcess/UserContent/WebUserContentController.cpp:
3159         (WebKit::WebUserContentController::WebUserContentController):
3160
3161 2015-05-10  Philip Chimento  <philip.chimento@gmail.com>
3162
3163         [GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
3164         https://bugs.webkit.org/show_bug.cgi?id=144554
3165
3166         Reviewed by Darin Adler.
3167
3168         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3169         (WebKit::NetworkProcess::platformSetCacheModel): Use WTF::ramSize()
3170         instead of local function. Also use WTF::MB instead of dividing by
3171         1024 * 1024.
3172         (WebKit::getMemorySize): Deleted.
3173         * WebProcess/soup/WebProcessSoup.cpp:
3174         (WebKit::WebProcess::platformSetCacheModel): Ditto.
3175         (WebKit::getMemorySize): Deleted.
3176
3177 2015-05-10  Yongjun Zhang  <yongjun_zhang@apple.com>
3178
3179         Use preview view controller from WebKitSystemInterface.
3180         https://bugs.webkit.org/show_bug.cgi?id=144836
3181
3182         Add a property _allowsLinkPreview to WKWebView so that we can turn on/off preview at runtime. Also,
3183         for client that doesn't provide preview view controller, use the default view controller prepared
3184         by WebKitSystemInterface.
3185
3186         Reviewed by Dan Bernstein.
3187
3188         * UIProcess/API/Cocoa/WKWebView.mm:
3189         (-[WKWebView initWithFrame:configuration:]):
3190         (-[WKWebView _allowsLinkPreview]):
3191         (-[WKWebView _setAllowsLinkPreview:]):
3192         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _allowsLinkPreview property
3193         * UIProcess/ios/WKContentView.mm:
3194         (-[WKContentView willMoveToWindow:]):
3195         * UIProcess/ios/WKContentViewInteraction.h:
3196         * UIProcess/ios/WKContentViewInteraction.mm:
3197         (-[WKContentView _registerPreviewInWindow:]):
3198         (-[WKContentView _unregisterPreviewInWindow:]):
3199         (-[WKContentView previewViewControllerForPosition:inSourceView:]): : For client that doesn't provide
3200             preview delegate, use preview view controller in WebKitSystemInterface.
3201         (-[WKContentView commitPreviewViewController:]):
3202
3203 2015-05-10  Darin Adler  <darin@apple.com>
3204
3205         Fix internal Apple builds on Mavericks.
3206
3207         * UIProcess/API/mac/WKView.mm:
3208         (-[WKView _dismissContentRelativeChildWindows]): Added missing conditionals around
3209         some code that is for OS X 10.10 or newer only. There were similar conditionals around
3210         other nearby code in this file, and around other uses of the same method in other files,
3211         so matched the style.
3212
3213 2015-05-10  Dan Bernstein  <mitz@apple.com>
3214
3215         iOS internal build fix.
3216
3217         * Platform/mac/MenuUtilities.mm:
3218
3219 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
3220
3221         Remove unnecessary semicolons.
3222         https://bugs.webkit.org/show_bug.cgi?id=144844
3223
3224         Reviewed by Darin Adler.
3225
3226         No new tests, no behavior change.
3227
3228         * Shared/Downloads/mac/DownloadMac.mm:
3229         (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
3230         * UIProcess/WebProcessProxy.cpp:
3231         (WebKit::WebProcessProxy::transformHandlesToObjects):
3232         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3233         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
3234         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3235         (WebKit::idToHistoryItemMap):
3236
3237 2015-05-10  Darin Adler  <darin@apple.com>
3238
3239         Fix build.
3240
3241         * Platform/mac/MenuUtilities.mm: Added includes that were somehow omitted in what
3242         I committed before.
3243
3244 2015-05-10  Darin Adler  <darin@apple.com>
3245
3246         [Cocoa] Don't soft link DataDetectorsCore
3247         https://bugs.webkit.org/show_bug.cgi?id=144837
3248
3249         Reviewed by Dan Bernstein.
3250
3251         * Platform/mac/MenuUtilities.mm: Use DataDetectorsSPI.h instead of doing it here.
3252
3253         * WebProcess/WebPage/mac/WebPageMac.mm: Removed unneeded include of unused header,
3254         DataDetectorsSPI.h.
3255
3256 2015-05-09  Dan Bernstein  <mitz@apple.com>
3257
3258         Deployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
3259         https://bugs.webkit.org/show_bug.cgi?id=144831
3260
3261         Reviewed by Sam Weinig.
3262
3263         Reverted r182846 and r182904.
3264
3265         * Shared/API/Cocoa/WKFoundation.h:
3266         * WebKit2.xcodeproj/project.pbxproj:
3267
3268 2015-05-09  Yoav Weiss  <yoav@yoav.ws>
3269
3270         Remove the PICTURE_SIZES build flag
3271         https://bugs.webkit.org/show_bug.cgi?id=144679
3272
3273         Reviewed by Benjamin Poulain.
3274
3275         Removed the PICTURE_SIZES build time flag.
3276
3277         * Configurations/FeatureDefines.xcconfig:
3278
3279 2015-05-08  Beth Dakin  <bdakin@apple.com>
3280
3281         Shuffle touch-related code to keep the internal builds working
3282         https://bugs.webkit.org/show_bug.cgi?id=144812
3283
3284         Reviewed by Benjamin Poulain.
3285
3286         * Shared/NativeWebTouchEvent.h:
3287         * Shared/WebEvent.h:
3288         * Shared/WebEventConversion.cpp:
3289         * Shared/ios/NativeWebTouchEventIOS.mm:
3290         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
3291         (WebKit::extractWebTouchPoint): Deleted.
3292         * Shared/ios/WebPlatformTouchPointIOS.cpp:
3293
3294 2015-05-08  Dan Bernstein  <mitz@apple.com>
3295
3296         <rdar://problem/20757196> NSInternalInconsistencyException raised in -[NSString encodeWithCoder:] beneath createEncodedObject when using WKRemoteObjectEncoder for Safari AutoFill
3297         https://bugs.webkit.org/show_bug.cgi?id=144818
3298
3299         Reviewed by Anders Carlsson.
3300
3301         Allow NSString instances that contain unpaired surrogates to be encoded by
3302         WKRemoteObjectCoder by encoding them directly rather than using
3303         -[NSString encodeWithCoder:].
3304
3305         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3306         (encodeString): Added. Sets an API::String as the object to encode.
3307         (encodeObject): Changed to use encodeString for NSString instances.
3308         (decodeString): Added. Gets an API::String from the dictionary and returns it as an
3309         NSString.
3310         (decodeObject): Changed to use decodeString for NSString instances.
3311
3312 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
3313
3314         Fix the build.
3315
3316         * Platform/mac/LayerHostingContext.mm:
3317         (WebKit::LayerHostingContext::createFencePort):
3318
3319 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
3320
3321         Periodically repaint during resize while using the DynamicSizeWithMinimumViewSize layout strategy
3322         https://bugs.webkit.org/show_bug.cgi?id=144816
3323
3324         Reviewed by Simon Fraser.
3325
3326         * UIProcess/mac/WKViewLayoutStrategy.mm:
3327         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
3328         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]):
3329         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
3330         Factor out _updateTransientScale from updateLayout.
3331         Keep track of the last viewScaleFactor that we know is being displayed
3332         (_lastCommittedViewScale) and use that for computing the transient scale,
3333         so that we can recompute the transient scale while the UI process's notion
3334         of the actual view scale might have moved ahead of what the Web process has
3335         painted.
3336
3337 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
3338
3339         Fix the build.
3340
3341         * UIProcess/WebPageProxy.cpp:
3342
3343 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
3344
3345         Fix the build.
3346
3347         * Platform/mac/LayerHostingContext.mm:
3348         (WebKit::LayerHostingContext::createFencePort):
3349
3350 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
3351
3352         Fix the build.
3353
3354         * Platform/mac/LayerHostingContext.mm:
3355         (WebKit::LayerHostingContext::createFencePort):
3356
3357 2015-05-08  Timothy Horton  <timothy_horton@apple.com>
3358
3359         Flip the direction of the fence in scaleViewAndUpdateGeometryFenced
3360         https://bugs.webkit.org/show_bug.cgi?id=144810
3361
3362         Reviewed by Simon Fraser.
3363
3364         Send the fence from the Web process to the UI process, instead of vice versa.
3365         This means that we won't keep the UI process CAContext blocked for the whole
3366         time that the Web process is doing layout/painting/etc. Instead, we'll start
3367         blocking the Web process CAContext immediately after flushing and before committing,
3368         and send the fence to the UI process to be applied immediately. This minimizes
3369         the amount of time in both processes spent blocked on the fence.
3370
3371         * Platform/mac/LayerHostingContext.h:
3372         * Platform/mac/LayerHostingContext.mm:
3373         (WebKit::LayerHostingContext::createFencePort):
3374         Add createFencePort, which creates a MachSendRight wrapping a CA fence port.
3375         Note that you must setFencePort() with this port if you want the LayerHostingContext's
3376         CAContext to block on it!
3377
3378         * UIProcess/WebPageProxy.cpp:
3379         (WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced):
3380         (WebKit::WebPageProxy::machSendRightCallback):
3381         * UIProcess/WebPageProxy.h:
3382         * UIProcess/WebPageProxy.messages.in:
3383         Create a callback and send it to the Web process along with scaleViewAndUpdateGeometryFenced.
3384
3385         * UIProcess/mac/WKViewLayoutStrategy.mm:
3386         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
3387         When called back, install the fence port in our CAContext; when the commit goes through,
3388         remove the transient scale as we did previously.
3389
3390         * WebProcess/WebPage/DrawingArea.h:
3391         (WebKit::DrawingArea::replyWithFenceAfterNextFlush):
3392         (WebKit::DrawingArea::updateGeometry): Deleted.
3393         * WebProcess/WebPage/WebPage.cpp:
3394         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
3395         * WebProcess/WebPage/WebPage.h:
3396         * WebProcess/WebPage/WebPage.messages.in:
3397         Instead of installing a fence created in the UI process, tell the DrawingArea
3398         to create one and reply to the UI process with it after the next flush.
3399
3400         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3401         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3402         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3403         (WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush):
3404         After flushing, before committing, create a fence and reply to any
3405         callbacks that requested fences, and install it in our context.
3406
3407 2015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
3408
3409         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
3410         https://bugs.webkit.org/show_bug.cgi?id=144746
3411
3412         Reviewed by Carlos Garcia Campos.
3413
3414         Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
3415
3416         * Shared/gtk/ProcessExecutablePathGtk.cpp:
3417         (WebKit::findWebKitProcess):
3418         * UIProcess/API/gtk/WebKitWebContext.cpp:
3419         (injectedBundleDirectory):
3420         * UIProcess/gtk/TextCheckerGtk.cpp:
3421         (WebKit::enchantTextChecker):
3422
3423 2015-05-08  Anders Carlsson  <andersca@apple.com>
3424
3425         Fix ProcessLauncher port leak
3426         https://bugs.webkit.org/show_bug.cgi?id=144807
3427         rdar://problem/20593291
3428
3429         Reviewed by Sam Weinig.
3430
3431         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3432         (WebKit::connectToService):
3433         xpc_dictionary_set_mach_send increments the send right count so make sure to
3434         balance it with a call to mach_port_deallocate.
3435
3436 2015-05-08  Beth Dakin  <bdakin@apple.com>
3437
3438         Fix performance tests after r183954
3439         https://bugs.webkit.org/show_bug.cgi?id=144805
3440
3441         Reviewed by Alexey Proskuryakov.
3442
3443         Web* is traditionally a WK1 prefix, so use the WK2 prefix instead in WK2 so that 
3444         we don’t have two classes with the same name in the two projects.
3445         * UIProcess/mac/WKImmediateActionController.mm:
3446         (-[WKImmediateActionController _defaultAnimationController]):
3447
3448 2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3449
3450         [GTK] Expose allowFileAccessFromFileURLs setting to WebKit2 GTK+ API
3451         https://bugs.webkit.org/show_bug.cgi?id=144748
3452
3453         Reviewed by Sergio Villar Senin.
3454
3455         This is needed by local applications loaded as a file URI that do XMLHttpRequests.
3456
3457         * UIProcess/API/gtk/WebKitSettings.cpp:
3458         (webKitSettingsSetProperty):
3459         (webKitSettingsGetProperty):
3460         (webkit_settings_class_init):
3461         (webkit_settings_get_allow_file_access_from_file_urls):
3462         (webkit_settings_set_allow_file_access_from_file_urls):
3463         * UIProcess/API/gtk/WebKitSettings.h:
3464         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
3465         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
3466
3467 2015-05-08  Andreas Kling  <akling@apple.com>
3468
3469         Optimize serialization of quoted JSON strings.
3470         <https://webkit.org/b/144754>
3471
3472         Reviewed by Darin Adler.
3473
3474         * NetworkProcess/cache/NetworkCacheEntry.cpp:
3475         (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
3476
3477 2015-05-08  Commit Queue  <commit-queue@webkit.org>
3478
3479         Unreviewed, rolling out r183945.
3480         https://bugs.webkit.org/show_bug.cgi?id=144789
3481
3482         "It broke all the GTK+ tests" (Requested by KaL on #webkit).
3483
3484         Reverted changeset:
3485
3486         "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
3487         https://bugs.webkit.org/show_bug.cgi?id=144746
3488         http://trac.webkit.org/changeset/183945
3489
3490 2015-05-07  Conrad Shultz  <conrad_shultz@apple.com>
3491
3492         Don't register for Lookup notifications until needed
3493         https://bugs.webkit.org/show_bug.cgi?id=144783
3494
3495         Reviewed by Tim Horton.
3496
3497         * UIProcess/API/mac/WKView.mm:
3498         Add a WKViewData ivar to track whether we've already registered for popover notifications.
3499         (-[WKView _prepareForDictionaryLookup]):
3500         Added; moved notification registration from -[WKView initWithFrame:processPool:configuration:webView:.
3501         (-[WKView initWithFrame:processPool:configuration:webView:]):
3502         Move notification registration to -_prepareForDictionaryLookup.
3503
3504         * UIProcess/API/mac/WKViewInternal.h:
3505         Expose -_prepareForDictionaryLookup.
3506
3507         * UIProcess/mac/PageClientImpl.mm:
3508         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3509         Send -[WKView _prepareForDictionaryLookup].
3510
3511         * UIProcess/mac/WKImmediateActionController.mm:
3512         (-[WKImmediateActionController _animationControllerForText]):
3513         Ditto.
3514
3515 2015-05-07  Commit Queue  <commit-queue@webkit.org>
3516
3517         Unreviewed, rolling out r183961.
3518         https://bugs.webkit.org/show_bug.cgi?id=144784
3519
3520         Broke js/dom/JSON-stringify.html (Requested by kling on
3521         #webkit).
3522
3523         Reverted changeset:
3524
3525         "Optimize serialization of quoted JSON strings."
3526         https://bugs.webkit.org/show_bug.cgi?id=144754
3527         http://trac.webkit.org/changeset/183961
3528
3529 2015-05-07  Anders Carlsson  <andersca@apple.com>
3530
3531         Build fixes.
3532
3533         * UIProcess/API/mac/WKView.mm:
3534         (-[WKView initWithFrame:processPool:configuration:webView:]):
3535         Use the regular init method.
3536
3537         * UIProcess/mac/WKSharingServicePickerDelegate.mm:
3538         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
3539         * WebProcess/WebPage/mac/WebPageMac.mm:
3540         (WebKit::WebPage::handleSelectionServiceClick):
3541         Pass empty dictionaries instead of nil.
3542
3543 2015-05-07  Chris Dumez  <cdumez@apple.com>
3544
3545         ASSERTION when pasting text into the WebInspector console
3546         https://bugs.webkit.org/show_bug.cgi?id=144774
3547
3548         Reviewed by Ryosuke Niwa.
3549
3550         Fix assertion in didChangeSelection() meant to check that calling
3551         editorState() does not cause a synchronous layout. The assertion
3552         was not correct as it was relying on FrameView::needsLayout() and
3553         we would hit it if calling editorState() would schedule a layout.
3554         Instead, the new assertion relies on FrameView::layoutCount(),
3555         which is more accurate.
3556
3557         * WebProcess/WebPage/WebPage.cpp:
3558         (WebKit::WebPage::didChangeSelection):
3559
3560 2015-05-07  Andreas Kling  <akling@apple.com>
3561
3562         Optimize serialization of quoted JSON strings.
3563         <https://webkit.org/b/144754>
3564
3565         Reviewed by Darin Adler.
3566
3567         * NetworkProcess/cache/NetworkCacheEntry.cpp:
3568         (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
3569
3570 2015-05-07  Martin Robinson  <mrobinson@igalia.com>
3571
3572         Followup fixes to r183936
3573
3574         I neglected to include a few review comments when I landed the patch.
3575
3576         * UIProcess/gtk/TextCheckerGtk.cpp:
3577         (WebKit::checkerState): Remove double semicolons.
3578         (WebKit::updateStateForAllProcessPools): Use range-based-for loop here and
3579         give the function a better name.
3580         (WebKit::TextChecker::setContinuousSpellCheckingEnabled): Use new function name
3581         (WebKit::TextChecker::setGrammarCheckingEnabled):Use new function name
3582         (WebKit::TextChecker::ignoreWord): Fix unused parameter warning.
3583         (WebKit::updateStateForAllContexts): Deleted.
3584
3585 2015-05-07  Michael Catanzaro  <mcatanzaro@igalia.com>
3586
3587         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
3588         https://bugs.webkit.org/show_bug.cgi?id=144746
3589
3590         Reviewed by Martin Robinson.
3591
3592         Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
3593
3594         * Shared/gtk/ProcessExecutablePathGtk.cpp:
3595         (WebKit::findWebKitProcess):
3596         * UIProcess/API/gtk/WebKitWebContext.cpp:
3597         (injectedBundleDirectory):
3598         * UIProcess/gtk/TextCheckerGtk.cpp:
3599         (WebKit::enchantTextChecker):
3600
3601 2015-05-06  Dean Jackson  <dino@apple.com>
3602
3603         Handle backdrop views that have to tile
3604         https://bugs.webkit.org/show_bug.cgi?id=142317
3605         <rdar://problem/20049088>
3606
3607         Reviewed by Simon Fraser.
3608
3609         Take 2 - this was rolled out because Mavericks was crashing.
3610
3611         Add some better logging for custom appearance.
3612
3613         * Shared/mac/RemoteLayerTreeTransaction.mm:
3614         (WebKit::RemoteLayerTreeTextStream::operator<<):
3615
3616 2015-05-07  Sungmann Cho  <sungmann.cho@navercorp.com>
3617
3618         Add PLUGIN_ARCHITECTURE(X11) around m_frameRectInWindowCoordinates in NetscapePlugin.
3619         https://bugs.webkit.org/show_bug.cgi?id=144490
3620
3621         Reviewed by Darin Adler.
3622
3623         m_frameRectInWindowCoordinates in NetscapePlugin is currently being used only for
3624         the windowed plugins, and the windowed plugins are only supported on X11. So we can
3625         guard it with PLUGIN_ARCHITECTURE(X11).
3626
3627         No new tests, no behavior change.
3628
3629         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3630         (WebKit::NetscapePlugin::geometryDidChange):
3631         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3632
3633 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
3634
3635         Revert "Introducing the Platform Abstraction Layer (PAL)"
3636         https://bugs.webkit.org/show_bug.cgi?id=144751
3637
3638         Unreviewed.
3639
3640         PAL should be a new target inside WebCore, rather than a top-level folder.
3641
3642         * Configurations/FeatureDefines.xcconfig: Updated
3643
3644 2015-05-07  Jer Noble  <jer.noble@apple.com>
3645
3646         [WK2][Fullscreen] Fullscreen video does not enter low-power mode.
3647         https://bugs.webkit.org/show_bug.cgi?id=144744
3648
3649         Reviewed by Darin Adler.
3650
3651         One of the requirements of entering low-power compositing mode is that no masking layers
3652         are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
3653         transition animation completes, remove the mask layer entirely from our clipping layer.
3654         This means it needs to be re-created and added when entering fullscreen, rather than just
3655         at initialization time.
3656
3657         * UIProcess/mac/WKFullScreenWindowController.mm:
3658         (-[WKFullScreenWindowController initWithWindow:webView:]):
3659         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
3660         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
3661
3662 2015-05-07  Martin Robinson  <mrobinson@igalia.com>
3663
3664         [GTK] All spell checking layout tests fail
3665         https://bugs.webkit.org/show_bug.cgi?id=144648
3666
3667         Reviewed by Carlos Garcia Campos.
3668
3669         Simplify and complete the GTK+ spell-checking implementation. Instead of using
3670         the EFL/GTK+ only WKTextChecker interface, directly implement Enchant spell-checking
3671         in TextCheckerGtk. The per-context spell checking API is an illusion, since all
3672         WKTextChecker implementations will adjust the same singleton. This can be a first step
3673         toward removing it entirely.
3674
3675         Also complete the implementation of the TextChecker interface by duplicating the EFL code,
3676         which reuses other methods in the same class. Eventually this duplication will collapse,
3677         once GTK+ and EFL can share an Enchant implementation.
3678
3679         * PlatformGTK.cmake:
3680         * UIProcess/API/gtk/WebKitPrivate.h:
3681         * UIProcess/API/gtk/WebKitTextChecker.cpp: Removed.
3682         * UIProcess/API/gtk/WebKitTextChecker.h: Removed.
3683         * UIProcess/API/gtk/WebKitWebContext.cpp: Remove WebTextChecker usage and
3684         replace it with calls directly to the TextChecker singleton via static methods.
3685         * UIProcess/TextChecker.h:
3686         * UIProcess/gtk/TextCheckerGtk.cpp: Move the WebTextChecker enchant implementation
3687         here and reuse the EFL version of WebKit::TextChecker::requestCheckingOfString.
3688         Also initialize languages properly when building for developer builds. This
3689         allows WebKitTestRunner to work even when it doesn't explicitly set the languages.
3690
3691 2015-05-07  Ada Chan  <adachan@apple.com>
3692
3693         Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
3694         https://bugs.webkit.org/show_bug.cgi?id=144666
3695
3696         Reviewed by Darin Adler.
3697
3698         * UIProcess/WebBackForwardList.cpp:
3699         (WebKit::WebBackForwardList::backForwardListState):
3700         If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
3701         If all the items are filtered out, set currentIndex to the uninitialized value.
3702
3703 2015-05-07  Csaba Osztrogonác  <ossy@webkit.org>
3704
3705         [WK2] Remove Windows cruft
3706         https://bugs.webkit.org/show_bug.cgi?id=144745
3707
3708         Reviewed by Darin Adler.
3709
3710         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3711         (WebKit::getMemorySize):
3712         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3713         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
3714         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
3715         * WebProcess/soup/WebProcessSoup.cpp:
3716         (WebKit::getMemorySize):
3717
3718 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
3719
3720         REGRESSION(r182032): [GTK] Production build is broken after r182032
3721         https://bugs.webkit.org/show_bug.cgi?id=144736
3722
3723         Reviewed by Martin Robinson.
3724
3725         The problem is that r182032 moved the NetworkProcess sources from
3726         WebKit2 sources to NetworkProcess sources. That's not a problem
3727         for developer builds where all internal symbols are exported, but
3728         doesn't work for production builds because all those internal
3729         symbols are private.
3730
3731         * CMakeLists.txt: Use a different name for common network process
3732         sources variable.
3733         * PlatformMac.cmake: Append common network process sources to the
3734         network process source list for Mac.
3735
3736 2015-05-07  Dan Bernstein  <mitz@apple.com>
3737
3738         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
3739         https://bugs.webkit.org/show_bug.cgi?id=144727
3740
3741         Reviewed by Darin Adler.
3742
3743         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig, and define
3744         INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
3745         * Configurations/WebKit2.xcconfig: Define INSTALL_PATH_ACTUAL and let INSTALL_PATH be
3746         derived from it and INSTALL_PATH_PREFIX. Don’t override DYLIB_INSTALL_NAME_BASE for iOS,
3747         because we define LD_DYLIB_INSTALL_NAME directly where needed.
3748
3749 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
3750
3751         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.1 release.
3752
3753         * gtk/NEWS: Add release notes for 2.9.1.
3754
3755 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
3756
3757         [GTK] Remove dock button from Web Inspector window
3758         https://bugs.webkit.org/show_bug.cgi?id=144728
3759
3760         Reviewed by Sergio Villar Senin.
3761
3762         We added the dock buttons to the headerbar, because they were
3763         removed from the inspector toolbar, but with the new tabbed
3764         design, the dock buttons are back in the toolbar and look redundant.
3765
3766         * UIProcess/WebInspectorProxy.h:
3767         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3768         (WebKit::WebInspectorProxy::createInspectorWindow):
3769         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
3770         (WebKit::WebInspectorProxy::dockButtonClicked): Deleted.
3771
3772 2015-05-06  Jer Noble  <jer.noble@apple.com>
3773
3774         [WK2][Fullscreen] Elements whose children extend beyond their bounds are clipped in fullscreen mode.
3775         https://bugs.webkit.org/show_bug.cgi?id=144716
3776
3777         Reviewed by Darin Adler.
3778
3779         We create a mask animation for the transition between windowed and fullscreen modes, on the
3780         assumption that the element being taken into fullscreen mode does not have visible children
3781         who extend beyond that elements bounds. This assumption breaks down in the case where div
3782         with absolutely positioned children is taken fullscreen. While we can't necessarily make the
3783         transition look correct in this case, we can remove the mask after the transition completes.
3784
3785         * UIProcess/mac/WKFullScreenWindowController.mm:
3786         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
3787         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
3788         (WebKit::removeAllMediaKeyStorageForOriginPath):
3789
3790 2015-05-06  Jinwoo Jeong  <jw00.jeong@samsung.com>
3791
3792         Fix a build break on EFL debug build
3793         https://bugs.webkit.org/show_bug.cgi?id=144654
3794
3795         Reviewed by Gyuyoung Kim.
3796
3797         No new tests, just build fix.
3798
3799         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3800         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
3801         (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext):
3802
3803 2015-05-06  Daniel Bates  <dabates@apple.com>
3804
3805         [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
3806         https://bugs.webkit.org/show_bug.cgi?id=144657
3807         <rdar://problem/18894598>
3808
3809         Reviewed by Andy Estes.
3810
3811         Pause and resume the database thread when the UIProcess enters and leaves the background,
3812         respectively, so that we avoid WebProcess termination due to holding a locked SQLite
3813         database file when the WebProcess is suspended. This behavior matches the analagous
3814         behavior in Legacy WebKit.
3815
3816         * UIProcess/WebPageProxy.h:
3817         * UIProcess/ios/WKContentView.mm:
3818         (-[WKContentView _applicationDidEnterBackground:]): Call WebPageProxy::applicationDidEnterBackground()
3819         when the UIProcess enters the background.
3820         * UIProcess/ios/WebPageProxyIOS.mm:
3821         (WebKit::WebPageProxy::applicationDidEnterBackground): Added; notify the WebProcess to pause the database thread.
3822         We temporarily take out background assertion on the WebProcess before sending this notification to ensure that the
3823         WebProcess is running to receive it. We'll release this assertion when the WebProcess replies that it received the
3824         notification.
3825         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3826         (WebKit::WebDatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseManager::setPauseAllDatabases().
3827         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
3828         * WebProcess/WebPage/WebPage.h:
3829         * WebProcess/WebPage/WebPage.messages.in: Add message ApplicationDidEnterBackground(). Also,
3830         add empty lines to help demarcate this message and the other UIKit application lifecycle-related
3831         messages from the rest of the list of messages.
3832         * WebProcess/WebPage/ios/WebPageIOS.mm:
3833         (WebKit::WebPage::applicationWillEnterForeground): Resume the database thread.
3834         (WebKit::WebPage::applicationDidEnterBackground): Pause the database thread.
3835
3836 2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>
3837
3838         [EFL] ewk_view_page_contents_get() API test is flaky
3839         https://bugs.webkit.org/show_bug.cgi?id=144683
3840
3841         Reviewed by Gyuyoung Kim.
3842
3843         Callback of WKPageGetContentsAsMHTMLData contains WKData which does not contain null terminated character.
3844
3845         * UIProcess/API/efl/ewk_view.cpp: Pass the data of string instead of WKData directly.
3846         (ewkViewPageContentsAsMHTMLCallback):
3847
3848 2015-05-06  Joseph Pecoraro  <pecoraro@apple.com>
3849
3850         Web Inspector: Docking Toolbar Buttons do not respect Docking Availability
3851         https://bugs.webkit.org/show_bug.cgi?id=144714
3852
3853         Reviewed by Timothy Hatcher.
3854
3855         * UIProcess/WebInspectorProxy.cpp:
3856         (WebKit::WebInspectorProxy::createInspectorPage):
3857         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
3858         * WebProcess/WebPage/WebInspectorUI.cpp:
3859         (WebKit::WebInspectorUI::setDockingUnavailable):
3860         * WebProcess/WebPage/WebInspectorUI.h:
3861         * WebProcess/WebPage/WebInspectorUI.messages.in:
3862         When docking availability changes, inform the inspector page
3863         so it can respond by updating its UI.
3864
3865 2015-05-06  Joonghun Park  <jh718.park@samsung.com>
3866
3867         [WK2] Simplify AsyncRequestImpl::ArgumentType parameters
3868         https://bugs.webkit.org/show_bug.cgi?id=144689
3869
3870         Reviewed by Darin Adler.
3871
3872         Remove duplicated typename and ::type from AsyncRequestImpl related
3873         function parameters.
3874
3875         * Shared/AsyncRequest.h:
3876
3877 2015-05-06  Commit Queue  <commit-queue@webkit.org>
3878
3879         Unreviewed, rolling out r183894.
3880         https://bugs.webkit.org/show_bug.cgi?id=144719
3881
3882         crashes on mavericks (Requested by dino on #webkit).
3883
3884         Reverted changeset:
3885
3886         "Handle backdrop views that have to tile"
3887         https://bugs.webkit.org/show_bug.cgi?id=142317
3888         http://trac.webkit.org/changeset/183894
3889
3890 2015-05-06  Brady Eidson  <beidson@apple.com>
3891
3892         Addition review followup for:
3893         Crash executing null AsyncRequest in IDB code.
3894         <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
3895
3896         Reviewed by Darin Adler.
3897
3898         This patch adds a layer on top of the UniqueIDBDatabase request map to catch this coding mistake in the future. 
3899  
3900          * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3901         (WebKit::UniqueIDBDatabase::didCompleteBoolRequest): Get rid of the ASSERT and the temporary variable,
3902           make it a single line which reads better.
3903         (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore): Ditto.
3904         (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore): Ditto.
3905         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore): Ditto.
3906         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore): Ditto.
3907         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore): Ditto.
3908         (WebKit::UniqueIDBDatabase::didCountInBackingStore): Ditto.
3909         (WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore): Ditto.
3910         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
3911
3912         Add the class AsyncRequestMap which shadows a HashMap but does aggressive runtime checks
3913         in ::take() to make sure the same request was not dispatched twice in a row, and makes sure we
3914         never try to execute a null AsyncRequest by way of a RELEASE_ASSERT.
3915         * Shared/AsyncRequest.h:
3916         (WebKit::AsyncRequestMap::AsyncRequestMap):
3917         (WebKit::AsyncRequestMap::take):
3918         (WebKit::AsyncRequestMap::add):
3919         (WebKit::AsyncRequestMap::clear):
3920         (WebKit::AsyncRequestMap::values):
3921
3922 2015-05-06  Brady Eidson  <beidson@apple.com>
3923
3924         Crash executing null AsyncRequest in IDB code.
3925         <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
3926
3927         Reviewed by Darin Adler.
3928
3929         When UniqueIDBDatabase fails to execute an operation on the database work queue it usually
3930         dispatches an AsyncRequest ID back to the main thread with an error callback.
3931
3932         For two of its operations it would then also dispatch the success callback.
3933
3934         In those cases the main thread would first take the AsyncRequest for the error callback out
3935         of a map and then execute it.
3936
3937         It would then try to take the same AsyncRequest out of the map again, fail to do so, then
3938         execute a null AsyncRequest.
3939
3940         This patch fixes the two functions to not dispatch both an error and success callback.
3941
3942         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3943         (WebKit::UniqueIDBDatabase::countInBackingStore): Return after dispatching the error callback.
3944         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Ditto.
3945
3946 2015-05-06  Dean Jackson  <dino@apple.com>
3947
3948         Handle backdrop views that have to tile
3949         https://bugs.webkit.org/show_bug.cgi?id=142317
3950         <rdar://problem/20049088>
3951
3952         Reviewed by Simon Fraser.
3953
3954         Add some better logging for custom appearance.
3955
3956         * Shared/mac/RemoteLayerTreeTransaction.mm:
3957         (WebKit::RemoteLayerTreeTextStream::operator<<):
3958
3959 2015-05-06  Chris Dumez  <cdumez@apple.com>
3960
3961         Disable network cache efficacy logging
3962         https://bugs.webkit.org/show_bug.cgi?id=144703
3963         <rdar://problem/20439143>
3964
3965         Reviewed by Andreas Kling.
3966
3967         Disable network cache efficacy logging by default as we have sufficient
3968         data for now.
3969
3970         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3971         (WebKit::registerUserDefaultsIfNeeded):
3972
3973 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
3974
3975         Fix the build.
3976
3977         * UIProcess/mac/WKViewLayoutStrategy.mm:
3978         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
3979
3980 2015-05-06  Dan Bernstein  <mitz@apple.com>
3981
3982         No way to get a WKWebProcessPlugInFrame’s parent frame
3983         https://bugs.webkit.org/show_bug.cgi?id=144705
3984
3985         Reviewed by Sam Weinig.
3986
3987         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
3988         (-[WKWebProcessPlugInFrame _parentFrame]): Added this getter.
3989         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Declared new
3990         _parentFrame property.
3991
3992 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
3993
3994         Fix the build.
3995
3996         * UIProcess/mac/WKViewLayoutStrategy.mm:
3997         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
3998
3999 2015-04-02  Myles C. Maxfield  <mmaxfield@apple.com>
4000
4001         Introducing the Platform Abstraction Layer (PAL)
4002         https://bugs.webkit.org/show_bug.cgi?id=143358
4003
4004         Reviewed by Simon Fraser.
4005
4006         * Configurations/FeatureDefines.xcconfig: Updated
4007
4008 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
4009
4010         [GTK][WK2] The WebKit network disk cache is not enabled
4011         https://bugs.webkit.org/show_bug.cgi?id=142821
4012
4013         Reviewed by Martin Robinson.
4014
4015         Enable NetworkCache for the GTK+ port.
4016
4017         * config.h:
4018
4019 2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>
4020
4021         [EFL] Remove redudant condition in ViewClientEfl::didChangeViewportAttributes
4022         https://bugs.webkit.org/show_bug.cgi?id=144672
4023
4024         Reviewed by Gyuyoung Kim.
4025
4026         ViewClientEfl::didChangeViewportAttributes is always called when fixed layout is disabled.
4027
4028         * UIProcess/efl/ViewClientEfl.cpp:
4029         (WebKit::ViewClientEfl::didChangeViewportAttributes):
4030         Removes condition that checks whether fixed layout is enabled.
4031
4032 2015-05-05  Alexey Proskuryakov  <ap@apple.com>
4033
4034         NetworkResourceLoader::cleanup() should clear ResourceHandle client pointer.
4035         https://bugs.webkit.org/show_bug.cgi?id=144641
4036         rdar://problem/20250960
4037
4038         Reviewed by David Kilzer.
4039
4040         * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup):
4041         Clear the client pointer.
4042
4043         * Shared/Authentication/AuthenticationManager.cpp:
4044         (WebKit::AuthenticationManager::useCredentialForChallenge):
4045         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
4046         (WebKit::AuthenticationManager::cancelChallenge):
4047         (WebKit::AuthenticationManager::performDefaultHandling):
4048         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
4049         Updated comments, which were not accurate, at least on Mac.
4050
4051 2015-05-05  Tim Horton  <timothy_horton@apple.com>
4052
4053         Views get stuck with viewScale < 1 after switching from DynamicSizeWithMinimumViewSize to ViewSize
4054         https://bugs.webkit.org/show_bug.cgi?id=144656
4055
4056         Reviewed by Dan Bernstein.
4057
4058         * UIProcess/mac/WKViewLayoutStrategy.mm:
4059         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
4060         Reset the viewScale when we leave the DynamicSizeWithMinimumViewSize strategy.
4061
4062 2015-05-05  Tim Horton  <timothy_horton@apple.com>
4063
4064         Fix the build.
4065
4066         * Platform/mac/LayerHostingContext.mm:
4067         (WebKit::LayerHostingContext::setFencePort):
4068
4069 2015-05-05  Tim Horton  <timothy_horton@apple.com>
4070
4071         Fix the build.
4072
4073         * UIProcess/mac/WKViewLayoutStrategy.mm:
4074         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
4075
4076 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
4077
4078         Add a layout mode for computing fixed layout size from a minimum size
4079         https://bugs.webkit.org/show_bug.cgi?id=144610
4080         <rdar://problem/19790341>
4081
4082         Reviewed by Simon Fraser.