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