Null deref in _clearImmediateActionState when closing a view with a DataDetectors...
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-02-08  Timothy Horton  <timothy_horton@apple.com>
2
3         Null deref in _clearImmediateActionState when closing a view with a DataDetectors popover open
4         https://bugs.webkit.org/show_bug.cgi?id=141377
5         <rdar://problem/19711203>
6
7         Reviewed by Darin Adler.
8
9         * UIProcess/mac/WKImmediateActionController.mm:
10         (-[WKImmediateActionController _clearImmediateActionState]):
11         We can have already detached the page when DataDetectors calls us back
12         in interactionStoppedHandler. While we have kept a strong reference to the
13         page in the interactionStoppedHandler block, _page is nulled out.
14         It's OK to avoid doing this work, in any case, because closing a page
15         tears down the TextIndicator anyway.
16
17 2015-02-08  Chris Dumez  <cdumez@apple.com>
18
19         [WK2] Add logging to validate the network cache efficacy (Part 1)
20         https://bugs.webkit.org/show_bug.cgi?id=141269
21         <rdar://problem/19632080>
22
23         Reviewed by Antti Koivisto.
24
25         Add console logging to validate the network cache efficacy. This will
26         tell us if how the network cache satisties requests, in particular:
27         - Request cannot be handled by the cache
28         - Entry was not in the cache but is no longer there (pruned)
29         - Entry is in the cache but is not usable
30         - Entry is in the cache and is used.
31
32         This patch introduces a SQLite-based network cache statistics storage
33         that is used to store requests we have seen before, and query if we
34         have seen a request before. The storage is lightweight as it only
35         stores hashes in the database, in a background thread.
36
37         The statistics cache is initially bootstapped from the network disk
38         cache so that we have data initially and get as accurate statistics
39         as possible from the start.
40
41         To maintain an acceptable level of performance, we have a hard limit
42         on the number of unique requests that are retained set to 100000.
43
44         Diagnostic logging for this will be added in a follow-up patch.
45
46 2015-02-07  Chris Dumez  <cdumez@apple.com>
47
48         Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
49         https://bugs.webkit.org/show_bug.cgi?id=141321
50
51         Reviewed by Darin Adler.
52
53         Use new Vector::removeFirstMatching() / removeAllMatching() methods.
54
55 2015-02-07  Tim Horton  <timothy_horton@apple.com>
56
57         Add API::HistoryClient and split some things out of API::NavigationClient
58         https://bugs.webkit.org/show_bug.cgi?id=141264
59
60         Reviewed by Darin Adler.
61
62         * UIProcess/API/APIHistoryClient.h: Added.
63         (API::HistoryClient::~HistoryClient):
64         (API::HistoryClient::didNavigateWithNavigationData):
65         (API::HistoryClient::didPerformClientRedirect):
66         (API::HistoryClient::didPerformServerRedirect):
67         (API::HistoryClient::didUpdateHistoryTitle):
68         * UIProcess/API/APINavigationClient.h:
69         (API::NavigationClient::didNavigateWithNavigationData): Deleted.
70         (API::NavigationClient::didPerformClientRedirect): Deleted.
71         (API::NavigationClient::didPerformServerRedirect): Deleted.
72         (API::NavigationClient::didUpdateHistoryTitle): Deleted.
73         * UIProcess/Cocoa/NavigationState.h:
74         * UIProcess/Cocoa/NavigationState.mm:
75         (WebKit::NavigationState::createHistoryClient):
76         (WebKit::NavigationState::HistoryClient::HistoryClient):
77         (WebKit::NavigationState::HistoryClient::~HistoryClient):
78         (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
79         (WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
80         (WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
81         (WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
82         (WebKit::NavigationState::NavigationClient::didNavigateWithNavigationData): Deleted.
83         (WebKit::NavigationState::NavigationClient::didPerformClientRedirect): Deleted.
84         (WebKit::NavigationState::NavigationClient::didPerformServerRedirect): Deleted.
85         (WebKit::NavigationState::NavigationClient::didUpdateHistoryTitle): Deleted.
86         * UIProcess/WebPageProxy.cpp:
87         (WebKit::WebPageProxy::setHistoryClient):
88         (WebKit::WebPageProxy::didNavigateWithNavigationData):
89         (WebKit::WebPageProxy::didPerformClientRedirect):
90         (WebKit::WebPageProxy::didPerformServerRedirect):
91         (WebKit::WebPageProxy::didUpdateHistoryTitle):
92         * UIProcess/WebPageProxy.h:
93         Add a API::HistoryClient and move the few things that belong on it out of API::NavigationClient.
94         Adjust accordingly in WebPageProxy and NavigationState.
95
96         * UIProcess/API/Cocoa/WKWebView.mm:
97         (-[WKWebView initWithFrame:configuration:]):
98         (-[WKWebView setNavigationDelegate:]):
99         (-[WKWebView setUIDelegate:]):
100         (-[WKWebView _setHistoryDelegate:]):
101         Lazily push the NavigationState/UIDelegate clients down to WebPageProxy upon
102         installation of a delegate, so that alternative (C SPI) delegate setters can
103         be separately created.
104
105         * WebKit2.xcodeproj/project.pbxproj:
106
107 2015-02-07  Antti Koivisto  <antti@apple.com>
108
109         And as a further followup restore the 8bit test too.
110
111         * NetworkProcess/cache/NetworkCacheKey.cpp:
112         (WebKit::hashString):
113
114 2015-02-07  Antti Koivisto  <antti@apple.com>
115
116         Use longer hashes for cache keys
117         https://bugs.webkit.org/show_bug.cgi?id=141356
118
119         Rubber-stamped by Darin Adler.
120
121         Folloup and build fix.
122
123         * NetworkProcess/cache/NetworkCacheCoders.h:
124         * NetworkProcess/cache/NetworkCacheKey.cpp:
125         (WebKit::hashString):
126
127             Use containsOnlyASCII instead of is8Bit so both paths always compute the same hash.
128
129         * NetworkProcess/cache/NetworkCacheKey.h:
130
131 2015-02-07  Antti Koivisto  <antti@apple.com>
132
133         Remove a printf.
134
135         * NetworkProcess/cache/NetworkCache.cpp:
136         (WebKit::NetworkCache::retrieve):
137
138 2015-02-07  Antti Koivisto  <antti@apple.com>
139
140         Use longer hashes for cache keys
141         https://bugs.webkit.org/show_bug.cgi?id=141356
142
143         Reviewed by Darin Adler.
144
145         The current key hashes are 32bit. We should use longer hashes to eliminate collisions.
146
147         This patch switches us to using MD5 digests for the cache key hashes. As a result the file names for the cache
148         entries grow from 8 to 32 character.
149
150         Note that we don't need a cryptographic hash (full cache keys are verified against the entries).
151         MD5 just happens to be fast, convenient and available.
152
153         The patch also moves the whole cache hierarchy down to a versioned subdirectory ("WebKitCache/Version 2")
154         and deletes any old style cache files if they exist.
155
156         * NetworkProcess/cache/NetworkCacheCoders.cpp:
157         (WebKit::NetworkCacheCoder<MD5::Digest>::encode):
158         (WebKit::NetworkCacheCoder<MD5::Digest>::decode):
159         * NetworkProcess/cache/NetworkCacheCoders.h:
160         * NetworkProcess/cache/NetworkCacheKey.cpp:
161         (WebKit::NetworkCacheKey::NetworkCacheKey):
162         (WebKit::hashString):
163         (WebKit::NetworkCacheKey::computeHash):
164         (WebKit::NetworkCacheKey::hashAsString):
165         (WebKit::NetworkCacheKey::stringToHash):
166         * NetworkProcess/cache/NetworkCacheKey.h:
167         (WebKit::NetworkCacheKey::shortHash):
168         (WebKit::NetworkCacheKey::toShortHash):
169
170             32bit hash to use in the bloom filter.
171
172         (WebKit::NetworkCacheKey::hashStringLength):
173         * NetworkProcess/cache/NetworkCacheStorage.h:
174
175             Bump the version.
176
177         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
178         (WebKit::traverseCacheFiles):
179         (WebKit::makeVersionedDirectoryPath):
180         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
181         (WebKit::NetworkCacheStorage::initialize):
182         (WebKit::NetworkCacheStorage::removeEntry):
183         (WebKit::NetworkCacheStorage::retrieve):
184         (WebKit::NetworkCacheStorage::store):
185         (WebKit::NetworkCacheStorage::update):
186         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
187         (WebKit::NetworkCacheStorage::deleteOldVersions):
188
189             Wipe out the version 1 cache.
190
191 2015-02-06  Chris Dumez  <cdumez@apple.com>
192
193         Have SQLiteStatement::database() return a reference
194         https://bugs.webkit.org/show_bug.cgi?id=141348
195
196         Reviewed by Andreas Kling.
197
198         Have SQLiteStatement::database() return a reference as it can never
199         return null.
200
201         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
202         (WebKit::SQLiteIDBCursor::internalAdvanceOnce):
203
204 2015-02-06  Alexey Proskuryakov  <ap@apple.com>
205
206         Report network process crashes during layout tests
207         https://bugs.webkit.org/show_bug.cgi?id=139646
208
209         Reviewed by Anders Carlsson.
210
211         Added a way to get network process pid, modeled after how we do this for web process.
212
213         * UIProcess/API/C/mac/WKContextPrivateMac.h:
214         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
215         (WKContextGetNetworkProcessIdentifier):
216         * UIProcess/WebProcessPool.cpp:
217         (WebKit::WebProcessPool::networkProcessCrashed): Don't reset m_networkProcess until
218         after calling the client, so that the client could retrieve its pid.
219         (WebKit::WebProcessPool::networkProcessIdentifier):
220         * UIProcess/WebProcessPool.h:
221
222 2015-02-05  Timothy Hatcher  <timothy@apple.com>
223
224         Support overriding the deviceScaleFactor per WKWebView/WKView
225         https://bugs.webkit.org/show_bug.cgi?id=141311
226
227         Reviewed by Tim Horton.
228
229         * UIProcess/API/Cocoa/WKViewPrivate.h:
230         * UIProcess/API/Cocoa/WKWebView.mm:
231         (-[WKWebView _setOverrideDeviceScaleFactor:]):
232         (-[WKWebView _overrideDeviceScaleFactor]):
233         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
234         * UIProcess/API/mac/WKView.mm:
235         (-[WKView _intrinsicDeviceScaleFactor]):
236         (-[WKView _setOverrideDeviceScaleFactor:]):
237         (-[WKView _overrideDeviceScaleFactor]):
238
239 2015-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>
240
241         [GTK] Remove WebKitWebView::close-notification signal
242         https://bugs.webkit.org/show_bug.cgi?id=141330
243
244         Reviewed by Gustavo Noronha Silva.
245
246         In favor of a WebKitNotification::closed signal and
247         webkit_notification_close() method that both applications and
248         WebKit can use to close a notification. This also fixes the
249         onclose event that was not fired when the notification was
250         closed. It also brings back padding space in WebKitWebViewClass.
251
252         * UIProcess/API/gtk/WebKitNotification.cpp:
253         (webkit_notification_class_init): Add WebKitNotification::closed signal.
254         (webkit_notification_close): Emit WebKitNotification::closed.
255         * UIProcess/API/gtk/WebKitNotification.h:
256         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
257         (WebKitNotificationProvider::notificationCloseCallback): Callback
258         for WebKitNotification::closed signal that notifies the WebProcess
259         and removes the notification from the map.
260         (WebKitNotificationProvider::show): Connect to WebKitNotification::closed.
261         (WebKitNotificationProvider::cancelNotificationByID): Call webkit_notification_close().
262         * UIProcess/API/gtk/WebKitNotificationProvider.h:
263         * UIProcess/API/gtk/WebKitWebView.cpp:
264         (notifyNotificationClosed): The user closed the annotation, call
265         webkit_notification_close().
266         (webNotificationClosed): The WebKitNotification has been closed,
267         close the libnotify notification if it hasn't been closed yet.
268         (webkitWebViewShowNotification): Create the libnotifiy
269         notification if needed and associate it to the WebKitNotification
270         as user data. Connect to the closed signal of both, the libnotifiy
271         notification and the WebKit notification.
272         (webkitWebViewCloseNotification): Deleted.
273         (webkit_web_view_class_init): Remove close-notification signal and
274         the default hanlder.
275         (webkitWebViewEmitCloseNotification): Deleted.
276         * UIProcess/API/gtk/WebKitWebView.h:
277         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
278         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add webkit_notification_close.
279
280 2015-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>
281
282         ASSERTION FAILED: !m_adoptionIsRequired in WTF::RefCountedBase::ref
283         https://bugs.webkit.org/show_bug.cgi?id=141035
284
285         Reviewed by Sergio Villar Senin.
286
287         Rename PrinterListGtk::singleton() as PrinterListGtk::getOrCreate(), and
288         make it return nullptr when the shared PrinterListGtk object is
289         still being created. This can happen if the nested loop used by
290         gtk_enumerate_printers dispatches a GSource that starts a new
291         synchronous print operation. In that case we just ignore the
292         second print operation, since there's already one ongoing.
293
294         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
295         (WebKit::WebChromeClient::print): Return early if
296         PrinterListGtk::getOrCreate() return nullptr.
297         * WebProcess/WebPage/gtk/PrinterListGtk.cpp:
298         (WebKit::PrinterListGtk::getOrCreate): Return nullptr if the
299         PrinterListGtk is still enumerating the printers.
300         (WebKit::PrinterListGtk::PrinterListGtk): Initialize
301         m_enumeratingPrinters to true before calling
302         gtk_enumerate_printers, and to false once it finishes.
303         (WebKit::PrinterListGtk::singleton): Deleted.
304         (WebKit::PrinterListGtk::enumeratePrintersFunction): Deleted.
305         * WebProcess/WebPage/gtk/PrinterListGtk.h:
306         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Add an
307         assertion here since PrinterListGtk::getOrCreate() should never
308         return nullptr at this point.
309
310 2015-02-05  Tim Horton  <timothy_horton@apple.com>
311
312         Null deref in ViewGestureController::beginSwipeGesture when swiping while script is navigating
313         https://bugs.webkit.org/show_bug.cgi?id=141308
314         <rdar://problem/18460046>
315
316         Reviewed by Simon Fraser.
317
318         * UIProcess/mac/ViewGestureControllerMac.mm:
319         (WebKit::ViewGestureController::trackSwipeGesture):
320         If script navigates (history.back, probably other cases too) while in the middle of
321         building up enough scroll events to start a swipe, it can destroy the history item
322         that we were planning to swipe to. If this happens, bail from the swipe.
323
324 2015-02-05  Alexey Proskuryakov  <ap@apple.com>
325
326         Don't pass architecture to development plug-in XPC services
327         https://bugs.webkit.org/show_bug.cgi?id=141309
328
329         Reviewed by Anders Carlsson.
330
331         We now have separate services for 32-bit and 64-bit.
332
333         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
334         (WebKit::reexec):
335         (WebKit::XPCServiceEventHandler):
336         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
337         (WebKit::connectToReExecService):
338
339 2015-02-05  Chris Dumez  <cdumez@apple.com>
340
341         Use deleteEmptyDirectory() in NetworkCacheStorage::clear()
342         https://bugs.webkit.org/show_bug.cgi?id=141314
343
344         Reviewed by Antti Koivisto.
345
346         Use deleteEmptyDirectory() in NetworkCacheStorage::clear() to simplify
347         the code a little bit.
348
349         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
350         (WebKit::NetworkCacheStorage::clear):
351
352 2015-02-05  Joseph Pecoraro  <pecoraro@apple.com>
353
354         [iOS] Remove False Positive dispatch_source Leak in WebMemoryPressureHandler singleton
355         https://bugs.webkit.org/show_bug.cgi?id=141307
356
357         Reviewed by Anders Carlsson.
358
359         * UIProcess/ios/WebMemoryPressureHandlerIOS.h:
360         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
361         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
362         We want to keep the dispatch_source around, so just tie it to the
363         singleton so that it is not reported as a leak.
364
365 2015-02-05  Antti Koivisto  <antti@apple.com>
366
367         Switch to file backed buffer when resource is cached to disk
368         https://bugs.webkit.org/show_bug.cgi?id=141295
369
370         Reviewed by Chris Dumez.
371
372         Wire the DidCacheResource mechanism to the new disk cache.
373
374         * NetworkProcess/NetworkResourceLoader.cpp:
375         (WebKit::NetworkResourceLoader::didFinishLoading):
376
377             Send DidCacheResource message to the web process so it can switch the resource to file backing.
378
379         * NetworkProcess/cache/NetworkCache.cpp:
380         (WebKit::NetworkCache::store):
381         (WebKit::NetworkCache::update):
382         * NetworkProcess/cache/NetworkCache.h:
383         * NetworkProcess/cache/NetworkCacheStorage.h:
384         (WebKit::DispatchPtr::DispatchPtr):
385         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
386         (WebKit::NetworkCacheStorage::Data::Data):
387         (WebKit::mapFile):
388         (WebKit::decodeEntry):
389         (WebKit::retrieveActive):
390         (WebKit::NetworkCacheStorage::retrieve):
391         (WebKit::NetworkCacheStorage::store):
392
393             Map files larger than a memory page after a successful store.
394
395         (WebKit::NetworkCacheStorage::update):
396         (WebKit::encodeEntry): Deleted.
397
398 2015-02-05  Chris Dumez  <cdumez@apple.com>
399
400         [WK2] Properly check for mmap() error case
401         https://bugs.webkit.org/show_bug.cgi?id=141304
402
403         Reviewed by Anders Carlsson.
404
405         mmap() returns MAP_FAILED, which is (void*)-1, not a null pointer in
406         case of failure. This patch updates several wrong error checks in
407         WebKit2.
408
409         * Platform/IPC/ArgumentEncoder.cpp:
410         (IPC::allocBuffer):
411         (IPC::ArgumentEncoder::reserve):
412         * Platform/IPC/mac/ConnectionMac.mm:
413         (IPC::Connection::sendOutgoingMessage):
414
415 2015-02-05  Brian J. Burg  <burg@cs.washington.edu>
416
417         Clean up WebInspectorProxy and use simpler inspector levels design
418         https://bugs.webkit.org/show_bug.cgi?id=141135
419
420         Reviewed by Timothy Hatcher.
421
422         Inspector levels used to be managed by keeping a set of WebPageGroup
423         instances and doing pointer comparisons to check whether the inspected
424         view is itself a web inspector instance. This is unnecessary, as we
425         can maintain a mapping from WebPageProxy* to its corresponding level.
426
427         When an inspector instance is created, it is inserted into the mapping
428         along with its level. An inspector's level is 1 unless its inspected page
429         is in the mapping, then it is one greater that the inspected page's level.
430
431         The level is provided by inspectorLevel(), rather than a member variable.
432         WebInspectorProxy is created in the constructor of WebPageProxy. Thus, there
433         would be no chance to add the inspector page's level to the mapping before the
434         next level inspector tries to look it up when initializing its members.
435
436         This patch introduces other miscellaneous cleanups, such as naming m_page
437         to m_inspectedPage, using Ref and using an enum class for the attachment side.
438
439         * UIProcess/API/C/WKInspector.cpp:
440         (WKInspectorGetPage):
441         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
442         (resizeWebKitWebViewBaseFromAllocation):
443         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
444         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
445         * UIProcess/WebInspectorProxy.cpp:
446         (WebKit::pageLevelMap):
447         (WebKit::WebInspectorProxy::WebInspectorProxy):
448         (WebKit::WebInspectorProxy::inspectorLevel):
449         (WebKit::WebInspectorProxy::inspectorPageGroupIdentifier):
450         (WebKit::WebInspectorProxy::inspectorPagePreferences):
451         (WebKit::WebInspectorProxy::invalidate):
452         (WebKit::WebInspectorProxy::isFront):
453         (WebKit::WebInspectorProxy::connect):
454         (WebKit::WebInspectorProxy::show):
455         (WebKit::WebInspectorProxy::hide):
456         (WebKit::WebInspectorProxy::close):
457         (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
458         (WebKit::WebInspectorProxy::showConsole):
459         (WebKit::WebInspectorProxy::showResources):
460         (WebKit::WebInspectorProxy::showMainResourceForFrame):
461         (WebKit::WebInspectorProxy::attachBottom):
462         (WebKit::WebInspectorProxy::attachRight):
463         (WebKit::WebInspectorProxy::attach):
464         (WebKit::WebInspectorProxy::detach):
465         (WebKit::WebInspectorProxy::togglePageProfiling):
466         (WebKit::WebInspectorProxy::isInspectorPage):
467         (WebKit::decidePolicyForNavigationAction):
468         (WebKit::WebInspectorProxy::remoteFrontendConnected):
469         (WebKit::WebInspectorProxy::remoteFrontendDisconnected):
470         (WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend):
471         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
472         (WebKit::WebInspectorProxy::createInspectorPage):
473         (WebKit::WebInspectorProxy::didClose):
474         (WebKit::WebInspectorPageGroups::singleton): Deleted.
475         (WebKit::WebInspectorPageGroups::inspectorLevel): Deleted.
476         (WebKit::WebInspectorPageGroups::isInspectorPageGroup): Deleted.
477         (WebKit::WebInspectorPageGroups::inspectorPageGroupLevel): Deleted.
478         (WebKit::WebInspectorPageGroups::inspectorPageGroupForLevel): Deleted.
479         (WebKit::WebInspectorPageGroups::createInspectorPageGroup): Deleted.
480         (WebKit::WebInspectorProxy::~WebInspectorProxy): Deleted.
481         (WebKit::WebInspectorProxy::inspectorPageGroup): Deleted.
482         (WebKit::WebInspectorProxy::setAttachedWindowHeight): Deleted.
483         (WebKit::WebInspectorProxy::enableRemoteInspection): Deleted.
484         (WebKit::WebInspectorProxy::open): Deleted.
485         * UIProcess/WebInspectorProxy.h:
486         (WebKit::WebInspectorProxy::create):
487         (WebKit::WebInspectorProxy::inspectedPage):
488         (WebKit::WebInspectorProxy::page): Deleted.
489         * UIProcess/efl/WebInspectorProxyEfl.cpp:
490         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
491         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
492         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
493         (WebKit::WebInspectorProxy::dockButtonClicked):
494         (WebKit::WebInspectorProxy::createInspectorWindow):
495         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
496         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
497         (WebKit::WebInspectorProxy::platformAttach):
498         (WebKit::WebInspectorProxy::platformDetach):
499         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
500         (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
501         * UIProcess/mac/WebInspectorProxyMac.mm:
502         (-[WKWebInspectorProxyObjCAdapter attachRight:]):
503         (-[WKWebInspectorProxyObjCAdapter attachBottom:]):
504         (WebKit::WebInspectorProxy::createInspectorWindow):
505         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
506         (WebKit::WebInspectorProxy::platformBringToFront):
507         (WebKit::WebInspectorProxy::windowFrameDidChange):
508         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
509         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
510         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
511         (WebKit::WebInspectorProxy::platformAttach):
512         (WebKit::WebInspectorProxy::platformDetach):
513         (-[WKWebInspectorProxyObjCAdapter close]): Deleted.
514
515 2015-02-05  Chris Dumez  <cdumez@apple.com>
516
517         [WK2][Cocoa] Populate m_contentsFilter bloom filter from the main dispatch queue NetworkCacheStorage::initialize()
518         https://bugs.webkit.org/show_bug.cgi?id=141297
519
520         Reviewed by Antti Koivisto.
521
522         Populate m_contentsFilter bloom filter from the main dispatch queue
523         NetworkCacheStorage::initialize() to avoid thread-safety issues.
524
525         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
526         (WebKit::NetworkCacheStorage::initialize):
527
528 2015-02-05  Chris Dumez  <cdumez@apple.com>
529
530         Use deleteFile() in NetworkCacheStorageCocoa.mm
531         https://bugs.webkit.org/show_bug.cgi?id=141299
532
533         Reviewed by Antti Koivisto.
534
535         Use deleteFile() in NetworkCacheStorageCocoa.mm to simplify the code
536         a bit.
537
538         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
539         (WebKit::NetworkCacheStorage::removeEntry):
540         (WebKit::NetworkCacheStorage::clear):
541         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
542
543 2015-02-04  Antti Koivisto  <antti@apple.com>
544
545         Avoid copying std::functions across threads in NetworkCacheStorage
546         https://bugs.webkit.org/show_bug.cgi?id=141273
547
548         Reviewed by Andreas Kling.
549
550         The current approach is risky. There is possiblity that captured variables are
551         deleted in an unexpected thread.
552
553         * NetworkProcess/cache/NetworkCache.cpp:
554         (WebKit::NetworkCache::retrieve):
555
556             The capture trick here is no longer needed.
557
558         * NetworkProcess/cache/NetworkCacheStorage.h:
559
560             For each cache operation we create Retrive/Store/UpdateOperation object kept alive by the active operation map.
561             This object captures all parameters of the operation including the lambda. When the operation completes
562             the object is removed from the map in the main thread, ensuring safe destruction.
563
564         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
565         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
566         (WebKit::NetworkCacheStorage::dispatchPendingRetrieveOperations):
567         (WebKit::retrieveActive):
568
569             Instead of maintaining a separate write cache we just look through the active write and update maps.
570
571         (WebKit::NetworkCacheStorage::retrieve):
572
573             Use fixed sized priority array rather than a dynamic one. Vector<Deque<std::unique_ptr>> doesn't quite work.
574
575         (WebKit::NetworkCacheStorage::store):
576         (WebKit::NetworkCacheStorage::update):
577         (WebKit::NetworkCacheStorage::clear):
578
579 2015-02-05  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
580
581         [Streams API] Implement a barebone ReadableStream interface
582         https://bugs.webkit.org/show_bug.cgi?id=141045
583
584         Reviewed by Benjamin Poulain.
585
586         * CMakeLists.txt:
587         * Configurations/FeatureDefines.xcconfig:
588
589 2015-02-04  Joseph Pecoraro  <pecoraro@apple.com>
590
591         [iOS] Selection callout does not follow selection when double-tap scrolling
592         https://bugs.webkit.org/show_bug.cgi?id=141214
593
594         Reviewed by Benjamin Poulain.
595
596         Implement the delegate that gets called after UIScrollView
597         setContentOffset animations. When scrolling to a rect, do the normal
598         willScroll, didScroll actions to update the selection assistant.
599
600         * UIProcess/API/Cocoa/WKWebView.mm:
601         (-[WKWebView _scrollToRect:origin:minimumScrollDistance:]):
602         (-[WKWebView scrollViewDidEndScrollingAnimation:]):
603
604 2015-02-04  Simon Fraser  <simon.fraser@apple.com>
605
606         [iOS WK2] Layers that are created and destroyed in the same transaction shouldn't be encoded
607         https://bugs.webkit.org/show_bug.cgi?id=141228
608
609         Reviewed by Tim Horton.
610         
611         With UI-side compositing, it was possible for layers to get created and
612         destroyed in the same transaction (e.g. two layouts before a single layer
613         tree commit). When that happened we would encode layer creation properties
614         but not encode layer properties, since the layer would be unreachable.
615         
616         Fix by removing deleted layers from the created layers list, which is
617         converted into a map for easy searching.
618
619         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
620         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
621         (WebKit::RemoteLayerTreeContext::layerWasCreated):
622         (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
623         (WebKit::RemoteLayerTreeContext::buildTransaction):
624
625 2015-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
626
627         Build with seccomp filters broken since r179409
628         https://bugs.webkit.org/show_bug.cgi?id=141206
629
630         Reviewed by Darin Adler.
631
632         Fix build by renaming SeccompBrokerClient::shared to SeccompBrokerClient::singleton.
633
634         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
635         (WebKit::SeccompBrokerClient::singleton):
636         (WebKit::SeccompBroker::initialize):
637         (WebKit::SeccompBrokerClient::shared):
638         (WebKit::SeccompBroker::runLoop):
639
640 2015-02-04  Simon Fraser  <simon.fraser@apple.com>
641
642         [iOS WK2] Assert in ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() on tab switching
643         https://bugs.webkit.org/show_bug.cgi?id=141223
644         rdar://problem/18458993
645
646         Reviewed by Tim Horton.
647
648         It's possible to submit a RemoteLayerTree transaction that contains data
649         about a created layer, but doesn't have any properties for that layer. This
650         happens when the newly created layer isn't reached during the traversal that
651         gathers layer properties (i.e. it's not rooted). However, whether we create
652         a scrolling layer or not requires having properties; they are missing, so we
653         create a normal layer, but then the scrolling tree commit asserts that we
654         should have a scrolling layer.
655         
656         Fix by making scrolling layers have a corresponding layer type, which is
657         stored in layer creation properties. This required exposing layer types
658         up through GraphicsLayer, but that allows for some nice cleanup:
659         
660         1. No need to have the hokey shouldUseTiledBacking() GraphicsLayerClient hack
661            for creating the page tiled layer.
662         2. The notion of "custom behaviors" can be removed from GraphicsLayer entirely.
663
664         * Shared/mac/RemoteLayerBackingStore.mm:
665         (WebKit::RemoteLayerBackingStore::drawInContext):
666         * Shared/mac/RemoteLayerTreeTransaction.h:
667         * Shared/mac/RemoteLayerTreeTransaction.mm:
668         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
669         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
670         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
671         (WebKit::dumpChangedLayers):
672         (WebKit::RemoteLayerTreeTransaction::description):
673         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
674         (WebKit::RemoteLayerTreeHost::createLayer):
675         * UIProcess/mac/RemoteLayerTreeHost.mm:
676         (WebKit::RemoteLayerTreeHost::createLayer):
677         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
678         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
679         (WebKit::PlatformCALayerRemote::customBehavior): Deleted.
680         (WebKit::PlatformCALayerRemote::updateCustomBehavior): Deleted.
681         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
682         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
683         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
684         (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
685
686 2015-02-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
687
688         [EFL][WK2] Manage failing API tests
689         https://bugs.webkit.org/show_bug.cgi?id=141250
690
691         Reviewed by Csaba Osztrogonác.
692
693         * PlatformEfl.cmake: Skip to test test_ewk2_storage_manager.
694         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Disable 2 unit test functions.
695         (TEST_F):
696
697 2015-02-04  Chris Dumez  <cdumez@apple.com>
698
699         Add removeFirst(value) / removeAll(value) methods to WTF::Vector
700         https://bugs.webkit.org/show_bug.cgi?id=141192
701
702         Reviewed by Benjamin Poulain.
703
704         Use new Vector::removeFirst(value) / removeAll(value) API to simplify the
705         code a bit.
706
707         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
708         (WebKit::WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol):
709         * UIProcess/PageLoadState.cpp:
710         (WebKit::PageLoadState::removeObserver):
711         * UIProcess/WebProcessPool.cpp:
712         (WebKit::WebProcessPool::~WebProcessPool):
713         (WebKit::WebProcessPool::disconnectProcess):
714         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
715         (EwkExtension::remove):
716
717 2015-02-03  Chris Dumez  <cdumez@apple.com>
718
719         Unreviewed attempt to fix GTK/EFL build after r179588.
720
721         Add new files to CMakeLists.txt.
722
723         * CMakeLists.txt:
724
725 2015-02-03  Shivakumar JM  <shiva.jm@samsung.com>
726
727         Fix build warning in WebKit2/Platform/IPC module.
728         https://bugs.webkit.org/show_bug.cgi?id=141229
729
730         Reviewed by Chris Dumez.
731
732         Fix build warning by using UNUSED_PARAM macro.
733
734         * Platform/IPC/Connection.cpp:
735         (IPC::Connection::sendMessage):
736
737 2015-02-03  Tim Horton  <timothy_horton@apple.com>
738
739         Add WKPageNavigationClient as C SPI around API::NavigationClient, and adopt in WKTR
740         https://bugs.webkit.org/show_bug.cgi?id=141217
741
742         * UIProcess/API/C/WKPageRenderingProgressEventsInternal.h:
743         Include, not import.
744
745 2015-02-03  Tim Horton  <timothy_horton@apple.com>
746
747         Add WKPageNavigationClient as C SPI around API::NavigationClient, and adopt in WKTR
748         https://bugs.webkit.org/show_bug.cgi?id=141217
749
750         Reviewed by Sam Weinig.
751
752         * Shared/API/c/WKBase.h:
753         * UIProcess/API/C/WKAPICast.h:
754         * UIProcess/API/C/WKFrameInfoRef.cpp: Added.
755         (WKFrameInfoGetTypeID):
756         * UIProcess/API/C/WKFrameInfoRef.h: Added.
757         * UIProcess/API/C/WKNavigationActionRef.cpp: Added.
758         (WKNavigationActionGetTypeID):
759         * UIProcess/API/C/WKNavigationActionRef.h: Added.
760         * UIProcess/API/C/WKNavigationRef.cpp: Added.
761         (WKNavigationGetTypeID):
762         * UIProcess/API/C/WKNavigationRef.h: Added.
763         * UIProcess/API/C/WKNavigationResponseRef.cpp: Added.
764         (WKNavigationResponseGetTypeID):
765         (WKNavigationResponseCanShowMIMEType):
766         * UIProcess/API/C/WKNavigationResponseRef.h: Added.
767         Add tiny C wrappers around API::{FrameInfo, NavigationAction, Navigation, NavigationResponse}.
768
769         * UIProcess/API/APINavigationClient.h:
770         (API::NavigationClient::decidePolicyForPluginLoad):
771         Add a default implementation of decidePolicyForPluginLoad.
772
773         * UIProcess/API/C/WKPage.cpp:
774         (WKPageSetPageNavigationClient):
775         * UIProcess/API/C/WKPage.h:
776         Add WKPageSetPageNavigationClient, which connects API::NavigationClient to
777         the new WKPageNavigationClient C SPI.
778         
779         * UIProcess/API/C/WKPageNavigationClient.h: Added.
780         Add WKPageNavigationClient, which one can use in place of WKPageLoaderClient
781         and WKPagePolicyClient and which has the same semantics as the Modern ObjC API
782         (including things like API::Navigation as WKNavigationRef, etc.)
783
784         * UIProcess/API/C/WKPageLoaderClient.h:
785         * UIProcess/API/C/WKPageRenderingProgressEvents.h: Added.
786         * UIProcess/API/C/WKPageRenderingProgressEventsInternal.h: Added.
787         (pageRenderingProgressEvents):
788         * UIProcess/API/C/WKPluginLoadPolicy.h: Added.
789         Pull some enums out into their own files (WKPageRenderingProgressEvents is
790         duplicated from the Modern ObjC API's _WKRenderingProgressEvents, WKPluginLoadPolicy
791         is pulled out of WKPageLoaderClient).
792
793         * UIProcess/WebPageProxy.cpp:
794         (WebKit::WebPageProxy::findPlugin):
795         Add an equivalent of pluginLoadPolicy to the NavigationClient.
796
797         * WebKit2.xcodeproj/project.pbxproj:
798
799 2015-02-03  Timothy Horton  <timothy_horton@apple.com>
800
801         Every PageOverlayClientImpl leaks
802         https://bugs.webkit.org/show_bug.cgi?id=141224
803         <rdar://problem/19652939>
804
805         Reviewed by Simon Fraser.
806
807         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
808         (WKBundlePageOverlayCreate):
809         * WebProcess/WebPage/WebPageOverlay.cpp:
810         (WebKit::WebPageOverlay::create):
811         (WebKit::WebPageOverlay::WebPageOverlay):
812         (WebKit::WebPageOverlay::pageOverlayDestroyed):
813         (WebKit::WebPageOverlay::willMoveToPage):
814         (WebKit::WebPageOverlay::didMoveToPage):
815         (WebKit::WebPageOverlay::drawRect):
816         (WebKit::WebPageOverlay::mouseEvent):
817         (WebKit::WebPageOverlay::didScrollFrame):
818         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
819         (WebKit::WebPageOverlay::dataDetectorsDidPresentUI):
820         (WebKit::WebPageOverlay::dataDetectorsDidChangeUI):
821         (WebKit::WebPageOverlay::dataDetectorsDidHideUI):
822         (WebKit::WebPageOverlay::copyAccessibilityAttributeStringValueForPoint):
823         (WebKit::WebPageOverlay::copyAccessibilityAttributeBoolValueForPoint):
824         (WebKit::WebPageOverlay::copyAccessibilityAttributeNames):
825         * WebProcess/WebPage/WebPageOverlay.h:
826         (WebKit::WebPageOverlay::client):
827         Keep the PageOverlayClientImpl as a unique_ptr instead of a leaked reference,
828         ensuring that it's cleaned up when the WebPageOverlay is torn down.
829
830 2015-02-03  Chris Dumez  <cdumez@apple.com>
831
832         Drop ResourceLoadPriorityUnresolved resource load priority and use Optional<> instead
833         https://bugs.webkit.org/show_bug.cgi?id=141186
834
835         Reviewed by Antti Koivisto.
836
837         Update code now that ResourceLoadPriorityUnresolved is not longer a
838         ResourceLoadPriority enum value.
839
840         * NetworkProcess/cache/NetworkCache.cpp:
841         (WebKit::NetworkCache::retrieve):
842         * WebProcess/Network/WebResourceLoadScheduler.cpp:
843         (WebKit::WebResourceLoadScheduler::scheduleLoad):
844
845 2015-02-03  Enrica Casucci  <enrica@apple.com>
846
847         [iOS] Add support for deleteFromInputWithFlags.
848         https://bugs.webkit.org/show_bug.cgi?id=141216
849         rdar://problem/19130081
850
851         Reviewed by Benjamin Poulain.
852
853         Adopts the new method as soon as it is available.
854         The patch also removes some obsolete code used for staging.
855
856         * Platform/spi/ios/UIKitSPI.h:
857         * UIProcess/ios/WKContentViewInteraction.mm:
858         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
859
860 2015-02-03  Joseph Pecoraro  <pecoraro@apple.com>
861
862         [iOS] Selection Callout should not immediately disappear on pages with frequent layouts
863         https://bugs.webkit.org/show_bug.cgi?id=141210
864
865         Reviewed by Enrica Casucci.
866
867         In iOS WebKit2 in order to keep caret refreshes in sync with WebCore layouts
868         the selection assistant is told to update whenever WebKit's layer tree
869         commits. Unfortunately, for pages with JavaScript animation that are
870         frequently doing a layout / layer tree update, this would trigger very
871         frequent selection updates that would keep the caret from blinking and
872         dismiss any selection callouts.
873
874         This change tracks the last selection drawing information so that we can
875         avoid informing the assistant of a selection updates unless it has changed
876         visually or needs to redraw (zoom).
877
878         * Shared/EditorState.cpp:
879         Remove include already in header.
880
881         * UIProcess/ios/WKContentViewInteraction.h:
882         * UIProcess/ios/WKContentViewInteraction.mm:
883         (WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
884         (WebKit::operator==):
885         (WebKit::operator!=):
886         (-[WKContentView observeValueForKeyPath:ofObject:change:context:]):
887         When zooming, force the selection update, even though the drawing
888         information hasn't changed, the views will need to be updated.
889
890         (-[WKContentView _updateChangedSelection]):
891         (-[WKContentView _updateChangedSelection:]):
892         Monitor EditorState for changes in selection drawing and avoid
893         informing the selection assistant unless necessary.
894
895 2015-02-03  Jeremy Jones  <jeremyj@apple.com>
896
897         Prevent flicker when exiting fullscreen by synchronizing transactions.
898         https://bugs.webkit.org/show_bug.cgi?id=140897
899
900         Reviewed by Tim Horton.
901
902         Flush transactions before removing layerHost. This allows existing transactions to be completed before the hosting layer disappears.
903
904         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
905         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
906
907 2015-02-03  Brian J. Burg  <burg@cs.washington.edu>
908
909         Convert WebInspectorProxy to use WKWebView API for the inspector view
910         https://bugs.webkit.org/show_bug.cgi?id=141037
911
912         Reviewed by Timothy Hatcher.
913
914         Use the newer API for PLATFORM(MAC). The main difference is that the
915         WKWebView's page group cannot be set directly; instead, the group identifier
916         is passed. Also add some preference setters needed for the inspector.
917
918         Refactor some code to not use page groups directly. In a future patch,
919         the PageGroup-based inspector level system will be simplified. It is
920         it is no longer necessary to keep a static map of PageGroup instances,
921         since they are only used to save inspector window preferences. (These used
922         to prevent all levels of inspector from pausing together when a second-level
923         inspector hit a breakpoint. This is not necessary with multi-process
924         web inspectors.)
925
926         Also, adjust window resizing behavior when the inspector is docked to
927         the right. Window width resizes should not affect the width of the inspector
928         frame. This matches the behavior of height changes when docked to the bottom.
929
930         To support 32-bit Mac builds where WKWebView is not defined, share the stub
931         platformFoo() implementations with PLATFORM(IOS). The stubs are now located
932         in the platform-independent WebInspectorProxy.cpp.
933
934         * UIProcess/API/Cocoa/WKPreferences.mm:
935         (-[WKPreferences _logsPageMessagesToSystemConsoleEnabled]): Added.
936         (-[WKPreferences _setLogsPageMessagesToSystemConsoleEnabled:]): Added.
937         (-[WKPreferences _allowFileAccessFromFileURLs]): Added.
938         (-[WKPreferences _setAllowFileAccessFromFileURLs:]): Added.
939         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
940         * UIProcess/WebInspectorProxy.cpp:
941         (WebKit::WebInspectorProxy::WebInspectorProxy):
942         (WebKit::WebInspectorProxy::inspectorPagePreferences):
943         (WebKit::WebInspectorProxy::attach):
944         (WebKit::WebInspectorProxy::detach):
945         (WebKit::WebInspectorProxy::setAttachedWindowHeight):
946         (WebKit::WebInspectorProxy::setAttachedWindowWidth):
947         (WebKit::WebInspectorProxy::createInspectorPage):
948         (WebKit::WebInspectorProxy::shouldOpenAttached):
949         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
950         (WebKit::WebInspectorProxy::platformOpen):
951         (WebKit::WebInspectorProxy::platformDidClose):
952         (WebKit::WebInspectorProxy::platformInvalidate):
953         (WebKit::WebInspectorProxy::platformBringToFront):
954         (WebKit::WebInspectorProxy::platformHide):
955         (WebKit::WebInspectorProxy::platformIsFront):
956         (WebKit::WebInspectorProxy::platformInspectedURLChanged):
957         (WebKit::WebInspectorProxy::platformSave):
958         (WebKit::WebInspectorProxy::platformAppend):
959         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
960         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
961         (WebKit::WebInspectorProxy::platformAttach):
962         (WebKit::WebInspectorProxy::platformDetach):
963         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
964         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
965         (WebKit::WebInspectorProxy::inspectorPageURL):
966         (WebKit::WebInspectorProxy::inspectorTestPageURL):
967         (WebKit::WebInspectorProxy::inspectorBaseURL):
968         (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
969         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
970         * UIProcess/WebInspectorProxy.h:
971         * UIProcess/ios/WebInspectorProxyIOS.mm: Removed.
972         * UIProcess/mac/WebInspectorProxyMac.mm:
973         (-[WKWebInspectorWKWebView _didRelaunchProcess]):
974         WKWebView doesn't implement this, so remove the super call.
975         (WebKit::WebInspectorProxy::closeTimerFired):
976         (WebKit::createDockButton):
977         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
978         (WebKit::WebInspectorProxy::platformAttach):
979         (-[WKWebInspectorWKView _didRelaunchProcess]): Deleted.
980         * WebKit2.xcodeproj/project.pbxproj:
981
982 2015-02-03  Antti Koivisto  <antti@apple.com>
983
984         Memory cache for resources pending disk write
985         https://bugs.webkit.org/show_bug.cgi?id=141159
986
987         Reviewed by Andreas Kling.
988
989         If a resource was requested from the disk cache before it has been written we ended up
990         loading it again. Add a short lived memory cache to avoid this.
991
992         * NetworkProcess/cache/NetworkCache.cpp:
993         (WebKit::decodeStorageEntry):
994         * NetworkProcess/cache/NetworkCacheStorage.h:
995         (WebKit::NetworkCacheStorage::Data::isMap):
996
997             Add a way to know whether a Data is backed by map or not. SharedMemory does not work correctly
998             if it is not a map.
999
1000         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1001         (WebKit::NetworkCacheStorage::Data::Data):
1002         (WebKit::NetworkCacheStorage::initialize):
1003
1004             Also do some renaming.
1005
1006         (WebKit::decodeEntry):
1007         (WebKit::NetworkCacheStorage::removeEntry):
1008         (WebKit::NetworkCacheStorage::retrieve):
1009         (WebKit::NetworkCacheStorage::store):
1010         (WebKit::NetworkCacheStorage::clear):
1011         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
1012
1013 2015-02-02  Antti Koivisto  <antti@apple.com>
1014
1015         Update cache header after revalidation without rewriting the body data
1016         https://bugs.webkit.org/show_bug.cgi?id=141182
1017
1018         Reviewed by Andreas Kling.
1019
1020         Currently we just rewrite the entire entry after revalidation.
1021
1022         * NetworkProcess/cache/NetworkCache.cpp:
1023         (WebKit::decodeStorageEntry):
1024
1025             Include the strorage entry to the cache response so we can more easily update it.
1026
1027         (WebKit::NetworkCache::update):
1028
1029             Call the storage update function with the new and the exisiting storage entry.
1030
1031         * NetworkProcess/cache/NetworkCache.h:
1032         * NetworkProcess/cache/NetworkCacheStorage.h:
1033         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1034         (WebKit::openFileForKey):
1035
1036             Added an option for opening a file for writing without creating a new one.
1037             Renamed for clarity.
1038
1039         (WebKit::encodeEntryHeader):
1040
1041             Separate header encoding to a function.
1042
1043         (WebKit::encodeEntry):
1044         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
1045         (WebKit::NetworkCacheStorage::store):
1046         (WebKit::NetworkCacheStorage::update):
1047
1048             New update function.
1049             If the page-rounded header size would stay unchanged we can just write the new header over the old one.
1050             In the unlikely event it doesn't we rewrite the whole thing.
1051
1052         (WebKit::createIOChannelForKey): Deleted.
1053
1054 2015-02-02  Commit Queue  <commit-queue@webkit.org>
1055
1056         Unreviewed, rolling out r179540.
1057         https://bugs.webkit.org/show_bug.cgi?id=141190
1058
1059         need further investigation to fix !WK_API_ENABLED (32bit)
1060         build. (Requested by brrian_ on #webkit).
1061
1062         Reverted changeset:
1063
1064         "Convert WebInspectorProxy to use WKWebView API for the
1065         inspector view"
1066         https://bugs.webkit.org/show_bug.cgi?id=141037
1067         http://trac.webkit.org/changeset/179540
1068
1069 2015-02-02  Brian J. Burg  <burg@cs.washington.edu>
1070
1071         Convert WebInspectorProxy to use WKWebView API for the inspector view
1072         https://bugs.webkit.org/show_bug.cgi?id=141037
1073
1074         Reviewed by Timothy Hatcher.
1075
1076         Use the newer API for PLATFORM(MAC). The main difference is that the
1077         WKWebView's page group cannot be set directly; instead, the group identifier
1078         is passed. Also add some preference setters needed for the inspector.
1079
1080         Refactor some code to not use page groups directly. In a future patch,
1081         the PageGroup-based inspector level system will be simplified. It is
1082         it is no longer necessary to keep a static map of PageGroup instances,
1083         since they are only used to save inspector window preferences. (These used
1084         to prevent all levels of inspector from pausing together when a second-level
1085         inspector hit a breakpoint. This is not necessary with multi-process
1086         web inspectors.)
1087
1088         Also, adjust window resizing behavior when the inspector is docked to
1089         the right. Window width resizes should not affect the width of the inspector
1090         frame. This matches the behavior of height changes when docked to the bottom.
1091
1092         * UIProcess/API/Cocoa/WKPreferences.mm:
1093         (-[WKPreferences _logsPageMessagesToSystemConsoleEnabled]): Added.
1094         (-[WKPreferences _setLogsPageMessagesToSystemConsoleEnabled:]): Added.
1095         (-[WKPreferences _allowFileAccessFromFileURLs]): Added.
1096         (-[WKPreferences _setAllowFileAccessFromFileURLs:]): Added.
1097         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1098         * UIProcess/WebInspectorProxy.cpp:
1099         (WebKit::WebInspectorProxy::WebInspectorProxy):
1100         (WebKit::WebInspectorProxy::inspectorPagePreferences): Added.
1101         (WebKit::WebInspectorProxy::attach):
1102         (WebKit::WebInspectorProxy::detach):
1103         (WebKit::WebInspectorProxy::setAttachedWindowHeight):
1104         (WebKit::WebInspectorProxy::setAttachedWindowWidth):
1105         (WebKit::WebInspectorProxy::createInspectorPage):
1106         (WebKit::WebInspectorProxy::shouldOpenAttached):
1107         * UIProcess/WebInspectorProxy.h: Use default member initializers.
1108         * UIProcess/mac/WebInspectorProxyMac.mm:
1109         (-[WKWebInspectorWKWebView _didRelaunchProcess]):
1110         WKWebView doesn't implement this, so remove the super call.
1111         (WebKit::WebInspectorProxy::closeTimerFired):
1112         (WebKit::createDockButton):
1113         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1114         (WebKit::WebInspectorProxy::platformAttach):
1115         (-[WKWebInspectorWKView _didRelaunchProcess]): Deleted.
1116
1117 2015-02-02  Chris Dumez  <cdumez@apple.com>
1118
1119         Make NetworkCache's constructor private
1120         https://bugs.webkit.org/show_bug.cgi?id=141181
1121
1122         Reviewed by Antti Koivisto.
1123
1124         Make NetworkCache's constructor private and mark its destructor as
1125         deleted as it is a singleton class.
1126
1127         * NetworkProcess/cache/NetworkCache.cpp:
1128         (WebKit::NetworkCache::NetworkCache): Deleted.
1129         * NetworkProcess/cache/NetworkCache.h:
1130
1131 2015-02-02  Filip Pizlo  <fpizlo@apple.com>
1132
1133         Revert accidental (and super bad) change in r179490.
1134
1135         * WebProcess/com.apple.WebProcess.sb.in:
1136
1137 2015-02-02  Chris Dumez  <cdumez@apple.com>
1138
1139         Access MemoryCache singleton using MemoryCache::singleton()
1140         https://bugs.webkit.org/show_bug.cgi?id=141104
1141
1142         Reviewed by Andreas Kling.
1143
1144         Access MemoryCache singleton using MemoryCache::singleton() static
1145         member function, instead of a free function, as per the recent
1146         coding style discussion on WebKit-dev.
1147
1148 2015-02-02  Jeremy Jones  <jeremyj@apple.com>
1149
1150         Prevent crash when accessing WebAVPlayerController.delegate.
1151         https://bugs.webkit.org/show_bug.cgi?id=140893
1152
1153         Reviewed by Darin Adler.
1154
1155         Plumb new resetMediaState() through IPC interface WebVideoFullscreenManagerProxy.
1156
1157         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1158         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1159         (WebKit::WebVideoFullscreenManagerProxy::invalidate): remove redundant set to nullptr.
1160         * WebProcess/ios/WebVideoFullscreenManager.h:
1161         * WebProcess/ios/WebVideoFullscreenManager.mm:
1162         (WebKit::WebVideoFullscreenManager::resetMediaState):
1163
1164 2015-02-01  Chris Dumez  <cdumez@apple.com>
1165
1166         Use more references in HistoryItem
1167         https://bugs.webkit.org/show_bug.cgi?id=141133
1168
1169         Reviewed by Andreas Kling.
1170
1171         Use more references in HistoryItem instead of pointers.
1172
1173         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
1174         (WebKit::InjectedBundleBackForwardListItem::children):
1175         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
1176         (WebKit::toFrameState):
1177         (WebKit::applyFrameState):
1178         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1179         (WebKit::WebBackForwardListProxy::addItem):
1180         * WebProcess/WebPage/WebBackForwardListProxy.h:
1181
1182 2015-02-01  Dan Bernstein  <mitz@apple.com>
1183
1184         Remove ViewGestureController tracing
1185         https://bugs.webkit.org/show_bug.cgi?id=141137
1186
1187         Reviewed by Tim Horton.
1188
1189         Remove the tracing added in r176133, now that http://webkit.org/b/138750 is fixed.
1190
1191         * UIProcess/ios/ViewGestureControllerIOS.mm:
1192         (WebKit::ViewGestureController::beginSwipeGesture):
1193         (WebKit::ViewGestureController::endSwipeGesture):
1194         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
1195         (WebKit::ViewGestureController::removeSwipeSnapshot):
1196         (WebKit::addLogEntry): Deleted.
1197         (WebKit::dumpLogEntries): Deleted.
1198         * UIProcess/mac/ViewGestureController.h:
1199
1200 2015-01-31  Sam Weinig  <sam@webkit.org>
1201
1202         Remove even more Mountain Lion support
1203         https://bugs.webkit.org/show_bug.cgi?id=141124
1204
1205         Reviewed by Alexey Proskuryakov.
1206
1207         * Configurations/Base.xcconfig:
1208         * Configurations/DebugRelease.xcconfig:
1209         * Configurations/FeatureDefines.xcconfig:
1210         * Configurations/Version.xcconfig:
1211         * Configurations/WebContentService.Development.xcconfig:
1212         * Configurations/WebContentService.xcconfig:
1213         * Configurations/WebKit.xcconfig:
1214         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1215
1216 2015-01-31  Antti Koivisto  <antti@apple.com>
1217
1218         Enable WebKit disk cache on OS X
1219         https://bugs.webkit.org/show_bug.cgi?id=141022
1220
1221         Reviewed by Gavin Barraclough.
1222
1223         * config.h: Flip the switch.
1224
1225 2015-01-31  Antti Koivisto  <antti@apple.com>
1226
1227         Unreviewed, rolling out r179447.
1228
1229         Forgot to include the test.
1230
1231         Reverted changeset:
1232
1233         "Enable WebKit disk cache on OS X"
1234         https://bugs.webkit.org/show_bug.cgi?id=141022
1235         http://trac.webkit.org/changeset/179447
1236
1237 2015-01-31  Antti Koivisto  <antti@apple.com>
1238
1239         Enable WebKit disk cache on OS X
1240         https://bugs.webkit.org/show_bug.cgi?id=141022
1241
1242         Reviewed by Gavin Barraclough.
1243
1244         * config.h: Flip the switch.
1245
1246 2015-01-31  Antti Koivisto  <antti@apple.com>
1247
1248         OSObjectPtr does not work with dispatch_data_t on Maverics
1249         https://bugs.webkit.org/show_bug.cgi?id=141081
1250
1251         Reviewed by Zalan Bujtas.
1252
1253         Previous attempt to special case dispatch_data_t in OSObjectPtr didn't work in all cases
1254         probably due to the context sensitivity of the definition of the dispatch_data_t type.
1255
1256         For now, add DispatchPtr for the cache code and use it.
1257
1258         * NetworkProcess/cache/NetworkCacheStorage.h:
1259         (WebKit::DispatchPtr::DispatchPtr):
1260         (WebKit::DispatchPtr::~DispatchPtr):
1261         (WebKit::DispatchPtr::operator=):
1262         (WebKit::DispatchPtr::get):
1263         (WebKit::DispatchPtr::operator bool):
1264         (WebKit::adoptDispatch):
1265         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1266         (WebKit::NetworkCacheStorage::Data::Data):
1267         (WebKit::NetworkCacheStorage::Data::data):
1268         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
1269         (WebKit::createIOChannelForKey):
1270         (WebKit::decodeEntry):
1271         (WebKit::encodeEntryMetaData):
1272         (WebKit::encodeEntry):
1273
1274 2015-01-30  Tim Horton  <timothy_horton@apple.com>
1275
1276         Add and hook up APINavigationClient
1277         https://bugs.webkit.org/show_bug.cgi?id=140698
1278
1279         Reviewed by Sam Weinig.
1280
1281         Add a single APINavigationClient that NavigationState implements and
1282         WebPageProxy prefers over APILoaderClient and APIPolicyClient.
1283
1284         * UIProcess/API/APILoaderClient.h:
1285         Fix a comment.
1286
1287         * UIProcess/API/APINavigationClient.h: Added.
1288         APINavigationClient is the union of NavigationState's overrides of APILoaderClient and APIPolicyClient.
1289         Names are adjusted to more closely match the Modern API.
1290
1291         * UIProcess/Cocoa/NavigationState.h:
1292         * UIProcess/Cocoa/NavigationState.mm:
1293         Instead of having policy and loader clients, NavigationState has a single navigation client.
1294         Adjust as necessary.
1295
1296         Move as much logic as possible (isMainFrame checks, construction of API objects) out of here
1297         and into WebPageProxy.
1298
1299         * UIProcess/API/Cocoa/WKWebView.mm:
1300         (-[WKWebView initWithFrame:configuration:]):
1301         Install the aforementioned single navigation client.
1302
1303         * UIProcess/WebPageProxy.cpp:
1304         (WebKit::WebPageProxy::setNavigationClient):
1305         Add a navigation client setter.
1306
1307         For all policy and loader client calls, if we have a navigation client, use that;
1308         otherwise, fall back on the policy and loader clients.
1309
1310         * UIProcess/WebPageProxy.h:
1311         * WebKit2.xcodeproj/project.pbxproj:
1312
1313 2015-01-30  Chris Dumez  <cdumez@apple.com>
1314
1315         Update MemoryCache code to use more references instead of pointers
1316         https://bugs.webkit.org/show_bug.cgi?id=141099
1317
1318         Reviewed by Andreas Kling.
1319
1320         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1321         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
1322
1323 2015-01-30  Chris Dumez  <cdumez@apple.com>
1324
1325         Rename shared() static member functions to singleton() for singleton classes.
1326         https://bugs.webkit.org/show_bug.cgi?id=141088
1327
1328         Reviewed by Ryosuke Niwa and Benjamin Poulain.
1329
1330         Rename shared() static member functions to singleton() for singleton
1331         classes as per the recent coding style change.
1332
1333 2015-01-30  Alexey Proskuryakov  <ap@apple.com>
1334
1335         Build fix.
1336
1337         * Shared/API/c/WKDeprecatedFunctions.cpp:
1338         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1339         The screen font substitution functions still need to be present in the header.
1340
1341 2015-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1342
1343         [GTK] Resize the redirected XComposite again after leaving accelerated compositing mode
1344         https://bugs.webkit.org/show_bug.cgi?id=140935
1345
1346         Reviewed by Sergio Villar Senin.
1347
1348         Since r178414 we don't resize the redirected XComposite window
1349         until we enter accelerated compositing mode, but after leaving it
1350         the redirected window keeps its size. We should resize it to 1x1
1351         again and free the XPixmap and cairo surface to save that memory
1352         while not in accelerated compositing mode.
1353
1354         * UIProcess/API/gtk/PageClientImpl.cpp:
1355         (WebKit::PageClientImpl::enterAcceleratedCompositingMode): Notify
1356         the WebKitWebViewBase.
1357         (WebKit::PageClientImpl::exitAcceleratedCompositingMode): Ditto.
1358         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1359         (webkitWebViewBaseEnterAcceleratedCompositingMode): Resize the
1360         XComposite window to the current drawing area size.
1361         (webkitWebViewBaseExitAcceleratedCompositingMode): Resize the
1362         XComposite window to and empty size.
1363         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1364         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
1365         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
1366         Do not initialize m_size since we now handle the empty size as a
1367         especial case. Make sure we always create the X window with at
1368         least 1x1 size.
1369         (WebKit::RedirectedXCompositeWindow::resize): Resize the window to
1370         at least 1x1, but when en empty size is given, call
1371         cleanupPixmapAndPixmapSurface() to release those resources.
1372         (WebKit::RedirectedXCompositeWindow::surface): Create the cairo
1373         surface with at least 1x1 size.
1374
1375 2015-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1376
1377         [GTK] Runtime critical warnings sometimes at start up when using the network process
1378         https://bugs.webkit.org/show_bug.cgi?id=140998
1379
1380         Reviewed by Žan Doberšek.
1381
1382         This is caused by the CustomProtocolManager work queue
1383         theread. This WorkQueue is created when the CustomProtocolManager
1384         object is constructed, but destroyed when it's initialized when
1385         the UI process asks to use the network process. In this case,
1386         sometimes happens that the work queue thread that runs the main
1387         loop is executed once the object has been destroyed and the main
1388         loop pointer is nullptr.
1389
1390         * Platform/WorkQueue.h:
1391         * Platform/gtk/WorkQueueGtk.cpp:
1392         (WorkQueue::platformInitialize): Use a lambda function for the
1393         thread body.
1394         (WorkQueue::platformInvalidate): Detach the worker thread before
1395         deleting the main loop object.
1396         (WorkQueue::startWorkQueueThread): Deleted.
1397         (WorkQueue::workQueueThreadBody): Deleted.
1398
1399 2015-01-29  Beth Dakin  <bdakin@apple.com>
1400
1401         Another follow-on, spotted this mistake. This used to be 
1402         #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 , so it should now be 
1403         COCOA.
1404
1405         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1406         (WebKit::registerUserDefaultsIfNeeded):
1407
1408 2015-01-29  Beth Dakin  <bdakin@apple.com>
1409
1410         Follow-on, fixing a bad merge from my last change. 
1411
1412         * Shared/WebPreferencesDefinitions.h:
1413
1414 2015-01-29  Beth Dakin  <bdakin@apple.com>
1415
1416         Remove more Mountain Lion code from WebKit2
1417         https://bugs.webkit.org/show_bug.cgi?id=141052
1418
1419         Reviewed by Tim Horton.
1420
1421         * NetworkProcess/NetworkResourceLoader.cpp:
1422         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
1423         * NetworkProcess/NetworkResourceLoader.h:
1424         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1425         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1426         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
1427         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1428         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
1429         * Platform/IPC/MessageDecoder.cpp:
1430         * Platform/IPC/MessageDecoder.h:
1431         * Platform/IPC/mac/ConnectionMac.mm:
1432         (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
1433         (IPC::Connection::open):
1434         (IPC::Connection::receiveSourceEventHandler):
1435         (IPC::Connection::kill):
1436         * Platform/IPC/mac/ImportanceAssertion.h:
1437         * PluginProcess/mac/PluginProcessMac.mm:
1438         (WebKit::PluginProcess::initializeProcessName):
1439         * Shared/WebPreferencesDefinitions.h:
1440         * Shared/mac/ChildProcessMac.mm:
1441         (WebKit::initializeTimerCoalescingPolicy):
1442         (WebKit::ChildProcess::setApplicationIsDaemon):
1443         (WebKit::ChildProcess::platformInitialize):
1444         (WebKit::ChildProcess::setQOS):
1445         * Shared/mac/CookieStorageShim.mm:
1446         (WebKit::CookieStorageShim::initialize):
1447         * UIProcess/API/mac/WKView.mm:
1448         (-[WKView addWindowObserversForWindow:]):
1449         (-[WKView removeWindowObservers]):
1450         (-[WKView _windowDidChangeOcclusionState:]):
1451         * UIProcess/Cocoa/NavigationState.mm:
1452         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
1453         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1454         (WebKit::registerUserDefaultsIfNeeded):
1455         (WebKit::WebProcessPool::platformInitializeWebProcess):
1456         (WebKit::WebProcessPool::registerNotificationObservers):
1457         (WebKit::WebProcessPool::unregisterNotificationObservers):
1458         (WebKit::privateBrowsingSession):
1459         (WebKit::WebProcessPool::isURLKnownHSTSHost):
1460         (WebKit::WebProcessPool::resetHSTSHosts):
1461         * UIProcess/Databases/mac/DatabaseProcessProxyMac.mm:
1462         (WebKit::shouldUseXPC):
1463         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1464         (WebKit::shouldUseXPC):
1465         * UIProcess/WebProcessPool.h:
1466         * UIProcess/mac/TextCheckerMac.mm:
1467         (WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
1468         (WebKit::shouldAutomaticDashSubstitutionBeEnabled):
1469         (WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
1470         (WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
1471         * UIProcess/mac/ViewGestureControllerMac.mm:
1472         (WebKit::ViewGestureController::applyDebuggingPropertiesToSwipeViews):
1473         * UIProcess/mac/WebProcessProxyMac.mm:
1474         (WebKit::shouldUseXPC):
1475         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1476         (InitWebCoreSystemInterface):
1477         * WebProcess/cocoa/WebProcessCocoa.mm:
1478         (WebKit::WebProcess::updateActivePages):
1479         * WebProcess/com.apple.WebProcess.sb.in:
1480         * config.h:
1481
1482 2015-01-29  Sam Weinig  <sam@webkit.org>
1483
1484         Remove support for screen font substitution
1485         https://bugs.webkit.org/show_bug.cgi?id=141038
1486
1487         Reviewed by Tim Horton.
1488
1489         * Shared/API/c/WKDeprecatedFunctions.cpp:
1490         (WKPreferencesSetScreenFontSubstitutionEnabled):
1491         (WKPreferencesGetScreenFontSubstitutionEnabled):
1492         Move now empty preferences SPI to WKDeprecatedFunctions.
1493         
1494         * Shared/WebPreferencesDefinitions.h:
1495         * Shared/WebProcessCreationParameters.cpp:
1496         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1497         (WebKit::WebProcessCreationParameters::encode):
1498         (WebKit::WebProcessCreationParameters::decode):
1499         * Shared/WebProcessCreationParameters.h:
1500         * UIProcess/API/C/WKPreferences.cpp:
1501         (WKPreferencesSetScreenFontSubstitutionEnabled): Deleted.
1502         (WKPreferencesGetScreenFontSubstitutionEnabled): Deleted.
1503         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1504         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1505         (WebKit::WebProcessPool::platformInitializeWebProcess):
1506         * WebProcess/WebPage/WebPage.cpp:
1507         (WebKit::WebPage::updatePreferences):
1508         * WebProcess/WebProcess.h:
1509         (WebKit::WebProcess::presenterApplicationPid):
1510         (WebKit::WebProcess::shouldForceScreenFontSubstitution): Deleted.
1511         * WebProcess/cocoa/WebProcessCocoa.mm:
1512         (WebKit::WebProcess::platformInitializeWebProcess):
1513         Stop piping screen font substitution setting to the web process.
1514
1515 2015-01-29  Alexey Proskuryakov  <ap@apple.com>
1516
1517         Frequent kernel panics when running WebKit regression tests
1518         https://bugs.webkit.org/show_bug.cgi?id=141043
1519
1520         Reviewed by Sam Weinig.
1521
1522         Split PluginService.Development into 32-bit and 64-bit variants, to better match
1523         production variant. When building FAT, we'll have the right architecture from
1524         the start now, so no need to re-exec into a different architecture.        
1525
1526         * Configurations/PluginService.Development.xcconfig: Removed.
1527         * Configurations/PluginService.32.Development.xcconfig: Copied from Source/WebKit2/Configurations/PluginService.Development.xcconfig.
1528         * Configurations/PluginService.64.Development.xcconfig: Copied from Source/WebKit2/Configurations/PluginService.Development.xcconfig.
1529         Changed to use ONLY_ACTIVE_ARCH instead of CONFIGURATION, so that we build the
1530         right thing even in debug FAT builds.
1531
1532         * Configurations/PluginService.32.xcconfig:
1533         * Configurations/PluginService.64.xcconfig:
1534         While at it, applied the same changes as in Development variants. This means that
1535         FAT builds will now build only the correct architecture for PluginService.64
1536         (it used to build FAT, unnecessarily).
1537
1538         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
1539         Updated to support multiple product names.
1540
1541         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): Launch the
1542         right development service.
1543
1544         * WebKit2.xcodeproj/project.pbxproj: Split the Plugin.Development target into two.
1545
1546 2015-01-29  Tim Horton  <timothy_horton@apple.com>
1547
1548         Fix the build with newer Clang
1549
1550         * NetworkProcess/NetworkConnectionToWebProcess.h:
1551         These should be 'override's.
1552
1553 2015-01-29  Chris Dumez  <cdumez@apple.com>
1554
1555         Clean up / modernize PageCache class
1556         https://bugs.webkit.org/show_bug.cgi?id=141009
1557
1558         Reviewed by Darin Adler.
1559
1560         Clean up / modernize PageCache class.
1561
1562         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1563         (WebKit::WebBackForwardListProxy::removeItem):
1564         (WebKit::WebBackForwardListProxy::close):
1565         * WebProcess/WebPage/WebPage.cpp:
1566         (WebKit::WebPage::goForward):
1567         (WebKit::WebPage::goBack):
1568         (WebKit::WebPage::goToBackForwardItem):
1569         * WebProcess/WebProcess.cpp:
1570         (WebKit::WebProcess::releasePageCache):
1571         * WebProcess/cocoa/WebProcessCocoa.mm:
1572         (WebKit::WebProcess::platformSetCacheModel):
1573         * WebProcess/soup/WebProcessSoup.cpp:
1574         (WebKit::WebProcess::platformSetCacheModel):
1575
1576 2015-01-29  Csaba Osztrogonác  <ossy@webkit.org>
1577
1578         [EFL][GTK] Fix the build after r179326
1579         https://bugs.webkit.org/show_bug.cgi?id=141027
1580
1581         Reviewed by Alexey Proskuryakov.
1582
1583         Guard MessageRecorder implementation with USE(DTRACE)
1584         for platforms not supporting DTrace.
1585
1586         Original patch by Carlos Garcia Campos <cgarcia@igalia.com>
1587
1588         * Platform/IPC/ArgumentCoders.cpp:
1589         * Platform/IPC/ArgumentCoders.h:
1590         * Platform/IPC/Connection.cpp:
1591         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
1592         (IPC::Connection::sendMessage):
1593         (IPC::Connection::sendSyncMessage):
1594         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1595         (IPC::Connection::dispatchSyncMessage):
1596         (IPC::Connection::dispatchMessage):
1597         * Platform/IPC/MessageDecoder.cpp:
1598         (IPC::MessageDecoder::MessageDecoder):
1599         * Platform/IPC/MessageDecoder.h:
1600         * Platform/IPC/MessageEncoder.cpp:
1601         (IPC::MessageEncoder::MessageEncoder):
1602         (IPC::MessageEncoder::encodeHeader):
1603         * Platform/IPC/MessageEncoder.h:
1604         * Platform/IPC/MessageRecorder.h:
1605
1606 2015-01-29  Tim Horton  <timothy_horton@apple.com>
1607
1608         Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
1609         https://bugs.webkit.orgshow_bug.cgi?id=141018
1610         <rdar://problem/19619999>
1611
1612         * UIProcess/API/mac/WKView.mm:
1613         (-[WKView quickLookWithEvent:]):
1614         Yosemite is 101000, not 10100.
1615
1616 2015-01-28  Tim Horton  <timothy_horton@apple.com>
1617
1618         Add API::{FrameInfo, NavigationAction, NavigationResponse} types
1619         https://bugs.webkit.org/show_bug.cgi?id=140982
1620
1621         Reviewed by Sam Weinig.
1622
1623         Make C++ API objects for WK{FrameInfo, NavigationAction, NavigationResponse}
1624         to wrap around, as a step towards moving Modern API logic down into WebPageProxy.
1625
1626         * Shared/API/APIObject.h:
1627         * Shared/Cocoa/APIObject.mm:
1628         (API::Object::newObject):
1629         * UIProcess/API/APIFrameInfo.cpp: Added.
1630         * UIProcess/API/APIFrameInfo.h: Added.
1631         * UIProcess/API/APINavigationAction.h: Added.
1632         * UIProcess/API/APINavigationResponse.h: Added.
1633         Add API::FrameInfo, API::NavigationAction, and API::NavigationResponse.
1634
1635         * UIProcess/API/Cocoa/WKFrameInfo.mm:
1636         * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
1637         Make WKFrameInfo a WKObject, wrapping a API::FrameInfo.
1638
1639         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1640         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
1641         Make WKNavigationAction a WKObject, wrapping a API::NavigationAction.
1642
1643         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
1644         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
1645         Make WKNavigationResponse a WKObject, wrapping a API::NavigationResponse.
1646
1647         * UIProcess/API/Cocoa/WKUserContentController.mm:
1648         Adopt API::FrameInfo.
1649
1650         * UIProcess/Cocoa/NavigationState.mm:
1651         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1652         Adopt API::FrameInfo, and reorganize the code slightly.
1653         Adopt API::NavigationAction.
1654
1655         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
1656         Adopt API::FrameInfo.
1657         Adopt API::NavigationResponse.
1658
1659         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
1660         Adopt API::FrameInfo.
1661
1662         * UIProcess/Cocoa/UIDelegate.mm:
1663         (WebKit::UIDelegate::UIClient::createNewPage):
1664         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
1665         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
1666         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
1667         Adopt API::FrameInfo.
1668
1669         * WebKit2.xcodeproj/project.pbxproj:
1670
1671 2015-01-28  Antti Koivisto  <antti@apple.com>
1672
1673         http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
1674         https://bugs.webkit.org/show_bug.cgi?id=140976
1675
1676         Reviewed by Chris Dumez.
1677
1678         The previous fix sometimes invoked the completion handler twice. Explicitly track if we
1679         have called it or not.
1680
1681         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1682         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
1683
1684         Also move the error case to the done branch. According to the documentation 'done' is always set on error.
1685
1686 2015-01-28  Timothy Horton  <timothy_horton@apple.com>
1687
1688         Add a WebKitMessageRecorder DTrace provider, exposing IPC details to DTrace
1689         https://bugs.webkit.org/show_bug.cgi?id=140673
1690
1691         Reviewed by Sam Weinig.
1692
1693         * Platform/IPC/ArgumentCoders.cpp:
1694         (IPC::ArgumentCoder<uuid_t>::encode):
1695         (IPC::ArgumentCoder<uuid_t>::decode):
1696         * Platform/IPC/ArgumentCoders.h:
1697         Add a uuid_t (simple) argument coder.
1698         Fix a mis-named header-guard #ifdef.
1699
1700         * Platform/IPC/Connection.cpp:
1701         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
1702         (IPC::Connection::dispatchSyncMessage):
1703         Sync message replies inherit the message UUID from the incoming sync message.
1704
1705         (IPC::Connection::sendMessage):
1706         (IPC::Connection::waitForMessage):
1707         (IPC::Connection::sendSyncMessage):
1708         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1709         Record outgoing messages. Because sendSyncMessage calls sendMessage,
1710         we have to explicitly avoid recording the message twice.
1711
1712         (IPC::Connection::dispatchMessage):
1713         Record the incoming message.
1714
1715         (IPC::Connection::remoteProcessID):
1716         Add remoteProcessID(), which tries to determine the pid of the remote process.
1717
1718         * Platform/IPC/Connection.h:
1719         (IPC::Connection::xpcConnection):
1720         This can be const.
1721
1722         (IPC::Connection::isValid):
1723         Make this public.
1724
1725         * Platform/IPC/MessageDecoder.cpp:
1726         (IPC::MessageDecoder::MessageDecoder):
1727         * Platform/IPC/MessageDecoder.h:
1728         (IPC::MessageDecoder::setMessageProcessingToken):
1729         (IPC::MessageDecoder::UUID):
1730         Decode and store the message UUID.
1731         Store a MessageProcessingToken for the lifetime of the MessageDecoder;
1732         this ensures that all time spent processing the incoming message will be
1733         counted against that message.
1734
1735         * Platform/IPC/MessageEncoder.cpp:
1736         (IPC::MessageEncoder::MessageEncoder):
1737         By default, create a new UUID for the message. Alternatively, allow clients
1738         to pass the message UUID in (used for sync message replies).
1739         Store the messageReceiverName and messageName.
1740
1741         (IPC::MessageEncoder::encodeHeader):
1742         Factor encodeHeader() out of the constructors so most of their code can be shared.
1743
1744         (IPC::MessageEncoder::isSyncMessage):
1745         (IPC::MessageEncoder::shouldDispatchMessageWhenWaitingForSyncReply):
1746         Add getters for these flags.
1747
1748         * Platform/IPC/MessageEncoder.h:
1749         (IPC::MessageEncoder::messageReceiverName):
1750         (IPC::MessageEncoder::messageName):
1751         (IPC::MessageEncoder::destinationID):
1752         (IPC::MessageEncoder::UUID):
1753
1754         * Platform/IPC/MessageRecorder.h: Added.
1755         * Platform/IPC/MessageRecorder.cpp: Added.
1756         (MessageRecorder::MessageRecorder):
1757         Add a class that interfaces with a custom DTrace provider to log incoming and outgoing messages.
1758
1759         (MessageRecorder::shared):
1760         (MessageRecorder::isEnabled):
1761         Determine if either of the message probes are enabled. If not, we'll avoid most of the
1762         work associated with MessageRecorder.
1763
1764         (MessageRecorder::recordOutgoingMessage):
1765         (MessageRecorder::recordIncomingMessage):
1766         Build a WebKitMessageRecord and MessageProcessingToken from the Message(De|En)coder.
1767         Once the MessageProcessingToken is deallocated, the probe will be invoked with the WebKitMessageRecord.
1768
1769         (MessageRecorder::MessageProcessingToken::MessageProcessingToken):
1770         (MessageRecorder::MessageProcessingToken::~MessageProcessingToken):
1771         Keep track of when the token is created and destroyed; these are considered the beginning
1772         and ending "processing" times of the message (and as such the token should be kept alive for
1773         exactly as long as the message is being processed).
1774
1775         * Platform/IPC/MessageRecorderProbes.d: Added.
1776         Add a DTrace provider source file with two probes, message_sent and message_received.
1777         The struct must match the struct in MessageRecorder.h.
1778         
1779         * Platform/IPC/ProcessType.h: Added.
1780         Add an enum of process types.
1781
1782         * WebKit2.xcodeproj/project.pbxproj:
1783
1784         * DatabaseProcess/DatabaseProcess.h:
1785         * DatabaseProcess/DatabaseToWebProcessConnection.h:
1786         * NetworkProcess/NetworkConnectionToWebProcess.h:
1787         * NetworkProcess/NetworkProcess.h:
1788         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
1789         * WebProcess/Network/NetworkProcessConnection.h:
1790         * WebProcess/Plugins/PluginProcessConnection.h:
1791         * WebProcess/WebPage/WebInspector.h:
1792         * WebProcess/WebPage/WebInspectorUI.h:
1793         * WebProcess/WebProcess.h:
1794         * UIProcess/Databases/DatabaseProcessProxy.h:
1795         * UIProcess/Network/NetworkProcessProxy.h:
1796         * UIProcess/Plugins/PluginProcessProxy.h:
1797         * UIProcess/WebProcessProxy.h:
1798         * PluginProcess/PluginProcess.h:
1799         * PluginProcess/WebProcessConnection.h:
1800         Annotate Connection::Clients with process types.
1801         
1802 2015-01-28  Joseph Pecoraro  <pecoraro@apple.com>
1803
1804         Web Inspector: Crash closing inspected page with frequent activity
1805         https://bugs.webkit.org/show_bug.cgi?id=140973
1806
1807         Reviewed by Timothy Hatcher.
1808
1809         * WebProcess/WebPage/WebInspector.h:
1810         (WebKit::WebInspector::disconnectFromPage):        
1811         * WebProcess/WebPage/WebPage.cpp:
1812         (WebKit::WebPage::close):
1813         Be sure to close the WebInspector connection through the page
1814         when the page is closing so that the WebKit::WebInspector is
1815         relinquishes itself as the InspectorFrontendChannel.
1816
1817 2015-01-28  Timothy Horton  <timothy_horton@apple.com>
1818
1819         Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
1820         https://bugs.webkit.org/show_bug.cgi?id=141018
1821         <rdar://problem/19619999>
1822
1823         Reviewed by Beth Dakin.
1824
1825         * UIProcess/API/mac/WKView.mm:
1826         (-[WKView quickLookWithEvent:]):
1827         If we have an immediate action gesture recognizer, just call super and
1828         avoid WebKit's special quickLookWithEvent: implementation.
1829
1830 2015-01-28  Sungmann Cho  <sungmann.cho@navercorp.com>
1831
1832         Remove remaining PLATFORM(WIN) code blocks from WebKit2.
1833         https://bugs.webkit.org/show_bug.cgi?id=140972
1834
1835         Reviewed by Darin Adler.
1836
1837         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
1838         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
1839
1840 2015-01-28  Beth Dakin  <bdakin@apple.com>
1841
1842         Remove Mountain Lion code from WebKit and WebKit2
1843         https://bugs.webkit.org/show_bug.cgi?id=141010
1844
1845         Reviewed by Sam Weinig.
1846
1847         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1848         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1849         * Shared/mac/ChildProcessMac.mm:
1850         (WebKit::ChildProcess::initializeSandbox):
1851         * Shared/mac/WebEventFactory.mm:
1852         (WebKit::phaseForEvent):
1853         * UIProcess/API/mac/WKView.mm:
1854         (-[WKView quickLookWithEvent:]):
1855         (-[WKView updateLayer]):
1856         (-[WKView createFullScreenWindow]):
1857         * UIProcess/Network/NetworkProcessProxy.cpp:
1858         (WebKit::NetworkProcessProxy::didFinishLaunching):
1859         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
1860         (WebKit::shouldUseXPC):
1861         * UIProcess/WebProcessProxy.cpp:
1862         (WebKit::WebProcessProxy::didFinishLaunching):
1863         * UIProcess/mac/PageClientImpl.mm:
1864         (WebKit::PageClientImpl::isViewVisible):
1865         * WebKit2Prefix.h:
1866         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1867         (InitWebCoreSystemInterface):
1868         * WebProcess/com.apple.WebProcess.sb.in:
1869
1870 2015-01-28  Joseph Pecoraro  <pecoraro@apple.com>
1871
1872         Web Inspector: Crash when closing inspected page
1873         https://bugs.webkit.org/show_bug.cgi?id=140968
1874
1875         Reviewed by Timothy Hatcher.
1876
1877         Handle cases where the corePage could be null. With the Inspector Process
1878         in its own process, messages may come to the WebContentProcess after
1879         the WebCore::Page has itself been destroyed.
1880
1881         * WebProcess/WebPage/WebInspector.cpp:
1882         (WebKit::WebInspector::show):
1883         (WebKit::WebInspector::close):
1884         (WebKit::WebInspector::openInNewTab):
1885         (WebKit::WebInspector::evaluateScriptForTest):
1886         (WebKit::WebInspector::showConsole):
1887         (WebKit::WebInspector::showResources):
1888         (WebKit::WebInspector::showMainResourceForFrame):
1889         (WebKit::WebInspector::startPageProfiling):
1890         (WebKit::WebInspector::stopPageProfiling):
1891         (WebKit::WebInspector::canAttachWindow):
1892         (WebKit::WebInspector::sendMessageToBackend):
1893         (WebKit::WebInspector::remoteFrontendConnected):
1894         (WebKit::WebInspector::remoteFrontendDisconnected):
1895
1896 2015-01-28  Sam Weinig  <sam@webkit.org>
1897
1898         Convert WebPreferences and VisitedLinkProvider to be bridged API::Objects
1899         https://bugs.webkit.org/show_bug.cgi?id=141002
1900
1901         Reviewed by Tim Horton.
1902
1903         * Shared/API/APIObject.h:
1904         Add VisitedLinkProvider type.
1905         
1906         * Shared/Cocoa/APIObject.mm:
1907         (API::Object::newObject):
1908         Allocate WebPreferences and VisitedLinkProvider as their Objective-C counterpart.
1909         
1910         * UIProcess/API/Cocoa/WKPreferences.mm:
1911         (-[WKPreferences init]):
1912         Switch to constructInWrapper.
1913
1914         (-[WKPreferences dealloc]):
1915         Call the WebPreferences destructor.
1916         
1917         (-[WKPreferences _apiObject]):
1918         Add implementation of the WKObject protocol.
1919
1920         * UIProcess/API/Cocoa/WKPreferencesInternal.h:
1921         Convert to using ObjectStorage.
1922
1923         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
1924         (-[_WKVisitedLinkProvider init]):
1925         Switch to constructInWrapper.
1926
1927         (-[_WKVisitedLinkProvider dealloc]):
1928         Call the VisitedLinkProvider destructor.
1929
1930         (-[_WKVisitedLinkProvider _apiObject]):
1931         Add implementation of the WKObject protocol.
1932
1933         * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h:
1934         Convert to using ObjectStorage.
1935
1936         * UIProcess/VisitedLinkProvider.cpp:
1937         (WebKit::VisitedLinkProvider::create):
1938         * UIProcess/VisitedLinkProvider.h:
1939         Switch create() to return a Ref.
1940
1941         * UIProcess/WebPreferences.h:
1942         Make the constructor public for use by constructInWrapper.
1943
1944         * UIProcess/WebProcessPool.cpp:
1945         (WebKit::WebProcessPool::createWebPage):
1946         * UIProcess/WebProcessPool.h:
1947         Store the VisitedLinkProvider in a Ref.
1948
1949 2015-01-28  Dana Burkart  <dburkart@apple.com>
1950
1951         Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
1952         https://bugs.webkit.org/show_bug.cgi?id=136765
1953
1954         Reviewed by Alexey Proskuryakov.
1955
1956         * Configurations/Base.xcconfig:
1957         * Configurations/DebugRelease.xcconfig:
1958
1959 2015-01-28  Chris Dumez  <cdumez@apple.com>
1960
1961         Fix typo in markPagesForVistedLinkStyleRecalc()
1962         https://bugs.webkit.org/show_bug.cgi?id=140977
1963
1964         Reviewed by Darin Adler.
1965
1966         * WebProcess/WebPage/VisitedLinkTableController.cpp:
1967         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
1968         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
1969         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
1970         (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
1971
1972 2015-01-27  Antti Koivisto  <antti@apple.com>
1973
1974         http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
1975         https://bugs.webkit.org/show_bug.cgi?id=140976
1976
1977         Reviewed by Chris Dumez.
1978
1979         Running
1980
1981             run-webkit-tests --release -2 http/tests/xmlhttprequest/workers/methods.html --iterations=100
1982
1983         would usually time out an iteration.
1984
1985         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1986         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
1987
1988         Using dispatch_io_read with an empty file calls the handler block immediately with done boolean set
1989         without it being an error. We failed to call the completion handler and any synchronous xhr would hang.
1990         We may see an empty cache file if we are just in process of writing it.
1991
1992         Fix by handling this case specifically.
1993
1994 2015-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1995
1996         Unreviewed. Add missing file to WebInspector compilation for GTK+.
1997
1998         * PlatformGTK.cmake: Add UserInterface/External/ESLint/eslint.js
1999
2000 2015-01-28  Chris Dumez  <cdumez@apple.com>
2001
2002         Rename pageCache() to PageCache::shared() and return a reference
2003         https://bugs.webkit.org/show_bug.cgi?id=140983
2004
2005         Reviewed by Andreas Kling.
2006
2007         Rename pageCache() to PageCache::shared() as this is a singleton class
2008         and have it return a reference instead of a pointer.
2009
2010         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2011         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
2012         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
2013         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
2014         (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
2015         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2016         (WebKit::WebBackForwardListProxy::removeItem):
2017         (WebKit::WebBackForwardListProxy::close):
2018         * WebProcess/WebProcess.cpp:
2019         (WebKit::WebProcess::releasePageCache):
2020         * WebProcess/cocoa/WebProcessCocoa.mm:
2021         (WebKit::WebProcess::platformSetCacheModel):
2022         * WebProcess/soup/WebProcessSoup.cpp:
2023         (WebKit::WebProcess::platformSetCacheModel):
2024
2025 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
2026
2027         More build fixes for newer clang.
2028
2029         Rubber-stamped by Anders Carlsson.
2030
2031         Added missing override keywords, marked some deprecated accessibility methods as such.
2032
2033         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
2034         (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Deleted.
2035         (WebKit::PluginProcessMainDelegate::getExtraInitializationData): Deleted.
2036         (WebKit::PluginProcessMainDelegate::doPostRunWork): Deleted.
2037         * PluginProcess/WebProcessConnection.h:
2038         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2039         (WebKit::WebProcessPool::platformInitializeWebProcess):
2040         * UIProcess/Plugins/PluginProcessProxy.h:
2041         * UIProcess/WebPageProxy.h:
2042         * UIProcess/mac/PageClientImpl.h:
2043         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2044         (PageOverlayClientImpl::actionContextForResultAtPoint): Deleted.
2045         (PageOverlayClientImpl::dataDetectorsDidPresentUI): Deleted.
2046         (PageOverlayClientImpl::dataDetectorsDidChangeUI): Deleted.
2047         (PageOverlayClientImpl::dataDetectorsDidHideUI): Deleted.
2048         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2049         (WebKit::NetscapePlugin::isBeingAsynchronouslyInitialized): Deleted.
2050         * WebProcess/Plugins/PDF/PDFPlugin.h:
2051         * WebProcess/Plugins/PluginProcessConnection.h:
2052         * WebProcess/Plugins/PluginProxy.h:
2053         (WebKit::PluginProxy::isBeingAsynchronouslyInitialized): Deleted.
2054         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2055
2056 2015-01-27  Beth Dakin  <bdakin@apple.com>
2057
2058         Immediate action gesture recognizer still doesn't work well with IB
2059         https://bugs.webkit.org/show_bug.cgi?id=140967
2060         -and corresponding-
2061         rdar://problem/19621509
2062
2063         Reviewed by Tim Horton.
2064
2065         We should add (or remove) the gesture recognizer in viewDidMoveToWindow because 
2066         initWithFrame it too early and IB might mess with it.
2067         * UIProcess/API/mac/WKView.mm:
2068         (-[WKView viewDidMoveToWindow]):
2069         (-[WKView initWithFrame:processPool:configuration:webView:]):
2070
2071 2015-01-27  Beth Dakin  <bdakin@apple.com>
2072
2073         Invoking an immediate action on link often dismisses selection
2074         https://bugs.webkit.org/show_bug.cgi?id=140911
2075         -and corresponding-
2076         rdar://problem/19572685
2077
2078         Reviewed by Tim Horton.
2079
2080         Calling _page->setMaintainsInactiveSelection(false) in complete is often 
2081         too soon. Instead, call it in dismissContentRelativeChildWindows. This is more 
2082         similar to the timing for the TextIndicator.
2083         * UIProcess/mac/WKImmediateActionController.mm:
2084         (-[WKImmediateActionController dismissContentRelativeChildWindows]):
2085         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
2086         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
2087
2088 2015-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2089
2090         REGRESSION(r166975): [GTK] Page overlays are not drawn anymore after r166975
2091         https://bugs.webkit.org/show_bug.cgi?id=131433
2092
2093         Reviewed by Žan Doberšek.
2094
2095         Implement page overlays for the GTK+ port.
2096
2097         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2098         Override pure virtual setViewOverlayRootLayer().
2099         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2100         (WebKit::DrawingAreaImpl::display): Remove FIXME and use modern
2101         for loop.
2102         (WebKit::DrawingAreaImpl::attachViewOverlayGraphicsLayer): Remove
2103         ifdefs and use LayerTreeHost::setViewOverlayRootLayer().
2104         * WebProcess/WebPage/LayerTreeHost.h: Add pure virtual setViewOverlayRootLayer().
2105         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2106         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Initialize m_viewOverlayRootLayer.
2107         (WebKit::LayerTreeHostGtk::initialize): Remove FIXME.
2108         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
2109         Remove unused old page overlays code.
2110         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect): Ditto.
2111         (WebKit::LayerTreeHostGtk::sizeDidChange): Ditto.
2112         (WebKit::LayerTreeHostGtk::paintContents): Remove FIXME.
2113         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges): Flush
2114         compositing state on m_pageOverlayLayers if present.
2115         (WebKit::LayerTreeHostGtk::setViewOverlayRootLayer): Set m_pageOverlayLayers.
2116         (WebKit::LayerTreeHostGtk::createPageOverlayLayer): Deleted.
2117         (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer): Deleted.
2118         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Remove unused old
2119         page overlays code.
2120
2121 2015-01-27  Sungmann Cho  <sungmann.cho@navercorp.com>
2122
2123         Remove remaining PLUGIN_ARCHITECTURE(WIN) code blocks from WebKit2.
2124         https://bugs.webkit.org/show_bug.cgi?id=140912
2125
2126         Reviewed by Anders Carlsson.
2127
2128         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2129         (WebKit::NetscapePluginModule::tryLoad):
2130         * Shared/Plugins/PluginQuirks.h:
2131         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2132         (WebKit::NetscapePlugin::userAgent):
2133         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2134
2135 2015-01-26  Simon Fraser  <simon.fraser@apple.com>
2136
2137         [iOS WK2] Fix possible crash when -[WKWebView evaluateJavaScript:completionHandler:] was called then the WKWebView is destroyed
2138         https://bugs.webkit.org/show_bug.cgi?id=140203
2139         rdar://problem/19198492
2140
2141         Reviewed by Sam Weinig.
2142         
2143         When handling the OwnerWasInvalidated case in -[WKWebView evaluateJavaScript:completionHandler:],
2144         the block passed to dispatch_async() needs to be retained. Fix by passing the RefPtr
2145         to the lambda.
2146
2147         * UIProcess/API/Cocoa/WKWebView.mm:
2148         (-[WKWebView evaluateJavaScript:completionHandler:]):
2149
2150 2015-01-26  Chris Dumez  <cdumez@apple.com>
2151
2152         Rename Document::body() to Document::bodyOrFrameset() for clarity
2153         https://bugs.webkit.org/show_bug.cgi?id=140902
2154
2155         Reviewed by Andreas Kling.
2156
2157         Rename Document::body() to Document::bodyOrFrameset() for clarity. This
2158         method does not necessarily return an HTMLBodyElement, it can also
2159         return a frameset as per the specification:
2160         http://www.w3.org/TR/html5/dom.html#dom-tree-accessors
2161
2162         This method is often misused internally (the caller is only interested
2163         in the <body> element). I will fix these instances in a follow-up patch,
2164         this patch is only renaming mechanically.
2165
2166 2015-01-26  Antti Koivisto  <antti@apple.com>
2167
2168         Add a user default for disabling network cache
2169         https://bugs.webkit.org/show_bug.cgi?id=140904
2170
2171         Reviewed by Andreas Kling
2172
2173         defaults write com.apple.Safari WebKitNetworkCacheEnabled -bool YES/NO
2174
2175         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2176         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2177         * Shared/Network/NetworkProcessCreationParameters.cpp:
2178         (WebKit::NetworkProcessCreationParameters::encode):
2179         (WebKit::NetworkProcessCreationParameters::decode):
2180         * Shared/Network/NetworkProcessCreationParameters.h:
2181         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2182         (WebKit::registerUserDefaultsIfNeeded):
2183         (WebKit::WebProcessPool::platformInitializeWebProcess):
2184         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2185
2186 2015-01-26  Chris Dumez  <cdumez@apple.com>
2187
2188         First argument to DOM traversal functions should be a reference
2189         https://bugs.webkit.org/show_bug.cgi?id=140895
2190
2191         Reviewed by Antti Koivisto.
2192
2193         First argument to DOM traversal functions should be a reference instead
2194         of a pointer as it is dereferenced without null-check.
2195
2196 2015-01-26  Beth Dakin  <bdakin@apple.com>
2197
2198         Blacklist iBooks for WebKit's default immediate actions
2199         https://bugs.webkit.org/show_bug.cgi?id=140854
2200         -and corresponding-
2201         rdar://problem/19489518
2202
2203         Reviewed by Tim Horton.
2204
2205         Blacklist iBooks.
2206         * UIProcess/mac/WKImmediateActionController.mm:
2207         (-[WKImmediateActionController _updateImmediateActionItem]):
2208
2209 2015-01-26  Myles C. Maxfield  <mmaxfield@apple.com>
2210
2211         [iOS] [SVG -> OTF Converter] Flip the switch off on iOS
2212         https://bugs.webkit.org/show_bug.cgi?id=140860
2213
2214         Reviewed by Darin Adler.
2215
2216         The fonts it makes are grotesque. (See what I did there? Typographic
2217         humor is the best humor.)
2218
2219         * Configurations/FeatureDefines.xcconfig:
2220
2221 2015-01-26  Fabien Vallée  <fvallee@connected-labs.com>
2222
2223         AX: crash in accessibilityRootObjectWrapper method (WebPageAccessibilityObjectAtk.cpp)
2224         <https://bugs.webkit.org/show_bug.cgi?id=140618>
2225
2226         Reviewed by Chris Fleizach.
2227
2228         Check if document()->axObjectCache() is nullptr to fix the crash.
2229         Similar patch has been applied on mac port:
2230         <http://trac.webkit.org/changeset/167136>
2231
2232         Crash occured on <http://itv.mit-xperts.com/hbbtvtest/appmanager/>
2233         (this page needs CEHTML / HbbTV extensions, conditions cannot
2234         be reproduced using regression tests)
2235
2236         * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
2237         (accessibilityRootObjectWrapper):
2238
2239 2015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
2240
2241         [GTK] gtkdoc does not appear in DevHelp
2242         https://bugs.webkit.org/show_bug.cgi?id=139369
2243
2244         Reviewed by Philippe Normand.
2245
2246         * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
2247         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt.
2248         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types.
2249
2250 2015-01-25  Timothy Horton  <timothy_horton@apple.com>
2251
2252         Unresponsive Web processes sometimes throw ObjC exceptions under didPerformActionMenuHitTest:
2253         https://bugs.webkit.org/show_bug.cgi?id=140859
2254         <rdar://problem/19571057>
2255
2256         Reviewed by Darin Adler.
2257
2258         * UIProcess/mac/WKImmediateActionController.mm:
2259         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
2260         If we've already given up on this gesture (either because it was canceled or the
2261         willBeginAnimation timeout expired), we shouldn't build a new animationController for it.
2262         This is true both because it wouldn't look good to swap animationControllers out
2263         from under the gesture, but also because AppKit throws an exception when you do this
2264         and that breaks a lot of things.
2265
2266 2015-01-24  Chris Dumez  <cdumez@apple.com>
2267
2268         [WK2][Cocoa] Drop WKDiagnosticLoggingResultType defines
2269         https://bugs.webkit.org/show_bug.cgi?id=140838
2270
2271         Reviewed by Sam Weinig.
2272
2273         Drop WKDiagnosticLoggingResultType defines in _WKDiagnosticLoggingDelegate.h
2274         header now that the client-side is correctly using
2275         _WKDiagnosticLoggingResultType instead.
2276
2277         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
2278
2279 2015-01-23  Antti Koivisto  <antti@apple.com>
2280
2281         Implement cache size limit
2282         https://bugs.webkit.org/show_bug.cgi?id=140844
2283
2284         Reviewed by Andreas Kling.
2285
2286         Prevent the cache from growing without bounds. The simple scheme implemented here
2287         estimates the cache size from number of entries. When the estimated size exceeds
2288         the maximum size we randomly clear 1/4 of the entries.
2289
2290         * NetworkProcess/cache/NetworkCacheStorage.h:
2291         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2292         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
2293         (WebKit::NetworkCacheStorage::initialize):
2294         (WebKit::NetworkCacheStorage::removeEntry):
2295         (WebKit::NetworkCacheStorage::store):
2296         (WebKit::NetworkCacheStorage::setMaximumSize):
2297         (WebKit::NetworkCacheStorage::clear):
2298         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
2299         (WebKit::NetworkCacheStorage::initializeKeyFilter): Deleted.
2300
2301 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
2302
2303         Fix the pre-Yosemite build.
2304
2305         * UIProcess/API/mac/WKView.mm:
2306         (-[WKView _dismissContentRelativeChildWindows]):
2307
2308 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
2309
2310         QLPreviewMenuItem popovers don't close when the page scrolls
2311         https://bugs.webkit.org/show_bug.cgi?id=140806
2312         <rdar://problem/19555618>
2313
2314         Reviewed by Beth Dakin.
2315
2316         Now that QLPreviewMenuItem's popover doesn't eat scrolls, we need to dismiss it if the page scrolls.
2317
2318         * UIProcess/API/mac/WKView.mm:
2319         (-[WKView _dismissContentRelativeChildWindows]):
2320         Send _dismissContentRelativeChildWindows on to WKImmediateActionController.
2321
2322         * UIProcess/mac/WKImmediateActionController.h:
2323         * UIProcess/mac/WKImmediateActionController.mm:
2324         (-[WKImmediateActionController _clearImmediateActionState]):
2325         (-[WKImmediateActionController dismissContentRelativeChildWindows]):
2326         (-[WKImmediateActionController _defaultAnimationController]):
2327         Keep track of the active QLPreviewMenuItem, and close it upon scroll.
2328
2329 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
2330
2331         Infinite recursion in _clearImmediateActionState
2332         https://bugs.webkit.org/show_bug.cgi?id=140807
2333         <rdar://problem/19571601>
2334
2335         Reviewed by Anders Carlsson.
2336
2337         * UIProcess/mac/WKImmediateActionController.mm:
2338         (-[WKImmediateActionController _clearImmediateActionState]):
2339         Clear _hasActivatedActionContext before calling didUseActions, because
2340         didUseActions can call _clearImmediateActionState.
2341
2342 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2343
2344         [GTK] Add initial database process support
2345         https://bugs.webkit.org/show_bug.cgi?id=139491
2346
2347         Reviewed by Sergio Villar Senin.
2348
2349         Add initial support for DatabaseProcess, disabled by default for
2350         now.
2351
2352         * CMakeLists.txt: Add required files to compilation.
2353         * DatabaseProcess/DatabaseProcess.cpp:
2354         (WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
2355         Add the unix domain sockets implementation.
2356         * DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp: Added.
2357         (main):
2358         * DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp: Added.
2359         (WebKit::DatabaseProcessMainUnix):
2360         * DatabaseProcess/unix/DatabaseProcessMainUnix.h: Added.
2361         * PlatformGTK.cmake: Add required files to compilation.
2362         * Shared/ProcessExecutablePath.h:
2363         * Shared/gtk/KeyedDecoder.cpp: Added.
2364         (WebKit::KeyedDecoder::KeyedDecoder):
2365         (WebKit::KeyedDecoder::~KeyedDecoder):
2366         (WebKit::KeyedDecoder::buildDictionaryFromGVariant):
2367         (WebKit::KeyedDecoder::decodeBytes):
2368         (WebKit::KeyedDecoder::decodeBool):
2369         (WebKit::KeyedDecoder::decodeUInt32):
2370         (WebKit::KeyedDecoder::decodeInt32):
2371         (WebKit::KeyedDecoder::decodeInt64):
2372         (WebKit::KeyedDecoder::decodeFloat):
2373         (WebKit::KeyedDecoder::decodeDouble):
2374         (WebKit::KeyedDecoder::decodeString):
2375         (WebKit::KeyedDecoder::beginObject):
2376         (WebKit::KeyedDecoder::endObject):
2377         (WebKit::KeyedDecoder::beginArray):
2378         (WebKit::KeyedDecoder::beginArrayElement):
2379         (WebKit::KeyedDecoder::endArrayElement):
2380         (WebKit::KeyedDecoder::endArray):
2381         * Shared/gtk/KeyedDecoder.h: Added.
2382         * Shared/gtk/KeyedEncoder.cpp: Added.
2383         (WebKit::KeyedEncoder::KeyedEncoder):
2384         (WebKit::KeyedEncoder::~KeyedEncoder):
2385         (WebKit::KeyedEncoder::encodeBytes):
2386         (WebKit::KeyedEncoder::encodeBool):
2387         (WebKit::KeyedEncoder::encodeUInt32):
2388         (WebKit::KeyedEncoder::encodeInt32):
2389         (WebKit::KeyedEncoder::encodeInt64):
2390         (WebKit::KeyedEncoder::encodeFloat):
2391         (WebKit::KeyedEncoder::encodeDouble):
2392         (WebKit::KeyedEncoder::encodeString):
2393         (WebKit::KeyedEncoder::beginObject):
2394         (WebKit::KeyedEncoder::endObject):
2395         (WebKit::KeyedEncoder::beginArray):
2396         (WebKit::KeyedEncoder::beginArrayElement):
2397         (WebKit::KeyedEncoder::endArrayElement):
2398         (WebKit::KeyedEncoder::endArray):
2399         (WebKit::KeyedEncoder::finishEncoding):
2400         * Shared/gtk/KeyedEncoder.h: Added.
2401         * Shared/gtk/ProcessExecutablePathGtk.cpp:
2402         (WebKit::executablePathOfDatabaseProcess):
2403         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2404         (WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection):
2405         Add the unix domain sockets implementation.
2406         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2407         (WebKit::ProcessLauncher::launchProcess): Handle the
2408         DatabaseProcess too.
2409         * UIProcess/gtk/WebContextGtk.cpp:
2410         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
2411         * WebProcess/WebProcess.cpp:
2412         (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Add
2413         the unix domain sockets implementation.
2414
2415 2015-01-22  Benjamin Poulain  <bpoulain@apple.com>
2416
2417         [iOS][WK2] Ignore synthetic click initiated on a previous page
2418         https://bugs.webkit.org/show_bug.cgi?id=139556
2419         rdar://problem/18586008
2420
2421         Reviewed by David Kilzer.
2422
2423         Under the right accumulation of bad luck, a synthetic click could be generated
2424         on a page that never asked for it.
2425
2426         What happened was:
2427         1) Page Foo listen to touch event.
2428         2) In response to touch events, Foo decides to navigate to page Bar
2429            *but* it does not cancel the native gesture recognizers with preventDefault().
2430         3) Page Bar loads.
2431         4) The native gesture recognizer ask us to click, we forward that to the WebProcess
2432            and generate a synthetic mouse event.
2433         -> Bar receives a click.
2434         If you are unlucky enough, it looks like a single tap does a double click.
2435
2436         There are two ways this patch avoids the problem:
2437
2438         First, in the UIProcess, we just cancel the HighlightLongPressGestureRecognizer
2439         on didCommitLoadForMainFrame. This prevents "fast clicks" from accidentally going through.
2440         This is not bullet proof because we get didCommitLoadForMainFrame asynchronously but
2441         killing the timer and gesture seems like a good idea.
2442
2443         Second, we skip any tap command at the WebProcess level when it was issued for
2444         the previous page. This is using the same principle we used for VisibleContentRect:
2445         any input generated before the current layer tree commit is useless for the current page.
2446
2447         We track the commit ID in the UIProcess when we decide to do the tracking or not.
2448         Note that we keep the ID regardless of the tracking state, it does not matter if we have sent
2449         touch events, what matters is what content was on screen when the touch events were handled.
2450
2451         If the user interaction result in a tap, we send the commit ID along the tap commands.
2452         In the WebProcess, we know the actual layer tree commit associated with the current page.
2453         If the tap was generated with a layer ID preceding the current page, we fail the command.
2454
2455         * UIProcess/WebPageProxy.cpp:
2456         (WebKit::WebPageProxy::WebPageProxy):
2457         (WebKit::WebPageProxy::handleTouchEventSynchronously):
2458         (WebKit::WebPageProxy::resetState):
2459         * UIProcess/WebPageProxy.h:
2460         * UIProcess/ios/WKContentView.mm:
2461         (-[WKContentView _didCommitLoadForMainFrame]):
2462         * UIProcess/ios/WKContentViewInteraction.mm:
2463         (-[WKContentView _attemptClickAtLocation:]):
2464         * UIProcess/ios/WebPageProxyIOS.mm:
2465         (WebKit::WebPageProxy::commitPotentialTap):
2466         (WebKit::WebPageProxy::handleTap):
2467         * WebProcess/WebPage/WebPage.cpp:
2468         (WebKit::WebPage::didCommitLoad):
2469         * WebProcess/WebPage/WebPage.h:
2470         * WebProcess/WebPage/WebPage.messages.in:
2471         * WebProcess/WebPage/ios/WebPageIOS.mm:
2472         (WebKit::WebPage::handleTap):
2473         (WebKit::WebPage::commitPotentialTap):
2474
2475 2015-01-22  Chris Dumez  <cdumez@apple.com>
2476
2477         [WK2][Cocoa] Drop WKWebViewConfiguration._featureCounterEnabled SPI.
2478         https://bugs.webkit.org/show_bug.cgi?id=140799
2479
2480         Reviewed by Dan Bernstein.
2481
2482         Drop WKWebViewConfiguration._featureCounterEnabled SPI now that the
2483         client-side has been updated.
2484
2485         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2486         (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]):
2487         (-[WKWebViewConfiguration _featureCounterEnabled]): Deleted.
2488         (-[WKWebViewConfiguration _setFeatureCounterEnabled:]): Deleted.
2489         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2490
2491 2015-01-22  Antti Koivisto  <antti@apple.com>
2492
2493         Fix ENABLE(NETWORK_CACHE) build
2494
2495         * NetworkProcess/NetworkResourceLoader.cpp:
2496         (WebKit::NetworkResourceLoader::didFinishLoading):
2497
2498 2015-01-22  Timothy Horton  <timothy_horton@apple.com>
2499
2500         UserData decoding of WKTypeRefWrapper always fails
2501         https://bugs.webkit.org/show_bug.cgi?id=140791
2502         <rdar://problem/19438402>
2503
2504         Reviewed by Anders Carlsson.
2505
2506         * Shared/mac/ObjCObjectGraph.mm:
2507         (WebKit::ObjCObjectGraph::decode):
2508         Add a missing break.
2509
2510 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
2511
2512         Add a build flag for ES6 class syntax
2513         https://bugs.webkit.org/show_bug.cgi?id=140760
2514
2515         Reviewed by Michael Saboff.
2516
2517         * Configurations/FeatureDefines.xcconfig:
2518
2519 2015-01-22  Chris Dumez  <cdumez@apple.com>
2520
2521         Drop the legacy FeatureCounter class
2522         https://bugs.webkit.org/show_bug.cgi?id=140749
2523
2524         Reviewed by Andreas Kling.
2525
2526         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
2527         instead.
2528
2529         * Shared/WebPreferencesDefinitions.h:
2530         * UIProcess/API/Cocoa/WKWebView.mm:
2531         (-[WKWebView initWithFrame:configuration:]):
2532         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2533         (-[WKWebViewConfiguration init]):
2534         (-[WKWebViewConfiguration copyWithZone:]):
2535         (-[WKWebViewConfiguration _featureCounterEnabled]):
2536         (-[WKWebViewConfiguration _setFeatureCounterEnabled:]):
2537         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2538         * WebProcess/WebPage/WebPage.cpp:
2539         (WebKit::WebPage::updatePreferences):
2540         * WebProcess/WebPage/ios/WebPageIOS.mm:
2541         (WebKit::WebPage::willStartUserTriggeredZooming):
2542
2543 2015-01-22  Beth Dakin  <bdakin@apple.com>
2544
2545         ibtoold crash below -[WebView close]
2546         https://bugs.webkit.org/show_bug.cgi?id=140782
2547         -and corresponding-
2548         rdar://problem/19558472
2549
2550         Reviewed by Tim Horton.
2551
2552         Retain the NSImmediateActionGestureRecognizer. This should not be necessary, but 
2553         it is because interface builder can mess with our views.
2554         * UIProcess/mac/WKImmediateActionController.h:
2555         * UIProcess/mac/WKImmediateActionController.mm:
2556         (-[WKImmediateActionController willDestroyView:]):
2557         (-[WKImmediateActionController _cancelImmediateAction]):
2558         (-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
2559         (-[WKImmediateActionController _updateImmediateActionItem]):
2560
2561 2015-01-22  David Kilzer  <ddkilzer@apple.com>
2562
2563         [iOS] Fix iphoneos SDK builds for ios-ews queue
2564         <http://webkit.org/b/140748>
2565
2566         Reviewed by Daniel Bates.
2567
2568         * Platform/spi/ios/BKSProcessAssertionSPI.h: Add -invalidate
2569         definition.  Sort @property to the top of BKSProcessAssertion.
2570
2571 2015-01-22  Shivakumar JM  <shiva.jm@samsung.com>
2572
2573         Fix build warning in WebKit2/UIProcess module
2574         https://bugs.webkit.org/show_bug.cgi?id=140758
2575
2576         Reviewed by Csaba Osztrogonác.
2577
2578         Fix build warnings by using UNUSED_PARAM macro
2579
2580         * UIProcess/API/C/WKPageGroup.cpp:
2581         (WKPageGroupAddUserContentFilter):
2582         (WKPageGroupRemoveAllUserContentFilters):
2583
2584 2014-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2585
2586         [GTK] Use API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
2587         https://bugs.webkit.org/show_bug.cgi?id=138467
2588
2589         Reviewed by Gustavo Noronha Silva.
2590
2591         * UIProcess/API/gtk/WebKitContextMenu.cpp:
2592         (webkitContextMenuPopulate): Add a version that receives a Vector<WebContextMenuItemData>&.
2593         (webkitContextMenuCreate): Change it to receive a const
2594         Vector<WebContextMenuItemData>& instead of a API::Array* and also
2595         add a another version that receives const Vector<ContextMenuItem>&.
2596         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
2597         (attachContextMenuClientToView): Use a class derived from
2598         API::ContextMenuClient to implement the context menu client.
2599         (getContextMenuFromProposedMenu): Deleted.
2600         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
2601         (webkitContextMenuItemCreate): Change it to receive a const
2602         WebContextMenuItemData& and added another version that receives a
2603         const ContextMenuItem&.
2604         * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
2605         * UIProcess/API/gtk/WebKitContextMenuPrivate.h:
2606         * UIProcess/API/gtk/WebKitWebView.cpp:
2607         (webkitWebViewPopulateContextMenu): Remove the creation of a
2608         WebHitTestResult::Data, since it receives it now as parameter.
2609         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2610         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
2611         (webkitWebHitTestResultCreate): Change it to receive a const
2612         HitTestResult& instead of const InjectedBundleHitTestResult&.
2613         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h:
2614         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2615         (webkitWebPageCreate): Use a class derived from
2616         API::InjectedBundle::PageContextMenuClient to implement the
2617         context menu client.
2618         (getContextMenuFromDefaultMenu): Deleted.
2619
2620 2015-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2621
2622         Unreviewed. Try to fix Debug build after r178889.
2623
2624         * UIProcess/API/C/WKPage.cpp: Include Logging.h.
2625
2626 2015-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2627
2628         Add API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
2629         https://bugs.webkit.org/show_bug.cgi?id=138466
2630
2631         Reviewed by Anders Carlsson.
2632
2633         Move ContextMenuClient to use API classes in both UI and Injected
2634         Bundle APIs.
2635
2636         * CMakeLists.txt: Remove WebPageContextMenuClient.cpp.
2637         * UIProcess/API/APIContextMenuClient.h: Renamed from Source/WebKit2/UIProcess/WebPageContextMenuClient.h.
2638         (API::ContextMenuClient::~ContextMenuClient):
2639         (API::ContextMenuClient::getContextMenuFromProposedMenu):
2640         (API::ContextMenuClient::customContextMenuItemSelected):
2641         (API::ContextMenuClient::contextMenuDismissed):
2642         (API::ContextMenuClient::showContextMenu):
2643         (API::ContextMenuClient::hideContextMenu):
2644         * UIProcess/API/C/WKPage.cpp:
2645         (WKPageSetPageContextMenuClient):
2646         * UIProcess/WebPageContextMenuClient.cpp: Removed.
2647         * UIProcess/WebPageProxy.cpp:
2648         (WebKit::WebPageProxy::WebPageProxy):
2649         (WebKit::WebPageProxy::setContextMenuClient):
2650         (WebKit::WebPageProxy::close):
2651         (WebKit::WebPageProxy::internalShowContextMenu):
2652         (WebKit::WebPageProxy::contextMenuItemSelected):
2653         (WebKit::WebPageProxy::initializeContextMenuClient): Deleted.
2654         * UIProcess/WebPageProxy.h:
2655         * WebKit2.xcodeproj/project.pbxproj: Remove deleted files and add
2656         new files to compilation.
2657         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h.
2658         (API::InjectedBundle::PageContextMenuClient::~PageContextMenuClient):
2659         (API::InjectedBundle::PageContextMenuClient::getCustomMenuFromDefaultItems):
2660         (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu):
2661         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2662         (WKBundlePageSetContextMenuClient):
2663         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
2664         (WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
2665         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
2666         (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu):
2667         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
2668         * WebProcess/WebPage/WebContextMenu.cpp:
2669         (WebKit::WebContextMenu::menuItemsWithUserData):
2670         * WebProcess/WebPage/WebPage.cpp:
2671         (WebKit::WebPage::WebPage):
2672         (WebKit::WebPage::setInjectedBundleContextMenuClient):
2673         (WebKit::WebPage::close):
2674         (WebKit::WebPage::initializeInjectedBundleContextMenuClient): Deleted.
2675         * WebProcess/WebPage/WebPage.h:
2676         (WebKit::WebPage::injectedBundleContextMenuClient):
2677         * WebProcess/WebPage/mac/WebPageMac.mm:
2678         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2679
2680 2015-01-20  Jon Honeycutt  <jhoneycutt@apple.com>
2681
2682         [iOS] WebKitTestRunner: Tests fail due to incorrect web view size
2683
2684         <https://bugs.webkit.org/show_bug.cgi?id=139736>
2685         <rdar://problem/19282196>
2686
2687         This starts happening after we fail to reset the test controller to
2688         consistent values in TestInvocation::invoke(). When we terminate the
2689         web process and relaunch it, the new WebPage object created in the web
2690         process is using the default ViewportConfiguration with dimensions of
2691         1024x768.
2692
2693         The PageClient on iOS currently notifies the WKWebView and the
2694         WKContentView when the web process is relaunched. This patch extends
2695         that to also notify the WKView.
2696
2697         Reviewed by Benjamin Poulain.
2698
2699         * UIProcess/API/Cocoa/WKViewPrivate.h:
2700         Declare -_didRelaunchProcess.
2701
2702         * UIProcess/API/ios/WKViewIOS.mm:
2703         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2704         Call the new method that accepts a WKView.
2705         (-[WKView _didRelaunchProcess]):
2706         Call -_frameOrBoundsChanged to update the web process's size to the
2707         size of the WKView.
2708
2709         * UIProcess/ios/PageClientImplIOS.h:
2710         Add a constructor that takes a WKView, and add a member var to hold it.
2711
2712         * UIProcess/ios/PageClientImplIOS.mm:
2713         (WebKit::PageClientImpl::PageClientImpl):
2714         Implement the constructor that takes a WKView.
2715         (WebKit::PageClientImpl::didRelaunchProcess):
2716         Tell the WKView that the web process relaunched.
2717
2718         * UIProcess/ios/WKContentView.h:
2719         Declare an initializer that takes a WKView.
2720
2721         * UIProcess/ios/WKContentView.mm:
2722         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2723         Split out from -[WKContentView initWithFrame:processPool:configuration:webView:].
2724         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
2725         Perform some initialization, including creating the PageClient, and
2726         call the common initializer.
2727         (-[WKContentView initWithFrame:processPool:configuration:wkView:]):
2728         Ditto.
2729
2730 2015-01-21  Sam Weinig  <sam@webkit.org>
2731
2732         Add WKPageGroupRef SPI for user content filters
2733         https://bugs.webkit.org/show_bug.cgi?id=140728
2734
2735         Reviewed by Anders Carlsson.
2736
2737         While Safari is transitioning to WKUserContentController, it is useful
2738         for them to have access to have access to content filters on the page group
2739         where they currently have user content related functionality.
2740
2741         * Shared/WebPageGroupData.cpp:
2742         (WebKit::WebPageGroupData::encode):
2743         (WebKit::WebPageGroupData::decode):
2744         * Shared/WebPageGroupData.h:
2745         * UIProcess/API/C/WKPageGroup.cpp:
2746         (WKPageGroupAddUserContentFilter):
2747         (WKPageGroupRemoveAllUserContentFilters):
2748         * UIProcess/API/C/WKPageGroup.h:
2749         * UIProcess/WebPageGroup.cpp:
2750         (WebKit::WebPageGroup::addUserContentFilter):
2751         (WebKit::WebPageGroup::removeAllUserContentFilters):
2752         * UIProcess/WebPageGroup.h:
2753         * WebProcess/WebPage/WebPageGroupProxy.cpp:
2754         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
2755         (WebKit::WebPageGroupProxy::addUserContentFilter):
2756         (WebKit::WebPageGroupProxy::removeAllUserContentFilters):
2757         * WebProcess/WebPage/WebPageGroupProxy.h:
2758         * WebProcess/WebPage/WebPageGroupProxy.messages.in:
2759
2760 2015-01-21  Beth Dakin  <bdakin@apple.com>
2761
2762         Crash in QuickLook preview delegate method
2763         https://bugs.webkit.org/show_bug.cgi?id=140740
2764         -and corresponding-
2765         rdar://problem/19540806
2766
2767         Reviewed by Tim Horton.
2768
2769         Clear out the delegate.
2770         * UIProcess/mac/WKImmediateActionController.mm:
2771         (-[WKImmediateActionController willDestroyView:]):
2772
2773 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
2774
2775         AsyncRequestImpl casting in AsyncRequest::completeRequest() is incorrect
2776         https://bugs.webkit.org/show_bug.cgi?id=139724
2777
2778         Reviewed by Darin Adler.
2779
2780         AsyncRequestImpl casting in AsyncRequest::completeRequest() relies on
2781         the parameter pack to properly determine the type of the AsyncRequestImpl
2782         object. The casting result can be incorrect when an argument is passed
2783         by reference while the original object was constructed with a callback
2784         that expects an argument that's passed by value.
2785
2786         To avoid this the AsyncRequestImpl template is now instantiated with
2787         raw types, with callback parameters remaining raw types in case
2788         of being integral (enforcing passing-by-value these arguments when
2789         dispatching), and const references being used otherwise (enforcing
2790         passing-by-reference).
2791
2792         This enables casting AsyncRequest objects to the correct AsyncRequestImpl<>
2793         by running the parameter pack through std::decay.
2794
2795         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2796         (WebKit::UniqueIDBDatabase::putRecord):
2797         (WebKit::UniqueIDBDatabase::getRecord):
2798         (WebKit::UniqueIDBDatabase::openCursor):
2799         (WebKit::UniqueIDBDatabase::cursorAdvance):
2800         (WebKit::UniqueIDBDatabase::cursorIterate):
2801         (WebKit::UniqueIDBDatabase::count):
2802         (WebKit::UniqueIDBDatabase::deleteRange):
2803         * Shared/AsyncRequest.h:
2804         (WebKit::AsyncRequest::completeRequest):
2805         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2806         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
2807         (WebKit::WebIDBServerConnection::get):
2808
2809 2015-01-21  Chris Dumez  <cdumez@apple.com>
2810
2811         [WK2] Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API
2812         https://bugs.webkit.org/show_bug.cgi?id=140655
2813
2814         Reviewed by Anders Carlsson.
2815
2816         Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API.
2817         Instead, introduce a new _WKDiagnosticLoggingResultType enum in
2818         _WKDiagnosticLoggingDelegate.h.
2819
2820         A few defines mapping WKDiagnosticLoggingResultType enum and its values
2821         to the new _WKDiagnosticLoggingResultType are temporarily added until
2822         the client-side is transitioned.
2823
2824         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
2825         * UIProcess/Cocoa/DiagnosticLoggingClient.mm:
2826         (WebKit::toWKDiagnosticLoggingResultType):
2827         (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
2828
2829 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
2830
2831         [WK2] Use C++ lambdas in ProcessLauncher class
2832         https://bugs.webkit.org/show_bug.cgi?id=138186
2833
2834         Reviewed by Darin Adler.
2835
2836         Replace uses of WTF::bind() in the ProcessLauncher class with C++ lambdas.
2837
2838         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2839         (WebKit::ProcessLauncher::launchProcess):
2840         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2841         (WebKit::ProcessLauncher::launchProcess):
2842         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2843         (WebKit::connectToService):
2844         (WebKit::tryPreexistingProcess):
2845         (WebKit::createProcess):
2846
2847 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
2848
2849         Clean up ViewUpdateDispatcher
2850         https://bugs.webkit.org/show_bug.cgi?id=140619
2851
2852         Reviewed by Darin Adler.
2853
2854         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2855         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2856         Replace WTF::bind() with a C++ lambda.
2857         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
2858         Use WTF::move() to move the HashMap member into the local variable.
2859
2860 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
2861
2862         Remove ENABLE(INSPECTOR) ifdef guards
2863         https://bugs.webkit.org/show_bug.cgi?id=140668
2864
2865         Reviewed by Darin Adler.
2866
2867         * Configurations/FeatureDefines.xcconfig:
2868         * Shared/API/c/WKSharedAPICast.h:
2869         (WebKit::toAPI):
2870         (WebKit::toImpl):
2871         * Shared/WebCoreArgumentCoders.cpp:
2872         (IPC::ArgumentCoder<ResourceRequest>::encode):
2873         (IPC::ArgumentCoder<ResourceRequest>::decode):
2874         * UIProcess/API/C/WKInspector.cpp:
2875         (WKInspectorGetTypeID):
2876         (WKInspectorGetPage):
2877         (WKInspectorIsConnected):
2878         (WKInspectorIsVisible):
2879         (WKInspectorIsFront):
2880         (WKInspectorConnect):
2881         (WKInspectorShow):
2882         (WKInspectorHide):
2883         (WKInspectorClose):
2884         (WKInspectorShowConsole):
2885         (WKInspectorShowResources):
2886         (WKInspectorShowMainResourceForFrame):
2887         (WKInspectorIsAttached):
2888         (WKInspectorAttach):
2889         (WKInspectorDetach):
2890         (WKInspectorIsProfilingPage):
2891         (WKInspectorTogglePageProfiling):
2892         * UIProcess/API/C/WKPage.cpp:
2893         (WKPageGetInspector):
2894         * UIProcess/API/efl/ewk_view.cpp:
2895         (ewk_view_inspector_show):
2896         (ewk_view_inspector_close):
2897         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2898         (TEST_F):
2899         * UIProcess/PageClient.h:
2900         * UIProcess/WebInspectorProxy.cpp:
2901         * UIProcess/WebInspectorProxy.h:
2902         * UIProcess/WebInspectorProxy.messages.in:
2903         * UIProcess/WebPageProxy.cpp:
2904         (WebKit::WebPageProxy::WebPageProxy):
2905         (WebKit::WebPageProxy::reattachToWebProcess):
2906         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
2907         (WebKit::WebPageProxy::resetState):
2908         * UIProcess/WebPageProxy.h:
2909         * UIProcess/WebPageProxy.messages.in:
2910         * UIProcess/WebProcessProxy.cpp:
2911         (WebKit::WebProcessProxy::getLaunchOptions):
2912         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2913         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2914         * UIProcess/ios/PageClientImplIOS.h:
2915         * UIProcess/ios/PageClientImplIOS.mm:
2916         (WebKit::PageClientImpl::disableInspectorNodeSearch):
2917         * UIProcess/ios/WebInspectorProxyIOS.mm:
2918         * UIProcess/ios/WebPageProxyIOS.mm:
2919         (WebKit::WebPageProxy::disableInspectorNodeSearch):
2920         * UIProcess/mac/WebInspectorProxyMac.mm:
2921         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
2922         (WKBundleInspectorGetTypeID):
2923         (WKBundleInspectorShow):
2924         (WKBundleInspectorClose):
2925         (WKBundleInspectorEvaluateScriptForTest):
2926         (WKBundleInspectorSetPageProfilingEnabled):
2927         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2928         (WKBundlePageGetInspector):
2929         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2930         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2931         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2932         * WebProcess/WebPage/WebInspector.cpp:
2933         * WebProcess/WebPage/WebInspector.h:
2934         * WebProcess/WebPage/WebInspector.messages.in:
2935         * WebProcess/WebPage/WebInspectorUI.cpp:
2936         * WebProcess/WebPage/WebInspectorUI.h:
2937         * WebProcess/WebPage/WebInspectorUI.messages.in:
2938         * WebProcess/WebPage/WebPage.cpp:
2939         (WebKit::WebPage::WebPage):
2940         (WebKit::WebPage::~WebPage):
2941         (WebKit::WebPage::close):
2942         (WebKit::WebPage::inspectorUI):
2943         (WebKit::WebPage::didReceiveMessage):
2944         * WebProcess/WebPage/WebPage.h:
2945         * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
2946         * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp:
2947         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2948         * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
2949         * WebProcess/WebPage/ios/WebPageIOS.mm:
2950         (WebKit::WebPage::disableInspectorNodeSearch):
2951         * WebProcess/WebPage/mac/WebInspectorMac.mm:
2952         * WebProcess/WebPage/mac/WebInspectorUIMac.mm:
2953         * config.h:
2954
2955 2015-01-20  Martin Hock  <mhock@apple.com>
2956
2957         [iOS][WK2] Redraw find-in-page indicator on rotation
2958         https://bugs.webkit.org/show_bug.cgi?id=140632
2959         <rdar://problem/18858394>
2960
2961         Reviewed by Tim Horton.
2962
2963         * WebProcess/WebPage/FindController.cpp:
2964         (WebKit::FindController::redraw): Add method to redraw find indicator (only used by iOS).
2965         * WebProcess/WebPage/FindController.h:
2966         * WebProcess/WebPage/WebPage.cpp:
2967         (WebKit::WebPage::mainFrameDidLayout):
2968         * WebProcess/WebPage/ios/FindControllerIOS.mm:
2969         (WebKit::FindController::updateFindIndicator): Redraw should not trigger zoom.
2970
2971 2015-01-20  David Kilzer  <ddkilzer@apple.com>
2972
2973         Switch to comparing PLATFORM_NAME in terms of macosx
2974         <http://webkit.org/b/139516>
2975
2976         Reviewed by Timothy Hatcher.
2977
2978         * WebKit2.xcodeproj/project.pbxproj:
2979         * mac/rewrite-availability-macros.sh: Remove the else block that
2980         checked for an unknown PLATFORM_NAME.
2981
2982 2015-01-19  Simon Fraser  <simon.fraser@apple.com>
2983
2984         Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
2985         https://bugs.webkit.org/show_bug.cgi?id=140474
2986
2987         Reviewed by Tim Horton.
2988         
2989         Add a private method to enable scrolling data collection to WKWebView. When enabled, create
2990         a RemoteLayerTreeScrollingPerformanceData object that collects "blank pixel" data on
2991         every layer tree commit and scroll, and stores them in a vector. A second SPI call
2992         allows retrieval of an NSArray of this data.
2993         
2994         To allow RemoteLayerTreeScrollingPerformanceData to find the correct layer which
2995         contains the main tile grid, we set a layer name on the appropriate layer (even
2996         in release builds).
2997
2998         * UIProcess/API/Cocoa/WKWebView.mm:
2999         (-[WKWebView visibleRectInScreenCoordinates]):
3000         (-[WKWebView _didCommitLayerTree:]):
3001         (-[WKWebView scrollViewDidScroll:]):
3002         (-[WKWebView _setScrollPerformanceDataCollectionEnabled:]):
3003         (-[WKWebView _scrollPerformanceDataCollectionEnabled]):
3004         (-[WKWebView _scrollPerformanceData]):
3005         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3006         * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.h: Added.
3007         (WebKit::RemoteLayerTreeScrollingPerformanceData::BlankPixelCount::BlankPixelCount):
3008         * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm: Added.
3009         (WebKit::RemoteLayerTreeScrollingPerformanceData::RemoteLayerTreeScrollingPerformanceData):
3010         (WebKit::RemoteLayerTreeScrollingPerformanceData::~RemoteLayerTreeScrollingPerformanceData):
3011         (WebKit::RemoteLayerTreeScrollingPerformanceData::didCommitLayerTree):
3012         (WebKit::RemoteLayerTreeScrollingPerformanceData::didScroll):
3013         (WebKit::RemoteLayerTreeScrollingPerformanceData::BlankPixelCount::canCoalesce):
3014         (WebKit::RemoteLayerTreeScrollingPerformanceData::appendBlankPixelCount):
3015         (WebKit::RemoteLayerTreeScrollingPerformanceData::data):
3016         (WebKit::findTileGridContainerLayer):
3017         (WebKit::RemoteLayerTreeScrollingPerformanceData::blankPixelCount):
3018         * UIProcess/WebPageProxy.cpp:
3019         (WebKit::WebPageProxy::WebPageProxy):
3020         (WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled):
3021         * UIProcess/WebPageProxy.h:
3022         (WebKit::WebPageProxy::scrollPerformanceDataCollectionEnabled):
3023         (WebKit::WebPageProxy::scrollingPerformanceData):
3024         * WebKit2.xcodeproj/project.pbxproj:
3025
3026 2015-01-19  Dean Jackson  <dino@apple.com>
3027
3028         Support "plus-darker" in mix-blend mode
3029         https://bugs.webkit.org/show_bug.cgi?id=140646
3030         <rdar://problem/19523370>
3031
3032         Reviewed by Simon Fraser.
3033
3034         Output the appropriate blending type when logging.
3035
3036         * Shared/mac/RemoteLayerTreeTransaction.mm:
3037         (WebKit::RemoteLayerTreeTextStream::operator<<):
3038
3039 2015-01-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3040
3041         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.4 release.
3042
3043         * gtk/NEWS: Add release notes for 2.7.4.
3044
3045 2015-01-20  Tomas Popela  <tpopela@redhat.com>
3046
3047         [GTK] Add API to set the web view editable into WebKit2 GTK+ API
3048         https://bugs.webkit.org/show_bug.cgi?id=139443
3049
3050         Reviewed by Carlos Garcia Campos.
3051
3052         Provide a way to set the web view editable, without accessing the DOM
3053         and setting the contenteditable attribute to elements.
3054
3055         * UIProcess/API/gtk/WebKitWebView.cpp:
3056         (webkitWebViewSetProperty):
3057         (webkitWebViewGetProperty):
3058         (webkit_web_view_class_init):
3059         (webkit_web_view_is_editable):
3060         (webkit_web_view_set_editable):
3061         * UIProcess/API/gtk/WebKitWebView.h:
3062         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3063
3064 2015-01-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3065
3066         [GTK] Add an option to create WebKitWebView snapshots with transparent background
3067         https://bugs.webkit.org/show_bug.cgi?id=140617
3068
3069         Reviewed by Gustavo Noronha Silva.
3070
3071         Add WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND flag to not
3072         fill with white the background before rendering the snapshot.
3073
3074         * UIProcess/API/gtk/WebKitWebView.cpp:
3075         (webkit_web_view_get_snapshot): Pass a TransparentBackground
3076         boolean argument to the WEbProcess.
3077         * UIProcess/API/gtk/WebKitWebView.h:
3078         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3079         (webkitWebPageDidReceiveMessage): Set the FrameView background as
3080         transparent when TransparentBackground option is True before
3081         rendering the snapshot.
3082
3083 2015-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3084
3085         [GTK] Add API to change the WebKitWebView background color
3086         https://bugs.webkit.org/show_bug.cgi?id=140610
3087
3088         Reviewed by Gustavo Noronha Silva.
3089
3090         When a color different than the default one (opaque white) is
3091         used, the SetDrawsBackground message is sent to the WebProcess with
3092         a False value to indicate WebCore to not render backgrounds. The
3093         background color passed is saved in the WebPageProxy and used by
3094         the backing store to fill the background before the actual
3095         contents are rendered in the WebView.
3096
3097         * UIProcess/API/gtk/WebKitWebView.cpp:
3098         (webkit_web_view_set_background_color):
3099         (webkit_web_view_get_background_color):
3100         * UIProcess/API/gtk/WebKitWebView.h:
3101         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
3102         * UIProcess/WebPageProxy.cpp:
3103         (WebKit::WebPageProxy::WebPageProxy): Initialize m_backgroundColor member.
3104         * UIProcess/WebPageProxy.h:
3105         (WebKit::WebPageProxy::backgroundColor): Return m_backgroundColor.
3106         (WebKit::WebPageProxy::setBackgroundColor): Set m_backgroundColor.
3107         * UIProcess/cairo/BackingStoreCairo.cpp:
3108         (WebKit::BackingStore::incorporateUpdate): Fill the damage region
3109         with the WebPageProxy background color when the WebProcess is not
3110         rendering backgrounds. If the background color is not fully opaque
3111         we need to clear the region before filling it with the color.
3112
3113 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
3114
3115         [SVG -> OTF Converter] Flip the switch on
3116         https://bugs.webkit.org/show_bug.cgi?id=140592
3117
3118         Reviewed by Antti Koivisto.
3119
3120         * Configurations/FeatureDefines.xcconfig:
3121
3122 2015-01-19  Mark Rowe  <mrowe@apple.com>
3123
3124         <https://webkit.org/b/140504> REGRESSION (r178452): Visited link coloring only appears to work in the first web process
3125
3126         Roll out r178452 since it broke visited link coloring.
3127
3128         Reviewed by Anders Carlsson.
3129
3130         * UIProcess/VisitedLinkProvider.cpp:
3131         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
3132         (WebKit::VisitedLinkProvider::addProcess):
3133         (WebKit::VisitedLinkProvider::removeProcess):
3134         (WebKit::VisitedLinkProvider::removeAll):
3135         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
3136         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
3137         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
3138         (WebKit::VisitedLinkProvider::resizeTable):
3139         * UIProcess/VisitedLinkProvider.h:
3140         * UIProcess/WebPageProxy.cpp:
3141         (WebKit::WebPageProxy::WebPageProxy):
3142         (WebKit::WebPageProxy::processDidFinishLaunching):
3143         * UIProcess/WebProcessProxy.cpp:
3144         (WebKit::WebProcessProxy::disconnect):
3145         (WebKit::WebProcessProxy::addVisitedLinkProvider):
3146         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider):
3147         * UIProcess/WebProcessProxy.h:
3148
3149 2015-01-19  Sam Weinig  <sam@webkit.org>
3150
3151         Sprinkle some CTTE on API::PolicyClient and API::FormClient
3152         https://bugs.webkit.org/show_bug.cgi?id=140656
3153
3154         Reviewed by Tim Horton.
3155
3156         - Use references rather than pointers where possible.
3157         - Store and pass the listeners as Refs.
3158         - Make API::FormClient more like API::PolicyClient by making it the
3159           responsibility of the client implementation to call the default policy.
3160
3161         * UIProcess/API/APIFormClient.h:
3162         (API::FormClient::willSubmitForm):
3163         * UIProcess/API/APIPolicyClient.h:
3164         (API::PolicyClient::decidePolicyForNavigationAction):
3165         (API::PolicyClient::decidePolicyForNewWindowAction):
3166         (API::PolicyClient::decidePolicyForResponse):
3167         (API::PolicyClient::unableToImplementPolicy):
3168         * UIProcess/API/C/WKPage.cpp:
3169         (WKPageSetPagePolicyClient):
3170         * UIProcess/API/Cocoa/WKWebView.mm:
3171         (-[WKWebView _setFormDelegate:]):
3172         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
3173         * UIProcess/Cocoa/NavigationState.h:
3174         * UIProcess/Cocoa/NavigationState.mm:
3175         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
3176         (WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):
3177         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
3178         * UIProcess/WebFormClient.cpp:
3179         (WebKit::WebFormClient::willSubmitForm):
3180         * UIProcess/WebFormClient.h:
3181         * UIProcess/WebFrameProxy.cpp:
3182         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
3183         (WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy):
3184         * UIProcess/WebFrameProxy.h:
3185         * UIProcess/WebPageProxy.cpp:
3186         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3187         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
3188         (WebKit::WebPageProxy::decidePolicyForResponse):
3189         (WebKit::WebPageProxy::unableToImplementPolicy):
3190         (WebKit::WebPageProxy::willSubmitForm):
3191
3192 2015-01-18  Sam Weinig  <sam@webkit.org>
3193
3194         Merge API::ProcessPoolConfiguration and _WKProcessPoolConfiguration
3195         https://bugs.webkit.org/show_bug.cgi?id=140601
3196
3197         Reviewed by Anders Carlsson.
3198
3199         - Converts _WKProcessPoolConfiguration to be backed via API::ProcessPoolConfiguration.
3200         - Expands API::ProcessPoolConfiguration to add all the parameters necessary to fully
3201           initialize a WebProcessPool. This allows -[WKProcessPool _initWithConfiguration:] to
3202           be a simple pass through initializer, which in turn allows us to consider WebProcessPools
3203           created on the C++ and Objective-C sides as equivalent.
3204         - Makes WebProcessPool own the reference to the API::ProcessPoolConfiguration (rather than
3205           the WKProcessPool wrapper).
3206
3207         * Shared/Cocoa/APIObject.mm:
3208         (API::Object::newObject):
3209         Create the API::ProcessPoolConfigurations using [_WKProcessPoolConfiguration alloc] as its 
3210         storage..
3211
3212         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3213         (API::ProcessPoolConfiguration::create):
3214         (API::ProcessPoolConfiguration::createWithLegacyOptions):
3215         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
3216         (API::ProcessPoolConfiguration::~ProcessPoolConfiguration):
3217         (API::ProcessPoolConfiguration::copy):
3218         (API::ProcessPoolConfiguration::webProcessPoolConfiguration): Deleted.
3219         * UIProcess/API/APIProcessPoolConfiguration.h:
3220         Add the remaining initialization parameters and add a convenience create function
3221         for configuring legacy WebProcessPools (for use by the C-SPI).
3222
3223         * UIProcess/API/APIWebsiteDataStore.cpp:
3224         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
3225         * UIProcess/API/APIWebsiteDataStore.h:
3226         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
3227         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
3228         (API::WebsiteDataStore::defaultDataStoreConfiguration):
3229         Expose helper for getting the website data directories for use in the ProcessPoolConfiguration.
3230
3231         * UIProcess/API/C/WKContext.cpp:
3232         (WKContextCreate):
3233         (WKContextCreateWithInjectedBundlePath):
3234         (WKContextCreateWithConfiguration):
3235         Use ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
3236
3237         * UIProcess/API/C/WKContextConfigurationRef.cpp:
3238         (WKContextConfigurationCreate):
3239         Update for ProcessPoolConfiguration::create() returning a Ref. Note, this function
3240         was not changed to call ProcessPoolConfiguration::createWithLegacyOptions() since
3241         it has not been around long enough to warrant it.
3242
3243         * UIProcess/API/Cocoa/WKProcessGroup.mm:
3244         (-[WKProcessGroup initWithInjectedBundleURL:]):
3245         Use ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
3246
3247         * UIProcess/API/Cocoa/WKProcessPool.mm:
3248         (-[WKProcessPool description]):
3249         Change to pull the configuration from the underlying API::Object.
3250
3251         (-[WKProcessPool _configuration]):
3252         Change to pull the configuration from the underlying API::Object and call the new
3253         copy() helper on it.
3254         
3255         (-[WKProcessPool _initWithConfiguration:]):
3256         Convert to be a simple pass through to API::Object::constructInWrapper.
3257
3258         (websiteDataDirectoryURL): Deleted.
3259         Moved to APIWebsiteDataStore.h
3260
3261         * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
3262         Removes the _WKProcessPoolConfiguration member, now that it is stored on the WebProcessPool.
3263         
3264         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3265         (-[_WKProcessPoolConfiguration init]):
3266         (-[_WKProcessPoolConfiguration dealloc]):
3267         Added to support API::Object bridging.
3268
3269         (-[_WKProcessPoolConfiguration injectedBundleURL]):
3270         (-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
3271         Convert to getting the URL from the underlying object. Moved the exception
3272         that used to be on creation of the WKProcessPool.
3273
3274         (-[_WKProcessPoolConfiguration maximumProcessCount]):
3275         (-[_WKProcessPoolConfiguration setMaximumProcessCount:]):
3276         Convert to getting the count from the underlying object.
3277
3278         (-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
3279         Convert to constructing the NSArray on demand from the underlying Vector.
3280
3281         (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
3282         Converts the NSArray to a Vector rather than storing the array.
3283
3284         * UIProcess/API/Cocoa/_WKProcessPoolConfigurationInternal.h: Added.
3285         (API::wrapper):
3286         Add boilerplate for API::Object bridging.
3287
3288         * UIProcess/API/gtk/WebKitWebContext.cpp:
3289         (webkitWebContextConstructed):
3290         Update to use API::ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
3291
3292
3293         * UIProcess/WebInspectorProxy.cpp:
3294         (WebKit::WebInspectorProxy::inspectorProcessPool):
3295         Update to call API::ProcessPoolConfiguration::createWithLegacyOptions().
3296
3297         * UIProcess/WebProcessPool.cpp:
3298         (WebKit::WebProcessPool::create):
3299         (WebKit::websiteDataStoreConfiguration):
3300         (WebKit::WebProcessPool::WebProcessPool):
3301         (WebKit::WebProcessPool::applyPlatformSpecificConfigurationDefaults): Deleted.
3302         This functionality was moved to the constructor of the API::ProcessPoolConfiguration.
3303         * UIProcess/WebProcessPool.h:
3304         Changed to take (and store) a API::ProcessPoolConfiguration rather than the WebProcessPoolConfiguration.
3305
3306         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3307         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
3308         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
3309         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
3310         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
3311         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
3312         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
3313         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
3314         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
3315         * UIProcess/efl/WebContextEfl.cpp:
3316         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
3317         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
3318         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
3319         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
3320         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
3321         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
3322         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
3323         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
3324         * UIProcess/gtk/WebProcessPoolGtk.cpp:
3325         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
3326         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
3327         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
3328         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
3329         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
3330         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
3331         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
3332         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
3333         Renamed to make it clear these were the legacy locations for these directories.
3334
3335         * WebKit2.xcodeproj/project.pbxproj:
3336         Added new files.
3337
3338 2015-01-19  Beth Dakin  <bdakin@apple.com>
3339
3340          Speculative build fix.
3341
3342         * UIProcess/API/mac/WKView.mm:
3343         (-[WKView initWithFrame:processPool:configuration:webView:]):
3344
3345 2015-01-19  Timothy Horton  <timothy_horton@apple.com>
3346
3347         Adjust naming of action menu SPI
3348         https://bugs.webkit.org/show_bug.cgi?id=140644
3349         <rdar://problem/19448129>
3350
3351         Reviewed by Brian Weinstein.
3352
3353         * UIProcess/API/mac/WKView.mm:
3354         (-[WKView initWithFrame:processPool:configuration:webView:]):
3355         * UIProcess/mac/WKActionMenuController.mm:
3356         (-[WKActionMenuController prepareForMenu:withEvent:]):
3357         (-[WKActionMenuController willOpenMenu:withEvent:]):
3358         (-[WKActionMenuController didCloseMenu:withEvent:]):
3359         (-[WKActionMenuController menuNeedsUpdate:]):
3360         (-[WKActionMenuController _updateActionMenuItems]):
3361
3362 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
3363
3364         [CoordinatedGraphics] Use C++ lambda instead of WTF::bind() in ThreadedCompositor::updateSceneState()
3365         https://bugs.webkit.org/show_bug.cgi?id=140613
3366
3367         Reviewed by Carlos Garcia Campos.
3368
3369         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3370         (WebKit::ThreadedCompositor::updateSceneState): Replace the use of WTF::bind() with a C++ lambda.
3371
3372 2015-01-19  Commit Queue  <commit-queue@webkit.org>
3373
3374         Unreviewed, rolling out r178653.
3375         https://bugs.webkit.org/show_bug.cgi?id=140634
3376
3377         Broke multiple SVG tests on Mountain Lion (Requested by ap on
3378         #webkit).
3379
3380         Reverted changeset:
3381
3382         "[SVG -> OTF Converter] Flip the switch on"
3383         https://bugs.webkit.org/show_bug.cgi?id=140592
3384         http://trac.webkit.org/changeset/178653
3385
3386 2015-01-19  Dean Jackson  <dino@apple.com>
3387
3388         Add "override" to fix the build with newer clangs.
3389
3390         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
3391         (WebKit::WebProcessProxy::transformHandlesToObjects):
3392         (WebKit::WebProcessProxy::transformObjectsToHandles):
3393         * UIProcess/WebProcessProxy.cpp:
3394         (WebKit::WebProcessProxy::transformObjectsToHandles):
3395         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3396         * WebProcess/cocoa/WebProcessCocoa.mm:
3397         (WebKit::WebProcess::transformHandlesToObjects):
3398         (WebKit::WebProcess::transformObjectsToHandles):
3399
3400 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
3401
3402         [SVG -> OTF Converter] Flip the switch on
3403         https://bugs.webkit.org/show_bug.cgi?id=140592
3404
3405         Reviewed by Antti Koivisto.
3406
3407         * Configurations/FeatureDefines.xcconfig:
3408
3409 2015-01-18  Daniel Bates  <dabates@apple.com>
3410
3411         Attempt to fix the iOS build after <http://trac.webkit.org/changeset/178631>
3412         (https://bugs.webkit.org/show_bug.cgi?id=129441)
3413
3414         * UIProcess/WKInspectorHighlightView.mm:
3415         (-[WKInspectorHighlightView update:]): Substitute HighlightType::Node and
3416         HighlightType::Rects for HighlightTypeNode and HighlightTypeRects, respectively.
3417         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3418         (WebKit::WebInspectorClient::highlight): Pass lvalue reference to WebCore::Highlight
3419         instead of pointer in call to InspectorController::getHighlight().
3420
3421 2015-01-18  Sam Weinig  <sam@webkit.org>
3422
3423         Fix style issues and add availability macros missed in r178634
3424         https://bugs.webkit.org/show_bug.cgi?id=140597
3425
3426         Reviewed by Dan Bernstein.
3427
3428         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
3429         Add missing availability macros.
3430
3431         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
3432         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
3433         (-[_WKUserContentFilter initWithName:serializedRules:]):
3434         (-[_WKUserContentFilter _initWithName:serializedRules:]): Deleted.
3435         Removed unnecessary leading underscore from init method.
3436
3437 2015-01-17  Sam Weinig  <sam@webkit.org>
3438
3439         Add initial experimental user content filtering API
3440         https://bugs.webkit.org/show_bug.cgi?id=140584
3441
3442         Reviewed by Benjamin Poulain.
3443
3444         Moves content filtering from being per-ProcessPool to per-UserContentController.
3445
3446         * Shared/API/APIObject.h:
3447         * Shared/API/c/WKBase.h:
3448         * UIProcess/API/APIUserContentFilter.cpp: Added.
3449         (API::UserContentFilter::UserContentFilter):
3450         (API::UserContentFilter::~UserContentFilter):
3451         * UIProcess/API/APIUserContentFilter.h: Added.
3452         * UIProcess/API/C/WKAPICast.h:
3453         * UIProcess/API/C/WKUserContentFilterRef.cpp: Added.
3454         (WKUserContentFilterGetTypeID):
3455         (WKUserContentFilterCreate):
3456         * UIProcess/API/C/WKUserContentFilterRef.h: Added.
3457         * UIProcess/API/C/WebKit2_C.h:
3458         * UIProcess/API/Cocoa/_WKUserContentFilter.h: Added.
3459         * UIProcess/API/Cocoa/_WKUserContentFilter.mm: Added.
3460         (WKUserContentControllerAddUserContentFilter):
3461         (WKUserContentControllerRemoveAllUserContentFilters):
3462         (-[_WKUserContentFilter _initWithName:ruleList:]):
3463         * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h: Added.
3464         Add a basic UserContentFilter type and expose it via both the Objective-C API (as _WKUserContentFilter)
3465         and via the C SPI (as WKUserContentFilterRef).
3466
3467         * UIProcess/API/C/WKUserContentControllerRef.h:
3468         * UIProcess/API/C/WKUserContentControllerRef.cpp:
3469         Add C-SPI to set and remove WKUserContentFilterRefs.
3470
3471         * UIProcess/API/Cocoa/WKProcessPool.mm:
3472         (-[WKProcessPool _loadContentExtensionWithIdentifier:serializedRules:successCompletionHandler:errorCompletionHandler:]): Deleted.
3473         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3474         * UIProcess/WebProcessPool.cpp:
3475         (WebKit::WebProcessPool::processDidFinishLaunching):
3476         (WebKit::WebProcessPool::loadContentExtension): Deleted.
3477         * UIProcess/WebProcessPool.h:
3478  &nbs