acf5e56af5ef6cf1378c00d0ee711dea57250d47
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-03-27  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Safari clears selection when its window gets activated via mouse down
4         https://bugs.webkit.org/show_bug.cgi?id=143157
5
6         Reviewed by Anders Carlsson.
7
8         The bug was caused by PlatformMouseEvent created in WebKit2 not having its event number
9         even though we were correctly calling setActivationEventNumber in WebPage::acceptsFirstMouse.
10
11         Fixed the bug by storing [NSEvent eventNumber] in WebMouseEvent on Mac in WebKit2 as done in WebKit1.
12
13         * Shared/WebEvent.h:
14         (WebKit::WebMouseEvent::eventNumber):
15         * Shared/WebEventConversion.cpp:
16         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
17         * Shared/WebMouseEvent.cpp:
18         (WebKit::WebMouseEvent::WebMouseEvent):
19         (WebKit::WebMouseEvent::encode):
20         (WebKit::WebMouseEvent::decode):
21         * Shared/mac/WebEventFactory.mm:
22         (WebKit::WebEventFactory::createWebMouseEvent):
23
24 2015-03-27  Anders Carlsson  <andersca@apple.com>
25
26         Only do the Connection::setShouldCloseConnectionOnMachExceptions() hack where necessary
27         https://bugs.webkit.org/show_bug.cgi?id=143141
28         rdar://problem/19471284
29
30         Reviewed by Andreas Kling.
31
32         * Platform/IPC/Connection.h:
33         * Platform/IPC/mac/ConnectionMac.mm:
34         (IPC::Connection::platformInvalidate):
35         (IPC::Connection::platformInitialize):
36         (IPC::Connection::open):
37         * Shared/ChildProcessProxy.cpp:
38         (WebKit::ChildProcessProxy::didFinishLaunching):
39         * UIProcess/Plugins/PluginProcessProxy.cpp:
40         (WebKit::PluginProcessProxy::didFinishLaunching):
41
42 2015-03-27  Tim Horton  <timothy_horton@apple.com>
43
44         Implement iOS WebKit2 PDF Find-in-Page
45         https://bugs.webkit.org/show_bug.cgi?id=143065
46         <rdar://problem/16793370>
47
48         Reviewed by Dan Bernstein.
49
50         * Platform/spi/ios/CorePDFSPI.h:
51         Add some SPI.
52
53         * UIProcess/API/Cocoa/WKWebView.mm:
54         (-[WKWebView _countStringMatches:options:maxCount:]):
55         (-[WKWebView _findString:options:maxCount:]):
56         (-[WKWebView _hideFindUI]):
57         If we have a custom content view, forward find-in-page methods to it.
58         
59         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
60         * UIProcess/API/Cocoa/_WKFindOptions.h:
61         Move _WKFindOptions into its own file.
62
63         * UIProcess/Cocoa/WKWebViewContentProvider.h:
64         Add find-related methods to the WKWebViewContentProvider protocol.
65
66         * UIProcess/ios/WKPDFView.mm:
67         (-[WKPDFView web_initWithFrame:webView:]):
68         (-[WKPDFView dealloc]):
69         Maintain a dispatch queue for searching the PDF.
70
71         (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
72         Fix a type.
73
74         (-[WKPDFView _ensureViewForPage:]):
75         Split the code to create/parent a page view out from _revalidateViews,
76         so that the find code can create/parent the targetted UIPDFPageView
77         in order to install the find highlight in it, but before it is scrolled into view.
78
79         (-[WKPDFView _revalidateViews]):
80         Use the stored page index instead of counting again.
81         Don't unparent page views that have find-in-page highlights in them, because
82         we won't know enough to recreate them later.
83
84         (-[WKPDFView _computePageAndDocumentFrames]):
85         Put the page index in PDFPageInfo, for reference elsewhere.
86
87         (-[WKPDFView _stringCompareOptionsFromWKFindOptions:]):
88         (-[WKPDFView _computeMatchesForString:options:maxCount:completionHandler:]):
89         Asynchronously (and on our serial queue) search the PDF for the given string.
90         We'll cache the most recent results to avoid searching more than once,
91         cancel existing searches when another begins (since it's a serial queue,
92         this ensures we'll only have one search active at a time).
93
94         (-[WKPDFView web_countStringMatches:options:maxCount:]):
95         Count the number of matches for the given string, and inform the FindClient
96         of the result.
97
98         (-[WKPDFView _didFindMatch:]):
99         When we find a match, create a view for it, highlight the match, and
100         zoom so that it's in-view.
101
102         (-[WKPDFView web_findString:options:maxCount:]):
103         Incrementally search the document for the given string. We do an incremental
104         search even if we have all of the results so that we can anchor the search
105         in the right place if the new string is a prefix of the old string, etc.
106         Wrap around appropriately when searching past the beginning or end of the
107         document. If we have all of the results (there were less than maxCount results),
108         look through the cached matches for the incrementally-found result and
109         report its index to the client.
110
111         (-[WKPDFView web_hideFindUI]):
112         Dismiss the selection and clear some state so we start the next search afresh.
113
114         * WebKit2.xcodeproj/project.pbxproj:
115
116 2015-03-27  Andreas Kling  <akling@apple.com>
117
118         WebProcessProxy should not retain WebBackForwardListItems forever.
119         <https://webkit.org/b/143152>
120         <rdar://problem/19925709>
121
122         Reviewed by Anders Carlsson.
123
124         Have WebProcessProxy actually forget about a WebBackForwardListItem after it's removed from
125         the WebBackForwardList.
126
127         This ensures that we don't accumulate too many of these objects, which can get quite large
128         due to the session state encoded in them.
129
130         We already have graceful handling of the case where an incoming IPC message references
131         a removed back/forward list item.
132
133         * UIProcess/WebBackForwardList.cpp:
134         (WebKit::WebBackForwardList::didRemoveItem):
135         * UIProcess/WebPageProxy.cpp:
136         (WebKit::WebPageProxy::backForwardRemovedItem):
137         * UIProcess/WebProcessProxy.cpp:
138         (WebKit::WebProcessProxy::removeBackForwardItem):
139         * UIProcess/WebProcessProxy.h:
140
141 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
142
143         Use the correct timebase to log scrollperf blank pixel counts on iOS
144         https://bugs.webkit.org/show_bug.cgi?id=143149
145
146         Reviewed by Tim Horton.
147         
148         MobileSafari and WebKit need to collect scrollperf data using the same timebase;
149         MobileSafari can't call WTF::monotonicallyIncreasingTime(), so use CFAbsoluteTimeGetCurrent()
150         everywhere.
151
152         * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm:
153         (WebKit::RemoteLayerTreeScrollingPerformanceData::appendBlankPixelCount):
154
155 2015-03-27  Chris Dumez  <cdumez@apple.com>
156
157         [WK2][NetworkCache] Rename requestNeedsRevalidation() to requestRequiresRevalidation()
158         https://bugs.webkit.org/show_bug.cgi?id=143137
159
160         Reviewed by Antti Koivisto.
161
162         Rename requestNeedsRevalidation() to requestRequiresRevalidation() as I
163         think it is more accurate. It is not the request that needs revalidating.
164         The requests just requires us to revalidate the response.
165
166         * NetworkProcess/cache/NetworkCache.cpp:
167         (WebKit::NetworkCache::requestRequiresRevalidation):
168         (WebKit::NetworkCache::canUse):
169         (WebKit::NetworkCache::requestNeedsRevalidation): Deleted.
170
171 2015-03-27  Oliver Hunt  <oliver@apple.com>
172
173         Forward additional CFNetwork ATS information to child processes
174         https://bugs.webkit.org/show_bug.cgi?id=143136
175
176         Reviewed by Anders Carlsson.
177
178         Add additional process creation parameter information, and pass it
179         to the child processes that actually use CFNetwork.
180
181         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
182         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
183         * Shared/Network/NetworkProcessCreationParameters.cpp:
184         (WebKit::NetworkProcessCreationParameters::encode):
185         (WebKit::NetworkProcessCreationParameters::decode):
186         * Shared/Network/NetworkProcessCreationParameters.h:
187         * Shared/Plugins/PluginProcessCreationParameters.cpp:
188         (WebKit::PluginProcessCreationParameters::encode):
189         (WebKit::PluginProcessCreationParameters::decode):
190         * Shared/Plugins/PluginProcessCreationParameters.h:
191         * Shared/WebProcessCreationParameters.cpp:
192         (WebKit::WebProcessCreationParameters::encode):
193         (WebKit::WebProcessCreationParameters::decode):
194         * Shared/WebProcessCreationParameters.h:
195         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
196         (WebKit::WebProcessPool::platformInitializeWebProcess):
197         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
198         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
199         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
200         * WebProcess/cocoa/WebProcessCocoa.mm:
201         (WebKit::WebProcess::platformInitializeWebProcess):
202
203 2015-03-27  Chris Dumez  <cdumez@apple.com>
204
205         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
206         https://bugs.webkit.org/show_bug.cgi?id=143125
207         <rdar://problem/20321172>
208
209         Reviewed by Antti Koivisto.
210
211         We Previously only cached responses with status codes that are cacheable
212         by default [1]. However, RFC 7234 [2] allows us to cache responses with
213         other status codes, as long as they have explicit headers allowing
214         caching:
215         - 'Expires' header field
216         - 'max-age' response directive
217
218         This patch updates our caching policy accordingly to improve efficiency.
219
220         [1] http://tools.ietf.org/html/rfc7231#page-48
221         [2] http://tools.ietf.org/html/rfc7234#section-4.3.2
222
223         Test: http/tests/cache/disk-cache/disk-cache-307-status-code.html
224
225         * NetworkProcess/cache/NetworkCache.cpp:
226         (WebKit::NetworkCache::canStore):
227
228 2015-03-26  Antti Koivisto  <antti@apple.com>
229
230         Respect cache-control directives in request
231         https://bugs.webkit.org/show_bug.cgi?id=143121
232         rdar://problem/19714040
233
234         Reviewed by Chris Dumez.
235
236         Better support for https://tools.ietf.org/html/rfc7234#section-5.2.1
237
238         * NetworkProcess/cache/NetworkCache.cpp:
239         (WebKit::NetworkCache::canUse):
240
241             Consider requests with Cache-control: no-cache and max-age=0 expired.
242
243         (WebKit::NetworkCache::canStore):
244
245             Don't store requests with Cache-control: no-store.
246
247         (WebKit::NetworkCache::Cache::store):
248         * NetworkProcess/cache/NetworkCache.h:
249         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
250         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
251
252 2015-03-25  Jon Honeycutt  <jhoneycutt@apple.com>
253
254         iOS file upload panel menu items need icons
255         <https://bugs.webkit.org/show_bug.cgi?id=143042>
256         <rdar://problem/20178678>
257
258         Reviewed by Andy Estes.
259
260         * Platform/spi/ios/UIKitSPI.h:
261         Declare new SPI methods _UIImageGetWebKitTakePhotoOrVideoIcon and
262         _UIImageGetWebKitPhotoLibraryIcon().
263
264         * UIProcess/ios/forms/WKFileUploadPanel.mm:
265         (photoLibraryIcon):
266         (cameraIcon):
267         If UIKit SPI exists, use it. Otherwise, return nil.
268
269         (-[WKFileUploadPanel _showDocumentPickerMenu]):
270         Use icons.
271
272 2015-03-26  Enrica Casucci  <enrica@apple.com>
273
274         OS X build fix after r182037.
275
276         Unreviewed.
277
278         * UIProcess/API/mac/WKView.mm:
279         (-[WKView _addFontPanelObserver]):
280         (-[WKView removeWindowObservers]):
281         (-[WKView observeValueForKeyPath:ofObject:change:context:]):
282
283 2015-03-26  Enrica Casucci  <enrica@apple.com>
284
285         iOS build fix after r182037.
286
287         Unreviewed.
288
289         * UIProcess/API/Cocoa/WKWebView.mm:
290         (-[WKWebView _setEditable:]):
291
292 2015-03-26  Enrica Casucci  <enrica@apple.com>
293
294         REGRESSION(r1807689): Slower startup time for WKWebView.
295         https://bugs.webkit.org/show_bug.cgi?id=143115
296         rdar://problem/20233711
297
298         Reviewed by Anders Carlsson.
299
300         In http://trac.webkit.org/changeset/180768 we added an observer to
301         track visibility of the NSFontPanel to ensure we could fetch the font
302         information for the current selection when the panel first becomes visible.
303         It turns out that adding the observer requires the shared font panel
304         object to be created.
305         That is apparently a very expensive operation that is regressing
306         the initialization time for the WKWebView.
307         We should initialize the NSFontPanel lazily, only when we make the entire
308         view editable.
309
310         * UIProcess/API/Cocoa/WKWebView.mm:
311         (-[WKWebView _setEditable:]):
312         * UIProcess/API/mac/WKView.mm:
313         (-[WKView addWindowObserversForWindow:]):
314         (-[WKView _addFontPanelObserver]):
315         (-[WKView removeWindowObservers]):
316         (-[WKView observeValueForKeyPath:ofObject:change:context:]):
317         * UIProcess/API/mac/WKViewInternal.h:
318
319 2015-03-26  Alex Christensen  <achristensen@webkit.org>
320
321         Progress towards CMake on Mac.
322         https://bugs.webkit.org/show_bug.cgi?id=143112
323
324         Reviewed by Chris Dumez.
325
326         * CMakeLists.txt:
327         * PlatformMac.cmake:
328         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
329
330 2015-03-26  Chris Dumez  <cdumez@apple.com>
331
332         [WK2][Cocoa] Add private API to override the network disk cache size
333         https://bugs.webkit.org/show_bug.cgi?id=143113
334         <rdar://problem/20315669>
335
336         Reviewed by Antti Koivisto.
337
338         Add private API to let the client override the network disk cache size.
339         By default, the network disk cache is automatically determined based on
340         the CacheModel and the available disk space. However, for testing
341         purposes, it can be used for the client-side to be able to override
342         the disk cache size.
343
344         * NetworkProcess/NetworkProcess.cpp:
345         (WebKit::NetworkProcess::initializeNetworkProcess):
346         * NetworkProcess/NetworkProcess.h:
347         * NetworkProcess/cache/NetworkCache.cpp:
348         (WebKit::NetworkCache::Cache::setMaximumSize):
349         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
350         (WebKit::NetworkProcess::platformSetCacheModel):
351         * Shared/Network/NetworkProcessCreationParameters.cpp:
352         (WebKit::NetworkProcessCreationParameters::encode):
353         (WebKit::NetworkProcessCreationParameters::decode):
354         * Shared/Network/NetworkProcessCreationParameters.h:
355         * UIProcess/API/APIProcessPoolConfiguration.cpp:
356         (API::ProcessPoolConfiguration::copy):
357         * UIProcess/API/APIProcessPoolConfiguration.h:
358         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
359         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
360         (-[_WKProcessPoolConfiguration diskCacheSizeOverride]):
361         (-[_WKProcessPoolConfiguration setDiskCacheSizeOverride:]):
362         * UIProcess/WebProcessPool.cpp:
363         (WebKit::WebProcessPool::WebProcessPool):
364         (WebKit::WebProcessPool::ensureNetworkProcess):
365         * UIProcess/WebProcessPool.h:
366
367 2015-03-26  Andreas Kling  <akling@apple.com>
368
369         [Darwin] Boost the web process QoS level while handling a synchronous IPC message.
370         <https://webkit.org/b/142988>
371         <rdar://problem/20264346>
372
373         Reviewed by Antti Koivisto and Anders Carlsson.
374
375         Add a mechanism for IPC::Connection to boost the main thread for the duration
376         of processing a synchronous message.
377
378         This fixes an issue where the UI process would block on a synchronous request
379         to the web process that was being carried out at a lower QoS level.
380
381         * Platform/IPC/Connection.cpp:
382         (IPC::Connection::Connection): Save the main thread's pthread_t while we have
383         a chance to retreive it.
384
385         (IPC::Connection::processIncomingMessage): Optionally boost the main thread when
386         processing an incoming message with the IsSyncMessage flag set.
387
388         * Platform/IPC/Connection.h:
389         (IPC::Connection::setShouldBoostMainThreadOnSyncMessage): Added. When this mode is
390         enabled, Connection will give a temporary QoS override to the main thread when
391         receiving a synchronous message. Ownership of the override is handed to the
392         MessageDecoder, which resets the main thread QoS in its destructor.
393
394         * Platform/IPC/MessageDecoder.cpp:
395         (IPC::MessageDecoder::~MessageDecoder): Remove any QoS override owned by this message.
396
397         * Platform/IPC/MessageDecoder.h:
398         (IPC::MessageDecoder::setQOSClassOverride): Added. Takes ownership of a QoS override
399         to make sure it stays in effect until this message has been dispatched.
400
401         * WebProcess/WebProcess.cpp:
402         (WebKit::WebProcess::initializeConnection): Set up main thread QoS boosting for the
403         web process's connection to the UI process.
404
405 2015-03-26  Ryosuke Niwa  <rniwa@webkit.org>
406
407         Cursor doesn't change back to pointer when leaving Mail
408         https://bugs.webkit.org/show_bug.cgi?id=132038
409
410         Reviewed by Anders Carlsson.
411
412         Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
413         AppKit will reset the cursor as it leaves the WebView.
414
415         We use nil cursor here since we manually update the cursor by calling [NSCursor set].
416
417         * UIProcess/API/mac/WKView.mm:
418         (-[WKView initWithFrame:processPool:configuration:webView:]):
419         * UIProcess/mac/PageClientImpl.mm:
420         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
421
422 2015-03-26  Michael Catanzaro  <mcatanzaro@igalia.com>
423
424         [Linux] SeccompFilters: improve the port-agnostic whitelist
425         https://bugs.webkit.org/show_bug.cgi?id=140064
426
427         Reviewed by Žan Doberšek.
428
429         Allow the web process to access several files and directories that it
430         was previously prohibited from accessing. This makes the web process
431         much less likely to break.
432
433         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
434         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
435
436 2015-03-26  Antti Koivisto  <antti@apple.com>
437
438         Remove unneeded isConditionalRequest check from NetworkResourceLoader
439         https://bugs.webkit.org/show_bug.cgi?id=143096
440
441         Reviewed by Anders Carlsson.
442
443         This check is leftover from implementation that allowed disk cache to validate conditional
444         request itself. The case can't happen as NetworkCache canRetrieve test does not allow
445         conditional requests in the first place.
446
447         * NetworkProcess/NetworkResourceLoader.cpp:
448         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
449         (WebKit::isConditionalRequest): Deleted.
450
451 2015-03-26  Antti Koivisto  <antti@apple.com>
452
453         Rename Storage::Entry to Storage::Record
454         https://bugs.webkit.org/show_bug.cgi?id=143101
455
456         Reviewed by Chris Dumez.
457
458         Lets have just one type called Entry in the cache code.
459
460         * NetworkProcess/cache/NetworkCache.cpp:
461         (WebKit::NetworkCache::Cache::retrieve):
462         (WebKit::NetworkCache::Cache::store):
463         (WebKit::NetworkCache::Cache::update):
464         (WebKit::NetworkCache::Cache::traverse):
465         (WebKit::NetworkCache::Cache::dumpContentsToFile):
466         * NetworkProcess/cache/NetworkCacheEntry.cpp:
467         (WebKit::NetworkCache::Entry::Entry):
468         (WebKit::NetworkCache::Entry::encodeAsStorageRecord):
469         (WebKit::NetworkCache::Entry::decodeStorageRecord):
470         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
471         (WebKit::NetworkCache::Entry::buffer):
472         (WebKit::NetworkCache::Entry::shareableResourceHandle):
473         (WebKit::NetworkCache::Entry::encode): Deleted.
474         (WebKit::NetworkCache::Entry::decode): Deleted.
475         (WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry): Deleted.
476         * NetworkProcess/cache/NetworkCacheEntry.h:
477         (WebKit::NetworkCache::Entry::sourceStorageRecord):
478         (WebKit::NetworkCache::Entry::sourceStorageEntry): Deleted.
479         * NetworkProcess/cache/NetworkCacheStorage.cpp:
480         (WebKit::NetworkCache::RecordMetaData::RecordMetaData):
481         (WebKit::NetworkCache::decodeRecordMetaData):
482         (WebKit::NetworkCache::decodeRecordHeader):
483         (WebKit::NetworkCache::decodeRecord):
484         (WebKit::NetworkCache::encodeRecordMetaData):
485         (WebKit::NetworkCache::encodeRecordHeader):
486         (WebKit::NetworkCache::Storage::dispatchReadOperation):
487         (WebKit::NetworkCache::retrieveFromMemory):
488         (WebKit::NetworkCache::Storage::store):
489         (WebKit::NetworkCache::Storage::update):
490         (WebKit::NetworkCache::Storage::traverse):
491         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
492         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
493         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
494         (WebKit::NetworkCache::EntryMetaData::EntryMetaData): Deleted.
495         (WebKit::NetworkCache::decodeEntryMetaData): Deleted.
496         (WebKit::NetworkCache::decodeEntryHeader): Deleted.
497         (WebKit::NetworkCache::decodeEntry): Deleted.
498         (WebKit::NetworkCache::encodeEntryMetaData): Deleted.
499         (WebKit::NetworkCache::encodeEntryHeader): Deleted.
500         * NetworkProcess/cache/NetworkCacheStorage.h:
501
502 2015-03-26  Chris Dumez  <cdumez@apple.com>
503
504         [WK2] Let the compiler generate the NetworkCache::Key move constructor
505         https://bugs.webkit.org/show_bug.cgi?id=143079
506
507         Reviewed by Antti Koivisto.
508
509         Let the compiler generate the NetworkCache::Key move constructor. The
510         generated one will do exactly the same thing as the one we had except
511         that it will move the m_hash member as well. I don't see any reason why
512         we weren't moving this member before (it is an std::array<uint8_t, 16>).
513
514         Also have the compiler generate a move assignment operator for
515         consistency. Although it is not currently useful, it could be at some
516         point.
517
518         * NetworkProcess/cache/NetworkCacheKey.cpp:
519         (WebKit::NetworkCache::Key::Key): Deleted.
520         * NetworkProcess/cache/NetworkCacheKey.h:
521
522 2015-03-26  Chris Dumez  <cdumez@apple.com>
523
524         [WK2][NetworkCache] Compute if a cached response has expired only when actually needed
525         https://bugs.webkit.org/show_bug.cgi?id=143070
526
527         Reviewed by Antti Koivisto.
528
529         Compute if a cached response has expired only when actually needed:
530         - This is not a history navigation
531         and
532         - It does not have "Cache-Control: no-cache" header
533
534         Previously, we would always determine if the response has expired and
535         we often end up not using this information.
536
537         * NetworkProcess/cache/NetworkCache.cpp:
538         (WebKit::NetworkCache::responseHasExpired):
539         (WebKit::NetworkCache::canUse):
540
541 2015-03-26  Zan Dobersek  <zdobersek@igalia.com>
542
543         Avoid the Vector<> copy in WebTouchEvent constructor
544         https://bugs.webkit.org/show_bug.cgi?id=143043
545
546         Reviewed by Carlos Garcia Campos.
547
548         Have the WebTouchEvent accept a Vector<> rvalue.
549         The relevant code is updated so the Vector<> object is moved
550         through the call chain and finally into the WebTouchEvent constructor.
551
552         * Shared/NativeWebTouchEvent.h:
553         * Shared/WebEvent.h:
554         * Shared/WebTouchEvent.cpp:
555         (WebKit::WebTouchEvent::WebTouchEvent):
556         * Shared/efl/WebEventFactory.cpp:
557         (WebKit::WebEventFactory::createWebTouchEvent):
558         * Shared/gtk/NativeWebTouchEventGtk.cpp:
559         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
560         * Shared/gtk/WebEventFactory.cpp:
561         (WebKit::WebEventFactory::createWebTouchEvent):
562         * Shared/gtk/WebEventFactory.h:
563         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
564         (webkitWebViewBaseTouchEvent):
565
566 2015-03-25  Chris Dumez  <cdumez@apple.com>
567
568         [WK2] WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always call the FramePolicyFunction
569         https://bugs.webkit.org/show_bug.cgi?id=143036
570         <rdar://problem/20252438>
571         <rdar://problem/13811738>
572
573         Reviewed by Alexey Proskuryakov.
574
575         WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always
576         call the FramePolicyFunction. Previously, it would fail to do in 2
577         cases:
578         - m_frame->page() returns null
579         or
580         - webPage->sendSync() returns false
581
582         If the FramePolicyFunction is not called, we will fail to clear the
583         callback in the PolicyChecker and
584         DocumentLoader::continueAfterContentPolicy() will not be called.
585
586         DocumentLoader::continueAfterContentPolicy() is in charge of resetting
587         m_waitingForContentPolicy flag to false. This could therefore explain
588         the following assertion being hit in DocumentLoader::detachFromFrame()
589         (see <rdar://problem/20252438>):
590         RELEASE_ASSERT(!m_waitingForContentPolicy)
591
592         Also, as the PolicyChecker callback is not cleared, it could make it
593         possible for DocumentLoader::continueAfterContentPolicy() to be called
594         *after* the load is finished, when later canceling the PolicyCallback:
595         FrameLoader::stopAllLoaders()
596          -> PolicyChecker::stopCheck()
597           -> PolicyCallback::cancel()
598            -> DocumentLoader::continueAfterContentPolicy(PolicyIgnore)
599
600         Calling continueAfterContentPolicy(PolicyIgnore) after the load is
601         finished would be bad and could explain some of the crashes we've seen
602         in DocumentLoader::continueAfterContentPolicy() ->
603         DocumentLoader:: stopLoadingForPolicyChange() (see
604         <rdar://problem/13811738>).
605
606         This patch also applies the same fix to
607         dispatchDecidePolicyForNewWindowAction() and
608         dispatchDecidePolicyForNavigationAction() as they use the same pattern.
609
610         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
611         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
612         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
613         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
614
615 2015-03-25  Tim Horton  <timothy_horton@apple.com>
616
617         Add a preference to prevent "user-scalable=no" from having any effect
618         https://bugs.webkit.org/show_bug.cgi?id=143032
619
620         Reviewed by Sam Weinig.
621
622         * Shared/WebPreferencesDefinitions.h:
623         * WebProcess/WebPage/WebPage.cpp:
624         (WebKit::WebPage::updatePreferences):
625         Add a preference and push it to the ViewportConfiguration.
626
627 2015-03-25  Beth Dakin  <bdakin@apple.com>
628
629         REGRESSION (r181660): Force click url preview doesn't have a TextIndicator in Mail
630         https://bugs.webkit.org/show_bug.cgi?id=143064
631         -and corresponding-
632         rdar://problem/20251440
633
634         Reviewed by Tim Horton.
635
636         The TextIndicator was getting set to nil by the call to 
637         _dismissContentRelativeChildWindows in mouseDown. That line of code was added by 
638         http://trac.webkit.org/changeset/177242 to work around a bug in another component 
639         that has now been resolved, so it no longer appears to be necessary. 
640
641         * UIProcess/API/mac/WKView.mm:
642         (-[WKView mouseDown:]):
643
644 2015-03-25  Anders Carlsson  <andersca@apple.com>
645
646         Add network and application cache directories to WebsiteDataStore
647         https://bugs.webkit.org/show_bug.cgi?id=143063
648
649         Reviewed by Sam Weinig.
650
651         Create a WebKit directory under ~/Library/Caches/<Bundle ID> for non-sandboxed applications,
652         and ~/Library/Caches for sandboxed applications. Create NetworkCache and OfflineWebApplicationCache
653         subdirectories. These directories will be used with the modern WebKit API.
654
655         * UIProcess/API/APIWebsiteDataStore.h:
656         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
657         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
658         (API::WebsiteDataStore::defaultDataStoreConfiguration):
659         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
660         (WebKit::WebsiteDataStore::WebsiteDataStore):
661         * UIProcess/WebsiteData/WebsiteDataStore.h:
662
663 2015-03-25  Sam Weinig  <sam@webkit.org>
664
665         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
666
667         * Shared/WebCompiledContentExtension.cpp:
668         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
669         * UIProcess/API/C/WKUserContentFilterRef.cpp:
670         (WKUserContentFilterCreate):
671         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
672         (-[_WKUserContentFilter initWithName:serializedRules:]):
673
674 2015-03-25  Sam Weinig  <sam@webkit.org>
675
676         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
677         https://bugs.webkit.org/show_bug.cgi?id=143059
678
679         Reviewed by Alex Christensen.
680
681         * Shared/WebCompiledContentExtension.cpp:
682         * Shared/WebCompiledContentExtension.h:
683         (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient):
684         (WebKit::LegacyContentExtensionCompilationClient::writeBytecode):
685         (WebKit::LegacyContentExtensionCompilationClient::writeActions):
686         Add subclass of ContentExtensionCompilationClient for use with the non-file backed content
687         extensions.
688
689         * UIProcess/API/C/WKUserContentFilterRef.cpp:
690         (WKUserContentFilterCreate):
691         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
692         (-[_WKUserContentFilter initWithName:serializedRules:]):
693         Update to use the new interface of compileRuleList().
694
695 2015-03-25  Ryosuke Niwa  <rniwa@webkit.org>
696
697         Web Inspector: Switching tabs to window with inspector open prohibits typing into console
698         https://bugs.webkit.org/show_bug.cgi?id=126800
699
700         Reviewed by Anders Carlsson.
701
702         This is a regression from r85356 and r83814. These two patches made WKWebView clear its selection
703         when WKView resigns the first responder without ever restoring it even if WKView later becomes
704         the first responder again. This is problematic when a text field or a editing host element had been
705         focused and selected prior to the resignation since the editing code uses the selection to determine
706         the editability of the element.
707
708         Fixed the bug by restoring selection in [WKView becomeFirstResponder] if the selection is empty.
709
710         * UIProcess/API/mac/WKView.mm:
711         (-[WKView becomeFirstResponder]):
712         * UIProcess/WebPageProxy.cpp:
713         (WebKit::WebPageProxy::restoreSelectionInFocusedEditableElement):
714         * UIProcess/WebPageProxy.h:
715         * WebProcess/WebPage/WebPage.cpp:
716         (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
717         * WebProcess/WebPage/WebPage.h:
718         * WebProcess/WebPage/WebPage.messages.in:
719
720 2015-03-25  Beth Dakin  <bdakin@apple.com>
721
722         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
723         force preview
724         https://bugs.webkit.org/show_bug.cgi?id=143057
725         -and corresponding-
726         rdar://problem/20251436
727
728         Reviewed by Tim Horton.
729
730         Always call _page->immediateActionDidUpdate() so that the EventHandler’s 
731         ImmediateActionStage is appropriately updated.
732         * UIProcess/mac/WKImmediateActionController.mm:
733         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
734
735         Update the EventHandler’s ImmediateActionStage.
736         * WebProcess/WebPage/mac/WebPageMac.mm:
737         (WebKit::WebPage::immediateActionDidUpdate):
738
739 2015-03-25  Antti Koivisto  <antti@apple.com>
740
741         Separate entry decoding from validation
742         https://bugs.webkit.org/show_bug.cgi?id=143052
743
744         Reviewed by Chris Dumez.
745
746         Make NetworkCache::Cache a class and move it to a file of its own.
747         Move the encoding/decoding code there.
748
749         * NetworkProcess/NetworkProcess.cpp:
750         (WebKit::fetchDiskCacheEntries):
751         (WebKit::clearDiskCacheEntries):
752         * NetworkProcess/NetworkResourceLoader.cpp:
753         (WebKit::sendReplyToSynchronousRequest):
754         (WebKit::NetworkResourceLoader::start):
755         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
756         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
757         (WebKit::NetworkResourceLoader::validateCacheEntry):
758         * NetworkProcess/NetworkResourceLoader.h:
759         * NetworkProcess/cache/NetworkCache.cpp:
760         (WebKit::NetworkCache::collectVaryingRequestHeaders):
761         (WebKit::NetworkCache::canUse):
762
763             Focused function for deciding if we can use a cache entry and if it needs validation.
764
765         (WebKit::NetworkCache::Cache::retrieve):
766         (WebKit::NetworkCache::Cache::store):
767         (WebKit::NetworkCache::Cache::update):
768         (WebKit::NetworkCache::Cache::traverse):
769         (WebKit::NetworkCache::encodeStorageEntry): Deleted.
770         (WebKit::NetworkCache::decodeStorageEntry): Deleted.
771         * NetworkProcess/cache/NetworkCache.h:
772         * NetworkProcess/cache/NetworkCacheEntry.cpp: Added.
773         (WebKit::NetworkCache::Entry::Entry):
774         (WebKit::NetworkCache::Entry::encode):
775         (WebKit::NetworkCache::Entry::decode):
776         (WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry):
777         (WebKit::NetworkCache::Entry::buffer):
778         (WebKit::NetworkCache::Entry::shareableResourceHandle):
779         (WebKit::NetworkCache::Entry::needsValidation):
780         (WebKit::NetworkCache::Entry::setNeedsValidation):
781         * NetworkProcess/cache/NetworkCacheEntry.h: Added.
782         (WebKit::NetworkCache::Entry::key):
783         (WebKit::NetworkCache::Entry::timeStamp):
784         (WebKit::NetworkCache::Entry::response):
785         (WebKit::NetworkCache::Entry::varyingRequestHeaders):
786         (WebKit::NetworkCache::Entry::sourceStorageEntry):
787         * NetworkProcess/cache/NetworkCacheStatistics.h:
788         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
789         (WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
790         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
791         * WebKit2.xcodeproj/project.pbxproj:
792
793 2015-03-25  David Hyatt  <hyatt@apple.com>
794
795         Add a pref to enable the new block-inside-inline model
796         https://bugs.webkit.org/show_bug.cgi?id=143050
797
798         Reviewed by Sam Weinig.
799
800         * Shared/WebPreferencesDefinitions.h:
801         * UIProcess/API/C/WKPreferences.cpp:
802         (WKPreferencesSetNewBlockInsideInlineModelEnabled):
803         (WKPreferencesGetNewBlockInsideInlineModelEnabled):
804         * UIProcess/API/C/WKPreferencesRefPrivate.h:
805         * WebProcess/WebPage/WebPage.cpp:
806         (WebKit::WebPage::updatePreferences):
807
808 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
809
810         [WK2] WebUserMediaClient::pageDestroyed() virtual method should be marked as override
811         https://bugs.webkit.org/show_bug.cgi?id=143046
812
813         Reviewed by Carlos Garcia Campos.
814
815         * WebProcess/WebCoreSupport/WebUserMediaClient.h: Mark the WebUserMediaClient::pageDestroyed()
816         method, inherited from the WebCore::UserMediaClient, as an override.
817
818 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
819
820         [GTK][WK2] WebPageProxy::failedToShowPopupMenu() virtual method should be marked as override
821         https://bugs.webkit.org/show_bug.cgi?id=143045
822
823         Reviewed by Carlos Garcia Campos.
824
825         * UIProcess/WebPageProxy.h: Mark the failedToShowPopupMenu(), inherited from
826         the WebPopupMenuProxy::Client class, as overridden.
827
828 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
829
830         [WK2] Clean up DrawingAreaImpl vtable overrides
831         https://bugs.webkit.org/show_bug.cgi?id=143044
832
833         Reviewed by Carlos Garcia Campos.
834
835         Declare virtual methods of the DrawingAreaImpl class as overridden where necessary.
836
837         * WebProcess/WebPage/DrawingAreaImpl.h:
838         (WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Deleted.
839         (WebKit::DrawingAreaImpl::layerTreeHost): Deleted.
840
841 2015-03-24  Ryosuke Niwa  <rniwa@webkit.org>
842
843         Inspector doesn't get focused when opened in dock mode
844         https://bugs.webkit.org/show_bug.cgi?id=143030
845
846         Reviewed by Anders Carlsson.
847
848         The bug was caused by platformBringToFront and platformAttach calling makeFirstResponder on WKWebView,
849         which aren't intended to become the first responder. Fixed the bug by calling makeFirstResponder on the WKView
850         subview of the WKWebView, which is intended to be used as the first responder on behalf of the web view.
851
852         * UIProcess/mac/WebInspectorProxyMac.mm:
853         (WebKit::WebInspectorProxy::platformBringToFront):
854         (WebKit::WebInspectorProxy::platformAttach):
855
856 2015-03-24  Chris Dumez  <cdumez@apple.com>
857
858         [WK2] Responses with 302 HTTP Status Code should not be cached
859         https://bugs.webkit.org/show_bug.cgi?id=143028
860         <rdar://problem/19714040>
861
862         Reviewed by Antti Koivisto.
863
864         Responses with 302 HTTP Status Code should not be cached as per
865         RFC 7231:
866         http://tools.ietf.org/html/rfc7231#section-6.1
867
868         This patch updates our disk cache policy accordingly.
869
870         Test: http/tests/cache/disk-cache/disk-cache-302-status-code.html
871
872         * NetworkProcess/cache/NetworkCache.cpp:
873         (WebKit::NetworkCache::canStore):
874
875 2015-03-24  Anders Carlsson  <andersca@apple.com>
876
877         Fix crash in WebKit::RemoteObjectRegistry::sendInvocation
878         https://bugs.webkit.org/show_bug.cgi?id=143027
879         rdar://problem/20208674
880
881         Reviewed by Sam Weinig.
882
883         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
884         (-[WKWebProcessPlugInBrowserContextController dealloc]):
885         Make sure to invalidate the _WKRemoteObjectRegistry like we do in the UI process.
886
887 2015-03-24  Chris Dumez  <cdumez@apple.com>
888
889         [WK2] Responses with 204 HTTP Status Code should be cacheable by default
890         https://bugs.webkit.org/show_bug.cgi?id=143020
891         <rdar://problem/20281529>
892
893         Reviewed by Antti Koivisto.
894
895         Make responses with 204 HTTP Status Code cacheable by default, as
896         per RFC 7231:
897         http://tools.ietf.org/html/rfc7231#section-6.3.5
898
899         Test: http/tests/cache/disk-cache/disk-cache-204-status-code.html
900
901         * NetworkProcess/cache/NetworkCache.cpp:
902         (WebKit::NetworkCache::canStore):
903
904 2015-03-24  Enrica Casucci  <enrica@apple.com>
905
906         [iOS] Remove unused keyboard code in WKSelectPopover class.
907         https://bugs.webkit.org/show_bug.cgi?id=143021
908
909         Reviewed by Joseph Pecoraro.
910
911         WKSelectPopover created an instance of UIKeyboard that was
912         initialized in initWithView but never used. Removing the
913         obsolete code.
914
915         * UIProcess/ios/forms/WKFormSelectPopover.mm:
916         (-[WKSelectPopover initWithView:hasGroups:]):
917
918 2015-03-24  Dan Bernstein  <mitz@apple.com>
919
920         WebKit2 part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
921         https://bugs.webkit.org/show_bug.cgi?id=143023
922
923         Reviewed by Tim Horton.
924
925         * UIProcess/API/Cocoa/WKWebView.mm:
926         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): If the view is in a
927         window, use CARenderServerRenderLayerWithTransform to synchronously capture a snapshot of
928         its layer tree into an IOSurfcae, then call the completion handler with an image created
929         from the IOSurface.
930
931 2015-03-24  Beth Dakin  <bdakin@apple.com>
932
933         Add events related to force click gesture
934         https://bugs.webkit.org/show_bug.cgi?id=142836
935         -and corresponding-
936         rdar://problem/20210239
937
938         Reviewed by Dean Jackson.
939
940         ActionMenuHitTestResult has a new bool indicating whether to not the HitTestResult 
941         will prevent default. 
942         * Shared/mac/ActionMenuHitTestResult.h:
943         * Shared/mac/ActionMenuHitTestResult.mm:
944         (WebKit::ActionMenuHitTestResult::encode):
945         (WebKit::ActionMenuHitTestResult::decode):
946
947         Send immediateActionDidUpdate and the normalized force over the the WebProcess.
948         * UIProcess/WebPageProxy.cpp:
949         (WebKit::WebPageProxy::immediateActionDidUpdate):
950         * UIProcess/WebPageProxy.h:
951
952         We need a dummy animation controller when web content is overriding the default 
953         behavior.
954         * UIProcess/mac/WKImmediateActionController.mm:
955
956         Send along the update information.
957         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
958
959         Use the dummy animation controller if default has been prevented.
960         (-[WKImmediateActionController _defaultAnimationController]):
961         (-[WKImmediateActionController _updateImmediateActionItem]):
962
963         Keep track of whether m_lastActionMenuHitTes prevented the default immediate 
964         action behavior.
965         * WebProcess/WebPage/WebPage.cpp:
966         (WebKit::WebPage::WebPage):
967         * WebProcess/WebPage/WebPage.h:
968         * WebProcess/WebPage/WebPage.messages.in:
969
970         Call dispatchMouseForceMayBegin() at hit test time.
971         * WebProcess/WebPage/mac/WebPageMac.mm:
972         (WebKit::WebPage::performActionMenuHitTestAtLocation):
973
974         Call dispatchMouseForceChanged() if appropriate.
975         (WebKit::WebPage::immediateActionDidUpdate):
976
977         Call dispatchMouseForceCancelled() if appropriate.
978         (WebKit::WebPage::immediateActionDidCancel):
979
980         Call dispatchMouseForceDown() if appropriate.
981         (WebKit::WebPage::immediateActionDidComplete):
982
983 2015-03-24  Anders Carlsson  <andersca@apple.com>
984
985         Fix designated initializer violations
986         https://bugs.webkit.org/show_bug.cgi?id=143016
987         rdar://problem/20268858
988
989         Reviewed by Dan Bernstein.
990
991         Move -[WKProcessPool _initWithConfiguration:] to a class extension so we can make it the designated initializer.
992
993         * UIProcess/API/Cocoa/WKProcessPool.mm:
994         (-[WKProcessPool _initWithConfiguration:]):
995         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
996
997 2015-03-24  Chris Dumez  <cdumez@apple.com>
998
999         [WK2] Responses with 404 HTTP Status Code should be cacheable by default
1000         https://bugs.webkit.org/show_bug.cgi?id=143014
1001         <rdar://problem/20280310>
1002
1003         Reviewed by Antti Koivisto.
1004
1005         Make responses with 404 HTTP Status Code cacheable by default, as
1006         per RFC 7231:
1007         http://tools.ietf.org/html/rfc7231#section-6.5.4
1008
1009         Test: http/tests/cache/disk-cache/disk-cache-404-status-code.html
1010
1011         * NetworkProcess/cache/NetworkCache.cpp:
1012         (WebKit::NetworkCache::canStore):
1013
1014 2015-03-24  Chris Dumez  <cdumez@apple.com>
1015
1016         [WK2] Remove NetworkCache FIXME comment about caching responses to OPTIONS requests
1017         https://bugs.webkit.org/show_bug.cgi?id=143009
1018
1019         Reviewed by Andreas Kling.
1020
1021         Remove NetworkCache FIXME comment about caching responses to OPTIONS
1022         method as RFC 7234 says "Responses to the OPTIONS method are not
1023         cacheable" [1].
1024
1025         [1] http://tools.ietf.org/html/rfc7231#page-31
1026
1027         * NetworkProcess/cache/NetworkCache.cpp:
1028         (WebKit::NetworkCache::canRetrieve):
1029
1030 2015-03-24  Chris Dumez  <cdumez@apple.com>
1031
1032         [WK2] NetworkCache retrievals fail for entries with no body
1033         https://bugs.webkit.org/show_bug.cgi?id=142979
1034         <rdar://problem/20264100>
1035
1036         Reviewed by Antti Koivisto.
1037
1038         NetworkCache retrievals were failing for entries with no body because
1039         decodeEntry() doesn't correctly handle this case. In particular, the
1040         following check fails:
1041         "metaData.bodyOffset + metaData.bodySize == fileData.size()".
1042         This is because bodyOffset is pageSize-aligned.
1043
1044         As a result, the following resource on apple.com is stored in the cache
1045         but we fail to reuse it and reload it from the network every time:
1046         http://images.apple.com/home/styles/promos.css
1047
1048         This patch updates decodeEntry() to create a null Data object for the
1049         body if bodySize is 0.
1050
1051         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
1052         (WebKit::NetworkCache::Data::data):
1053         Do not attempt to initialize m_data if m_dispatchData is null as the
1054         call to dispatch_data_create_map() would then crash. We now return
1055         null in this case. This is needed as decodeStorageEntry() in
1056         NetworkCache.cpp constructs a SharedBuffer from
1057         storageEntry.body.data() and the body may be null.
1058
1059         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1060         (WebKit::NetworkCache::decodeEntry):
1061
1062 2015-03-24  Chris Dumez  <cdumez@apple.com>
1063
1064         [WK2] The WebKit network cache does not cache responses with "Content-Disposition: attachment" header
1065         https://bugs.webkit.org/show_bug.cgi?id=142989
1066         <rdar://problem/20265992>
1067
1068         Reviewed by Antti Koivisto.
1069
1070         Update our WebKit network cache policy to cache responses with
1071         "Content-Disposition: attachment" header. There is no reason we cannot
1072         cache these and our memory cache already does.
1073
1074         This was causing a decent amount of cache misses in the wild. I have
1075         noticed for example that when loading disney.com, we fail to cache the
1076         following resources because of this policy:
1077         http://pagead2.googlesyndication.com/pagead/osd.js
1078         http://pagead2.googlesyndication.com/pagead/show_companion_ad.js
1079
1080         Those resources have Cache-Control headers that indicate they are meant
1081         to be cacheable.
1082
1083         Test: http/tests/cache/disk-cache-validation-attachment.html
1084
1085         * NetworkProcess/cache/NetworkCache.cpp:
1086         (WebKit::NetworkCache::canStore):
1087
1088 2015-03-23  Joseph Pecoraro  <pecoraro@apple.com>
1089
1090         Unreviewed, another attempt to fix 32-bit build after r181881.
1091
1092         * UIProcess/WebInspectorProxy.h:
1093
1094 2015-03-23  Joseph Pecoraro  <pecoraro@apple.com>
1095
1096         Unreviewed, attempt to fix 32-bit build after r181881.
1097
1098         * UIProcess/API/Cocoa/WKViewPrivate.h:
1099         * UIProcess/API/mac/WKView.mm:
1100
1101 2015-03-19  Timothy Hatcher  <timothy@apple.com>
1102
1103         Web Inspector: Support attaching to another view other than the WKView
1104         https://bugs.webkit.org/show_bug.cgi?id=142892
1105
1106         Reviewed by Tim Horton.
1107
1108         * UIProcess/API/C/WKInspector.cpp:
1109         (WKInspectorAttach): Drive by fix so it used the last attachment side.
1110
1111         * UIProcess/API/Cocoa/WKViewPrivate.h:
1112         * UIProcess/API/mac/WKView.mm:
1113         (-[WKView _inspectorAttachmentView]): Added.
1114         (-[WKView _setInspectorAttachmentView:]): Added.
1115
1116         * UIProcess/WebInspectorProxy.cpp:
1117         (WebKit::WebInspectorProxy::createInspectorPage):
1118         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
1119         Use platformCanAttach as a final check incase there is a different
1120         attachment view that the platform knows about.
1121
1122         * UIProcess/WebInspectorProxy.h:
1123         (WebKit::WebInspectorProxy::attachmentSide): Added.
1124         (WebKit::WebInspectorProxy::platformCanAttach): Added.
1125
1126         * UIProcess/mac/WebInspectorProxyMac.mm:
1127         (WebKit::WebInspectorProxy::attachmentViewDidChange): Added.
1128         (WebKit::WebInspectorProxy::closeTimerFired):
1129         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1130         (WebKit::WebInspectorProxy::platformCanAttach):
1131         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1132         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
1133         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
1134         (WebKit::WebInspectorProxy::platformAttach):
1135         (WebKit::WebInspectorProxy::platformDetach):
1136         Use the _inspectorAttachmentView and change how the frame change notification
1137         is observed and follow the attachment view as it changes.
1138
1139 2015-03-23  Tim Horton  <timothy_horton@apple.com>
1140
1141         Images shared to photos via action menu are padded with zeroes at the end
1142         https://bugs.webkit.org/show_bug.cgi?id=142985
1143
1144         Reviewed by Anders Carlsson.
1145
1146         * Shared/mac/ActionMenuHitTestResult.h:
1147         * Shared/mac/ActionMenuHitTestResult.mm:
1148         (WebKit::ActionMenuHitTestResult::encode):
1149         (WebKit::ActionMenuHitTestResult::decode):
1150         * WebProcess/WebPage/mac/WebPageMac.mm:
1151         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1152         Send the size of the image separately from the SharedMemory.
1153         The SharedMemory's size can be rounded up, so we need to keep the original
1154         size around in order to write the data to disk.
1155
1156         * UIProcess/mac/WKActionMenuController.mm:
1157         (-[WKActionMenuController _hitTestResultImage]):
1158         (-[WKActionMenuController _addImageToPhotos:]):
1159         Use the image size instead of the SharedMemory size.
1160
1161 2015-03-23  Enrica Casucci  <enrica@apple.com>
1162
1163         [iOS] WebContent crash attempting to select text with a gesture at RenderObject::absoluteBoundingBoxRect.
1164         https://bugs.webkit.org/show_bug.cgi?id=142913
1165         rdar://problem/16400033
1166
1167         Reviewed by Sam Weinig.
1168
1169         When looking for the best candidate range at the given position,
1170         we should skip nodes that don't have a renderer.
1171         This is a speculative fix.
1172
1173         * WebProcess/WebPage/ios/WebPageIOS.mm:
1174         (WebKit::WebPage::rangeForWebSelectionAtPosition):
1175
1176 2015-03-23  Alexey Proskuryakov  <ap@apple.com>
1177
1178         REGRESSION (Yosemite): WKView visibility notifications are messed up
1179         https://bugs.webkit.org/show_bug.cgi?id=142945
1180
1181         Reviewed by Tim Horton.
1182
1183         As these notifications cannot be used by NSView subclasses, create a separate
1184         object for observing them.
1185
1186         * UIProcess/API/mac/WKView.mm:
1187         (-[WKWindowVisibilityObserver initWithView:]):
1188         (-[WKWindowVisibilityObserver startObserving:]):
1189         (-[WKWindowVisibilityObserver stopObserving:]):
1190         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
1191         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
1192         (-[WKView addWindowObserversForWindow:]):
1193         (-[WKView removeWindowObservers]): Also, don't try to remove NSWindowWillOrderOffScreenNotification,
1194         which we never start to observe.
1195         (-[WKView initWithFrame:processPool:configuration:webView:]):
1196         * UIProcess/API/mac/WKViewInternal.h:
1197
1198 2015-03-23  Anders Carlsson  <andersca@apple.com>
1199
1200         Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again.
1201         https://bugs.webkit.org/show_bug.cgi?id=133692
1202         rdar://problem/17255947
1203
1204         Reviewed by Alexey Proskuryakov.
1205
1206         Add plug-in destruction protectors around message receiver code that can call out to NPObjects or JavaScript
1207         where we need the plug-in to stay around after the call.
1208
1209         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1210         (WebKit::NPObjectMessageReceiver::invoke):
1211         (WebKit::NPObjectMessageReceiver::invokeDefault):
1212         (WebKit::NPObjectMessageReceiver::getProperty):
1213         (WebKit::NPObjectMessageReceiver::setProperty):
1214         (WebKit::NPObjectMessageReceiver::construct):
1215
1216 2015-03-23  Anders Carlsson  <andersca@apple.com>
1217
1218         Put the WK_NULLABLE_SPECIFIER in the right place for block parameters
1219         https://bugs.webkit.org/show_bug.cgi?id=142975
1220         rdar://problem/19863930
1221
1222         Reviewed by Dan Bernstein.
1223
1224         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1225         * UIProcess/API/Cocoa/WKUIDelegate.h:
1226         * UIProcess/API/Cocoa/WKWebView.h:
1227
1228 2015-03-23  Tim Horton  <timothy_horton@apple.com>
1229
1230         Add a share item to the link action menu
1231         https://bugs.webkit.org/show_bug.cgi?id=142961
1232         <rdar://problem/19198374>
1233
1234         Reviewed by Beth Dakin.
1235
1236         * UIProcess/mac/WKActionMenuController.mm:
1237         (-[WKActionMenuController _hitLinkURL]):
1238         Factor out _hitLinkURL from various places.
1239
1240         (-[WKActionMenuController _openURLFromActionMenu:]):
1241         (-[WKActionMenuController _addToReadingListFromActionMenu:]):
1242         (-[WKActionMenuController _defaultMenuItemsForVideo]):
1243         (-[WKActionMenuController _defaultMenuItemsForImage]):
1244         (-[WKActionMenuController _createActionMenuItemForTag:]):
1245         (-[WKActionMenuController _createShareActionMenuItemForTag:withItems:]):
1246         Adopt -[NSMenuItem standardShareMenuItemWithItems].
1247         All of the null-checking is unnecessary as it's impossible to enter
1248         these functions with a null image/etc.
1249
1250         (-[WKActionMenuController _defaultMenuItemsForLink]):
1251         * Shared/API/c/WKActionMenuItemTypes.h:
1252         Add a 'Share' item to the link menu.
1253
1254 2015-03-23  Zan Dobersek  <zdobersek@igalia.com>
1255
1256         [GTK] Use std::abs() in ClickCounter::currentClickCountForGdkButtonEvent()
1257         https://bugs.webkit.org/show_bug.cgi?id=142964
1258
1259         Reviewed by Carlos Garcia Campos.
1260
1261         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1262         (ClickCounter::currentClickCountForGdkButtonEvent): Use the STL's std::abs()
1263         instead of C's abs(). The templated nature of std::abs() ensures the proper
1264         computation that matches the types of the passed-in values, and shuts down
1265         a warning when compiling with Clang.
1266
1267 2015-03-23  Zan Dobersek  <zdobersek@igalia.com>
1268
1269         [GTK][WK2] webkitBackForwardListChanged() should operate on a Vector reference
1270         https://bugs.webkit.org/show_bug.cgi?id=142963
1271
1272         Reviewed by Carlos Garcia Campos.
1273
1274         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1275         (webkitBackForwardListChanged): This function only reads from the passed-in
1276         Vector of removed items, so only a const lvalue reference to the Vector
1277         is needed.
1278         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
1279
1280 2015-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1281
1282         [GTK] Add a configure option to build without Redirected XComposite Window
1283         https://bugs.webkit.org/show_bug.cgi?id=142865
1284
1285         Reviewed by Žan Doberšek.
1286
1287         Use USE(REDIRECTED_XCOMPOSITE_WINDOW) instead of
1288         USE(TEXTURE_MAPPER_GL) && PLATFORM(X11).
1289
1290         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1291         (webkitWebViewBaseRealize): Use the XID of the WebKitWebView
1292         window as native surface handle when REDIRECTED_XCOMPOSITE_WINDOW
1293         is disabled.
1294         (webkitWebViewRenderAcceleratedCompositingResults):
1295         (resizeWebKitWebViewBaseFromAllocation):
1296         (webkitWebViewBaseEnterAcceleratedCompositingMode):
1297         (webkitWebViewBaseExitAcceleratedCompositingMode):
1298         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
1299         * UIProcess/gtk/RedirectedXCompositeWindow.h:
1300
1301 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
1302
1303         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
1304         https://bugs.webkit.org/show_bug.cgi?id=142940
1305
1306         Reviewed by Sam Weinig.
1307
1308         * WebProcess/WebPage/mac/WebPageMac.mm:
1309         (WebKit::WebPage::playbackTargetSelected): Argument to didChoosePlaybackTarget is now const.
1310
1311 2015-03-22  Anders Carlsson  <andersca@apple.com>
1312
1313         _WKWebsiteDataStore should clear WebSQL databases
1314         https://bugs.webkit.org/show_bug.cgi?id=142947
1315         rdar://problem/20242174
1316
1317         Reviewed by Sam Weinig.
1318
1319         * Shared/WebsiteData/WebsiteDataTypes.h:
1320         Add WebsiteDataTypeWebSQLDatabases.
1321
1322         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1323         (API::WebsiteDataStore::defaultDataStoreConfiguration):
1324         Initialize configuration.webSQLDatabaseDirectory.
1325
1326         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
1327         Add WKWebsiteDataTypeWebSQLDatabases.
1328
1329         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
1330         (dataTypesToString):
1331         Handle WKWebsiteDataTypeWebSQLDatabases.
1332
1333         * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
1334         (WebKit::toWebsiteDataTypes):
1335         (WebKit::toWKWebsiteDataTypes):
1336         Handle WKWebsiteDataTypeWebSQLDatabases and WebsiteDataTypes::WebsiteDataTypeWebSQLDatabases.
1337
1338         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1339         (WebKit::WebsiteDataStore::WebsiteDataStore):
1340         Initialize m_webSQLDatabaseDirectory and add a queue member variable.
1341
1342         (WebKit::WebsiteDataStore::fetchData):
1343         Fetch database origins.
1344     
1345         (WebKit::WebsiteDataStore::removeData):
1346         Remove databases.
1347
1348         * UIProcess/WebsiteData/WebsiteDataStore.h:
1349         Add new members.
1350
1351 2015-03-22  Dan Bernstein  <mitz@apple.com>
1352
1353         [iOS] Expose WebPageProxy::setInitialFocus as SPI
1354         https://bugs.webkit.org/show_bug.cgi?id=142951
1355
1356         Reviewed by Anders Carlsson.
1357
1358         * UIProcess/API/Cocoa/WKWebView.mm:
1359         (-[WKWebView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): New SPI.
1360         Just calls through to WKWebContentView, but allows a nil completion handler.
1361         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1362
1363         * UIProcess/API/mac/WKView.mm:
1364         (-[WKView becomeFirstResponder]): Pass an empty lambda for the new callback parameter to
1365         WebPageProxy::setInitialFocus.
1366
1367         * UIProcess/WebPageProxy.cpp:
1368         (WebKit::WebPageProxy::setInitialFocus): Added a void callback parameter and made sure to
1369         call it.
1370         * UIProcess/WebPageProxy.h:
1371
1372         * UIProcess/ios/WKContentViewInteraction.h:
1373         * UIProcess/ios/WKContentViewInteraction.mm:
1374         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1375         Added. Calls WebPageProxy::setInitialFocus, and once that completes, checks if anything was
1376         focused and if so, becomes first responder, then calls the completion handler.
1377
1378         * WebProcess/WebPage/WebPage.cpp:
1379         (WebKit::WebPage::setInitialFocus): Added a callbackID parameter, and made sure to send the
1380         callback message. Added a temporary change of m_userIsInteracting to true, so that the UI
1381         process won’t ignore any StartAssistingNode message resulting from the focus change.
1382         * WebProcess/WebPage/WebPage.h:
1383
1384         * WebProcess/WebPage/WebPage.messages.in: Added a callbackID parameter to SetInitialFocus.
1385
1386 2015-03-21  Dean Jackson  <dino@apple.com>
1387
1388         Remove the prefix for CSS Transforms
1389         https://bugs.webkit.org/show_bug.cgi?id=142927
1390         <rdar://problem/11568151>
1391
1392         Reviewed by Simon Fraser.
1393
1394         Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.
1395
1396         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1397         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
1398
1399 2015-03-21  Csaba Osztrogonác  <ossy@webkit.org>
1400
1401         [EFL][GTK] Make WebKit2's generate-forwarding-headers.pl less verbose
1402         https://bugs.webkit.org/show_bug.cgi?id=142908
1403
1404         Reviewed by Žan Doberšek.
1405
1406         * Scripts/generate-forwarding-headers.pl:
1407         (createForwardingHeadersForFramework):
1408
1409 2015-03-21  Commit Queue  <commit-queue@webkit.org>
1410
1411         Unreviewed, rolling out r181824.
1412         https://bugs.webkit.org/show_bug.cgi?id=142935
1413
1414         Broke Windows build (Requested by ap on #webkit).
1415
1416         Reverted changeset:
1417
1418         "Remove the prefix for CSS Transforms"
1419         https://bugs.webkit.org/show_bug.cgi?id=142927
1420         http://trac.webkit.org/changeset/181824
1421
1422 2015-03-20  Dean Jackson  <dino@apple.com>
1423
1424         Remove the prefix for CSS Transforms
1425         https://bugs.webkit.org/show_bug.cgi?id=142927
1426         <rdar://problem/11568151>
1427
1428         Reviewed by Simon Fraser.
1429
1430         Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.
1431
1432         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1433         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
1434
1435 2015-03-20  Chris Dumez  <cdumez@apple.com>
1436
1437         [WK2] NetworkCache retrievals sometimes fail on browser startup
1438         https://bugs.webkit.org/show_bug.cgi?id=142925
1439         <rdar://problem/20245368>
1440
1441         Reviewed by Antti Koivisto.
1442
1443         NetworkCache retrievals sometimes fail on browser startup for resources
1444         that are actually cached. The reason is that we are using a bloom filter
1445         for performance reasons to avoid unnecessary disk I/O and this bloom
1446         filter is populated on start up in a background thread by traversing the
1447         cache files on disk. However, when restoring the tabs on start-up we
1448         sometimes query this bloom filter before it is completely populated and
1449         we thus fail to retrieve cached entries because we think they don't
1450         exist and don't check the disk.
1451
1452         This patch adds an "isPopulatingContentsFilter" flag that is turned ON
1453         on start up while we are populating the bloon filter. We then bypass
1454         the bloom filter and send queries directly to disk on start up if this
1455         flag is ON.
1456
1457         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1458         (WebKit::NetworkCache::Storage::initialize):
1459         (WebKit::NetworkCache::Storage::retrieve):
1460         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
1461         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
1462         * NetworkProcess/cache/NetworkCacheStorage.h:
1463         (WebKit::NetworkCache::Storage::cacheMayContain):
1464
1465 2015-03-20  Chris Dumez  <cdumez@apple.com>
1466
1467         [WK2] Allow stale content when restoring the browser's session state
1468         https://bugs.webkit.org/show_bug.cgi?id=142916
1469         <rdar://problem/20243493>
1470
1471         Reviewed by Darin Adler.
1472
1473         Allow stale content when restoring the browser's session state
1474         (restoring all tabs from previous session), e.g.
1475         - Via History > Reopen All windows from previous session on Safari
1476         - Happens on startup for MobileSafari
1477
1478         I have verified that using "Open in tabs" on a bookmarks folder
1479         still does fresh loads (rdar://problem/8131355) as it is not using
1480         the restoreFromSessionState() code path.
1481
1482         * UIProcess/WebPageProxy.cpp:
1483         (WebKit::WebPageProxy::reattachToWebProcessForReload):
1484         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1485         (WebKit::WebPageProxy::goForward):
1486         (WebKit::WebPageProxy::goBack):
1487         (WebKit::WebPageProxy::goToBackForwardItem):
1488         (WebKit::WebPageProxy::restoreFromSessionState):
1489         * UIProcess/WebPageProxy.h:
1490         * WebProcess/WebPage/WebPage.cpp:
1491         (WebKit::WebPage::goToBackForwardItem):
1492         * WebProcess/WebPage/WebPage.h:
1493         * WebProcess/WebPage/WebPage.messages.in:
1494
1495 2015-03-20  Beth Dakin  <bdakin@apple.com>
1496
1497         [Immediate Actions] Should re-enable immediate actions for iBooks
1498         https://bugs.webkit.org/show_bug.cgi?id=142915
1499         -and corresponding-
1500         rdar://problem/19585689
1501
1502         Reviewed by Tim Horton.
1503
1504         * UIProcess/API/mac/WKView.mm:
1505         (-[WKView initWithFrame:processPool:configuration:webView:]):
1506
1507 2015-03-20  Alex Christensen  <achristensen@webkit.org>
1508
1509         Progress towards CMake on Mac.
1510         https://bugs.webkit.org/show_bug.cgi?id=136003
1511
1512         Reviewed by Chris Dumez.
1513
1514         * PlatformMac.cmake:
1515         Add include directories and forwarding headers.
1516         * Shared/API/APIObject.h:
1517         (API::ObjectImpl::operator new):
1518         * UIProcess/DrawingAreaProxy.h:
1519         (WebKit::DrawingAreaProxy::intrinsicContentSizeDidChange):
1520         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1521         Fix some unused parameter warnings.
1522
1523 2015-03-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1524
1525         [CMake] Remove duplicated cmake function calls in WebKit2/CMakeLists.txt
1526         https://bugs.webkit.org/show_bug.cgi?id=142901
1527
1528         Reviewed by Csaba Osztrogonác.
1529
1530         add_depencencies(), install() can support multiple targets or location.
1531         We don't need to call it twice.
1532
1533         * CMakeLists.txt: Additionaly move -DBUILDING_WEBKIT to PlatformGTK.cmake,
1534         because it is only used by GTK port.
1535
1536 2015-03-20  Zan Dobersek  <zdobersek@igalia.com>
1537
1538         [GTK] Disable accelerated compositing on Wayland
1539         https://bugs.webkit.org/show_bug.cgi?id=142877
1540
1541         Reviewed by Carlos Garcia Campos.
1542
1543         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1544         (webkitWebViewBaseCreateWebPage): As was done in the past, we should disable
1545         accelerated compositing on Wayland until the proper support for it lands.
1546
1547 2015-03-19  Andy Estes  <aestes@apple.com>
1548
1549         [Content Filtering] Add tests for unblock requests
1550         https://bugs.webkit.org/show_bug.cgi?id=142900
1551
1552         Reviewed by Andreas Kling.
1553
1554         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1555         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::contentFilterDidBlockLoad.
1556         * UIProcess/WebFrameProxy.cpp:
1557         (WebKit::WebFrameProxy::didStartProvisionalLoad): Assigned a default-constructed ContentFilterUnblockHandler instead of calling clear().
1558         (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Renamed from contentFilterDidHandleNavigationAction.
1559         Updated to use ContentFilterUnblockHandler's new API.
1560         (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Deleted.
1561         * UIProcess/WebFrameProxy.h:
1562         (WebKit::WebFrameProxy::contentFilterDidBlockLoad): Renamed from setContentFilterUnblockHandler.
1563         (WebKit::WebFrameProxy::setContentFilterUnblockHandler): Deleted.
1564         * UIProcess/WebPageProxy.cpp:
1565         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Called WebFrameProxy::didHandleContentFilterUnblockNavigation.
1566         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1567         (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): If the unblock handler needs the UI process,
1568         send WebPageProxy::ContentFilterDidBlockLoadForFrame. Oterwise, call PolicyChecker::setContentFilterUnblockHandler.
1569
1570 2015-03-20  Zan Dobersek  <zdobersek@igalia.com>
1571
1572         [GTK] Properly guard X11-specific code in BackingStore::createBackend()
1573         https://bugs.webkit.org/show_bug.cgi?id=142875
1574
1575         Reviewed by Martin Robinson.
1576
1577         * UIProcess/cairo/BackingStoreCairo.cpp:
1578         (WebKit::BackingStore::createBackend): Guard the GTK- and X11-specific
1579         bit of code with PLATFORM(GTK) and PLATFORM(X11). Testing GDK_WINDOWING_X11
1580         ensures that the GTK+ dependency has X11 support, but does not ensure
1581         that WebKitGTK+ has been configured to build for X11 environments (which
1582         is what PLATFORM(X11) ensures).
1583
1584 2015-03-19  Chris Dumez  <cdumez@apple.com>
1585
1586         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
1587         https://bugs.webkit.org/show_bug.cgi?id=142893
1588         <rdar://problem/19633737>
1589         <rdar://problem/19869257>
1590
1591         Reviewed by Antti Koivisto.
1592
1593         Allow stale content when restoring a killed / crashed WebProcess
1594         (similarly to a history navigation). This is actually what was intended
1595         as we call WebPage::goToBackForwardItem() in this case, which uses
1596         IndexedBackForward load type. However, this value was then ignored in
1597         FrameLoader::loadDifferentDocumentItem().
1598
1599         This patch gets rid of the special casing in
1600         FrameLoader::loadDifferentDocumentItem() and makes it clear at call
1601         sites when calling goToBackForwardItem() if we should allow stale
1602         content or not. If goToBackForwardItem() is called with the
1603         allowStaleContent flag off, we'll keep using the IndexedBackForward
1604         frame load type. However, if the flag is on, we'll use the Standard
1605         frame load type and do a fresh load.
1606
1607         * UIProcess/WebPageProxy.cpp:
1608         (WebKit::WebPageProxy::reattachToWebProcessForReload):
1609         Set allowStaleContent flag to true as we want to allow stale content
1610         when reloading a WebProcess after it crashed or was killed (behavior
1611         change).
1612
1613         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1614         Add allowStaleContent parameter so that call sites can decide which
1615         policy to use.
1616
1617         (WebKit::WebPageProxy::goForward):
1618         (WebKit::WebPageProxy::goBack):
1619         Set allowStaleContent flag to true as this is our policy for history
1620         navigations.
1621
1622         (WebKit::WebPageProxy::goToBackForwardItem):
1623         Add allowStaleContent parameter so that the call site can let us know
1624         what to do. This is useful as this is called not only for indexed
1625         back / forward navigations (allowing stale content) but also for
1626         restoring session state (forbidding state content:
1627         <rdar://problem/8131355>).
1628
1629         (WebKit::WebPageProxy::restoreFromSessionState):
1630         Call goToBackForwardItem() with allowStaleContent flag set to false
1631         as users expect fresh contents in this case. This method is called
1632         when:
1633         - Tabs are restored on Safari / MobileSafari startup
1634         - Tabs are restored via "History > Reopen All windows from last session"
1635
1636         * UIProcess/WebPageProxy.h:
1637         * WebProcess/WebPage/WebPage.cpp:
1638         (WebKit::WebPage::goToBackForwardItem):
1639         Add allowStaleContent parameter and use "Standard" frame load type
1640         instead of "IndexedBackForward" if it is false. This is needed as
1641         "IndexedBackForward" frame load type allows using stale content.
1642
1643         * WebProcess/WebPage/WebPage.h:
1644         * WebProcess/WebPage/WebPage.messages.in:
1645         Add allowStaleContent flag to GoToBackForwardItem message.
1646
1647 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
1648
1649         [Mac] Move MediaPlaybackTargetPicker
1650         https://bugs.webkit.org/show_bug.cgi?id=142889
1651
1652         Move WebMediaPlaybackTargetPickerProxy to WebCore so it can be used by
1653         both WK2 and WK1.
1654
1655         Reviewed by Tim Horton.
1656
1657         * UIProcess/PageClient.h:
1658         * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp: Removed.
1659         * UIProcess/WebMediaPlaybackTargetPickerProxy.h: Removed.
1660         * UIProcess/WebPageProxy.cpp:
1661         (WebKit::WebPageProxy::devicePickerProxy):
1662         * UIProcess/WebPageProxy.h:
1663         * UIProcess/mac/PageClientImpl.h:
1664         * UIProcess/mac/PageClientImpl.mm:
1665         (WebKit::PageClientImpl::createPlaybackTargetPicker):
1666         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Removed.
1667         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Removed.
1668         * WebKit2.xcodeproj/project.pbxproj:
1669
1670 2015-03-19  Jessie Berlin  <jberlin@webkit.org>
1671
1672         32-bit build fix after r181770.
1673
1674         * UIProcess/mac/WKFullScreenWindowController.mm:
1675         (-[WKFullScreenWindowController initWithWindow:webView:]):
1676
1677 2015-03-19  Anders Carlsson  <andersca@apple.com>
1678
1679         Add support for deleting individual cache entries
1680         https://bugs.webkit.org/show_bug.cgi?id=142886
1681
1682         Reviewed by Antti Koivisto.
1683
1684         * NetworkProcess/NetworkProcess.cpp:
1685         (WebKit::fetchDiskCacheEntries):
1686         Remove an unnecessary call to cfURLCacheOrigins().
1687
1688         (WebKit::clearDiskCacheEntries):
1689         Helper function for clearing disk cache entries. This handles both the old and new cache implementations.
1690
1691         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1692         Call clearDiskCacheEntries if needed.
1693
1694 2015-03-19  Jer Noble  <jer.noble@apple.com>
1695
1696         [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
1697         https://bugs.webkit.org/show_bug.cgi?id=142132
1698
1699         Reviewed by Tim Horton.
1700
1701         Use CALayer animations for the transition into and out of fullscreen.
1702
1703         The fullscreen transition consists of three separate animations:
1704         1. An opacity animation for the black backdrop behind the fullscreen content
1705         2. A scale/translation animation from fullscreen element's initial screen to its final one.
1706         3. A clip animation from the fullscreen element's initial aspect ratio to its final one.
1707
1708         The opacity animation will apply to the fullscreen window's content view's layer's
1709         background color. To separately animate the transform and mask of the web view's content, a
1710         layer-backed subview is added to the content view, and the scale/translation & clip
1711         animations are applied to its transform property and mask layer respectively.
1712
1713         Utility methods to create each animation have been added, and each includes a parameter for
1714         the direction of the animation, so that the same methods can be used for entering and
1715         exiting fullscreen transitions.
1716
1717         The user-visible changes to this new transition are when the aspect ratios of the initial
1718         and final screen locations are different: previously the transition would use a scale
1719         transform to "squish" the fullscreen content into the initial aspect ratio. The new
1720         transition instead "clips" the fullscreen content to the initial aspect ratio. For common
1721         operations such a <video> element with a different aspect ratio than the screen, this makes
1722         the black letterbox "grow" during the transition, and makes the transition overall much
1723         smoother.
1724
1725         * UIProcess/mac/WKFullScreenWindowController.h:
1726         * UIProcess/mac/WKFullScreenWindowController.mm:
1727         (-[WKFullScreenWindowController initWithWindow:webView:]): Create and initialze the clipping view.
1728         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): _backgroundWindow was removed.
1729         (-[WKFullScreenWindowController enterFullScreen:]): Add the webView to the _clipView, not the contentView.
1730         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): _backgroundWindow,
1731                 _fadeAnimation, and _scaleAnimation are all removed.
1732         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
1733         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.  Hide the contentView's
1734                 layer. Pause visibility updates.
1735         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Resume visibility updates.
1736         (-[WKFullScreenWindowController close]): _fadeAnimation and _scaleAnimation are removed.
1737         (-[WKFullScreenWindowController customWindowsToEnterFullScreenForWindow:]): Return only the fullscreen
1738                 window.
1739         (-[WKFullScreenWindowController customWindowsToExitFullScreenForWindow:]): Ditto.
1740         (zoomAnimation): Added.
1741         (maskAnimation): Added.
1742         (fadeAnimation): Added.
1743         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Use the utility
1744                 methods above to set up the animation.
1745         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
1746         (createBackgroundFullscreenWindow): Deleted.
1747         (windowFrameFromApparentFrames): Deleted.
1748
1749 2015-03-19  Enrica Casucci  <enrica@apple.com>
1750
1751         <attachment> should put URLs on the pasteboard so that Finder can accept drops.
1752         https://bugs.webkit.org/show_bug.cgi?id=142801
1753         rdar://problem/19982527
1754
1755         Reviewed by Tim Horton.
1756
1757         This patch adds all the necessary support to write attachment elements into
1758         the pasteboard, including the promised type in WK2.
1759
1760         * UIProcess/API/mac/WKView.mm:
1761         (-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]):
1762         (-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]):
1763         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
1764         (-[WKView _setPromisedData:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
1765         * UIProcess/API/mac/WKViewInternal.h:
1766         * UIProcess/PageClient.h:
1767         * UIProcess/WebPageProxy.h:
1768         * UIProcess/WebPageProxy.messages.in:
1769         * UIProcess/mac/PageClientImpl.h:
1770         * UIProcess/mac/PageClientImpl.mm:
1771         (WebKit::PageClientImpl::setPromisedDataForImage):
1772         (WebKit::PageClientImpl::setPromisedDataForAttachment):
1773         (WebKit::PageClientImpl::setPromisedData): Deleted.
1774         * UIProcess/mac/WebPageProxyMac.mm:
1775         (WebKit::WebPageProxy::setPromisedDataForImage):
1776         (WebKit::WebPageProxy::setPromisedDataForAttachment):
1777         (WebKit::WebPageProxy::setPromisedData): Deleted.
1778         * WebProcess/WebCoreSupport/WebDragClient.h:
1779         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1780         (WebKit::WebDragClient::declareAndWriteAttachment):
1781         (WebKit::WebDragClient::declareAndWriteDragImage):
1782
1783 2015-03-19  Anders Carlsson  <andersca@apple.com>
1784
1785         Cache::remove should take a Key instead of an entry
1786         https://bugs.webkit.org/show_bug.cgi?id=142878
1787
1788         Reviewed by Antti Koivisto.
1789
1790         * NetworkProcess/cache/NetworkCache.cpp:
1791         (WebKit::NetworkCache::Cache::remove):
1792         * NetworkProcess/cache/NetworkCache.h:
1793
1794 2015-03-19  Chris Dumez  <cdumez@apple.com>
1795
1796         Clean up DOMTimer related settings
1797         https://bugs.webkit.org/show_bug.cgi?id=142837
1798
1799         Reviewed by Darin Adler.
1800
1801         Stop setting the DOMTimers' default minimum interval to 4ms as this
1802         is now the default.
1803
1804         * WebProcess/WebPage/WebPage.cpp:
1805         (WebKit::WebPage::WebPage):
1806
1807 2015-03-19  Chris Dumez  <cdumez@apple.com>
1808
1809         The network cache should ignore "cache-control: no-cache, must-revalidate" on history navigation
1810         https://bugs.webkit.org/show_bug.cgi?id=142831
1811         <rdar://problem/20209957>
1812
1813         Reviewed by Antti Koivisto.
1814
1815         The network cache should ignore "no-cache" and "must-revalidate" as
1816         Cache-Control policy for history navigations to avoid unnecessary
1817         revalidation in this case. Our memory cache already behaves this way.
1818
1819         On history navigation, our disk cache implementation currently
1820         revalidates unconditionally resources if "cache-control: no-cache" is
1821         used. It also revalidates expired resources if "cache-control:
1822         must-revalidate" is used. This is sub-optimal.
1823
1824         RFC 7234 does not require us to do so [1]:
1825         """
1826           User agents often have history mechanisms, such as "Back" buttons and
1827           history lists, that can be used to redisplay a representation
1828           retrieved earlier in a session.
1829
1830           The freshness model (Section 4.2) does not necessarily apply to
1831           history mechanisms.  That is, a history mechanism can display a
1832           previous representation even if it has expired.
1833         """
1834
1835         Chrome and IE9+ [2] already ignore "cache-control: must-revalidate" on history navigation.
1836
1837         [1] https://tools.ietf.org/html/rfc7234#page-32
1838         [2] http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx
1839
1840         Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
1841
1842         * NetworkProcess/cache/NetworkCache.cpp:
1843         (WebKit::NetworkCache::decodeStorageEntry):
1844
1845 2015-03-18  Simon Fraser  <simon.fraser@apple.com>
1846
1847         Don't paint PDFs on every scroll
1848         https://bugs.webkit.org/show_bug.cgi?id=142857
1849         rdar://problem/20130207
1850
1851         Reviewed by Tim Horton.
1852         
1853         Don't push a scale factor onto the PDF layer controller if it hasn't
1854         changed, since doing so causes a repaint.
1855
1856         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1857         (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
1858
1859 2015-03-18  Anders Carlsson  <andersca@apple.com>
1860
1861         Use && instead of & when deciding if the network cache should be cleared
1862         https://bugs.webkit.org/show_bug.cgi?id=142845
1863
1864         Reviewed by Antti Koivisto.
1865
1866         * NetworkProcess/NetworkProcess.cpp:
1867         (WebKit::NetworkProcess::deleteWebsiteData):
1868
1869 2015-03-18  Anders Carlsson  <andersca@apple.com>
1870
1871         Add WKContextGetWebsiteDataStore API
1872         https://bugs.webkit.org/show_bug.cgi?id=142832
1873         rdar://problem/16544715
1874
1875         Reviewed by Sam Weinig.
1876
1877         Also add WKWebsiteDataStoreRef which is toll-free bridged to _WKWebsiteDataStore.
1878
1879         * Shared/API/c/WKBase.h:
1880         Add new declaration.
1881
1882         * UIProcess/API/APIWebsiteDataStore.cpp:
1883         (API::WebsiteDataStore::create):
1884         * UIProcess/API/APIWebsiteDataStore.h:
1885         Add a new function that takes a configuration.
1886
1887         * UIProcess/API/C/WKAPICast.h:
1888         Add cast.
1889
1890         * UIProcess/API/C/WKContext.cpp:
1891         (WKContextGetWebsiteDataStore):
1892         Return the context's website data store.
1893
1894         * UIProcess/API/C/WKContext.h:
1895         Add new declaration.
1896
1897         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: Added.
1898         * UIProcess/API/C/WKWebsiteDataStoreRef.h: Added.
1899         Add new files.
1900
1901         * UIProcess/WebKeyValueStorageManager.cpp:
1902         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1903         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1904         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1905         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1906         Update now that WebProcessPool holds on to an API::WebsiteDataStore.
1907
1908         * UIProcess/WebProcessPool.cpp:
1909         (WebKit::WebProcessPool::WebProcessPool):
1910         (WebKit::WebProcessPool::createWebPage):
1911         * UIProcess/WebProcessPool.h:
1912         WebProcessPool should hold on to an API::WebsiteDataStore instead of a WebKit::WebsiteDataStore.
1913
1914         * WebKit2.xcodeproj/project.pbxproj:
1915         Add new files.
1916
1917 2015-03-18  Tim Horton  <timothy_horton@apple.com>
1918
1919         Cannot invoke action menus anymore
1920         https://bugs.webkit.org/show_bug.cgi?id=142797
1921         <rdar://problem/20032670>
1922
1923         * UIProcess/API/mac/WKView.mm:
1924         Need one more respondsToSelector check.
1925
1926 2015-03-18  Chris Dumez  <cdumez@apple.com>
1927
1928         [WK2] Log the number of network cache requests that we have never seen before
1929         https://bugs.webkit.org/show_bug.cgi?id=142828
1930         <rdar://problem/19632130>
1931
1932         Reviewed by Antti Koivisto.
1933
1934         Log the number of network cache requests that we have never seen before
1935         using diagnostic logging.
1936
1937         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
1938         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
1939         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
1940
1941 2015-03-17  Antti Koivisto  <antti@apple.com>
1942
1943         Prune least valuable cache entries first
1944         https://bugs.webkit.org/show_bug.cgi?id=142810
1945         rdar://problem/19632130
1946
1947         Reviewed by Darin Adler.
1948
1949         When pruning the cache estimate relative value of each entry using formula
1950
1951         age = current time - creation time
1952         accessAge = last access time - creation time
1953         value = accessAge / age
1954
1955         That is, we value entries that have been accessed recently and survived in the cache longest.
1956
1957         The most valuable entries don't get deleted at all while the deletion probablity ramps up for
1958         lower value entries.
1959
1960         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1961         (WebKit::NetworkCache::fileTimes):
1962
1963             Get the creation time and access time for a file.
1964
1965         (WebKit::NetworkCache::updateFileAccessTimeIfNeeded):
1966
1967             Update access time manually if the file system doesn't do it automatically.
1968
1969         * NetworkProcess/cache/NetworkCacheIOChannel.h:
1970         (WebKit::NetworkCache::IOChannel::path):
1971         (WebKit::NetworkCache::IOChannel::type):
1972         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1973         (WebKit::NetworkCache::IOChannel::IOChannel):
1974         (WebKit::NetworkCache::IOChannel::open):
1975
1976             Remember the file path and move most of the work to constructor.
1977
1978         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1979         (WebKit::NetworkCache::Storage::Storage):
1980         (WebKit::NetworkCache::Storage::remove):
1981         (WebKit::NetworkCache::Storage::updateFileAccessTime):
1982         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1983         (WebKit::NetworkCache::deletionProbability):
1984
1985             Compute the probability based on entry age and access time.
1986
1987         (WebKit::NetworkCache::Storage::shrinkIfNeeded):
1988         * NetworkProcess/cache/NetworkCacheStorage.h:
1989         (WebKit::NetworkCache::Storage::serialBackgroundIOQueue):
1990         (WebKit::NetworkCache::Storage::deleteQueue): Deleted.
1991
1992             More generic name.
1993
1994 2015-03-18  Chris Dumez  <cdumez@apple.com>
1995
1996         [WK2] Log total number of network cache queries using diagnostic logging
1997         https://bugs.webkit.org/show_bug.cgi?id=142803
1998         <rdar://problem/19632130>
1999
2000         Reviewed by Antti Koivisto.
2001
2002         Log total number of network cache queries using diagnostic logging.
2003
2004         * NetworkProcess/cache/NetworkCache.cpp:
2005         (WebKit::NetworkCache::Cache::retrieve):
2006         * NetworkProcess/cache/NetworkCacheStatistics.h:
2007         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
2008         (WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):
2009
2010 2015-03-18  Chris Dumez  <cdumez@apple.com>
2011
2012         [WK2] We should not even try the network cache for non-HTTP protocol requests
2013         https://bugs.webkit.org/show_bug.cgi?id=142802
2014         <rdar://problem/19632130>
2015
2016         Reviewed by Antti Koivisto.
2017
2018         We should not even try the network cache for non-HTTP protocol requests
2019         and the network cache cannot handle those.
2020
2021         * NetworkProcess/NetworkResourceLoader.cpp:
2022         (WebKit::NetworkResourceLoader::start):
2023         * NetworkProcess/cache/NetworkCache.cpp:
2024         (WebKit::NetworkCache::canRetrieve):
2025         (WebKit::NetworkCache::Cache::retrieve):
2026         * NetworkProcess/cache/NetworkCache.h:
2027         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
2028         (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
2029
2030 2015-03-17  Conrad Shultz  <conrad_shultz@apple.com>
2031
2032         Ignore some deprecation warnings
2033         https://bugs.webkit.org/show_bug.cgi?id=142813
2034
2035         Reviewed by Mark Rowe.
2036
2037         Fixing the deprecations is tracked by: <rdar://problem/20201450>
2038
2039         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2040         (WebKit::WebPopupMenuProxyMac::populate):
2041
2042 2015-03-17  Ryuan Choi  <ryuan.choi@navercorp.com>
2043
2044         [EFL] Expose JavaScript binding interface through ewk_extension
2045         https://bugs.webkit.org/show_bug.cgi?id=142033
2046
2047         Reviewed by Gyuyoung Kim.
2048
2049         * PlatformEfl.cmake:
2050         * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Registered test object for new test case.
2051         * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Added simple binding API test case.
2052         (EWK2ContextTestWithExtension::messageReceivedCallback):
2053         (EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
2054         (TEST_F):
2055         * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h:
2056         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
2057         (EwkExtension::didCreatePage):
2058         (EwkExtension::willDestroyPage):
2059         * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
2060         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
2061         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Added.
2062         (toEwkPage):
2063         (EwkPage::EwkPage):
2064         (EwkPage::append):
2065         (EwkPage::remove):
2066         (EwkPage::didFinishDocumentLoadForFrame):
2067         (ewk_page_js_global_context_get):
2068         (ewk_page_client_register):
2069         (ewk_page_client_unregister):
2070         * WebProcess/InjectedBundle/API/efl/ewk_page.h: Added.
2071         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Added.
2072         (EwkPage::page):
2073         * efl/ewebkit2-extension.pc.in:
2074
2075 2015-03-17  Tim Horton  <timothy_horton@apple.com>
2076
2077         Cannot invoke action menus anymore
2078         https://bugs.webkit.org/show_bug.cgi?id=142797
2079         <rdar://problem/20032670>
2080
2081         * UIProcess/API/mac/WKView.mm:
2082         Need a respondsToSelector check.
2083
2084 2015-03-17  Tim Horton  <timothy_horton@apple.com>
2085
2086         Cannot invoke action menus anymore
2087         https://bugs.webkit.org/show_bug.cgi?id=142797
2088         <rdar://problem/20032670>
2089
2090         Reviewed by Beth Dakin.
2091
2092         * UIProcess/API/mac/WKView.mm:
2093         Don't process mouse events that would make an action menu; call super
2094         and let AppKit take care of it. We have to duplicate the macro so that
2095         we can avoid calling super for the internal-only methods.
2096         Also, otherMouseMoved is simply not a thing, so remove it.
2097
2098 2015-03-17  Beth Dakin  <bdakin@apple.com>
2099
2100         DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on 
2101         10.10.2
2102         https://bugs.webkit.org/show_bug.cgi?id=142700
2103         -and corresponding-
2104         rdar://problem/20165168
2105
2106         Reviewed by Tim Horton.
2107
2108         No need to tell the WKImmediateActionController about mouse down any more since we 
2109         are expecting it at the beginning of an immediate action interaction.
2110         * UIProcess/API/mac/WKView.mm:
2111         (-[WKView mouseDown:]):
2112
2113         Set the delaysPrimaryMouseButtonEvents to NO for the 
2114         _immediateActionGestureRecognizer. This will cause AppKit to send up the mouse 
2115         events at the expected time.
2116         (-[WKView initWithFrame:processPool:configuration:webView:]):
2117
2118         WebCore::EventHandler now needs to know if an immediate action cancelled or 
2119         completed. This plumbs that information down.
2120         * UIProcess/WebPageProxy.cpp:
2121         (WebKit::WebPageProxy::immediateActionDidCancel):
2122         (WebKit::WebPageProxy::immediateActionDidComplete):
2123         * UIProcess/WebPageProxy.h:
2124         * UIProcess/mac/WKImmediateActionController.h:
2125         * UIProcess/mac/WKImmediateActionController.mm:
2126         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
2127         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
2128         (-[WKImmediateActionController wkView:willHandleMouseDown:]): Deleted.
2129         * WebProcess/WebPage/WebPage.h:
2130         * WebProcess/WebPage/WebPage.messages.in:
2131
2132         Call EventHandler::setImmediateActionStage() with the appropriate stage.
2133         * WebProcess/WebPage/mac/WebPageMac.mm:
2134         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2135         (WebKit::WebPage::immediateActionDidCancel):
2136         (WebKit::WebPage::immediateActionDidComplete):
2137
2138 2015-03-17  Timothy Horton  <timothy_horton@apple.com>
2139
2140         Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
2141         https://bugs.webkit.org/show_bug.cgi?id=142776
2142         <rdar://problem/18921338>
2143
2144         Reviewed by Alexey Proskuryakov.
2145
2146         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2147         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
2148         * WebProcess/WebCoreSupport/WebChromeClient.h:
2149         Adjust to the new signature.
2150
2151 2015-03-17  Antti Koivisto  <antti@apple.com>
2152
2153         Disk cache should support Vary: Cookie
2154         https://bugs.webkit.org/show_bug.cgi?id=142770
2155         rdar://problem/19764945
2156
2157         Reviewed by Anders Carlsson.
2158
2159         Cookies are not part of the original request but are added by the networking layer when submitting the request.
2160         Fetch them explicitly when resolving Vary: Cookie.
2161
2162         The implementation is not perfect as it fetches the cookie for the cache entry when saving a Vary:Cookie response,
2163         not when making the request. In principle the cookie may have changed in-between. This should be enough to handle
2164         reasonable cases though. Fetching cookies for every request might be too expensive for this rarely used feature.
2165
2166         * NetworkProcess/cache/NetworkCache.cpp:
2167         (WebKit::NetworkCache::headerValueForVary):
2168         (WebKit::NetworkCache::encodeStorageEntry):
2169         (WebKit::NetworkCache::verifyVaryingRequestHeaders):
2170
2171 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
2172
2173         [WK2] Use C++ lambdas in IPC::Connection
2174         https://bugs.webkit.org/show_bug.cgi?id=138018
2175
2176         Reviewed by Anders Carlsson.
2177
2178         Replace uses of WTF::bind() in the IPC::Connection class with C++ lambdas.
2179
2180         * Platform/IPC/Connection.cpp:
2181         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
2182         (IPC::Connection::invalidate):
2183         (IPC::Connection::sendMessage):
2184         (IPC::Connection::processIncomingMessage): Simplify the error messages so we
2185         don't have to format strings on-the-fly, removing the issues of cross-thread
2186         string copying altogether.
2187         (IPC::Connection::dispatchDidReceiveInvalidMessage): The parameters are now
2188         of the StringReference type.
2189         (IPC::Connection::enqueueIncomingMessage):
2190         * Platform/IPC/Connection.h:
2191         * Platform/IPC/mac/ConnectionMac.mm:
2192         (IPC::Connection::receiveSourceEventHandler):
2193         * Platform/IPC/unix/ConnectionUnix.cpp:
2194         (IPC::Connection::open):
2195
2196 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
2197
2198         [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
2199         https://bugs.webkit.org/show_bug.cgi?id=142530
2200
2201         Reviewed by Darin Adler.
2202
2203         * CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
2204         in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
2205         possible due to the new forwarding header for ANGLE's ShaderLang.h.
2206
2207 2015-03-17  Gwang Yoon Hwang  <yoon@igalia.com>
2208
2209         REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor
2210
2211         Unreviewed build fix.
2212
2213         * WebProcess/WebPage/LayerTreeHost.h:
2214         Remove duplicated declaration of setNativeSurfaceHandleForCompositing.
2215
2216 2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>
2217
2218         Enable ES6 classes by default
2219         https://bugs.webkit.org/show_bug.cgi?id=142774
2220
2221         Reviewed by Gavin Barraclough.
2222
2223         * Configurations/FeatureDefines.xcconfig:
2224
2225 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
2226
2227         Don't pass nil as a fireDate for NSTimer
2228         https://bugs.webkit.org/show_bug.cgi?id=142765
2229
2230         Reviewed by Dan Bernstein.
2231
2232         While we're here, switch to a selector that conforms to documented NSTimer API.
2233
2234         * UIProcess/mac/WKFullScreenWindowController.mm:
2235         (-[WKFullScreenWindowController cancelOperation:]):
2236         Set the timer's fireDate as the future date matching the former interval; update the selector.
2237         (-[WKFullScreenWindowController _watchdogTimerFired:]):
2238         Timer callback; wrap -exitFullScreen.
2239
2240 2015-03-16  Alex Christensen  <achristensen@webkit.org>
2241
2242         Progress towards CMake on Mac
2243         https://bugs.webkit.org/show_bug.cgi?id=142747
2244
2245         Reviewed by Chris Dumez.
2246
2247         * PlatformMac.cmake:
2248         Started adding Mac-specific directories and headers.
2249
2250 2015-03-16  Alexey Proskuryakov  <ap@apple.com>
2251
2252         ASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
2253         https://bugs.webkit.org/show_bug.cgi?id=142637
2254
2255         Reviewed by Dean Jackson.
2256
2257         * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired):
2258         m_plugin can be legitimately null.
2259
2260 2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>
2261
2262         One more URTBF after r181578.
2263
2264         * WebProcess/WebPage/WebPage.cpp:
2265         (WebKit::WebPage::updatePreferences):
2266
2267 2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>
2268
2269         URTBF after r181578.
2270
2271         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2272         (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled): Copy/paste error fixed.
2273
2274 2015-03-16  Dean Jackson  <dino@apple.com>
2275
2276         Expose WK2 preference for Animation Triggers runtime flag
2277         https://bugs.webkit.org/show_bug.cgi?id=142744
2278
2279         Reviewed by Anders Carlsson.
2280
2281         Expose CSSAnimationTriggersEnabled, linking it to the runtime enabled
2282         feature flag.
2283
2284         * Shared/WebPreferencesDefinitions.h:
2285         * UIProcess/API/C/WKPreferences.cpp:
2286         (WKPreferencesSetCSSAnimationTriggersEnabled):
2287         (WKPreferencesGetCSSAnimationTriggersEnabled):
2288         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2289         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2290         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2291         (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled):
2292         * WebProcess/InjectedBundle/InjectedBundle.h:
2293         * WebProcess/WebPage/WebPage.cpp:
2294         (WebKit::WebPage::updatePreferences):
2295
2296 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
2297
2298         Allow clients to selectively disable plug-ins
2299         https://bugs.webkit.org/show_bug.cgi?id=142506
2300
2301         Reviewed by Anders Carlsson.
2302
2303         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
2304         from the page). As part of this:
2305
2306         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
2307            set of plug-ins.
2308
2309         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
2310            down the stack.
2311
2312         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
2313            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
2314
2315         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
2316
2317         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
2318         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
2319
2320         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2321         (WebKit::NetscapePluginModule::getPluginInfo):
2322         Set new PluginInfo members.
2323
2324         * Shared/WebCoreArgumentCoders.cpp:
2325         (IPC::ArgumentCoder<PluginInfo>::encode):
2326         Handle new PluginInfo members.
2327         (IPC::ArgumentCoder<PluginInfo>::decode):
2328         Ditto.
2329
2330         * Shared/WebProcessCreationParameters.h:
2331         Declare a member to store client plug-in policies.
2332
2333         * Shared/WebProcessCreationParameters.cpp:
2334         (WebKit::WebProcessCreationParameters::encode):
2335         Encode the policies.
2336         (WebKit::WebProcessCreationParameters::decode):
2337         Decode the policies.
2338
2339         * UIProcess/API/C/WKAPICast.h:
2340         (WebKit::toWKPluginLoadClientPolicy):
2341         Teach how to cast between WebCore and WebKit2 policy definitions.
2342         (WebKit::toPluginLoadClientPolicy):
2343         Ditto.
2344
2345         * UIProcess/API/C/WKPluginLoadPolicy.h:
2346         Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
2347
2348         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2349         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2350         (WKContextSetPluginLoadClientPolicy):
2351         New function; wrap WebProcessPool::setPluginLoadClientPolicy().
2352         (WKContextClearPluginClientPolicies):
2353         New function; wrap WebProcessPool::clearPluginClientPolicies().
2354
2355         * UIProcess/WebProcessPool.h:
2356         * UIProcess/WebProcessPool.cpp:
2357         (WebKit::WebProcessPool::createNewWebProcess):
2358         Copy any client plug-in policies to the new process' creation parameters.
2359         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
2360         Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
2361         (WebKit::WebProcessPool::clearPluginClientPolicies):
2362         Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
2363
2364         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2365         (WebKit::PDFPlugin::pluginInfo):
2366         Set new PluginInfo member.
2367
2368         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2369         (WebKit::pluginSupportsExtension):
2370         Adopt getWebVisibleMimesAndPluginIndices().
2371         (WebKit::WebFrameLoaderClient::objectContentType):
2372         Update to reflect reflect function rename.
2373
2374         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2375         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2376         (WebKit::WebPlatformStrategies::getPluginInfo):
2377         Pass the Page to populatePluginCache().
2378         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
2379         New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
2380         to block on the current page.
2381         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
2382         New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
2383         (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
2384         New member function; empty m_hostsToPluginIdentifierData.
2385         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
2386         New member function; look up the most specific policy for the given plug-in and host.
2387         (WebKit::WebPlatformStrategies::populatePluginCache):
2388         If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
2389         been populated since the Page, and therefore host, may change.
2390
2391         * WebProcess/WebPage/WebPage.cpp:
2392         (WebKit::WebPage::canShowMIMEType):
2393         Update to reflect function rename.
2394
2395         * WebProcess/WebProcess.h:
2396         * WebProcess/WebProcess.cpp:
2397         (WebKit::WebProcess::initializeWebProcess):
2398         Enumerate and process the client plug-in policies in the creation parameters.
2399         (WebKit::WebProcess::setPluginLoadClientPolicy):
2400         New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
2401         (WebKit::WebProcess::clearPluginClientPolicies):
2402         New member function; wrap PluginStrategy::clearPluginClientPolicies().
2403
2404         * WebProcess/WebProcess.messages.in:
2405         Add messages for setting and clearing policies.
2406
2407 2015-03-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2408
2409         Unreviewed. Add new Notification classes to GTK+ API documentation.
2410
2411         Add WebKitNotification and WebKitNotificationPermissionRequest to
2412         the documentation and fix some other typos causing warnings when
2413         generating HTML documentation.
2414
2415         * UIProcess/API/gtk/WebKitUserContent.cpp:
2416         * UIProcess/API/gtk/WebKitWebView.cpp:
2417         (webkit_web_view_class_init):
2418         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2419
2420 2015-03-16  Przemyslaw Piorkowski  <p.piorkowski@samsung.com>
2421
2422         [EFL][WK2] REGRESSION(r178526): test_ewk2_storage_manager has been failed for a long time
2423         https://bugs.webkit.org/show_bug.cgi?id=141249
2424
2425         Reviewed by Gyuyoung Kim.
2426
2427         * PlatformEfl.cmake: Enable test_ewk2_storage_manager for EFL port - it is passing now.
2428
2429 2015-03-16  David Kilzer  <ddkilzer@apple.com>
2430
2431         [iOS] REGRESSION (r181511): Most layout tests crash with a NULL deref
2432
2433         Follow-up fix for:
2434         [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
2435         <http://webkit.org/b/142702>
2436
2437         * UIProcess/ios/PageClientImplIOS.mm:
2438         (WebKit::PageClientImpl::isViewWindowActive): Add NULL check for m_webView.
2439         (WebKit::PageClientImpl::isViewFocused): Ditto.
2440
2441 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
2442
2443         Clean up related to wheelEvent names
2444         https://bugs.webkit.org/show_bug.cgi?id=142713
2445
2446         Reviewed by Anders Carlsson.
2447
2448         Add EventNames::isWheelEventType() and use it in places that test for the
2449         two wheel event names.
2450
2451         * WebProcess/Plugins/PluginView.cpp:
2452         (WebKit::PluginView::handleEvent):
2453
2454 2015-03-15  Dan Bernstein  <mitz@apple.com>
2455
2456         [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
2457         https://bugs.webkit.org/show_bug.cgi?id=142702
2458
2459         Reviewed by Anders Carlsson.
2460
2461         * UIProcess/API/Cocoa/WKWebView.mm:
2462         (-[WKWebView becomeFirstResponder]): Override to delegate first responder status to the
2463         WKContentView if possible.
2464         (-[WKWebView _retainActiveFocusedState]): New SPI that prevents view hierarchy changes from
2465         affecting the active and focused state of the view. Increments a counter ivar and returns a
2466         completion block (which callers must call when they’re done) that decrements it back.
2467         * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared new _activeFocusedStateRetainCount ivar
2468         with @package access.
2469         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.
2470
2471         * UIProcess/ios/PageClientImplIOS.mm:
2472         (WebKit::PageClientImpl::isViewWindowActive): Return true if active/focused state is to be
2473         maintained despite not being visible.
2474         (WebKit::PageClientImpl::isViewFocused): Return true if active/focused state is to be
2475         maintained despite not being active.
2476
2477         * UIProcess/ios/WKContentViewInteraction.mm:
2478         (-[WKContentView resignFirstResponder]): Don’t blur the assisted node if active/focused
2479         state is to be maintained.
2480
2481 2015-03-14  Simon Fraser  <simon.fraser@apple.com>
2482
2483         Clean up use of flags in localToContainer-type functions
2484         https://bugs.webkit.org/show_bug.cgi?id=142704
2485
2486         Reviewed by Alexey Proskuryakov.
2487         
2488         Pass UseTransforms explicitly to localToContainerPoint()
2489
2490         * WebProcess/WebPage/ios/WebPageIOS.mm:
2491         (WebKit::WebPage::getAssistedNodeInformation):
2492
2493 2015-03-14  Brent Fulgham  <bfulgham@apple.com>
2494
2495         [iOS] scroll snap points are animating to the wrong positions.
2496         https://bugs.webkit.org/show_bug.cgi?id=142705
2497         <rdar://problem/20136946>
2498
2499         Reviewed by Simon Fraser.
2500
2501         Scroll snapping was landing in the wrong place on iOS because of two problems:
2502         (1) It was searching for the closest snap offset point using unscaled 'screen' pixels,
2503         which caused it to always choose one of the earliest snap point options.
2504         (2) It was then selecting a scaled snap point coordinate and passing it back to UIKit
2505         to animate the snap. This caused it to select a target point beyond the 'screen' pixel
2506         we want to hit.
2507         
2508         The solution to both problems are to scale the scroll destination UIKit suggests so that
2509         we search among the scaled points with a valid value. Then, we need to scale the returned
2510         value back to screen units before handing it back to UIKit to process.
2511
2512         * UIProcess/API/Cocoa/WKWebView.mm:
2513         (-[WKWebView scrollViewWillBeginDragging:]): Drive-by fix. Get rid of extra ';' at
2514         the end of the line.
2515         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2516         (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling):
2517
2518 2015-03-14  Dean Jackson  <dino@apple.com>
2519
2520         Feature flag for Animations Level 2
2521         https://bugs.webkit.org/show_bug.cgi?id=142699
2522         <rdar://problem/20165097>
2523
2524         Reviewed by Brent Fulgham.
2525
2526         Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
2527
2528         * Configurations/FeatureDefines.xcconfig:
2529
2530 2015-03-14  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2531
2532         [GStreamer] share GL context in pipeline
2533         https://bugs.webkit.org/show_bug.cgi?id=142693
2534
2535         Reviewed by Philippe Normand.
2536
2537         * WebProcess/gtk/WebProcessMainGtk.cpp: Enable XInitThreads() if
2538         GSTREAMER_GL is used, since GstGL elements use another thread for
2539         queuing GL operations.
2540
2541 2015-03-13  Alex Christensen  <achristensen@webkit.org>
2542
2543         Progress towards CMake on Mac.
2544         https://bugs.webkit.org/show_bug.cgi?id=142680
2545
2546         Reviewed by Gyuyoung Kim.
2547
2548         * PlatformMac.cmake: Added.
2549
2550 2015-03-13  Commit Queue  <commit-queue@webkit.org>
2551
2552         Unreviewed, rolling out r181483.
2553         https://bugs.webkit.org/show_bug.cgi?id=142688
2554
2555         Caused use-after-free on many tests (Requested by ap on
2556         #webkit).
2557
2558         Reverted changeset:
2559
2560         "Allow clients to selectively disable plug-ins"
2561         https://bugs.webkit.org/show_bug.cgi?id=142506
2562         http://trac.webkit.org/changeset/181483
2563
2564 2015-03-13  Eric Carlson  <eric.carlson@apple.com>
2565
2566         [Mac] Enable WIRELESS_PLAYBACK_TARGET
2567         https://bugs.webkit.org/show_bug.cgi?id=142635
2568
2569         Reviewed by Darin Adler.
2570
2571         * Configurations/FeatureDefines.xcconfig:
2572
2573 2015-03-13  Timothy Horton  <timothy_horton@apple.com>
2574
2575         Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
2576         https://bugs.webkit.org/show_bug.cgi?id=142664
2577         <rdar://problem/18859470>
2578
2579         Reviewed by Benjamin Poulain.
2580
2581         * UIProcess/ios/WKScrollView.mm:
2582         (-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
2583         Now that the WKContentView can (without pinching) be smaller than the unobscured
2584         region of the WKWebView, we need to take that into account when deciding where
2585         to retarget scrolling.
2586
2587 2015-03-13  Mark Lam  <mark.lam@apple.com>
2588
2589         Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
2590         <https://webkit.org/b/142674>
2591
2592         Reviewed by Filip Pizlo.
2593
2594         * WebProcess/WebPage/EventDispatcher.cpp:
2595         (WebKit::EventDispatcher::EventDispatcher):
2596         * WebProcess/WebPage/EventDispatcher.h:
2597         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2598         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
2599         * WebProcess/WebPage/ViewUpdateDispatcher.h:
2600
2601 2015-03-10  Conrad Shultz  <conrad_shultz@apple.com>
2602
2603         Allow clients to selectively disable plug-ins
2604         https://bugs.webkit.org/show_bug.cgi?id=142506
2605
2606         Reviewed by Anders Carlsson.
2607
2608         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
2609         from the page). As part of this:
2610
2611         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
2612            set of plug-ins.
2613
2614         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
2615            down the stack.
2616
2617         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
2618            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
2619
2620         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
2621
2622         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
2623         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
2624
2625         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2626         (WebKit::NetscapePluginModule::getPluginInfo):
2627         Set new PluginInfo members.
2628
2629         * Shared/WebCoreArgumentCoders.cpp:
2630         (IPC::ArgumentCoder<PluginInfo>::encode):
2631         Handle new PluginInfo members.
2632         (IPC::ArgumentCoder<PluginInfo>::decode):
2633         Ditto.
2634
2635         * Shared/WebProcessCreationParameters.h:
2636         Declare a member to store client plug-in policies.
2637
2638         * Shared/WebProcessCreationParameters.cpp:
2639         (WebKit::WebProcessCreationParameters::encode):
2640         Encode the policies.
2641         (WebKit::WebProcessCreationParameters::decode):
2642         Decode the policies.
2643
2644         * UIProcess/API/C/WKAPICast.h:
2645         (WebKit::toWKPluginLoadClientPolicy):
2646         Teach how to cast between WebCore and WebKit2 policy definitions.
2647         (WebKit::toPluginLoadClientPolicy):
2648         Ditto.
2649
2650         * UIProcess/API/C/WKPluginLoadPolicy.h:
2651         Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
2652
2653         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2654         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2655         (WKContextSetPluginLoadClientPolicy):
2656         New function; wrap WebProcessPool::setPluginLoadClientPolicy().
2657         (WKContextClearPluginClientPolicies):
2658         New function; wrap WebProcessPool::clearPluginClientPolicies().
2659
2660         * UIProcess/WebProcessPool.h:
2661         * UIProcess/WebProcessPool.cpp:
2662         (WebKit::WebProcessPool::createNewWebProcess):
2663         Copy any client plug-in policies to the new process' creation parameters.
2664         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
2665         Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
2666         (WebKit::WebProcessPool::clearPluginClientPolicies):
2667         Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
2668
2669         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2670         (WebKit::PDFPlugin::pluginInfo):
2671         Set new PluginInfo member.
2672
2673         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2674         (WebKit::pluginSupportsExtension):
2675         Adopt getWebVisibleMimesAndPluginIndices().
2676         (WebKit::WebFrameLoaderClient::objectContentType):
2677         Update to reflect reflect function rename.
2678
2679         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2680         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2681         (WebKit::WebPlatformStrategies::getPluginInfo):
2682         Pass the Page to populatePluginCache().
2683         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
2684         New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
2685         to block on the current page.
2686         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
2687         New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
2688         (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
2689         New member function; empty m_hostsToPluginIdentifierData.
2690         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
2691         New member function; look up the most specific policy for the given plug-in and host.
2692         (WebKit::WebPlatformStrategies::populatePluginCache):
2693         If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
2694         been populated since the Page, and therefore host, may change.
2695
2696         * WebProcess/WebPage/WebPage.cpp:
2697         (WebKit::WebPage::canShowMIMEType):
2698         Update to reflect function rename.
2699
2700         * WebProcess/WebProcess.h:
2701         * WebProcess/WebProcess.cpp:
2702         (WebKit::WebProcess::initializeWebProcess):
2703         Enumerate and process the client plug-in policies in the creation parameters.
2704         (WebKit::WebProcess::setPluginLoadClientPolicy):
2705         New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
2706         (WebKit::WebProcess::clearPluginClientPolicies):
2707         New member function; wrap PluginStrategy::clearPluginClientPolicies().
2708
2709         * WebProcess/WebProcess.messages.in:
2710         Add messages for setting and clearing policies.
2711
2712 2015-03-12  Jon Honeycutt  <jhoneycutt@apple.com>
2713
2714         Use UIDocumentMenuViewController to allow selection of files from
2715         iCloud Drive in WKFileUploadPanel
2716
2717         Part of <https://bugs.webkit.org/show_bug.cgi?id=142596> WebKit on
2718         iOS should support file upload from iCloud Drive
2719         <rdar://problem/12178991>
2720
2721         Reviewed by Andy Estes.
2722
2723         * Platform/spi/ios/UIKitSPI.h:
2724         Include UIDocumentMenuViewController_Private.h if it exists. If not,
2725         declare this new SPI.
2726
2727         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2728         (fallbackIconForFile):
2729         Create a UIDocumentInteractionController for the file, and return a
2730         thumbnail image from its smallest icon.
2731
2732         (iconForImageFile):
2733         If we can get a UIImage from the file, create a thumbnail from it.
2734         Otherwise, call fallbackIconForFile().
2735
2736         (iconForVideoFile):
2737         Code moved from -[_WKVideoFileUploadItem displayImage].
2738
2739         (iconForFile):
2740         Get the file's extension, and get the extension's preferred UTI. If the
2741         UTI is an image type, call iconForImageFile(). If it's a video type,
2742         call iconForVideoFile(). Otherwise, return the fallback icon.
2743
2744         (-[_WKFileUploadItem initWithFileURL:]):
2745         Added an initializer that takes a file URL.
2746
2747         (-[_WKFileUploadItem fileURL]):
2748         (-[_WKImageFileUploadItem initWithFileURL:originalImage:]):
2749         (-[_WKVideoFileUploadItem displayImage]):
2750         (WKFileUploadPanel):
2751         Inherit from UIDocumentPickerDelegate and UIDocumentMenuDelegate. Add
2752         an ivar for the document menu controller.
2753
2754         (-[WKFileUploadPanel dealloc]):
2755         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
2756         If instances of UIDocumentMenuViewController respond to
2757         -_setIgnoreApplicationEntitlementForImport:, meaning we can disable the
2758         assertion that the current app has the iCloud Documents entitlement,
2759         then show the document picker menu. Otherwise, show the current source
2760         selection UI. The runtime check will be removed when a newer UIKit is
2761         available.
2762
2763         (UTIsForMIMETypes):
2764         Return the UTIs for the <input> element's "accept" attribute's MIME
2765         type list.
2766
2767         (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
2768         Call UTIsForMIMETypes(). Fall back to available source types for this
2769         picker type.
2770
2771         (-[WKFileUploadPanel _documentPickerMenuMediaTypes]):
2772         Call UTIsForMIMETypes(). Fall back to the all-encompassing
2773         "public.item" UTI.
2774
2775         (-[WKFileUploadPanel _photoLibraryButtonLabel]):
2776         (-[WKFileUploadPanel _cameraButtonLabel]):
2777         Factored out of -_showMediaSourceSelectionSheet. Return the
2778         appropriate label for the camera button, based on whether it can take a
2779         photo or video, or return nil if the camera is not available.
2780
2781         (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
2782         Changed to use -_cameraButtonLabel and
2783         -_presentForCurrentInterfaceIdiom:.
2784
2785         (-[WKFileUploadPanel _showDocumentPickerMenu]):
2786         Create a UIDocumentMenuViewController, and populate it with options to
2787         open the photo library or take a picture or video. If iCloud Drive or
2788         other document sources are available, they will be added automatically.
2789
2790         (-[WKFileUploadPanel _presentForCurrentInterfaceIdiom:]):
2791         (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
2792         (-[WKFileUploadPanel documentMenuWasCancelled:]):
2793         (-[WKFileUploadPanel documentPicker:didPickDocumentAtURL:]):
2794         (-[WKFileUploadPanel documentPickerWasCancelled:]):
2795         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2796
2797         (-[_WKImageFileUploadItem initWithFilePath:originalImage:]): Deleted.
2798         (-[_WKImageFileUploadItem fileURL]): Deleted.
2799         (-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]): Deleted.
2800         (-[_WKVideoFileUploadItem fileURL]): Deleted.
2801
2802 2015-03-11  Enrica Casucci  <enrica@apple.com>
2803
2804         Adopt new API for keyboard event handling.
2805         https://bugs.webkit.org/show_bug.cgi?id=142602
2806         rdar://problem/19966087
2807
2808         Reviewed by Sam Weinig.
2809
2810         Adopts the new API.
2811
2812         * UIProcess/ios/WKContentViewInteraction.mm:
2813         (-[WKContentView _didHandleKeyEvent:]):
2814
2815 2015-03-12  Alexey Proskuryakov  <ap@apple.com>
2816
2817         testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
2818         https://bugs.webkit.org/show_bug.cgi?id=138687
2819
2820         Reviewed by Carlos Garcia Campos.
2821
2822         * UIProcess/WebCookieManagerProxy.cpp:
2823         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Don't change system-wide
2824         cookie accept policy when in testing mode. Also, update the policy in WebProcesses too,
2825         as we still do some networking there.
2826
2827         * UIProcess/WebProcessPool.h:
2828         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2829         (WKBundleSetAlwaysAcceptCookies): Deleted.
2830         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2831         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2832         (WebKit::InjectedBundle::setAlwaysAcceptCookies): Deleted.
2833         * WebProcess/InjectedBundle/InjectedBundle.h:
2834         Remove WKBundleSetAlwaysAcceptCookies SPI, as WKTR now uses an API in UI process.
2835
2836 2015-03-12  Anders Carlsson  <andersca@apple.com>
2837
2838         WKErrorDomain should be declared nonnull
2839         https://bugs.webkit.org/show_bug.cgi?id=142628
2840
2841         Reviewed by Antti Koivisto.
2842
2843         Add WK_ASSUME_NONNULL_BEGIN and WK_ASSUME_NONNULL_END so everything will be implicitly nonnull.
2844
2845         * UIProcess/API/Cocoa/WKError.h:
2846
2847 2015-03-12  Ian Henderson  <ian@ianhenderson.org>
2848
2849         PDFs don't snapshot properly in iOS Safari
2850         https://bugs.webkit.org/show_bug.cgi?id=142623
2851
2852         Reviewed by Tim Horton.
2853
2854         * UIProcess/API/Cocoa/WKWebView.mm:
2855         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2856         If we have a _customContentView, use UIView snapshotting instead of
2857         trying to snapshot the web page.
2858
2859 2015-03-12  Eric Carlson  <eric.carlson@apple.com>
2860
2861         [Mac] Update AirPlay handling
2862         https://bugs.webkit.org/show_bug.cgi?id=142541
2863
2864         Unreviewed, respond to post-review comments and add previously reviewed changes
2865         missed by a bungled merge.
2866
2867         * Shared/mac/WebCoreArgumentCodersMac.mm:
2868         * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp:
2869         (WebKit::WebMediaPlaybackTargetPickerProxy::~WebMediaPlaybackTargetPickerProxy):
2870         * UIProcess/mac/PageClientImpl.h:
2871         * UIProcess/mac/PageClientImpl.mm:
2872         (WebKit::PageClientImpl::createPlaybackTargetPicker):
2873         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Added.
2874         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Added.
2875         * WebKit2.xcodeproj/project.pbxproj:
2876         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2877         * WebProcess/WebCoreSupport/WebChromeClient.h:
2878         * WebProcess/WebPage/WebPage.h:
2879         * WebProcess/WebPage/WebPage.messages.in:
2880         * WebProcess/WebPage/mac/WebPageMac.mm:
2881         * WebProcess/com.apple.WebProcess.sb.in:
2882
2883 2015-03-11  Antti Koivisto  <antti@apple.com>
2884
2885         Cache traversal missing large entries
2886         https://bugs.webkit.org/show_bug.cgi?id=142601
2887
2888         Reviewed by Andreas Kling.
2889
2890         When traversing cache entries we only read the header data from disk. This didn't work
2891         correctly for entries larger than the read size.
2892
2893         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2894         (WebKit::NetworkCache::IOChannel::read):
2895
2896             Partial reads only receive one callback with 'done' set to true.
2897             Ensure we actually return data in this case.
2898
2899         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2900         (WebKit::NetworkCache::decodeEntryHeader):
2901
2902             Add some logging.
2903
2904 2015-03-11  Eric Carlson  <eric.carlson@apple.com>
2905
2906         [Mac] Update AirPlay handling
2907         https://bugs.webkit.org/show_bug.cgi?id=142541
2908
2909         Reviewed by Sam Weinig.
2910
2911         * Shared/WebCoreArgumentCoders.h:
2912         * Shared/mac/WebCoreArgumentCodersMac.mm:
2913         (IPC::ArgumentCoder<AVPlaybackTarget>::encode):
2914         (IPC::ArgumentCoder<AVPlaybackTarget>::decode):
2915         * UIProcess/PageClient.h:
2916         * UIProcess/WebAVPlaybackTargetPickerProxy.cpp: Added.
2917         (WebKit::WebAVPlaybackTargetPickerProxy::WebAVPlaybackTargetPickerProxy):
2918         (WebKit::WebAVPlaybackTargetPickerProxy::~WebAVPlaybackTargetPickerProxy):
2919         (WebKit::WebAVPlaybackTargetPickerProxy::showPlaybackTargetPicker):
2920         (WebKit::WebAVPlaybackTargetPickerProxy::startingMonitoringPlaybackTargets):
2921         (WebKit::WebAVPlaybackTargetPickerProxy::stopMonitoringPlaybackTargets):
2922         * UIProcess/WebAVPlaybackTargetPickerProxy.h: Added.
2923         (WebKit::WebAVPlaybackTargetPickerProxy::Client::~Client):
2924         * UIProcess/WebPageProxy.cpp:
2925         (WebKit::WebPageProxy::devicePickerProxy):
2926         (WebKit::WebPageProxy::showPlaybackTargetPicker):
2927         (WebKit::WebPageProxy::startingMonitoringPlaybackTargets):
2928         (WebKit::WebPageProxy::stopMonitoringPlaybackTargets):
2929         (WebKit::WebPageProxy::didChoosePlaybackTarget):
2930         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
2931         * UIProcess/WebPageProxy.h:
2932         * UIProcess/WebPageProxy.messages.in:
2933         * UIProcess/mac/PageClientImpl.h:
2934         * UIProcess/mac/PageClientImpl.mm:
2935         (WebKit::PageClientImpl::createPlaybackTargetPicker):
2936         * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.h: Added.
2937         * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.mm: Added.
2938         (WebKit::WebAVPlaybackTargetPickerProxyMac::create):
2939         (WebKit::WebAVPlaybackTargetPickerProxyMac::WebAVPlaybackTargetPickerProxyMac):
2940         (WebKit::WebAVPlaybackTargetPickerProxyMac::~WebAVPlaybackTargetPickerProxyMac):
2941         (WebKit::WebAVPlaybackTargetPickerProxyMac::outputeDeviceAvailabilityChangedTimerFired):
2942         (WebKit::WebAVPlaybackTargetPickerProxyMac::availableDevicesDidChange):
2943         (WebKit::WebAVPlaybackTargetPickerProxyMac::devicePicker):
2944         (WebKit::WebAVPlaybackTargetPickerProxyMac::showPlaybackTargetPicker):
2945         (WebKit::WebAVPlaybackTargetPickerProxyMac::currentDeviceDidChange):
2946         (WebKit::WebAVPlaybackTargetPickerProxyMac::startingMonitoringPlaybackTargets):
2947         (WebKit::WebAVPlaybackTargetPickerProxyMac::stopMonitoringPlaybackTargets):
2948         (-[WebAVOutputDevicePickerMenuControllerHelper initWithCallback:]):
2949         (-[WebAVOutputDevicePickerMenuControllerHelper clearCallback]):
2950         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
2951         * WebKit2.xcodeproj/project.pbxproj:
2952         * WebProcess/WebCoreSupport/WebAVPlaybackTargetPicker.cpp: Added.
2953         (WebKit::WebAVPlaybackTargetPicker::WebAVPlaybackTargetPicker):
2954         (WebKit::WebAVPlaybackTargetPicker::showPlaybackDevicePicker):
2955         (WebKit::WebAVPlaybackTargetPicker::configureWireLessTargetMonitoring):
2956         (WebKit::WebAVPlaybackTargetPicker::addClient):
2957         (WebKit::WebAVPlaybackTargetPicker::removeClient):
2958         (WebKit::WebAVPlaybackTargetPicker::didChoosePlaybackTarget):
2959         (WebKit::WebAVPlaybackTargetPicker::playbackTargetAvailabilityDidChange):
2960         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2961         (WebKit::WebChromeClient::showPlaybackTargetPicker):
2962         (WebKit::WebChromeClient::startingMonitoringPlaybackTargets):
2963         (WebKit::WebChromeClient::stopMonitoringPlaybackTargets):
2964         * WebProcess/WebCoreSupport/WebChromeClient.h:
2965         * WebProcess/WebPage/WebPage.h:
2966         * WebProcess/WebPage/WebPage.messages.in:
2967         * WebProcess/WebPage/mac/WebPageMac.mm:
2968         (WebKit::WebPage::playbackTargetSelected):
2969         (WebKit::WebPage::playbackTargetAvailabilityDidChange):
2970         * WebProcess/com.apple.WebProcess.sb.in:
2971
2972 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
2973
2974         Fix the build
2975
2976         Unreviewed.
2977
2978         * Shared/Downloads/mac/DownloadMac.mm:
2979         (WebKit::Download::start):
2980         (WebKit::Download::resume):
2981
2982 2015-03-10  Sam Weinig  <sam@webkit.org>
2983
2984         Allow adding a button in input elements for auto fill related functionality
2985         <rdar://problem/19782066>
2986         https://bugs.webkit.org/show_bug.cgi?id=142564
2987
2988         Reviewed by Anders Carlsson.
2989
2990         - Adds new SPI to respond to clicks on the AutoFill button (both bundle and UIProcess).
2991         - Adds new SPI to enable/disable the display of the AutoFill button on an element.
2992         - Adds new SPI to get the bounds of the AutoFill button.
2993         - Updates spelling of AutoFill to be consistent.
2994
2995         * UIProcess/API/APIUIClient.h:
2996         (API::UIClient::didClickAutoFillButton):
2997         * UIProcess/API/C/WKPage.cpp:
2998         (WKPageSetPageUIClient):
2999         * UIProcess/API/C/WKPageUIClient.h:
3000         * UIProcess/WebPageProxy.cpp:
3001         (WebKit::WebPageProxy::handleAutoFillButtonClick):
3002         * UIProcess/WebPageProxy.h:
3003         * UIProcess/WebPageProxy.messages.in:
3004         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
3005         (API::InjectedBundle::PageUIClient::didClickAutoFillButton):
3006         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
3007         (WebKit::InjectedBundlePageUIClient::didClickAutoFillButton):
3008         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3009         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3010         (WebKit::WebChromeClient::handleAutoFillButtonClick):
3011         * WebProcess/WebCoreSupport/WebChromeClient.h:
3012         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
3013         Pipe the didClickAutoFillButton to the SPI layer.
3014
3015         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
3016         (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
3017         (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
3018         Update for new spelling of AutoFill.
3019
3020         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3021         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3022         (WKBundleNodeHandleGetHTMLInputElementAutoFilled):
3023         (WKBundleNodeHandleSetHTMLInputElementAutoFilled):
3024         Added. Replaces WKBundleNodeHandleGetHTMLInputElementAutofilled/WKBundleNodeHandleSetHTMLInputElementAutofilled
3025         which are now deprecated due to inconsistent spelling of AutoFill.
3026
3027         (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
3028         (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
3029         (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
3030         Added.
3031
3032         (WKBundleNodeHandleGetHTMLInputElementAutofilled):
3033         (WKBundleNodeHandleSetHTMLInputElementAutofilled):
3034         Deprecated.
3035
3036         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3037         (WebKit::InjectedBundleNodeHandle::getOrCreate):
3038         (WebKit::InjectedBundleNodeHandle::create):
3039         (WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
3040         (WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
3041         (WebKit::InjectedBundleNodeHandle::coreNode):
3042         (WebKit::InjectedBundleNodeHandle::document):
3043         (WebKit::InjectedBundleNodeHandle::elementBounds):
3044         (WebKit::InjectedBundleNodeHandle::renderRect):
3045         (WebKit::InjectedBundleNodeHandle::renderedImage):
3046         (WebKit::InjectedBundleNodeHandle::visibleRange):
3047         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
3048         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilled):
3049         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilled):
3050         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled):
3051         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled):
3052         (WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds):
3053         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
3054         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
3055         (WebKit::InjectedBundleNodeHandle::isTextField):
3056         (WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
3057         (WebKit::InjectedBundleNodeHandle::documentFrame):
3058         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
3059         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
3060         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): Deleted.
3061         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): Deleted.
3062         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3063         Fix-up InjectedBundleNodeHandle to store its underlying Node in a Ref, rather than a RefPtr.
3064         Add helpers to implement the new SPI for WKBundleNodeHandleRef.
3065
3066 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
3067
3068         Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
3069         https://bugs.webkit.org/show_bug.cgi?id=142549
3070
3071         Reviewed by Simon Fraser.
3072
3073         * Shared/WebPreferencesDefinitions.h:
3074         * WebProcess/WebPage/WebPage.cpp:
3075         (WebKit::WebPage::updatePreferences):
3076         Flip the pref on by default.
3077
3078 2015-03-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3079
3080         [GTK] Do not look for child processes in the UI process binary path
3081         https://bugs.webkit.org/show_bug.cgi?id=135752
3082
3083         Reviewed by Gustavo Noronha Silva.
3084
3085         It's only useful for internal tools and tests, but never when
3086         installed, since we don't install the processes in the bin dir but
3087         in the libexec dir.
3088
3089         * Shared/gtk/ProcessExecutablePathGtk.cpp:
3090         (WebKit::findWebKitProcess): Only look or the executables in the
3091         UI process binary path or WEBKIT_EXEC_PATH for development builds.
3092         * UIProcess/API/gtk/WebKitWebContext.cpp:
3093         (injectedBundleDirectory): Only check
3094         WEBKIT_INJECTED_BUNDLE_PATH env var for development builds.
3095
3096 2015-03-10  Antti Koivisto  <antti@apple.com>
3097
3098         Add interface to delete disk cache entries
3099         https://bugs.webkit.org/show_bug.cgi?id=142546
3100
3101         Reviewed by Anders Carlsson.
3102
3103         * NetworkProcess/cache/NetworkCache.cpp:
3104         (WebKit::NetworkCache::Cache::remove):
3105         * NetworkProcess/cache/NetworkCache.h:
3106         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3107         (WebKit::NetworkCache::Storage::Storage):
3108         (WebKit::NetworkCache::Storage::remove):
3109
3110             Move deletion to a serial queue so we can't create large number of threads.
3111
3112         (WebKit::NetworkCache::Storage::dispatchReadOperation):
3113         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
3114         (WebKit::NetworkCache::Storage::removeEntry): Deleted.
3115         * NetworkProcess/cache/NetworkCacheStorage.h:
3116         (WebKit::NetworkCache::Storage::deleteQueue):
3117
3118 2015-03-10  Chris Dumez  <cdumez@apple.com>
3119
3120         5 tests fail on Apple Mac WK2 performance bots
3121         https://bugs.webkit.org/show_bug.cgi?id=142485
3122
3123         Reviewed by Andreas Kling.
3124
3125         Only log errors in debug builds if SandboxExtension::createHandle() fails
3126         so that performance tests don't fail because of it. Such error is not
3127         fatal and is expected under certain circumstances. In particular,
3128         SandboxExtension::createHandle() is sometimes called for non-existing
3129         files (e.g. from NetworkResourceLoadParameters::encode()).
3130
3131         * Shared/mac/SandboxExtensionMac.mm:
3132         (WebKit::SandboxExtension::createHandle):
3133
3134 2015-03-10  Timothy Horton  <timothy_horton@apple.com>
3135
3136         Fix the build
3137
3138         * Shared/Downloads/ios/DownloadIOS.mm:
3139         (WebKit::Download::startWithHandle):
3140         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
3141         (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
3142
3143 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3144
3145         [GTK] Contents not shown when entering AC mode unless the window is resized
3146         https://bugs.webkit.org/show_bug.cgi?id=142347
3147
3148         Reviewed by Žan Doberšek.
3149
3150         The problem is once again that we are now creating the redirected
3151         X window in realize method. When entering AC mode we resize the
3152         redirected window to the drawing area size. Since the size hasn't
3153         changed from the drawing area point of view, the web process is
3154         not notified. The WebProcess always uses the window size, instead
3155         of the root layer size, to make sure it's in sync, see the comment
3156         in LayerTreeHostGtk::compositeLayersToContext(). So, we need to
3157         enforce a resize when we change the size of the redirected window
3158         when entering AC mode.
3159
3160         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3161         (webkitWebViewBaseEnterAcceleratedCompositingMode):
3162         * UIProcess/DrawingAreaProxyImpl.h:
3163         (WebKit::DrawingAreaProxyImpl::forceResize):
3164
3165 2015-03-10  Csaba Osztrogonác  <ossy@webkit.org>
3166
3167         [cmake] Handle unused parameter warnings as build errors except in WebKit2
3168         https://bugs.webkit.org/show_bug.cgi?id=142338
3169
3170         Reviewed by Gyuyoung Kim.
3171
3172         * CMakeLists.txt:
3173
3174 2015-03-10  Dan Bernstein  <mitz@apple.com>
3175
3176         WebKit2 part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
3177         https://bugs.webkit.org/show_bug.cgi?id=142461
3178
3179         Reviewed by Sam Weinig.
3180
3181         * UIProcess/API/Cocoa/WKWebView.mm:
3182         (-[WKWebView initWithFrame:configuration:]): Initialize
3183         webPageConfiguration.treatsSHA1SignedCertificatesAsInsecure from the WKWebViewConfiguration.
3184
3185         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3186         Added _treatsSHA1SignedCertificatesAsInsecure ivar.
3187         (-[WKWebViewConfiguration copyWithZone:]): Copy _treatsSHA1SignedCertificatesAsInsecure.
3188         (-[WKWebViewConfiguration _treatsSHA1SignedCertificatesAsInsecure]): Added this getter.
3189         (-[WKWebViewConfiguration _setTreatsSHA1SignedCertificatesAsInsecure:]): Added this setter.
3190
3191         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared new
3192         _treatsSHA1SignedCertificatesAsInsecure property.
3193
3194         * UIProcess/PageLoadState.cpp:
3195         (WebKit::PageLoadState::didCommitLoad): Use new hasInsecureContent parameter to initialize
3196         hasInsecureContent parameter in the uncommitted state.
3197         * UIProcess/PageLoadState.h:
3198
3199         * UIProcess/WebPageProxy.cpp:
3200         (WebKit::WebPageProxy::WebPageProxy): Initialize new m_treatsSHA1CertificatesAsInsecure
3201         member variable from the WebPageConfiguration.
3202         (WebKit::WebPageProxy::didCommitLoadForFrame): Pass true for the new hasInsecureContent to
3203         PageLoadState::didCommitLoad if we are treating SHA1-signed certificates as insecure and
3204         the certificate info contains a non-root SHA1-signed certificate.
3205         * UIProcess/WebPageProxy.h: Added m_treatsSHA1CertificatesAsInsecure member variable.
3206
3207 2015-03-09  Geoffrey Garen  <ggaren@apple.com>
3208
3209         bmalloc: tryFastMalloc shouldn't crash
3210         https://bugs.webkit.org/show_bug.cgi?id=142443
3211
3212         Reviewed by Anders Carlsson.
3213
3214         Part 1: Stop using tryFastRealloc.
3215
3216         * Shared/ShareableBitmap.cpp:
3217         (WebKit::ShareableBitmap::resize): Deleted.
3218         * Shared/ShareableBitmap.h: Removed the resize function because it has
3219         no clients.
3220
3221         * WebProcess/Plugins/PluginProxy.cpp:
3222         (WebKit::PluginProxy::updateBackingStore): Changed to allocate a new
3223         backing store instead of resizing the old one. This has three advantages:
3224
3225         (1) Might be more memory-efficient, since you don't have to keep the old
3226         one around while allocating the new one.
3227
3228         (2) Avoids the overhead of realloc() copying the contents of the old
3229         backing store even though we only want uninitialized memory.
3230
3231         (3) Makes resize failure consistent with initial allocation failure.
3232         Previously, while initial allocation failure would set the backing store
3233         to null, resize failure would keep the old wrong backing store and then
3234         tell it not to paint. Now, resize failure also sets the backing store to
3235         null.
3236
3237 2015-03-09  Martin Robinson  <mrobinson@igalia.com>
3238
3239         [EFL] Move DispatchQueue to WTF
3240         https://bugs.webkit.org/show_bug.cgi?id=142493
3241
3242         Reviewed by Csaba Osztrogonác.
3243
3244         * PlatformEfl.cmake: Remove DispatchQueue from the source list.
3245
3246 2015-03-08  Dean Jackson  <dino@apple.com>
3247
3248         [iOS Media] Video buffer progress missing on iPhones
3249         https://bugs.webkit.org/show_bug.cgi?id=142462
3250
3251         Reviewed by Eric Carlson.
3252
3253         Coordinate the SetBufferedTime message between the Web and UI
3254         processes.
3255
3256         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: New message SetBufferedTime.
3257         * WebProcess/ios/WebVideoFullscreenManager.h:
3258         * WebProcess/ios/WebVideoFullscreenManager.mm:
3259         (WebKit::WebVideoFullscreenManager::setBufferedTime):
3260
3261 2015-03-08  Sam Weinig  <sam@webkit.org>
3262
3263         [Content Extensions] Add scaffolding for the WKUserContentExtensionStore
3264         https://bugs.webkit.org/show_bug.cgi?id=142464
3265
3266         Reviewed by Dan Bernstein.
3267
3268         * Shared/API/APIObject.h:
3269         Add a UserContentExtensionStore type and move the UserContentExtension type into the correct section (UIProcess).
3270
3271         * Shared/API/c/WKBase.h:
3272         Add the WKUserContentExtensionStoreRef C-SPI type.
3273
3274         * Shared/Cocoa/APIObject.mm:
3275         (API::Object::newObject):
3276         Add allocation support for UserContentExtensionStore (and UserContentExtension while we are there, it will be
3277         needed shortly).
3278
3279         * UIProcess/API/APIUserContentExtensionStore.cpp: Added.
3280         (API::UserContentExtensionStore::UserContentExtensionStore):
3281         (API::UserContentExtensionStore::~UserContentExtensionStore):
3282         * UIProcess/API/APIUserContentExtensionStore.h: Added.
3283         Stub out the UserContentExtensionStore.
3284
3285         * UIProcess/API/C/WKAPICast.h:
3286         Add casting for the UserContentExtensionStore.
3287
3288         * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp: Added.
3289         (WKUserContentExtensionStoreGetTypeID):
3290         * UIProcess/API/C/WKUserContentExtensionStoreRef.h: Added.
3291         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h: Added.
3292         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm: Added.
3293         (-[_WKUserContentExtensionStore init]):
3294         (-[_WKUserContentExtensionStore dealloc]):
3295         (-[_WKUserContentExtensionStore _apiObject]):
3296         * UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h: Added.
3297         (WebKit::wrapper):
3298         Stub out SPI for the UserContentExtensionStore.
3299
3300         * WebKit2.xcodeproj/project.pbxproj:
3301         * CMakeLists.txt:
3302         Add new files.
3303
3304 2015-03-08  Sam Weinig  <sam@webkit.org>
3305
3306         AX: Expose a frame's accessible name through WK2 C SPI
3307         <rdar://problem/19653068>
3308         https://bugs.webkit.org/show_bug.cgi?id=142468
3309
3310         Reviewed by Dan Bernstein.
3311
3312         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3313         (WKBundleFrameSetAccessibleName):
3314         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3315         * WebProcess/WebPage/WebFrame.cpp:
3316         (WebKit::WebFrame::setAccessibleName):
3317         * WebProcess/WebPage/WebFrame.h:
3318         Add SPI to set a frame's accessible name. This matches the Legacy WebKit SPI -[WebFrame setAccessibleName:]. 
3319
3320 2015-03-08  Sam Weinig  <sam@webkit.org>
3321
3322         [Content Extensions] Pass compiled content extensions as read-only shared memory rather than copying them
3323         https://bugs.webkit.org/show_bug.cgi?id=142458
3324
3325         Reviewed by Dan Bernstein.
3326
3327         * Shared/WebCompiledContentExtensionData.cpp:
3328         (WebKit::WebCompiledContentExtensionData::encode):
3329         (WebKit::WebCompiledContentExtensionData::decode):
3330         * Shared/WebCompiledContentExtensionData.h:
3331         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
3332         Store the compiled data as a SharedMemory block with offset/size pairs for the
3333         bytecode and actions. While the bytecode offset is currently always 0, this won't
3334         be the case when we map these in from files due to metadata that will be placed
3335         at the top of the files.
3336
3337         * Shared/WebCompiledContentExtension.h:
3338         * Shared/WebCompiledContentExtension.cpp:
3339         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
3340         Temporary creation helper. In subsequent patches, this will be removed and replaced
3341         by always passing in shared/mapped data.
3342
3343         (WebKit::WebCompiledContentExtension::create):
3344         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
3345         (WebKit::WebCompiledContentExtension::bytecode):
3346         (WebKit::WebCompiledContentExtension::bytecodeLength):
3347         (WebKit::WebCompiledContentExtension::actions):
3348         (WebKit::WebCompiledContentExtension::actionsLength):
3349         Convert to work with the new WebCompiledContentExtension format.
3350         
3351         * UIProcess/API/C/WKUserContentFilterRef.cpp:
3352         (WKUserContentFilterCreate):
3353         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
3354         (-[_WKUserContentFilter initWithName:serializedRules:]):
3355         Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().
3356
3357         * WebProcess/UserContent/WebUserContentController.cpp:
3358         (WebKit::WebUserContentController::addUserContentExtensions):
3359         * WebProcess/WebPage/WebPageGroupProxy.cpp:
3360         (WebKit::WebPageGroupProxy::addUserContentExtension):
3361         Update to pass the WebCompiledContentExtensionData directly to the WebCompiledContentExtension.
3362
3363 2015-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3364
3365         Remove willDestroyFrame in WKBundlePageLoaderClient
3366         https://bugs.webkit.org/show_bug.cgi?id=142389
3367
3368         Reviewed by Anders Carlsson.
3369
3370         I added willDestroyFrame in r154540 but I realized recently that
3371         it has never actually worked. Adding the callback to
3372         WKBundlePageLoaderClient was the first mistake, since frames are
3373         handled by WebProcess and DidDestroyFrame message is indeed a
3374         WebProcessProxy not a WebPageProxy one. Second mistake was calling
3375         the callback from WebFrameLoaderClient::frameLoaderDestroyed(),
3376         since at that point the frame has already been detached from the
3377         page and so WebFrame::page() always returns nullptr. So, this in
3378         fact dead code and since r180211 nobody is using it.
3379
3380         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
3381         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3382         (webkitWebPageCreate): Use verion 6 instead of version 7 of loader client.
3383         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3384         (WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): Deleted.
3385         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3386         (WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
3387
3388 2015-03-06  Sam Weinig  <sam@webkit.org>
3389
3390         [Content Extensions] Move compiling of content extensions to the UIProcess
3391         https://bugs.webkit.org/show_bug.cgi?id=142402
3392
3393         Reviewed by Benjamin Poulain.
3394
3395         * Shared/API/APIObject.h:
3396         Rename UserContentFilter type to UserContentExtension to match new unified naming.
3397
3398         * Shared/WebCompiledContentExtension.cpp: Added.
3399         (WebKit::WebCompiledContentExtension::create):
3400         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
3401         (WebKit::WebCompiledContentExtension::~WebCompiledContentExtension):
3402         (WebKit::WebCompiledContentExtension::bytecode):
3403         (WebKit::WebCompiledContentExtension::bytecodeLength):
3404         (WebKit::WebCompiledContentExtension::actions):
3405         (WebKit::WebCompiledContentExtension::actionsLength):
3406         * Shared/WebCompiledContentExtension.h: Added.
3407         Add new WebKit2 implementation of CompiledContentExtension. Right now it is the same as the old
3408         WebCore based CompiledContentExtension, but in subsequent patches, it will use shared/file backed
3409         memory.
3410
3411         * Shared/WebCompiledContentExtensionData.cpp: Added.
3412         (WebKit::WebCompiledContentExtensionData::encode):
3413         (WebKit::WebCompiledContentExtensionData::decode):
3414         * Shared/WebCompiledContentExtensionData.h: Added.
3415         Add encodable/decodable holder for the compiled content extension data for use in IPC. Right
3416         now it is doing the naive thing and always copying the data, but in subsequent patches, it will
3417         use shared/file backed memory.
3418
3419         * Shared/WebPageGroupData.cpp:
3420         (WebKit::WebPageGroupData::encode):
3421         (WebKit::WebPageGroupData::decode):
3422         * Shared/WebPageGroupData.h:
3423         Rename member to match new unification on the name userContentExtension. Change the value from
3424         the serialized JSON (as a String) to WebCompiledContentExtensionData.
3425
3426         * UIProcess/API/APIUserContentExtension.cpp: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.cpp.
3427         (API::UserContentExtension::UserContentExtension):
3428         (API::UserContentExtension::~UserContentExtension):
3429         (API::UserContentFilter::UserContentFilter): Deleted.
3430         (API::UserContentFilter::~UserContentFilter): Deleted.
3431         * UIProcess/API/APIUserContentExtension.h: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.h.
3432         * UIProcess/API/APIUserContentFilter.cpp: Removed.
3433         * UIProcess/API/APIUserContentFilter.h: Removed.
3434         Renamed UserContentFilter to APIUserContentExtension. Updated to store the compiled extension (as a WebCompiledContentExtension)
3435         rather than the serialized JSON.
3436
3437         * UIProcess/API/C/WKAPICast.h:
3438         * UIProcess/API/C/WKPageGroup.cpp:
3439         (WKPageGroupAddUserContentFilter):
3440         (WKPageGroupRemoveUserContentFilter):
3441         (WKPageGroupRemoveAllUserContentFilters):
3442         * UIProcess/API/C/WKUserContentControllerRef.cpp:
3443         (WKUserContentControllerAddUserContentFilter):
3444         (WKUserContentControllerRemoveAllUserContentFilters):
3445         * UIProcess/API/Cocoa/WKUserContentController.mm:
3446         (-[WKUserContentController _addUserContentFilter:]):
3447         (-[WKUserContentController _removeUserContentFilter:]):
3448         (-[WKUserContentController _removeAllUserContentFilters]):
3449         Update for rename of APIUserContentFilter -> UserContentExtension.
3450
3451         * UIProcess/API/C/WKUserContentFilterRef.cpp:
3452         (WKUserContentFilterGetTypeID):
3453         (WKUserContentFilterCreate):
3454         Update for rename of APIUserContentFilter -> UserContentExtension. Also make WKUserContentFilterCreate eagerly
3455         compile rule list to a WebCompiledContentExtensionData.
3456
3457         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
3458         (-[_WKUserContentFilter initWithName:serializedRules:]):
3459         (-[_WKUserContentFilter dealloc]):
3460         (-[_WKUserContentFilter _apiObject]):
3461         Update for rename of APIUserContentFilter -> UserContentExtension. Also make initWithName:serializedRules: eagerly
3462         compile rule list to a WebCompiledContentExtensionData.
3463
3464         * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
3465         (WebKit::wrapper):
3466         Update for rename of APIUserContentFilter -> UserContentExtension.
3467
3468         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3469         (WebKit::WebUserContentControllerProxy::addProcess):
3470         (WebKit::WebUserContentControllerProxy::addUserContentExtension):
3471         (WebKit::WebUserContentControllerProxy::removeUserContentExtension):
3472         (WebKit::WebUserContentControllerProxy::removeAllUserContentExtensions):
3473         (WebKit::WebUserContentControllerProxy::addUserContentFilter): Deleted.
3474         (WebKit::WebUserContentControllerProxy::removeUserContentFilter): Deleted.
3475         (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters): Deleted.
3476         * UIProcess/UserContent/WebUserContentControllerProxy.h:
3477         * UIProcess/WebPageGroup.cpp:
3478         (WebKit::WebPageGroup::addUserContentExtension):
3479         (WebKit::WebPageGroup::removeUserContentExtension):
3480         (WebKit::WebPageGroup::removeAllUserContentExtensions):
3481         (