Fix the build with newer Clang
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-01-29  Tim Horton  <timothy_horton@apple.com>
2
3         Fix the build with newer Clang
4
5         * NetworkProcess/NetworkConnectionToWebProcess.h:
6         These should be 'override's.
7
8 2015-01-29  Chris Dumez  <cdumez@apple.com>
9
10         Clean up / modernize PageCache class
11         https://bugs.webkit.org/show_bug.cgi?id=141009
12
13         Reviewed by Darin Adler.
14
15         Clean up / modernize PageCache class.
16
17         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
18         (WebKit::WebBackForwardListProxy::removeItem):
19         (WebKit::WebBackForwardListProxy::close):
20         * WebProcess/WebPage/WebPage.cpp:
21         (WebKit::WebPage::goForward):
22         (WebKit::WebPage::goBack):
23         (WebKit::WebPage::goToBackForwardItem):
24         * WebProcess/WebProcess.cpp:
25         (WebKit::WebProcess::releasePageCache):
26         * WebProcess/cocoa/WebProcessCocoa.mm:
27         (WebKit::WebProcess::platformSetCacheModel):
28         * WebProcess/soup/WebProcessSoup.cpp:
29         (WebKit::WebProcess::platformSetCacheModel):
30
31 2015-01-29  Csaba Osztrogonác  <ossy@webkit.org>
32
33         [EFL][GTK] Fix the build after r179326
34         https://bugs.webkit.org/show_bug.cgi?id=141027
35
36         Reviewed by Alexey Proskuryakov.
37
38         Guard MessageRecorder implementation with USE(DTRACE)
39         for platforms not supporting DTrace.
40
41         Original patch by Carlos Garcia Campos <cgarcia@igalia.com>
42
43         * Platform/IPC/ArgumentCoders.cpp:
44         * Platform/IPC/ArgumentCoders.h:
45         * Platform/IPC/Connection.cpp:
46         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
47         (IPC::Connection::sendMessage):
48         (IPC::Connection::sendSyncMessage):
49         (IPC::Connection::sendSyncMessageFromSecondaryThread):
50         (IPC::Connection::dispatchSyncMessage):
51         (IPC::Connection::dispatchMessage):
52         * Platform/IPC/MessageDecoder.cpp:
53         (IPC::MessageDecoder::MessageDecoder):
54         * Platform/IPC/MessageDecoder.h:
55         * Platform/IPC/MessageEncoder.cpp:
56         (IPC::MessageEncoder::MessageEncoder):
57         (IPC::MessageEncoder::encodeHeader):
58         * Platform/IPC/MessageEncoder.h:
59         * Platform/IPC/MessageRecorder.h:
60
61 2015-01-29  Tim Horton  <timothy_horton@apple.com>
62
63         Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
64         https://bugs.webkit.orgshow_bug.cgi?id=141018
65         <rdar://problem/19619999>
66
67         * UIProcess/API/mac/WKView.mm:
68         (-[WKView quickLookWithEvent:]):
69         Yosemite is 101000, not 10100.
70
71 2015-01-28  Tim Horton  <timothy_horton@apple.com>
72
73         Add API::{FrameInfo, NavigationAction, NavigationResponse} types
74         https://bugs.webkit.org/show_bug.cgi?id=140982
75
76         Reviewed by Sam Weinig.
77
78         Make C++ API objects for WK{FrameInfo, NavigationAction, NavigationResponse}
79         to wrap around, as a step towards moving Modern API logic down into WebPageProxy.
80
81         * Shared/API/APIObject.h:
82         * Shared/Cocoa/APIObject.mm:
83         (API::Object::newObject):
84         * UIProcess/API/APIFrameInfo.cpp: Added.
85         * UIProcess/API/APIFrameInfo.h: Added.
86         * UIProcess/API/APINavigationAction.h: Added.
87         * UIProcess/API/APINavigationResponse.h: Added.
88         Add API::FrameInfo, API::NavigationAction, and API::NavigationResponse.
89
90         * UIProcess/API/Cocoa/WKFrameInfo.mm:
91         * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
92         Make WKFrameInfo a WKObject, wrapping a API::FrameInfo.
93
94         * UIProcess/API/Cocoa/WKNavigationAction.mm:
95         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
96         Make WKNavigationAction a WKObject, wrapping a API::NavigationAction.
97
98         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
99         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
100         Make WKNavigationResponse a WKObject, wrapping a API::NavigationResponse.
101
102         * UIProcess/API/Cocoa/WKUserContentController.mm:
103         Adopt API::FrameInfo.
104
105         * UIProcess/Cocoa/NavigationState.mm:
106         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
107         Adopt API::FrameInfo, and reorganize the code slightly.
108         Adopt API::NavigationAction.
109
110         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
111         Adopt API::FrameInfo.
112         Adopt API::NavigationResponse.
113
114         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
115         Adopt API::FrameInfo.
116
117         * UIProcess/Cocoa/UIDelegate.mm:
118         (WebKit::UIDelegate::UIClient::createNewPage):
119         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
120         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
121         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
122         Adopt API::FrameInfo.
123
124         * WebKit2.xcodeproj/project.pbxproj:
125
126 2015-01-28  Antti Koivisto  <antti@apple.com>
127
128         http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
129         https://bugs.webkit.org/show_bug.cgi?id=140976
130
131         Reviewed by Chris Dumez.
132
133         The previous fix sometimes invoked the completion handler twice. Explicitly track if we
134         have called it or not.
135
136         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
137         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
138
139         Also move the error case to the done branch. According to the documentation 'done' is always set on error.
140
141 2015-01-28  Timothy Horton  <timothy_horton@apple.com>
142
143         Add a WebKitMessageRecorder DTrace provider, exposing IPC details to DTrace
144         https://bugs.webkit.org/show_bug.cgi?id=140673
145
146         Reviewed by Sam Weinig.
147
148         * Platform/IPC/ArgumentCoders.cpp:
149         (IPC::ArgumentCoder<uuid_t>::encode):
150         (IPC::ArgumentCoder<uuid_t>::decode):
151         * Platform/IPC/ArgumentCoders.h:
152         Add a uuid_t (simple) argument coder.
153         Fix a mis-named header-guard #ifdef.
154
155         * Platform/IPC/Connection.cpp:
156         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
157         (IPC::Connection::dispatchSyncMessage):
158         Sync message replies inherit the message UUID from the incoming sync message.
159
160         (IPC::Connection::sendMessage):
161         (IPC::Connection::waitForMessage):
162         (IPC::Connection::sendSyncMessage):
163         (IPC::Connection::sendSyncMessageFromSecondaryThread):
164         Record outgoing messages. Because sendSyncMessage calls sendMessage,
165         we have to explicitly avoid recording the message twice.
166
167         (IPC::Connection::dispatchMessage):
168         Record the incoming message.
169
170         (IPC::Connection::remoteProcessID):
171         Add remoteProcessID(), which tries to determine the pid of the remote process.
172
173         * Platform/IPC/Connection.h:
174         (IPC::Connection::xpcConnection):
175         This can be const.
176
177         (IPC::Connection::isValid):
178         Make this public.
179
180         * Platform/IPC/MessageDecoder.cpp:
181         (IPC::MessageDecoder::MessageDecoder):
182         * Platform/IPC/MessageDecoder.h:
183         (IPC::MessageDecoder::setMessageProcessingToken):
184         (IPC::MessageDecoder::UUID):
185         Decode and store the message UUID.
186         Store a MessageProcessingToken for the lifetime of the MessageDecoder;
187         this ensures that all time spent processing the incoming message will be
188         counted against that message.
189
190         * Platform/IPC/MessageEncoder.cpp:
191         (IPC::MessageEncoder::MessageEncoder):
192         By default, create a new UUID for the message. Alternatively, allow clients
193         to pass the message UUID in (used for sync message replies).
194         Store the messageReceiverName and messageName.
195
196         (IPC::MessageEncoder::encodeHeader):
197         Factor encodeHeader() out of the constructors so most of their code can be shared.
198
199         (IPC::MessageEncoder::isSyncMessage):
200         (IPC::MessageEncoder::shouldDispatchMessageWhenWaitingForSyncReply):
201         Add getters for these flags.
202
203         * Platform/IPC/MessageEncoder.h:
204         (IPC::MessageEncoder::messageReceiverName):
205         (IPC::MessageEncoder::messageName):
206         (IPC::MessageEncoder::destinationID):
207         (IPC::MessageEncoder::UUID):
208
209         * Platform/IPC/MessageRecorder.h: Added.
210         * Platform/IPC/MessageRecorder.cpp: Added.
211         (MessageRecorder::MessageRecorder):
212         Add a class that interfaces with a custom DTrace provider to log incoming and outgoing messages.
213
214         (MessageRecorder::shared):
215         (MessageRecorder::isEnabled):
216         Determine if either of the message probes are enabled. If not, we'll avoid most of the
217         work associated with MessageRecorder.
218
219         (MessageRecorder::recordOutgoingMessage):
220         (MessageRecorder::recordIncomingMessage):
221         Build a WebKitMessageRecord and MessageProcessingToken from the Message(De|En)coder.
222         Once the MessageProcessingToken is deallocated, the probe will be invoked with the WebKitMessageRecord.
223
224         (MessageRecorder::MessageProcessingToken::MessageProcessingToken):
225         (MessageRecorder::MessageProcessingToken::~MessageProcessingToken):
226         Keep track of when the token is created and destroyed; these are considered the beginning
227         and ending "processing" times of the message (and as such the token should be kept alive for
228         exactly as long as the message is being processed).
229
230         * Platform/IPC/MessageRecorderProbes.d: Added.
231         Add a DTrace provider source file with two probes, message_sent and message_received.
232         The struct must match the struct in MessageRecorder.h.
233         
234         * Platform/IPC/ProcessType.h: Added.
235         Add an enum of process types.
236
237         * WebKit2.xcodeproj/project.pbxproj:
238
239         * DatabaseProcess/DatabaseProcess.h:
240         * DatabaseProcess/DatabaseToWebProcessConnection.h:
241         * NetworkProcess/NetworkConnectionToWebProcess.h:
242         * NetworkProcess/NetworkProcess.h:
243         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
244         * WebProcess/Network/NetworkProcessConnection.h:
245         * WebProcess/Plugins/PluginProcessConnection.h:
246         * WebProcess/WebPage/WebInspector.h:
247         * WebProcess/WebPage/WebInspectorUI.h:
248         * WebProcess/WebProcess.h:
249         * UIProcess/Databases/DatabaseProcessProxy.h:
250         * UIProcess/Network/NetworkProcessProxy.h:
251         * UIProcess/Plugins/PluginProcessProxy.h:
252         * UIProcess/WebProcessProxy.h:
253         * PluginProcess/PluginProcess.h:
254         * PluginProcess/WebProcessConnection.h:
255         Annotate Connection::Clients with process types.
256         
257 2015-01-28  Joseph Pecoraro  <pecoraro@apple.com>
258
259         Web Inspector: Crash closing inspected page with frequent activity
260         https://bugs.webkit.org/show_bug.cgi?id=140973
261
262         Reviewed by Timothy Hatcher.
263
264         * WebProcess/WebPage/WebInspector.h:
265         (WebKit::WebInspector::disconnectFromPage):        
266         * WebProcess/WebPage/WebPage.cpp:
267         (WebKit::WebPage::close):
268         Be sure to close the WebInspector connection through the page
269         when the page is closing so that the WebKit::WebInspector is
270         relinquishes itself as the InspectorFrontendChannel.
271
272 2015-01-28  Timothy Horton  <timothy_horton@apple.com>
273
274         Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
275         https://bugs.webkit.org/show_bug.cgi?id=141018
276         <rdar://problem/19619999>
277
278         Reviewed by Beth Dakin.
279
280         * UIProcess/API/mac/WKView.mm:
281         (-[WKView quickLookWithEvent:]):
282         If we have an immediate action gesture recognizer, just call super and
283         avoid WebKit's special quickLookWithEvent: implementation.
284
285 2015-01-28  Sungmann Cho  <sungmann.cho@navercorp.com>
286
287         Remove remaining PLATFORM(WIN) code blocks from WebKit2.
288         https://bugs.webkit.org/show_bug.cgi?id=140972
289
290         Reviewed by Darin Adler.
291
292         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
293         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
294
295 2015-01-28  Beth Dakin  <bdakin@apple.com>
296
297         Remove Mountain Lion code from WebKit and WebKit2
298         https://bugs.webkit.org/show_bug.cgi?id=141010
299
300         Reviewed by Sam Weinig.
301
302         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
303         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
304         * Shared/mac/ChildProcessMac.mm:
305         (WebKit::ChildProcess::initializeSandbox):
306         * Shared/mac/WebEventFactory.mm:
307         (WebKit::phaseForEvent):
308         * UIProcess/API/mac/WKView.mm:
309         (-[WKView quickLookWithEvent:]):
310         (-[WKView updateLayer]):
311         (-[WKView createFullScreenWindow]):
312         * UIProcess/Network/NetworkProcessProxy.cpp:
313         (WebKit::NetworkProcessProxy::didFinishLaunching):
314         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
315         (WebKit::shouldUseXPC):
316         * UIProcess/WebProcessProxy.cpp:
317         (WebKit::WebProcessProxy::didFinishLaunching):
318         * UIProcess/mac/PageClientImpl.mm:
319         (WebKit::PageClientImpl::isViewVisible):
320         * WebKit2Prefix.h:
321         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
322         (InitWebCoreSystemInterface):
323         * WebProcess/com.apple.WebProcess.sb.in:
324
325 2015-01-28  Joseph Pecoraro  <pecoraro@apple.com>
326
327         Web Inspector: Crash when closing inspected page
328         https://bugs.webkit.org/show_bug.cgi?id=140968
329
330         Reviewed by Timothy Hatcher.
331
332         Handle cases where the corePage could be null. With the Inspector Process
333         in its own process, messages may come to the WebContentProcess after
334         the WebCore::Page has itself been destroyed.
335
336         * WebProcess/WebPage/WebInspector.cpp:
337         (WebKit::WebInspector::show):
338         (WebKit::WebInspector::close):
339         (WebKit::WebInspector::openInNewTab):
340         (WebKit::WebInspector::evaluateScriptForTest):
341         (WebKit::WebInspector::showConsole):
342         (WebKit::WebInspector::showResources):
343         (WebKit::WebInspector::showMainResourceForFrame):
344         (WebKit::WebInspector::startPageProfiling):
345         (WebKit::WebInspector::stopPageProfiling):
346         (WebKit::WebInspector::canAttachWindow):
347         (WebKit::WebInspector::sendMessageToBackend):
348         (WebKit::WebInspector::remoteFrontendConnected):
349         (WebKit::WebInspector::remoteFrontendDisconnected):
350
351 2015-01-28  Sam Weinig  <sam@webkit.org>
352
353         Convert WebPreferences and VisitedLinkProvider to be bridged API::Objects
354         https://bugs.webkit.org/show_bug.cgi?id=141002
355
356         Reviewed by Tim Horton.
357
358         * Shared/API/APIObject.h:
359         Add VisitedLinkProvider type.
360         
361         * Shared/Cocoa/APIObject.mm:
362         (API::Object::newObject):
363         Allocate WebPreferences and VisitedLinkProvider as their Objective-C counterpart.
364         
365         * UIProcess/API/Cocoa/WKPreferences.mm:
366         (-[WKPreferences init]):
367         Switch to constructInWrapper.
368
369         (-[WKPreferences dealloc]):
370         Call the WebPreferences destructor.
371         
372         (-[WKPreferences _apiObject]):
373         Add implementation of the WKObject protocol.
374
375         * UIProcess/API/Cocoa/WKPreferencesInternal.h:
376         Convert to using ObjectStorage.
377
378         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
379         (-[_WKVisitedLinkProvider init]):
380         Switch to constructInWrapper.
381
382         (-[_WKVisitedLinkProvider dealloc]):
383         Call the VisitedLinkProvider destructor.
384
385         (-[_WKVisitedLinkProvider _apiObject]):
386         Add implementation of the WKObject protocol.
387
388         * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h:
389         Convert to using ObjectStorage.
390
391         * UIProcess/VisitedLinkProvider.cpp:
392         (WebKit::VisitedLinkProvider::create):
393         * UIProcess/VisitedLinkProvider.h:
394         Switch create() to return a Ref.
395
396         * UIProcess/WebPreferences.h:
397         Make the constructor public for use by constructInWrapper.
398
399         * UIProcess/WebProcessPool.cpp:
400         (WebKit::WebProcessPool::createWebPage):
401         * UIProcess/WebProcessPool.h:
402         Store the VisitedLinkProvider in a Ref.
403
404 2015-01-28  Dana Burkart  <dburkart@apple.com>
405
406         Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
407         https://bugs.webkit.org/show_bug.cgi?id=136765
408
409         Reviewed by Alexey Proskuryakov.
410
411         * Configurations/Base.xcconfig:
412         * Configurations/DebugRelease.xcconfig:
413
414 2015-01-28  Chris Dumez  <cdumez@apple.com>
415
416         Fix typo in markPagesForVistedLinkStyleRecalc()
417         https://bugs.webkit.org/show_bug.cgi?id=140977
418
419         Reviewed by Darin Adler.
420
421         * WebProcess/WebPage/VisitedLinkTableController.cpp:
422         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
423         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
424         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
425         (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
426
427 2015-01-27  Antti Koivisto  <antti@apple.com>
428
429         http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
430         https://bugs.webkit.org/show_bug.cgi?id=140976
431
432         Reviewed by Chris Dumez.
433
434         Running
435
436             run-webkit-tests --release -2 http/tests/xmlhttprequest/workers/methods.html --iterations=100
437
438         would usually time out an iteration.
439
440         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
441         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
442
443         Using dispatch_io_read with an empty file calls the handler block immediately with done boolean set
444         without it being an error. We failed to call the completion handler and any synchronous xhr would hang.
445         We may see an empty cache file if we are just in process of writing it.
446
447         Fix by handling this case specifically.
448
449 2015-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
450
451         Unreviewed. Add missing file to WebInspector compilation for GTK+.
452
453         * PlatformGTK.cmake: Add UserInterface/External/ESLint/eslint.js
454
455 2015-01-28  Chris Dumez  <cdumez@apple.com>
456
457         Rename pageCache() to PageCache::shared() and return a reference
458         https://bugs.webkit.org/show_bug.cgi?id=140983
459
460         Reviewed by Andreas Kling.
461
462         Rename pageCache() to PageCache::shared() as this is a singleton class
463         and have it return a reference instead of a pointer.
464
465         * WebProcess/WebPage/VisitedLinkTableController.cpp:
466         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
467         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
468         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
469         (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
470         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
471         (WebKit::WebBackForwardListProxy::removeItem):
472         (WebKit::WebBackForwardListProxy::close):
473         * WebProcess/WebProcess.cpp:
474         (WebKit::WebProcess::releasePageCache):
475         * WebProcess/cocoa/WebProcessCocoa.mm:
476         (WebKit::WebProcess::platformSetCacheModel):
477         * WebProcess/soup/WebProcessSoup.cpp:
478         (WebKit::WebProcess::platformSetCacheModel):
479
480 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
481
482         More build fixes for newer clang.
483
484         Rubber-stamped by Anders Carlsson.
485
486         Added missing override keywords, marked some deprecated accessibility methods as such.
487
488         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
489         (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Deleted.
490         (WebKit::PluginProcessMainDelegate::getExtraInitializationData): Deleted.
491         (WebKit::PluginProcessMainDelegate::doPostRunWork): Deleted.
492         * PluginProcess/WebProcessConnection.h:
493         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
494         (WebKit::WebProcessPool::platformInitializeWebProcess):
495         * UIProcess/Plugins/PluginProcessProxy.h:
496         * UIProcess/WebPageProxy.h:
497         * UIProcess/mac/PageClientImpl.h:
498         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
499         (PageOverlayClientImpl::actionContextForResultAtPoint): Deleted.
500         (PageOverlayClientImpl::dataDetectorsDidPresentUI): Deleted.
501         (PageOverlayClientImpl::dataDetectorsDidChangeUI): Deleted.
502         (PageOverlayClientImpl::dataDetectorsDidHideUI): Deleted.
503         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
504         (WebKit::NetscapePlugin::isBeingAsynchronouslyInitialized): Deleted.
505         * WebProcess/Plugins/PDF/PDFPlugin.h:
506         * WebProcess/Plugins/PluginProcessConnection.h:
507         * WebProcess/Plugins/PluginProxy.h:
508         (WebKit::PluginProxy::isBeingAsynchronouslyInitialized): Deleted.
509         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
510
511 2015-01-27  Beth Dakin  <bdakin@apple.com>
512
513         Immediate action gesture recognizer still doesn't work well with IB
514         https://bugs.webkit.org/show_bug.cgi?id=140967
515         -and corresponding-
516         rdar://problem/19621509
517
518         Reviewed by Tim Horton.
519
520         We should add (or remove) the gesture recognizer in viewDidMoveToWindow because 
521         initWithFrame it too early and IB might mess with it.
522         * UIProcess/API/mac/WKView.mm:
523         (-[WKView viewDidMoveToWindow]):
524         (-[WKView initWithFrame:processPool:configuration:webView:]):
525
526 2015-01-27  Beth Dakin  <bdakin@apple.com>
527
528         Invoking an immediate action on link often dismisses selection
529         https://bugs.webkit.org/show_bug.cgi?id=140911
530         -and corresponding-
531         rdar://problem/19572685
532
533         Reviewed by Tim Horton.
534
535         Calling _page->setMaintainsInactiveSelection(false) in complete is often 
536         too soon. Instead, call it in dismissContentRelativeChildWindows. This is more 
537         similar to the timing for the TextIndicator.
538         * UIProcess/mac/WKImmediateActionController.mm:
539         (-[WKImmediateActionController dismissContentRelativeChildWindows]):
540         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
541         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
542
543 2015-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
544
545         REGRESSION(r166975): [GTK] Page overlays are not drawn anymore after r166975
546         https://bugs.webkit.org/show_bug.cgi?id=131433
547
548         Reviewed by Žan Doberšek.
549
550         Implement page overlays for the GTK+ port.
551
552         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
553         Override pure virtual setViewOverlayRootLayer().
554         * WebProcess/WebPage/DrawingAreaImpl.cpp:
555         (WebKit::DrawingAreaImpl::display): Remove FIXME and use modern
556         for loop.
557         (WebKit::DrawingAreaImpl::attachViewOverlayGraphicsLayer): Remove
558         ifdefs and use LayerTreeHost::setViewOverlayRootLayer().
559         * WebProcess/WebPage/LayerTreeHost.h: Add pure virtual setViewOverlayRootLayer().
560         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
561         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Initialize m_viewOverlayRootLayer.
562         (WebKit::LayerTreeHostGtk::initialize): Remove FIXME.
563         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
564         Remove unused old page overlays code.
565         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect): Ditto.
566         (WebKit::LayerTreeHostGtk::sizeDidChange): Ditto.
567         (WebKit::LayerTreeHostGtk::paintContents): Remove FIXME.
568         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges): Flush
569         compositing state on m_pageOverlayLayers if present.
570         (WebKit::LayerTreeHostGtk::setViewOverlayRootLayer): Set m_pageOverlayLayers.
571         (WebKit::LayerTreeHostGtk::createPageOverlayLayer): Deleted.
572         (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer): Deleted.
573         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Remove unused old
574         page overlays code.
575
576 2015-01-27  Sungmann Cho  <sungmann.cho@navercorp.com>
577
578         Remove remaining PLUGIN_ARCHITECTURE(WIN) code blocks from WebKit2.
579         https://bugs.webkit.org/show_bug.cgi?id=140912
580
581         Reviewed by Anders Carlsson.
582
583         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
584         (WebKit::NetscapePluginModule::tryLoad):
585         * Shared/Plugins/PluginQuirks.h:
586         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
587         (WebKit::NetscapePlugin::userAgent):
588         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
589
590 2015-01-26  Simon Fraser  <simon.fraser@apple.com>
591
592         [iOS WK2] Fix possible crash when -[WKWebView evaluateJavaScript:completionHandler:] was called then the WKWebView is destroyed
593         https://bugs.webkit.org/show_bug.cgi?id=140203
594         rdar://problem/19198492
595
596         Reviewed by Sam Weinig.
597         
598         When handling the OwnerWasInvalidated case in -[WKWebView evaluateJavaScript:completionHandler:],
599         the block passed to dispatch_async() needs to be retained. Fix by passing the RefPtr
600         to the lambda.
601
602         * UIProcess/API/Cocoa/WKWebView.mm:
603         (-[WKWebView evaluateJavaScript:completionHandler:]):
604
605 2015-01-26  Chris Dumez  <cdumez@apple.com>
606
607         Rename Document::body() to Document::bodyOrFrameset() for clarity
608         https://bugs.webkit.org/show_bug.cgi?id=140902
609
610         Reviewed by Andreas Kling.
611
612         Rename Document::body() to Document::bodyOrFrameset() for clarity. This
613         method does not necessarily return an HTMLBodyElement, it can also
614         return a frameset as per the specification:
615         http://www.w3.org/TR/html5/dom.html#dom-tree-accessors
616
617         This method is often misused internally (the caller is only interested
618         in the <body> element). I will fix these instances in a follow-up patch,
619         this patch is only renaming mechanically.
620
621 2015-01-26  Antti Koivisto  <antti@apple.com>
622
623         Add a user default for disabling network cache
624         https://bugs.webkit.org/show_bug.cgi?id=140904
625
626         Reviewed by Andreas Kling
627
628         defaults write com.apple.Safari WebKitNetworkCacheEnabled -bool YES/NO
629
630         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
631         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
632         * Shared/Network/NetworkProcessCreationParameters.cpp:
633         (WebKit::NetworkProcessCreationParameters::encode):
634         (WebKit::NetworkProcessCreationParameters::decode):
635         * Shared/Network/NetworkProcessCreationParameters.h:
636         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
637         (WebKit::registerUserDefaultsIfNeeded):
638         (WebKit::WebProcessPool::platformInitializeWebProcess):
639         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
640
641 2015-01-26  Chris Dumez  <cdumez@apple.com>
642
643         First argument to DOM traversal functions should be a reference
644         https://bugs.webkit.org/show_bug.cgi?id=140895
645
646         Reviewed by Antti Koivisto.
647
648         First argument to DOM traversal functions should be a reference instead
649         of a pointer as it is dereferenced without null-check.
650
651 2015-01-26  Beth Dakin  <bdakin@apple.com>
652
653         Blacklist iBooks for WebKit's default immediate actions
654         https://bugs.webkit.org/show_bug.cgi?id=140854
655         -and corresponding-
656         rdar://problem/19489518
657
658         Reviewed by Tim Horton.
659
660         Blacklist iBooks.
661         * UIProcess/mac/WKImmediateActionController.mm:
662         (-[WKImmediateActionController _updateImmediateActionItem]):
663
664 2015-01-26  Myles C. Maxfield  <mmaxfield@apple.com>
665
666         [iOS] [SVG -> OTF Converter] Flip the switch off on iOS
667         https://bugs.webkit.org/show_bug.cgi?id=140860
668
669         Reviewed by Darin Adler.
670
671         The fonts it makes are grotesque. (See what I did there? Typographic
672         humor is the best humor.)
673
674         * Configurations/FeatureDefines.xcconfig:
675
676 2015-01-26  Fabien Vallée  <fvallee@connected-labs.com>
677
678         AX: crash in accessibilityRootObjectWrapper method (WebPageAccessibilityObjectAtk.cpp)
679         <https://bugs.webkit.org/show_bug.cgi?id=140618>
680
681         Reviewed by Chris Fleizach.
682
683         Check if document()->axObjectCache() is nullptr to fix the crash.
684         Similar patch has been applied on mac port:
685         <http://trac.webkit.org/changeset/167136>
686
687         Crash occured on <http://itv.mit-xperts.com/hbbtvtest/appmanager/>
688         (this page needs CEHTML / HbbTV extensions, conditions cannot
689         be reproduced using regression tests)
690
691         * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
692         (accessibilityRootObjectWrapper):
693
694 2015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
695
696         [GTK] gtkdoc does not appear in DevHelp
697         https://bugs.webkit.org/show_bug.cgi?id=139369
698
699         Reviewed by Philippe Normand.
700
701         * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
702         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt.
703         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types.
704
705 2015-01-25  Timothy Horton  <timothy_horton@apple.com>
706
707         Unresponsive Web processes sometimes throw ObjC exceptions under didPerformActionMenuHitTest:
708         https://bugs.webkit.org/show_bug.cgi?id=140859
709         <rdar://problem/19571057>
710
711         Reviewed by Darin Adler.
712
713         * UIProcess/mac/WKImmediateActionController.mm:
714         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
715         If we've already given up on this gesture (either because it was canceled or the
716         willBeginAnimation timeout expired), we shouldn't build a new animationController for it.
717         This is true both because it wouldn't look good to swap animationControllers out
718         from under the gesture, but also because AppKit throws an exception when you do this
719         and that breaks a lot of things.
720
721 2015-01-24  Chris Dumez  <cdumez@apple.com>
722
723         [WK2][Cocoa] Drop WKDiagnosticLoggingResultType defines
724         https://bugs.webkit.org/show_bug.cgi?id=140838
725
726         Reviewed by Sam Weinig.
727
728         Drop WKDiagnosticLoggingResultType defines in _WKDiagnosticLoggingDelegate.h
729         header now that the client-side is correctly using
730         _WKDiagnosticLoggingResultType instead.
731
732         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
733
734 2015-01-23  Antti Koivisto  <antti@apple.com>
735
736         Implement cache size limit
737         https://bugs.webkit.org/show_bug.cgi?id=140844
738
739         Reviewed by Andreas Kling.
740
741         Prevent the cache from growing without bounds. The simple scheme implemented here
742         estimates the cache size from number of entries. When the estimated size exceeds
743         the maximum size we randomly clear 1/4 of the entries.
744
745         * NetworkProcess/cache/NetworkCacheStorage.h:
746         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
747         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
748         (WebKit::NetworkCacheStorage::initialize):
749         (WebKit::NetworkCacheStorage::removeEntry):
750         (WebKit::NetworkCacheStorage::store):
751         (WebKit::NetworkCacheStorage::setMaximumSize):
752         (WebKit::NetworkCacheStorage::clear):
753         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
754         (WebKit::NetworkCacheStorage::initializeKeyFilter): Deleted.
755
756 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
757
758         Fix the pre-Yosemite build.
759
760         * UIProcess/API/mac/WKView.mm:
761         (-[WKView _dismissContentRelativeChildWindows]):
762
763 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
764
765         QLPreviewMenuItem popovers don't close when the page scrolls
766         https://bugs.webkit.org/show_bug.cgi?id=140806
767         <rdar://problem/19555618>
768
769         Reviewed by Beth Dakin.
770
771         Now that QLPreviewMenuItem's popover doesn't eat scrolls, we need to dismiss it if the page scrolls.
772
773         * UIProcess/API/mac/WKView.mm:
774         (-[WKView _dismissContentRelativeChildWindows]):
775         Send _dismissContentRelativeChildWindows on to WKImmediateActionController.
776
777         * UIProcess/mac/WKImmediateActionController.h:
778         * UIProcess/mac/WKImmediateActionController.mm:
779         (-[WKImmediateActionController _clearImmediateActionState]):
780         (-[WKImmediateActionController dismissContentRelativeChildWindows]):
781         (-[WKImmediateActionController _defaultAnimationController]):
782         Keep track of the active QLPreviewMenuItem, and close it upon scroll.
783
784 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
785
786         Infinite recursion in _clearImmediateActionState
787         https://bugs.webkit.org/show_bug.cgi?id=140807
788         <rdar://problem/19571601>
789
790         Reviewed by Anders Carlsson.
791
792         * UIProcess/mac/WKImmediateActionController.mm:
793         (-[WKImmediateActionController _clearImmediateActionState]):
794         Clear _hasActivatedActionContext before calling didUseActions, because
795         didUseActions can call _clearImmediateActionState.
796
797 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
798
799         [GTK] Add initial database process support
800         https://bugs.webkit.org/show_bug.cgi?id=139491
801
802         Reviewed by Sergio Villar Senin.
803
804         Add initial support for DatabaseProcess, disabled by default for
805         now.
806
807         * CMakeLists.txt: Add required files to compilation.
808         * DatabaseProcess/DatabaseProcess.cpp:
809         (WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
810         Add the unix domain sockets implementation.
811         * DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp: Added.
812         (main):
813         * DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp: Added.
814         (WebKit::DatabaseProcessMainUnix):
815         * DatabaseProcess/unix/DatabaseProcessMainUnix.h: Added.
816         * PlatformGTK.cmake: Add required files to compilation.
817         * Shared/ProcessExecutablePath.h:
818         * Shared/gtk/KeyedDecoder.cpp: Added.
819         (WebKit::KeyedDecoder::KeyedDecoder):
820         (WebKit::KeyedDecoder::~KeyedDecoder):
821         (WebKit::KeyedDecoder::buildDictionaryFromGVariant):
822         (WebKit::KeyedDecoder::decodeBytes):
823         (WebKit::KeyedDecoder::decodeBool):
824         (WebKit::KeyedDecoder::decodeUInt32):
825         (WebKit::KeyedDecoder::decodeInt32):
826         (WebKit::KeyedDecoder::decodeInt64):
827         (WebKit::KeyedDecoder::decodeFloat):
828         (WebKit::KeyedDecoder::decodeDouble):
829         (WebKit::KeyedDecoder::decodeString):
830         (WebKit::KeyedDecoder::beginObject):
831         (WebKit::KeyedDecoder::endObject):
832         (WebKit::KeyedDecoder::beginArray):
833         (WebKit::KeyedDecoder::beginArrayElement):
834         (WebKit::KeyedDecoder::endArrayElement):
835         (WebKit::KeyedDecoder::endArray):
836         * Shared/gtk/KeyedDecoder.h: Added.
837         * Shared/gtk/KeyedEncoder.cpp: Added.
838         (WebKit::KeyedEncoder::KeyedEncoder):
839         (WebKit::KeyedEncoder::~KeyedEncoder):
840         (WebKit::KeyedEncoder::encodeBytes):
841         (WebKit::KeyedEncoder::encodeBool):
842         (WebKit::KeyedEncoder::encodeUInt32):
843         (WebKit::KeyedEncoder::encodeInt32):
844         (WebKit::KeyedEncoder::encodeInt64):
845         (WebKit::KeyedEncoder::encodeFloat):
846         (WebKit::KeyedEncoder::encodeDouble):
847         (WebKit::KeyedEncoder::encodeString):
848         (WebKit::KeyedEncoder::beginObject):
849         (WebKit::KeyedEncoder::endObject):
850         (WebKit::KeyedEncoder::beginArray):
851         (WebKit::KeyedEncoder::beginArrayElement):
852         (WebKit::KeyedEncoder::endArrayElement):
853         (WebKit::KeyedEncoder::endArray):
854         (WebKit::KeyedEncoder::finishEncoding):
855         * Shared/gtk/KeyedEncoder.h: Added.
856         * Shared/gtk/ProcessExecutablePathGtk.cpp:
857         (WebKit::executablePathOfDatabaseProcess):
858         * UIProcess/Databases/DatabaseProcessProxy.cpp:
859         (WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection):
860         Add the unix domain sockets implementation.
861         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
862         (WebKit::ProcessLauncher::launchProcess): Handle the
863         DatabaseProcess too.
864         * UIProcess/gtk/WebContextGtk.cpp:
865         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
866         * WebProcess/WebProcess.cpp:
867         (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Add
868         the unix domain sockets implementation.
869
870 2015-01-22  Benjamin Poulain  <bpoulain@apple.com>
871
872         [iOS][WK2] Ignore synthetic click initiated on a previous page
873         https://bugs.webkit.org/show_bug.cgi?id=139556
874         rdar://problem/18586008
875
876         Reviewed by David Kilzer.
877
878         Under the right accumulation of bad luck, a synthetic click could be generated
879         on a page that never asked for it.
880
881         What happened was:
882         1) Page Foo listen to touch event.
883         2) In response to touch events, Foo decides to navigate to page Bar
884            *but* it does not cancel the native gesture recognizers with preventDefault().
885         3) Page Bar loads.
886         4) The native gesture recognizer ask us to click, we forward that to the WebProcess
887            and generate a synthetic mouse event.
888         -> Bar receives a click.
889         If you are unlucky enough, it looks like a single tap does a double click.
890
891         There are two ways this patch avoids the problem:
892
893         First, in the UIProcess, we just cancel the HighlightLongPressGestureRecognizer
894         on didCommitLoadForMainFrame. This prevents "fast clicks" from accidentally going through.
895         This is not bullet proof because we get didCommitLoadForMainFrame asynchronously but
896         killing the timer and gesture seems like a good idea.
897
898         Second, we skip any tap command at the WebProcess level when it was issued for
899         the previous page. This is using the same principle we used for VisibleContentRect:
900         any input generated before the current layer tree commit is useless for the current page.
901
902         We track the commit ID in the UIProcess when we decide to do the tracking or not.
903         Note that we keep the ID regardless of the tracking state, it does not matter if we have sent
904         touch events, what matters is what content was on screen when the touch events were handled.
905
906         If the user interaction result in a tap, we send the commit ID along the tap commands.
907         In the WebProcess, we know the actual layer tree commit associated with the current page.
908         If the tap was generated with a layer ID preceding the current page, we fail the command.
909
910         * UIProcess/WebPageProxy.cpp:
911         (WebKit::WebPageProxy::WebPageProxy):
912         (WebKit::WebPageProxy::handleTouchEventSynchronously):
913         (WebKit::WebPageProxy::resetState):
914         * UIProcess/WebPageProxy.h:
915         * UIProcess/ios/WKContentView.mm:
916         (-[WKContentView _didCommitLoadForMainFrame]):
917         * UIProcess/ios/WKContentViewInteraction.mm:
918         (-[WKContentView _attemptClickAtLocation:]):
919         * UIProcess/ios/WebPageProxyIOS.mm:
920         (WebKit::WebPageProxy::commitPotentialTap):
921         (WebKit::WebPageProxy::handleTap):
922         * WebProcess/WebPage/WebPage.cpp:
923         (WebKit::WebPage::didCommitLoad):
924         * WebProcess/WebPage/WebPage.h:
925         * WebProcess/WebPage/WebPage.messages.in:
926         * WebProcess/WebPage/ios/WebPageIOS.mm:
927         (WebKit::WebPage::handleTap):
928         (WebKit::WebPage::commitPotentialTap):
929
930 2015-01-22  Chris Dumez  <cdumez@apple.com>
931
932         [WK2][Cocoa] Drop WKWebViewConfiguration._featureCounterEnabled SPI.
933         https://bugs.webkit.org/show_bug.cgi?id=140799
934
935         Reviewed by Dan Bernstein.
936
937         Drop WKWebViewConfiguration._featureCounterEnabled SPI now that the
938         client-side has been updated.
939
940         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
941         (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]):
942         (-[WKWebViewConfiguration _featureCounterEnabled]): Deleted.
943         (-[WKWebViewConfiguration _setFeatureCounterEnabled:]): Deleted.
944         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
945
946 2015-01-22  Antti Koivisto  <antti@apple.com>
947
948         Fix ENABLE(NETWORK_CACHE) build
949
950         * NetworkProcess/NetworkResourceLoader.cpp:
951         (WebKit::NetworkResourceLoader::didFinishLoading):
952
953 2015-01-22  Timothy Horton  <timothy_horton@apple.com>
954
955         UserData decoding of WKTypeRefWrapper always fails
956         https://bugs.webkit.org/show_bug.cgi?id=140791
957         <rdar://problem/19438402>
958
959         Reviewed by Anders Carlsson.
960
961         * Shared/mac/ObjCObjectGraph.mm:
962         (WebKit::ObjCObjectGraph::decode):
963         Add a missing break.
964
965 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
966
967         Add a build flag for ES6 class syntax
968         https://bugs.webkit.org/show_bug.cgi?id=140760
969
970         Reviewed by Michael Saboff.
971
972         * Configurations/FeatureDefines.xcconfig:
973
974 2015-01-22  Chris Dumez  <cdumez@apple.com>
975
976         Drop the legacy FeatureCounter class
977         https://bugs.webkit.org/show_bug.cgi?id=140749
978
979         Reviewed by Andreas Kling.
980
981         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
982         instead.
983
984         * Shared/WebPreferencesDefinitions.h:
985         * UIProcess/API/Cocoa/WKWebView.mm:
986         (-[WKWebView initWithFrame:configuration:]):
987         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
988         (-[WKWebViewConfiguration init]):
989         (-[WKWebViewConfiguration copyWithZone:]):
990         (-[WKWebViewConfiguration _featureCounterEnabled]):
991         (-[WKWebViewConfiguration _setFeatureCounterEnabled:]):
992         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
993         * WebProcess/WebPage/WebPage.cpp:
994         (WebKit::WebPage::updatePreferences):
995         * WebProcess/WebPage/ios/WebPageIOS.mm:
996         (WebKit::WebPage::willStartUserTriggeredZooming):
997
998 2015-01-22  Beth Dakin  <bdakin@apple.com>
999
1000         ibtoold crash below -[WebView close]
1001         https://bugs.webkit.org/show_bug.cgi?id=140782
1002         -and corresponding-
1003         rdar://problem/19558472
1004
1005         Reviewed by Tim Horton.
1006
1007         Retain the NSImmediateActionGestureRecognizer. This should not be necessary, but 
1008         it is because interface builder can mess with our views.
1009         * UIProcess/mac/WKImmediateActionController.h:
1010         * UIProcess/mac/WKImmediateActionController.mm:
1011         (-[WKImmediateActionController willDestroyView:]):
1012         (-[WKImmediateActionController _cancelImmediateAction]):
1013         (-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
1014         (-[WKImmediateActionController _updateImmediateActionItem]):
1015
1016 2015-01-22  David Kilzer  <ddkilzer@apple.com>
1017
1018         [iOS] Fix iphoneos SDK builds for ios-ews queue
1019         <http://webkit.org/b/140748>
1020
1021         Reviewed by Daniel Bates.
1022
1023         * Platform/spi/ios/BKSProcessAssertionSPI.h: Add -invalidate
1024         definition.  Sort @property to the top of BKSProcessAssertion.
1025
1026 2015-01-22  Shivakumar JM  <shiva.jm@samsung.com>
1027
1028         Fix build warning in WebKit2/UIProcess module
1029         https://bugs.webkit.org/show_bug.cgi?id=140758
1030
1031         Reviewed by Csaba Osztrogonác.
1032
1033         Fix build warnings by using UNUSED_PARAM macro
1034
1035         * UIProcess/API/C/WKPageGroup.cpp:
1036         (WKPageGroupAddUserContentFilter):
1037         (WKPageGroupRemoveAllUserContentFilters):
1038
1039 2014-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1040
1041         [GTK] Use API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
1042         https://bugs.webkit.org/show_bug.cgi?id=138467
1043
1044         Reviewed by Gustavo Noronha Silva.
1045
1046         * UIProcess/API/gtk/WebKitContextMenu.cpp:
1047         (webkitContextMenuPopulate): Add a version that receives a Vector<WebContextMenuItemData>&.
1048         (webkitContextMenuCreate): Change it to receive a const
1049         Vector<WebContextMenuItemData>& instead of a API::Array* and also
1050         add a another version that receives const Vector<ContextMenuItem>&.
1051         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
1052         (attachContextMenuClientToView): Use a class derived from
1053         API::ContextMenuClient to implement the context menu client.
1054         (getContextMenuFromProposedMenu): Deleted.
1055         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
1056         (webkitContextMenuItemCreate): Change it to receive a const
1057         WebContextMenuItemData& and added another version that receives a
1058         const ContextMenuItem&.
1059         * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
1060         * UIProcess/API/gtk/WebKitContextMenuPrivate.h:
1061         * UIProcess/API/gtk/WebKitWebView.cpp:
1062         (webkitWebViewPopulateContextMenu): Remove the creation of a
1063         WebHitTestResult::Data, since it receives it now as parameter.
1064         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1065         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
1066         (webkitWebHitTestResultCreate): Change it to receive a const
1067         HitTestResult& instead of const InjectedBundleHitTestResult&.
1068         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h:
1069         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1070         (webkitWebPageCreate): Use a class derived from
1071         API::InjectedBundle::PageContextMenuClient to implement the
1072         context menu client.
1073         (getContextMenuFromDefaultMenu): Deleted.
1074
1075 2015-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1076
1077         Unreviewed. Try to fix Debug build after r178889.
1078
1079         * UIProcess/API/C/WKPage.cpp: Include Logging.h.
1080
1081 2015-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1082
1083         Add API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
1084         https://bugs.webkit.org/show_bug.cgi?id=138466
1085
1086         Reviewed by Anders Carlsson.
1087
1088         Move ContextMenuClient to use API classes in both UI and Injected
1089         Bundle APIs.
1090
1091         * CMakeLists.txt: Remove WebPageContextMenuClient.cpp.
1092         * UIProcess/API/APIContextMenuClient.h: Renamed from Source/WebKit2/UIProcess/WebPageContextMenuClient.h.
1093         (API::ContextMenuClient::~ContextMenuClient):
1094         (API::ContextMenuClient::getContextMenuFromProposedMenu):
1095         (API::ContextMenuClient::customContextMenuItemSelected):
1096         (API::ContextMenuClient::contextMenuDismissed):
1097         (API::ContextMenuClient::showContextMenu):
1098         (API::ContextMenuClient::hideContextMenu):
1099         * UIProcess/API/C/WKPage.cpp:
1100         (WKPageSetPageContextMenuClient):
1101         * UIProcess/WebPageContextMenuClient.cpp: Removed.
1102         * UIProcess/WebPageProxy.cpp:
1103         (WebKit::WebPageProxy::WebPageProxy):
1104         (WebKit::WebPageProxy::setContextMenuClient):
1105         (WebKit::WebPageProxy::close):
1106         (WebKit::WebPageProxy::internalShowContextMenu):
1107         (WebKit::WebPageProxy::contextMenuItemSelected):
1108         (WebKit::WebPageProxy::initializeContextMenuClient): Deleted.
1109         * UIProcess/WebPageProxy.h:
1110         * WebKit2.xcodeproj/project.pbxproj: Remove deleted files and add
1111         new files to compilation.
1112         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h.
1113         (API::InjectedBundle::PageContextMenuClient::~PageContextMenuClient):
1114         (API::InjectedBundle::PageContextMenuClient::getCustomMenuFromDefaultItems):
1115         (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu):
1116         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1117         (WKBundlePageSetContextMenuClient):
1118         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1119         (WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
1120         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1121         (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu):
1122         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
1123         * WebProcess/WebPage/WebContextMenu.cpp:
1124         (WebKit::WebContextMenu::menuItemsWithUserData):
1125         * WebProcess/WebPage/WebPage.cpp:
1126         (WebKit::WebPage::WebPage):
1127         (WebKit::WebPage::setInjectedBundleContextMenuClient):
1128         (WebKit::WebPage::close):
1129         (WebKit::WebPage::initializeInjectedBundleContextMenuClient): Deleted.
1130         * WebProcess/WebPage/WebPage.h:
1131         (WebKit::WebPage::injectedBundleContextMenuClient):
1132         * WebProcess/WebPage/mac/WebPageMac.mm:
1133         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1134
1135 2015-01-20  Jon Honeycutt  <jhoneycutt@apple.com>
1136
1137         [iOS] WebKitTestRunner: Tests fail due to incorrect web view size
1138
1139         <https://bugs.webkit.org/show_bug.cgi?id=139736>
1140         <rdar://problem/19282196>
1141
1142         This starts happening after we fail to reset the test controller to
1143         consistent values in TestInvocation::invoke(). When we terminate the
1144         web process and relaunch it, the new WebPage object created in the web
1145         process is using the default ViewportConfiguration with dimensions of
1146         1024x768.
1147
1148         The PageClient on iOS currently notifies the WKWebView and the
1149         WKContentView when the web process is relaunched. This patch extends
1150         that to also notify the WKView.
1151
1152         Reviewed by Benjamin Poulain.
1153
1154         * UIProcess/API/Cocoa/WKViewPrivate.h:
1155         Declare -_didRelaunchProcess.
1156
1157         * UIProcess/API/ios/WKViewIOS.mm:
1158         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
1159         Call the new method that accepts a WKView.
1160         (-[WKView _didRelaunchProcess]):
1161         Call -_frameOrBoundsChanged to update the web process's size to the
1162         size of the WKView.
1163
1164         * UIProcess/ios/PageClientImplIOS.h:
1165         Add a constructor that takes a WKView, and add a member var to hold it.
1166
1167         * UIProcess/ios/PageClientImplIOS.mm:
1168         (WebKit::PageClientImpl::PageClientImpl):
1169         Implement the constructor that takes a WKView.
1170         (WebKit::PageClientImpl::didRelaunchProcess):
1171         Tell the WKView that the web process relaunched.
1172
1173         * UIProcess/ios/WKContentView.h:
1174         Declare an initializer that takes a WKView.
1175
1176         * UIProcess/ios/WKContentView.mm:
1177         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
1178         Split out from -[WKContentView initWithFrame:processPool:configuration:webView:].
1179         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
1180         Perform some initialization, including creating the PageClient, and
1181         call the common initializer.
1182         (-[WKContentView initWithFrame:processPool:configuration:wkView:]):
1183         Ditto.
1184
1185 2015-01-21  Sam Weinig  <sam@webkit.org>
1186
1187         Add WKPageGroupRef SPI for user content filters
1188         https://bugs.webkit.org/show_bug.cgi?id=140728
1189
1190         Reviewed by Anders Carlsson.
1191
1192         While Safari is transitioning to WKUserContentController, it is useful
1193         for them to have access to have access to content filters on the page group
1194         where they currently have user content related functionality.
1195
1196         * Shared/WebPageGroupData.cpp:
1197         (WebKit::WebPageGroupData::encode):
1198         (WebKit::WebPageGroupData::decode):
1199         * Shared/WebPageGroupData.h:
1200         * UIProcess/API/C/WKPageGroup.cpp:
1201         (WKPageGroupAddUserContentFilter):
1202         (WKPageGroupRemoveAllUserContentFilters):
1203         * UIProcess/API/C/WKPageGroup.h:
1204         * UIProcess/WebPageGroup.cpp:
1205         (WebKit::WebPageGroup::addUserContentFilter):
1206         (WebKit::WebPageGroup::removeAllUserContentFilters):
1207         * UIProcess/WebPageGroup.h:
1208         * WebProcess/WebPage/WebPageGroupProxy.cpp:
1209         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
1210         (WebKit::WebPageGroupProxy::addUserContentFilter):
1211         (WebKit::WebPageGroupProxy::removeAllUserContentFilters):
1212         * WebProcess/WebPage/WebPageGroupProxy.h:
1213         * WebProcess/WebPage/WebPageGroupProxy.messages.in:
1214
1215 2015-01-21  Beth Dakin  <bdakin@apple.com>
1216
1217         Crash in QuickLook preview delegate method
1218         https://bugs.webkit.org/show_bug.cgi?id=140740
1219         -and corresponding-
1220         rdar://problem/19540806
1221
1222         Reviewed by Tim Horton.
1223
1224         Clear out the delegate.
1225         * UIProcess/mac/WKImmediateActionController.mm:
1226         (-[WKImmediateActionController willDestroyView:]):
1227
1228 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
1229
1230         AsyncRequestImpl casting in AsyncRequest::completeRequest() is incorrect
1231         https://bugs.webkit.org/show_bug.cgi?id=139724
1232
1233         Reviewed by Darin Adler.
1234
1235         AsyncRequestImpl casting in AsyncRequest::completeRequest() relies on
1236         the parameter pack to properly determine the type of the AsyncRequestImpl
1237         object. The casting result can be incorrect when an argument is passed
1238         by reference while the original object was constructed with a callback
1239         that expects an argument that's passed by value.
1240
1241         To avoid this the AsyncRequestImpl template is now instantiated with
1242         raw types, with callback parameters remaining raw types in case
1243         of being integral (enforcing passing-by-value these arguments when
1244         dispatching), and const references being used otherwise (enforcing
1245         passing-by-reference).
1246
1247         This enables casting AsyncRequest objects to the correct AsyncRequestImpl<>
1248         by running the parameter pack through std::decay.
1249
1250         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1251         (WebKit::UniqueIDBDatabase::putRecord):
1252         (WebKit::UniqueIDBDatabase::getRecord):
1253         (WebKit::UniqueIDBDatabase::openCursor):
1254         (WebKit::UniqueIDBDatabase::cursorAdvance):
1255         (WebKit::UniqueIDBDatabase::cursorIterate):
1256         (WebKit::UniqueIDBDatabase::count):
1257         (WebKit::UniqueIDBDatabase::deleteRange):
1258         * Shared/AsyncRequest.h:
1259         (WebKit::AsyncRequest::completeRequest):
1260         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1261         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
1262         (WebKit::WebIDBServerConnection::get):
1263
1264 2015-01-21  Chris Dumez  <cdumez@apple.com>
1265
1266         [WK2] Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API
1267         https://bugs.webkit.org/show_bug.cgi?id=140655
1268
1269         Reviewed by Anders Carlsson.
1270
1271         Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API.
1272         Instead, introduce a new _WKDiagnosticLoggingResultType enum in
1273         _WKDiagnosticLoggingDelegate.h.
1274
1275         A few defines mapping WKDiagnosticLoggingResultType enum and its values
1276         to the new _WKDiagnosticLoggingResultType are temporarily added until
1277         the client-side is transitioned.
1278
1279         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
1280         * UIProcess/Cocoa/DiagnosticLoggingClient.mm:
1281         (WebKit::toWKDiagnosticLoggingResultType):
1282         (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
1283
1284 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
1285
1286         [WK2] Use C++ lambdas in ProcessLauncher class
1287         https://bugs.webkit.org/show_bug.cgi?id=138186
1288
1289         Reviewed by Darin Adler.
1290
1291         Replace uses of WTF::bind() in the ProcessLauncher class with C++ lambdas.
1292
1293         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1294         (WebKit::ProcessLauncher::launchProcess):
1295         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1296         (WebKit::ProcessLauncher::launchProcess):
1297         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1298         (WebKit::connectToService):
1299         (WebKit::tryPreexistingProcess):
1300         (WebKit::createProcess):
1301
1302 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
1303
1304         Clean up ViewUpdateDispatcher
1305         https://bugs.webkit.org/show_bug.cgi?id=140619
1306
1307         Reviewed by Darin Adler.
1308
1309         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1310         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
1311         Replace WTF::bind() with a C++ lambda.
1312         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
1313         Use WTF::move() to move the HashMap member into the local variable.
1314
1315 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
1316
1317         Remove ENABLE(INSPECTOR) ifdef guards
1318         https://bugs.webkit.org/show_bug.cgi?id=140668
1319
1320         Reviewed by Darin Adler.
1321
1322         * Configurations/FeatureDefines.xcconfig:
1323         * Shared/API/c/WKSharedAPICast.h:
1324         (WebKit::toAPI):
1325         (WebKit::toImpl):
1326         * Shared/WebCoreArgumentCoders.cpp:
1327         (IPC::ArgumentCoder<ResourceRequest>::encode):
1328         (IPC::ArgumentCoder<ResourceRequest>::decode):
1329         * UIProcess/API/C/WKInspector.cpp:
1330         (WKInspectorGetTypeID):
1331         (WKInspectorGetPage):
1332         (WKInspectorIsConnected):
1333         (WKInspectorIsVisible):
1334         (WKInspectorIsFront):
1335         (WKInspectorConnect):
1336         (WKInspectorShow):
1337         (WKInspectorHide):
1338         (WKInspectorClose):
1339         (WKInspectorShowConsole):
1340         (WKInspectorShowResources):
1341         (WKInspectorShowMainResourceForFrame):
1342         (WKInspectorIsAttached):
1343         (WKInspectorAttach):
1344         (WKInspectorDetach):
1345         (WKInspectorIsProfilingPage):
1346         (WKInspectorTogglePageProfiling):
1347         * UIProcess/API/C/WKPage.cpp:
1348         (WKPageGetInspector):
1349         * UIProcess/API/efl/ewk_view.cpp:
1350         (ewk_view_inspector_show):
1351         (ewk_view_inspector_close):
1352         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1353         (TEST_F):
1354         * UIProcess/PageClient.h:
1355         * UIProcess/WebInspectorProxy.cpp:
1356         * UIProcess/WebInspectorProxy.h:
1357         * UIProcess/WebInspectorProxy.messages.in:
1358         * UIProcess/WebPageProxy.cpp:
1359         (WebKit::WebPageProxy::WebPageProxy):
1360         (WebKit::WebPageProxy::reattachToWebProcess):
1361         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
1362         (WebKit::WebPageProxy::resetState):
1363         * UIProcess/WebPageProxy.h:
1364         * UIProcess/WebPageProxy.messages.in:
1365         * UIProcess/WebProcessProxy.cpp:
1366         (WebKit::WebProcessProxy::getLaunchOptions):
1367         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1368         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1369         * UIProcess/ios/PageClientImplIOS.h:
1370         * UIProcess/ios/PageClientImplIOS.mm:
1371         (WebKit::PageClientImpl::disableInspectorNodeSearch):
1372         * UIProcess/ios/WebInspectorProxyIOS.mm:
1373         * UIProcess/ios/WebPageProxyIOS.mm:
1374         (WebKit::WebPageProxy::disableInspectorNodeSearch):
1375         * UIProcess/mac/WebInspectorProxyMac.mm:
1376         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
1377         (WKBundleInspectorGetTypeID):
1378         (WKBundleInspectorShow):
1379         (WKBundleInspectorClose):
1380         (WKBundleInspectorEvaluateScriptForTest):
1381         (WKBundleInspectorSetPageProfilingEnabled):
1382         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1383         (WKBundlePageGetInspector):
1384         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1385         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1386         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
1387         * WebProcess/WebPage/WebInspector.cpp:
1388         * WebProcess/WebPage/WebInspector.h:
1389         * WebProcess/WebPage/WebInspector.messages.in:
1390         * WebProcess/WebPage/WebInspectorUI.cpp:
1391         * WebProcess/WebPage/WebInspectorUI.h:
1392         * WebProcess/WebPage/WebInspectorUI.messages.in:
1393         * WebProcess/WebPage/WebPage.cpp:
1394         (WebKit::WebPage::WebPage):
1395         (WebKit::WebPage::~WebPage):
1396         (WebKit::WebPage::close):
1397         (WebKit::WebPage::inspectorUI):
1398         (WebKit::WebPage::didReceiveMessage):
1399         * WebProcess/WebPage/WebPage.h:
1400         * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
1401         * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp:
1402         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
1403         * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
1404         * WebProcess/WebPage/ios/WebPageIOS.mm:
1405         (WebKit::WebPage::disableInspectorNodeSearch):
1406         * WebProcess/WebPage/mac/WebInspectorMac.mm:
1407         * WebProcess/WebPage/mac/WebInspectorUIMac.mm:
1408         * config.h:
1409
1410 2015-01-20  Martin Hock  <mhock@apple.com>
1411
1412         [iOS][WK2] Redraw find-in-page indicator on rotation
1413         https://bugs.webkit.org/show_bug.cgi?id=140632
1414         <rdar://problem/18858394>
1415
1416         Reviewed by Tim Horton.
1417
1418         * WebProcess/WebPage/FindController.cpp:
1419         (WebKit::FindController::redraw): Add method to redraw find indicator (only used by iOS).
1420         * WebProcess/WebPage/FindController.h:
1421         * WebProcess/WebPage/WebPage.cpp:
1422         (WebKit::WebPage::mainFrameDidLayout):
1423         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1424         (WebKit::FindController::updateFindIndicator): Redraw should not trigger zoom.
1425
1426 2015-01-20  David Kilzer  <ddkilzer@apple.com>
1427
1428         Switch to comparing PLATFORM_NAME in terms of macosx
1429         <http://webkit.org/b/139516>
1430
1431         Reviewed by Timothy Hatcher.
1432
1433         * WebKit2.xcodeproj/project.pbxproj:
1434         * mac/rewrite-availability-macros.sh: Remove the else block that
1435         checked for an unknown PLATFORM_NAME.
1436
1437 2015-01-19  Simon Fraser  <simon.fraser@apple.com>
1438
1439         Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
1440         https://bugs.webkit.org/show_bug.cgi?id=140474
1441
1442         Reviewed by Tim Horton.
1443         
1444         Add a private method to enable scrolling data collection to WKWebView. When enabled, create
1445         a RemoteLayerTreeScrollingPerformanceData object that collects "blank pixel" data on
1446         every layer tree commit and scroll, and stores them in a vector. A second SPI call
1447         allows retrieval of an NSArray of this data.
1448         
1449         To allow RemoteLayerTreeScrollingPerformanceData to find the correct layer which
1450         contains the main tile grid, we set a layer name on the appropriate layer (even
1451         in release builds).
1452
1453         * UIProcess/API/Cocoa/WKWebView.mm:
1454         (-[WKWebView visibleRectInScreenCoordinates]):
1455         (-[WKWebView _didCommitLayerTree:]):
1456         (-[WKWebView scrollViewDidScroll:]):
1457         (-[WKWebView _setScrollPerformanceDataCollectionEnabled:]):
1458         (-[WKWebView _scrollPerformanceDataCollectionEnabled]):
1459         (-[WKWebView _scrollPerformanceData]):
1460         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1461         * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.h: Added.
1462         (WebKit::RemoteLayerTreeScrollingPerformanceData::BlankPixelCount::BlankPixelCount):
1463         * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm: Added.
1464         (WebKit::RemoteLayerTreeScrollingPerformanceData::RemoteLayerTreeScrollingPerformanceData):
1465         (WebKit::RemoteLayerTreeScrollingPerformanceData::~RemoteLayerTreeScrollingPerformanceData):
1466         (WebKit::RemoteLayerTreeScrollingPerformanceData::didCommitLayerTree):
1467         (WebKit::RemoteLayerTreeScrollingPerformanceData::didScroll):
1468         (WebKit::RemoteLayerTreeScrollingPerformanceData::BlankPixelCount::canCoalesce):
1469         (WebKit::RemoteLayerTreeScrollingPerformanceData::appendBlankPixelCount):
1470         (WebKit::RemoteLayerTreeScrollingPerformanceData::data):
1471         (WebKit::findTileGridContainerLayer):
1472         (WebKit::RemoteLayerTreeScrollingPerformanceData::blankPixelCount):
1473         * UIProcess/WebPageProxy.cpp:
1474         (WebKit::WebPageProxy::WebPageProxy):
1475         (WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled):
1476         * UIProcess/WebPageProxy.h:
1477         (WebKit::WebPageProxy::scrollPerformanceDataCollectionEnabled):
1478         (WebKit::WebPageProxy::scrollingPerformanceData):
1479         * WebKit2.xcodeproj/project.pbxproj:
1480
1481 2015-01-19  Dean Jackson  <dino@apple.com>
1482
1483         Support "plus-darker" in mix-blend mode
1484         https://bugs.webkit.org/show_bug.cgi?id=140646
1485         <rdar://problem/19523370>
1486
1487         Reviewed by Simon Fraser.
1488
1489         Output the appropriate blending type when logging.
1490
1491         * Shared/mac/RemoteLayerTreeTransaction.mm:
1492         (WebKit::RemoteLayerTreeTextStream::operator<<):
1493
1494 2015-01-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1495
1496         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.4 release.
1497
1498         * gtk/NEWS: Add release notes for 2.7.4.
1499
1500 2015-01-20  Tomas Popela  <tpopela@redhat.com>
1501
1502         [GTK] Add API to set the web view editable into WebKit2 GTK+ API
1503         https://bugs.webkit.org/show_bug.cgi?id=139443
1504
1505         Reviewed by Carlos Garcia Campos.
1506
1507         Provide a way to set the web view editable, without accessing the DOM
1508         and setting the contenteditable attribute to elements.
1509
1510         * UIProcess/API/gtk/WebKitWebView.cpp:
1511         (webkitWebViewSetProperty):
1512         (webkitWebViewGetProperty):
1513         (webkit_web_view_class_init):
1514         (webkit_web_view_is_editable):
1515         (webkit_web_view_set_editable):
1516         * UIProcess/API/gtk/WebKitWebView.h:
1517         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1518
1519 2015-01-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1520
1521         [GTK] Add an option to create WebKitWebView snapshots with transparent background
1522         https://bugs.webkit.org/show_bug.cgi?id=140617
1523
1524         Reviewed by Gustavo Noronha Silva.
1525
1526         Add WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND flag to not
1527         fill with white the background before rendering the snapshot.
1528
1529         * UIProcess/API/gtk/WebKitWebView.cpp:
1530         (webkit_web_view_get_snapshot): Pass a TransparentBackground
1531         boolean argument to the WEbProcess.
1532         * UIProcess/API/gtk/WebKitWebView.h:
1533         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1534         (webkitWebPageDidReceiveMessage): Set the FrameView background as
1535         transparent when TransparentBackground option is True before
1536         rendering the snapshot.
1537
1538 2015-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1539
1540         [GTK] Add API to change the WebKitWebView background color
1541         https://bugs.webkit.org/show_bug.cgi?id=140610
1542
1543         Reviewed by Gustavo Noronha Silva.
1544
1545         When a color different than the default one (opaque white) is
1546         used, the SetDrawsBackground message is sent to the WebProcess with
1547         a False value to indicate WebCore to not render backgrounds. The
1548         background color passed is saved in the WebPageProxy and used by
1549         the backing store to fill the background before the actual
1550         contents are rendered in the WebView.
1551
1552         * UIProcess/API/gtk/WebKitWebView.cpp:
1553         (webkit_web_view_set_background_color):
1554         (webkit_web_view_get_background_color):
1555         * UIProcess/API/gtk/WebKitWebView.h:
1556         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1557         * UIProcess/WebPageProxy.cpp:
1558         (WebKit::WebPageProxy::WebPageProxy): Initialize m_backgroundColor member.
1559         * UIProcess/WebPageProxy.h:
1560         (WebKit::WebPageProxy::backgroundColor): Return m_backgroundColor.
1561         (WebKit::WebPageProxy::setBackgroundColor): Set m_backgroundColor.
1562         * UIProcess/cairo/BackingStoreCairo.cpp:
1563         (WebKit::BackingStore::incorporateUpdate): Fill the damage region
1564         with the WebPageProxy background color when the WebProcess is not
1565         rendering backgrounds. If the background color is not fully opaque
1566         we need to clear the region before filling it with the color.
1567
1568 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
1569
1570         [SVG -> OTF Converter] Flip the switch on
1571         https://bugs.webkit.org/show_bug.cgi?id=140592
1572
1573         Reviewed by Antti Koivisto.
1574
1575         * Configurations/FeatureDefines.xcconfig:
1576
1577 2015-01-19  Mark Rowe  <mrowe@apple.com>
1578
1579         <https://webkit.org/b/140504> REGRESSION (r178452): Visited link coloring only appears to work in the first web process
1580
1581         Roll out r178452 since it broke visited link coloring.
1582
1583         Reviewed by Anders Carlsson.
1584
1585         * UIProcess/VisitedLinkProvider.cpp:
1586         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
1587         (WebKit::VisitedLinkProvider::addProcess):
1588         (WebKit::VisitedLinkProvider::removeProcess):
1589         (WebKit::VisitedLinkProvider::removeAll):
1590         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
1591         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
1592         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1593         (WebKit::VisitedLinkProvider::resizeTable):
1594         * UIProcess/VisitedLinkProvider.h:
1595         * UIProcess/WebPageProxy.cpp:
1596         (WebKit::WebPageProxy::WebPageProxy):
1597         (WebKit::WebPageProxy::processDidFinishLaunching):
1598         * UIProcess/WebProcessProxy.cpp:
1599         (WebKit::WebProcessProxy::disconnect):
1600         (WebKit::WebProcessProxy::addVisitedLinkProvider):
1601         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider):
1602         * UIProcess/WebProcessProxy.h:
1603
1604 2015-01-19  Sam Weinig  <sam@webkit.org>
1605
1606         Sprinkle some CTTE on API::PolicyClient and API::FormClient
1607         https://bugs.webkit.org/show_bug.cgi?id=140656
1608
1609         Reviewed by Tim Horton.
1610
1611         - Use references rather than pointers where possible.
1612         - Store and pass the listeners as Refs.
1613         - Make API::FormClient more like API::PolicyClient by making it the
1614           responsibility of the client implementation to call the default policy.
1615
1616         * UIProcess/API/APIFormClient.h:
1617         (API::FormClient::willSubmitForm):
1618         * UIProcess/API/APIPolicyClient.h:
1619         (API::PolicyClient::decidePolicyForNavigationAction):
1620         (API::PolicyClient::decidePolicyForNewWindowAction):
1621         (API::PolicyClient::decidePolicyForResponse):
1622         (API::PolicyClient::unableToImplementPolicy):
1623         * UIProcess/API/C/WKPage.cpp:
1624         (WKPageSetPagePolicyClient):
1625         * UIProcess/API/Cocoa/WKWebView.mm:
1626         (-[WKWebView _setFormDelegate:]):
1627         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
1628         * UIProcess/Cocoa/NavigationState.h:
1629         * UIProcess/Cocoa/NavigationState.mm:
1630         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1631         (WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):
1632         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
1633         * UIProcess/WebFormClient.cpp:
1634         (WebKit::WebFormClient::willSubmitForm):
1635         * UIProcess/WebFormClient.h:
1636         * UIProcess/WebFrameProxy.cpp:
1637         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
1638         (WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy):
1639         * UIProcess/WebFrameProxy.h:
1640         * UIProcess/WebPageProxy.cpp:
1641         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1642         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1643         (WebKit::WebPageProxy::decidePolicyForResponse):
1644         (WebKit::WebPageProxy::unableToImplementPolicy):
1645         (WebKit::WebPageProxy::willSubmitForm):
1646
1647 2015-01-18  Sam Weinig  <sam@webkit.org>
1648
1649         Merge API::ProcessPoolConfiguration and _WKProcessPoolConfiguration
1650         https://bugs.webkit.org/show_bug.cgi?id=140601
1651
1652         Reviewed by Anders Carlsson.
1653
1654         - Converts _WKProcessPoolConfiguration to be backed via API::ProcessPoolConfiguration.
1655         - Expands API::ProcessPoolConfiguration to add all the parameters necessary to fully
1656           initialize a WebProcessPool. This allows -[WKProcessPool _initWithConfiguration:] to
1657           be a simple pass through initializer, which in turn allows us to consider WebProcessPools
1658           created on the C++ and Objective-C sides as equivalent.
1659         - Makes WebProcessPool own the reference to the API::ProcessPoolConfiguration (rather than
1660           the WKProcessPool wrapper).
1661
1662         * Shared/Cocoa/APIObject.mm:
1663         (API::Object::newObject):
1664         Create the API::ProcessPoolConfigurations using [_WKProcessPoolConfiguration alloc] as its 
1665         storage..
1666
1667         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1668         (API::ProcessPoolConfiguration::create):
1669         (API::ProcessPoolConfiguration::createWithLegacyOptions):
1670         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
1671         (API::ProcessPoolConfiguration::~ProcessPoolConfiguration):
1672         (API::ProcessPoolConfiguration::copy):
1673         (API::ProcessPoolConfiguration::webProcessPoolConfiguration): Deleted.
1674         * UIProcess/API/APIProcessPoolConfiguration.h:
1675         Add the remaining initialization parameters and add a convenience create function
1676         for configuring legacy WebProcessPools (for use by the C-SPI).
1677
1678         * UIProcess/API/APIWebsiteDataStore.cpp:
1679         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
1680         * UIProcess/API/APIWebsiteDataStore.h:
1681         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1682         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
1683         (API::WebsiteDataStore::defaultDataStoreConfiguration):
1684         Expose helper for getting the website data directories for use in the ProcessPoolConfiguration.
1685
1686         * UIProcess/API/C/WKContext.cpp:
1687         (WKContextCreate):
1688         (WKContextCreateWithInjectedBundlePath):
1689         (WKContextCreateWithConfiguration):
1690         Use ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
1691
1692         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1693         (WKContextConfigurationCreate):
1694         Update for ProcessPoolConfiguration::create() returning a Ref. Note, this function
1695         was not changed to call ProcessPoolConfiguration::createWithLegacyOptions() since
1696         it has not been around long enough to warrant it.
1697
1698         * UIProcess/API/Cocoa/WKProcessGroup.mm:
1699         (-[WKProcessGroup initWithInjectedBundleURL:]):
1700         Use ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
1701
1702         * UIProcess/API/Cocoa/WKProcessPool.mm:
1703         (-[WKProcessPool description]):
1704         Change to pull the configuration from the underlying API::Object.
1705
1706         (-[WKProcessPool _configuration]):
1707         Change to pull the configuration from the underlying API::Object and call the new
1708         copy() helper on it.
1709         
1710         (-[WKProcessPool _initWithConfiguration:]):
1711         Convert to be a simple pass through to API::Object::constructInWrapper.
1712
1713         (websiteDataDirectoryURL): Deleted.
1714         Moved to APIWebsiteDataStore.h
1715
1716         * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
1717         Removes the _WKProcessPoolConfiguration member, now that it is stored on the WebProcessPool.
1718         
1719         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1720         (-[_WKProcessPoolConfiguration init]):
1721         (-[_WKProcessPoolConfiguration dealloc]):
1722         Added to support API::Object bridging.
1723
1724         (-[_WKProcessPoolConfiguration injectedBundleURL]):
1725         (-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
1726         Convert to getting the URL from the underlying object. Moved the exception
1727         that used to be on creation of the WKProcessPool.
1728
1729         (-[_WKProcessPoolConfiguration maximumProcessCount]):
1730         (-[_WKProcessPoolConfiguration setMaximumProcessCount:]):
1731         Convert to getting the count from the underlying object.
1732
1733         (-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
1734         Convert to constructing the NSArray on demand from the underlying Vector.
1735
1736         (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
1737         Converts the NSArray to a Vector rather than storing the array.
1738
1739         * UIProcess/API/Cocoa/_WKProcessPoolConfigurationInternal.h: Added.
1740         (API::wrapper):
1741         Add boilerplate for API::Object bridging.
1742
1743         * UIProcess/API/gtk/WebKitWebContext.cpp:
1744         (webkitWebContextConstructed):
1745         Update to use API::ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
1746
1747
1748         * UIProcess/WebInspectorProxy.cpp:
1749         (WebKit::WebInspectorProxy::inspectorProcessPool):
1750         Update to call API::ProcessPoolConfiguration::createWithLegacyOptions().
1751
1752         * UIProcess/WebProcessPool.cpp:
1753         (WebKit::WebProcessPool::create):
1754         (WebKit::websiteDataStoreConfiguration):
1755         (WebKit::WebProcessPool::WebProcessPool):
1756         (WebKit::WebProcessPool::applyPlatformSpecificConfigurationDefaults): Deleted.
1757         This functionality was moved to the constructor of the API::ProcessPoolConfiguration.
1758         * UIProcess/WebProcessPool.h:
1759         Changed to take (and store) a API::ProcessPoolConfiguration rather than the WebProcessPoolConfiguration.
1760
1761         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1762         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
1763         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
1764         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
1765         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
1766         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
1767         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
1768         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
1769         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
1770         * UIProcess/efl/WebContextEfl.cpp:
1771         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
1772         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
1773         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
1774         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
1775         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
1776         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
1777         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
1778         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
1779         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1780         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
1781         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
1782         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
1783         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
1784         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
1785         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
1786         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
1787         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
1788         Renamed to make it clear these were the legacy locations for these directories.
1789
1790         * WebKit2.xcodeproj/project.pbxproj:
1791         Added new files.
1792
1793 2015-01-19  Beth Dakin  <bdakin@apple.com>
1794
1795          Speculative build fix.
1796
1797         * UIProcess/API/mac/WKView.mm:
1798         (-[WKView initWithFrame:processPool:configuration:webView:]):
1799
1800 2015-01-19  Timothy Horton  <timothy_horton@apple.com>
1801
1802         Adjust naming of action menu SPI
1803         https://bugs.webkit.org/show_bug.cgi?id=140644
1804         <rdar://problem/19448129>
1805
1806         Reviewed by Brian Weinstein.
1807
1808         * UIProcess/API/mac/WKView.mm:
1809         (-[WKView initWithFrame:processPool:configuration:webView:]):
1810         * UIProcess/mac/WKActionMenuController.mm:
1811         (-[WKActionMenuController prepareForMenu:withEvent:]):
1812         (-[WKActionMenuController willOpenMenu:withEvent:]):
1813         (-[WKActionMenuController didCloseMenu:withEvent:]):
1814         (-[WKActionMenuController menuNeedsUpdate:]):
1815         (-[WKActionMenuController _updateActionMenuItems]):
1816
1817 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
1818
1819         [CoordinatedGraphics] Use C++ lambda instead of WTF::bind() in ThreadedCompositor::updateSceneState()
1820         https://bugs.webkit.org/show_bug.cgi?id=140613
1821
1822         Reviewed by Carlos Garcia Campos.
1823
1824         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1825         (WebKit::ThreadedCompositor::updateSceneState): Replace the use of WTF::bind() with a C++ lambda.
1826
1827 2015-01-19  Commit Queue  <commit-queue@webkit.org>
1828
1829         Unreviewed, rolling out r178653.
1830         https://bugs.webkit.org/show_bug.cgi?id=140634
1831
1832         Broke multiple SVG tests on Mountain Lion (Requested by ap on
1833         #webkit).
1834
1835         Reverted changeset:
1836
1837         "[SVG -> OTF Converter] Flip the switch on"
1838         https://bugs.webkit.org/show_bug.cgi?id=140592
1839         http://trac.webkit.org/changeset/178653
1840
1841 2015-01-19  Dean Jackson  <dino@apple.com>
1842
1843         Add "override" to fix the build with newer clangs.
1844
1845         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
1846         (WebKit::WebProcessProxy::transformHandlesToObjects):
1847         (WebKit::WebProcessProxy::transformObjectsToHandles):
1848         * UIProcess/WebProcessProxy.cpp:
1849         (WebKit::WebProcessProxy::transformObjectsToHandles):
1850         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1851         * WebProcess/cocoa/WebProcessCocoa.mm:
1852         (WebKit::WebProcess::transformHandlesToObjects):
1853         (WebKit::WebProcess::transformObjectsToHandles):
1854
1855 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
1856
1857         [SVG -> OTF Converter] Flip the switch on
1858         https://bugs.webkit.org/show_bug.cgi?id=140592
1859
1860         Reviewed by Antti Koivisto.
1861
1862         * Configurations/FeatureDefines.xcconfig:
1863
1864 2015-01-18  Daniel Bates  <dabates@apple.com>
1865
1866         Attempt to fix the iOS build after <http://trac.webkit.org/changeset/178631>
1867         (https://bugs.webkit.org/show_bug.cgi?id=129441)
1868
1869         * UIProcess/WKInspectorHighlightView.mm:
1870         (-[WKInspectorHighlightView update:]): Substitute HighlightType::Node and
1871         HighlightType::Rects for HighlightTypeNode and HighlightTypeRects, respectively.
1872         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1873         (WebKit::WebInspectorClient::highlight): Pass lvalue reference to WebCore::Highlight
1874         instead of pointer in call to InspectorController::getHighlight().
1875
1876 2015-01-18  Sam Weinig  <sam@webkit.org>
1877
1878         Fix style issues and add availability macros missed in r178634
1879         https://bugs.webkit.org/show_bug.cgi?id=140597
1880
1881         Reviewed by Dan Bernstein.
1882
1883         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
1884         Add missing availability macros.
1885
1886         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
1887         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
1888         (-[_WKUserContentFilter initWithName:serializedRules:]):
1889         (-[_WKUserContentFilter _initWithName:serializedRules:]): Deleted.
1890         Removed unnecessary leading underscore from init method.
1891
1892 2015-01-17  Sam Weinig  <sam@webkit.org>
1893
1894         Add initial experimental user content filtering API
1895         https://bugs.webkit.org/show_bug.cgi?id=140584
1896
1897         Reviewed by Benjamin Poulain.
1898
1899         Moves content filtering from being per-ProcessPool to per-UserContentController.
1900
1901         * Shared/API/APIObject.h:
1902         * Shared/API/c/WKBase.h:
1903         * UIProcess/API/APIUserContentFilter.cpp: Added.
1904         (API::UserContentFilter::UserContentFilter):
1905         (API::UserContentFilter::~UserContentFilter):
1906         * UIProcess/API/APIUserContentFilter.h: Added.
1907         * UIProcess/API/C/WKAPICast.h:
1908         * UIProcess/API/C/WKUserContentFilterRef.cpp: Added.
1909         (WKUserContentFilterGetTypeID):
1910         (WKUserContentFilterCreate):
1911         * UIProcess/API/C/WKUserContentFilterRef.h: Added.
1912         * UIProcess/API/C/WebKit2_C.h:
1913         * UIProcess/API/Cocoa/_WKUserContentFilter.h: Added.
1914         * UIProcess/API/Cocoa/_WKUserContentFilter.mm: Added.
1915         (WKUserContentControllerAddUserContentFilter):
1916         (WKUserContentControllerRemoveAllUserContentFilters):
1917         (-[_WKUserContentFilter _initWithName:ruleList:]):
1918         * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h: Added.
1919         Add a basic UserContentFilter type and expose it via both the Objective-C API (as _WKUserContentFilter)
1920         and via the C SPI (as WKUserContentFilterRef).
1921
1922         * UIProcess/API/C/WKUserContentControllerRef.h:
1923         * UIProcess/API/C/WKUserContentControllerRef.cpp:
1924         Add C-SPI to set and remove WKUserContentFilterRefs.
1925
1926         * UIProcess/API/Cocoa/WKProcessPool.mm:
1927         (-[WKProcessPool _loadContentExtensionWithIdentifier:serializedRules:successCompletionHandler:errorCompletionHandler:]): Deleted.
1928         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1929         * UIProcess/WebProcessPool.cpp:
1930         (WebKit::WebProcessPool::processDidFinishLaunching):
1931         (WebKit::WebProcessPool::loadContentExtension): Deleted.
1932         * UIProcess/WebProcessPool.h:
1933         * WebProcess/WebProcess.cpp:
1934         (WebKit::WebProcess::loadContentExtension): Deleted.
1935         * WebProcess/WebProcess.h:
1936         * WebProcess/WebProcess.messages.in:
1937         Remove the old SPI for loading content filters that was per-ProcessPool. Content filters now follow
1938         the same pattern as UserScripts and UserStyleSheets as being per-UserContentController.
1939
1940         * UIProcess/API/Cocoa/WKUserContentController.mm:
1941         (-[WKUserContentController _addUserContentFilter:]):
1942         (-[WKUserContentController _removeAllUserContentFilters]):
1943         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
1944         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Added.
1945         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1946         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1947         (WebKit::WebUserContentControllerProxy::addProcess):
1948         (WebKit::WebUserContentControllerProxy::addUserContentFilter):
1949         (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
1950         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1951         * WebProcess/UserContent/WebUserContentController.cpp:
1952         (WebKit::WebUserContentController::addUserContentFilters):
1953         (WebKit::WebUserContentController::removeAllUserContentFilters):
1954         * WebProcess/UserContent/WebUserContentController.h:
1955         * WebProcess/UserContent/WebUserContentController.messages.in:
1956         Pipe user content filters over to all the WebProcesses that the UserContentController is
1957         connected to.
1958
1959         * WebKit2.xcodeproj/project.pbxproj:
1960         Add new files.
1961
1962 2015-01-17  Chris Dumez  <cdumez@apple.com>
1963
1964         [WK2][iOS] Add Cocoa delegate for logging diagnostic messages
1965         https://bugs.webkit.org/show_bug.cgi?id=140410
1966
1967         Reviewed by Sam Weinig.
1968
1969         Add Cocoa delegate for logging diagnostic messages.
1970
1971         * UIProcess/API/APIDiagnosticLoggingClient.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
1972         (API::DiagnosticLoggingClient::~DiagnosticLoggingClient):
1973         (API::DiagnosticLoggingClient::logDiagnosticMessage):
1974         (API::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
1975         (API::DiagnosticLoggingClient::logDiagnosticMessageWithValue):
1976         * UIProcess/API/C/WKPage.cpp:
1977         (WKPageSetPageDiagnosticLoggingClient):
1978         * UIProcess/API/Cocoa/WKWebView.mm:
1979         (-[WKWebView initWithFrame:configuration:]):
1980         (-[WKWebView _diagnosticLoggingDelegate]):
1981         (-[WKWebView _setDiagnosticLoggingDelegate:]):
1982         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1983         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
1984         * UIProcess/Cocoa/DiagnosticLoggingClient.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
1985         * UIProcess/Cocoa/DiagnosticLoggingClient.mm: Added.
1986         (WebKit::DiagnosticLoggingClient::DiagnosticLoggingClient):
1987         (WebKit::DiagnosticLoggingClient::delegate):
1988         (WebKit::DiagnosticLoggingClient::setDelegate):
1989         (WebKit::DiagnosticLoggingClient::logDiagnosticMessage):
1990         (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
1991         (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithValue):
1992         * UIProcess/WebPageDiagnosticLoggingClient.cpp:
1993         (WebKit::WebPageDiagnosticLoggingClient::WebPageDiagnosticLoggingClient):
1994         * UIProcess/WebPageDiagnosticLoggingClient.h:
1995         * UIProcess/WebPageProxy.cpp:
1996         (WebKit::WebPageProxy::WebPageProxy):
1997         (WebKit::WebPageProxy::setDiagnosticLoggingClient):
1998         (WebKit::WebPageProxy::close):
1999         (WebKit::WebPageProxy::logDiagnosticMessage):
2000         (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
2001         (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
2002         (WebKit::WebPageProxy::initializeDiagnosticLoggingClient): Deleted.
2003         * UIProcess/WebPageProxy.h:
2004         (WebKit::WebPageProxy::diagnosticLoggingClient):
2005         * WebKit2.xcodeproj/project.pbxproj:
2006
2007 2015-01-17  David Kilzer  <ddkilzer@apple.com>
2008
2009         REGRESSION (r178618): Change to WKWebViewConfiguration broke iOS build
2010         <https://bugs.webkit.org/show_bug.cgi?id=140559>
2011
2012         Blind fix to address the following build failure:
2013
2014             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:79:7: error: interface type cannot be statically allocated
2015                 T m_value;
2016                   ^
2017                   *
2018             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:94:55: note: in instantiation of template class 'LazyInitialized<WKWebViewContentProviderRegistry>' requested here
2019                 LazyInitialized<WKWebViewContentProviderRegistry> _contentProviderRegistry;
2020                                                                   ^
2021             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:53:21: error: assigning to 'WKWebViewContentProviderRegistry *' from incompatible type 'RetainPtr<WKWebViewContentProviderRegistry *>'
2022                         m_value = f();
2023                                 ^ ~~~
2024             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:222:37: note: in instantiation of function template specialization 'LazyInitialized<WKWebViewContentProviderRegistry>::get<(lambda at Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:222:41)>' requested here
2025                 return _contentProviderRegistry.get([] { return adoptNS([[WKWebViewContentProviderRegistry alloc] init]); });
2026                                                 ^
2027             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:57:24: error: property 'get' not found on object of type 'WKWebViewContentProviderRegistry *'
2028                     return m_value.get();
2029                                    ^
2030             3 errors generated.
2031
2032         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Change
2033         _contentProviderRegistry to be a LazyInitialized<RetainPtr<>> to
2034         match other instance variables.
2035
2036 2015-01-16  Sam Weinig  <sam@webkit.org>
2037
2038         Add a basic configuration object for WKView
2039         https://bugs.webkit.org/show_bug.cgi?id=140559
2040
2041         Reviewed by Anders Carlsson.
2042
2043         - Adds WKPageConfigurationRef (backed by API::PageConfiguration). WKWebView configuration
2044           is not yet bridged to this, but that will happen soon. For now, it has a few basic
2045           configuration options.
2046         - Adds WKUserContentControllerRef as C-SPI version of WKUserContentController.
2047         - Adds WKUserScriptRef as C-SPI version of WKUserScript.
2048
2049         * Shared/API/APIObject.h:
2050         * Shared/API/c/WKBase.h:
2051         * Shared/API/c/WKSharedAPICast.h:
2052         (WebKit::toWKUserScriptInjectionTime):
2053         * UIProcess/API/APIPageConfiguration.cpp: Added.
2054         (API::PageConfiguration::PageConfiguration):
2055         (API::PageConfiguration::~PageConfiguration):
2056         (API::PageConfiguration::processPool):
2057         (API::PageConfiguration::setProcessPool):
2058         (API::PageConfiguration::userContentController):
2059         (API::PageConfiguration::setUserContentController):
2060         (API::PageConfiguration::pageGroup):
2061         (API::PageConfiguration::setPageGroup):
2062         (API::PageConfiguration::preferences):
2063         (API::PageConfiguration::setPreferences):
2064         (API::PageConfiguration::relatedPage):
2065         (API::PageConfiguration::setRelatedPage):
2066         (API::PageConfiguration::webPageConfiguration):
2067         * UIProcess/API/APIPageConfiguration.h: Added.
2068         (API::PageConfiguration::create):
2069         * UIProcess/API/APIUserScript.cpp: Added.
2070         (API::generateIdentifier):
2071         (API::UserScript::generateUniqueURL):
2072         * UIProcess/API/APIUserScript.h:
2073         * UIProcess/API/C/WKAPICast.h:
2074         * UIProcess/API/C/WKPageConfigurationRef.cpp: Added.
2075         (WKPageConfigurationGetTypeID):
2076         (WKPageConfigurationCreate):
2077         (WKPageConfigurationGetContext):
2078         (WKPageConfigurationSetContext):
2079         (WKPageConfigurationGetPageGroup):
2080         (WKPageConfigurationSetPageGroup):
2081         (WKPageConfigurationGetUserContentController):
2082         (WKPageConfigurationSetUserContentController):
2083         (WKPageConfigurationGetPreferences):
2084         (WKPageConfigurationSetPreferences):
2085         (WKPageConfigurationGetRelatedPage):
2086         (WKPageConfigurationSetRelatedPage):
2087         * UIProcess/API/C/WKPageConfigurationRef.h: Added.
2088         * UIProcess/API/C/WKUserContentControllerRef.cpp: Added.
2089         (WKUserContentControllerGetTypeID):
2090         (WKUserContentControllerCreate):
2091         (WKUserContentControllerCopyUserScripts):
2092         (WKUserContentControllerAddUserScript):
2093         (WKUserContentControllerRemoveAllUserScripts):
2094         * UIProcess/API/C/WKUserContentControllerRef.h: Added.
2095         * UIProcess/API/C/WKUserScriptRef.cpp: Added.
2096         (WKUserScriptGetTypeID):
2097         (WKUserScriptCreateWithSource):
2098         (WKUserScriptCopySource):
2099         (WKUserScriptGetInjectionTime):
2100         (WKUserScriptGetMainFrameOnly):
2101         * UIProcess/API/C/WKUserScriptRef.h: Added.
2102         * UIProcess/API/C/WebKit2_C.h:
2103         * UIProcess/API/Cocoa/WKUserScript.mm:
2104         (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
2105         (generateIdentifier): Deleted.
2106         * UIProcess/API/Cocoa/WKViewPrivate.h:
2107         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2108         (LazyInitialized::get):
2109         (LazyInitialized::set):
2110         (LazyInitialized::peek):
2111         * UIProcess/API/mac/WKView.mm:
2112         (-[WKView initWithFrame:configurationRef:]):
2113         * UIProcess/UserContent/WebUserContentControllerProxy.h:
2114         (WebKit::WebUserContentControllerProxy::create):
2115         * WebKit2.xcodeproj/project.pbxproj:
2116
2117 2015-01-16  Anders Carlsson  <andersca@apple.com>
2118
2119         Pass the connection along to WebProcessLifetimeTracker
2120         https://bugs.webkit.org/show_bug.cgi?id=140569
2121
2122         Reviewed by Andreas Kling.
2123
2124         * UIProcess/WebPageProxy.cpp:
2125         (WebKit::WebPageProxy::connectionWillOpen):
2126         (WebKit::WebPageProxy::connectionDidClose):
2127         * UIProcess/WebProcessLifetimeTracker.cpp:
2128         (WebKit::WebProcessLifetimeTracker::connectionWillOpen):
2129         (WebKit::WebProcessLifetimeTracker::connectionDidClose):
2130         (WebKit::WebProcessLifetimeTracker::connectionWillClose): Deleted.
2131         * UIProcess/WebProcessLifetimeTracker.h:
2132
2133 2015-01-16  Anders Carlsson  <andersca@apple.com>
2134
2135         More WebPageProxy CTTE
2136         https://bugs.webkit.org/show_bug.cgi?id=140565
2137
2138         Reviewed by Andreas Kling.
2139
2140         * UIProcess/WebPageProxy.cpp:
2141         (WebKit::WebPageProxy::connectionWillOpen):
2142         (WebKit::WebPageProxy::connectionDidClose):
2143         (WebKit::WebPageProxy::connectionWillClose): Deleted.
2144         * UIProcess/WebPageProxy.h:
2145         * UIProcess/WebProcessProxy.cpp:
2146         (WebKit::WebProcessProxy::connectionWillOpen):
2147         (WebKit::WebProcessProxy::connectionDidClose):
2148
2149 2015-01-16  Anders Carlsson  <andersca@apple.com>
2150
2151         Remove dead code
2152         https://bugs.webkit.org/show_bug.cgi?id=140563
2153
2154         Reviewed by Geoffrey Garen.
2155
2156         * UIProcess/WebProcessPool.cpp:
2157         (WebKit::WebProcessPool::processWillOpenConnection): Deleted.
2158         (WebKit::WebProcessPool::processWillCloseConnection): Deleted.
2159         * UIProcess/WebProcessPool.h:
2160         * UIProcess/WebProcessProxy.cpp:
2161         (WebKit::WebProcessProxy::connectionWillOpen):
2162         (WebKit::WebProcessProxy::connectionDidClose):
2163
2164 2015-01-16  Anders Carlsson  <andersca@apple.com>
2165
2166         Sprinkle some CTTE in ChildProcessProxy member functions
2167         https://bugs.webkit.org/show_bug.cgi?id=140562
2168
2169         Reviewed by Andreas Kling.
2170
2171         * Shared/ChildProcessProxy.cpp:
2172         (WebKit::ChildProcessProxy::didFinishLaunching):
2173         (WebKit::ChildProcessProxy::clearConnection):
2174         (WebKit::ChildProcessProxy::connectionWillOpen):
2175         (WebKit::ChildProcessProxy::connectionDidClose):
2176         (WebKit::ChildProcessProxy::connectionWillClose): Deleted.
2177         * Shared/ChildProcessProxy.h:
2178         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2179         (WebKit::DatabaseProcessProxy::connectionWillOpen): Deleted.
2180         (WebKit::DatabaseProcessProxy::connectionWillClose): Deleted.
2181         * UIProcess/Databases/DatabaseProcessProxy.h:
2182         * UIProcess/Network/NetworkProcessProxy.cpp:
2183         (WebKit::NetworkProcessProxy::connectionWillOpen):
2184         (WebKit::NetworkProcessProxy::connectionWillClose): Deleted.
2185         * UIProcess/Network/NetworkProcessProxy.h:
2186         * UIProcess/WebProcessProxy.cpp:
2187         (WebKit::WebProcessProxy::connectionWillOpen):
2188         (WebKit::WebProcessProxy::connectionDidClose):
2189         (WebKit::WebProcessProxy::connectionWillClose): Deleted.
2190         * UIProcess/WebProcessProxy.h:
2191         * UIProcess/mac/SecItemShimProxy.cpp:
2192         (WebKit::SecItemShimProxy::initializeConnection):
2193         * UIProcess/mac/SecItemShimProxy.h:
2194
2195 2015-01-16  Beth Dakin  <bdakin@apple.com>
2196
2197         Should cancel immediate action sooner in WK2
2198         https://bugs.webkit.org/show_bug.cgi?id=140561
2199         -and corresponding-
2200         rdar://problem/19490114
2201
2202         Reviewed by Tim Horton.
2203
2204         _cancelImmediateActionIfNeeded will cancel the immediate action if there is no 
2205         animation controller or if the DDActionContext doesn’t want to use its actions.
2206         * UIProcess/mac/WKImmediateActionController.mm:
2207         (-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
2208
2209         Call _cancelImmediateActionIfNeeded to cancel earlier.
2210         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
2211
2212         Re-factor this code to use the newly-added method _cancelImmediateActionIfNeeded
2213         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
2214
2215 2015-01-16  Anders Carlsson  <andersca@apple.com>
2216
2217         Don't try to send SetSession messages before the web page has been constructed in the web process
2218         https://bugs.webkit.org/show_bug.cgi?id=140558
2219
2220         Reviewed by Andreas Kling.
2221
2222         * UIProcess/WebPageProxy.cpp:
2223         (WebKit::WebPageProxy::WebPageProxy):
2224         We already send the session ID along in the page creation parameters so just message the network process
2225         if we need to create an ephemeral session.
2226
2227         (WebKit::WebPageProxy::setSessionID):
2228         Add an isValid call for good measure.
2229
2230 2015-01-16  Anders Carlsson  <andersca@apple.com>
2231
2232         Log unhandled messages in the web process
2233         https://bugs.webkit.org/show_bug.cgi?id=140549
2234
2235         Reviewed by Andreas Kling.
2236
2237         * WebProcess/WebProcess.cpp:
2238         (WebKit::WebProcess::didReceiveSyncMessage):
2239         (WebKit::WebProcess::didReceiveMessage):
2240
2241 2015-01-16  Shivakumar JM  <shiva.jm@samsung.com>
2242
2243         Fix build warning in WebKit2/UIProcess module.
2244         https://bugs.webkit.org/show_bug.cgi?id=140538
2245
2246         Reviewed by Csaba Osztrogonác.
2247
2248         Fix build warnings by removing parameter name from functions
2249
2250         * UIProcess/Storage/StorageManager.cpp:
2251         (WebKit::StorageManager::processWillOpenConnection):
2252         (WebKit::StorageManager::processDidCloseConnection):
2253         * UIProcess/WebProcessPool.cpp:
2254         (WebKit::WebProcessPool::processWillOpenConnection):
2255         (WebKit::WebProcessPool::processWillCloseConnection):
2256
2257 2015-01-15  Csaba Osztrogonác  <ossy@webkit.org>
2258
2259         Remove ENABLE(SQL_DATABASE) guards
2260         https://bugs.webkit.org/show_bug.cgi?id=140434
2261
2262         Reviewed by Darin Adler.
2263
2264         * Configurations/FeatureDefines.xcconfig:
2265         * Shared/OriginAndDatabases.cpp:
2266         * Shared/OriginAndDatabases.h:
2267         * Shared/WebCoreArgumentCoders.cpp:
2268         * UIProcess/API/C/WKContext.cpp:
2269         (WKContextGetDatabaseManager):
2270         * UIProcess/API/C/WKDatabaseManager.cpp:
2271         (WKDatabaseManagerGetTypeID):
2272         (WKDatabaseManagerGetOriginKey):
2273         (WKDatabaseManagerGetOriginQuotaKey):
2274         (WKDatabaseManagerGetOriginUsageKey):
2275         (WKDatabaseManagerGetDatabaseDetailsKey):
2276         (WKDatabaseManagerGetDatabaseDetailsNameKey):
2277         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
2278         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
2279         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
2280         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
2281         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
2282         (WKDatabaseManagerSetClient):
2283         (WKDatabaseManagerGetDatabasesByOrigin):
2284         (WKDatabaseManagerGetDatabaseOrigins):
2285         (WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
2286         (WKDatabaseManagerDeleteDatabasesForOrigin):
2287         (WKDatabaseManagerDeleteAllDatabases):
2288         (WKDatabaseManagerSetQuotaForOrigin):
2289         * UIProcess/API/efl/EwkView.cpp:
2290         (EwkView::informDatabaseQuotaReached):
2291         * UIProcess/WebDatabaseManagerProxy.cpp:
2292         * UIProcess/WebDatabaseManagerProxy.h:
2293         * UIProcess/WebDatabaseManagerProxy.messages.in:
2294         * UIProcess/WebProcessPool.cpp:
2295         * UIProcess/efl/PageUIClientEfl.cpp:
2296         (WebKit::PageUIClientEfl::PageUIClientEfl):
2297         (WebKit::PageUIClientEfl::exceededDatabaseQuota):
2298         * UIProcess/efl/PageUIClientEfl.h:
2299         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2300         (WebKit::InjectedBundle::clearAllDatabases):
2301         (WebKit::InjectedBundle::setDatabaseQuota):
2302         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2303         (WebKit::WebChromeClient::exceededDatabaseQuota):
2304         * WebProcess/WebCoreSupport/WebChromeClient.h:
2305         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2306         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2307         * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
2308         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp:
2309         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h:
2310         * WebProcess/WebPage/WebPage.cpp:
2311         (WebKit::WebPage::updatePreferences):
2312         * WebProcess/WebProcess.cpp:
2313         (WebKit::WebProcess::WebProcess):
2314
2315 2015-01-15  Anders Carlsson  <andersca@apple.com>
2316
2317         Add a connection parameter to StorageManager willOpen/didClose functions
2318         https://bugs.webkit.org/show_bug.cgi?id=140527
2319
2320         Reviewed by Tim Horton.
2321
2322         Rename processWillCloseConnection to processDidCloseConnection and pass connections
2323         to both functions since in the near future we won't be able to get the connection from 
2324         the web process proxy in these scenarios.
2325
2326         * UIProcess/Storage/StorageManager.cpp:
2327         (WebKit::StorageManager::processWillOpenConnection):
2328         (WebKit::StorageManager::processDidCloseConnection):
2329         (WebKit::StorageManager::processWillCloseConnection): Deleted.
2330         * UIProcess/Storage/StorageManager.h:
2331         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2332         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
2333         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
2334
2335 2015-01-15  Chris Dumez  <cdumez@apple.com>
2336
2337         [WK2] Wire diagnostic logging messages through the UIProcess
2338         https://bugs.webkit.org/show_bug.cgi?id=140486
2339
2340         Reviewed by Sam Weinig.
2341
2342         Wire diagnostic logging messages through the UIProcess.
2343         Eventually, the corresponding bundle API should go away.
2344
2345         * CMakeLists.txt:
2346         Add UIProcess/WebPageDiagnosticLoggingClient.cpp to CMake.
2347
2348         * Shared/API/c/WKDiagnosticLoggingResultType.h:
2349         Extract WKDiagnosticLoggingResultType enumeration from
2350         WKBundlePageDiagnosticLoggingClient.h into its own header so that
2351         it can be shared with the new WKPageDiagnosticLoggingClient.h.
2352
2353         * Shared/API/c/WKSharedAPICast.h:
2354         (WebKit::toAPI):
2355         (WebKit::toDiagnosticLoggingResultType):
2356         Add WebCore::DiagnosticLoggingResultType <-> WKDiagnosticLoggingResultType
2357         casting functions.
2358
2359         * UIProcess/API/C/WKPage.cpp:
2360         (WKPageSetPageDiagnosticLoggingClient):
2361         * UIProcess/API/C/WKPage.h:
2362         Add WKPage API so that the application can set the DiagnosticLoggingClient.
2363
2364         * UIProcess/API/C/WKPageDiagnosticLoggingClient.h: Added.
2365         New WK2 diagnostic logging client that will eventually replace the existing
2366         WKBundlePageDiagnosticLoggingClient.h injected bundle client.
2367
2368         * UIProcess/WebPageDiagnosticLoggingClient.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp.
2369         * UIProcess/WebPageDiagnosticLoggingClient.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
2370         * UIProcess/WebPageProxy.cpp:
2371         * UIProcess/WebPageProxy.h:
2372         Handle new IPC messages for logging diagnostic messages.
2373
2374         * UIProcess/WebPageProxy.messages.in:
2375         Add 3 IPC messages for logging diagnostic messages.
2376
2377         * WebKit2.xcodeproj/project.pbxproj:
2378         Add new files to XCode project.
2379
2380         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
2381         Remove WKDiagnosticLoggingResultType enum as it was moved to its own
2382         header.
2383
2384         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
2385         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
2386         Use WebCore::DiagnosticLoggingResultType enum type instead of
2387         WKDiagnosticLoggingResultType and call toAPI() to convert to
2388         WKDiagnosticLoggingResultType type.
2389
2390         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2391         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2392         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2393         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2394         Send IPC to WebPageProxy in addition to calling the injected bundle client.
2395
2396         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
2397         Use new DiagnosticLoggingResultType enum instead of the old LogType one.
2398
2399 2015-01-15  Dan Bernstein  <mitz@apple.com>
2400
2401         Added availability annotations to modern Cocoa SPI.
2402
2403         Rubber-stamped by Anders Carlsson.
2404
2405         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2406
2407 2015-01-15  Anders Carlsson  <andersca@apple.com>
2408
2409         Fix assertions on the Mountain Lion bots.
2410
2411         It is allowed to call addWorkQueueMessageReceiver even if the connection is open
2412         so remove that assertion.
2413
2414         * Platform/IPC/Connection.cpp:
2415         (IPC::Connection::addWorkQueueMessageReceiver):
2416
2417 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
2418
2419         Unreviewed build fix after r178536.
2420
2421         Initialize member variables in the proper order.
2422
2423         * UIProcess/WebPageProxy.cpp:
2424         (WebKit::WebPageProxy::WebPageProxy):
2425
2426 2015-01-15  Enrica Casucci  <enrica@apple.com>
2427
2428         [WK2] Add support for fully editable WKWebView.
2429         https://bugs.webkit.org/show_bug.cgi?id=140515
2430
2431         Reviewed by Anders Carlsson.
2432
2433         WKWebView has now a new property (_editable) to control
2434         the editability of the entire content.
2435
2436         * Shared/WebPageCreationParameters.cpp:
2437         (WebKit::WebPageCreationParameters::encode):
2438         (WebKit::WebPageCreationParameters::decode):
2439         * Shared/WebPageCreationParameters.h:
2440         * UIProcess/API/Cocoa/WKWebView.mm:
2441         (-[WKWebView _isEditable]):
2442         (-[WKWebView _setEditable:]):
2443         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2444         * UIProcess/API/mac/WKView.mm:
2445         * UIProcess/WebPageProxy.cpp:
2446         (WebKit::WebPageProxy::WebPageProxy):
2447         (WebKit::WebPageProxy::setEditable):
2448         (WebKit::WebPageProxy::creationParameters):
2449         * UIProcess/WebPageProxy.h:
2450         (WebKit::WebPageProxy::isEditable):
2451         * WebProcess/WebPage/WebPage.cpp:
2452         (WebKit::WebPage::setEditable):
2453         * WebProcess/WebPage/WebPage.h:
2454         * WebProcess/WebPage/WebPage.messages.in:
2455
2456 2015-01-15  Anders Carlsson  <andersca@apple.com>
2457
2458         Clearing the website data store should clear local storage
2459         https://bugs.webkit.org/show_bug.cgi?id=140507
2460
2461         Reviewed by Andreas Kling.
2462
2463         * Shared/WebsiteData/WebsiteDataTypes.h:
2464         Add WebsiteDataTypeLocalStorage.
2465
2466         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2467         Add WKWebsiteDataTypeLocalStorage
2468
2469         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2470         (toWebsiteDataTypes):
2471         Handle WKWebsiteDataTypeLocalStorage.
2472
2473         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2474         (WebKit::fileModificationTime):
2475         Use an early return.
2476
2477         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
2478         Change this to take an std::chrono::system_clock::time_point and don't
2479         try to modifiy m_origins while iterating it.
2480
2481         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2482         Update declarations.
2483
2484         * UIProcess/Storage/StorageManager.cpp:
2485         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
2486         Change this to take an std::chrono::system_clock::time_point.
2487
2488         * UIProcess/Storage/StorageManager.h:
2489         Update declarations.
2490
2491         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2492         (WebKit::WebsiteDataStore::removeData):
2493         Remove data from the storage manager as well.
2494
2495 2015-01-15  Anders Carlsson  <andersca@apple.com>
2496
2497         Give WebsiteDataStore a StorageManager
2498         https://bugs.webkit.org/show_bug.cgi?id=140505
2499
2500         Reviewed by Andreas Kling.
2501
2502         The process pool storage manager is still around but is only used for clearing data. It will be removed
2503         completely in an upcoming commit.
2504
2505         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2506         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2507         Set up the local storage directory.
2508
2509         * UIProcess/API/Cocoa/WKProcessPool.mm:
2510         (websiteDataDirectoryURL):
2511         Export this so it can be called from APIWebsiteDataStoreCocoa.
2512
2513         * UIProcess/WebPageProxy.cpp:
2514         (WebKit::WebPageProxy::createNewPage):
2515         Call WebsiteDataStore::cloneSessionData instead.
2516
2517         * UIProcess/WebPageProxy.h:
2518         (WebKit::WebPageProxy::websiteDataStore):
2519         Add getter.
2520
2521         * UIProcess/WebProcessPool.cpp:
2522         (WebKit::websiteDataStoreConfiguration):
2523         Update this to take a WebProcessPoolConfiguration object and assign the local storage directory.
2524
2525         (WebKit::WebProcessPool::WebProcessPool):
2526         Pass the configuration to websiteDataStoreConfiguration.
2527
2528         (WebKit::WebProcessPool::processWillOpenConnection):
2529         (WebKit::WebProcessPool::processWillCloseConnection):
2530         Remove storage manager calls.
2531
2532         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2533         (WebKit::WebsiteDataStore::WebsiteDataStore):
2534         When creating a persistent data store, also create a storage manager.
2535
2536         (WebKit::WebsiteDataStore::cloneSessionData):
2537         Clone the session storage namespace.
2538
2539         (WebKit::WebsiteDataStore::webPageWasAdded):
2540         Create a session storage namespace for this page.
2541
2542         (WebKit::WebsiteDataStore::webPageWasRemoved):
2543         Destroy the session storage namespace.
2544
2545         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
2546         Tell the storage manager about the new process connection.
2547
2548         (WebKit::WebsiteDataStore::webPageWillOpenConnection):
2549         Set the allowed connection.
2550
2551         (WebKit::WebsiteDataStore::webPageDidCloseConnection):
2552         Clear the allowed connection.
2553
2554         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
2555         Tell the storage manager that the process connection has been closed.
2556
2557         * UIProcess/WebsiteData/WebsiteDataStore.h:
2558         Add new members.
2559
2560 2015-01-15  Anders Carlsson  <andersca@apple.com>
2561
2562         More work on the lifetime observer
2563         https://bugs.webkit.org/show_bug.cgi?id=140500
2564
2565         Reviewed by Andreas Kling.
2566
2567         Add webPageWasAdded/webPageWasRemoved functions; these will be called first and last during the
2568         lifetime of the web page. Also remove removeObserver since nobody is calling it.
2569
2570         * UIProcess/WebProcessLifetimeObserver.h:
2571         (WebKit::WebProcessLifetimeObserver::webPageWasAdded):
2572         (WebKit::WebProcessLifetimeObserver::webPageWasRemoved):
2573         * UIProcess/WebProcessLifetimeTracker.cpp:
2574         (WebKit::WebProcessLifetimeTracker::addObserver):
2575         (WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
2576         (WebKit::WebProcessLifetimeTracker::removeObserver): Deleted.
2577         * UIProcess/WebProcessLifetimeTracker.h:
2578
2579 2015-01-14  Anders Carlsson  <andersca@apple.com>
2580
2581         Don't pass an allowed connection when creating a session storage namespace
2582         https://bugs.webkit.org/show_bug.cgi?id=140482
2583
2584         Reviewed by Sam Weinig.
2585
2586         Instead, always call setAllowedSessionStorageNamespaceConnection. This will make it easier to
2587         move the storage manager into WebsiteDataStore and make it use the process lifetime observer machinery.
2588
2589         * UIProcess/Storage/StorageManager.cpp:
2590         (WebKit::StorageManager::SessionStorageNamespace::create):
2591         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
2592         (WebKit::StorageManager::createSessionStorageNamespace):
2593         * UIProcess/Storage/StorageManager.h:
2594         * UIProcess/WebPageProxy.cpp:
2595         (WebKit::WebPageProxy::WebPageProxy):
2596
2597 2015-01-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2598
2599         REGRESSION(r177075): [GTK] Creating a second web view disables accelerated compositing in existing web view
2600         https://bugs.webkit.org/show_bug.cgi?id=140494
2601
2602         Reviewed by Gustavo Noronha Silva.
2603
2604         The problem is that r177075 moved the creation of the redirected
2605         XComposite window to realize method, but leaving the call to
2606         webkitWebViewBaseUpdatePreferences() in both places Realize() and
2607         CreateWebPage(). webkitWebViewBaseUpdatePreferences() only updates
2608         the accelerating compositing setting nowadays, depending on
2609         whether the redirected XComposited window could be created or not
2610         (something that depends on whether XRender, XComposite and XDamage
2611         extensions are available in the current display). So, when the
2612         first web view is created, webkitWebViewBaseUpdatePreferences() is
2613         called first from CreateWebPage(), and always disabling
2614         accelerated compositing because the redirected window hasn't been
2615         created yet, and then from Realize() right after the redirected
2616         window is created so that accelerated compositing is enabled. When
2617         the second web view is created the same happens, but since
2618         settings are shared among web views, the first call to
2619         webkitWebViewBaseUpdatePreferences() from CreateWebPage() disables
2620         accelerated compositing and the web page exists accelerated
2621         compositing mode and never enters it again unless the page is
2622         reloaded. I guess the web page should enter accelerated
2623         compositing mode again when the setting is enabled again from
2624         Realize(), but since the setting is global and doesn't depend on
2625         every web view, we should never disable it once it has been
2626         enabled in any case.
2627         Since we want to enable accelerated compositing mode when the
2628         redirected XComposite window has been successfully created, we can
2629         use the SetNativeSurfaceHandleForCompositing message to enable the
2630         setting and remove webkitWebViewBaseUpdatePreferences().
2631
2632         * UIProcess/API/gtk/WebKitWebView.cpp:
2633         (webkitWebViewUpdateSettings):
2634         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2635         (webkitWebViewBaseRealize):
2636         (webkitWebViewBaseCreateWebPage):
2637         (webkitWebViewBaseUpdatePreferences): Deleted.
2638         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2639         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2640         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
2641
2642 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2643
2644         Unreviewed. Fix GTK+ build after r178464.
2645
2646         * UIProcess/API/gtk/WebKitUserContent.cpp:
2647         (_WebKitUserScript::_WebKitUserScript):
2648         (webkitUserScriptGetUserScript):
2649         * UIProcess/API/gtk/WebKitUserContentPrivate.h:
2650
2651 2015-01-14  Sam Weinig  <sam@webkit.org>
2652
2653         Convert WKUserScript to be an API::Object bridged object
2654         https://bugs.webkit.org/show_bug.cgi?id=140471
2655
2656         Reviewed by Dan Bernstein.
2657
2658         * Shared/API/APIObject.h:
2659         * Shared/Cocoa/APIObject.mm:
2660         (API::Object::newObject):
2661         Add Type::UserScript.
2662
2663         * UIProcess/API/APIUserScript.h: Added.
2664         Add API object for UserScripts.
2665
2666         * UIProcess/API/Cocoa/WKUserContentController.mm:
2667         (-[WKUserContentController init]):
2668         (-[WKUserContentController userScripts]):
2669         (-[WKUserContentController addUserScript:]):
2670         (-[WKUserContentController removeAllUserScripts]):
2671         (toWebCoreUserScriptInjectionTime): Deleted.
2672         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2673         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
2674         (WebKit::WebUserContentControllerProxy::addProcess):
2675         (WebKit::WebUserContentControllerProxy::addUserScript):
2676         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
2677         * UIProcess/UserContent/WebUserContentControllerProxy.h:
2678         (WebKit::WebUserContentControllerProxy::userScripts):
2679         Store the WKUserScripts in the WebUserContentControllerProxy instead of the
2680         Objective-C layer WKUserContentController, to allow creation of the object
2681         from either the Objective-C or C++ sides.
2682
2683         * UIProcess/API/Cocoa/WKUserScript.mm:
2684         (generateIdentifier):
2685         (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
2686         (-[WKUserScript source]):
2687         (-[WKUserScript injectionTime]):
2688         (-[WKUserScript isForMainFrameOnly]):
2689         (-[WKUserScript _apiObject]):
2690         * UIProcess/API/Cocoa/WKUserScriptInternal.h:
2691         (API::wrapper):
2692         (API::toWebCoreUserScriptInjectionTime):
2693         (API::toWKUserScriptInjectionTime):
2694         Convert to get properties from the API::UserScript.
2695
2696         * WebKit2.xcodeproj/project.pbxproj:
2697         Add the new file.
2698
2699 2015-01-14  Anders Carlsson  <andersca@apple.com>
2700
2701         Add per page connection callbacks to the lifetime observer
2702         https://bugs.webkit.org/show_bug.cgi?id=140475
2703
2704         Reviewed by Andreas Kling.
2705
2706         * UIProcess/WebProcessLifetimeObserver.cpp:
2707         (WebKit::WebProcessLifetimeObserver::addWebPage):
2708         (WebKit::WebProcessLifetimeObserver::removeWebPage):
2709         * UIProcess/WebProcessLifetimeObserver.h:
2710         (WebKit::WebProcessLifetimeObserver::webPageWillOpenConnection):
2711         (WebKit::WebProcessLifetimeObserver::webPageDidCloseConnection):
2712
2713 2015-01-14  Anders Carlsson  <andersca@apple.com>
2714
2715         Make WebsiteDataStore a WebProcessLifetimeObserver
2716         https://bugs.webkit.org/show_bug.cgi?id=140472
2717
2718         Reviewed by Andreas Kling.
2719
2720         * UIProcess/WebPageProxy.cpp:
2721         (WebKit::WebPageProxy::WebPageProxy):
2722         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2723         (WebKit::WebsiteDataStore::~WebsiteDataStore):
2724         (WebKit::WebsiteDataStore::removeData):
2725         (WebKit::WebsiteDataStore::addWebPage): Deleted.
2726         (WebKit::WebsiteDataStore::removeWebPage): Deleted.
2727         * UIProcess/WebsiteData/WebsiteDataStore.h:
2728
2729 2015-01-14  Chris Dumez  <cdumez@apple.com>
2730
2731         [WK2][iOS] Add private API to toggle diagnostic logging setting
2732         https://bugs.webkit.org/show_bug.cgi?id=140464
2733
2734         Reviewed by Dan Bernstein.
2735
2736         Add private API to toggle diagnostic logging setting for iOS.
2737         Previously, there was only a WK2 private C API for this.
2738
2739         * UIProcess/API/Cocoa/WKPreferences.mm:
2740         (-[WKPreferences _diagnosticLoggingEnabled]):
2741         (-[WKPreferences _setDiagnosticLoggingEnabled:]):
2742         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2743
2744 2015-01-14  Anders Carlsson  <andersca@apple.com>
2745
2746         Switch VisitedLinkProvider over to WebProcessLifetimeObserver
2747         https://bugs.webkit.org/show_bug.cgi?id=140469
2748
2749         Reviewed by Andreas Kling.
2750
2751         * UIProcess/VisitedLinkProvider.cpp:
2752         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
2753         (WebKit::VisitedLinkProvider::removeAll):
2754         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
2755         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
2756         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
2757         (WebKit::VisitedLinkProvider::resizeTable):
2758         (WebKit::VisitedLinkProvider::addProcess): Deleted.
2759         (WebKit::VisitedLinkProvider::removeProcess): Deleted.
2760         * UIProcess/VisitedLinkProvider.h:
2761         * UIProcess/WebPageProxy.cpp:
2762         (WebKit::WebPageProxy::WebPageProxy):
2763         (WebKit::WebPageProxy::processDidFinishLaunching):
2764         * UIProcess/WebProcessLifetimeObserver.cpp:
2765         (WebKit::WebProcessLifetimeObserver::processes):
2766         * UIProcess/WebProcessLifetimeObserver.h:
2767         * UIProcess/WebProcessProxy.cpp:
2768         (WebKit::WebProcessProxy::disconnect):
2769         (WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
2770         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
2771         * UIProcess/WebProcessProxy.h:
2772
2773 2015-01-14  Anders Carlsson  <andersca@apple.com>
2774
2775         Add willOpen and didClose member functions to WebProcessLifetimeObserver
2776         https://bugs.webkit.org/show_bug.cgi?id=140449
2777
2778         Reviewed by Andreas Kling.
2779
2780         * UIProcess/VisitedLinkProvider.cpp:
2781         (WebKit::VisitedLinkProvider::addVisitedLinkHash):
2782         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
2783         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
2784         * UIProcess/VisitedLinkProvider.h:
2785         * UIProcess/WebPageProxy.cpp:
2786         (WebKit::WebPageProxy::WebPageProxy):
2787         (WebKit::WebPageProxy::close):
2788         * UIProcess/WebProcessLifetimeObserver.cpp:
2789         (WebKit::WebProcessLifetimeObserver::addWebPage):
2790         (WebKit::WebProcessLifetimeObserver::removeWebPage):
2791         * UIProcess/WebProcessLifetimeObserver.h:
2792         (WebKit::WebProcessLifetimeObserver::webProcessWillOpenConnection):
2793         (WebKit::WebProcessLifetimeObserver::webProcessDidCloseConnection):
2794
2795 2015-01-14  Dan Bernstein  <mitz@apple.com>
2796
2797         Added availability annotations to some modern Cocoa SPI.
2798
2799         Rubber-stamped by Anders Carlsson.
2800
2801         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2802         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2803
2804 2015-01-14  Hunseop Jeong  <hs85.jeong@samsung.com>
2805
2806         [GTK] Fix build after r178385
2807         https://bugs.webkit.org/show_bug.cgi?id=140429
2808
2809         Reviewed by Csaba Osztrogonác.
2810
2811         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
2812         (_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
2813
2814 2015-01-14  Commit Queue  <commit-queue@webkit.org>
2815
2816         Unreviewed, rolling out r178412.
2817         https://bugs.webkit.org/show_bug.cgi?id=140433
2818
2819         Wrong fix (Requested by KaL on #webkit).
2820
2821         Reverted changeset:
2822
2823         "Unreviewed GTK build fix after r178385."
2824         http://trac.webkit.org/changeset/178412
2825
2826 2015-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2827
2828         [GTK] Do not schedule a redraw for the redirected XComposite window when not in accelerated compositing mode
2829         https://bugs.webkit.org/show_bug.cgi?id=140354
2830
2831         Reviewed by Martin Robinson.
2832
2833         The RedirectedXCompositeWindow uses XDamage to be notified when
2834         the XWindow has been modified. Since the redirected window is
2835         created unconditionally we always receive a XDamage notify when
2836         the window is mapped, and we schedule a redraw in the web view
2837         even when the web view is not in accelerated compositing mode.
2838
2839         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2840         (webkitWebViewBaseRealize): Only call gtk_widget_queue_draw() when
2841         in accelerated compositing mode.
2842
2843 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2844
2845         [GTK] Do not resize the redirected XComposite window when not in accelerated compositing mode
2846         https://bugs.webkit.org/show_bug.cgi?id=140353
2847
2848         Reviewed by Martin Robinson.
2849
2850         We create the redirected XComposite window unconditionally, but
2851         with a size of 1x1 to save memory. However, we are always resizing
2852         it, so in the end we always end up with a XWindow allocated for
2853         the same size of the web view, even for web views that never enter
2854         in accelerated compositing mode.
2855
2856         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2857         (webkitWebViewRenderAcceleratedCompositingResults): Resize the
2858         RedirectedXCompositeWindow to the current web view size to ensure
2859         the sizes match before drawing.
2860         (resizeWebKitWebViewBaseFromAllocation): Only resize the
2861         RedirectedXCompositeWindow when in accelerated compositing mode.
2862         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
2863         (WebKit::RedirectedXCompositeWindow::resize): Return early if the
2864         given size is the current size.
2865
2866 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2867
2868         REGRESSION(r177075): Flickering when the WebView is realized
2869         https://bugs.webkit.org/show_bug.cgi?id=140352
2870
2871         Reviewed by Martin Robinson.
2872
2873         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2874         (webkitWebViewBaseRealize): Pass the parent GdkWindow to the
2875         RedirectedXCompositeWindow constructor.
2876         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
2877         (WebKit::supportsXDamageAndXComposite): Get the display from the
2878         given GdkWindow.
2879         (WebKit::RedirectedXCompositeWindow::create): Receive a GdkWindow
2880         instead of the Display and sise that is always 1x1.
2881         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
2882         Use the passed in GdkWindow to get the Display, Visual and Depth
2883         instead of using the window as parent and reparent afterwards.
2884         * UIProcess/gtk/RedirectedXCompositeWindow.h:
2885
2886 2015-01-14  Gwang Yoon Hwang  <yoon@igalia.com>
2887
2888         Unreviewed GTK build fix after r178385.
2889
2890         WebUserContentControllerProxy is not RefCounted anymore.
2891
2892         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
2893         (_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
2894
2895 2015-01-13  Chris Dumez  <cdumez@apple.com>
2896
2897         Unreviewed GTK build fix after r178375.
2898
2899         uint64_t navigationID -> API::Navigation*.
2900
2901         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2902
2903 2015-01-13  Chris Dumez  <cdumez@apple.com>
2904
2905         Unreviewed GTK build fix after r178375.
2906
2907         WebFrameProxy is now a reference instead of a pointer.
2908
2909         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2910
2911 2015-01-13  Chris Dumez  <cdumez@apple.com>
2912
2913         Unreviewed GTK build fix after r178375.
2914
2915         WebPageProxy is now a reference instead of a pointer.
2916
2917         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2918
2919 2015-01-13  Anders Carlsson  <andersca@apple.com>
2920
2921         Fill in more of WebProcessLifetimeTracker
2922         https://bugs.webkit.org/show_bug.cgi?id=140418
2923
2924         Reviewed by Andreas Kling.
2925
2926         * UIProcess/WebProcessLifetimeObserver.cpp:
2927         (WebKit::WebProcessLifetimeObserver::WebProcessLifetimeObserver):
2928         (WebKit::WebProcessLifetimeObserver::~WebProcessLifetimeObserver):
2929         (WebKit::WebProcessLifetimeObserver::addWebPage):
2930         (WebKit::WebProcessLifetimeObserver::removeWebPage):
2931         * UIProcess/WebProcessLifetimeObserver.h:
2932         * UIProcess/WebProcessLifetimeTracker.cpp:
2933         (WebKit::WebProcessLifetimeTracker::WebProcessLifetimeTracker):
2934         (WebKit::WebProcessLifetimeTracker::addObserver):
2935         (WebKit::WebProcessLifetimeTracker::connectionWillOpen):
2936         (WebKit::WebProcessLifetimeTracker::connectionWillClose):
2937         (WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
2938         (WebKit::WebProcessLifetimeTracker::processIsRunning):
2939         * UIProcess/WebProcessLifetimeTracker.h:
2940
2941 2015-01-13  Chris Dumez  <cdumez@apple.com>
2942
2943         Unreviewed iOS build fix after r178375.
2944
2945         LoaderClient::didLayout() now takes a reference to the WebPageProxy
2946         instead of a pointer.
2947
2948         * UIProcess/ios/WebPageProxyIOS.mm:
2949         (WebKit::WebPageProxy::didCommitLayerTree):
2950
2951 2015-01-13  Sam Weinig  <sam@webkit.org>
2952
2953         Convert WebUserContentControllerProxy to an API::Object bridged to WKUserContentController
2954         https://bugs.webkit.org/show_bug.cgi?id=140414
2955
2956         Reviewed by Dan Bernstein.
2957
2958         * Shared/API/APIObject.h:
2959         Add Type::UserContentController.
2960
2961         * Shared/Cocoa/APIObject.mm:
2962         (API::Object::newObject):
2963         Allocate WebUserContentControllerProxy using [WKUserContentController alloc].
2964
2965         * UIProcess/API/Cocoa/WKUserContentController.mm:
2966         (-[WKUserContentController init]):
2967         (-[WKUserContentController dealloc]):
2968         (-[WKUserContentController _apiObject]):
2969         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
2970         (WebKit::wrapper):
2971         Convert to using API::ObjectStorage for the internal WebUserContentControllerProxy.
2972
2973         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2974         (WebKit::WebUserContentControllerProxy::create): Deleted.
2975         * UIProcess/UserContent/WebUserContentControllerProxy.h:
2976         Convert to inherit from API::ObjectImpl<> and remove create function.
2977
2978 2015-01-13  Anders Carlsson  <andersca@apple.com>
2979
2980         Stub out more of the process lifetime tracker code
2981         https://bugs.webkit.org/show_bug.cgi?id=140411
2982
2983         Reviewed by Sam Weinig.
2984
2985         * UIProcess/WebPageProxy.cpp:
2986         (WebKit::WebPageProxy::close):
2987         (WebKit::WebPageProxy::connectionWillOpen):
2988         (WebKit::WebPageProxy::connectionWillClose):
2989         * UIProcess/WebProcessLifetimeTracker.cpp:
2990         (WebKit::WebProcessLifetimeTracker::connectionWillOpen):
2991         (WebKit::WebProcessLifetimeTracker::connectionWillClose):
2992         (WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
2993         * UIProcess/WebProcessLifetimeTracker.h:
2994
2995 2015-01-13  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2996
2997         [CMake] Unreviewed build fix after r178366.
2998
2999         * CMakeLists.txt: Add new files added by r178366.
3000
3001 2015-01-13  Sam Weinig  <sam@webkit.org>
3002
3003         Move more of the Navigation infrastructure down to WebPageProxy
3004         https://bugs.webkit.org/show_bug.cgi?id=140395
3005
3006         Reviewed by Anders Carlsson.
3007
3008         * UIProcess/API/APILoaderClient.h:
3009         (API::LoaderClient::didStartProvisionalLoadForFrame):
3010         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
3011         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
3012         (API::LoaderClient::didCommitLoadForFrame):
3013         (API::LoaderClient::didFinishDocumentLoadForFrame):
3014         (API::LoaderClient::didFinishLoadForFrame):
3015         (API::LoaderClient::didFailLoadWithErrorForFrame):
3016         (API::LoaderClient::didSameDocumentNavigationForFrame):
3017         (API::LoaderClient::didReceiveTitleForFrame):
3018         (API::LoaderClient::didFirstLayoutForFrame):
3019         (API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
3020         (API::LoaderClient::didRemoveFrameFromHierarchy):
3021         (API::LoaderClient::didDisplayInsecureContentForFrame):
3022         (API::LoaderClient::didRunInsecureContentForFrame):
3023         (API::LoaderClient::didDetectXSSForFrame):
3024         (API::LoaderClient::didLayout):
3025         (API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
3026         (API::LoaderClient::didReceiveAuthenticationChallengeInFrame):
3027         (API::LoaderClient::didStartProgress):
3028         (API::LoaderClient::didChangeProgress):
3029         (API::LoaderClient::didFinishProgress):
3030         (API::LoaderClient::processDidBecomeUnresponsive):
3031         (API::LoaderClient::interactionOccurredWhileProcessUnresponsive):
3032         (API::LoaderClient::processDidBecomeResponsive):
3033         (API::LoaderClient::processDidCrash):
3034         (API::LoaderClient::didChangeBackForwardList):
3035         (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
3036         (API::LoaderClient::willGoToBackForwardListItem):
3037         (API::LoaderClient::pluginLoadPolicy):
3038         (API::LoaderClient::didFailToInitializePlugin):
3039         (API::LoaderClient::didBlockInsecurePluginVersion):
3040         (API::LoaderClient::webGLLoadPolicy):
3041         (API::LoaderClient::resolveWebGLLoadPolicy):
3042         (API::LoaderClient::didDestroyNavigation): Deleted.
3043         * UIProcess/API/C/WKPage.cpp:
3044         (WKPageSetPageLoaderClient):
3045         * UIProcess/Cocoa/NavigationState.h:
3046         * UIProcess/Cocoa/NavigationState.mm:
3047         (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
3048         (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
3049         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
3050         (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
3051         (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
3052         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
3053         (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
3054         (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
3055         (WebKit::NavigationState::LoaderClient::didLayout):
3056         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
3057         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
3058         (WebKit::NavigationState::LoaderClient::processDidCrash):
3059         (WebKit::NavigationState::LoaderClient::didDestroyNavigation): Deleted.
3060         * UIProcess/WebPageProxy.cpp:
3061         (WebKit::WebPageProxy::didChangeBackForwardList):
3062         (WebKit::WebPageProxy::willGoToBackForwardListItem):
3063         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
3064         (WebKit::WebPageProxy::findPlugin):
3065         (WebKit::WebPageProxy::didStartProgress):
3066         (WebKit::WebPageProxy::didChangeProgress):
3067         (WebKit::WebPageProxy::didFinishProgress):
3068         (WebKit::WebPageProxy::didDestroyNavigation):
3069         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3070         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
3071         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
3072         (WebKit::WebPageProxy::didCommitLoadForFrame):
3073         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
3074         (WebKit::WebPageProxy::didFinishLoadForFrame):
3075         (WebKit::WebPageProxy::didFailLoadForFrame):
3076         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3077         (WebKit::WebPageProxy::didReceiveTitleForFrame):
3078         (WebKit::WebPageProxy::didFirstLayoutForFrame):
3079         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
3080         (WebKit::WebPageProxy::didLayout):
3081         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
3082         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
3083         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
3084         (WebKit::WebPageProxy::didDetectXSSForFrame):
3085         (WebKit::WebPageProxy::webGLPolicyForURL):
3086         (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
3087         (WebKit::WebPageProxy::processDidBecomeUnresponsive):
3088         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
3089         (WebKit::WebPageProxy::processDidBecomeResponsive):
3090         (WebKit::WebPageProxy::processDidCrash):
3091         (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
3092         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
3093         (WebKit::WebPageProxy::didFailToInitializePlugin):
3094         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
3095         - Moves conversion from navigationID to API::Navigation into WebPageProxy
3096           from NavigationState.
3097         - Changes API::LoaderClient to pass WebPageProxy and WebFrameProxy by reference
3098           rather than pointer, and to take an API::Navigation instead of a navigationID.
3099
3100         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3101         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
3102         Move access of the navigationID to after calling into the client bundle to avoid
3103         passing a navigationID of a deleted navigation to the UIProcess. This problem was
3104         caught via the WebKit2.StopLoadingDuringDidFailProvisionalLoadTest API test, which
3105         now exercises the Navigation code path. Had that test been written using a Navigation
3106         delegate, the issue would have happened prior to this change.
3107
3108 2015-01-13  Anders Carlsson  <andersca@apple.com>
3109
3110         Begin stubbing out a per page process lifetime tracker object
3111         https://bugs.webkit.org/show_bug.cgi?id=140399
3112
3113         Reviewed by Beth Dakin.
3114
3115         This will make it easier for certain objects that track a set of web page proxy objects
3116         (user content controller, visited link provider, data store) to be notified when their
3117         underlying processes come and go.
3118
3119         * UIProcess/WebPageProxy.h:
3120         * UIProcess/WebProcessLifetimeObserver.cpp: Added.
3121         * UIProcess/WebProcessLifetimeObserver.h: Added.
3122         * UIProcess/WebProcessLifetimeTracker.cpp: Added.
3123         (WebKit::WebProcessLifetimeTracker::WebProcessLifetimeTracker):
3124         (WebKit::WebProcessLifetimeTracker::~WebProcessLifetimeTracker):
3125         (WebKit::WebProcessLifetimeTracker::addObserver):
3126         (WebKit::WebProcessLifetimeTracker::removeObserver):
3127         * UIProcess/WebProcessLifetimeTracker.h: Added.
3128         * WebKit2.xcodeproj/project.pbxproj:
3129
3130 2015-01-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3131
3132         [CMake] Unreviewed build fix after r178309.
3133
3134         * CMakeLists.txt: Rename moved files at r178309.
3135
3136 2015-01-11  Sam Weinig  <sam@webkit.org>
3137
3138         Remove support for SharedWorkers
3139         https://bugs.webkit.org/show_bug.cgi?id=140344
3140
3141         Reviewed by Anders Carlsson.
3142
3143         * Configurations/FeatureDefines.xcconfig:
3144         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3145         (WebKit::NetworkProcessPlatformStrategies::createSharedWorkerStrategy): Deleted.
3146         * NetworkProcess/NetworkProcessPlatformStrategies.h:
3147         * WebKit2Prefix.h:
3148         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3149         (WebKit::WebPlatformStrategies::createSharedWorkerStrategy): Deleted.
3150         (WebKit::WebPlatformStrategies::isAvailable): Deleted.
3151         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3152
3153 2015-01-12  Anders Carlsson  <andersca@apple.com>
3154
3155         Move a couple of API files to UIProcess/API.
3156
3157         Rubber-stamped by Tim Horton.
3158
3159         * UIProcess/API/APINavigationData.cpp: Renamed from Source/WebKit2/UIProcess/APINavigationData.cpp.
3160         * UIProcess/API/APINavigationData.h: Renamed from Source/WebKit2/UIProcess/APINavigationData.h.
3161         * UIProcess/API/APIProcessPoolConfiguration.cpp: Renamed from Source/WebKit2/UIProcess/APIProcessPoolConfiguration.cpp.
3162         * UIProcess/API/APIProcessPoolConfiguration.h: Renamed from Source/WebKit2/UIProcess/APIProcessPoolConfiguration.h.
3163         * UIProcess/API/APISession.cpp: Renamed from Source/WebKit2/UIProcess/APISession.cpp.
3164         * UIProcess/API/APISession.h: Renamed from Source/WebKit2/UIProcess/APISession.h.
3165         * WebKit2.xcodeproj/project.pbxproj:
3166
3167 2015-01-12  Martin Hock  <mhock@apple.com>
3168
3169         [iOS][WK2] Push content bounds on layer tree commit to prevent drawing stale fixed position rects
3170         https://bugs.webkit.org/show_bug.cgi?id=140264
3171         <rdar://problem/18873545>
3172
3173         Reviewed by Benjamin Poulain.
3174
3175         When a resize occurs, we need to push the new content bounds to the web
3176         process or stale fixed position rects may draw incorrectly.
3177
3178         As an example, suppose that WKWebView in UIProcess performs
3179         _frameOrBoundsChanged with new view bounds.
3180         Meanwhile, we'll switch to WebContentProcess and perform layout.
3181         Switching back to UIProcess, _frameOrBoundsChanged calls WKWebView
3182         _updateVisibleContentRects.
3183         _updateVisibleContentRects calls WKContentView didUpdateVisibleRect with
3184         the new bounds.
3185         didUpdateVisibleRects in turn calls WebPageProxyIOS
3186         computeCustomFixedPositionRect.
3187         computeCustomFixedPositionRect asks for the content bounds from
3188         PageClientImplIOS contentsSize which queries WKContentView's bounds
3189         size. But those bounds are stale because the layer tree commit hasn't
3190         occurred yet.
3191
3192         By informing the WKWebView of the updated content size on layer tree
3193         commit, we ensure that the fixed position rects will be drawn correctly.
3194
3195         * UIProcess/ios/WKContentView.mm:
3196         (-[WKContentView _didCommitLayerTree:]): Push new content bounds to the web process.
3197
3198 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
3199
3200         Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
3201         https://bugs.webkit.org/show_bug.cgi?id=136769
3202
3203         Reviewed by Antti Koivisto.
3204
3205         * Configurations/FeatureDefines.xcconfig:
3206
3207 2015-01-12  Zan Dobersek  <zdobersek@igalia.com>
3208
3209         Clean up FrameTree::traverseNext() traversals of main frames
3210         https://bugs.webkit.org/show_bug.cgi?id=140338
3211
3212         Reviewed by Andreas Kling.
3213
3214         There's no reason to pass the main frame as the stayWithin parameter
3215         to FrameTree::traverseNext() when traversing over that same main frame.
3216
3217         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3218         (WebKit::WebContextMenuClient::searchWithSpotlight):
3219
3220 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
3221
3222         Multi-rect TextIndicators are vertically flipped in WebKit1
3223         https://bugs.webkit.org/show_bug.cgi?id=140350
3224         <rdar://problem/19441243>
3225
3226         Reviewed by Beth Dakin.
3227
3228         * Shared/WebCoreArgumentCoders.cpp:
3229         (IPC::ArgumentCoder<TextIndicatorData>::encode):
3230         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3231         Adjust to the field name changes.
3232
3233         * UIProcess/API/mac/WKView.mm:
3234         (-[WKView _setTextIndicator:fadeOut:]):
3235         Convert the textBoundingRect from root view to screen coordinates.
3236
3237         * WebProcess/WebPage/FindController.cpp:
3238         (WebKit::FindController::updateFindIndicator):
3239         (WebKit::FindController::drawRect):
3240         Adjust to the new name, and use contentsToRootView when comparing against
3241         the stored m_findIndicatorRect.
3242
3243 2015-01-11  Ryuan Choi  <ryuan.choi@navercorp.com>
3244
3245         [CoordinatedGraphics] Suspend or resume when visibility is changed
3246         https://bugs.webkit.org/show_bug.cgi?id=140285
3247
3248         Reviewed by Gyuyoung Kim.
3249
3250         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: Copied the logic from TiledCoreAnimationDrawingArea.
3251         (WebKit::CoordinatedDrawingArea::viewStateDidChange):
3252         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
3253
3254 2015-01-10  Gwang Yoon Hwang  <yoon@igalia.com>
3255
3256         [ThreadedCompositor] Prevent excessive rendering call.
3257         https://bugs.webkit.org/show_bug.cgi?id=140297
3258
3259         Reviewed by Žan Doberšek.
3260
3261         Not to waste CPU time on waiting V-Sync interval, the update timer of
3262         compositing thread should be throttled.
3263
3264         In case of updating scene state, this update timer should be called as
3265         soon as possible. However, when CoordinatedGraphicsScene requests update
3266         viewport to advance the animations, this call should be scheduled for
3267         a next frame.
3268
3269         No new tests. No change in functionality.
3270
3271         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3272         (WebKit::CompositingRunLoop::CompositingRunLoop):
3273         (WebKit::CompositingRunLoop::setUpdateTimer):
3274         (WebKit::CompositingRunLoop::updateTimerFired):
3275         (WebKit::ThreadedCompositor::setNeedsDisplay):
3276         (WebKit::ThreadedCompositor::updateViewport):
3277         (WebKit::ThreadedCompositor::scheduleDisplayImmediately):
3278         (WebKit::ThreadedCompositor::didChangeVisibleRect):
3279         (WebKit::ThreadedCompositor::scheduleDisplayIfNeeded): Deleted.
3280         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3281
3282 2015-01-09  Sam Weinig  <sam@webkit.org>
3283
3284         Try to fix the GTK and EFL builds.
3285
3286         * CMakeLists.txt:
3287
3288 2015-01-09  Anders Carlsson  <andersca@apple.com>
3289
3290         Get rid of the database strategy
3291         https://bugs.webkit.org/show_bug.cgi?id=140322
3292
3293         Reviewed by Sam Weinig.
3294
3295         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3296         (WebKit::NetworkProcessPlatformStrategies::createDatabaseStrategy): Deleted.
3297         * NetworkProcess/NetworkProcessPlatformStrategies.h:
3298         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3299         (WebKit::WebPlatformStrategies::createDatabaseStrategy): Deleted.
3300         (WebKit::WebPlatformStrategies::getDatabaseServer): Deleted.
3301         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3302
3303 2015-01-09  Dan Bernstein  <mitz@apple.com>
3304
3305         [Cocoa] Remove deprecated WKRenderingProgressEvents
3306         https://bugs.webkit.org/show_bug.cgi?id=140325
3307
3308         Reviewed by Anders Carlsson.
3309
3310         * Shared/API/Cocoa/WKRenderingProgressEvents.h: Removed.
3311         * WebKit2.xcodeproj/project.pbxproj:
3312         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
3313
3314 2015-01-09  Sam Weinig  <sam@webkit.org>
3315
3316         Move Navigation creation out of the Cocoa layer and down into the WebPageProxy level
3317         https://bugs.webkit.org/show_bug.cgi?id=140319
3318
3319         Reviewed by Anders Carlsson.
3320
3321         - Adds WebNavigationState, a class at the WebPageProxy level to handle the creation
3322           and storage of Navigations. Starts moving some of the functionality from NavigationState
3323           there.
3324
3325         * UIProcess/API/APINavigation.cpp:
3326         (API::Navigation::Navigation):
3327         * UIProcess/API/APINavigation.h:
3328         (API::Navigation::create):
3329         (API::Navigation::navigationID):
3330         Have each Navigation store its navigationID and generate it via the WebNavigationState
3331         that is passed to the constructor.
3332         
3333         * UIProcess/API/Cocoa/WKWebView.mm:
3334         (-[WKWebView loadRequest:]):
3335         (-[WKWebView loadFileURL:allowingReadAccessToURL:]):
3336         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
3337         (-[WKWebView goToBackForwardListItem:]):
3338         (-[WKWebView goBack]):
3339         (-[WKWebView goForward]):
3340         (-[WKWebView reload]):
3341         (-[WKWebView reloadFromOrigin]):
3342         (-[WKWebView _restoreFromSessionStateData:]):
3343         (-[WKWebView _restoreSessionState:andNavigate:]):
3344         Update for WebPageProxy functions returning the Navigations directly, rather than
3345         the navigationID.
3346
3347         * UIProcess/Cocoa/NavigationState.h:
3348         * UIProcess/Cocoa/NavigationState.mm:
3349         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
3350         Remove creation of the load request navigation which is now handled by the WebPageProxy.
3351
3352         (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
3353         (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
3354         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
3355         (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
3356         (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
3357         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
3358         (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
3359         (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
3360         (WebKit::NavigationState::LoaderClient::didDestroyNavigation):
3361         (WebKit::NavigationState::LoaderClient::processDidCrash):
3362         Change to get/take/remove Navigations from the WebPageProxy's WebNavigationState
3363
3364         (WebKit::NavigationState::createLoadRequestNavigation): Deleted.
3365         (WebKit::NavigationState::createBackForwardNavigation): Deleted.
3366         (WebKit::NavigationState::createReloadNavigation): Deleted.
3367         (WebKit::NavigationState::createLoadDataNavigation): Deleted.
3368         Move Navigation creation to WebNavigationState.
3369
3370         * UIProcess/WebFrameListenerProxy.cpp:
3371         (WebKit::WebFrameListenerProxy::WebFrameListenerProxy):
3372         (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
3373         * UIProcess/WebFrameListenerProxy.h:
3374         (WebKit::WebFrameListenerProxy::navigation):
3375         (WebKit::WebFrameListenerProxy::setNavigation):
3376         (WebKit::WebFrameListenerProxy::navigationID): Deleted.
3377         (WebKit::WebFrameListenerProxy::setNavigationID): Deleted.
3378         * UIProcess/WebFrameProxy.cpp:
3379         (WebKit::WebFrameProxy::receivedPolicyDecision):
3380         * UIProcess/WebFrameProxy.h:
3381         Store a Navigation rather than a navigationID on the WebFrameListenerProxy.
3382
3383         * UIProcess/WebNavigationState.cpp: Added.
3384         (WebKit::WebNavigationState::WebNavigationState):
3385         (WebKit::WebNavigationState::~WebNavigationState):
3386         (WebKit::WebNavigationState::createLoadRequestNavigation):
3387         (WebKit::WebNavigationState::createBackForwardNavigation):
3388         (WebKit::WebNavigationState::createReloadNavigation):
3389         (WebKit::WebNavigationState::createLoadDataNavigation):
3390         (WebKit::WebNavigationState::navigation):
3391         (WebKit::WebNavigationState::takeNavigation):
3392         (WebKit::WebNavigationState::didDestroyNavigation):
3393         (WebKit::WebNavigationState::clearAllNavigations):
3394         * UIProcess/WebNavigationState.h: Added.
3395         (WebKit::WebNavigationState::generateNavigationID):
3396         New class to manage navigations.
3397
3398         * UIProcess/WebPageProxy.cpp:
3399         (WebKit::WebPageProxy::WebPageProxy):
3400         (WebKit::WebPageProxy::reattachToWebProcessForReload):
3401         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3402         (WebKit::WebPageProxy::loadRequest):
3403         (WebKit::WebPageProxy::loadFile):
3404         (WebKit::WebPageProxy::loadData):
3405         (WebKit::WebPageProxy::loadHTMLString):
3406         (WebKit::WebPageProxy::reload):
3407         (WebKit::WebPageProxy::goForward):
3408         (WebKit::WebPageProxy::goBack):
3409         (WebKit::WebPageProxy::goToBackForwardItem):
3410         (WebKit::WebPageProxy::receivedPolicyDecision):
3411         (WebKit::WebPageProxy::restoreFromSessionState):
3412         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3413         (WebKit::WebPageProxy::generateNavigationID): Deleted.
3414         Create navigations directly rather than generating a navigation ID and letting
3415         the API level create Navigation.
3416
3417         * UIProcess/WebPageProxy.h:
3418         (WebKit::WebPageProxy::navigationState):
3419         Add WebNavigationState member and accessor.
3420
3421         * WebKit2.xcodeproj/project.pbxproj:
3422         Add WebNavigationState.h/cpp
3423
3424 2015-01-09  Daniel Bates  <dabates@apple.com>
3425
3426         [iOS] Make DumpRenderTree build with public SDK
3427         https://bugs.webkit.org/show_bug.cgi?id=140311
3428
3429         Reviewed by Sam Weinig.
3430
3431         Add more SPI declarations.
3432
3433         * Platform/spi/ios/UIKitSPI.h:
3434
3435 2015-01-09  Joseph Pecoraro  <pecoraro@apple.com>
3436
3437         Web Inspector: Remove or use TimelineAgent Resource related event types
3438         https://bugs.webkit.org/show_bug.cgi?id=140155
3439
3440         Reviewed by Timothy Hatcher.
3441
3442         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3443         (WebKit::WebResourceLoadScheduler::scheduleLoad):
3444
3445 2015-01-09  Daniel Bates  <dabates@apple.com>
3446
3447         [iOS] Fix the WebKit2 build with the public SDK
3448
3449         Forward declare class WebView.
3450
3451         * Platform/spi/ios/UIKitSPI.h:
3452
3453 2015-01-09  Sam Weinig  <sam@webkit.org>
3454
3455         Make WKNavigation bridged to API::Navigation (Take 2)
3456         https://bugs.webkit.org/show_bug.cgi?id=140272
3457
3458         Reviewed by Dan Bernstein.
3459
3460         * Shared/API/APIObject.h:
3461         Add Navigation.
3462
3463         * Shared/Cocoa/APIObject.mm:
3464         (API::Object::newObject):
3465         Bridge to WKNavigation.
3466
3467         * UIProcess/API/APINavigation.cpp: Added.
3468         (API::Navigation::Navigation):
3469         (API::Navigation::~Navigation):
3470         * UIProcess/API/APINavigation.h: Added.
3471         (API::Navigation::create):
3472         (API::Navigation::request):
3473         Add initial implementation.
3474
3475         * UIProcess/API/Cocoa/WKNavigation.mm:
3476         (-[WKNavigation dealloc]):
3477         (-[WKNavigation _request]):
3478         (-[WKNavigation _apiObject]):
3479         * UIProcess/API/Cocoa/WKNavigationInternal.h:
3480         (API::wrapper):
3481         Implement bridging to API::Navigation and get the request from the underlying object.
3482
3483         * UIProcess/API/Cocoa/WKWebView.mm: