Revert "Introducing the Platform Abstraction Layer (PAL)"
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         Revert "Introducing the Platform Abstraction Layer (PAL)"
4         https://bugs.webkit.org/show_bug.cgi?id=144751
5
6         Unreviewed.
7
8         PAL should be a new target inside WebCore, rather than a top-level folder.
9
10         * Configurations/FeatureDefines.xcconfig: Updated
11
12 2015-05-07  Jer Noble  <jer.noble@apple.com>
13
14         [WK2][Fullscreen] Fullscreen video does not enter low-power mode.
15         https://bugs.webkit.org/show_bug.cgi?id=144744
16
17         Reviewed by Darin Adler.
18
19         One of the requirements of entering low-power compositing mode is that no masking layers
20         are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
21         transition animation completes, remove the mask layer entirely from our clipping layer.
22         This means it needs to be re-created and added when entering fullscreen, rather than just
23         at initialization time.
24
25         * UIProcess/mac/WKFullScreenWindowController.mm:
26         (-[WKFullScreenWindowController initWithWindow:webView:]):
27         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
28         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
29
30 2015-05-07  Martin Robinson  <mrobinson@igalia.com>
31
32         [GTK] All spell checking layout tests fail
33         https://bugs.webkit.org/show_bug.cgi?id=144648
34
35         Reviewed by Carlos Garcia Campos.
36
37         Simplify and complete the GTK+ spell-checking implementation. Instead of using
38         the EFL/GTK+ only WKTextChecker interface, directly implement Enchant spell-checking
39         in TextCheckerGtk. The per-context spell checking API is an illusion, since all
40         WKTextChecker implementations will adjust the same singleton. This can be a first step
41         toward removing it entirely.
42
43         Also complete the implementation of the TextChecker interface by duplicating the EFL code,
44         which reuses other methods in the same class. Eventually this duplication will collapse,
45         once GTK+ and EFL can share an Enchant implementation.
46
47         * PlatformGTK.cmake:
48         * UIProcess/API/gtk/WebKitPrivate.h:
49         * UIProcess/API/gtk/WebKitTextChecker.cpp: Removed.
50         * UIProcess/API/gtk/WebKitTextChecker.h: Removed.
51         * UIProcess/API/gtk/WebKitWebContext.cpp: Remove WebTextChecker usage and
52         replace it with calls directly to the TextChecker singleton via static methods.
53         * UIProcess/TextChecker.h:
54         * UIProcess/gtk/TextCheckerGtk.cpp: Move the WebTextChecker enchant implementation
55         here and reuse the EFL version of WebKit::TextChecker::requestCheckingOfString.
56         Also initialize languages properly when building for developer builds. This
57         allows WebKitTestRunner to work even when it doesn't explicitly set the languages.
58
59 2015-05-07  Ada Chan  <adachan@apple.com>
60
61         Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
62         https://bugs.webkit.org/show_bug.cgi?id=144666
63
64         Reviewed by Darin Adler.
65
66         * UIProcess/WebBackForwardList.cpp:
67         (WebKit::WebBackForwardList::backForwardListState):
68         If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
69         If all the items are filtered out, set currentIndex to the uninitialized value.
70
71 2015-05-07  Csaba Osztrogonác  <ossy@webkit.org>
72
73         [WK2] Remove Windows cruft
74         https://bugs.webkit.org/show_bug.cgi?id=144745
75
76         Reviewed by Darin Adler.
77
78         * NetworkProcess/soup/NetworkProcessSoup.cpp:
79         (WebKit::getMemorySize):
80         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
81         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
82         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
83         * WebProcess/soup/WebProcessSoup.cpp:
84         (WebKit::getMemorySize):
85
86 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
87
88         REGRESSION(r182032): [GTK] Production build is broken after r182032
89         https://bugs.webkit.org/show_bug.cgi?id=144736
90
91         Reviewed by Martin Robinson.
92
93         The problem is that r182032 moved the NetworkProcess sources from
94         WebKit2 sources to NetworkProcess sources. That's not a problem
95         for developer builds where all internal symbols are exported, but
96         doesn't work for production builds because all those internal
97         symbols are private.
98
99         * CMakeLists.txt: Use a different name for common network process
100         sources variable.
101         * PlatformMac.cmake: Append common network process sources to the
102         network process source list for Mac.
103
104 2015-05-07  Dan Bernstein  <mitz@apple.com>
105
106         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
107         https://bugs.webkit.org/show_bug.cgi?id=144727
108
109         Reviewed by Darin Adler.
110
111         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig, and define
112         INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
113         * Configurations/WebKit2.xcconfig: Define INSTALL_PATH_ACTUAL and let INSTALL_PATH be
114         derived from it and INSTALL_PATH_PREFIX. Don’t override DYLIB_INSTALL_NAME_BASE for iOS,
115         because we define LD_DYLIB_INSTALL_NAME directly where needed.
116
117 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
118
119         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.1 release.
120
121         * gtk/NEWS: Add release notes for 2.9.1.
122
123 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
124
125         [GTK] Remove dock button from Web Inspector window
126         https://bugs.webkit.org/show_bug.cgi?id=144728
127
128         Reviewed by Sergio Villar Senin.
129
130         We added the dock buttons to the headerbar, because they were
131         removed from the inspector toolbar, but with the new tabbed
132         design, the dock buttons are back in the toolbar and look redundant.
133
134         * UIProcess/WebInspectorProxy.h:
135         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
136         (WebKit::WebInspectorProxy::createInspectorWindow):
137         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
138         (WebKit::WebInspectorProxy::dockButtonClicked): Deleted.
139
140 2015-05-06  Jer Noble  <jer.noble@apple.com>
141
142         [WK2][Fullscreen] Elements whose children extend beyond their bounds are clipped in fullscreen mode.
143         https://bugs.webkit.org/show_bug.cgi?id=144716
144
145         Reviewed by Darin Adler.
146
147         We create a mask animation for the transition between windowed and fullscreen modes, on the
148         assumption that the element being taken into fullscreen mode does not have visible children
149         who extend beyond that elements bounds. This assumption breaks down in the case where div
150         with absolutely positioned children is taken fullscreen. While we can't necessarily make the
151         transition look correct in this case, we can remove the mask after the transition completes.
152
153         * UIProcess/mac/WKFullScreenWindowController.mm:
154         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
155         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
156         (WebKit::removeAllMediaKeyStorageForOriginPath):
157
158 2015-05-06  Jinwoo Jeong  <jw00.jeong@samsung.com>
159
160         Fix a build break on EFL debug build
161         https://bugs.webkit.org/show_bug.cgi?id=144654
162
163         Reviewed by Gyuyoung Kim.
164
165         No new tests, just build fix.
166
167         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
168         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
169         (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext):
170
171 2015-05-06  Daniel Bates  <dabates@apple.com>
172
173         [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
174         https://bugs.webkit.org/show_bug.cgi?id=144657
175         <rdar://problem/18894598>
176
177         Reviewed by Andy Estes.
178
179         Pause and resume the database thread when the UIProcess enters and leaves the background,
180         respectively, so that we avoid WebProcess termination due to holding a locked SQLite
181         database file when the WebProcess is suspended. This behavior matches the analagous
182         behavior in Legacy WebKit.
183
184         * UIProcess/WebPageProxy.h:
185         * UIProcess/ios/WKContentView.mm:
186         (-[WKContentView _applicationDidEnterBackground:]): Call WebPageProxy::applicationDidEnterBackground()
187         when the UIProcess enters the background.
188         * UIProcess/ios/WebPageProxyIOS.mm:
189         (WebKit::WebPageProxy::applicationDidEnterBackground): Added; notify the WebProcess to pause the database thread.
190         We temporarily take out background assertion on the WebProcess before sending this notification to ensure that the
191         WebProcess is running to receive it. We'll release this assertion when the WebProcess replies that it received the
192         notification.
193         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
194         (WebKit::WebDatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseManager::setPauseAllDatabases().
195         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
196         * WebProcess/WebPage/WebPage.h:
197         * WebProcess/WebPage/WebPage.messages.in: Add message ApplicationDidEnterBackground(). Also,
198         add empty lines to help demarcate this message and the other UIKit application lifecycle-related
199         messages from the rest of the list of messages.
200         * WebProcess/WebPage/ios/WebPageIOS.mm:
201         (WebKit::WebPage::applicationWillEnterForeground): Resume the database thread.
202         (WebKit::WebPage::applicationDidEnterBackground): Pause the database thread.
203
204 2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>
205
206         [EFL] ewk_view_page_contents_get() API test is flaky
207         https://bugs.webkit.org/show_bug.cgi?id=144683
208
209         Reviewed by Gyuyoung Kim.
210
211         Callback of WKPageGetContentsAsMHTMLData contains WKData which does not contain null terminated character.
212
213         * UIProcess/API/efl/ewk_view.cpp: Pass the data of string instead of WKData directly.
214         (ewkViewPageContentsAsMHTMLCallback):
215
216 2015-05-06  Joseph Pecoraro  <pecoraro@apple.com>
217
218         Web Inspector: Docking Toolbar Buttons do not respect Docking Availability
219         https://bugs.webkit.org/show_bug.cgi?id=144714
220
221         Reviewed by Timothy Hatcher.
222
223         * UIProcess/WebInspectorProxy.cpp:
224         (WebKit::WebInspectorProxy::createInspectorPage):
225         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
226         * WebProcess/WebPage/WebInspectorUI.cpp:
227         (WebKit::WebInspectorUI::setDockingUnavailable):
228         * WebProcess/WebPage/WebInspectorUI.h:
229         * WebProcess/WebPage/WebInspectorUI.messages.in:
230         When docking availability changes, inform the inspector page
231         so it can respond by updating its UI.
232
233 2015-05-06  Joonghun Park  <jh718.park@samsung.com>
234
235         [WK2] Simplify AsyncRequestImpl::ArgumentType parameters
236         https://bugs.webkit.org/show_bug.cgi?id=144689
237
238         Reviewed by Darin Adler.
239
240         Remove duplicated typename and ::type from AsyncRequestImpl related
241         function parameters.
242
243         * Shared/AsyncRequest.h:
244
245 2015-05-06  Commit Queue  <commit-queue@webkit.org>
246
247         Unreviewed, rolling out r183894.
248         https://bugs.webkit.org/show_bug.cgi?id=144719
249
250         crashes on mavericks (Requested by dino on #webkit).
251
252         Reverted changeset:
253
254         "Handle backdrop views that have to tile"
255         https://bugs.webkit.org/show_bug.cgi?id=142317
256         http://trac.webkit.org/changeset/183894
257
258 2015-05-06  Brady Eidson  <beidson@apple.com>
259
260         Addition review followup for:
261         Crash executing null AsyncRequest in IDB code.
262         <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
263
264         Reviewed by Darin Adler.
265
266         This patch adds a layer on top of the UniqueIDBDatabase request map to catch this coding mistake in the future. 
267  
268          * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
269         (WebKit::UniqueIDBDatabase::didCompleteBoolRequest): Get rid of the ASSERT and the temporary variable,
270           make it a single line which reads better.
271         (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore): Ditto.
272         (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore): Ditto.
273         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore): Ditto.
274         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore): Ditto.
275         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore): Ditto.
276         (WebKit::UniqueIDBDatabase::didCountInBackingStore): Ditto.
277         (WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore): Ditto.
278         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
279
280         Add the class AsyncRequestMap which shadows a HashMap but does aggressive runtime checks
281         in ::take() to make sure the same request was not dispatched twice in a row, and makes sure we
282         never try to execute a null AsyncRequest by way of a RELEASE_ASSERT.
283         * Shared/AsyncRequest.h:
284         (WebKit::AsyncRequestMap::AsyncRequestMap):
285         (WebKit::AsyncRequestMap::take):
286         (WebKit::AsyncRequestMap::add):
287         (WebKit::AsyncRequestMap::clear):
288         (WebKit::AsyncRequestMap::values):
289
290 2015-05-06  Brady Eidson  <beidson@apple.com>
291
292         Crash executing null AsyncRequest in IDB code.
293         <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
294
295         Reviewed by Darin Adler.
296
297         When UniqueIDBDatabase fails to execute an operation on the database work queue it usually
298         dispatches an AsyncRequest ID back to the main thread with an error callback.
299
300         For two of its operations it would then also dispatch the success callback.
301
302         In those cases the main thread would first take the AsyncRequest for the error callback out
303         of a map and then execute it.
304
305         It would then try to take the same AsyncRequest out of the map again, fail to do so, then
306         execute a null AsyncRequest.
307
308         This patch fixes the two functions to not dispatch both an error and success callback.
309
310         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
311         (WebKit::UniqueIDBDatabase::countInBackingStore): Return after dispatching the error callback.
312         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Ditto.
313
314 2015-05-06  Dean Jackson  <dino@apple.com>
315
316         Handle backdrop views that have to tile
317         https://bugs.webkit.org/show_bug.cgi?id=142317
318         <rdar://problem/20049088>
319
320         Reviewed by Simon Fraser.
321
322         Add some better logging for custom appearance.
323
324         * Shared/mac/RemoteLayerTreeTransaction.mm:
325         (WebKit::RemoteLayerTreeTextStream::operator<<):
326
327 2015-05-06  Chris Dumez  <cdumez@apple.com>
328
329         Disable network cache efficacy logging
330         https://bugs.webkit.org/show_bug.cgi?id=144703
331         <rdar://problem/20439143>
332
333         Reviewed by Andreas Kling.
334
335         Disable network cache efficacy logging by default as we have sufficient
336         data for now.
337
338         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
339         (WebKit::registerUserDefaultsIfNeeded):
340
341 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
342
343         Fix the build.
344
345         * UIProcess/mac/WKViewLayoutStrategy.mm:
346         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
347
348 2015-05-06  Dan Bernstein  <mitz@apple.com>
349
350         No way to get a WKWebProcessPlugInFrame’s parent frame
351         https://bugs.webkit.org/show_bug.cgi?id=144705
352
353         Reviewed by Sam Weinig.
354
355         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
356         (-[WKWebProcessPlugInFrame _parentFrame]): Added this getter.
357         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Declared new
358         _parentFrame property.
359
360 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
361
362         Fix the build.
363
364         * UIProcess/mac/WKViewLayoutStrategy.mm:
365         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
366
367 2015-04-02  Myles C. Maxfield  <mmaxfield@apple.com>
368
369         Introducing the Platform Abstraction Layer (PAL)
370         https://bugs.webkit.org/show_bug.cgi?id=143358
371
372         Reviewed by Simon Fraser.
373
374         * Configurations/FeatureDefines.xcconfig: Updated
375
376 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
377
378         [GTK][WK2] The WebKit network disk cache is not enabled
379         https://bugs.webkit.org/show_bug.cgi?id=142821
380
381         Reviewed by Martin Robinson.
382
383         Enable NetworkCache for the GTK+ port.
384
385         * config.h:
386
387 2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>
388
389         [EFL] Remove redudant condition in ViewClientEfl::didChangeViewportAttributes
390         https://bugs.webkit.org/show_bug.cgi?id=144672
391
392         Reviewed by Gyuyoung Kim.
393
394         ViewClientEfl::didChangeViewportAttributes is always called when fixed layout is disabled.
395
396         * UIProcess/efl/ViewClientEfl.cpp:
397         (WebKit::ViewClientEfl::didChangeViewportAttributes):
398         Removes condition that checks whether fixed layout is enabled.
399
400 2015-05-05  Alexey Proskuryakov  <ap@apple.com>
401
402         NetworkResourceLoader::cleanup() should clear ResourceHandle client pointer.
403         https://bugs.webkit.org/show_bug.cgi?id=144641
404         rdar://problem/20250960
405
406         Reviewed by David Kilzer.
407
408         * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup):
409         Clear the client pointer.
410
411         * Shared/Authentication/AuthenticationManager.cpp:
412         (WebKit::AuthenticationManager::useCredentialForChallenge):
413         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
414         (WebKit::AuthenticationManager::cancelChallenge):
415         (WebKit::AuthenticationManager::performDefaultHandling):
416         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
417         Updated comments, which were not accurate, at least on Mac.
418
419 2015-05-05  Tim Horton  <timothy_horton@apple.com>
420
421         Views get stuck with viewScale < 1 after switching from DynamicSizeWithMinimumViewSize to ViewSize
422         https://bugs.webkit.org/show_bug.cgi?id=144656
423
424         Reviewed by Dan Bernstein.
425
426         * UIProcess/mac/WKViewLayoutStrategy.mm:
427         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
428         Reset the viewScale when we leave the DynamicSizeWithMinimumViewSize strategy.
429
430 2015-05-05  Tim Horton  <timothy_horton@apple.com>
431
432         Fix the build.
433
434         * Platform/mac/LayerHostingContext.mm:
435         (WebKit::LayerHostingContext::setFencePort):
436
437 2015-05-05  Tim Horton  <timothy_horton@apple.com>
438
439         Fix the build.
440
441         * UIProcess/mac/WKViewLayoutStrategy.mm:
442         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
443
444 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
445
446         Add a layout mode for computing fixed layout size from a minimum size
447         https://bugs.webkit.org/show_bug.cgi?id=144610
448         <rdar://problem/19790341>
449
450         Reviewed by Simon Fraser.
451
452         Add a layout mode where WebKit determines the layout size with a set of
453         (still in flux) heuristics, trying hard to keep the page usable below a
454         particular client-defined threshold view size.
455
456         This can mean that WebKit will start scaling down the page inside the view
457         to make the whole page fit, using the viewScale mechanism.
458
459         * UIProcess/API/C/WKLayoutMode.h:
460         * UIProcess/API/Cocoa/_WKLayoutMode.h:
461         Add the new layout mode, and documentation for the two complicated ones.
462         
463         * UIProcess/API/Cocoa/WKWebView.mm:
464         (-[WKWebView _layoutMode]):
465         (-[WKWebView _setLayoutMode:]):
466         (-[WKWebView _setViewScale:]):
467         (-[WKWebView _setMinimumViewSize:]):
468         (-[WKWebView _minimumViewSize]):
469         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
470         Forward the layoutMode and viewScale parameters to WKView if we have one.
471
472         * UIProcess/API/Cocoa/WKViewPrivate.h:
473         * UIProcess/API/mac/WKView.mm:
474         (-[WKView dealloc]):
475         (-[WKView viewWillStartLiveResize]):
476         (-[WKView viewDidEndLiveResize]):
477         (-[WKView setFrameSize:]):
478         (-[WKView initWithFrame:processPool:configuration:webView:]):
479         (-[WKView disableFrameSizeUpdates]):
480         (-[WKView enableFrameSizeUpdates]):
481         (-[WKView frameSizeUpdatesDisabled]):
482         (-[WKView _layoutMode]):
483         (-[WKView _setLayoutMode:]):
484         (-[WKView _setViewScale:]):
485         (-[WKView _setMinimumViewSize:]):
486         (-[WKView _minimumViewSize]):
487         Store the minimum view size, and update the fixed layout size if needed.
488
489         (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
490         (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
491         (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
492         Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
493         bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.
494
495         * UIProcess/API/mac/WKViewInternal.h:
496
497         * UIProcess/mac/WKViewLayoutStrategy.h: Added.
498         * UIProcess/mac/WKViewLayoutStrategy.mm: Added.
499         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
500         (-[WKViewLayoutStrategy initWithPage:view:mode:]):
501         (-[WKViewLayoutStrategy willDestroyView:]):
502         (-[WKViewLayoutStrategy layoutMode]):
503         (-[WKViewLayoutStrategy updateLayout]):
504         (-[WKViewLayoutStrategy disableFrameSizeUpdates]):
505         (-[WKViewLayoutStrategy enableFrameSizeUpdates]):
506         (-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
507         (-[WKViewLayoutStrategy didChangeViewScale]):
508         (-[WKViewLayoutStrategy didChangeMinimumViewSize]):
509         (-[WKViewLayoutStrategy willStartLiveResize]):
510         (-[WKViewLayoutStrategy didEndLiveResize]):
511         (-[WKViewLayoutStrategy didChangeFrameSize]):
512         (-[WKViewLayoutStrategy willChangeLayoutStrategy]):
513         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
514         (-[WKViewViewSizeLayoutStrategy updateLayout]):
515         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
516         (-[WKViewFixedSizeLayoutStrategy updateLayout]):
517         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
518         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
519         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
520         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
521         Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.
522
523         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
524         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
525         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
526         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
527         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
528         While in live resize with the new layout mode, disable frame size updates.
529         The new layout mode will do a live scale during part of the resize, and
530         we don't always want to send the new view size to the Web process.
531
532         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
533         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
534         While in the new layout mode, maintain the viewScale as the minimum of the
535         scale required to fit the current view frame size inside the minimumViewSize.
536         If no scaling is required, carry on as usual, pushing the new view frame size
537         to the DrawingArea and on to the Web process.
538         If scaling is required, apply a transform to the view in the UI process,
539         until the live resize completes, in which case we send a fenced viewScale
540         adjustment to the Web process (so that the tiles paint at the new viewScale
541         synchronized with the removal of the transform in the UI process).
542
543         * UIProcess/WebPageProxy.cpp:
544         (WebKit::WebPageProxy::scaleViewFenced):
545         * UIProcess/WebPageProxy.h:
546         * WebProcess/WebPage/DrawingArea.h:
547         (WebKit::DrawingArea::addFence):
548         (WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
549         * WebProcess/WebPage/WebPage.cpp:
550         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
551         * WebProcess/WebPage/WebPage.h:
552         * WebProcess/WebPage/WebPage.messages.in:
553         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
554         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
555         (WebKit::TiledCoreAnimationDrawingArea::addFence):
556         Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
557         TiledCoreAnimationDrawingArea's CAContext.
558
559         Add the ability to send updateGeometry out-of-band, so that
560         we can send it synchronously inside the message along with the CA fence.
561         We have to both change the viewScale and updateGeometry simultaneously
562         in the same CA commit that we install the fence into, in order to ensure
563         that there is no flash.
564
565 2015-05-05  Alex Christensen  <achristensen@webkit.org>
566
567         [Content Extensions] Release input NSString when finished copying it.
568         https://bugs.webkit.org/show_bug.cgi?id=144642
569
570         Reviewed by Brian Weinstein.
571
572         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
573         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
574         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
575
576 2015-05-05  Alex Christensen  <achristensen@webkit.org>
577
578         [Content Extensions] Use less memory to store the json input.
579         https://bugs.webkit.org/show_bug.cgi?id=144604
580
581         Reviewed by Benjamin Poulain.
582
583         * UIProcess/API/APIUserContentExtensionStore.cpp:
584         (API::compiledToFile):
585         (API::UserContentExtensionStore::compileContentExtension):
586         * UIProcess/API/APIUserContentExtensionStore.h:
587         Don't copy strings as much or keep them alive after done using them.
588
589 2015-05-04  Alex Christensen  <achristensen@webkit.org>
590
591         [Content Extensions] Use less memory when writing byte code to file
592         https://bugs.webkit.org/show_bug.cgi?id=144602
593
594         Reviewed by Darin Adler.
595
596         * UIProcess/API/APIUserContentExtensionStore.cpp:
597         (API::decodeContentExtensionMetaData):
598         (API::writeDataToFile):
599         (API::compiledToFile):
600         (API::createExtension):
601         Compile and write each DFA to file, then come back and write the header when finalizing.
602         Also don't copy the DFA bytecode. This way, we don't need to keep more than one DFA's
603         bytecode in memory at a time.
604
605 2015-05-05  Sungmann Cho  <sungmann.cho@navercorp.com>
606
607         Make all FrameLoadState data members private.
608         https://bugs.webkit.org/show_bug.cgi?id=144562
609
610         Reviewed by Darin Adler.
611
612         Previously, all of the data members in FrameLoadState were public and accessed directly
613         from outside the class. But these should all be private as noted in FrameLoadState.h
614         for better encapsulation.
615
616         No new tests, no behavior change.
617
618         * UIProcess/API/C/WKFrame.cpp:
619         (WKFrameGetFrameLoadState):
620         * UIProcess/FrameLoadState.h:
621         (WebKit::FrameLoadState::state):
622         (WebKit::FrameLoadState::url):
623         (WebKit::FrameLoadState::provisionalURL):
624         (WebKit::FrameLoadState::unreachableURL):
625         * UIProcess/WebFrameProxy.h:
626         (WebKit::WebFrameProxy::url):
627         (WebKit::WebFrameProxy::provisionalURL):
628         (WebKit::WebFrameProxy::unreachableURL):
629
630 2015-05-05  Alexey Proskuryakov  <ap@apple.com>
631
632         Crashes in SandboxExtension::consumePermanently when uploading
633         https://bugs.webkit.org/show_bug.cgi?id=144611
634         rdar://problem/10156710
635
636         Reviewed by Darin Adler.
637
638         This only fixes the crashes, uploading still won't work.
639         Added null checks and some logging that may help us get to the root cause eventually.
640
641         * Shared/SandboxExtension.h:
642         (WebKit::SandboxExtension::createHandle):
643         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
644         * Shared/mac/SandboxExtensionMac.mm:
645         (WebKit::SandboxExtension::createHandle):
646         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
647         * UIProcess/WebPageProxy.cpp:
648         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
649         * WebProcess/WebPage/WebPage.cpp:
650         (WebKit::WebPage::extendSandboxForFileFromOpenPanel):
651
652 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
653
654         Remove TextureMapperImageBuffer
655         https://bugs.webkit.org/show_bug.cgi?id=143561
656
657         Reviewed by Žan Doberšek.
658
659         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
660         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
661         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
662         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
663
664 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
665
666         [SOUP] Network Cache: IOChannel operations are not sent to the right thread
667         https://bugs.webkit.org/show_bug.cgi?id=144542
668
669         Reviewed by Darin Adler.
670
671         We are ignoring the given WorkQueue and running the async
672         operations in the current thread. Check the given WorkQueue
673         instead and schedule the operation to the given queue. If the
674         given queue is nullptr, which means the operation should be run in
675         the main context, the operation is run directly if the current
676         context is the main one or sent to the main context using a
677         GMainLoopSource.
678
679         Fixes crashes due to asserts when running disk-cache layout tests
680         in a Debug build.
681
682         * NetworkProcess/cache/NetworkCacheIOChannel.h:
683         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
684         (WebKit::NetworkCache::runTaskInQueue):
685         (WebKit::NetworkCache::IOChannel::read):
686         (WebKit::NetworkCache::IOChannel::readSync):
687         (WebKit::NetworkCache::IOChannel::write):
688
689 2015-05-04  Dan Bernstein  <mitz@apple.com>
690
691         WebKit always goes through LaunchServices for main frame navigation actions
692         https://bugs.webkit.org/show_bug.cgi?id=144608
693
694         Reviewed by Tim Horton.
695
696         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined
697         _WKNavigationActionPolicyAllowWithoutTryingAppLink.
698         * UIProcess/Cocoa/NavigationState.mm:
699         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy
700         is _WKNavigationActionPolicyAllowWithoutTryingAppLink, don’t go through tryAppLink.
701
702 2015-05-04  Enrica Casucci  <enrica@apple.com>
703
704         [iOS WK2] editorState should include information about selection clipping rectangle.
705         https://bugs.webkit.org/show_bug.cgi?id=144603
706         rdar://problem/20521252
707
708         Reviewed by Chris Dumez.
709
710         Adding selectionClipRect to the post-layout portion of EditorState.
711         This way we can compute the selection clipping rectangle based on
712         up-to-date information instead of using the rectangle provided when
713         then element was first focused.
714
715         * Shared/EditorState.cpp:
716         (WebKit::EditorState::PostLayoutData::encode):
717         (WebKit::EditorState::PostLayoutData::decode):
718         * Shared/EditorState.h:
719         * UIProcess/ios/WKContentViewInteraction.mm:
720         (-[WKContentView _selectionClipRect]):
721         * WebProcess/WebPage/ios/WebPageIOS.mm:
722         (WebKit::WebPage::platformEditorState):
723
724 2015-05-04  Antti Koivisto  <antti@apple.com>
725
726         Network Cache: Support time based cache clearing
727         https://bugs.webkit.org/show_bug.cgi?id=144568
728         <rdar://problem/19769820>
729
730         Reviewed by Andreas Kling.
731
732         Support clearing cache entries newer than given time only.
733
734         * NetworkProcess/cache/NetworkCache.cpp:
735         (WebKit::NetworkCache::Cache::deleteDumpFile):
736         (WebKit::NetworkCache::Storage::traverse):
737
738             Also fix thread safety of traverse handler function.
739
740         (WebKit::NetworkCache::Cache::clear):
741
742             Also add completion handler to support the API properly.
743
744         * NetworkProcess/cache/NetworkCache.h:
745         * NetworkProcess/cache/NetworkCacheStorage.cpp:
746         (WebKit::NetworkCache::Storage::clear):
747         * NetworkProcess/cache/NetworkCacheStorage.h:
748         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
749         (WebKit::clearNSURLCache):
750
751             Factor to a function.
752
753         (WebKit::NetworkProcess::clearDiskCache):
754
755 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
756
757         [WTF] Remove Functional.h inclusions
758         https://bugs.webkit.org/show_bug.cgi?id=144400
759
760         Reviewed by Darin Adler.
761
762         Remove unnecessary inclusions of the <wtf/Functional.h> header in WebKit2.
763
764         * Platform/IPC/unix/ConnectionUnix.cpp:
765         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Import the <objc/runtime.h>
766         header that was previously indirectly included through the Functional.h header.
767         * WebProcess/WebPage/DrawingArea.cpp:
768
769 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
770
771         [ARM] Don't compare unsigned chars to EOF (-1)
772         https://bugs.webkit.org/show_bug.cgi?id=144439
773
774         Reviewed by Geoffrey Garen.
775
776         * Shared/linux/WebMemorySamplerLinux.cpp:
777         (WebKit::nextToken): Don't cast return value of fgetc() to char.
778
779 2015-05-04  Antti Koivisto  <antti@apple.com>
780
781         Remove NetworkResourceLoadScheduler
782         https://bugs.webkit.org/show_bug.cgi?id=144550
783
784         Reviewed by Sam Weinig.
785
786         It doesn't really do anything.
787
788         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
789         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
790         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
791         * NetworkProcess/NetworkProcess.cpp:
792         (WebKit::NetworkProcess::getNetworkProcessStatistics):
793         * NetworkProcess/NetworkProcess.h:
794         (WebKit::NetworkProcess::networkResourceLoadScheduler): Deleted.
795         * NetworkProcess/NetworkResourceLoadScheduler.cpp: Removed.
796         * NetworkProcess/NetworkResourceLoadScheduler.h: Removed.
797         * NetworkProcess/NetworkResourceLoader.cpp:
798         (WebKit::NetworkResourceLoader::cleanup):
799         * NetworkProcess/NetworkResourceLoader.h:
800         (WebKit::NetworkResourceLoader::create):
801         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
802         (WebKit::initializeNetworkSettings):
803
804             Moved from NetworkResourceLoadSchedulerMac.mm.
805
806         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
807         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: Removed.
808         * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: Removed.
809         * WebKit2.xcodeproj/project.pbxproj:
810
811 2015-05-03  Alexey Proskuryakov  <ap@apple.com>
812
813         Crash in SandboxExtension::consume when uploading iWork -tef documents to iCloud
814         https://bugs.webkit.org/show_bug.cgi?id=144509
815         rdar://problem/18731910
816
817         Reviewed by Daniel Bates.
818
819         No test, because testRunner.beginDragWithFiles doesn't work in WKTR, and making
820         it work is hard.
821
822         * Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
823         (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
824         (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
825
826 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
827
828         [GTK][EFL] Unify platform display handling
829         https://bugs.webkit.org/show_bug.cgi?id=144517
830
831         Reviewed by Martin Robinson.
832
833         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
834         (webkitWebViewBaseRealize): Use PlatformDisplay::sharedDisplay()
835         to checkt the display type.
836         (webkitWebViewBaseCreateWebPage): Ditto.
837         * UIProcess/cairo/BackingStoreCairo.cpp:
838         (WebKit::BackingStore::createBackend): Pass the native X11 shared
839         display to BackingStoreBackendCairoX11.
840         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
841         (WebKit::NetscapePlugin::x11HostDisplay): Return the native X11
842         shared display.
843
844 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
845
846         Unreviewed. Fix Debug build with NETWORK_CACHE enabled and CACHE_PARTITIONING disabled.
847
848         * NetworkProcess/cache/NetworkCache.cpp:
849         (WebKit::NetworkCache::Cache::store):
850
851 2015-05-01  Dan Bernstein  <mitz@apple.com>
852
853         WebKit2 part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
854         https://bugs.webkit.org/show_bug.cgi?id=144501
855
856         Reviewed by Darin Adler.
857
858         * UIProcess/WebPageProxy.cpp:
859         (WebKit::WebPageProxy::loadAlternateHTMLString): If this is called during
860         didFailProvisionalLoadForFrame, send back the provisional URL captured at the time of
861         failure.
862         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Get the provisioinal URL and keep
863         it in new member variable m_failingProvisionalLoadURL for the duration of the client’s
864         handling of this message.
865         * UIProcess/WebPageProxy.h:
866
867         * UIProcess/WebPageProxy.messages.in: Added provisionalURL parameter to
868         DidFailProvisionalLoadForFrame.
869
870         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
871         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Send the URL for this error
872         to the UI process.
873
874         * WebProcess/WebPage/WebPage.cpp:
875         (WebKit::WebPage::loadAlternateHTMLString): Temporarily restore the loader’s state to
876         reflect the provisional load error being handled.
877
878         * WebProcess/WebPage/WebPage.h:
879         * WebProcess/WebPage/WebPage.messages.in: Added provisionalLoadErrorURL parameter to
880         LoadAlternateHTMLString.
881
882 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
883
884         USE(...) macro should expect unprefixed variables
885         https://bugs.webkit.org/show_bug.cgi?id=144454
886
887         Reviewed by Daniel Bates.
888
889         * Shared/API/c/WKBase.h: Replace all occurrences WTF_USE with USE.
890         * WebKit2.xcodeproj/project.pbxproj: Ditto.
891
892 2015-05-01  Brady Eidson  <beidson@apple.com>
893
894         Add API to disable meta refreshes.
895         <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269
896
897         Reviewed by Alexey Proskuryakov.
898
899         Add a preference to enable/disable meta refreshes, enabled by default.
900
901         * Shared/WebPreferencesDefinitions.h:
902         * UIProcess/API/C/WKPreferences.cpp:
903         (WKPreferencesSetMetaRefreshEnabled):
904         (WKPreferencesGetMetaRefreshEnabled):
905         (WKPreferencesGetIgnoreViewportScalingConstraints): Deleted.
906         * UIProcess/API/C/WKPreferencesRefPrivate.h:
907         * WebProcess/InjectedBundle/InjectedBundle.cpp:
908         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
909         * WebProcess/WebPage/WebPage.cpp:
910         (WebKit::WebPage::updatePreferences):
911
912 2015-05-01  Antti Koivisto  <antti@apple.com>
913
914         Remove network process load serialization code
915         https://bugs.webkit.org/show_bug.cgi?id=144448
916
917         Reviewed by Alexey Proskuryakov.
918
919         TestRunner.setSerializeHTTPLoads is used by a few tests but it is unnecessary
920         with network process. We don't reorder loads anyway so test results are consistent.
921         There or no other clients for this code.
922
923         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
924         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
925         (WebKit::NetworkConnectionToWebProcess::setSerialLoadingEnabled): Deleted.
926         * NetworkProcess/NetworkConnectionToWebProcess.h:
927         (WebKit::NetworkConnectionToWebProcess::isSerialLoadingEnabled): Deleted.
928         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
929         * NetworkProcess/NetworkProcess.cpp:
930         (WebKit::NetworkProcess::getNetworkProcessStatistics):
931         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
932         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
933         (WebKit::NetworkResourceLoadScheduler::removeLoader):
934         (WebKit::NetworkResourceLoadScheduler::loadsPendingCount): Deleted.
935         * NetworkProcess/NetworkResourceLoadScheduler.h:
936         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
937         (WKBundleSetTabKeyCyclesThroughElements):
938         (WKBundleSetSerialLoadingEnabled): Deleted.
939         (WKBundleDispatchPendingLoadRequests): Deleted.
940         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
941         * WebProcess/InjectedBundle/InjectedBundle.cpp:
942         (WebKit::InjectedBundle::setSerialLoadingEnabled): Deleted.
943         (WebKit::InjectedBundle::dispatchPendingLoadRequests): Deleted.
944
945             Remove also this as it does nothing.
946
947         * WebProcess/Network/WebResourceLoadScheduler.cpp:
948         (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
949         (WebKit::WebResourceLoadScheduler::suspendPendingRequests):
950         (WebKit::WebResourceLoadScheduler::resumePendingRequests):
951
952             Remove implementation, it does nothing.
953
954         (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled):
955         * WebProcess/Network/WebResourceLoadScheduler.h:
956
957 2015-04-30  Timothy Horton  <timothy_horton@apple.com>
958
959         Remove long-deprecated unused WKView minimumLayoutWidth properties
960         https://bugs.webkit.org/show_bug.cgi?id=144480
961
962         Reviewed by Alexey Proskuryakov.
963
964         * UIProcess/API/Cocoa/WKViewPrivate.h:
965         * UIProcess/API/mac/WKView.mm:
966         (-[WKView minimumLayoutWidth]): Deleted.
967         (-[WKView setMinimumLayoutWidth:]): Deleted.
968         (-[WKView minimumWidthForAutoLayout]): Deleted.
969         (-[WKView setMinimumWidthForAutoLayout:]): Deleted.
970         These were replaced with minimumSizeForAutoLayout long ago.
971
972 2015-04-30  Simon Fraser  <simon.fraser@apple.com>
973
974         Fixed elements end up in the middle of the view with pageScale < 1
975         https://bugs.webkit.org/show_bug.cgi?id=144428
976         rdar://problem/20404982
977
978         Reviewed by Tim Horton.
979
980         Encode/decode fixedElementsLayoutRelativeToFrame.
981
982         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
983         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
984         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
985
986 2015-04-30  Tim Horton  <timothy_horton@apple.com>
987
988         Asynchronous (or timed-out synchronous) resize flashes white instead of page background color
989         https://bugs.webkit.org/show_bug.cgi?id=144468
990
991         Reviewed by Simon Fraser and Dan Bernstein.
992
993         * UIProcess/API/mac/WKView.mm:
994         (-[WKView _viewBackgroundColor]):
995         (-[WKView updateLayer]):
996         Use the pageExtendedBackgroundColor for the background color of the WKView,
997         if we have one (and aren't using a transparent background). This means
998         during asynchronous resize or other cases where the Web process isn't keeping
999         up with the UI process during a resize, we'll see background color instead of white.
1000
1001 2015-04-30  Beth Dakin  <bdakin@apple.com>
1002
1003         Should choose UIScrollView indicatorStyle based on the document background color
1004         https://bugs.webkit.org/show_bug.cgi?id=144473
1005         -and corresponding-
1006         rdar://problem/19897699
1007
1008         Reviewed by Simon Fraser.
1009
1010         Update the indicator style whenever the background color changes.  
1011         * UIProcess/API/Cocoa/WKWebView.mm:
1012         (-[WKWebView _updateScrollViewBackground]):
1013
1014 2015-04-30  Enrica Casucci  <enrica@apple.com>
1015
1016         [iOS] tapping in the middle of a word in editable content should not select the word.
1017         https://bugs.webkit.org/show_bug.cgi?id=144421
1018         rdar://problem/20710948
1019
1020         Reviewed by Tim Horton.
1021
1022         Reverting to the original behavior.
1023
1024         * WebProcess/WebPage/ios/WebPageIOS.mm:
1025         (WebKit::WebPage::selectWithGesture):
1026
1027 2015-04-29  Hunseop Jeong  <hs85.jeong@samsung.com>
1028
1029         Fix the EFL build after r183595
1030         https://bugs.webkit.org/show_bug.cgi?id=144427
1031
1032         Reviewed by Gyuyoung Kim.
1033
1034         updateWheelEventTestTriggersIfNeeded() is guarded by #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING).
1035
1036         * WebProcess/WebPage/EventDispatcher.cpp:
1037         (WebKit::updateWheelEventTestTriggersIfNeeded):
1038
1039 2015-04-29  Brent Fulgham  <bfulgham@apple.com>
1040
1041         Expand test infrastructure to support scrolling tests
1042         https://bugs.webkit.org/show_bug.cgi?id=143684
1043         <rdar://problem/20375516>
1044
1045         Reviewed by Simon Fraser.
1046
1047         Update test programs to activate (and deactivate) the new WheelEventTestTrigger logic.
1048
1049         * UIProcess/API/C/WKPage.cpp:
1050         (WKPageClearWheelEventTestTriggers): Added.
1051         * UIProcess/API/C/WKPage.h:
1052         * UIProcess/WebPageProxy.cpp:
1053         (WebKit::WebPageProxy::clearWheelEventTestTrigger): Added.
1054         * UIProcess/WebPageProxy.h:
1055         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1056         (WKBundlePageStartMonitoringScrollOperations): Interact with WheelEventTestTrigger through
1057         the Page, rather than MainFrame.
1058         (WKBundlePageRegisterScrollOperationCompletionCallback): Ditto.
1059         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1060         (WebKit::PDFPlugin::createScrollbar): Make sure scroll animator knows about any
1061         active test triggers.
1062         * WebPage/EventDispatcher.mm:
1063         (WebKit::EventDispatcher::wheelEvent): If the wheel event was passed to the scrolling thread,
1064         defer tests until a Scrolling Thread Sync has occurred.
1065         * WebPage/WebPage.cpp:
1066         (WebKit::WebPage::clearWheelEventTestTrigger): Added.
1067         * WebPage/WebPage.h:
1068         * WebPage/WebPage.message.in: Added ClearWheelEventTestTrigger message.
1069
1070 2015-04-29  Enrica Casucci  <enrica@apple.com>
1071
1072         Adding the ability to move selection by granularity on iOS.
1073         https://bugs.webkit.org/show_bug.cgi?id=144410
1074         rdar://problem/19213337
1075
1076         Reviewed by Benjamin Poulain.
1077
1078         This patch also correctly sets _usingGestureForSelection for all
1079         the functions that change the selection with a gesture.
1080         This way we make sure that the selection drawing is not delayed
1081         until the next time we paint.
1082
1083         * UIProcess/WebPageProxy.h:
1084         * UIProcess/ios/WKContentViewInteraction.mm:
1085         (-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
1086         * UIProcess/ios/WebPageProxyIOS.mm:
1087         (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
1088         * WebProcess/WebPage/WebPage.h:
1089         * WebProcess/WebPage/WebPage.messages.in:
1090         * WebProcess/WebPage/ios/WebPageIOS.mm:
1091         (WebKit::WebPage::moveSelectionAtBoundaryWithDirection):
1092
1093 2015-04-29  Tim Horton  <timothy_horton@apple.com>
1094
1095         UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
1096         https://bugs.webkit.org/show_bug.cgi?id=144418
1097         <rdar://problem/20740278>
1098
1099         Reviewed by Alexey Proskuryakov.
1100
1101         * UIProcess/API/mac/WKView.mm:
1102         (-[WKView _takeViewSnapshot]):
1103         Null-check the array before checking if it has any items.
1104         If the window is off-screen, we can't snapshot it.
1105
1106 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
1107
1108         Allow testing of plug-ins that handle wheel events.
1109         https://bugs.webkit.org/show_bug.cgi?id=144413
1110
1111         Reviewed by Tim Horton.
1112         
1113         Allow the Test Netscape Plug-in to pretend to handle wheel events,
1114         so layout tests can use it.
1115
1116         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1117         (WebKit::NetscapePluginModule::determineQuirks):
1118
1119 2015-04-29  Filip Pizlo  <fpizlo@apple.com>
1120
1121         JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
1122         https://bugs.webkit.org/show_bug.cgi?id=144397
1123
1124         Reviewed by Andreas Kling.
1125
1126         If you override getCallData() and you want to be called a "function", then you need to use the
1127         new TypeOfShouldCallGetCallData flag.
1128
1129         * WebProcess/Plugins/Netscape/JSNPObject.h:
1130
1131 2015-04-29  Antti Koivisto  <antti@apple.com>
1132
1133         ResourceLoadPriority should be enum class
1134         https://bugs.webkit.org/show_bug.cgi?id=144326
1135
1136         Reviewed by Darin Adler.
1137
1138         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1139         (WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.
1140
1141             Remove this unused message.
1142
1143         * NetworkProcess/NetworkConnectionToWebProcess.h:
1144         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1145         * NetworkProcess/cache/NetworkCache.cpp:
1146         (WebKit::NetworkCache::makeStoreDecision):
1147         (WebKit::NetworkCache::Cache::retrieve):
1148         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
1149         (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
1150         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1151         (WebKit::WebResourceLoadScheduler::servePendingRequests):
1152         * WebProcess/Network/WebResourceLoadScheduler.h:
1153
1154 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
1155
1156         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
1157         https://bugs.webkit.org/show_bug.cgi?id=132159
1158
1159         Reviewed by Darin Adler.
1160
1161         Add SPI to set the font whitelist.
1162
1163         * Shared/WebProcessCreationParameters.cpp:
1164         (WebKit::WebProcessCreationParameters::encode):
1165         (WebKit::WebProcessCreationParameters::decode):
1166         * Shared/WebProcessCreationParameters.h:
1167         * UIProcess/API/C/WKContext.cpp:
1168         (WKContextSetFontWhitelist):
1169         * UIProcess/API/C/WKContextPrivate.h:
1170         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1171         (WebKit::WebProcessPool::platformInitializeWebProcess):
1172         * UIProcess/WebProcessPool.cpp:
1173         (WebKit::WebProcessPool::setFontWhitelist):
1174         * UIProcess/WebProcessPool.h:
1175         * WebProcess/cocoa/WebProcessCocoa.mm:
1176         (WebKit::WebProcess::platformInitializeWebProcess):
1177
1178 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
1179
1180         [CMake] [GTK] Organize and clean up unused CMake variables
1181         https://bugs.webkit.org/show_bug.cgi?id=144364
1182
1183         Reviewed by Gyuyoung Kim.
1184
1185         * PlatformGTK.cmake: Add variables specific to this project.
1186         * webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
1187         * webkit2gtk.pc.in: Ditto.
1188
1189 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1190
1191         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
1192         https://bugs.webkit.org/show_bug.cgi?id=144388
1193
1194         Reviewed by Brady Eidson.
1195
1196         Move the WebContextMenuClient::shareMenuItem() implementation to
1197         platform files, since platforms not supporting share menu item
1198         should return a null ContextMenuIem instead.
1199
1200         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1201         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
1202         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
1203         (WebKit::WebContextMenuClient::shareMenuItem):
1204         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
1205         (WebKit::WebContextMenuClient::shareMenuItem):
1206         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1207         (WebKit::WebContextMenuClient::shareMenuItem):
1208
1209 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1210
1211         REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
1212         https://bugs.webkit.org/show_bug.cgi?id=144381
1213
1214         Reviewed by Darin Adler.
1215
1216         A requester enum value is passed now as part of the
1217         ResourceRequest, but it's not encoded/decoded for soup.
1218
1219         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1220         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
1221         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.
1222
1223 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1224
1225         [SOUP] Use xattrs to get/set the creation time of disk cache files
1226         https://bugs.webkit.org/show_bug.cgi?id=144251
1227
1228         Reviewed by Martin Robinson.
1229
1230         The network process disk cache uses the creation time to compute a
1231         worth value used to determine the order in which cached resources
1232         are deleted when the cache is shrunk. In some operating systems
1233         like Linux there's no st_birthtime in struct stat, but since cache
1234         files are always created and deleted by us, we could use a custom
1235         xattr to store and retrieve the creation time of cached resources.
1236
1237         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1238         (WebKit::NetworkCache::fileTimes):
1239         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1240         (WebKit::NetworkCache::IOChannel::IOChannel):
1241
1242 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1243
1244         Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
1245         https://bugs.webkit.org/show_bug.cgi?id=144337
1246
1247         Reviewed by Antti Koivisto.
1248
1249         We send a buffer or a memory mapped handler to the web process
1250         depending on whether the resource body is mapped or not, but we
1251         are always creating a shared buffer even for mapped resources.
1252         Split initializeBufferFromStorageRecord() moving the mapped memory
1253         handler initialization to its own method.
1254
1255         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1256         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
1257         Initialize the mapped memory handler if the body data is mapped.
1258         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
1259         Initialize the buffer by wrapping the mapped memory if the body
1260         data is mapped, or using the body data directly otherwise.
1261         (WebKit::NetworkCache::Entry::shareableResourceHandle): Call
1262         initializeShareableResourceHandleFromStorageRecord() if the
1263         handler is null.
1264         * NetworkProcess/cache/NetworkCacheEntry.h:
1265
1266 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
1267
1268         Make a non-static version of FrameView::yPositionForRootContentLayer()
1269         https://bugs.webkit.org/show_bug.cgi?id=144375
1270
1271         Reviewed by Andy Estes.
1272
1273         There were two calls to the static FrameView::yPositionForRootContentLayer()
1274         which passed in all the arguments for the same FrameView. Make a member
1275         function for convenience.
1276
1277         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1278         (WebKit::shadowLayerPositionForFrame):
1279
1280 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
1281
1282         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
1283         https://bugs.webkit.org/show_bug.cgi?id=143001
1284
1285         Reviewed by Gyuyoung Kim.
1286
1287         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1288         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
1289         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1290         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
1291         * WebProcess/WebCoreSupport/WebChromeClient.h:
1292         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1293         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
1294         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1295         * WebProcess/WebPage/WebPage.cpp:
1296         (WebKit::WebPage::setSize):
1297         (WebKit::WebPage::setUseFixedLayout):
1298         (WebKit::WebPage::canHandleUserEvents):
1299         * WebProcess/WebPage/WebPage.h:
1300
1301 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
1302
1303         [TextIndicator] Yellow highlight takes too long to fade out on scroll
1304         https://bugs.webkit.org/show_bug.cgi?id=144358
1305         <rdar://problem/19451011>
1306
1307         Reviewed by Beth Dakin.
1308
1309         * UIProcess/API/Cocoa/WKViewPrivate.h:
1310         * UIProcess/API/mac/WKView.mm:
1311         (-[WKView renewGState]):
1312         (-[WKView viewDidMoveToWindow]):
1313         (-[WKView _dictionaryLookupPopoverWillClose:]):
1314         (-[WKView _setTextIndicator:]):
1315         (-[WKView _setTextIndicator:withLifetime:]):
1316         (-[WKView _clearTextIndicatorWithAnimation:]):
1317         (-[WKView magnifyWithEvent:]):
1318         (-[WKView smartMagnifyWithEvent:]):
1319         (-[WKView setMagnification:centeredAtPoint:]):
1320         (-[WKView setMagnification:]):
1321         (-[WKView _dismissContentRelativeChildWindows]):
1322         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
1323         (-[WKView _setTextIndicator:fadeOut:]): Deleted.
1324         * UIProcess/API/mac/WKViewInternal.h:
1325         * UIProcess/PageClient.h:
1326         * UIProcess/WebPageProxy.cpp:
1327         (WebKit::WebPageProxy::pageDidScroll):
1328         (WebKit::WebPageProxy::setTextIndicator):
1329         (WebKit::WebPageProxy::clearTextIndicator):
1330         * UIProcess/WebPageProxy.h:
1331         * UIProcess/WebPageProxy.messages.in:
1332         * UIProcess/ios/PageClientImplIOS.h:
1333         * UIProcess/ios/PageClientImplIOS.mm:
1334         (WebKit::PageClientImpl::setTextIndicator):
1335         (WebKit::PageClientImpl::clearTextIndicator):
1336         * UIProcess/mac/PageClientImpl.h:
1337         * UIProcess/mac/PageClientImpl.mm:
1338         (WebKit::PageClientImpl::setTextIndicator):
1339         (WebKit::PageClientImpl::clearTextIndicator):
1340         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1341         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
1342         * UIProcess/mac/WKActionMenuController.mm:
1343         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1344         * UIProcess/mac/WKImmediateActionController.mm:
1345         (-[WKImmediateActionController _defaultAnimationController]):
1346         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
1347         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
1348         (-[WKImmediateActionController _animationControllerForText]):
1349         * WebProcess/WebPage/FindController.cpp:
1350         (WebKit::FindController::updateFindIndicator):
1351         Make _setTextIndicator take a reference.
1352         Add a variant of _setTextIndicator that takes a Lifetime.
1353         Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
1354         Make dismissContentRelativeChildWindows take a parameter indicating
1355         whether the dismissal should include animation or not (currently
1356         only applies to TextIndicator).
1357         Don't animate when dismissal occurs because of scrolling, zooming,
1358         or other things in which the content will have changed significantly
1359         underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.
1360
1361 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1362
1363         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1364         https://bugs.webkit.org/show_bug.cgi?id=144304
1365
1366         Reviewed by Geoffrey Garen.
1367
1368         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1369
1370         * Configurations/FeatureDefines.xcconfig:
1371
1372 2015-04-28  Commit Queue  <commit-queue@webkit.org>
1373
1374         Unreviewed, rolling out r183514.
1375         https://bugs.webkit.org/show_bug.cgi?id=144359
1376
1377         It broke cloop test bots (Requested by mcatanzaro on #webkit).
1378
1379         Reverted changeset:
1380
1381         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
1382         https://bugs.webkit.org/show_bug.cgi?id=144304
1383         http://trac.webkit.org/changeset/183514
1384
1385 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1386
1387         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1388         https://bugs.webkit.org/show_bug.cgi?id=144304
1389
1390         Reviewed by Geoffrey Garen.
1391
1392         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1393
1394         * Configurations/FeatureDefines.xcconfig:
1395
1396 2015-04-28  Enrica Casucci  <enrica@apple.com>
1397
1398         Add support for lookup on iOS.
1399         https://bugs.webkit.org/show_bug.cgi?id=144342
1400         rdar://problem/19994090
1401
1402         Reviewed by Tim Horton.
1403
1404         * UIProcess/WebPageProxy.h:
1405         * UIProcess/ios/WKContentViewInteraction.mm:
1406         (-[WKContentView _lookup:]):
1407         (-[WKContentView canPerformAction:withSender:]):
1408         * UIProcess/ios/WebPageProxyIOS.mm:
1409         (WebKit::WebPageProxy::getLookupContextAtPoint):
1410         * WebProcess/WebPage/WebPage.h:
1411         * WebProcess/WebPage/WebPage.messages.in:
1412         * WebProcess/WebPage/ios/WebPageIOS.mm:
1413         (WebKit::WebPage::getLookupContextAtPoint):
1414
1415 2015-04-28  Brady Eidson  <beidson@apple.com>
1416
1417         Consolidate most "frame load" arguments into FrameLoadRequest.
1418         https://bugs.webkit.org/show_bug.cgi?id=144276
1419
1420         Reviewed by Alexey Proskuryakov.
1421
1422         * WebProcess/Plugins/PluginView.cpp:
1423         (WebKit::PluginView::loadURL):
1424         
1425         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1426         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
1427         
1428         * WebProcess/WebPage/WebInspector.cpp:
1429         (WebKit::WebInspector::openInNewTab):
1430
1431 2015-04-28  Chris Dumez  <cdumez@apple.com>
1432
1433         [WK2][Mac] Update WebContent process' sandbox profile for AWD
1434         https://bugs.webkit.org/show_bug.cgi?id=144315
1435         <rdar://problem/20719293>
1436
1437         Reviewed by Alexey Proskuryakov.
1438
1439         Update sandbox profile for AWD similarly to what was done for iOS in
1440         r182278.
1441
1442         * WebProcess/com.apple.WebProcess.sb.in:
1443
1444 2015-04-28  Antti Koivisto  <antti@apple.com>
1445
1446         Network Cache: Disk cache getting filled by YouTube video data
1447         https://bugs.webkit.org/show_bug.cgi?id=144259
1448
1449         Reviewed by Darin Adler.
1450
1451         MSE media is loaded via XHR and tends to eventually fill the cache.
1452
1453         YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
1454         We can reduce disk writes and keep more useful resources around by not caching them
1455
1456         * NetworkProcess/NetworkResourceLoader.cpp:
1457         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1458         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
1459         * NetworkProcess/cache/NetworkCache.cpp:
1460         (WebKit::NetworkCache::makeStoreDecision):
1461
1462             Don't store if the requester is XHR and response has video or audio content type.
1463
1464         * NetworkProcess/cache/NetworkCache.h:
1465         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1466         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
1467         * Shared/Network/NetworkResourceLoadParameters.cpp:
1468         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
1469         (WebKit::NetworkResourceLoadParameters::encode):
1470         (WebKit::NetworkResourceLoadParameters::decode):
1471         * Shared/Network/NetworkResourceLoadParameters.h:
1472
1473             The requester type is now part of the ResourceRequest, no need for separate parameter.
1474
1475         * Shared/mac/WebCoreArgumentCodersMac.mm:
1476         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
1477         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
1478         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1479         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1480
1481 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
1482
1483         [WK2] API::UserContentURLPattern creation functions should return Ref<>
1484         https://bugs.webkit.org/show_bug.cgi?id=144225
1485
1486         Reviewed by Darin Adler.
1487
1488         Have API::UserContentURLPattern creation functions return Ref<>.
1489         Call-sites are also updated, using and operating on the returned Ref<>
1490         object where possible.
1491
1492         * Shared/API/APIUserContentURLPattern.h:
1493         (API::UserContentURLPattern::create):
1494         * Shared/API/c/WKUserContentURLPattern.cpp:
1495         (WKUserContentURLPatternCreate):
1496
1497 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
1498
1499         [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
1500         https://bugs.webkit.org/show_bug.cgi?id=144224
1501
1502         Reviewed by Darin Adler.
1503
1504         Have API::URLRequest and API::URLResponse creation functions return Ref<>.
1505         The call-sites are also updated, using and operating on the returned Ref<> object
1506         where possible.
1507
1508         * Shared/API/APIURLRequest.h:
1509         (API::URLRequest::create):
1510         * Shared/API/APIURLResponse.h:
1511         (API::URLResponse::create):
1512         * Shared/API/c/WKURLRequest.cpp:
1513         (WKURLRequestCreateWithWKURL):
1514         * Shared/API/c/mac/WKURLRequestNS.mm:
1515         (WKURLRequestCreateWithNSURLRequest):
1516         * Shared/API/c/mac/WKURLResponseNS.mm:
1517         (WKURLResponseCreateWithNSURLResponse):
1518         * UIProcess/API/C/WKContext.cpp:
1519         (WKContextSetDownloadClient):
1520         * UIProcess/API/C/WKDownload.cpp:
1521         (WKDownloadCopyRequest):
1522         * UIProcess/API/C/WKNavigationDataRef.cpp:
1523         (WKNavigationDataCopyOriginalRequest):
1524         * UIProcess/API/C/WKPage.cpp:
1525         (WKPageSetPagePolicyClient):
1526         (WKPageSetPageUIClient):
1527         * UIProcess/Cocoa/NavigationState.mm:
1528         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1529         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
1530         (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
1531         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1532         (willSendRequestForFrame):
1533         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
1534         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
1535         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
1536         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
1537
1538 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1539
1540         [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
1541         https://bugs.webkit.org/show_bug.cgi?id=144223
1542
1543         Reviewed by Darin Adler.
1544
1545         Have API::Point, API::Size and API::Rect creation functions return Ref<>.
1546         Call-sites are also updated, using and operating on the returned Ref<> object
1547         where possible.
1548
1549         * Shared/API/APIGeometry.h:
1550         (API::Size::create):
1551         (API::Point::create):
1552         (API::Rect::create):
1553         * Shared/API/c/WKGeometry.cpp:
1554         (WKPointCreate):
1555         (WKSizeCreate):
1556         (WKRectCreate):
1557
1558 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1559
1560         [WK2] API::Error creation functions should return Ref<>
1561         https://bugs.webkit.org/show_bug.cgi?id=144222
1562
1563         Reviewed by Darin Adler.
1564
1565         Have API::Error creation functions return Ref<>.
1566         The call-sites are also updated, using and operating
1567         on the returned Ref<> object where possible.
1568
1569         * Shared/API/APIError.h:
1570         (API::Error::create):
1571         * Shared/API/c/cf/WKErrorCF.cpp:
1572         (WKErrorCreateWithCFError):
1573         * UIProcess/API/C/WKOriginDataManager.cpp:
1574         (WKOriginDataManagerDeleteEntriesForOrigin):
1575         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
1576         (WKOriginDataManagerDeleteAllEntries):
1577         * UIProcess/API/C/WKPage.cpp:
1578         (toGenericCallbackFunction):
1579         (WKPageForceRepaint):
1580         (WKPageValidateCommand):
1581         (WKPageComputePagesForPrinting):
1582         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1583         (WKPluginSiteDataManagerClearSiteData):
1584         (WKPluginSiteDataManagerClearAllSiteData):
1585         * UIProcess/GenericCallback.h:
1586         (WebKit::toGenericCallbackFunction):
1587         * UIProcess/WebPageProxy.cpp:
1588         (WebKit::WebPageProxy::printFinishedCallback):
1589
1590 2015-04-27  Sungmann Cho  <sungmann.cho@navercorp.com>
1591
1592         [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
1593         https://bugs.webkit.org/show_bug.cgi?id=144312
1594
1595         Reviewed by Martin Robinson.
1596
1597         No new tests, no behavior change.
1598
1599         * UIProcess/API/gtk/WebKitNotificationProvider.h:
1600
1601 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
1602
1603         PDF action menu fixes
1604         https://bugs.webkit.org/show_bug.cgi?id=144299
1605         <rdar://problem/20702215>
1606
1607         Reviewed by Tim Horton.
1608
1609         Make two corrections to how PDFs are handled:
1610         1. When calculating the view rect for the user's selection, make sure
1611         that we get coordinates for the correct PDF page. The existing code assumed
1612         that the current PDFLayerControler's current page was correct, but this will
1613         not be true if you zoom the PDF out so that several pages are displayed at
1614         once. Each selection keeps track of the page it is referenced against.
1615         
1616         2. Revise the offsets calculated for the TextIndicator to take into account
1617         the font descender (as well as the ascender), and to adjust by the scaled
1618         amount of margin around the selected text.
1619
1620         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1621         (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
1622         the coordinates.
1623         * WebProcess/WebPage/mac/WebPageMac.mm:
1624         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
1625         and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
1626
1627 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1628
1629         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
1630         https://bugs.webkit.org/show_bug.cgi?id=144193
1631
1632         Reviewed by Darin Adler.
1633
1634         * CMakeLists.txt:
1635
1636 2015-04-24  Jon Honeycutt  <jhoneycutt@apple.com>
1637
1638         Context menus are not reshown after an orientation change
1639
1640         <https://bugs.webkit.org/show_bug.cgi?id=144143>
1641         <rdar://problem/20679931>
1642
1643         Reviewed by Darin Adler.
1644
1645         * UIProcess/ios/WKActionSheet.mm:
1646         (-[WKActionSheet updateSheetPosition]):
1647         Return early if we're still in a rotation, not if the rotation is
1648         complete.
1649
1650 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1651
1652         [WK2] API::Dictionary creation functions should return Ref<>
1653         https://bugs.webkit.org/show_bug.cgi?id=144221
1654
1655         Reviewed by Darin Adler.
1656
1657         Have API::Dictionary creation functions return Ref<>.
1658         The call-sites are also updated, using and operating
1659         on the returned Ref<> object where possible.
1660
1661         * Shared/API/APIDictionary.cpp:
1662         (API::Dictionary::create):
1663         * Shared/API/APIDictionary.h:
1664         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1665         (createEncodedObject):
1666         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1667         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
1668         * Shared/API/c/WKDictionary.cpp:
1669         (WKDictionaryCreate):
1670         * Shared/API/c/WKMutableDictionary.cpp:
1671         (WKMutableDictionaryCreate):
1672         * Shared/Plugins/Netscape/PluginInformation.cpp:
1673         (WebKit::createPluginInformationDictionary):
1674         * Shared/Plugins/Netscape/PluginInformation.h:
1675         * UIProcess/API/C/WKPage.cpp:
1676         (WKPageSetPageUIClient):
1677         * UIProcess/API/gtk/WebKitWebContext.cpp:
1678         (webkit_web_context_prefetch_dns):
1679         * UIProcess/API/gtk/WebKitWebView.cpp:
1680         (webkit_web_view_get_snapshot):
1681         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
1682         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
1683         * UIProcess/Plugins/PlugInAutoStartProvider.h:
1684         * UIProcess/StatisticsRequest.cpp:
1685         (WebKit::createDictionaryFromHashMap):
1686         (WebKit::StatisticsRequest::completedRequest):
1687         * UIProcess/WebFormClient.cpp:
1688         (WebKit::WebFormClient::willSubmitForm):
1689         * UIProcess/WebPageProxy.cpp:
1690         (WebKit::WebPageProxy::didFailToInitializePlugin):
1691         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1692         (didInitiateLoadForResource):
1693         (willSendRequestForFrame):
1694         (didReceiveResponseForResource):
1695         (didReceiveContentLengthForResource):
1696         (didFinishLoadForResource):
1697         (didFailLoadForResource):
1698         (webkitWebPageDidReceiveMessage):
1699         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1700         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
1701         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
1702
1703 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1704
1705         [WK2] API::Data creation functions should return Ref<>
1706         https://bugs.webkit.org/show_bug.cgi?id=144220
1707
1708         Reviewed by Darin Adler.
1709
1710         Have API::Data creation functions return Ref<>.
1711         The call-sites are also updated, using and operating
1712         on the returned Ref<> object where possible.
1713
1714         * Shared/API/APIData.h:
1715         (API::Data::createWithoutCopying):
1716         (API::Data::create):
1717         * Shared/API/c/WKData.cpp:
1718         (WKDataCreate):
1719         * Shared/API/c/mac/WKWebArchive.cpp:
1720         (WKWebArchiveCopyData):
1721         * Shared/API/c/mac/WKWebArchiveResource.cpp:
1722         (WKWebArchiveResourceCopyData):
1723         * Shared/APIWebArchive.h:
1724         * Shared/APIWebArchive.mm:
1725         (API::WebArchive::data):
1726         * Shared/APIWebArchiveResource.h:
1727         * Shared/APIWebArchiveResource.mm:
1728         (API::WebArchiveResource::data):
1729         * Shared/Cocoa/APIDataCocoa.mm:
1730         (API::Data::createWithoutCopying):
1731         * UIProcess/API/Cocoa/WKWebView.mm:
1732         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
1733         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1734         (webkitURISchemeRequestReadCallback):
1735         * UIProcess/API/gtk/WebKitWebView.cpp:
1736         (webkit_web_view_load_bytes):
1737         * UIProcess/Downloads/DownloadProxy.cpp:
1738         (WebKit::createData):
1739         * UIProcess/WebPageProxy.cpp:
1740         (WebKit::WebPageProxy::dataCallback):
1741         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
1742
1743 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1744
1745         [WK2] API::URL creation functions should return Ref<>
1746         https://bugs.webkit.org/show_bug.cgi?id=144219
1747
1748         Reviewed by Darin Adler.
1749
1750         Have API::URL creation functions return Ref<>.
1751         The call-sites are also updated, using and operating in the
1752         returned Ref<> object, where possible.
1753
1754         * Shared/API/APIURL.h:
1755         (API::URL::create):
1756         * Shared/API/c/WKSharedAPICast.h:
1757         (WebKit::toCopiedURLAPI):
1758         * Shared/API/c/WKURL.cpp:
1759         (WKURLCreateWithUTF8CString):
1760         (WKURLCreateWithBaseURL):
1761         * UIProcess/API/gtk/WebKitWebResource.cpp:
1762         (webkit_web_resource_get_data):
1763         * UIProcess/WebIconDatabase.cpp:
1764         (WebKit::WebIconDatabase::didChangeIconForPageURL):
1765         (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
1766         * WebProcess/WebPage/WebPage.cpp:
1767         (WebKit::WebPage::userAgent):
1768
1769 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1770
1771         [WK2] API::String creation functions should return Ref<>
1772         https://bugs.webkit.org/show_bug.cgi?id=144218
1773
1774         Reviewed by Darin Adler.
1775
1776         Have API::String creation functions return Ref<>.
1777         The call-sites are also updated, using and operating on the returned
1778         Ref<> object, where possible.
1779
1780         * Shared/API/APIString.h:
1781         * Shared/API/c/WKPluginInformation.cpp:
1782         (WKPluginInformationBundleIdentifierKey):
1783         (WKPluginInformationBundleVersionKey):
1784         (WKPluginInformationBundleShortVersionKey):
1785         (WKPluginInformationPathKey):
1786         (WKPluginInformationDisplayNameKey):
1787         (WKPluginInformationDefaultLoadPolicyKey):
1788         (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
1789         (WKPluginInformationHasSandboxProfileKey):
1790         (WKPluginInformationFrameURLKey):
1791         (WKPluginInformationMIMETypeKey):
1792         (WKPluginInformationPageURLKey):
1793         (WKPluginInformationPluginspageAttributeURLKey):
1794         (WKPluginInformationPluginURLKey):
1795         (WKPlugInInformationReplacementObscuredKey):
1796         * Shared/API/c/WKSharedAPICast.h:
1797         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
1798         (WebKit::toCopiedAPI):
1799         * Shared/API/c/WKString.cpp:
1800         (WKStringCreateWithUTF8CString):
1801         (WKStringCreateWithJSString):
1802         * UIProcess/API/C/WKDatabaseManager.cpp:
1803         (WKDatabaseManagerGetOriginKey):
1804         (WKDatabaseManagerGetOriginQuotaKey):
1805         (WKDatabaseManagerGetOriginUsageKey):
1806         (WKDatabaseManagerGetDatabaseDetailsKey):
1807         (WKDatabaseManagerGetDatabaseDetailsNameKey):
1808         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
1809         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
1810         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
1811         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
1812         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
1813         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1814         (WKKeyValueStorageManagerGetOriginKey):
1815         (WKKeyValueStorageManagerGetCreationTimeKey):
1816         (WKKeyValueStorageManagerGetModificationTimeKey):
1817         * UIProcess/API/C/WKPage.cpp:
1818         (WKPageGetSessionHistoryURLValueType):
1819         (WKPageGetSessionBackForwardListItemValueType):
1820         (toGenericCallbackFunction):
1821         (WKPageValidateCommand):
1822         * UIProcess/WebProcessPool.cpp:
1823         (WebKit::WebProcessPool::didReceiveInvalidMessage):
1824
1825 2015-04-27  Brady Eidson  <beidson@apple.com>
1826
1827         Make 'enum NavigationType' be an enum class
1828         https://bugs.webkit.org/show_bug.cgi?id=144270
1829
1830         Reviewed by Alex Christensen.
1831
1832         * Shared/API/c/WKSharedAPICast.h:
1833         (WebKit::toAPI):
1834         
1835         * Shared/NavigationActionData.cpp:
1836         (WebKit::NavigationActionData::NavigationActionData):
1837         
1838         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1839         (toWKNavigationType):
1840         
1841         * UIProcess/API/gtk/WebKitPrivate.cpp:
1842         (toWebKitNavigationType):
1843         
1844         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1845         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1846         
1847         * WebProcess/WebPage/WebInspector.cpp:
1848         (WebKit::WebInspector::openInNewTab):
1849
1850 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
1851
1852         REGRESSION(r182879): Images and video can no longer be downloaded
1853         https://bugs.webkit.org/show_bug.cgi?id=144267
1854         <rdar://problem/20702844>
1855
1856         Reviewed by Simon Fraser.
1857
1858         * UIProcess/mac/WKActionMenuController.mm:
1859         (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
1860         "!WebCore::protocolIs(..., "file")" for image and media downloads.
1861
1862 2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>
1863
1864         [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
1865         https://bugs.webkit.org/show_bug.cgi?id=143874
1866
1867         Reviewed by Gyuyoung Kim.
1868
1869         * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
1870         * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
1871
1872 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1873
1874         [SOUP] Add initial implementation of NetworkProcess disk cache
1875         https://bugs.webkit.org/show_bug.cgi?id=143872
1876
1877         Reviewed by Martin Robinson.
1878
1879         Implement the platform specific parts of the disk cache
1880         implementation for Soup. It's mainly NetworkCache::Data and
1881         NetworkCache::IOChannel.
1882
1883         * CMakeLists.txt:
1884         * NetworkProcess/cache/NetworkCache.cpp:
1885         (WebKit::NetworkCache::dumpFileChanged):
1886         (WebKit::NetworkCache::Cache::initialize):
1887         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
1888         * NetworkProcess/cache/NetworkCacheData.h:
1889         (WebKit::NetworkCache::Data::soupBuffer):
1890         * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
1891         (WebKit::NetworkCache::Data::Data):
1892         (WebKit::NetworkCache::Data::empty):
1893         (WebKit::NetworkCache::Data::data):
1894         (WebKit::NetworkCache::Data::isNull):
1895         (WebKit::NetworkCache::Data::apply):
1896         (WebKit::NetworkCache::Data::subrange):
1897         (WebKit::NetworkCache::concatenate):
1898         (WebKit::NetworkCache::MapWrapper::~MapWrapper):
1899         (WebKit::NetworkCache::deleteMapWrapper):
1900         (WebKit::NetworkCache::mapFile):
1901         (WebKit::NetworkCache::Data::adoptMap):
1902         (WebKit::NetworkCache::computeSHA1):
1903         (WebKit::NetworkCache::bytesEqual):
1904         * NetworkProcess/cache/NetworkCacheIOChannel.h:
1905         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
1906         (WebKit::NetworkCache::IOChannel::IOChannel):
1907         (WebKit::NetworkCache::IOChannel::open):
1908         (WebKit::NetworkCache::fillDataFromReadBuffer):
1909         (WebKit::NetworkCache::inputStreamReadReadyCallback):
1910         (WebKit::NetworkCache::IOChannel::read):
1911         (WebKit::NetworkCache::IOChannel::readSync):
1912         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
1913         (WebKit::NetworkCache::IOChannel::write):
1914         * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
1915         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
1916         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1917         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1918         (WebKit::NetworkProcess::platformSetCacheModel):
1919         (WebKit::NetworkProcess::clearDiskCache):
1920         * PlatformGTK.cmake:
1921
1922 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
1923
1924         [ES6] Implement ES6 template literals
1925         https://bugs.webkit.org/show_bug.cgi?id=142691
1926
1927         Reviewed by Darin Adler.
1928
1929         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
1930
1931         * Configurations/FeatureDefines.xcconfig:
1932
1933 2015-04-26  Sungmann Cho  <sungmann.cho@navercorp.com>
1934
1935         Remove PluginView::renderer().
1936         https://bugs.webkit.org/show_bug.cgi?id=144216
1937
1938         Reviewed by Darin Adler.
1939
1940         Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
1941
1942         No new tests, no behavior change.
1943
1944         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1945         (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
1946         (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
1947         * WebProcess/Plugins/PluginView.cpp:
1948         (WebKit::PluginView::renderer): Deleted.
1949         * WebProcess/Plugins/PluginView.h:
1950
1951 2015-04-26  Doug Russell  <d_russell@apple.com>
1952
1953         AX: richer text change notifications (142719)
1954         https://bugs.webkit.org/show_bug.cgi?id=142719
1955
1956         Reviewed by Darin Adler.
1957
1958         Richer accessibility value change notifications. Introduce AXTextEditType,
1959         postTextStateChangeNotification and postTextReplacementNotification to give assistive
1960         tech apps more reliable context for responding to changes in web content. Also implement
1961         a mechanism to post value changes in password form fields in coalesced ticks to thwart
1962         analyzing the cadence of changes.
1963
1964         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
1965         and an overload of postTextReplacementNotification to give assistive tech apps more
1966         reliable context for responding to changes in web content selection. Also block posting
1967         selection changes on password fields.
1968
1969         * UIProcess/WebEditCommandProxy.cpp:
1970         (WebKit::WebEditCommandProxy::nameForEditAction):
1971
1972 2015-04-26  Dan Bernstein  <mitz@apple.com>
1973
1974         <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
1975         https://bugs.webkit.org/show_bug.cgi?id=144233
1976
1977         Reviewed by Simon Fraser.
1978
1979         Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
1980
1981         * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
1982         and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
1983         we can just do it in the target’s Link Binary With Libraries build phase.
1984
1985         * Configurations/PluginService.64.xcconfig: Ditto.
1986
1987         * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
1988         Binariy With Libraries build phases (one service already had WebKit).
1989
1990 2015-04-26  Dan Bernstein  <mitz@apple.com>
1991
1992         Fixed the build.
1993
1994         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1995         (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
1996         of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
1997
1998 2015-04-25  Tim Horton  <timothy_horton@apple.com>
1999
2000         Further update gesture swipe shadow style
2001         https://bugs.webkit.org/show_bug.cgi?id=144215
2002         <rdar://problem/19295843>
2003
2004         Reviewed by Dan Bernstein.
2005
2006         * Resources/mac/SwipeShadow.png: Removed.
2007         * Resources/mac/SwipeShadow@2x.png: Removed.
2008         * UIProcess/mac/ViewGestureController.h:
2009         * UIProcess/mac/ViewGestureControllerMac.mm:
2010         (WebKit::ViewGestureController::beginSwipeGesture):
2011         * WebKit2.xcodeproj/project.pbxproj:
2012         Use a CAGradientLayer instead of PNGs for the swipe shadow.
2013
2014 2015-04-25  Dan Bernstein  <mitz@apple.com>
2015
2016         WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
2017         https://bugs.webkit.org/show_bug.cgi?id=144201
2018
2019         Reviewed by Darin Adler.
2020
2021         Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
2022         9876.5.
2023
2024         * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
2025         headers, look for "9876_5" rather than "TBA".
2026
2027 2015-04-24  Timothy Hatcher  <timothy@apple.com>
2028
2029         Web Inspector: Remove native window dock controls
2030         https://bugs.webkit.org/show_bug.cgi?id=144184
2031
2032         Reviewed by Joseph Pecoraro.
2033
2034         * Resources/DockBottom.pdf: Removed.
2035         * Resources/DockBottomLegacy.pdf: Removed.
2036         * Resources/DockRight.pdf: Removed.
2037         * Resources/DockRightLegacy.pdf: Removed.
2038         * UIProcess/WebInspectorProxy.h:
2039         * UIProcess/mac/WebInspectorProxyMac.mm:
2040         (WebKit::WebInspectorProxy::createInspectorWindow):
2041         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
2042         * WebKit2.xcodeproj/project.pbxproj:
2043
2044 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
2045
2046         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
2047         https://bugs.webkit.org/show_bug.cgi?id=144182
2048
2049         Reviewed by Simon Fraser.
2050
2051         * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2052
2053 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
2054
2055         Have the web inspector report accurate memory use for layers with detached backing store
2056         https://bugs.webkit.org/show_bug.cgi?id=144179
2057
2058         Reviewed by Dean Jackson.
2059         
2060         Remote layers can make their backing store volatile, so the backing only contributes
2061         to reported memory use when attached.
2062
2063         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2064
2065 2015-04-24  Andreas Kling  <akling@apple.com>
2066
2067         theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
2068         <https://webkit.org/b/144175>
2069         <rdar://problem/20694585>
2070
2071         Reviewed by Anders Carlsson.
2072
2073         Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
2074         IPC request to the UI process that would give the same result, but spend way
2075         more time and CPU cycles to do so.
2076
2077         With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
2078
2079         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2080         (WebKit::WebChromeClient::windowRect):
2081
2082 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
2083
2084         TextIndicator for embedded PDFs is slightly offset
2085         https://bugs.webkit.org/show_bug.cgi?id=144172
2086         <rdar://problem/20691304>
2087
2088         Reviewed by Tim Horton.
2089
2090         When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
2091         step where the font ascent was used to adjust the origin used for the TextIndicator. This
2092         patch determines the correct ascent for the range of characters in the selection, and
2093         adjusts the offset by the difference between the ascent and the height of the selection rect.
2094         
2095         Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
2096         an equivalent text bounding box by insetting the rect by half the size of the ascent.
2097
2098         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2099         (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
2100         * WebProcess/Plugins/PDF/PDFPlugin.h:
2101         * WebProcess/WebPage/mac/WebPageMac.mm:
2102         (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
2103         font ascent and scale factor into account.
2104
2105 2015-04-24  David Kilzer  <ddkilzer@apple.com>
2106
2107         REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
2108
2109         Fixes the following build failures:
2110
2111             WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
2112                 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
2113                                                         ^~~~~~~~~~~~~~~~~~~~~~
2114             WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
2115                 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
2116                        ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2117
2118         * Platform/spi/ios/UIKitSPI.h:
2119         (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
2120
2121 2015-04-24  Anders Carlsson  <andersca@apple.com>
2122
2123         Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
2124         https://bugs.webkit.org/show_bug.cgi?id=144171
2125
2126         Reviewed by Tim Horton.
2127
2128         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2129         (-[WKWebViewConfiguration _websiteDataStore]):
2130         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
2131         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2132         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2133         (-[_WKWebsiteDataStore initWithDataStore:]):
2134         (+[_WKWebsiteDataStore defaultDataStore]):
2135         (+[_WKWebsiteDataStore nonPersistentDataStore]):
2136         (-[_WKWebsiteDataStore isNonPersistent]):
2137         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2138         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2139         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2140         * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
2141         * WebKit2.xcodeproj/project.pbxproj:
2142
2143 2015-04-24  Tim Horton  <timothy_horton@apple.com>
2144
2145         WKPDFView does not support password-protected PDFs
2146         https://bugs.webkit.org/show_bug.cgi?id=144162
2147         <rdar://problem/18411512>
2148
2149         Reviewed by Andy Estes.
2150
2151         * Platform/spi/ios/UIKitSPI.h:
2152         Add some SPI.
2153
2154         * UIProcess/ios/WKPDFView.h:
2155         * UIProcess/ios/WKPDFView.mm:
2156         (-[WKPDFView _didLoadPDFDocument]):
2157         (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
2158         Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
2159         and initial setup of the page views out into _didLoadPDFDocument.
2160
2161         If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
2162         we'll continue on to _didLoadPDFDocument as previously.
2163
2164         (-[WKPDFView web_setMinimumSize:]):
2165         Resize the password UI instead of the PDF pages if we have it.
2166
2167         (-[WKPDFView _computePageAndDocumentFrames]):
2168         Don't bother doing any work revalidating PDF pages if the document is locked.
2169
2170         (-[WKPDFView _updatePasswordEntryField]):
2171         Make sure that the UIDocumentPassword view is always the size of the scrollview.
2172         This takes care of rotation.
2173
2174         (-[WKPDFView _keyboardDidShow:]):
2175         Make sure that we scroll the password field around, if necessary, to keep it
2176         on screen when editing begins.
2177
2178         (-[WKPDFView _showPasswordEntryField]):
2179         (-[WKPDFView _hidePasswordEntryField]):
2180         Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
2181         while it's up. The UIDocumentPassword view is installed into the scroll view
2182         to match UIWebView behavior.
2183
2184         (-[WKPDFView userDidEnterPassword:forPasswordView:]):
2185         (-[WKPDFView didBeginEditingPassword:inView:]):
2186         (-[WKPDFView didEndEditingPassword:inView:]):
2187         (-[WKPDFView _didFailToUnlock]):
2188         Pop up a dialog informing the user that they entered the wrong password.
2189
2190         (-[WKPDFView _tryToUnlockWithPassword:]):
2191         Try to unlock the document. If it succeeds, hide the unlock UI and go back to
2192         _didLoadPDFDocument.
2193
2194 2015-04-24  Commit Queue  <commit-queue@webkit.org>
2195
2196         Unreviewed, rolling out r183266.
2197         https://bugs.webkit.org/show_bug.cgi?id=144164
2198
2199         Broke 32-bit build and a test. (Requested by ap on #webkit).
2200
2201         Reverted changeset:
2202
2203         "AX: richer text change notifications (142719)"
2204         https://bugs.webkit.org/show_bug.cgi?id=142719
2205         http://trac.webkit.org/changeset/183266
2206
2207 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
2208
2209         REGRESSION: WebKit2.ActionMenusTest API test fails
2210         https://bugs.webkit.org/show_bug.cgi?id=144149
2211         <rdar://problem/20677770>
2212
2213         Reviewed by Tim Horton.
2214
2215         Tested by TestWebKitAPI 
2216
2217         The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
2218         was receiving from root view to the plugin view. Consequently, full page PDFs
2219         did hit testing correctly, but an <embed> PDF would not.
2220
2221         Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
2222         expect 'root view' coordinates and perform the requisite conversions, rather
2223         than expecting 'plugin view' coordinates.
2224
2225         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2226         (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
2227         for the input.
2228         (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
2229         coordinates to the PDF's view coordinate space.
2230         * WebProcess/WebPage/mac/WebPageMac.mm:
2231         (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
2232         not content coordinates.
2233
2234 2015-04-24  Anders Carlsson  <andersca@apple.com>
2235
2236         Address a review comment from Joe Pecoraro.
2237
2238         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2239
2240 2015-04-24  Anders Carlsson  <andersca@apple.com>
2241
2242         Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
2243         https://bugs.webkit.org/show_bug.cgi?id=144158
2244
2245         Reviewed by Beth Dakin.
2246
2247         * UIProcess/API/APIWebsiteDataStore.cpp:
2248         (API::WebsiteDataStore::isPersistent):
2249         (API::WebsiteDataStore::isNonPersistent): Deleted.
2250         * UIProcess/API/APIWebsiteDataStore.h:
2251         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2252         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2253         (-[WKWebsiteDataStore isPersistent]):
2254         (-[WKWebsiteDataStore isNonPersistent]): Deleted.
2255         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2256         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2257         (-[_WKWebsiteDataStore isNonPersistent]):
2258         * UIProcess/WebsiteData/WebsiteDataStore.h:
2259
2260 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
2261
2262         Immediate action not functional for embedded PDFs
2263         https://bugs.webkit.org/show_bug.cgi?id=143952
2264         <rdar://problem/19842365>        
2265
2266         Reviewed by Tim Horton.
2267
2268         Add a new method to retrieve appropriate dictionary lookup content and update the
2269         hit test result with relevant dictionary content and the bounding rect of the
2270         selection.
2271
2272         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
2273         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
2274         * WebProcess/Plugins/PDF/PDFPlugin.h:
2275         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2276         (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
2277         convert PDF 'in page' units to the equivalent view units.
2278         (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
2279         (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
2280         its bounding rect and return the result in view units.
2281         * WebProcess/Plugins/Plugin.h:
2282         * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
2283         * WebProcess/Plugins/PluginProxy.h: Add stub.
2284         * WebProcess/Plugins/PluginView.cpp: 
2285         (WebKit::PluginView::viewRectForSelection): Added.
2286         * WebProcess/Plugins/PluginView.h:
2287         * WebProcess/WebPage/WebPage.h:
2288         * WebProcess/WebPage/mac/WebPageMac.mm:
2289         (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
2290         (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
2291         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
2292         with relevant dictionary lookup content, and mark the result as a text node (if
2293         appropriate).
2294
2295 2015-04-24  Jer Noble  <jer.noble@apple.com>
2296
2297         [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
2298         https://bugs.webkit.org/show_bug.cgi?id=144153
2299
2300         Reviewed by Alexey Proskuryakov.
2301
2302         Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
2303
2304         * UIProcess/WebPageProxy.cpp:
2305         (WebKit::WebPageProxy::isPlayingMediaDidChange):
2306
2307 2015-04-24  Antti Koivisto  <antti@apple.com>
2308
2309         CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
2310         https://bugs.webkit.org/show_bug.cgi?id=144147
2311
2312         Reviewed by Chris Dumez.
2313
2314         Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
2315         This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
2316         RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
2317
2318         Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
2319         ReadOperation: count the active operations in progress and delete WriteOperation when everything is
2320         finished. This way we don't need to copy the function out from WriteOperation.
2321
2322         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2323         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2324         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
2325
2326             Move definition here from the header.
2327
2328         (WebKit::NetworkCache::Storage::~Storage):
2329         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2330
2331             Increment the operation count when storing a blob, call finishWriteOperation when done.
2332
2333         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2334         (WebKit::NetworkCache::Storage::finishReadOperation):
2335
2336             Count active operations instead of finished operations. This makes the code clearer.
2337
2338         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2339         (WebKit::NetworkCache::Storage::finishWriteOperation):
2340
2341             Mirror the way ReadOperations work.
2342
2343         * NetworkProcess/cache/NetworkCacheStorage.h:
2344         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
2345
2346 2015-04-24  Timothy Hatcher  <timothy@apple.com>
2347
2348         REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
2349         https://bugs.webkit.org/show_bug.cgi?id=144150
2350
2351         Reviewed by Brian Burg.
2352
2353         * WebProcess/WebPage/WebInspectorUI.cpp:
2354         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
2355         instead of strings by not using the string version of evaluateCommandOnLoad.
2356
2357 2015-04-23  Anders Carlsson  <andersca@apple.com>
2358
2359         Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
2360         https://bugs.webkit.org/show_bug.cgi?id=144138
2361
2362         Reviewed by Darin Adler.
2363
2364         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2365         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2366         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2367         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2368         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2369         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2370
2371 2015-04-24  Doug Russell  <d_russell@apple.com>
2372
2373         AX: richer text change notifications (142719)
2374         https://bugs.webkit.org/show_bug.cgi?id=142719
2375
2376         Reviewed by Darin Adler.
2377
2378         Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
2379
2380         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
2381
2382         * UIProcess/WebEditCommandProxy.cpp:
2383         (WebKit::WebEditCommandProxy::nameForEditAction):
2384
2385 2015-04-24  Darin Adler  <darin@apple.com>
2386
2387         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
2388         https://bugs.webkit.org/show_bug.cgi?id=128007
2389
2390         Reviewed by Anders Carlsson.
2391
2392         * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
2393         needed that was inherited from OwnPtr.h before.
2394
2395 2015-04-24  Antti Koivisto  <antti@apple.com>
2396
2397         Network Cache: Make path functions members
2398         https://bugs.webkit.org/show_bug.cgi?id=144146
2399
2400         Reviewed by Carlos Garcia Campos.
2401
2402         This simplifies the code.
2403
2404         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2405         (WebKit::NetworkCache::Storage::partitionPathForKey):
2406         (WebKit::NetworkCache::Storage::recordPathForKey):
2407         (WebKit::NetworkCache::Storage::bodyPathForKey):
2408         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2409         (WebKit::NetworkCache::Storage::remove):
2410         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2411         (WebKit::NetworkCache::Storage::finishReadOperation):
2412         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2413         (WebKit::NetworkCache::partitionPathForKey): Deleted.
2414         (WebKit::NetworkCache::recordPathForKey): Deleted.
2415         (WebKit::NetworkCache::bodyPathForKey): Deleted.
2416         * NetworkProcess/cache/NetworkCacheStorage.h:
2417
2418 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2419
2420         Unreviewed. Remove incorrect assert after r183189.
2421
2422         In this case the assert was already there, but it's incorrect
2423         because we are handling uninitialized attachments below in the
2424         same function, and also when sending messages. So, if it's ok to
2425         send uninitialized attachments, it's ok to receive them. This
2426         didn't fail before r183189, because we were only invaliding the
2427         attachments by setting the file descriptor to -1, and they were
2428         handled as null attachments. After r183189, the move operator
2429         resets the moved attachment leaving it uninitialized again.
2430
2431         * Platform/IPC/unix/ConnectionUnix.cpp:
2432         (IPC::Connection::processMessage):
2433
2434 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2435
2436         [SOUP] Use a webkit subdirectory for the disk cache
2437         https://bugs.webkit.org/show_bug.cgi?id=144048
2438
2439         Reviewed by Martin Robinson.
2440
2441         Recent versions of libsoup remove any file in cache dir not
2442         referenced by the index when the cache is loaded to workaround
2443         leaked resources when load/dump is unbalanced for whatever reason,
2444         like a crash. We currently use $XDG_CACHE_HOME/app-name as default
2445         disk cache directory, but that directory could be used by apps to
2446         cache other things, and the soup cache might end up deleting other
2447         stuff. The soup cache assumes the given directory is only for the
2448         disk cache, so we should ensure that.
2449
2450         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2451         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
2452         webkit to the given disk cache and clear the previous soup cache if it exists.
2453         * WebProcess/soup/WebProcessSoup.cpp:
2454         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
2455
2456 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2457
2458         Unreviewed. Remove incorrect ASSERT added in r183176.
2459
2460         We allow to encode null attachments.
2461
2462         * Platform/unix/SharedMemoryUnix.cpp:
2463         (WebKit::SharedMemory::Handle::releaseAttachment):
2464
2465 2015-04-23  Dan Bernstein  <mitz@apple.com>
2466
2467         <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
2468
2469         Reviewed by Andy Estes.
2470
2471         * mac/postprocess-framework-headers.sh:
2472
2473 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
2474
2475         Make it possible to detach GraphicsLayerCA backing store
2476         https://bugs.webkit.org/show_bug.cgi?id=144140
2477
2478         Reviewed by Tim Horton.
2479         
2480         This changes makes it possible to denote a GraphicsLayerCA's backing store
2481         as "attached" or not. When not attached, the backing store is made volatile
2482         and can be purged. This will be used in a future patch.
2483
2484         * Shared/mac/RemoteLayerBackingStore.mm:
2485         (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
2486         (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
2487         returns true, this indicates that the backing store was brought out of the
2488         "unreachable" list, so return true even if the backing store doesn't require
2489         painting.
2490         * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
2491         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
2492         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
2493         (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
2494         if the caller will need to submit the backing store in the current transaction.
2495         (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
2496         explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
2497         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2498         (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
2499         store, and it's attached.
2500         * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
2501         * Shared/mac/RemoteLayerTreeTransaction.mm:
2502         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
2503         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
2504         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
2505         (WebKit::dumpChangedLayers):
2506         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2507         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
2508         on the backing store if it's attached.
2509         (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
2510         (WebKit::PlatformCALayerRemote::backingStoreAttached):
2511         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2512         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2513         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2514         (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
2515
2516 2015-04-23  Tim Horton  <timothy_horton@apple.com>
2517
2518         Quick Look preview popover is not dismissed on scroll in Mail
2519         https://bugs.webkit.org/show_bug.cgi?id=144119
2520         <rdar://problem/19752045>
2521
2522         Reviewed by Anders Carlsson.
2523
2524         * UIProcess/API/mac/WKView.mm:
2525         (-[WKView renewGState]):
2526         If we have a TextIndicator, dismiss all content relative child windows
2527         on renewGState, not just the TextIndicator itself.
2528
2529         This will fix cases like Mail, where WebKit isn't driving the scrolling,
2530         and we have no way (except renewGState) to know that scrolling is happening.
2531
2532 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
2533
2534         Changing TiledBacking velocity should schedule a tile revalidation
2535         https://bugs.webkit.org/show_bug.cgi?id=144123
2536
2537         Reviewed by Tim Horton.
2538         
2539         Drive-by fix: use the FrameView& that we have already.
2540
2541         * WebProcess/WebPage/ios/WebPageIOS.mm:
2542         (WebKit::WebPage::updateVisibleContentRects):
2543
2544 2015-04-23  Jer Noble  <jer.noble@apple.com>
2545
2546         [Mac] Disable QTKit by default on future OS X.
2547         https://bugs.webkit.org/show_bug.cgi?id=144082
2548
2549         Reviewed by Darin Adler.
2550
2551         QTKitEnabled defaults to false.
2552
2553         * Shared/WebPreferencesDefinitions.h:
2554
2555 2015-04-23  Jer Noble  <jer.noble@apple.com>
2556
2557         [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
2558         https://bugs.webkit.org/show_bug.cgi?id=144120
2559
2560         Reviewed by Eric Carlson.
2561
2562         Tweak the curve to ease-in faster when the fullscreen animation duration is short.
2563
2564         * UIProcess/mac/WKFullScreenWindowController.mm:
2565         (timingFunctionForDuration):
2566         (zoomAnimation):
2567         (maskAnimation):
2568         (fadeAnimation):
2569
2570 2015-04-23  Enrica Casucci  <enrica@apple.com>
2571
2572         iOS build fix after r183208.
2573
2574         Unreviewed.
2575
2576         * UIProcess/ios/WKContentViewInteraction.mm:
2577
2578 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
2579
2580         [iOS] WebKit services should inherit environment variables for home
2581         https://bugs.webkit.org/show_bug.cgi?id=144078
2582         rdar://problem/20571678
2583
2584         Reviewed by Dan Bernstein.
2585
2586         Pass current environment variables as XPC bootstrap. Also while at it, made
2587         _CFBundleSetupXPCBootstrap not soft linked.
2588
2589         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2590         (main):
2591         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2592         (WebKit::connectToService):
2593
2594 2015-04-23  Enrica Casucci  <enrica@apple.com>
2595
2596         Support share button.
2597         https://bugs.webkit.org/show_bug.cgi?id=144077
2598         rdar://problem/19772892
2599
2600         Reviewed by Darin Adler.
2601
2602         * UIProcess/ios/WKContentViewInteraction.mm:
2603         (-[WKContentView _share:]):
2604         (-[WKContentView canPerformAction:withSender:]):
2605         (-[WKContentView _define:]):
2606         (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
2607         (-[WKContentView moveByOffset:]):
2608         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
2609         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
2610         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
2611         (-[WKContentView accessoryTab:]):
2612         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
2613         (-[WKContentView executeEditCommandWithCallback:]):
2614
2615 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2616
2617         [UNIX] Do not allow copies of IPC::Attachment
2618         https://bugs.webkit.org/show_bug.cgi?id=144096
2619
2620         Reviewed by Darin Adler.
2621
2622         It ensures that the file descriptor ownership is always correctly
2623         transferred. This way we can remove the dispose() method to
2624         explicitly close the file descriptor and always close it in the
2625         Attachment destructor (unless explicitly transferred to
2626         IPC::Connection or SharedMemory). It simplifies the code and
2627         ensure we don't leak file descriptors.
2628
2629         * Platform/IPC/ArgumentDecoder.cpp:
2630         (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
2631         explicitly dispose attachments.
2632         (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
2633         * Platform/IPC/ArgumentEncoder.cpp:
2634         (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
2635         explicitly dispose attachments.
2636         (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
2637         (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
2638         * Platform/IPC/ArgumentEncoder.h:
2639         * Platform/IPC/Attachment.cpp:
2640         (IPC::Attachment::encode): Move a copy of the attachment, and
2641         reset the file descriptor, since the ownership is passed to the encoder.
2642         * Platform/IPC/Attachment.h: Make copy constructor and assignment
2643         private to not allow public copies. The only copy allowed is done
2644         by Attachment::encode(). Make m_fileDescriptor mutable so that we
2645         can reset it in Attachment::encode() after passing the ownership
2646         to the encoder.
2647         * Platform/IPC/unix/AttachmentUnix.cpp:
2648         (IPC::Attachment::~Attachment): Close the file descriptor if it
2649         hasn't been released explicitly.
2650         (IPC::Attachment::dispose): Deleted.
2651         * Platform/IPC/unix/ConnectionUnix.cpp:
2652         (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
2653         (IPC::Connection::sendOutgoingMessage): Ditto.
2654         (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
2655         (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
2656         * Platform/unix/SharedMemoryUnix.cpp:
2657         (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
2658         (WebKit::SharedMemory::Handle::clear): Reset the attachment.
2659         * UIProcess/WebInspectorProxy.cpp:
2660         (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
2661         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2662         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2663         Call releaseFileDescriptor() instead of fileDescritpro() since the
2664         ownership is passed to the connection.
2665
2666 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
2667
2668         Build fix.
2669
2670         * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
2671
2672 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2673
2674         Unreviewed. Fix debug build after r183176.
2675
2676         * Platform/unix/SharedMemoryUnix.cpp:
2677         (WebKit::SharedMemory::Handle::decode):
2678         (WebKit::SharedMemory::createHandle):
2679
2680 2015-04-23  Andreas Kling  <akling@apple.com>
2681
2682         There should only be one way to get the system memory size.
2683         <https://webkit.org/b/144081>
2684
2685         Reviewed by Antti Koivisto.
2686
2687         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2688         (WebKit::NetworkProcess::platformSetCacheModel):
2689         (WebKit::memorySize): Deleted.
2690         * WebProcess/cocoa/WebProcessCocoa.mm:
2691         (WebKit::WebProcess::platformSetCacheModel):
2692         (WebKit::memorySize): Deleted.
2693
2694 2015-04-23  Chris Dumez  <cdumez@apple.com>
2695
2696         [WK2] WebDiagnosticLoggingClient is leaking
2697         https://bugs.webkit.org/show_bug.cgi?id=144089
2698         <rdar://problem/19706214>
2699
2700         Reviewed by Darin Adler.
2701
2702         WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
2703         constructor but there is no code destroying it.
2704
2705         This patch adds a new xxxDestroyed() virtual function to
2706         DiagnosticLoggingClient and that is overriden in
2707         WebDiagnosticLoggingClient to call "delete this". This is the same
2708         pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
2709         WebProgressTrackerClient).
2710
2711         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2712         (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
2713         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
2714
2715 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2716
2717         [UNIX] Simplify the file descriptor handling in SharedMemory
2718         https://bugs.webkit.org/show_bug.cgi?id=144046
2719
2720         Reviewed by Darin Adler.
2721
2722         Simplify the file descriptor handling and clarify its ownership by
2723         using IPC::Attachment in SharedMemory::Handle instead of fd and
2724         size members. SharedMemory::Handle::adoptFromAttachment() has been
2725         renamed as SharedMemory::Handle::adoptAttachment() and receives an
2726         IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
2727         has been renamed as SharedMemory::Handle::releaseAttachment().
2728
2729         * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
2730         * Platform/IPC/Connection.h:
2731         (IPC::Connection::identifierIsNull): A file descriptor is null
2732         when it's -1 no 0.
2733         * Platform/IPC/unix/AttachmentUnix.cpp:
2734         (IPC::Attachment::Attachment):
2735         (IPC::Attachment::operator=):
2736         (IPC::Attachment::dispose): Reset the file descriptor after
2737         closing it.
2738         * Platform/IPC/unix/ConnectionUnix.cpp:
2739         (IPC::Connection::processMessage): Use
2740         SharedMemory::Handle::adoptAttachment() that receives an
2741         IPC::Attachment now.
2742         (IPC::Connection::sendOutgoingMessage): Use
2743         SharedMemory::Handle::releaseAttachment().
2744         * Platform/SharedMemory.h:
2745         * Platform/unix/SharedMemoryUnix.cpp:
2746         (WebKit::SharedMemory::Handle::Handle): Remove initializers for
2747         file descriptor and size members.
2748         (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
2749         (WebKit::SharedMemory::Handle::isNull): Handle is null if the
2750         attachment file descriptor is -1.
2751         (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
2752         (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
2753         (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
2754         using move.
2755         (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
2756         (WebKit::SharedMemory::map): Use
2757         IPC::Attachment::releaseFileDescriptor() instead of manually
2758         changing the member.
2759         (WebKit::SharedMemory::createHandle): Initialize the handle
2760         attachment with the duplicated file descriptor and size.
2761
2762 2015-04-22  Darin Adler  <darin@apple.com>
2763
2764         Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
2765         https://bugs.webkit.org/show_bug.cgi?id=143943
2766
2767         Reviewed by Anders Carlsson.
2768
2769         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2770         Removed unneeded include.
2771
2772 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
2773
2774         VisibleSelection should only accept Range by reference
2775         https://bugs.webkit.org/show_bug.cgi?id=144047
2776
2777         Reviewed by Tim Horton.
2778
2779         Update all uses of VisibleSelection to pass a Range reference instead
2780         of a Range pointer.
2781
2782         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2783         (WebKit::InjectedBundleRangeHandle::renderedImage):
2784         * WebProcess/WebPage/FindController.cpp:
2785         (WebKit::FindController::getImageForFindMatch):
2786         (WebKit::FindController::selectFindMatch):
2787         * WebProcess/WebPage/WebPage.cpp:
2788         (WebKit::WebPage::insertTextAsync):
2789         (WebKit::WebPage::setCompositionAsync):
2790         * WebProcess/WebPage/mac/WebPageMac.mm:
2791         (WebKit::WebPage::insertDictatedTextAsync):
2792
2793 2015-04-22  Anders Carlsson  <andersca@apple.com>
2794
2795         Add WK_ARRAY and WK_SET annotations
2796         https://bugs.webkit.org/show_bug.cgi?id=144075
2797         rdar://problem/19417770
2798
2799         Reviewed by Dan Bernstein.
2800
2801         * Shared/API/Cocoa/WKFoundation.h:
2802         * UIProcess/API/Cocoa/WKBackForwardList.h:
2803         * UIProcess/API/Cocoa/WKUserContentController.h:
2804         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2805         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2806         * mac/postprocess-framework-headers.sh:
2807
2808 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
2809
2810         Unreviewed build fix after r183136.
2811
2812         * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
2813         'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
2814
2815 2015-04-21  Brent Fulgham  <bfulgham@apple.com>
2816
2817         Extend action menus to support PDF
2818         https://bugs.webkit.org/show_bug.cgi?id=143895
2819         <rdar://problem/19003333>
2820
2821         Reviewed by Tim Horton.
2822
2823         If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
2824         content is under the mouse. For now, we only support copying text and handling URLs.
2825
2826         If no text is selected, use the dictionary lookup service to find a semantically appropriate
2827         selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
2828         views. If some text is already selected, and the mouse is over the existing selection, continue
2829         using the selected text. Otherwise, discard the old selection and select the most appropriate
2830         region under the mouse pointer.
2831
2832         * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
2833         * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
2834         * UIProcess/mac/WKActionMenuController.mm:
2835         (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
2836         (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
2837         menu entries.
2838         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
2839         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
2840         'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
2841         * WebProcess/Plugins/PDF/PDFPlugin.h:
2842         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2843         (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
2844         (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
2845         (WebKit::PDFPlugin::lookupTextAtLocation): Added.
2846         * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
2847         * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
2848         * WebProcess/Plugins/PluginView.cpp:
2849         (WebKit::PluginView::getSelectionForWordAtPoint): Added.
2850         (WebKit::PluginView::existingSelectionContainsPoint): Added.
2851         (WebKit::PluginView::lookupTextAtLocation): Added.
2852         * WebProcess/Plugins/PluginView.h:
2853         * WebProcess/WebPage/mac/WebPageMac.mm:
2854         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
2855         relevant content to support later action menu handling.
2856
2857 2015-04-22  Eric Carlson  <eric.carlson@apple.com>
2858
2859         Update AirPlay sandbox rules
2860         https://bugs.webkit.org/show_bug.cgi?id=144062
2861         <rdar://problem/19869448>
2862
2863         Reviewed by Alexey Proskuryakov.
2864
2865         * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
2866
2867 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
2868
2869         [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
2870         https://bugs.webkit.org/show_bug.cgi?id=144052
2871         rdar://problem/19754404
2872
2873         Reviewed by Darin Adler.
2874
2875         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2876         (main): Make XPC transaction tracking work again after a re-exec.
2877
2878 2015-04-22  Zan Dobersek  <zdobersek@igalia.com>
2879
2880         [WK2] Have API::Array creation methods return Ref<>
2881         https://bugs.webkit.org/show_bug.cgi?id=143933
2882
2883         Reviewed by Darin Adler.
2884
2885         API::Array::create() and API::Array::createStringArray() should return Ref<> objects
2886         as the return values are never null. It's up to the caller to implicitly convert the
2887         returned objects to RefPtr<> if so required. All the call-sites have been updated to
2888         reflect that.
2889
2890         * Shared/API/APIArray.cpp:
2891         (API::Array::create):
2892         (API::Array::createStringArray):
2893         (API::Array::copy):
2894         * Shared/API/APIArray.h:
2895         * Shared/API/APIDictionary.cpp:
2896         (API::Dictionary::keys):
2897         * Shared/API/APIDictionary.h:
2898         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2899         (ensureObjectStream):
2900         * Shared/API/c/WKArray.cpp:
2901         (WKArrayCreate):
2902         (WKArrayCreateAdoptingValues):
2903         * Shared/API/c/WKContextMenuItem.cpp:
2904         (WKContextMenuCopySubmenuItems):
2905         * Shared/API/c/WKDictionary.cpp:
2906         (WKDictionaryCopyKeys):
2907         * Shared/API/c/WKMutableArray.cpp:
2908         (WKMutableArrayCreate):
2909         * Shared/Cocoa/WKNSDictionary.mm:
2910         (-[WKNSDictionary keyEnumerator]):
2911         * Shared/SecurityOriginData.cpp:
2912         (WebKit::performAPICallbackWithSecurityOriginDataVector):
2913         * Shared/WebContextMenuItem.cpp:
2914         (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
2915         * Shared/WebContextMenuItem.h:
2916         * Shared/WebOpenPanelParameters.cpp:
2917         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
2918         (WebKit::WebOpenPanelParameters::selectedFileNames):
2919         * Shared/WebOpenPanelParameters.h:
2920         * UIProcess/API/C/WKBackForwardListRef.cpp:
2921         (WKBackForwardListCopyBackListWithLimit):
2922         (WKBackForwardListCopyForwardListWithLimit):
2923         * UIProcess/API/C/WKGrammarDetail.cpp:
2924         (WKGrammarDetailCopyGuesses):
2925         * UIProcess/API/C/WKOpenPanelParameters.cpp:
2926         (WKOpenPanelParametersCopyAcceptedMIMETypes):
2927         (WKOpenPanelParametersCopySelectedFileNames):
2928         * UIProcess/API/C/WKPage.cpp:
2929         (WKPageSetPageContextMenuClient):
2930         (WKPageCopyRelatedPages):
2931         * UIProcess/API/Cocoa/WKBackForwardList.mm:
2932         (-[WKBackForwardList backList]):
2933         (-[WKBackForwardList forwardList]):
2934         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
2935         (createWKArray):
2936         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2937         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2938         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
2939         (webkit_back_forward_list_get_back_list_with_limit):
2940         (webkit_back_forward_list_get_forward_list_with_limit):
2941         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
2942         (webkit_file_chooser_request_get_mime_types):
2943         (webkit_file_chooser_request_get_mime_types_filter):
2944         (webkit_file_chooser_request_select_files):
2945         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
2946         (WebKitNotificationProvider::notificationCloseCallback):
2947         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2948         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
2949         * UIProcess/Notifications/WebNotificationProvider.cpp:
2950         (WebKit::WebNotificationProvider::clearNotifications):
2951         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
2952         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
2953         * UIProcess/StatisticsRequest.cpp:
2954         (WebKit::StatisticsRequest::completedRequest):
2955         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2956         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
2957         * UIProcess/WebBackForwardList.cpp:
2958         (WebKit::WebBackForwardList::backList):
2959         (WebKit::WebBackForwardList::forwardList):
2960         (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
2961         (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
2962         * UIProcess/WebBackForwardList.h:
2963         * UIProcess/WebCookieManagerProxy.cpp:
2964         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
2965         * UIProcess/WebDatabaseManagerProxy.cpp:
2966         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
2967         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
2968         * UIProcess/WebGrammarDetail.cpp:
2969         (WebKit::WebGrammarDetail::guesses):
2970         * UIProcess/WebGrammarDetail.h:
2971         * UIProcess/WebKeyValueStorageManager.cpp:
2972         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2973         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
2974         * UIProcess/WebMediaCacheManagerProxy.cpp:
2975         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
2976         * UIProcess/WebOriginDataManagerProxy.cpp:
2977         (WebKit::WebOriginDataManagerProxy::didGetOrigins):
2978         * UIProcess/WebPageProxy.cpp:
2979         (WebKit::WebPageProxy::didFindStringMatches):
2980         * UIProcess/WebProcessPool.cpp:
2981         (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
2982         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2983         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
2984         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
2985         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2986         (-[WKWebProcessPlugInFrame childFrames]):
2987         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
2988         (WKBundleBackForwardListItemCopyChildren):
2989         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2990         (WKBundleFrameCopyChildFrames):
2991         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2992         (WKBundlePageCopyTrackedRepaintRects):
2993         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
2994         (WebKit::InjectedBundleBackForwardListItem::children):
2995         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2996         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
2997         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
2998         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
2999         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
3000         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3001         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
3002         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3003         (WebKit::findLargestFrameInFrameSet):
3004         * WebProcess/WebPage/WebFrame.cpp:
3005         (WebKit::WebFrame::childFrames):
3006         * WebProcess/WebPage/WebFrame.h:
3007         * WebProcess/WebPage/WebPage.cpp:
3008         (WebKit::WebPage::trackedRepaintRects):
3009         * WebProcess/WebPage/WebPage.h:
3010
3011 2015-04-21  Eric Carlson  <eric.carlson@apple.com>
3012
3013         [Mac] Use one playback target for all web processes
3014         https://bugs.webkit.org/show_bug.cgi?id=144009
3015
3016         Reviewed by Tim Horton.
3017
3018         Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
3019         picker.
3020
3021         * UIProcess/PageClient.h:
3022         * UIProcess/WebPageProxy.cpp:
3023         (WebKit::WebPageProxy::WebPageProxy):
3024         (WebKit::WebPageProxy::resetState):
3025         (WebKit::WebPageProxy::isPlayingMediaDidChange):
3026         (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
3027         (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
3028         (WebKit::WebPageProxy::showPlaybackTargetPicker):
3029         (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
3030         (WebKit::WebPageProxy::setPlaybackTarget):
3031         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
3032         (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
3033         (WebKit::WebPageProxy::devicePickerProxy): Deleted.
3034         (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
3035         (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
3036         (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
3037         * UIProcess/WebPageProxy.h:
3038         (WebKit::WebPageProxy::isPlayingAudio):
3039         * UIProcess/WebPageProxy.messages.in:
3040         * UIProcess/mac/PageClientImpl.h:
3041         * UIProcess/mac/PageClientImpl.mm:
3042         (WebKit::PageClientImpl::mediaSessionManager):
3043         (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
3044         * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
3045         (WebKit::WebMediaSessionManagerMac::singleton):
3046         (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
3047         (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
3048         (WebKit::WebMediaSessionManagerMac::targetPicker):
3049         * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
3050         * WebProcess/Plugins/PluginView.h:
3051         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3052         (WebKit::WebChromeClient::isPlayingMediaDidChange):
3053         (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
3054         (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
3055         (WebKit::WebChromeClient::showPlaybackTargetPicker):
3056         (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
3057         (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
3058         (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
3059         * WebProcess/WebCoreSupport/WebChromeClient.h:
3060         * WebProcess/WebPage/WebPage.h:
3061         * WebProcess/WebPage/WebPage.messages.in:
3062         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3063         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
3064         * WebProcess/WebPage/mac/WebPageMac.mm:
3065         (WebKit::WebPage::playbackTargetSelected):
3066         (WebKit::WebPage::playbackTargetAvailabilityDidChange):
3067         (WebKit::WebPage::setShouldPlayToPlaybackTarget):
3068
3069 2015-04-21  Anders Carlsson  <andersca@apple.com>
3070
3071         WKWebsiteDataStore doesn't track and remove IndexedDB databases
3072         https://bugs.webkit.org/show_bug.cgi?id=144032
3073         rdar://problem/20242856
3074
3075         Reviewed by Tim Horton.
3076
3077         * DatabaseProcess/DatabaseProcess.cpp:
3078         (WebKit::DatabaseProcess::fetchWebsiteData):
3079         (WebKit::DatabaseProcess::deleteWebsiteData):
3080         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
3081         * DatabaseProcess/DatabaseProcess.h:
3082         * DatabaseProcess/DatabaseProcess.messages.in:
3083         * Shared/WebsiteData/WebsiteDataTypes.h:
3084         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
3085         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
3086         (dataTypesToString):
3087         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
3088         (WebKit::toWebsiteDataTypes):
3089         (WebKit::toWKWebsiteDataTypes):
3090         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3091         (WebKit::generateCallbackID):
3092         (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
3093         (WebKit::DatabaseProcessProxy::fetchWebsiteData):
3094         (WebKit::DatabaseProcessProxy::deleteWebsiteData):
3095         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
3096         (WebKit::DatabaseProcessProxy::didClose):
3097         (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
3098         (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
3099         (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
3100         * UIProcess/Databases/DatabaseProcessProxy.h:
3101         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
3102         * UIProcess/WebProcessPool.h:
3103         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3104         (WebKit::WebsiteDataStore::fetchData):
3105         (WebKit::WebsiteDataStore::removeData):
3106
3107 2015-04-21  Anders Carlsson  <andersca@apple.com>
3108
3109         Add module maps for WebKit
3110         https://bugs.webkit.org/show_bug.cgi?id=144026
3111         rdar://problem/19665428
3112
3113         Reviewed by Dan Bernstein.
3114
3115         * Configurations/WebKit.xcconfig:
3116         * Modules/OSX.modulemap: Added.
3117         * Modules/iOS.modulemap: Added.
3118
3119 2015-04-21  Tim Horton  <timothy_horton@apple.com>
3120
3121         Long pause under _takeViewSnapshot when screen updates are disabled
3122         https://bugs.webkit.org/show_bug.cgi?id=144017
3123         <rdar://problem/20548397>
3124
3125         Reviewed by Simon Fraser.
3126
3127         * UIProcess/API/mac/WKView.mm:
3128         (-[WKView _takeViewSnapshot]):
3129         Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
3130         the next commit, and can succeed while screen updates are disabled
3131         without blocking.
3132
3133 2015-04-21  Chris Dumez  <cdumez@apple.com>
3134
3135         [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
3136         https://bugs.webkit.org/show_bug.cgi?id=144014
3137
3138         Reviewed by Antti Koivisto.
3139
3140         Better account of resource revalidations in efficacy logging.
3141         Prevously, resources that were in the cache but needed revalidation
3142         were counted as retrieval successes, which is not entirely accurate.
3143
3144         We now distinguish "is in the cache and is directly usable" from
3145         "is in the cache but needs revalidation". We also log how many of these
3146         revalidations are successful.
3147
3148         * NetworkProcess/NetworkResourceLoader.cpp:
3149         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3150         * NetworkProcess/cache/NetworkCache.cpp:
3151         (WebKit::NetworkCache::Cache::update):
3152         * NetworkProcess/cache/NetworkCache.h:
3153         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3154         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
3155         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
3156         * NetworkProcess/cache/NetworkCacheStatistics.h:
3157
3158 2015-04-21  Dan Bernstein  <mitz@apple.com>
3159
3160         [Cocoa] Framework header postprocessing should respect additional definitions
3161         https://bugs.webkit.org/show_bug.cgi?id=144018
3162
3163         Reviewed by Anders Carlsson.
3164
3165         * mac/postprocess-framework-headers.sh: Read definitons from
3166         /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
3167         have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
3168         sed.
3169
3170 2015-04-21  Anders Carlsson  <andersca@apple.com>
3171
3172         Fix block signatures
3173         https://bugs.webkit.org/show_bug.cgi?id=144002
3174
3175         Reviewed by Andreas Kling.
3176
3177         * UIProcess/API/Cocoa/WKUIDelegate.h:
3178         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
3179         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3180         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3181         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3182         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3183         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3184         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3185         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3186         * UIProcess/ios/WKPDFView.mm:
3187         (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
3188         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3189         (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
3190         (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
3191         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
3192
3193 2015-04-21  Timothy Horton  <timothy_horton@apple.com>
3194
3195         PDFs still don't snapshot properly in iOS Safari
3196         https://bugs.webkit.org/show_bug.cgi?id=143976
3197         <rdar://problem/18283459>
3198
3199         Reviewed by Anders Carlsson.
3200
3201         * UIProcess/WebPageProxy.cpp:
3202         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
3203         * UIProcess/WebPageProxy.h:
3204         * UIProcess/API/Cocoa/WKWebView.mm:
3205         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
3206         Inform the client that we've passed all reasonable layout milestones
3207         as soon as the custom content provider has been handed its data.
3208         WKPDFView, the only custom content provider, synchronously lays out
3209         its subviews upon initial receipt of data, so this works fine for it.
3210         This ensures that clients that normally depend on layout milestones firing
3211         won't break when a custom content view is installed.
3212
3213         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
3214         Fall back to renderInContext: if the custom content view is not parented
3215         when a snapshot is requested.
3216
3217 2015-04-21  Dan Bernstein  <mitz@apple.com>
3218
3219         Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
3220
3221         Reviewed by Anders Carlsson.
3222
3223         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
3224         (-[WKBackForwardListItem _item]):
3225         (-[WKBackForwardListItem _apiObject]):
3226         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
3227
3228 2015-04-21  Chris Dumez  <cdumez@apple.com>
3229
3230         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
3231         https://bugs.webkit.org/show_bug.cgi?id=143970
3232
3233         Reviewed by Darin Adler.
3234
3235         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
3236         constructor explicit as it copies the vector and it is easy to call it
3237         by mistake.
3238
3239         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3240         (WebKit::WebIDBServerConnection::setIndexKeys):
3241         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3242
3243 2015-04-20  Dan Bernstein  <mitz@apple.com>
3244
3245         Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
3246         https://bugs.webkit.org/show_bug.cgi?id=143973
3247
3248         Reviewed by Anders Carlsson.
3249
3250         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
3251         delegate methods.
3252
3253         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
3254         property.
3255         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
3256         (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
3257         useful to delegates getting an array of nodes via the new method.
3258
3259         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3260         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
3261         shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
3262
3263 2015-04-20  Joseph Pecoraro  <pecoraro@apple.com>
3264
3265         Cleanup some StringBuilder use
3266         https://bugs.webkit.org/show_bug.cgi?id=143550
3267
3268         Reviewed by Darin Adler.
3269
3270         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
3271         (WebKit::buildObjectStoreStatement):
3272         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
3273         (WebKit::v2RecordsTableSchema):
3274         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
3275         (WebKit::uniqueDatabaseIdentifier):
3276         * UIProcess/API/APIUserScript.cpp:
3277         (API::UserScript::generateUniqueURL):
3278         * UIProcess/WebProcessPool.cpp:
3279         (WebKit::WebProcessPool::didReceiveInvalidMessage):
3280         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3281         (WebKit::combinedSecurityOriginIdentifier):
3282
3283 2015-04-20  Anders Carlsson  <andersca@apple.com>
3284
3285         Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
3286         https://bugs.webkit.org/show_bug.cgi?id=143966
3287
3288         Reviewed by Dan Bernstein.
3289
3290         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
3291         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
3292         (dataTypesToString):
3293         (-[WKWebsiteDataRecord dataTypes]):
3294         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
3295         (WebKit::toWebsiteDataTypes):
3296         (WebKit::toWKWebsiteDataTypes):
3297         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
3298         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3299         (+[WKWebsiteDataStore allWebsiteDataTypes]):
3300         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3301         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3302         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3303         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3304         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3305         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3306         (toWKWebsiteDataTypes):
3307         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3308         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3309         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3310
3311 2015-04-20  Beth Dakin  <bdakin@apple.com>
3312
3313         Should remove mouseForceClick and mouseForceCancelled from DOM force events
3314         https://bugs.webkit.org/show_bug.cgi?id=143904
3315         -and corresponding-
3316         rdar://problem/20578842
3317
3318         Reviewed by Dan Bernstein.
3319
3320         * WebProcess/WebPage/mac/WebPageMac.mm:
3321         (WebKit::WebPage::immediateActionDidCancel):
3322
3323 2015-04-20  Tim Horton  <timothy_horton@apple.com>
3324
3325         Implement immediate action support for tel: and mailto: URLs
3326         https://bugs.webkit.org/show_bug.cgi?id=143916
3327         <rdar://problem/19721711>
3328
3329         Reviewed by Darin Adler.
3330
3331         * Shared/API/c/WKImmediateActionTypes.h:
3332         * UIProcess/mac/WKImmediateActionController.mm:
3333         (-[WKImmediateActionController _defaultAnimationController]):
3334         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
3335         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
3336         (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
3337         Add _animationControllerForDataDetectedLink and use it when
3338         building immediate actions for tel: and mailto: links.
3339
3340 2015-04-20  Alex Christensen  <achristensen@webkit.org>
3341
3342         Properly report errors from _WKUserContentExtensionStore.
3343         https://bugs.webkit.org/show_bug.cgi?id=143808
3344
3345         Reviewed by Darin Adler.
3346
3347         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
3348         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
3349         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
3350         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
3351
3352 2015-04-18  Simon Fraser  <simon.fraser@apple.com>
3353
3354         REGRESSION (r181656): Animated tiled layers are missing content
3355         https://bugs.webkit.org/show_bug.cgi?id=143911
3356         rdar://problem/20596328
3357
3358         Reviewed by Darin Adler.
3359         
3360         After r181656, all requestAnimationFrame was falling back to timers, and not
3361         using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
3362         fumble.
3363         
3364         Replace this confusing Optional<> code with simpler code that just forces the
3365         clients to make a DisplayRefreshMonitor if they can, first asking
3366         ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
3367         
3368         Make lots of things into references, and use C++11 initialization in some places.
3369
3370         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3371         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
3372         * WebProcess/WebCoreSupport/WebChromeClient.h:
3373
3374 2015-04-18  Dan Bernstein  <mitz@apple.com>
3375
3376         SwipeShadow images are installed on iOS
3377         https://bugs.webkit.org/show_bug.cgi?id=143915
3378
3379         Reviewed by Tim Horton.
3380
3381         * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
3382         EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
3383         individual patterns.
3384         * Resources/SwipeShadow.png: Moved to mac.
3385         * Resources/SwipeShadow@2x.png: Moved to mac.
3386         * Resources/mac: Added.
3387         * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
3388         * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
3389         * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
3390         SwipeShadow*.png into it. Updated for file moves.
3391
3392 2015-04-18  Chris Dumez  <cdumez@apple.com>
3393
3394         Fix NetworkCache Statistics database bootstrapping after r182803
3395         https://bugs.webkit.org/show_bug.cgi?id=143890
3396
3397         Reviewed by Darin Adler.
3398
3399         Update the NetworkCache Statistics database bootstrapping code to use
3400         the records path instead of the version path. Also check that the
3401         filenames in the folder are valid hashes to discard the *-body files.
3402
3403         * NetworkProcess/cache/NetworkCache.cpp:
3404         (WebKit::NetworkCache::Cache::recordsPath):
3405         (WebKit::NetworkCache::Cache::storagePath): Deleted.
3406         * NetworkProcess/cache/NetworkCache.h:
3407         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3408         (WebKit::NetworkCache::Statistics::initialize):
3409         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
3410         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
3411
3412 2015-04-17  Tim Horton  <timothy_horton@apple.com>
3413
3414         Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
3415         https://bugs.webkit.org/show_bug.cgi?id=143901
3416         <rdar://problem/20488655>
3417
3418         Reviewed by Anders Carlsson.
3419
3420         * Platform/IPC/Connection.cpp:
3421         (IPC::Connection::waitForMessage):
3422         InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
3423         a sync message arrives while waiting, but it should also avoid waiting
3424         if there's a sync message already in the queue when the waiting starts,
3425         as that will have the same nasty effect.
3426
3427         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3428         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
3429         If a synchronous message comes in from the Web process while we're waiting,
3430         cancel our synchronous wait for DidUpdateGeometry. This will cause the size
3431         change to not synchronize with the Web process' painting, but that is better
3432         than pointlessly blocking for 500ms.
3433
3434 2015-04-17  Chris Dumez  <cdumez@apple.com>
3435
3436         Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
3437         https://bugs.webkit.org/show_bug.cgi?id=143899
3438         <rdar://problem/20584215>
3439
3440         Reviewed by Anders Carlsson.
3441
3442         WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
3443         check that m_page.corePage() was non-null before dereferencing, thus
3444         causing crashes when it is null.
3445
3446         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
3447         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
3448         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
3449         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
3450
3451 2015-04-17  Yongjun Zhang  <yongjun_zhang@apple.com>
3452
3453         WebKit client should be able to add view controller for link preview.
3454         https://bugs.webkit.org/show_bug.cgi?id=143686
3455
3456         Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
3457         for link preview and react to the dismissal of this view controller. Also connect WKContentView to
3458         preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
3459         in WKUIDelegatePrivate.
3460
3461         Reviewed by Beth Dakin.
3462
3463         * Platform/spi/ios/UIKitSPI.h:
3464         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3465         * UIProcess/ios/WKContentView.mm:
3466         (-[WKContentView willMoveToWindow:]):
3467         * UIProcess/ios/WKContentViewInteraction.h:
3468         * UIProcess/ios/WKContentViewInteraction.mm:
3469         (-[WKContentView cleanupInteraction]):
3470         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
3471         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
3472         (-[WKContentView gestureRecognizerShouldBegin:]):
3473         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
3474         (-[WKContentView commitPreviewViewController:]):
3475         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
3476         (-[WKContentView didDismissPreviewViewController:committing:]):
3477