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