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