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