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