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