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