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