Too large plugins are crashing.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-12-30  Gabor Rapcsanyi  <rgabor@webkit.org>
2
3         Too large plugins are crashing.
4         https://bugs.webkit.org/show_bug.cgi?id=139856
5
6         Reviewed by Darin Adler.
7
8         * WebProcess/Plugins/PluginProxy.cpp:
9         (WebKit::PluginProxy::updateBackingStore): Return false if backingStore cannot be allocated.
10
11 2014-12-30  Anders Carlsson  <andersca@apple.com>
12
13         Transient local storage namespaces need to ref their storage areas
14         https://bugs.webkit.org/show_bug.cgi?id=140006
15         <rdar://problem/19225389>
16
17         Reviewed by Sam Weinig.
18
19         We need to keep transient storage areas around even if they have no active connections,
20         so use a RefPtr instead of a raw pointer. This matches what we do for session storage namespaces.
21
22         * UIProcess/Storage/StorageManager.cpp:
23
24 2014-12-29  Anders Carlsson  <andersca@apple.com>
25
26         Remove unneeded StorageNamespace functions
27         https://bugs.webkit.org/show_bug.cgi?id=139997
28
29         Reviewed by Sam Weinig.
30
31         * WebProcess/Storage/StorageNamespaceImpl.cpp:
32         (WebKit::StorageNamespaceImpl::close): Deleted.
33         (WebKit::StorageNamespaceImpl::clearOriginForDeletion): Deleted.
34         (WebKit::StorageNamespaceImpl::clearAllOriginsForDeletion): Deleted.
35         (WebKit::StorageNamespaceImpl::sync): Deleted.
36         (WebKit::StorageNamespaceImpl::closeIdleLocalStorageDatabases): Deleted.
37         * WebProcess/Storage/StorageNamespaceImpl.h:
38
39 2014-12-29  Anders Carlsson  <andersca@apple.com>
40
41         Move storage code from WebCore to WebKit
42         https://bugs.webkit.org/show_bug.cgi?id=139558
43
44         Reviewed by Darin Adler.
45
46         * WebProcess/WebProcess.cpp:
47
48 2014-12-29  Dan Bernstein  <mitz@apple.com>
49
50         Fixed the iOS build.
51
52         * WebProcess/WebPage/ios/WebPageIOS.mm:
53
54 2014-12-29  Anders Carlsson  <andersca@apple.com>
55
56         Another iOS build fix.
57
58         * WebProcess/WebPage/ios/WebPageIOS.mm:
59         (WebKit::WebPage::elementDidFocus):
60
61 2014-12-29  Anders Carlsson  <andersca@apple.com>
62
63         Turn on transient local storage support again
64         https://bugs.webkit.org/show_bug.cgi?id=139995
65
66         Reviewed by Sam Weinig.
67
68         Using transient local storage caused weird crashes in the UI process so that change had to
69         be backed out - let's turn it on and see if it still happens.
70
71         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
72         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
73
74 2014-12-29  Anders Carlsson  <andersca@apple.com>
75
76         Remove more old coder code gunk.
77
78         Rubber-stamped by Sam Weinig.
79
80         * Scripts/webkit/messages.py:
81         (argument_coder_headers_for_type):
82         (handler_function): Deleted.
83
84 2014-12-29  Anders Carlsson  <andersca@apple.com>
85
86         Try to fix the iOS build.
87
88         * UIProcess/ios/WebPageProxyIOS.mm:
89         (WebKit::WebPageProxy::startAssistingNode):
90         * WebProcess/WebPage/ios/WebPageIOS.mm:
91         (WebKit::WebPage::elementDidFocus):
92
93 2014-12-29  Csaba Osztrogonác  <ossy@webkit.org>
94
95         URTBF after r177805.
96
97         * CMakeLists.txt:
98
99 2014-12-29  Anders Carlsson  <andersca@apple.com>
100
101         Remove the old user message coder code
102         https://bugs.webkit.org/show_bug.cgi?id=139994
103
104         Reviewed by Sam Weinig.
105
106         * Platform/IPC/HandleMessage.h:
107         (IPC::callMemberFunctionImpl): Deleted.
108         (IPC::callMemberFunction): Deleted.
109         (IPC::handleMessageVariadic): Deleted.
110         * Scripts/webkit/messages.py:
111         (decode_type):
112         (async_message_statement):
113         (sync_message_statement):
114         * Shared/UserMessageCoders.h: Removed.
115         * Shared/mac/ObjCObjectGraphCoders.h: Removed.
116         * Shared/mac/ObjCObjectGraphCoders.mm: Removed.
117         * UIProcess/WebConnectionToWebProcess.cpp:
118         * UIProcess/WebContextUserMessageCoders.h: Removed.
119         * UIProcess/WebPageProxy.cpp:
120         * UIProcess/WebProcessPool.cpp:
121         * WebKit2.xcodeproj/project.pbxproj:
122         * WebProcess/InjectedBundle/InjectedBundle.cpp:
123         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: Removed.
124         * WebProcess/WebConnectionToUIProcess.cpp:
125         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
126         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
127         * WebProcess/WebPage/WebContextMenu.cpp:
128         * WebProcess/WebPage/WebPage.cpp:
129         * WebProcess/WebPage/mac/WebPageMac.mm:
130         * WebProcess/WebProcess.cpp:
131
132 2014-12-29  Sam Weinig  <sam@webkit.org>
133
134         Move WebPasteboardProxy from Shared to UIProcess, where it should have been all along
135         Rubber-stamped by Anders Carlsson.
136
137         * Shared/WebPasteboardProxy.cpp: Removed.
138         * Shared/WebPasteboardProxy.h: Removed.
139         * Shared/WebPasteboardProxy.messages.in: Removed.
140         * UIProcess/WebPasteboardProxy.cpp: Copied from Shared/WebPasteboardProxy.cpp.
141         * UIProcess/WebPasteboardProxy.h: Copied from Shared/WebPasteboardProxy.h.
142         * UIProcess/WebPasteboardProxy.messages.in: Copied from Shared/WebPasteboardProxy.messages.in.
143         * WebKit2.xcodeproj/project.pbxproj:
144
145 2014-12-29  Sam Weinig  <sam@webkit.org>
146
147         Try to fix the iOS build.
148
149         * Shared/WebPasteboardProxy.h:
150
151 2014-12-29  Anders Carlsson  <andersca@apple.com>
152
153         Convert injected bundle message posting to UserData
154         https://bugs.webkit.org/show_bug.cgi?id=139993
155
156         Reviewed by Sam Weinig.
157
158         * UIProcess/WebProcessPool.cpp:
159         (WebKit::WebProcessPool::createNewWebProcess):
160         (WebKit::WebProcessPool::postMessageToInjectedBundle):
161         * WebProcess/WebProcess.cpp:
162         (WebKit::WebProcess::handleInjectedBundleMessage):
163         (WebKit::WebProcess::postInjectedBundleMessage): Deleted.
164         * WebProcess/WebProcess.h:
165         * WebProcess/WebProcess.messages.in:
166
167 2014-12-29  Sam Weinig  <sam@webkit.org>
168
169         Try to fix the iOS build.
170
171         * Shared/WebPasteboardProxy.h:
172
173 2014-12-29  Csaba Osztrogonác  <ossy@webkit.org>
174
175         One more speculative buildfix after r177794.
176
177         * CMakeLists.txt:
178
179 2014-12-29  Sam Weinig  <sam@webkit.org>
180
181         Try to fix the iOS build.
182
183         * Shared/WebPasteboardProxy.h:
184
185 2014-12-29  Csaba Osztrogonác  <ossy@webkit.org>
186
187         Speculative buildfix after r177793.
188
189         * WebProcess/soup/WebProcessSoup.cpp:
190         (WebKit::WebProcess::platformInitializeWebProcess):
191
192 2014-12-29  Csaba Osztrogonác  <ossy@webkit.org>
193
194         Speculative buildfix after r177794.
195
196         * CMakeLists.txt:
197
198 2014-12-29  Sam Weinig  <sam@webkit.org>
199
200         Removes some unnecessary use of LegacyReceiver
201         https://bugs.webkit.org/show_bug.cgi?id=139992
202
203         Reviewed by Anders Carlsson.
204
205         * Shared/WebConnection.cpp:
206         (WebKit::WebConnection::didReceiveMessage): Deleted.
207         * Shared/WebConnection.h:
208         * Shared/WebConnection.messages.in:
209         * UIProcess/WebProcessPool.cpp:
210         (WebKit::WebProcessPool::didReceiveMessage): Deleted.
211         (WebKit::WebProcessPool::didReceiveSyncMessage): Deleted.
212         * UIProcess/WebProcessPool.h:
213         * UIProcess/WebProcessPool.messages.in:
214         Remove unnecessary use of LegacyReceiver.
215
216         * UIProcess/WebPageProxy.h:
217         Remove declarations for functions that don't exist.
218
219 2014-12-29  Anders Carlsson  <andersca@apple.com>
220
221         Convert all variadic web process messages to UserData
222         https://bugs.webkit.org/show_bug.cgi?id=139991
223
224         Reviewed by Sam Weinig.
225
226         * UIProcess/WebPageProxy.cpp:
227         (WebKit::WebPageProxy::loadRequest):
228         (WebKit::WebPageProxy::loadFile):
229         (WebKit::WebPageProxy::loadData):
230         (WebKit::WebPageProxy::loadHTMLString):
231         (WebKit::WebPageProxy::loadAlternateHTMLString):
232         (WebKit::WebPageProxy::loadPlainTextString):
233         (WebKit::WebPageProxy::loadWebArchiveData):
234         (WebKit::WebPageProxy::postMessageToInjectedBundle):
235         * WebProcess/WebPage/WebPage.cpp:
236         (WebKit::WebPage::loadRequest):
237         (WebKit::WebPage::loadDataImpl):
238         (WebKit::WebPage::loadString):
239         (WebKit::WebPage::loadData):
240         (WebKit::WebPage::loadHTMLString):
241         (WebKit::WebPage::loadAlternateHTMLString):
242         (WebKit::WebPage::loadPlainTextString):
243         (WebKit::WebPage::loadWebArchiveData):
244         (WebKit::WebPage::postInjectedBundleMessage):
245         * WebProcess/WebPage/WebPage.h:
246         * WebProcess/WebPage/WebPage.messages.in:
247
248 2014-12-29  Anders Carlsson  <andersca@apple.com>
249
250         Convert all variadic WebProcessProxy message over to UserData
251         https://bugs.webkit.org/show_bug.cgi?id=139990
252
253         Reviewed by Sam Weinig.
254
255         * UIProcess/WebPageProxy.cpp:
256         (WebKit::WebPageProxy::willGoToBackForwardListItem):
257         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
258         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
259         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
260         (WebKit::WebPageProxy::didCommitLoadForFrame):
261         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
262         (WebKit::WebPageProxy::didFinishLoadForFrame):
263         (WebKit::WebPageProxy::didFailLoadForFrame):
264         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
265         (WebKit::WebPageProxy::didReceiveTitleForFrame):
266         (WebKit::WebPageProxy::didFirstLayoutForFrame):
267         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
268         (WebKit::WebPageProxy::didLayout):
269         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
270         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
271         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
272         (WebKit::WebPageProxy::didDetectXSSForFrame):
273         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
274         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
275         (WebKit::WebPageProxy::decidePolicyForResponse):
276         (WebKit::WebPageProxy::decidePolicyForResponseSync):
277         (WebKit::WebPageProxy::unableToImplementPolicy):
278         (WebKit::WebPageProxy::willSubmitForm):
279         (WebKit::WebPageProxy::mouseDidMoveOverElement):
280         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress):
281         (WebKit::WebPageProxy::didRecognizeLongMousePress):
282         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress):
283         (WebKit::WebPageProxy::showContextMenu):
284         (WebKit::WebPageProxy::internalShowContextMenu):
285         (WebKit::WebPageProxy::didPerformActionMenuHitTest):
286         * UIProcess/WebPageProxy.h:
287         * UIProcess/WebPageProxy.messages.in:
288         * UIProcess/mac/WebPageProxyMac.mm:
289         (WebKit::WebPageProxy::showSelectionServiceMenu):
290         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
291         (WebKit::WebChromeClient::mouseDidMoveOverElement):
292         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
293         (WebKit::WebChromeClient::didRecognizeLongMousePress):
294         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress):
295         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
296         (WebKit::WebFrameLoaderClient::detachedFromParent2):
297         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
298         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
299         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
300         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
301         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
302         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
303         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
304         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
305         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
306         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
307         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
308         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
309         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
310         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
311         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
312         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
313         (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
314         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
315         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
316         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
317         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
318         (WebKit::WebFrameLoaderClient::didDetectXSS):
319         * WebProcess/WebPage/WebContextMenu.cpp:
320         (WebKit::WebContextMenu::show):
321         * WebProcess/WebPage/mac/WebPageMac.mm:
322         (WebKit::WebPage::performActionMenuHitTestAtLocation):
323
324 2014-12-29  Sam Weinig  <sam@webkit.org>
325
326         Move Pasteboard code out of WebProcessPool and into its own singleton class
327         https://bugs.webkit.org/show_bug.cgi?id=139987
328
329         Reviewed by Anders Carlsson.
330
331         * DerivedSources.make:
332         * Shared/WebPasteboardProxy.cpp: Added.
333         (WebKit::WebPasteboardProxy::shared):
334         (WebKit::WebPasteboardProxy::WebPasteboardProxy):
335         (WebKit::WebPasteboardProxy::addWebProcessProxy):
336         * Shared/WebPasteboardProxy.h: Added.
337         * Shared/WebPasteboardProxy.messages.in: Added.
338         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: Added.
339         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
340         * UIProcess/WebProcessPool.cpp:
341         (WebKit::WebProcessPool::didReceiveSyncMessage):
342         (WebKit::WebProcessPool::dummy): Deleted.
343         * UIProcess/WebProcessPool.h:
344         * UIProcess/WebProcessPool.messages.in:
345         * UIProcess/WebProcessProxy.cpp:
346         (WebKit::WebProcessProxy::WebProcessProxy):
347         * WebKit2.xcodeproj/project.pbxproj:
348         * WebProcess/Plugins/PDF/PDFPlugin.mm:
349         (WebKit::PDFPlugin::writeItemsToPasteboard):
350         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
351
352 2014-12-29  Anders Carlsson  <andersca@apple.com>
353
354         Use UserData for bundle initialization data
355         https://bugs.webkit.org/show_bug.cgi?id=139989
356
357         Reviewed by Sam Weinig.
358
359         * Shared/WebProcessCreationParameters.cpp:
360         (WebKit::WebProcessCreationParameters::~WebProcessCreationParameters):
361         (WebKit::WebProcessCreationParameters::encode):
362         (WebKit::WebProcessCreationParameters::decode):
363         * Shared/WebProcessCreationParameters.h:
364         * UIProcess/WebProcessPool.cpp:
365         (WebKit::WebProcessPool::createNewWebProcess):
366         * WebProcess/WebProcess.cpp:
367         (WebKit::WebProcess::initializeWebProcess):
368         * WebProcess/WebProcess.h:
369         * WebProcess/WebProcess.messages.in:
370         * WebProcess/cocoa/WebProcessCocoa.mm:
371         (WebKit::WebProcess::platformInitializeWebProcess):
372
373 2014-12-28  Anders Carlsson  <andersca@apple.com>
374
375         Use UserData when sending messages to the process pool
376         https://bugs.webkit.org/show_bug.cgi?id=139978
377
378         Reviewed by Sam Weinig.
379
380         * Scripts/webkit/messages.py:
381         (generate_message_handler):
382         Include the connection parameter for legacy receivers as well.
383
384         * Shared/CoreIPCSupport/WebContextMessageKinds.h:
385         Remove this, it's no longer needed.
386
387         * UIProcess/WebProcessPool.cpp:
388         (WebKit::WebProcessPool::didReceiveMessage):
389         No need to special case the postMessage message.
390
391         (WebKit::WebProcessPool::didReceiveSyncMessage):
392         No need to special case the postSynchronousMessageMessage message.
393
394         (WebKit::WebProcessPool::handleMessage):
395         Convert handles to objects and call didReceiveMessageFromInjectedBundle.
396
397         (WebKit::WebProcessPool::handleSynchronousMessage):
398         Convert handles to objects, call didReceiveSynchronousMessageFromInjectedBundle, and then
399         convert objects back to handles in the reply.
400
401         (WebKit::WebProcessPool::didReceiveMessageFromInjectedBundle): Deleted.
402         (WebKit::WebProcessPool::didReceiveSynchronousMessageFromInjectedBundle): Deleted.
403         (WebKit::WebProcessPool::dummy): Deleted.
404         * UIProcess/WebProcessPool.h:
405         Add handleMessage and handleSynchronousMessage message handlers.
406
407         * UIProcess/WebProcessPool.messages.in:
408         Add new messages.
409
410         * WebKit2.xcodeproj/project.pbxproj:
411         Remove a now unused file.
412
413         * WebProcess/InjectedBundle/InjectedBundle.cpp:
414         (WebKit::InjectedBundle::postMessage):
415         Convert objects to handles in the message body and then send the HandleMessage to the UI process.
416
417         (WebKit::InjectedBundle::postSynchronousMessage):
418         Convert objects to handles in the message body, send the HandleSynchronousMessage message to the UI process,
419         and then convert handles back to objects in the reply.
420
421 2014-12-28  Anders Carlsson  <andersca@apple.com>
422
423         Transform nested objects inside arrays
424         https://bugs.webkit.org/show_bug.cgi?id=139976
425
426         Reviewed by Oliver Hunt.
427
428         Call transformGraph on each element so that we'll transform other nested objects correctly.
429
430         * Shared/UserData.cpp:
431         (WebKit::transformGraph):
432
433 2014-12-27  Dan Bernstein  <mitz@apple.com>
434
435         iOS build fix after r177765.
436
437         * Shared/mac/ObjCObjectGraph.mm:
438         (WebKit::ObjCObjectGraph::encode):
439
440 2014-12-27  Anders Carlsson  <andersca@apple.com>
441
442         Switch WebConnection over to sending objects with UserData
443         https://bugs.webkit.org/show_bug.cgi?id=139967
444
445         Reviewed by Oliver Hunt.
446
447         * Shared/WebConnection.cpp:
448         (WebKit::WebConnection::postMessage):
449         No need to construct the message manually anymore.
450
451         (WebKit::WebConnection::handleMessage):
452         No need to decode the message manually, just get the object from the UserData message body,
453         convert any handles to objects, and dispatch the message.
454
455         * Shared/WebConnection.h:
456         Remove now unused members.
457
458         * Shared/WebConnection.messages.in:
459         Give HandleMessage a proper signature.
460
461         * UIProcess/WebConnectionToWebProcess.cpp:
462         (WebKit::WebConnectionToWebProcess::transformHandlesToObjects):
463         (WebKit::WebConnectionToWebProcess::transformObjectsToHandles):
464         Call the WebProcessProxy version.
465
466         (WebKit::WebConnectionToWebProcess::encodeMessageBody): Deleted.
467         (WebKit::WebConnectionToWebProcess::decodeMessageBody): Deleted.
468
469         * UIProcess/WebConnectionToWebProcess.h:
470         * WebProcess/WebConnectionToUIProcess.cpp:
471         (WebKit::WebConnectionToUIProcess::encodeMessageBody): Deleted.
472         (WebKit::WebConnectionToUIProcess::decodeMessageBody): Deleted.
473         * WebProcess/WebConnectionToUIProcess.h:
474         Delete more unused members.
475
476 2014-12-27  Anders Carlsson  <andersca@apple.com>
477
478         Encode and decode WKTypeRefWrapper objects
479         https://bugs.webkit.org/show_bug.cgi?id=139966
480
481         Reviewed by Oliver Hunt.
482
483         * Shared/UserData.cpp:
484         (WebKit::UserData::encode):
485         * Shared/UserData.h:
486         * Shared/mac/ObjCObjectGraph.mm:
487         (WebKit::typeFromObject):
488         (WebKit::ObjCObjectGraph::encode):
489         (WebKit::ObjCObjectGraph::decode):
490
491 2014-12-27  Anders Carlsson  <andersca@apple.com>
492
493         Implement encoding and decoding of ObjCObjectGraph objects
494         https://bugs.webkit.org/show_bug.cgi?id=139965
495
496         Reviewed by Oliver Hunt.
497
498         * Shared/UserData.cpp:
499         (WebKit::UserData::encode):
500         (WebKit::UserData::decode):
501         * Shared/mac/ObjCObjectGraph.h:
502         * Shared/mac/ObjCObjectGraph.mm:
503         (WebKit::typeFromObject):
504         (WebKit::ObjCObjectGraph::encode):
505         (WebKit::ObjCObjectGraph::decode):
506
507 2014-12-27  Dan Bernstein  <mitz@apple.com>
508
509         [Cocoa] WKWebProcessPlugInLoadDelegate uses the deprecated WKRenderingProgressEvents enum
510         https://bugs.webkit.org/show_bug.cgi?id=139964
511
512         Reviewed by Anders Carlsson.
513
514         * Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Removed.
515
516         * Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added. Moved the enum definition from
517         WKWebViewPrivate.h to here.
518
519         * Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h: Added.
520         (renderingProgressEvents): Moved from NavigationState.mm to here.
521
522         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Removed observedRenderingProgressEvents
523         property declaration.
524         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
525         (layoutMilestones): Deleted.
526         (-[WKBrowsingContextController setObservedRenderingProgressEvents:]): Deleted. This is not
527         needed for binary compatibility.
528         (didLayout): Deleted.
529         (setUpPageLoaderClient): Removed setting up didLayout callback.
530         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h: Removed unused delegate method.
531
532         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Import definition of _WKRenderingProgressEvents
533         from new header.
534
535         * UIProcess/Cocoa/NavigationState.mm:
536         (WebKit::renderingProgressEvents): Moved into its own header.
537
538         * WebKit2.xcodeproj/project.pbxproj: Updated for file additions and removeals, and moved
539         WKRenderingProgressEvents.h into a new Deprecated group.
540
541         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Changed the type of
542         a delegate method parameter to _WKRenderingProgressEvents.
543         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
544         (didLayout): Pass the new type.
545
546 2014-12-26  Conrad Shultz  <conrad_shultz@apple.com>
547
548         Safari build crashes when "zooming into"/choosing a tab from tab view
549         https://bugs.webkit.org/show_bug.cgi?id=139934
550
551         Reviewed by Dan Bernstein.
552
553         * UIProcess/API/mac/WKView.mm:
554         (-[WKView _setIgnoresNonWheelEvents:]):
555         Trying to add a nil gesture recognizer raises an exception. Stop assuming that a
556         gesture recognizer is non-nil.
557
558 2014-12-26  Anders Carlsson  <andersca@apple.com>
559
560         Handle more types in the UserData encode/decode functions
561         https://bugs.webkit.org/show_bug.cgi?id=139959
562
563         Reviewed by Dan Bernstein.
564
565         * Shared/UserData.cpp:
566         (WebKit::UserData::encode):
567         (WebKit::UserData::decode):
568
569 2014-12-26  Anders Carlsson  <andersca@apple.com>
570
571         Move handle encoding functions to their respective implementation files
572         https://bugs.webkit.org/show_bug.cgi?id=139957
573
574         Reviewed by Dan Bernstein.
575
576         * Shared/API/APIFrameHandle.cpp:
577         (API::FrameHandle::encode):
578         (API::FrameHandle::decode):
579         * Shared/API/APIFrameHandle.h:
580         * Shared/API/APIPageGroupHandle.cpp:
581         (API::PageGroupHandle::PageGroupHandle):
582         (API::PageGroupHandle::encode):
583         (API::PageGroupHandle::decode):
584         * Shared/API/APIPageGroupHandle.h:
585         * Shared/API/APIPageHandle.cpp:
586         (API::PageHandle::encode):
587         (API::PageHandle::decode):
588         * Shared/API/APIPageHandle.h:
589         * Shared/UserData.cpp:
590         (WebKit::UserData::encode):
591         (WebKit::UserData::decode):
592
593 2014-12-26  Anders Carlsson  <andersca@apple.com>
594
595         Add the notion of auto-converting page and frame handles
596         https://bugs.webkit.org/show_bug.cgi?id=139954
597
598         Reviewed by Dan Bernstein.
599
600         This makes it possible to tell the difference between page and frame handles that
601         should be converted to their respective UI or web process object representations
602         and handles that should stay the same (for the modern API for example).
603         
604         * Shared/API/APIFrameHandle.cpp:
605         (API::FrameHandle::create):
606         (API::FrameHandle::createAutoconverting):
607         (API::FrameHandle::FrameHandle):
608         * Shared/API/APIFrameHandle.h:
609         (API::FrameHandle::isAutoconverting):
610         * Shared/API/APIPageHandle.cpp:
611         (API::PageHandle::create):
612         (API::PageHandle::createAutoconverting):
613         (API::PageHandle::PageHandle):
614         * Shared/API/APIPageHandle.h:
615         (API::PageHandle::isAutoconverting):
616         * Shared/API/Cocoa/_WKFrameHandle.mm:
617         (-[_WKFrameHandle initWithCoder:]):
618         * Shared/UserData.cpp:
619         (WebKit::shouldTransform):
620         * Shared/UserData.h:
621         * UIProcess/Cocoa/UIDelegate.mm:
622         (WebKit::UIDelegate::UIClient::printFrame):
623         * UIProcess/WebProcessProxy.cpp:
624         (WebKit::WebProcessProxy::transformHandlesToObjects):
625         (WebKit::WebProcessProxy::transformObjectsToHandles):
626         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
627         (-[WKWebProcessPlugInFrame handle]):
628         * WebProcess/WebProcess.cpp:
629         (WebKit::WebProcess::transformHandlesToObjects):
630         (WebKit::WebProcess::transformObjectsToHandles):
631
632 2014-12-26  Dan Bernstein  <mitz@apple.com>
633
634         [Cocoa] Some modern SPI changes have missing or incorrect availability annotations
635         https://bugs.webkit.org/show_bug.cgi?id=139940
636
637         Reviewed by Darin Adler.
638
639         * Shared/API/c/WKDeclarationSpecifiers.h: Renamed WK_DEPRECATED to WK_C_DEPRECATED.
640
641         * Shared/API/Cocoa/WKFoundation.h: Define WK_DEPRECATED when API availability is not enabled
642         to mean that the declaration is currently deprecated.
643
644         * Shared/API/c/WKConnectionRef.h: Updated for the renaming of the existing WK_DEPRECATED to
645         WK_C_DEPRECATED.
646         * UIProcess/API/C/WKContext.h: Ditto.
647         * UIProcess/API/C/WKContextConnectionClient.h: Ditto.
648         * UIProcess/API/C/WKContextDownloadClient.h: Ditto.
649         * UIProcess/API/C/WKContextHistoryClient.h: Ditto.
650         * UIProcess/API/C/WKContextInjectedBundleClient.h: Ditto.
651         * UIProcess/API/C/WKCookieManager.h: Ditto.
652         * UIProcess/API/C/WKDatabaseManager.h: Ditto.
653         * UIProcess/API/C/WKGeolocationManager.h: Ditto.
654         * UIProcess/API/C/WKIconDatabase.h: Ditto.
655         * UIProcess/API/C/WKNotificationProvider.h: Ditto.
656         * UIProcess/API/C/WKPageContextMenuClient.h: Ditto.
657         * UIProcess/API/C/WKPageFindClient.h: Ditto.
658         * UIProcess/API/C/WKPageFindMatchesClient.h: Ditto.
659         * UIProcess/API/C/WKPageFormClient.h: Ditto.
660         * UIProcess/API/C/WKPageUIClient.h: Ditto.
661         * WebProcess/InjectedBundle/API/c/WKBundle.h: Ditto.
662         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Ditto.
663         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h: Ditto.
664         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Ditto.
665         * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h: Ditto.
666         * WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h: Ditto.
667         * WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h: Ditto.
668         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h: Ditto.
669         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: Ditto.
670         * WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h: Ditto.
671         * WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h: Ditto.
672         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h: Ditto.
673
674         * Shared/API/Cocoa/WKRenderingProgressEvents.h: Added missing availability annotation.
675
676         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Changed to use WK_MAC_TBA and WK_IOS_TBA for
677         _WKDebugOverlayRegions enum. Added availability annotations to new properties.
678
679         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Added availability annotation to new method.
680
681         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Annotated new method, changed Mac
682         availability of iOS-only method to NA.
683
684         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Added availability annotation to new enum value,
685         new property, and new method. Added deprecation annotation to one method.
686
687         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h: Annotated new method.
688
689         * mac/rewrite-availability-macros.sh: Rewrite WK_DEPRECATED to NS_DEPRECATED.
690
691 2014-12-26  Dan Bernstein  <mitz@apple.com>
692
693         <rdar://problem/19348208> REGRESSION (r177027): iOS builds use the wrong toolchain
694         https://bugs.webkit.org/show_bug.cgi?id=139950
695
696         Reviewed by David Kilzer.
697
698         * Configurations/Base.xcconfig: Only define TOOLCHAINS when building for OS X, doing so
699         in a manner that works with Xcode 5.1.1.
700
701 2014-12-25  Hunseop Jeong  <hs85.jeong@samsung.com>
702
703         Fix build warning after r177700
704         https://bugs.webkit.org/show_bug.cgi?id=139948
705
706         Reviewed by Alexey Proskuryakov.
707
708         * UIProcess/WebConnectionToWebProcess.cpp:
709         (WebKit::WebConnectionToWebProcess::transformHandlesToObjects):
710         (WebKit::WebConnectionToWebProcess::transformObjectsToHandles):
711
712 2014-12-25  Chris Dumez  <cdumez@apple.com>
713
714         [iOS] Log better using FeatureCounter why PageCache is failing due to pruned resources
715         https://bugs.webkit.org/show_bug.cgi?id=139921
716
717         Reviewed by Gavin Barraclough and Alexey Proskuryakov.
718
719         Call PageCache::pruneToCapacityNow() instead of multiple calls to
720         setCapacity() as it does exactly what we want. Also pass the new
721         PrunedReason argument so help us do better logging.
722
723         * WebProcess/WebProcess.cpp:
724         (WebKit::WebProcess::releasePageCache):
725
726 2014-12-25  Commit Queue  <commit-queue@webkit.org>
727
728         Unreviewed, rolling out r177712 and r177717.
729         https://bugs.webkit.org/show_bug.cgi?id=139944
730
731         Caused flaky assertion failures (Requested by ap on #webkit).
732
733         Reverted changesets:
734
735         "[iOS] Log better using FeatureCounter why PageCache is
736         failing due to pruned resources"
737         https://bugs.webkit.org/show_bug.cgi?id=139921
738         http://trac.webkit.org/changeset/177712
739
740         "Unreviewed, fix build warning after r177712"
741         http://trac.webkit.org/changeset/177717
742
743 2014-12-24  Dan Bernstein  <mitz@apple.com>
744
745         [Cocoa] WebKit private headers shouldn’t contain “inappropriate” macros
746         https://bugs.webkit.org/show_bug.cgi?id=139942
747
748         Reviewed by Darin Adler.
749
750         * WebKit2.xcodeproj/project.pbxproj: In the Check For Inappropriate Macros in External
751         Headers script build phase, check the PrivateHeaders directory as well.
752
753 2014-12-24  Dan Bernstein  <mitz@apple.com>
754
755         Addressed a linker warning about the definition of a method in a category overridng a method from the class.
756
757         * UIProcess/API/mac/WKView.mm:
758         (-[WKView(Private) _targetWindowForMovePreparation]): Deleted. This was identical to the
759         definition in the main WKView implementation above.
760
761 2014-12-23  ChangSeok Oh  <changseok.oh@collabora.com>
762
763         [GTK] Build fix after r177692
764         https://bugs.webkit.org/show_bug.cgi?id=139919
765
766         Reviewed by Gyuyoung Kim.
767
768         This change addresses build failures introduced after r177692.
769
770         * PlatformEfl.cmake: Renamed WebContextSoup to WebProcessPoolSoup.cpp
771         * PlatformGTK.cmake: ditto.
772         * UIProcess/API/gtk/PageClientImpl.cpp:
773         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
774         * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
775         (webkitFormSubmissionRequestCreate):
776         (webkit_form_submission_request_get_text_fields):
777         * UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h:
778         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
779         (didReceiveWebViewMessageFromInjectedBundle):
780         (didReceiveMessageFromInjectedBundle):
781         * UIProcess/API/gtk/WebKitSecurityManager.cpp:
782         (registerSecurityPolicyForURIScheme):
783         * UIProcess/API/gtk/WebKitWebContext.cpp:
784         (webkitWebContextConstructed):
785         (webkit_web_context_prefetch_dns):
786         (webkitWebContextGetContext):
787         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
788         * UIProcess/API/gtk/WebKitWebView.cpp:
789         (webkit_web_view_get_snapshot):
790         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
791         (webkitWebViewBaseCreate):
792         (webkitWebViewBaseCreateWebPage):
793         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
794         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
795         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
796         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
797         * UIProcess/gtk/WebProcessPoolGtk.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp.
798         (WebKit::initInspectorServer):
799         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
800         (WebKit::WebProcessPool::platformInitializeWebProcess):
801         (WebKit::WebProcessPool::platformInvalidateContext):
802         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory):
803         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory):
804         (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
805         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory):
806         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory):
807         (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory):
808         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory):
809         (WebKit::WebProcessPool::setIgnoreTLSErrors):
810         * UIProcess/soup/WebProcessPoolSoup.cpp: Renamed from Source/WebKit2/UIProcess/soup/WebContextSoup.cpp.
811         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
812         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
813         (webkitWebExtensionDidReceiveMessage):
814         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
815         (didInitiateLoadForResource):
816         (willSendRequestForFrame):
817         (didReceiveResponseForResource):
818         (didReceiveContentLengthForResource):
819         (didFinishLoadForResource):
820         (didFailLoadForResource):
821         (webkitWebPageDidReceiveMessage):
822         * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
823
824 2014-12-23  Dan Bernstein  <mitz@apple.com>
825
826         iOS build fix
827
828         * UIProcess/API/Cocoa/WKProcessGroup.mm:
829         (-[WKProcessGroup _geolocationProvider]):
830
831 2014-12-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
832
833         [EFL][WK2] Fix a lot of build break since r177692 
834         https://bugs.webkit.org/show_bug.cgi?id=139932
835
836         Unreviewed EFL build fix.
837
838         Rename WebContext with WebProcessPool in EFL port files.
839
840         * CMakeLists.txt:
841         * UIProcess/API/efl/EwkView.cpp:
842         * UIProcess/API/efl/ewk_context.cpp:
843         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
844         (TEST_F):
845         * UIProcess/CoordinatedGraphics/WebView.cpp:
846         (WebKit::WebView::WebView):
847         * UIProcess/CoordinatedGraphics/WebView.h:
848         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
849         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
850         (WebKit::CustomProtocolManagerProxy::startLoading):
851         (WebKit::CustomProtocolManagerProxy::stopLoading):
852         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
853         (WebKit::WebSoupCustomProtocolRequestManager::create):
854         (WebKit::WebSoupCustomProtocolRequestManager::WebSoupCustomProtocolRequestManager):
855         (WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
856         (WebKit::WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol):
857         (WebKit::WebSoupCustomProtocolRequestManager::didReceiveResponse):
858         (WebKit::WebSoupCustomProtocolRequestManager::didLoadData):
859         (WebKit::WebSoupCustomProtocolRequestManager::didFailWithError):
860         (WebKit::WebSoupCustomProtocolRequestManager::didFinishLoading):
861         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
862         * UIProcess/WebBatteryManagerProxy.cpp:
863         (WebKit::WebBatteryManagerProxy::create):
864         (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy):
865         (WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus):
866         (WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus):
867         * UIProcess/WebBatteryManagerProxy.h:
868         * UIProcess/WebTextChecker.cpp:
869         (WebKit::updateStateForAllContexts):
870         * UIProcess/WebVibrationProxy.cpp:
871         (WebKit::WebVibrationProxy::WebVibrationProxy):
872         (WebKit::WebVibrationProxy::~WebVibrationProxy):
873         * UIProcess/efl/RequestManagerClientEfl.h:
874         * UIProcess/efl/WebContextEfl.cpp:
875         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
876         (WebKit::WebProcessPool::platformInitializeWebProcess):
877         (WebKit::WebProcessPool::platformInvalidateContext):
878         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory):
879         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory):
880         (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
881         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory):
882         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory):
883         (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory):
884         (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory):
885         (WebKit::WebProcessPool::setIgnoreTLSErrors):
886         (WebKit::WebContext::platformDefaultApplicationCacheDirectory): Deleted.
887         (WebKit::WebContext::platformInitializeWebProcess): Deleted.
888         (WebKit::WebContext::platformInvalidateContext): Deleted.
889         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Deleted.
890         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Deleted.
891         (WebKit::WebContext::platformDefaultIconDatabasePath): Deleted.
892         (WebKit::WebContext::platformDefaultLocalStorageDirectory): Deleted.
893         (WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Deleted.
894         (WebKit::WebContext::platformDefaultDiskCacheDirectory): Deleted.
895         (WebKit::WebContext::platformDefaultCookieStorageDirectory): Deleted.
896         (WebKit::WebContext::setIgnoreTLSErrors): Deleted.
897         * UIProcess/efl/WebInspectorProxyEfl.cpp:
898         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
899         * UIProcess/efl/WebViewEfl.cpp:
900         (WebKit::WebView::create):
901         (WebKit::WebViewEfl::WebViewEfl):
902         * UIProcess/efl/WebViewEfl.h:
903         * UIProcess/soup/WebContextSoup.cpp:
904         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
905         (WebKit::WebContext::platformInitializeNetworkProcess): Deleted.
906         * UIProcess/soup/WebCookieManagerProxySoup.cpp:
907         (WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
908         * UIProcess/soup/WebSoupRequestManagerProxy.h:
909
910 2014-12-23  Sam Weinig  <sam@webkit.org>
911
912         Remove telephone number context support from ContextMenuContextData, it is unused
913         https://bugs.webkit.org/show_bug.cgi?id=139931
914
915         Reviewed by Alexey Proskuryakov.
916
917         m_isTelephoneNumberContext was only ever set to true in the ContextMenuContextData
918         constructor that took a TelephoneNumberContextTag, which never got called. Remove it
919         all.
920
921         * Shared/ContextMenuContextData.cpp:
922         (WebKit::ContextMenuContextData::ContextMenuContextData):
923         (WebKit::ContextMenuContextData::encode):
924         (WebKit::ContextMenuContextData::decode):
925         * Shared/ContextMenuContextData.h:
926         (WebKit::ContextMenuContextData::ContextMenuContextData):
927         (WebKit::ContextMenuContextData::isTelephoneNumberContext): Deleted.
928         * UIProcess/mac/WebContextMenuProxyMac.mm:
929         (WebKit::WebContextMenuProxyMac::showContextMenu):
930
931 2014-12-23  Sam Weinig  <sam@webkit.org>
932
933         Attempt to fix the Mountain Lion build.
934
935         * Shared/ContextMenuContextData.h:
936         (WebKit::ContextMenuContextData::isTelephoneNumberContext):
937
938 2014-12-23  Anders Carlsson  <andersca@apple.com>
939
940         Handle WKTypeRefWrapper when converting object graphs
941         https://bugs.webkit.org/show_bug.cgi?id=139927
942
943         Reviewed by Tim Horton.
944
945         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
946         (WebKit::WebProcessProxy::transformHandlesToObjects):
947         (WebKit::WebProcessProxy::transformObjectsToHandles):
948         * WebProcess/cocoa/WebProcessCocoa.mm:
949         (WebKit::WebProcess::transformHandlesToObjects):
950         (WebKit::WebProcess::transformObjectsToHandles):
951
952 2014-12-23  Chris Dumez  <cdumez@apple.com>
953
954         [iOS] Log better using FeatureCounter why PageCache is failing due to pruned resources
955         https://bugs.webkit.org/show_bug.cgi?id=139921
956         <rdar://problem/19255690>
957
958         Reviewed by Gavin Barraclough.
959
960         Call PageCache::pruneToCapacityNow() instead of multiple calls to
961         setCapacity() as it does exactly what we want. Also pass the new
962         PrunedReason argument so help us do better logging.
963
964         * WebProcess/WebProcess.cpp:
965         (WebKit::WebProcess::releasePageCache):
966
967 2014-12-23  Sam Weinig  <sam@webkit.org>
968
969         Attempt to fix the iOS build.
970
971         * UIProcess/API/Cocoa/WKProcessGroup.mm:
972         (-[WKProcessGroup _geolocationProvider]):
973         * UIProcess/API/ios/WKViewIOS.mm:
974         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
975
976 2014-12-23  Anders Carlsson  <andersca@apple.com>
977
978         Handle coding object graphs in the UI process
979         https://bugs.webkit.org/show_bug.cgi?id=139925
980
981         Reviewed by Sam Weinig.
982
983         * UIProcess/Cocoa/WebProcessProxyCocoa.mm: Added.
984         (WebKit::WebProcessProxy::transformHandlesToObjects):
985         (WebKit::WebProcessProxy::transformObjectsToHandles):
986         * UIProcess/WebProcessProxy.cpp:
987         (WebKit::WebProcessProxy::transformHandlesToObjects):
988         (WebKit::WebProcessProxy::transformObjectsToHandles):
989         * UIProcess/WebProcessProxy.h:
990         * WebKit2.xcodeproj/project.pbxproj:
991         * WebProcess/WebProcess.cpp:
992         (WebKit::WebProcess::transformObjectsToHandles):
993         * WebProcess/WebProcess.h:
994
995 2014-12-23  Sam Weinig  <sam@webkit.org>
996
997         ContextMenuContextData should store a ShareableBitmap not a ShareableBitmap::Handle
998         https://bugs.webkit.org/show_bug.cgi?id=139924
999
1000         Reviewed by Anders Carlsson.
1001
1002         Replaces the ShareableBitmap::Handle in ContextMenuContextData with a RefPtr<ShareableBitmap>.
1003         Removes the now unnecessary override copy-constructor and assignment-operator.
1004
1005         * Shared/ContextMenuContextData.cpp:
1006         (WebKit::ContextMenuContextData::ContextMenuContextData):
1007         (WebKit::ContextMenuContextData::encode):
1008         (WebKit::ContextMenuContextData::decode):
1009         (WebKit::ContextMenuContextData::controlledDataIsEditable):
1010         (WebKit::ContextMenuContextData::operator=): Deleted.
1011         * Shared/ContextMenuContextData.h:
1012         (WebKit::ContextMenuContextData::ContextMenuContextData):
1013         (WebKit::ContextMenuContextData::controlledImage):
1014         (WebKit::ContextMenuContextData::needsServicesMenu):
1015         (WebKit::ContextMenuContextData::controlledImageHandle): Deleted.
1016         * UIProcess/WebPageProxy.cpp:
1017         (WebKit::WebPageProxy::internalShowContextMenu):
1018         * UIProcess/mac/WebContextMenuProxyMac.mm:
1019         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1020
1021 2014-12-23  Chris Dumez  <cdumez@apple.com>
1022
1023         Unreviewed iOS build fix after 177692.
1024
1025         Missing WebKit:: namespace.
1026
1027         * UIProcess/ios/WKContentView.h:
1028
1029 2014-12-23  Anders Carlsson  <andersca@apple.com>
1030
1031         Fix 32-build.
1032
1033         * WebProcess/cocoa/WebProcessCocoa.mm:
1034         (WebKit::WebProcess::transformHandlesToObjects):
1035         (WebKit::WebProcess::transformObjectsToHandles):
1036
1037 2014-12-23  Timothy Horton  <timothy_horton@apple.com>
1038
1039         Install a TextIndicator for link immediate actions
1040         https://bugs.webkit.org/show_bug.cgi?id=139897
1041         <rdar://problem/19333076>
1042
1043         Reviewed by Anders Carlsson.
1044
1045         * UIProcess/mac/WKImmediateActionController.mm:
1046         (-[WKImmediateActionController _defaultAnimationController]):
1047         Install the link's TextIndicator.
1048
1049         (-[WKImmediateActionController menuItemDidClose:]):
1050         Dismiss the TextIndicator and clean up when the item closes.
1051
1052 2014-12-23  Timothy Horton  <timothy_horton@apple.com>
1053
1054         Expose ElementBoundingBox on WKHitTestResult
1055         https://bugs.webkit.org/show_bug.cgi?id=139895
1056         <rdar://problem/19333075>
1057
1058         Reviewed by Dan Bernstein.
1059
1060         * UIProcess/API/C/WKHitTestResult.cpp:
1061         (WKHitTestResultGetElementBoundingBox):
1062         * UIProcess/API/C/WKHitTestResult.h:
1063         Expose the rect.
1064
1065 2014-12-23  Timothy Horton  <timothy_horton@apple.com>
1066
1067         Remove the custom web page preview code
1068         https://bugs.webkit.org/show_bug.cgi?id=139894
1069         <rdar://problem/19333074>
1070
1071         Reviewed by Dan Bernstein.
1072
1073         * UIProcess/API/Cocoa/WKViewPrivate.h:
1074         * UIProcess/API/mac/WKView.mm:
1075         (-[WKView _dismissContentRelativeChildWindows]):
1076         (-[WKView _viewForPreviewingURL:initialFrameSize:]): Deleted.
1077         (-[WKView _titleForPreviewOfURL:]): Deleted.
1078         (-[WKView _setPreviewTitle:]): Deleted.
1079         (-[WKView _setPreviewLoading:]): Deleted.
1080         (-[WKView _setPreviewOverrideImage:]): Deleted.
1081         (-[WKView _finishPreviewingURL:withPreviewView:]): Deleted.
1082         (-[WKView _handleClickInPreviewView:URL:]): Deleted.
1083         (-[WKView _shouldUseStandardQuickLookPreview]): Deleted.
1084         * UIProcess/mac/WKImmediateActionController.h:
1085         * UIProcess/mac/WKImmediateActionController.mm:
1086         (-[WKImmediateActionController willDestroyView:]):
1087         (-[WKImmediateActionController _clearImmediateActionState]):
1088         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
1089         (-[WKImmediateActionController _defaultAnimationController]):
1090         (-[WKImmediateActionController hidePreview]): Deleted.
1091         (-[WKImmediateActionController setPreviewTitle:]): Deleted.
1092         (-[WKImmediateActionController setPreviewLoading:]): Deleted.
1093         (-[WKImmediateActionController setPreviewOverrideImage:]): Deleted.
1094         (-[WKImmediateActionController _animationControllerForCustomPreview]): Deleted.
1095         * UIProcess/mac/WKPagePreviewViewController.h: Removed.
1096         * UIProcess/mac/WKPagePreviewViewController.mm: Removed.
1097         * UIProcess/mac/WKPreviewPopoverAnimationController.h: Removed.
1098         * UIProcess/mac/WKPreviewPopoverAnimationController.mm: Removed.
1099         * WebKit2.xcodeproj/project.pbxproj:
1100         Remove all of the custom web page preview code. Clients that want the custom
1101         preview can implement it by overriding the immediate action.
1102
1103 2014-12-23  Anders Carlsson  <andersca@apple.com>
1104
1105         Add WebProcessProxy::transformHandlesToObjects
1106         https://bugs.webkit.org/show_bug.cgi?id=139922
1107
1108         Reviewed by Tim Horton.
1109
1110         This will be used to convert between the handles and their respective UI side objects.
1111
1112         * UIProcess/WebProcessProxy.cpp:
1113         (WebKit::WebProcessProxy::transformHandlesToObjects):
1114         (WebKit::WebProcessProxy::transformObjectsToHandles):
1115         (WebKit::WebProcessProxy::apiObjectByConvertingToHandles): Deleted.
1116         * UIProcess/WebProcessProxy.h:
1117
1118 2014-12-23  Anders Carlsson  <andersca@apple.com>
1119
1120         Add handle transform functions to WebConnection
1121         https://bugs.webkit.org/show_bug.cgi?id=139920
1122
1123         Reviewed by Sam Weinig.
1124
1125         This will be used by the web connection code to convert between objects and their respective handles.
1126
1127         * Shared/WebConnection.h:
1128         * UIProcess/WebConnectionToWebProcess.cpp:
1129         (WebKit::WebConnectionToWebProcess::transformHandlesToObjects):
1130         (WebKit::WebConnectionToWebProcess::transformObjectsToHandles):
1131         * UIProcess/WebConnectionToWebProcess.h:
1132         * WebProcess/WebConnectionToUIProcess.cpp:
1133         (WebKit::WebConnectionToUIProcess::transformHandlesToObjects):
1134         (WebKit::WebConnectionToUIProcess::transformObjectsToHandles):
1135         * WebProcess/WebConnectionToUIProcess.h:
1136
1137 2014-12-23  Sam Weinig  <sam@webkit.org>
1138
1139         Rename ImmutableDictionary to API::Dictionary and merge MutableDictionary into it
1140         https://bugs.webkit.org/show_bug.cgi?id=139917
1141
1142         Reviewed by Anders Carlsson.
1143
1144         - Renames ImmutableDictionary -> API::Dictionary
1145         - Merges MutableDictionary into the new API::Dictionary
1146             (as a result WKDictionaryIsMutable() now always returns true)
1147
1148         * File list elided *
1149
1150 2014-12-23  Anders Carlsson  <andersca@apple.com>
1151
1152         Add WebProcess::transformObjectsToHandles
1153         https://bugs.webkit.org/show_bug.cgi?id=139918
1154
1155         Reviewed by Tim Horton.
1156
1157         This function will be used for transforming bundle objects to their respective handle types
1158         when sending messages to the UI process.
1159
1160         * WebProcess/WebProcess.cpp:
1161         (WebKit::WebProcess::transformHandlesToObjects):
1162         (WebKit::WebProcess::transformObjectsToHandles):
1163         * WebProcess/WebProcess.h:
1164         * WebProcess/cocoa/WebProcessCocoa.mm:
1165         (WebKit::WebProcess::transformHandlesToObjects):
1166         (WebKit::WebProcess::transformObjectsToHandles):
1167
1168 2014-12-23  Anders Carlsson  <andersca@apple.com>
1169
1170         Move dynamic_objc_cast to RetainPtr.h
1171         https://bugs.webkit.org/show_bug.cgi?id=139915
1172
1173         Reviewed by Sam Weinig.
1174
1175         * Shared/mac/ObjCObjectGraph.mm:
1176         (WebKit::dynamic_objc_cast): Deleted.
1177
1178 2014-12-23  Anders Carlsson  <andersca@apple.com>
1179
1180         Add WebProcess::transformHandlesToObjects
1181         https://bugs.webkit.org/show_bug.cgi?id=139913
1182
1183         Reviewed by Tim Horton.
1184
1185         Rename objectGraphByTransformingObjectsToHandles to transformObjectsToHandles and add
1186         transformHandlesToObjects that will try to convert handles to the actual bundle type objects.
1187
1188         * WebProcess/WebProcess.h:
1189         * WebProcess/cocoa/WebProcessCocoa.mm:
1190         (WebKit::WebProcess::transformHandlesToObjects):
1191         (WebKit::WebProcess::transformObjectsToHandles):
1192         (WebKit::WebProcess::objectGraphByTransformingObjectsToHandles): Deleted.
1193
1194 2014-12-23  Anders Carlsson  <andersca@apple.com>
1195
1196         Add WebProcess::objectGraphByTransformingObjectsToHandles
1197         https://bugs.webkit.org/show_bug.cgi?id=139912
1198
1199         Reviewed by Tim Horton.
1200
1201         This will be used to convert Objective-C object graphs containing bundle types to their handle counterparts.
1202
1203         * WebProcess/WebProcess.cpp:
1204         (WebKit::WebProcess::transformHandlesToObjects):
1205         (WebKit::WebProcess::apiObjectByConvertingFromHandles): Deleted.
1206         Rename apiObjectByConvertingFromHandles to transformHandlesToObjects.
1207
1208         * WebProcess/WebProcess.h:
1209         * WebProcess/cocoa/WebProcessCocoa.mm:
1210         (WebKit::WebProcess::objectGraphByTransformingObjectsToHandles):
1211
1212 2014-12-23  Anders Carlsson  <andersca@apple.com>
1213
1214         Fix UserMessage::transform to only call shouldTransform once
1215         https://bugs.webkit.org/show_bug.cgi?id=139911
1216
1217         Reviewed by Sam Weinig.
1218
1219         Also, make it possible for transformers to return null objects and change the transformers
1220         to return the passed in object when there's no need to do a transform.
1221
1222         * Shared/UserData.cpp:
1223         (WebKit::transformGraph):
1224         (WebKit::UserData::transform):
1225         (WebKit::UserData::encode): Deleted.
1226         (WebKit::UserData::decode): Deleted.
1227         * UIProcess/WebProcessProxy.cpp:
1228         (WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
1229         * WebProcess/WebProcess.cpp:
1230         (WebKit::WebProcess::apiObjectByConvertingFromHandles):
1231
1232 2014-12-23  Sam Weinig  <sam@webkit.org>
1233
1234         Rename WebContext to WebProcessPool
1235         https://bugs.webkit.org/show_bug.cgi?id=139909
1236
1237         Rubber-stamped by Anders Carlsson.
1238
1239         - Major renames:
1240             WebContext -> WebProcessPool
1241             WebContextConfiguration -> WebProcessPoolConfiguration
1242             API::ContextConfiguration -> API::ProcessPoolConfiguration
1243
1244         * File list elided *
1245
1246 2014-12-23  Anders Carlsson  <andersca@apple.com>
1247
1248         Only call shouldTransformGraph once per graph
1249         https://bugs.webkit.org/show_bug.cgi?id=139910
1250
1251         Reviewed by Sam Weinig.
1252
1253         Don't call shouldTransformGraph for each node in the object graph. Instead, call it once
1254         and then transform the entire graph if needed.
1255
1256         * Shared/mac/ObjCObjectGraph.h:
1257         * Shared/mac/ObjCObjectGraph.mm:
1258         (WebKit::shouldTransformGraph):
1259         (WebKit::transformGraph):
1260         (WebKit::ObjCObjectGraph::transform):
1261         (WebKit::shouldTransform): Deleted.
1262
1263 2014-12-22  Anders Carlsson  <andersca@apple.com>
1264
1265         Use a Transformer for UserData as well, to avoid always copying arrays and dictionaries
1266         https://bugs.webkit.org/show_bug.cgi?id=139896
1267
1268         Reviewed by Darin Adler.
1269
1270         * Shared/UserData.cpp:
1271         (WebKit::shouldTransform):
1272         (WebKit::UserData::transform):
1273         * Shared/UserData.h:
1274         (WebKit::UserData::Transformer::~Transformer):
1275         * UIProcess/WebProcessProxy.cpp:
1276         (WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
1277         * WebProcess/WebProcess.cpp:
1278         (WebKit::WebProcess::apiObjectByConvertingFromHandles):
1279
1280 2014-12-22  Anders Carlsson  <andersca@apple.com>
1281
1282         Make it possible to transform Objective-C object graphs, replacing certain elements with others
1283         https://bugs.webkit.org/show_bug.cgi?id=139893
1284
1285         Reviewed by Sam Weinig.
1286
1287         * Shared/mac/ObjCObjectGraph.h:
1288         (WebKit::ObjCObjectGraph::Transformer::~Transformer):
1289         * Shared/mac/ObjCObjectGraph.mm:
1290         (WebKit::dynamic_objc_cast):
1291         (WebKit::shouldTransform):
1292         (WebKit::ObjCObjectGraph::transform):
1293
1294 2014-12-22  Jaehun Lim  <ljaehun.lim@samsung.com>
1295
1296         Unreviewed build fix after r177661 and r177662
1297
1298         * CMakeLists.txt: Add APIPageGroupHandle.cpp to the source list.
1299
1300 2014-12-22  Anders Carlsson  <andersca@apple.com>
1301
1302         Convert pages and page groups to their respective handle objects
1303         https://bugs.webkit.org/show_bug.cgi?id=139891
1304
1305         Reviewed by Tim Horton.
1306
1307         * UIProcess/WebProcessProxy.cpp:
1308         (WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
1309         * WebProcess/WebProcess.cpp:
1310         (WebKit::WebProcess::apiObjectByConvertingFromHandles):
1311
1312 2014-12-22  Anders Carlsson  <andersca@apple.com>
1313
1314         Add a bunch of missing header includes in preparation for making toImpl require the complete type
1315         https://bugs.webkit.org/show_bug.cgi?id=139887
1316
1317         Reviewed by Andreas Kling.
1318
1319         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1320         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1321         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1322         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1323         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1324         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
1325         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1326         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1327         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1328         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
1329         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1330
1331 2014-12-22  Chris Dumez  <cdumez@apple.com>
1332
1333         [iOS] Log using FeatureCounter user-triggered zooming
1334         https://bugs.webkit.org/show_bug.cgi?id=139879
1335         <rdar://problem/19329130>
1336
1337         Reviewed by Benjamin Poulain.
1338
1339         Log using FeatureCounter user-triggered zooming on iOS.
1340
1341         * WebProcess/WebPage/ios/WebPageIOS.mm:
1342         (WebKit::WebPage::willStartUserTriggeredZooming):
1343
1344 2014-12-22  Anders Carlsson  <andersca@apple.com>
1345
1346         Add an API::PageGroupHandle object
1347         https://bugs.webkit.org/show_bug.cgi?id=139881
1348
1349         Reviewed by Sam Weinig.
1350
1351         API::PageGroupHandle won't be exposed to any API, it will only be used to facilitate passing page groups
1352         between the UI and web process inside UserData objects.
1353
1354         * Shared/API/APIObject.h:
1355         * Shared/API/APIPageGroupHandle.cpp: Added.
1356         (API::PageGroupHandle::create):
1357         (API::PageGroupHandle::~PageGroupHandle):
1358         (API::PageGroupHandle::PageGroupHandle):
1359         * Shared/API/APIPageGroupHandle.h: Added.
1360         (API::PageGroupHandle::webPageGroupData):
1361         * Shared/UserData.cpp:
1362         (WebKit::UserData::UserData):
1363         (WebKit::UserData::encode):
1364         (WebKit::UserData::decode):
1365         * Shared/UserData.h:
1366         * UIProcess/WebPageGroup.h:
1367         (WebKit::WebPageGroup::data):
1368         * UIProcess/WebProcessProxy.cpp:
1369         (WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
1370         * WebKit2.xcodeproj/project.pbxproj:
1371
1372 2014-12-22  Daniel Bates  <dabates@apple.com>
1373
1374         Fix the iOS build after <https://trac.webkit.org/changeset/177639>
1375         (https://bugs.webkit.org/show_bug.cgi?id=139866)
1376
1377         Substitute APISecurityOrigin.h for WebSecurityOrigin.h as the latter was renamed to the former.
1378
1379         * UIProcess/ios/WKGeolocationProviderIOS.mm:
1380
1381 2014-12-22  Csaba Osztrogonác  <ossy@webkit.org>
1382
1383         URTBF after r177649.
1384
1385         * CMakeLists.txt:
1386
1387 2014-12-22  Csaba Osztrogonác  <ossy@webkit.org>
1388
1389         Last URTBF after r177639, GTK builds now.
1390
1391         * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
1392         * UIProcess/API/gtk/WebKitUIClient.cpp:
1393         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
1394         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
1395         (webkitUserMediaPermissionRequestCreate):
1396         * UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h:
1397         * UIProcess/API/gtk/WebKitWebView.cpp:
1398         (webkitWebViewRunJavaScriptCallback):
1399         (webkit_web_view_run_javascript):
1400         (resourcesStreamReadCallback):
1401
1402 2014-12-22  Anders Carlsson  <andersca@apple.com>
1403
1404         Move more API classes from Shared to Shared/API.
1405
1406         Rubber-stamped by Sam Weinig.
1407
1408         * Shared/API/APIArray.cpp: Renamed from Source/WebKit2/Shared/APIArray.cpp.
1409         * Shared/API/APIArray.h: Renamed from Source/WebKit2/Shared/APIArray.h.
1410         * Shared/API/APIClient.h: Renamed from Source/WebKit2/Shared/APIClient.h.
1411         * Shared/API/APIData.cpp: Renamed from Source/WebKit2/Shared/APIData.cpp.
1412         * Shared/API/APIData.h: Renamed from Source/WebKit2/Shared/APIData.h.
1413         * Shared/API/APIError.cpp: Renamed from Source/WebKit2/Shared/APIError.cpp.
1414         * Shared/API/APIError.h: Renamed from Source/WebKit2/Shared/APIError.h.
1415         * Shared/API/APIFrameHandle.cpp: Renamed from Source/WebKit2/Shared/APIFrameHandle.cpp.
1416         * Shared/API/APIFrameHandle.h: Renamed from Source/WebKit2/Shared/APIFrameHandle.h.
1417         * Shared/API/APIGeometry.cpp: Renamed from Source/WebKit2/Shared/APIGeometry.cpp.
1418         * Shared/API/APIGeometry.h: Renamed from Source/WebKit2/Shared/APIGeometry.h.
1419         * Shared/API/APINumber.h: Renamed from Source/WebKit2/Shared/APINumber.h.
1420         * Shared/API/APIObject.cpp: Renamed from Source/WebKit2/Shared/APIObject.cpp.
1421         * Shared/API/APIObject.h: Renamed from Source/WebKit2/Shared/APIObject.h.
1422         * Shared/API/APIPageHandle.cpp: Renamed from Source/WebKit2/Shared/APIPageHandle.cpp.
1423         * Shared/API/APIPageHandle.h: Renamed from Source/WebKit2/Shared/APIPageHandle.h.
1424         * Shared/API/APIString.h: Renamed from Source/WebKit2/Shared/APIString.h.
1425         * Shared/API/APIURL.h: Renamed from Source/WebKit2/Shared/APIURL.h.
1426         * Shared/API/APIURLRequest.cpp: Renamed from Source/WebKit2/Shared/APIURLRequest.cpp.
1427         * Shared/API/APIURLRequest.h: Renamed from Source/WebKit2/Shared/APIURLRequest.h.
1428         * Shared/API/APIURLResponse.cpp: Renamed from Source/WebKit2/Shared/APIURLResponse.cpp.
1429         * Shared/API/APIURLResponse.h: Renamed from Source/WebKit2/Shared/APIURLResponse.h.
1430
1431 2014-12-22  Csaba Osztrogonác  <ossy@webkit.org>
1432
1433         One more URTBF after r177639 to try to make GTK happy.
1434
1435         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
1436
1437 2014-12-22  Csaba Osztrogonác  <ossy@webkit.org>
1438
1439         URTBF after r177639 to try to make GTK happy.
1440
1441         * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
1442
1443 2014-12-22  Anders Carlsson  <andersca@apple.com>
1444
1445         Rename a bunch of API classes and move them to Shared/API
1446         https://bugs.webkit.org/show_bug.cgi?id=139866
1447
1448         Reviewed by Sam Weinig.
1449
1450         * Shared/API/APISecurityOrigin.h: Renamed from Source/WebKit2/Shared/WebSecurityOrigin.h.
1451         (API::SecurityOrigin::createFromString):
1452         (API::SecurityOrigin::create):
1453         (API::SecurityOrigin::securityOrigin):
1454         (API::SecurityOrigin::SecurityOrigin):
1455         * Shared/API/APISerializedScriptValue.h: Renamed from Source/WebKit2/Shared/WebSerializedScriptValue.h.
1456         (API::SerializedScriptValue::create):
1457         (API::SerializedScriptValue::adopt):
1458         (API::SerializedScriptValue::deserialize):
1459         (API::SerializedScriptValue::dataReference):
1460         (API::SerializedScriptValue::internalRepresentation):
1461         (API::SerializedScriptValue::SerializedScriptValue):
1462         * Shared/API/APIUserContentURLPattern.h: Renamed from Source/WebKit2/Shared/WebUserContentURLPattern.h.
1463         (API::UserContentURLPattern::create):
1464         (API::UserContentURLPattern::host):
1465         (API::UserContentURLPattern::scheme):
1466         (API::UserContentURLPattern::isValid):
1467         (API::UserContentURLPattern::matchesURL):
1468         (API::UserContentURLPattern::matchesSubdomains):
1469         (API::UserContentURLPattern::patternString):
1470         (API::UserContentURLPattern::UserContentURLPattern):
1471         * Shared/API/c/WKSecurityOrigin.cpp:
1472         (WKSecurityOriginGetTypeID):
1473         (WKSecurityOriginCreateFromString):
1474         (WKSecurityOriginCreateFromDatabaseIdentifier):
1475         (WKSecurityOriginCreate):
1476         * Shared/API/c/WKSerializedScriptValue.cpp:
1477         (WKSerializedScriptValueGetTypeID):
1478         (WKSerializedScriptValueCreate):
1479         (WKSerializedScriptValueCreateWithInternalRepresentation):
1480         * Shared/API/c/WKSharedAPICast.h:
1481         (WebKit::toCopiedAPI):
1482         * Shared/API/c/WKUserContentURLPattern.cpp:
1483         (WKUserContentURLPatternGetTypeID):
1484         (WKUserContentURLPatternCreate):
1485         * Shared/SecurityOriginData.cpp:
1486         (WebKit::performAPICallbackWithSecurityOriginDataVector):
1487         * Shared/UserData.cpp:
1488         (WebKit::UserData::encode):
1489         (WebKit::UserData::decode):
1490         * Shared/UserMessageCoders.h:
1491         (WebKit::UserMessageEncoder::baseEncode):
1492         (WebKit::UserMessageDecoder::baseDecode):
1493         * UIProcess/API/APIUIClient.h:
1494         (API::UIClient::exceededDatabaseQuota):
1495         (API::UIClient::decidePolicyForGeolocationPermissionRequest):
1496         (API::UIClient::decidePolicyForUserMediaPermissionRequest):
1497         (API::UIClient::decidePolicyForNotificationPermissionRequest):
1498         * UIProcess/API/C/WKNotification.cpp:
1499         * UIProcess/API/C/WKPage.cpp:
1500         (WKPageSetPageUIClient):
1501         * UIProcess/API/Cocoa/WKWebView.mm:
1502         (-[WKWebView evaluateJavaScript:completionHandler:]):
1503         * UIProcess/Cocoa/UIDelegate.h:
1504         * UIProcess/Cocoa/UIDelegate.mm:
1505         (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
1506         * UIProcess/GenericCallback.h:
1507         * UIProcess/Notifications/WebNotification.cpp:
1508         (WebKit::WebNotification::WebNotification):
1509         * UIProcess/Notifications/WebNotification.h:
1510         (WebKit::WebNotification::origin):
1511         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1512         (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
1513         (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
1514         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1515         * UIProcess/Notifications/WebNotificationProvider.cpp:
1516         * UIProcess/Notifications/WebNotificationProvider.h:
1517         * UIProcess/PageClient.h:
1518         (WebKit::PageClient::decidePolicyForGeolocationPermissionRequest):
1519         * UIProcess/WebApplicationCacheManagerProxy.cpp:
1520         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
1521         * UIProcess/WebApplicationCacheManagerProxy.h:
1522         * UIProcess/WebCookieManagerProxy.cpp:
1523         * UIProcess/WebDatabaseManagerProxy.cpp:
1524         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1525         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1526         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
1527         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
1528         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
1529         (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
1530         (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
1531         * UIProcess/WebDatabaseManagerProxy.h:
1532         * UIProcess/WebDatabaseManagerProxyClient.cpp:
1533         (WebKit::WebDatabaseManagerProxyClient::didModifyOrigin):
1534         (WebKit::WebDatabaseManagerProxyClient::didModifyDatabase):
1535         * UIProcess/WebDatabaseManagerProxyClient.h:
1536         * UIProcess/WebKeyValueStorageManager.cpp:
1537         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1538         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1539         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1540         * UIProcess/WebKeyValueStorageManager.h:
1541         * UIProcess/WebMediaCacheManagerProxy.cpp:
1542         * UIProcess/WebOriginDataManagerProxy.cpp:
1543         (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1544         (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
1545         * UIProcess/WebOriginDataManagerProxy.h:
1546         * UIProcess/WebPageProxy.cpp:
1547         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
1548         (WebKit::WebPageProxy::scriptValueCallback):
1549         (WebKit::WebPageProxy::exceededDatabaseQuota):
1550         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
1551         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
1552         (WebKit::WebPageProxy::requestNotificationPermission):
1553         * UIProcess/WebPageProxy.h:
1554         * UIProcess/WebResourceCacheManagerProxy.cpp:
1555         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
1556         * UIProcess/WebResourceCacheManagerProxy.h:
1557         * UIProcess/ios/PageClientImplIOS.h:
1558         * UIProcess/ios/PageClientImplIOS.mm:
1559         (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
1560         * UIProcess/ios/WKContentView.h:
1561         * WebKit2.xcodeproj/project.pbxproj:
1562         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
1563         (API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota):
1564         (API::InjectedBundle::PageUIClient::didExceedDatabaseQuota):
1565         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1566         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1567         (WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota):
1568         (WebKit::InjectedBundlePageUIClient::didExceedDatabaseQuota):
1569         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1570         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1571         (WebKit::WebChromeClient::exceededDatabaseQuota):
1572         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1573
1574 2014-12-21  Sam Weinig  <sam@webkit.org>
1575
1576         Allow the WebContext's history client to coexist with WKWebView's history delegate
1577         https://bugs.webkit.org/show_bug.cgi?id=139857
1578
1579         Reviewed by Anders Carlsson.
1580
1581         - Renames API::HistoryClient to API::LegacyContextHistoryClient to make it clear what it is for.
1582         - Re-routes the history client functions from the WebProcessProxy to the WebPageProxy.
1583         - Add history client functions to API::LoaderClient and implement them for NavigationState's 
1584           LoaderClient subclass. Removes the need for WKProcessPool to have to setup a history client and
1585           forward to the NavigationState.
1586
1587         * UIProcess/API/APIHistoryClient.h: Removed.
1588         * UIProcess/API/APILegacyContextHistoryClient.h: Copied from Source/WebKit2/UIProcess/API/APIHistoryClient.h.
1589         (API::LegacyContextHistoryClient::~LegacyContextHistoryClient):
1590         (API::LegacyContextHistoryClient::didNavigateWithNavigationData):
1591         (API::LegacyContextHistoryClient::didPerformClientRedirect):
1592         (API::LegacyContextHistoryClient::didPerformServerRedirect):
1593         (API::LegacyContextHistoryClient::didUpdateHistoryTitle):
1594         (API::LegacyContextHistoryClient::populateVisitedLinks):
1595         (API::HistoryClient::~HistoryClient): Deleted.
1596         (API::HistoryClient::didNavigateWithNavigationData): Deleted.
1597         (API::HistoryClient::didPerformClientRedirect): Deleted.
1598         (API::HistoryClient::didPerformServerRedirect): Deleted.
1599         (API::HistoryClient::didUpdateHistoryTitle): Deleted.
1600         (API::HistoryClient::populateVisitedLinks): Deleted.
1601         * UIProcess/API/APILoaderClient.h:
1602         (API::LoaderClient::didNavigateWithNavigationData):
1603         (API::LoaderClient::didPerformClientRedirect):
1604         (API::LoaderClient::didPerformServerRedirect):
1605         (API::LoaderClient::didUpdateHistoryTitle):
1606         * UIProcess/API/C/WKContext.cpp:
1607         (WKContextSetHistoryClient):
1608         * UIProcess/API/Cocoa/WKProcessPool.mm:
1609         (-[WKProcessPool _initWithConfiguration:]):
1610         * UIProcess/API/mac/WKView.mm:
1611         * UIProcess/Cocoa/HistoryClient.h: Removed.
1612         * UIProcess/Cocoa/HistoryClient.mm: Removed.
1613         * UIProcess/Cocoa/NavigationState.h:
1614         * UIProcess/Cocoa/NavigationState.mm:
1615         (WebKit::NavigationState::LoaderClient::didNavigateWithNavigationData):
1616         (WebKit::NavigationState::LoaderClient::didPerformClientRedirect):
1617         (WebKit::NavigationState::LoaderClient::didPerformServerRedirect):
1618         (WebKit::NavigationState::LoaderClient::didUpdateHistoryTitle):
1619         (WebKit::NavigationState::didNavigateWithNavigationData): Deleted.
1620         (WebKit::NavigationState::didPerformClientRedirect): Deleted.
1621         (WebKit::NavigationState::didPerformServerRedirect): Deleted.
1622         (WebKit::NavigationState::didUpdateHistoryTitle): Deleted.
1623         * UIProcess/WebContext.cpp:
1624         (WebKit::WebContext::WebContext):
1625         (WebKit::WebContext::setHistoryClient):
1626         (WebKit::WebContext::populateVisitedLinks):
1627         * UIProcess/WebContext.h:
1628         (WebKit::WebContext::historyClient):
1629         * UIProcess/WebPageProxy.cpp:
1630         (WebKit::WebPageProxy::didNavigateWithNavigationData):
1631         (WebKit::WebPageProxy::didPerformClientRedirect):
1632         (WebKit::WebPageProxy::didPerformServerRedirect):
1633         (WebKit::WebPageProxy::didUpdateHistoryTitle):
1634         * UIProcess/WebPageProxy.h:
1635         * UIProcess/WebPageProxy.messages.in:
1636         * UIProcess/WebProcessProxy.cpp:
1637         (WebKit::WebProcessProxy::didNavigateWithNavigationData): Deleted.
1638         (WebKit::WebProcessProxy::didPerformClientRedirect): Deleted.
1639         (WebKit::WebProcessProxy::didPerformServerRedirect): Deleted.
1640         (WebKit::WebProcessProxy::didUpdateHistoryTitle): Deleted.
1641         * UIProcess/WebProcessProxy.h:
1642         * UIProcess/WebProcessProxy.messages.in:
1643         * WebKit2.xcodeproj/project.pbxproj:
1644         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1645         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
1646         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1647         (WebKit::WebFrameLoaderClient::setTitle):
1648
1649 2014-12-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1650
1651         [GTK] another outdated comment
1652         https://bugs.webkit.org/show_bug.cgi?id=139863
1653
1654         Reviewed by Darin Adler.
1655
1656         Remove outdated comment. We nowadays block untrusted connections by
1657         default.
1658
1659         * WebProcess/gtk/WebProcessMainGtk.cpp:
1660
1661 2014-12-21  Eric Carlson  <eric.carlson@apple.com>
1662
1663         [iOS] avoid WebVideoFullscreenManager crash
1664         https://bugs.webkit.org/show_bug.cgi?id=139852
1665         <rdar://problem/19319302>
1666
1667         Reviewed by Darin Adler.
1668
1669         * WebProcess/ios/WebVideoFullscreenManager.mm:
1670         (WebKit::WebVideoFullscreenManager::didExitFullscreen): NULL-check m_layerHostingContext and m_page.
1671         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): NULL-check m_layerHostingContext.
1672
1673 2014-12-21  David Kilzer  <ddkilzer@apple.com>
1674
1675         Fix WebKit2 build with newer clang compiler
1676
1677         Fixes the following build error:
1678
1679             In file included from DerivedSources/WebKit2/WebVideoFullscreenManagerProxyMessageReceiver.cpp:32:
1680             Source/WebKit2/Platform/IPC/HandleMessage.h:16:25: error: non-const lvalue reference to type 'Vector<[3 * ...]>' cannot bind to a temporary of type 'Vector<[3 * ...]>'
1681                 (object->*function)(std::get<ArgsIndex>(std::forward<ArgsTuple>(args))...);
1682                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1683             Source/WebKit2/Platform/IPC/HandleMessage.h:22:5: note: in instantiation of function template specialization 'IPC::callMemberFunctionImpl<WebKit::WebVideoFullscreenManagerProxy, void (WebKit::WebVideoFullscreenManagerProxy::*)(WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> &), std::__1::tuple<WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> >, 0>' requested here
1684                 callMemberFunctionImpl(object, function, std::forward<ArgsTuple>(args), ArgsIndicies());
1685                 ^
1686             Source/WebKit2/Platform/IPC/HandleMessage.h:120:5: note: in instantiation of function template specialization 'IPC::callMemberFunction<WebKit::WebVideoFullscreenManagerProxy, void (WebKit::WebVideoFullscreenManagerProxy::*)(WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> &), std::__1::tuple<WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> >, std::make_index_sequence<1> >' requested here
1687                 callMemberFunction(WTF::move(arguments), object, function);
1688                 ^
1689             DerivedSources/WebKit2/WebVideoFullscreenManagerProxyMessageReceiver.cpp:55:14: note: in instantiation of function template specialization 'IPC::handleMessage<Messages::WebVideoFullscreenManagerProxy::SetSeekableRangesVector, WebKit::WebVideoFullscreenManagerProxy, void (WebKit::WebVideoFullscreenManagerProxy::*)(WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> &)>' requested here
1690                     IPC::handleMessage<Messages::WebVideoFullscreenManagerProxy::SetSeekableRangesVector>(decoder, this, &WebVideoFullscreenManagerProxy::setSeekableRangesVector);
1691                          ^
1692
1693         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1694         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1695         (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
1696         Make Vector<std::pair<double, double>>& argument const because a
1697         temporary is not allowed to bind to a non-const reference.
1698
1699 2014-12-20  Eric Carlson  <eric.carlson@apple.com>
1700
1701         [iOS] add optimized fullscreen API
1702         https://bugs.webkit.org/show_bug.cgi?id=139833
1703         <rdar://problem/18844486>
1704
1705         Reviewed by Simon Fraser.
1706
1707         * Configurations/FeatureDefines.xcconfig: Add ENABLE_VIDEO_PRESENTATION_MODE.
1708
1709 2014-12-20  David Kilzer  <ddkilzer@apple.com>
1710
1711         Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
1712         <http://webkit.org/b/139463>
1713
1714         Reviewed by Mark Rowe.
1715
1716         * Configurations/All.xcconfig:
1717         - Only set EXCLUDED_SOURCE_FILE_NAMES on iOS.
1718         * Configurations/Base.xcconfig:
1719         - Only set FRAMEWORK_CONTENT_DIRECTORY, GCC_ENABLE_OBJC_GC and
1720           TOOLCHAINS on OS X.
1721         * Configurations/BaseLegacyProcess.xcconfig:
1722         - Only set SKIP_INSTALL on iOS.
1723         * Configurations/BaseTarget.xcconfig:
1724         - Set WEBKIT_FRAMEWORKS_DIR and UMBRELLA_FRAMEWORKS_DIR based on
1725           SDK, and simply them.
1726         * Configurations/BaseXPCService.xcconfig:
1727         - Set INSTALL_PATH_ACTUAL_Normal based on SDK.
1728         * Configurations/DebugRelease.xcconfig:
1729         - Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
1730         - Set WEBKIT_SYSTEM_INTERFACE_LIBRARY based on SDK.
1731         * Configurations/NetworkProcess.xcconfig:
1732         - Only set EXCLUDED_SHIM_FILE_NAME and CODE_SIGN_ENTITLEMENTS on
1733           iOS.
1734         * Configurations/NetworkService.Development.xcconfig:
1735         - Set INFOPLIST_FILE based on SDK.
1736         - Simplify CODE_SIGN_ENTITLEMENTS for iOS.
1737         * Configurations/NetworkService.xcconfig:
1738         - Set INFOPLIST_FILE based on SDK.
1739         - Simplify CODE_SIGN_ENTITLEMENTS for iOS.
1740         * Configurations/PluginProcess.xcconfig:
1741         - Only set EXCLUDED_SHIM_FILE_NAME and SKIP_INSTALL on iOS.
1742         * Configurations/PluginProcessShim.xcconfig:
1743         - Set OTHER_LDFLAGS based on SDK.
1744         * Configurations/PluginService.32.xcconfig:
1745         - Only set VALID_ARCHS on OS X.
1746         - Set OTHER_LDFLAGS based on platform-specific values.
1747         - Only set SKIP_INSTALL on iOS.
1748         * Configurations/PluginService.64.xcconfig:
1749         - Set ARCHS based on SDK.
1750         - Set OTHER_LDFLAGS based on platform-specific values.
1751         - Only set SKIP_INSTALL on iOS.
1752         * Configurations/PluginService.Development.xcconfig:
1753         - Only set SKIP_INSTALL on iOS.
1754         - Set OTHER_LDFLAGS based on platform-specific values.
1755         * Configurations/SecItemShim.xcconfig:
1756         - Set OTHER_LDFLAGS based on platform-specific values.
1757         * Configurations/Version.xcconfig:
1758         - Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
1759         * Configurations/WebContentProcess.xcconfig:
1760         - Only set EXCLUDED_SHIM_FILE_NAME on iOS.
1761         - Only set CODE_SIGN_ENTITLEMENTS on iOS Simulator.
1762         * Configurations/WebContentService.Development.xcconfig:
1763         - Set INFOPLIST_FILE and BUNDLE_LOCALIZATION_KEY based on SDK.
1764         - Only set CODE_SIGN_ENTITLEMENTS on iOS hardware.
1765         - Set OTHER_LDFLAGS based on platform-specific values.
1766         * Configurations/WebContentService.xcconfig: Ditto.
1767         * Configurations/WebKit.xcconfig:
1768         - Set FRAMEWORK_AND_LIBRARY_LDFLAGS, SECTORDER_FLAGS, and
1769           WK_API_AVAILABILITY_ENABLED based on SDK.
1770         - Set OTHER_LDFLAGS based on platform-specific values.
1771         - Only set EXCLUDED_SOURCE_FILE_NAMES on iOS.
1772         * Configurations/WebKit2.xcconfig:
1773         - Set INSTALL_PATH, INSTALL_PATH_ACTUAL, DYLIB_INSTALL_NAME_BASE,
1774           NORMAL_WEBKIT2_FRAMEWORKS_DIR, WEBKIT2_FRAMEWORKS_DIR and
1775           NORMAL_PRODUCTION_FRAMEWORKS_DIR based on SDK.
1776         - Set SKIP_INSTALL on iOS.
1777         * Configurations/WebProcessShim.xcconfig:
1778         - Set OTHER_LDFLAGS based on platform-specific values.
1779
1780 2014-12-19  Jessie Berlin  <jberlin@webkit.org>
1781
1782         Build fix.
1783
1784         * UIProcess/mac/WebInspectorProxyMac.mm:
1785
1786 2014-12-19  Jessie Berlin  <jberlin@webkit.org>
1787
1788         Simplify the build fixes from r177615 and r177617.
1789
1790         Rubber-stamped by Dan Bernstein.
1791
1792         * UIProcess/mac/WebInspectorProxyMac.mm:
1793
1794 2014-12-19  Jessie Berlin  <jberlin@webkit.org>
1795
1796         Another attempt at a speculative build fix.
1797
1798         * UIProcess/mac/WebInspectorProxyMac.mm:
1799
1800 2014-12-19  Jessie Berlin  <jberlin@webkit.org>
1801
1802         Speculative build fix after r177610.
1803
1804         * UIProcess/mac/WebInspectorProxyMac.mm:
1805
1806 2014-12-19  Chris Dumez  <cdumez@apple.com>
1807
1808         [iOS] Add didEnterFullscreen / didExitFullscreen callbacks to WKUIDelegatePrivate
1809         https://bugs.webkit.org/show_bug.cgi?id=139835
1810         <rdar://problem/19312042>
1811
1812         Reviewed by Anders Carlsson.
1813
1814         Add didEnterFullscreen / didExitFullscreen callbacks to WKUIDelegatePrivate
1815         so that they can be implemented in MobileSafari.
1816
1817         * UIProcess/API/APIUIClient.h:
1818         (API::UIClient::didEnterFullscreen):
1819         (API::UIClient::didExitFullscreen):
1820         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1821         * UIProcess/Cocoa/UIDelegate.h:
1822         * UIProcess/Cocoa/UIDelegate.mm:
1823         (WebKit::UIDelegate::setDelegate):
1824         (WebKit::UIDelegate::UIClient::didEnterFullscreen):
1825         (WebKit::UIDelegate::UIClient::didExitFullscreen):
1826         * UIProcess/WebPageProxy.cpp:
1827         (WebKit::WebPageProxy::didEnterFullscreen):
1828         (WebKit::WebPageProxy::didExitFullscreen):
1829         * UIProcess/WebPageProxy.h:
1830         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1831         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
1832         (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
1833
1834 2014-12-19  Joseph Pecoraro  <pecoraro@apple.com>
1835
1836         Web Inspector: Inspector does not reopen correctly after Inspector Process crashes
1837         https://bugs.webkit.org/show_bug.cgi?id=139838
1838
1839         Reviewed by Timothy Hatcher.
1840
1841         When the WebContentProcess holding the Inspector Frontend crashes, we
1842         would properly tear down the inspector objects. However, the next time
1843         the inspector is opened, when creating the new page in the Inspector
1844         Page Group, a WebPageProxy is created with a Terminated WebProcessProxy.
1845
1846         That Terminated WebProcessProxy is automatically replaced with the next
1847         load request is given. The newly created process was missing the
1848         message listeners and assumed URL access settings that the
1849         WebInspectorProxy had set on the old process.
1850
1851         So, WebInspectorProxy now listens for and resets the process properties
1852         when the inspector process is recreated.
1853
1854         * UIProcess/WebInspectorProxy.h:
1855         * UIProcess/WebInspectorProxy.cpp:
1856         (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
1857         Reset process properties when the process is relaunched.
1858
1859         (WebKit::WebInspectorProxy::createInspectorPage):
1860         (WebKit::WebInspectorProxy::didClose):
1861         Save connection identifier if we need to establish connections later.
1862
1863         * UIProcess/mac/WebInspectorProxyMac.mm:
1864         (-[WKWebInspectorProxyObjCAdapter didRelaunchProcess]):
1865         (-[WKWebInspectorWKView _didRelaunchProcess]):
1866         (WebKit::WebInspectorProxy::closeTimerFired):
1867         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1868         Send WebInspectorProxy a message when the process underlying the
1869         WKView is relaunched.
1870
1871 2014-12-19  Anders Carlsson  <andersca@apple.com>
1872
1873         Get rid of the hardcoded set of structs in the message generation script
1874         https://bugs.webkit.org/show_bug.cgi?id=139844
1875
1876         Reviewed by Tim Horton.
1877
1878         Instead, make it possible to use 'struct' in front of the type name to declare that the type is a struct.
1879
1880         * DatabaseProcess/DatabaseProcess.messages.in:
1881         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1882         * NetworkProcess/NetworkProcess.messages.in:
1883         * PluginProcess/PluginProcess.messages.in:
1884         * PluginProcess/WebProcessConnection.messages.in:
1885         * Scripts/webkit/messages.py:
1886         (struct_or_class):
1887         (forward_declarations_for_namespace):
1888         (forward_declarations_and_headers):
1889         * Scripts/webkit/model.py:
1890         (Parameter.__init__):
1891         * Scripts/webkit/parser.py:
1892         (parse_parameters_string):
1893         * UIProcess/Storage/StorageManager.messages.in:
1894         * UIProcess/WebContext.messages.in:
1895         * UIProcess/WebPageProxy.messages.in:
1896         * UIProcess/WebProcessProxy.messages.in:
1897         * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in:
1898         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1899         * WebProcess/OriginData/WebOriginDataManager.messages.in:
1900         * WebProcess/ResourceCache/WebResourceCacheManager.messages.in:
1901         * WebProcess/WebPage/DrawingArea.messages.in:
1902         * WebProcess/WebPage/WebPage.messages.in:
1903         * WebProcess/WebProcess.messages.in:
1904
1905 2014-12-19  Timothy Horton  <timothy_horton@apple.com>
1906
1907         Fix the build.
1908
1909         * UIProcess/API/mac/WKView.mm:
1910         (-[WKView _setIgnoresNonWheelEvents:]):
1911
1912 2014-12-19  Beth Dakin  <bdakin@apple.com>
1913
1914         Preview popovers don't show an arrow for large links
1915         https://bugs.webkit.org/show_bug.cgi?id=139842
1916         -and corresponding-
1917         <rdar://problem/19301470>
1918
1919         Reviewed by Tim Horton.
1920
1921         This patch addresses the case where the link is so large that there is no 
1922         available space on any side once you factor in screen padding. In that case, we 
1923         should give up early on not obscuring the link.
1924         * UIProcess/mac/WKPreviewPopoverAnimationController.mm:
1925         (-[WKPreviewPopoverAnimationController _targetSizeForPagePreview]):
1926         (-[WKPreviewPopoverAnimationController _effectivePaddingWithPreviewPadding:]):
1927         (-[WKPreviewPopoverAnimationController _maxSpaceAvailableOnYEdgeForOriginRect:withScreenRect:previewPadding:]):
1928         (-[WKPreviewPopoverAnimationController _maxSpaceAvailableOnXEdgeForOriginRect:withScreenRect:previewPadding:]):
1929         (-[WKPreviewPopoverAnimationController _preferredPopoverSizeWithPreviewPadding:forTargetSize:]):
1930
1931 2014-12-19  Timothy Horton  <timothy_horton@apple.com>
1932
1933         WKView's ignoresNonWheelEvents should ignore immediate actions
1934         https://bugs.webkit.org/show_bug.cgi?id=139839
1935         <rdar://problem/19312111>
1936
1937         Reviewed by Anders Carlsson.
1938
1939         * UIProcess/API/mac/WKView.mm:
1940         (-[WKView initWithFrame:context:configuration:webView:]):
1941         (-[WKView _setIgnoresNonWheelEvents:]):
1942         Install/uninstall the immediate action gesture recognizer when
1943         toggling ignoresNonWheelEvents.
1944
1945 2014-12-19  Csaba Osztrogonác  <ossy@webkit.org>
1946
1947         URTBF after r177593.
1948
1949         * PluginProcess/PluginProcess.h:
1950         * PluginProcess/unix/PluginProcessUnix.cpp:
1951         (WebKit::PluginProcess::platformInitializePluginProcess):
1952         * Shared/WebProcessCreationParameters.h:
1953         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1954         * WebProcess/WebProcess.h:
1955         * WebProcess/soup/WebProcessSoup.cpp:
1956         (WebKit::WebProcess::platformInitializeWebProcess):
1957
1958 2014-12-19  Anders Carlsson  <andersca@apple.com>
1959
1960         Use WebCore::MachSendRights for the compositing render server port
1961         https://bugs.webkit.org/show_bug.cgi?id=139834
1962
1963         Reviewed by Tim Horton.
1964
1965         * Platform/IPC/HandleMessage.h:
1966         (IPC::callMemberFunctionImpl):
1967         * Platform/mac/LayerHostingContext.h:
1968         * Platform/mac/LayerHostingContext.mm:
1969         (WebKit::LayerHostingContext::createForPort):
1970         * PluginProcess/PluginControllerProxy.h:
1971         * PluginProcess/PluginProcess.cpp:
1972         (WebKit::PluginProcess::PluginProcess):
1973         (WebKit::PluginProcess::initializePluginProcess):
1974         * PluginProcess/PluginProcess.h:
1975         (WebKit::PluginProcess::compositingRenderServerPort):
1976         * PluginProcess/mac/PluginControllerProxyMac.mm:
1977         (WebKit::PluginControllerProxy::compositingRenderServerPort):
1978         * PluginProcess/mac/PluginProcessMac.mm:
1979         (WebKit::PluginProcess::platformInitializePluginProcess):
1980         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1981         * Shared/Plugins/PluginProcessCreationParameters.h:
1982         * Shared/WebCoreArgumentCoders.h:
1983         * Shared/WebProcessCreationParameters.h:
1984         * Shared/mac/WebCoreArgumentCodersMac.mm:
1985         (IPC::ArgumentCoder<MachSendRight>::encode):
1986         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1987         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1988         * UIProcess/mac/WebContextMac.mm:
1989         (WebKit::WebContext::platformInitializeWebProcess):
1990         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1991         (WebKit::NPN_GetValue):
1992         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1993         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1994         (WebKit::NetscapePlugin::compositingRenderServerPort):
1995         (WebKit::NetscapePlugin::setLayerHostingMode):
1996         * WebProcess/Plugins/PluginController.h:
1997         * WebProcess/Plugins/PluginView.cpp:
1998         (WebKit::PluginView::compositingRenderServerPort):
1999         * WebProcess/Plugins/PluginView.h:
2000         * WebProcess/WebProcess.cpp:
2001         (WebKit::WebProcess::WebProcess):
2002         (WebKit::WebProcess::initializeWebProcess):
2003         * WebProcess/WebProcess.h:
2004         (WebKit::WebProcess::compositingRenderServerPort):
2005         * WebProcess/cocoa/WebProcessCocoa.mm:
2006         (WebKit::WebProcess::platformInitializeWebProcess):
2007
2008 2014-12-19  Andreas Kling  <akling@apple.com>
2009
2010         Ref-ify TextIterator API.
2011         <https://webkit.org/b/139823>
2012
2013         Reviewed by Antti Koivisto.
2014
2015         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
2016         (-[WKDOMTextIterator currentRange]):
2017
2018 2014-12-19  Commit Queue  <commit-queue@webkit.org>
2019
2020         Unreviewed, rolling out r177574.
2021         https://bugs.webkit.org/show_bug.cgi?id=139821
2022
2023         "Broke Production builds by installing
2024         libWebCoreTestSupport.dylib in the wrong directory" (Requested
2025         by ddkilzer on #webkit).
2026
2027         Reverted changeset:
2028
2029         "Switch from using PLATFORM_NAME to SDK selectors in WebCore,
2030         WebInspectorUI, WebKit, WebKit2"
2031         https://bugs.webkit.org/show_bug.cgi?id=139463
2032         http://trac.webkit.org/changeset/177574
2033
2034 2014-12-19  David Kilzer  <ddkilzer@apple.com>
2035
2036         Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
2037         <http://webkit.org/b/139463>
2038
2039         Reviewed by Mark Rowe.
2040
2041         * Configurations/All.xcconfig:
2042         - Only set EXCLUDED_SOURCE_FILE_NAMES on iOS.
2043         * Configurations/Base.xcconfig:
2044         - Only set FRAMEWORK_CONTENT_DIRECTORY, GCC_ENABLE_OBJC_GC and
2045           TOOLCHAINS on OS X.
2046         * Configurations/BaseLegacyProcess.xcconfig:
2047         - Only set SKIP_INSTALL on iOS.
2048         * Configurations/BaseTarget.xcconfig:
2049         - Set WEBKIT_FRAMEWORKS_DIR and UMBRELLA_FRAMEWORKS_DIR based on
2050           SDK, and simply them.
2051         * Configurations/BaseXPCService.xcconfig:
2052         - Set INSTALL_PATH_ACTUAL_Normal based on SDK.
2053         * Configurations/DebugRelease.xcconfig:
2054         - Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
2055         - Set WEBKIT_SYSTEM_INTERFACE_LIBRARY based on SDK.
2056         * Configurations/NetworkProcess.xcconfig:
2057         - Only set EXCLUDED_SHIM_FILE_NAME and CODE_SIGN_ENTITLEMENTS on
2058           iOS.
2059         * Configurations/NetworkService.Development.xcconfig:
2060         - Set INFOPLIST_FILE based on SDK.
2061         - Simplify CODE_SIGN_ENTITLEMENTS for iOS.
2062         * Configurations/NetworkService.xcconfig:
2063         - Set INFOPLIST_FILE based on SDK.
2064         - Simplify CODE_SIGN_ENTITLEMENTS for iOS.
2065         * Configurations/PluginProcess.xcconfig:
2066         - Only set EXCLUDED_SHIM_FILE_NAME and SKIP_INSTALL on iOS.
2067         * Configurations/PluginProcessShim.xcconfig:
2068         - Set OTHER_LDFLAGS based on SDK.
2069         * Configurations/PluginService.32.xcconfig:
2070         - Only set VALID_ARCHS on OS X.
2071         - Set OTHER_LDFLAGS based on platform-specific values.
2072         - Only set SKIP_INSTALL on iOS.
2073         * Configurations/PluginService.64.xcconfig:
2074         - Set ARCHS based on SDK.
2075         - Set OTHER_LDFLAGS based on platform-specific values.
2076         - Only set SKIP_INSTALL on iOS.
2077         * Configurations/PluginService.Development.xcconfig:
2078         - Only set SKIP_INSTALL on iOS.
2079         - Set OTHER_LDFLAGS based on platform-specific values.
2080         * Configurations/SecItemShim.xcconfig:
2081         - Set OTHER_LDFLAGS based on platform-specific values.
2082         * Configurations/Version.xcconfig:
2083         - Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
2084         * Configurations/WebContentProcess.xcconfig:
2085         - Only set EXCLUDED_SHIM_FILE_NAME on iOS.
2086         - Only set CODE_SIGN_ENTITLEMENTS on iOS Simulator.
2087         * Configurations/WebContentService.Development.xcconfig:
2088         - Set INFOPLIST_FILE and BUNDLE_LOCALIZATION_KEY based on SDK.
2089         - Only set CODE_SIGN_ENTITLEMENTS on iOS hardware.
2090         - Set OTHER_LDFLAGS based on platform-specific values.
2091         * Configurations/WebContentService.xcconfig: Ditto.
2092         * Configurations/WebKit.xcconfig:
2093         - Set FRAMEWORK_AND_LIBRARY_LDFLAGS, SECTORDER_FLAGS, and
2094           WK_API_AVAILABILITY_ENABLED based on SDK.
2095         - Set OTHER_LDFLAGS based on platform-specific values.
2096         - Only set EXCLUDED_SOURCE_FILE_NAMES on iOS.
2097         * Configurations/WebKit2.xcconfig:
2098         - Set INSTALL_PATH, INSTALL_PATH_ACTUAL, DYLIB_INSTALL_NAME_BASE,
2099           NORMAL_WEBKIT2_FRAMEWORKS_DIR, WEBKIT2_FRAMEWORKS_DIR and
2100           NORMAL_PRODUCTION_FRAMEWORKS_DIR based on SDK.
2101         - Set SKIP_INSTALL on iOS.
2102         * Configurations/WebProcessShim.xcconfig:
2103         - Set OTHER_LDFLAGS based on platform-specific values.
2104
2105 2014-12-18  Jon Honeycutt  <jhoneycutt@apple.com>
2106
2107         iOS build fix.
2108
2109         * UIProcess/mac/WKPreviewPopoverAnimationController.mm:
2110
2111 2014-12-18  Jessie Berlin  <jberlin@webkit.org>
2112
2113         Speculative build-fix after r177522.
2114
2115         * UIProcess/mac/WKPreviewPopoverAnimationController.mm:
2116         (-[WKPreviewPopoverAnimationController setPreviewOverrideImage:]):
2117
2118 2014-12-18  Andreas Kling  <akling@apple.com>
2119
2120         Ref-ify various Document-related things.
2121         <https://webkit.org/b/139796>
2122
2123         Reviewed by Anders Carlsson.
2124
2125         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
2126         (-[WKDOMDocument createTextNode:]):
2127
2128 2014-12-18  Beth Dakin  <bdakin@apple.com>
2129
2130         Speculative build fix.
2131
2132         * UIProcess/ProcessThrottler.h:
2133
2134 2014-12-18  Anders Carlsson  <andersca@apple.com>
2135
2136         Use MachSendRight in WebKit2
2137         https://bugs.webkit.org/show_bug.cgi?id=139800
2138
2139         Reviewed by Tim Horton.
2140
2141         * Platform/IPC/ArgumentEncoder.h:
2142         (IPC::ArgumentEncoder::encode):
2143         (IPC::ArgumentEncoder::operator<<):
2144         * Shared/WebCoreArgumentCoders.h:
2145         * Shared/mac/RemoteLayerBackingStore.mm:
2146         (WebKit::RemoteLayerBackingStore::encode):
2147         (WebKit::RemoteLayerBackingStore::decode):
2148         * Shared/mac/WebCoreArgumentCodersMac.mm:
2149         (IPC::ArgumentCoder<MachSendRight>::encode):
2150         (IPC::ArgumentCoder<MachSendRight>::decode):
2151
2152 2014-12-18  Gavin Barraclough  <barraclough@apple.com>
2153
2154         Remove custom token mechanism from ProcessThrottler
2155         https://bugs.webkit.org/show_bug.cgi?id=139744
2156
2157         Reviewed by Geoff Garen.
2158
2159         ProcessThrottler implements its own token-based counter mechanism, but should
2160         just use RefCounter.
2161
2162         * UIProcess/Cocoa/NavigationState.h:
2163             - remove std::unique_ptr.
2164         * UIProcess/Cocoa/NavigationState.mm:
2165         (WebKit::NavigationState::didChangeIsLoading):
2166             - remove std::make_unique.
2167         * UIProcess/GenericCallback.h:
2168         (WebKit::CallbackBase::CallbackBase):
2169         (WebKit::GenericCallback::create):
2170         (WebKit::GenericCallback::GenericCallback):
2171         (WebKit::CallbackMap::put):
2172             - remove std::unique_ptr.
2173         * UIProcess/ProcessThrottler.cpp:
2174         (WebKit::ProcessThrottler::ProcessThrottler):
2175         (WebKit::m_backgroundCounter):
2176         (WebKit::ProcessThrottler::assertionState):
2177         (WebKit::ProcessThrottler::updateAssertion):
2178         (WebKit::ProcessThrottler::ForegroundActivityToken::ForegroundActivityToken): Deleted.
2179         (WebKit::ProcessThrottler::ForegroundActivityToken::~ForegroundActivityToken): Deleted.
2180         (WebKit::ProcessThrottler::BackgroundActivityToken::BackgroundActivityToken): Deleted.
2181         (WebKit::ProcessThrottler::BackgroundActivityToken::~BackgroundActivityToken): Deleted.
2182             - removed old implementation of ForegroundActivityToken/BackgroundActivityToken.
2183         * UIProcess/ProcessThrottler.h:
2184         (WebKit::ProcessThrottler::foregroundActivityToken):
2185         (WebKit::ProcessThrottler::backgroundActivityToken):
2186             - added accessors to create activity tokens.
2187         (WebKit::ProcessThrottler::weakPtr): Deleted.
2188             - removed members replaced by RefCounter types.
2189         * UIProcess/WebPageProxy.cpp:
2190         (WebKit::WebPageProxy::updateActivityToken):
2191         (WebKit::WebPageProxy::validateCommand):
2192         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
2193         (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
2194         (WebKit::WebPageProxy::getSourceForFrame):
2195         (WebKit::WebPageProxy::getContentsAsString):
2196         (WebKit::WebPageProxy::getBytecodeProfile):
2197         (WebKit::WebPageProxy::getContentsAsMHTMLData):
2198         (WebKit::WebPageProxy::getSelectionOrContentsAsString):
2199         (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
2200         (WebKit::WebPageProxy::getMainResourceDataOfFrame):
2201         (WebKit::WebPageProxy::getResourceDataFromFrame):
2202         (WebKit::WebPageProxy::getWebArchiveOfFrame):
2203         (WebKit::WebPageProxy::getMarkedRangeAsync):
2204         (WebKit::WebPageProxy::getSelectedRangeAsync):
2205         (WebKit::WebPageProxy::characterIndexForPointAsync):
2206         (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
2207         (WebKit::WebPageProxy::takeSnapshot):
2208         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
2209             - remove std::make_unique.
2210         * UIProcess/WebPageProxy.h:
2211             - remove std::unique_ptr.
2212         * UIProcess/WebProcessProxy.cpp:
2213         (WebKit::WebProcessProxy::setIsHoldingLockedFiles):
2214             - remove std::make_unique.
2215         * UIProcess/WebProcessProxy.h:
2216             - remove std::unique_ptr.
2217         * UIProcess/ios/WebPageProxyIOS.mm:
2218         (WebKit::WebPageProxy::selectWithGesture):
2219         (WebKit::WebPageProxy::updateSelectionWithTouches):
2220         (WebKit::WebPageProxy::requestAutocorrectionData):
2221         (WebKit::WebPageProxy::applyAutocorrection):
2222         (WebKit::WebPageProxy::executeEditCommand):
2223         (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
2224         (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
2225         (WebKit::WebPageProxy::selectPositionAtPoint):
2226         (WebKit::WebPageProxy::beginSelectionInDirection):
2227         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
2228         (WebKit::WebPageProxy::requestDictationContext):
2229         (WebKit::WebPageProxy::requestAutocorrectionContext):
2230         (WebKit::WebPageProxy::selectWithTwoTouches):
2231         (WebKit::WebPageProxy::moveSelectionByOffset):
2232         (WebKit::WebPageProxy::focusNextAssistedNode):
2233             - remove std::make_unique.
2234         * UIProcess/mac/WebPageProxyMac.mm:
2235         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
2236             - remove std::make_unique.
2237
2238 2014-12-18  Gavin Barraclough  <barraclough@apple.com>
2239
2240         Add strong typing to RefCounter interface, return value as a bool.
2241         https://bugs.webkit.org/show_bug.cgi?id=139776
2242
2243         Reviewed by Geoff Garen.
2244
2245         Currently all token vended by a RefCounter have the same type - Ref<RefCounter::Count>.
2246         This means there is no compile time type checking to prevent mistakes. Update the count()
2247         method to token<>(), templated on type used to identify the token being returned.
2248         Calls to token<T>() will return a result of type RefCounter::Token<T>.
2249
2250         There are a few problems with the fact the counter will return you an exact count of the
2251         number of outstanding tokens:
2252           - It is desirable to only fire the callback on zero-edge changes; it is more consistent
2253             to do so if the value is only readable as a boolean.
2254           - It is desirable to provide the value as an argument to the callback, however to make
2255             this useful for integer values it is also necessary to indicate the direction of change
2256             (0->1 is often interesting where 2->1 is not).
2257           - There is a mismatch between the precision of returning a count, and the inherent
2258             imprecision of a token based mechanism, where it may be difficult to guarantee
2259             absolutely no unnecessary refcount churn, and thus unintentional counter values.
2260
2261         Removed PluginProcessManager::m_processSuppressionEnabled. Now the callback only fires on
2262         zero-edge transitions we no longer need this to filter changes.
2263
2264         * UIProcess/Plugins/PluginProcessManager.cpp:
2265         (WebKit::PluginProcessManager::PluginProcessManager):
2266             - updateProcessSuppressionState -> updateProcessSuppressionDisabled.
2267         * UIProcess/Plugins/PluginProcessManager.h:
2268         (WebKit::PluginProcessManager::processSuppressionDisabledForPageCount): Deleted.
2269         (WebKit::PluginProcessManager::processSuppressionDisabledToken):
2270             - processSuppressionDisabledForPageCount -> processSuppressionDisabledToken.
2271         (WebKit::PluginProcessManager::processSuppressionEnabled): Deleted.
2272         (WebKit::PluginProcessManager::processSuppressionDisabled):
2273             - processSuppressionEnabled -> processSuppressionDisabled.
2274         * UIProcess/Plugins/PluginProcessProxy.cpp:
2275         (WebKit::PluginProcessProxy::didFinishLaunching):
2276             - processSuppressionEnabled -> processSuppressionDisabled.
2277         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
2278         (WebKit::PluginProcessManager::updateProcessSuppressionState): Deleted.
2279         (WebKit::PluginProcessManager::updateProcessSuppressionDisabled):
2280             - updateProcessSuppressionState -> updateProcessSuppressionDisabled
2281         * UIProcess/ProcessThrottler.h:
2282             - added UserObservablePageToken, ProcessSuppressionDisabledToken types.
2283         * UIProcess/WebContext.cpp:
2284         (WebKit::WebContext::WebContext):
2285         (WebKit::m_processSuppressionDisabledForPageCounter):
2286             - lambda now has bool argument.
2287         * UIProcess/WebContext.h:
2288         (WebKit::WebContext::userObservablePageCount):
2289         (WebKit::WebContext::processSuppressionDisabledForPageCount):
2290             - count() -> token<>(), changed return type.
2291         * UIProcess/WebPageProxy.h:
2292             - changed types of token members.
2293         * UIProcess/mac/WebContextMac.mm:
2294         (WebKit::WebContext::updateProcessSuppressionState):
2295             renamed m_pluginProcessManagerProcessSuppressionDisabledCount -> m_pluginProcessManagerProcessSuppressionDisabledToken.
2296
2297 2014-12-18  Timothy Horton  <timothy_horton@apple.com>
2298
2299         Try to fix some builds.
2300
2301         * UIProcess/mac/WKPreviewPopoverAnimationController.mm:
2302
2303 2014-12-18  Anders Carlsson  <andersca@apple.com>
2304
2305         Fix build.
2306
2307         * UIProcess/API/mac/WKViewInternal.h:
2308
2309 2014-12-18  Chris Dumez  <cdumez@apple.com>
2310
2311         Add missing availability annotation on @property _featureCounterEnabled
2312         https://bugs.webkit.org/show_bug.cgi?id=139794
2313         <rdar://problem/19266254>
2314
2315         Rubber-stamped by Dan Bernstein.
2316
2317         Follow-up to r177526 adding availability annotation on @property
2318         _featureCounterEnabled.
2319
2320         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2321
2322 2014-12-18  Beth Dakin  <bdakin@apple.com>
2323
2324         Need to re-enable action menus
2325         https://bugs.webkit.org/show_bug.cgi?id=139795
2326         -and corresponding-
2327         rdar://problem/19299367
2328
2329         Reviewed by Tim Horton.
2330
2331         Re-enable the menus by un-commenting the code to create the menu and controller.
2332         * UIProcess/API/mac/WKView.mm:
2333         (-[WKView initWithFrame:context:configuration:webView:]):
2334
2335         performActionMenuHitTest already takes a parameter indicating whether the hit test 
2336         is for an immediate action or not. The callback didPerformActionMenuHitTest needs 
2337         that information too so that it knows whether to call into the 
2338         ActionMenuController or the ImmediateActionController.
2339         (-[WKView _didPerformActionMenuHitTest:forImmediateAction:userData:]):
2340         (-[WKView _didPerformActionMenuHitTest:userData:]): Deleted.
2341         * UIProcess/API/mac/WKViewInternal.h:
2342         * UIProcess/PageClient.h:
2343         * UIProcess/WebPageProxy.cpp:
2344         (WebKit::WebPageProxy::didPerformActionMenuHitTest):
2345         * UIProcess/WebPageProxy.h:
2346         * UIProcess/WebPageProxy.messages.in:
2347         * UIProcess/mac/PageClientImpl.h:
2348         * UIProcess/mac/PageClientImpl.mm:
2349         (WebKit::PageClientImpl::didPerformActionMenuHitTest):
2350         * WebProcess/WebPage/mac/WebPageMac.mm:
2351         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2352
2353 2014-12-18  Chris Dumez  <cdumez@apple.com>
2354
2355         [WK2] Stop using WKPreferencesPrivate API to toggle FeatureCounter support
2356         https://bugs.webkit.org/show_bug.cgi?id=139794
2357         <rdar://problem/19266254>
2358
2359         Reviewed by Anders Carlsson.
2360
2361         Stop using WKPreferencesPrivate API to toggle FeatureCounter support
2362         and use WKWebViewConfigurationPrivate API instead. FeatureCounter is
2363         not meant to change state after the view has been created.
2364
2365         * UIProcess/API/C/WKPreferences.cpp:
2366         (WKPreferencesSetFeatureCounterEnabled): Deleted.
2367         (WKPreferencesGetFeatureCounterEnabled): Deleted.
2368         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2369         * UIProcess/API/Cocoa/WKPreferences.mm:
2370         (-[WKPreferences _featureCounterEnabled]): Deleted.
2371         (-[WKPreferences _setFeatureCounterEnabled:]): Deleted.
2372         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2373         * UIProcess/API/Cocoa/WKWebView.mm:
2374         (-[WKWebView initWithFrame:configuration:]):
2375         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2376         (-[WKWebViewConfiguration init]):
2377         (-[WKWebViewConfiguration copyWithZone:]):
2378         (-[WKWebViewConfiguration _featureCounterEnabled]):
2379         (-[WKWebViewConfiguration _setFeatureCounterEnabled:]):
2380         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2381
2382 2014-12-18  Timothy Horton  <timothy_horton@apple.com>
2383
2384         Fix the build.
2385
2386         * UIProcess/API/mac/WKView.mm:
2387         (-[WKView _setPreviewOverrideImage:]):
2388
2389 2014-12-18  Timothy Horton  <timothy_horton@apple.com>
2390
2391         Change page preview loading order, and add a TextIndicator
2392         https://bugs.webkit.org/show_bug.cgi?id=139793
2393         <rdar://problem/19288547>
2394
2395         Reviewed by Beth Dakin.
2396
2397         * Shared/mac/ActionMenuHitTestResult.h:
2398         * Shared/mac/ActionMenuHitTestResult.mm:
2399         (WebKit::ActionMenuHitTestResult::encode):
2400         (WebKit::ActionMenuHitTestResult::decode):
2401         * WebProcess/WebPage/mac/WebPageMac.mm:
2402         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2403         Build a TextIndicator for links.
2404
2405         * UIProcess/API/Cocoa/WKViewPrivate.h:
2406         * UIProcess/API/mac/WKView.mm:
2407         (-[WKView _dismissContentRelativeChildWindows]):
2408         (-[WKView _setPreviewTitle:]):
2409         (-[WKView _setPreviewLoading:]):
2410         Remove unneeded WK_API_ENABLED #ifs.
2411
2412         (-[WKView _setPreviewOverrideImage:]):
2413         Add; forward to WKImmediateActionController.
2414
2415         * UIProcess/mac/WKImmediateActionController.h:
2416         * UIProcess/mac/WKImmediateActionController.mm:
2417         (-[WKImmediateActionController willDestroyView:]):
2418         Shut down the WKPreviewPopoverAnimationController.
2419
2420         (-[WKImmediateActionController _clearImmediateActionState]):
2421         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
2422         Don't build an immediate action item here; we'll always build it in
2423         willBeginAnimation, and the one we build here is likely to be wrong.
2424
2425         (-[WKImmediateActionController _defaultAnimationController]):
2426         (-[WKImmediateActionController hidePreview]):
2427         (-[WKImmediateActionController setPreviewTitle:]):
2428         (-[WKImmediateActionController setPreviewLoading:]):
2429         (-[WKImmediateActionController setPreviewOverrideImage:]):
2430         (-[WKImmediateActionController _animationControllerForCustomPreview]):
2431         (-[WKImmediateActionController _createPreviewPopoverIfNeededForURL:]): Deleted.
2432         (-[WKImmediateActionController popoverWillClose:]): Deleted.
2433         (targetSizeFitsInAvailableSpace): Deleted.
2434         (-[WKImmediateActionController largestPopoverSize]): Deleted.
2435         (-[WKImmediateActionController _preferredPopoverSizeWithPreviewPadding:]): Deleted.
2436         (-[WKImmediateActionController pagePreviewViewController:viewForPreviewingURL:initialFrameSize:]): Deleted.
2437         (-[WKImmediateActionController pagePreviewViewController:titleForPreviewOfURL:]): Deleted.
2438         (-[WKImmediateActionController pagePreviewViewControllerWasClicked:]): Deleted.
2439         Move preview popover code to WKPreviewPopoverAnimationController.
2440         Install and uninstall the link text indicator when necessary.
2441
2442         * UIProcess/mac/WKPagePreviewViewController.h:
2443         * UIProcess/mac/WKPagePreviewViewController.mm:
2444         (-[WKPagePreviewViewController setLoading:]):
2445         (-[WKPagePreviewViewController loadView]):
2446         (-[WKPagePreviewViewController replacePreviewWithImage:atSize:]):
2447         Allow overriding the preview with a full-view NSImage.
2448         Hide the preview view until the loading spinner goes away.
2449
2450         * UIProcess/mac/WKPreviewPopoverAnimationController.h: Copied from Source/WebKit2/UIProcess/mac/WKImmediateActionController.h.
2451         * UIProcess/mac/WKPreviewPopoverAnimationController.mm: Added.
2452         (+[WKPreviewPopoverAnimationController _shouldImmediatelyShowPreview]):
2453         (-[WKPreviewPopoverAnimationController initWithURL:view:page:originRect:eventLocationInView:]):
2454         (-[WKPreviewPopoverAnimationController close]):
2455         (-[WKPreviewPopoverAnimationController setPreviewLoading:]):
2456         (-[WKPreviewPopoverAnimationController setPreviewOverrideImage:]):
2457         If we have shown the popover, choose a size strictly smaller than
2458         its current size.
2459
2460         (-[WKPreviewPopoverAnimationController _hidePreview]):
2461         (-[WKPreviewPopoverAnimationController setPreviewTitle:]):
2462         (-[WKPreviewPopoverAnimationController _createPreviewPopover]):
2463         (-[WKPreviewPopoverAnimationController _showPreview]):
2464         (targetSizeFitsInAvailableSpace):
2465         (-[WKPreviewPopoverAnimationController largestPopoverSize]):
2466         (-[WKPreviewPopoverAnimationController _targetSizeForPagePreview]):
2467         (-[WKPreviewPopoverAnimationController _preferredPopoverSizeWithPreviewPadding:forTargetSize:]):
2468         (-[WKPreviewPopoverAnimationController _previewWatchdogTimerFired:]):
2469         (-[WKPreviewPopoverAnimationController recognizerWillBeginAnimation:]):
2470         (-[WKPreviewPopoverAnimationController recognizerDidUpdateAnimation:]):
2471         (-[WKPreviewPopoverAnimationController recognizerDidCancelAnimation:]):
2472         (-[WKPreviewPopoverAnimationController recognizerDidCompleteAnimation:]):
2473         (-[WKPreviewPopoverAnimationController recognizerDidDismissAnimation:]):
2474         (-[WKPreviewPopoverAnimationController pagePreviewViewController:viewForPreviewingURL:initialFrameSize:]):
2475         (-[WKPreviewPopoverAnimationController pagePreviewViewController:titleForPreviewOfURL:]):
2476         (-[WKPreviewPopoverAnimationController pagePreviewViewControllerWasClicked:]):
2477         (-[WKPreviewPopoverAnimationController popoverWillClose:]):
2478         Move code in from WKImmediateActionController.
2479         Forward NSImmediateActionAnimationControllerDelegate methods
2480         to the popover's animation controller if we've popped it.
2481         Pop the popover if we've loaded or 1 second has passed, whichever
2482         comes first.
2483
2484         * WebKit2.xcodeproj/project.pbxproj:
2485
2486 2014-12-18  Anders Carlsson  <andersca@apple.com>
2487
2488         Add a MachSendRight class to WebCore and use it in IOSurface
2489         https://bugs.webkit.org/show_bug.cgi?id=139787
2490
2491         Reviewed by Tim Horton.
2492
2493         * Shared/mac/RemoteLayerBackingStore.mm:
2494         (WebKit::RemoteLayerBackingStore::encode):
2495
2496 2014-12-18  Daniel Bates  <dabates@apple.com>
2497
2498         Attempt to fix the iOS build after <http://trac.webkit.org/changeset/177486>
2499         (https://bugs.webkit.org/show_bug.cgi?id=139755)
2500
2501         * WebProcess/WebPage/ios/WebPageIOS.mm:
2502         (WebKit::WebPage::selectWithGesture): Wrap return value of Range::create() in RefPtr<Range>()
2503         to make the the compiler happy since it wants clauses of the ternary operator to have the same data type
2504         and Ref<Range> object does not support nullptr.
2505         (WebKit::WebPage::selectWordBackward): Substitute Ref::ptr() for PassRefPtr::get().
2506         (WebKit::WebPage::moveSelectionByOffset): Ditto.
2507         (WebKit::WebPage::selectPositionAtPoint): Ditto.
2508         (WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
2509         (WebKit::WebPage::requestDictationContext): Ditto.
2510         (WebKit::computeAutocorrectionContext): Ditto.
2511
2512 2014-12-18  Antti Koivisto  <antti@apple.com>
2513
2514         Remove alwaysUseBaselineOfPrimaryFont setting
2515         https://bugs.webkit.org/show_bug.cgi?id=139770
2516
2517         Reviewed by Anders Carlsson.
2518
2519         * Shared/WebPreferencesDefinitions.h:
2520         * WebProcess/WebPage/WebPage.cpp:
2521         (WebKit::WebPage::updatePreferences):
2522
2523 2014-12-18  Adrian Perez de Castro  <aperez@igalia.com>
2524
2525         [GTK] Implement webkit_web_view_is_playing_audio()
2526         https://bugs.webkit.org/show_bug.cgi?id=138918
2527
2528         Reviewed by Carlos Garcia Campos.
2529
2530         Implements webkit_web_view_is_playing_audio(), and overrides
2531         UIClient::isPlayingAudioDidChange() to be able to emit change
2532         notification signals for the new WebKitWebView::is-playing-audio
2533         property.
2534
2535         * UIProcess/API/gtk/WebKitUIClient.cpp:
2536         (isPlayingAudioDidChange): Added.
2537         * UIProcess/API/gtk/WebKitWebView.cpp:
2538         (webkitWebViewIsPlayingAudioChanged): Helper function to emit the
2539         emit the notify::is-playing-audio signal when needed.
2540         (webkitWebViewGetProperty): Handle the WebKitWebView::is-playing-audio
2541         property.
2542         (webkit_web_view_class_init): Install the
2543         WebKitWebView::is-playing-audio property.
2544         (webkit_web_view_is_playing_audio): Added.
2545         * UIProcess/API/gtk/WebKitWebView.h:
2546         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2547         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
2548         webkit_web_view_is_playing_audio() to the list of public API
2549         functions.
2550
2551 2014-12-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2552
2553         [GTK] Allow to build with ENABLE_NETWORK_CACHE
2554         https://bugs.webkit.org/show_bug.cgi?id=139728
2555
2556         Reviewed by Antti Koivisto.
2557
2558         Just make it build for now.
2559
2560         * CMakeLists.txt: Add new files to compilation.
2561         * NetworkProcess/NetworkResourceLoader.cpp:
2562         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Use
2563         ENABLE(SHAREABLE_RESOURCE) when ShareableResource is used.
2564         * NetworkProcess/cache/NetworkCache.cpp:
2565         (WebKit::decodeStorageEntry): Ditto.
2566         (WebKit::makeCacheKey): Use ENABLE(CACHE_PARTITIONING) for ResourceRequest::cachePartition().
2567         * NetworkProcess/cache/NetworkCache.h:
2568         * NetworkProcess/cache/NetworkCacheStorage.h:
2569         (WebKit::NetworkCacheStorage::Data::isNull): Move implementation
2570         to platform specific files.
2571         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2572         (WebKit::NetworkCacheStorage::Data::isNull): Moved from the header.
2573         * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Added.
2574         (WebKit::NetworkCacheStorage::Data::Data):
2575         (WebKit::NetworkCacheStorage::Data::data):
2576         (WebKit::NetworkCacheStorage::Data::isNull):
2577         (WebKit::NetworkCacheStorage::open):
2578         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
2579         (WebKit::NetworkCacheStorage::initializeKeyFilter):
2580         (WebKit::NetworkCacheStorage::removeEntry):
2581         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
2582         (WebKit::NetworkCacheStorage::dispatchPendingRetrieveOperations):
2583         (WebKit::NetworkCacheStorage::retrieve):
2584         (WebKit::NetworkCacheStorage::store):
2585         (WebKit::NetworkCacheStorage::setMaximumSize):
2586         (WebKit::NetworkCacheStorage::clear):
2587         * PlatformGTK.cmake: Add NetworkCacheStorageSoup.cpp.
2588         * config.h:
2589
2590 2014-12-17  Dan Bernstein  <mitz@apple.com>
2591
2592         <rdar://problem/19282508> WebKitLegacy is unusable due to bad dylib identifier
2593         https://bugs.webkit.org/show_bug.cgi?id=139760
2594
2595         Reviewed by Anders Carlsson.
2596
2597         * Configurations/WebKit2.xcconfig:
2598
2599 2014-12-17  Beth Dakin  <bdakin@apple.com>
2600
2601         Page previews are sometimes sized much smaller than it seems they should be
2602         https://bugs.webkit.org/show_bug.cgi?id=139754
2603         -and corresponding-
2604         rdar://problem/19286550        
2605
2606         Reviewed by Tim Horton.
2607
2608         Increase the minimum size and add in a missing else!!
2609         * UIProcess/mac/WKImmediateActionController.mm:
2610         (-[WKImmediateActionController _preferredPopoverSizeWithPreviewPadding:]):
2611
2612 2014-12-17  Anders Carlsson  <andersca@apple.com>
2613
2614         Ref-ify WebPageProxy and WebProcessProxy creation functions
2615         https://bugs.webkit.org/show_bug.cgi?id=139751
2616
2617         Reviewed by Andreas Kling.
2618
2619         * UIProcess/WebContext.cpp:
2620         (WebKit::WebContext::createNewWebProcess):
2621         * UIProcess/WebPageProxy.cpp:
2622         (WebKit::WebPageProxy::create):
2623         * UIProcess/WebPageProxy.h:
2624         * UIProcess/WebProcessProxy.cpp:
2625         (WebKit::WebProcessProxy::create):
2626         (WebKit::WebProcessProxy::createWebPage):
2627         * UIProcess/WebProcessProxy.h:
2628
2629 2014-12-17  Joseph Pecoraro  <pecoraro@apple.com>
2630
2631         Unreviewed iOS Build Fix after r177459.
2632
2633         * UIProcess/ios/WebInspectorProxyIOS.mm:
2634         (WebKit::WebInspectorProxy::platformInvalidate):
2635         (WebKit::WebInspectorProxy::platformHide):
2636         Add missing WebInspectorProxy platform methods.
2637
2638 2014-12-17  Enrica Casucci  <enrica@apple.com>
2639
2640         [iOS] Define button and action should respect profile settings.
2641         https://bugs.webkit.org/show_bug.cgi?id=139739
2642         rdar://problem/15461887
2643
2644         Reviewed by Joseph Pecoraro.
2645
2646         * UIProcess/ios/WKContentViewInteraction.mm:
2647         (-[WKContentView canPerformAction:withSender:]):
2648         (-[WKContentView _define:]):
2649
2650 2014-12-17  Joseph Pecoraro  <pecoraro@apple.com>
2651
2652         Web Inspector: [Mac] Occosional Crashes Closing Inspector
2653         https://bugs.webkit.org/show_bug.cgi?id=139740
2654
2655         Reviewed by Timothy Hatcher.
2656
2657         * UIProcess/WebPageProxy.cpp:
2658         (WebKit::WebPageProxy::didReceiveEvent):
2659         The WebPageProxy could have gotten destroyed in handling (e.g. keyboard shortcut
2660         to close the Inspector Window), so protect the object to avoid destruction
2661         during handling.
2662
2663         * UIProcess/WebInspectorProxy.h:
2664         * UIProcess/WebPageProxy.cpp:
2665         Add platformInvalidate opportunity for the platform to do invalidation work.
2666
2667         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2668         (WebKit::WebInspectorProxy::platformInvalidate):
2669         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2670         (WebKit::WebInspectorProxy::platformInvalidate):
2671         Empty implementations, these ports do not need to do anything.
2672
2673         * UIProcess/WebInspectorProxy.h:
2674         * UIProcess/mac/WebInspectorProxyMac.mm:
2675         (WebKit::WebInspectorProxy::closeTimerFired):
2676         (WebKit::WebInspectorProxy::platformDidClose):
2677         (WebKit::WebInspectorProxy::platformInvalidate):
2678         When closing / invalidating make sure we close the WKView to clear client
2679         for any delayed callbacks.
2680
2681 2014-12-17  Chris Dumez  <cdumez@apple.com>
2682
2683         [iOS] Make it possible to toggle FeatureCounter support at runtime
2684         https://bugs.webkit.org/show_bug.cgi?id=139688
2685         <rdar://problem/19266254>
2686
2687         Reviewed by Andreas Kling.
2688
2689         Add private settings API to toggle FeatureCounter support on Safari and
2690         MobileSafari.
2691
2692         * Shared/WebPreferencesDefinitions.h:
2693         * UIProcess/API/C/WKPreferences.cpp:
2694         (WKPreferencesSetFeatureCounterEnabled):
2695         (WKPreferencesGetFeatureCounterEnabled):
2696         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2697         * UIProcess/API/Cocoa/WKPreferences.mm:
2698         (-[WKPreferences _featureCounterEnabled]):
2699         (-[WKPreferences _setFeatureCounterEnabled:]):
2700         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2701         * WebProcess/WebPage/WebPage.cpp:
2702         (WebKit::WebPage::updatePreferences):
2703
2704 2014-12-17  Anders Carlsson  <andersca@apple.com>
2705
2706         Clean up SQL statement building in SQLiteIDBCursor
2707         https://bugs.webkit.org/show_bug.cgi?id=139741
2708
2709         Reviewed by Andreas Kling.
2710
2711         This vastly simplifies the code and gets rid of the last
2712         uses of DEPRECATED_DEFINE_STATIC_LOCAL in WebKit2.
2713
2714         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2715         (WebKit::buildIndexStatement):
2716         (WebKit::buildObjectStoreStatement):
2717         (WebKit::SQLiteIDBCursor::establishStatement):
2718         (WebKit::getIndexStatement): Deleted.
2719         (WebKit::getObjectStoreStatement): Deleted.
2720
2721 2014-12-17  Andreas Kling  <akling@apple.com>
2722
2723         Purge PassRefPtr from Frame.
2724         <https://webkit.org/b/139731>
2725
2726         Reviewed by Anders Carlsson.
2727
2728         * WebProcess/WebPage/WebFrame.cpp:
2729         (WebKit::WebFrame::createSubframe):
2730
2731 2014-12-17  Dan Bernstein  <mitz@apple.com>
2732
2733         iOS build fix
2734
2735         * UIProcess/ios/PageClientImplIOS.h:
2736         * UIProcess/ios/PageClientImplIOS.mm:
2737         (WebKit::PageClientImpl::PageClient::setTextIndicatorAnimationProgress):
2738
2739 2014-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2740
2741         Unreviewed. Fix GTK+ build after r177427.
2742
2743         * UIProcess/API/gtk/PageClientImpl.cpp:
2744         (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
2745         * UIProcess/API/gtk/PageClientImpl.h:
2746
2747 2014-12-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2748
2749         Unreviewed, EFL build fix since r177427.
2750
2751         * UIProcess/CoordinatedGraphics/WebView.cpp:
2752         (WebKit::WebView::setTextIndicatorAnimationProgress): Added.
2753         * UIProcess/CoordinatedGraphics/WebView.h:
2754
2755 2014-12-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2756
2757         Move WebCore/platform/graphics/surfaces to std::unique_ptr
2758         https://bugs.webkit.org/show_bug.cgi?id=139641
2759
2760         Reviewed by Andreas Kling.
2761
2762         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2763
2764 2014-12-16  Timothy Horton  <timothy_horton@apple.com>
2765
2766         Implement and adopt two new TextIndicator presentation animations
2767         https://bugs.webkit.org/show_bug.cgi?id=139715
2768         <rdar://problem/19237945>
2769
2770         Reviewed by Anders Carlsson.
2771
2772         * UIProcess/API/mac/WKView.mm:
2773         (-[WKView _setTextIndicator:fadeOut:]):
2774         (-[WKView _setTextIndicatorAnimationProgress:]):
2775         (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]): Deleted.
2776         * UIProcess/API/mac/WKViewInternal.h:
2777         * UIProcess/PageClient.h:
2778         * UIProcess/WebPageProxy.cpp:
2779         (WebKit::WebPageProxy::WebPageProxy):
2780         (WebKit::WebPageProxy::setTextIndicatorAnimationProgress):
2781         (WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
2782         * UIProcess/WebPageProxy.h:
2783         * UIProcess/mac/PageClientImpl.h:
2784         * UIProcess/mac/PageClientImpl.mm:
2785         (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
2786         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2787         Remove the completion handler block argument from TextIndicator
2788         installation.
2789         Plumb animation progress through PageClient to TextIndicatorWindow.
2790
2791         * UIProcess/mac/WKActionMenuController.mm:
2792         (-[WKActionMenuController prepareForMenu:withEvent:]):
2793         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
2794         * UIProcess/mac/WKImmediateActionController.mm:
2795         (-[WKImmediateActionController _clearImmediateActionState]):
2796         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
2797         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
2798         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
2799         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
2800         (-[WKImmediateActionController _menuItemForDataDetectedText]):
2801         (-[WKImmediateActionController _animationControllerForText]):
2802         Forward immediate action gesture recognizer animation progress
2803         to TextIndicator. Force us to keep the selection when immediate
2804         action popovers steal first responder status from the WebView.
2805
2806         * WebProcess/WebPage/WebPage.h:
2807         * WebProcess/WebPage/WebPage.messages.in:
2808         * WebProcess/WebPage/mac/WebPageMac.mm:
2809         (WebKit::textIndicatorTransitionForActionMenu):
2810         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2811         Factor out the presentation animation decision code.
2812         For immediate actions, of the Lookup range is equal to the
2813         selection range, use a Crossfade animation; otherwise, use a FadeIn
2814         animation.
2815         Push whether the actionMenuHitTest is for an immediate action
2816         or a menu to the Web process, to make the presentation animation
2817         decision code live entirely in the Web process.
2818         Avoid extracting encoded image data if we know we're doing
2819         an immediate action and will never need it.
2820
2821 2014-12-16  Anders Carlsson  <andersca@apple.com>
2822
2823         Fix lambda and std::function formatting
2824         https://bugs.webkit.org/show_bug.cgi?id=139719
2825
2826         Reviewed by Sam Weinig.
2827
2828         * DatabaseProcess/DatabaseProcess.cpp:
2829         (WebKit::DatabaseProcess::getOrigins):
2830         (WebKit::DatabaseProcess::deleteEntriesForOrigin):
2831         (WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates):
2832         (WebKit::DatabaseProcess::deleteAllEntries):
2833         * DatabaseProcess/DatabaseProcess.h:
2834         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2835         (WebKit::UniqueIDBDatabase::deleteDatabase):
2836         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
2837         (WebKit::UniqueIDBDatabase::openTransaction):
2838         (WebKit::UniqueIDBDatabase::beginTransaction):
2839         (WebKit::UniqueIDBDatabase::commitTransaction):
2840         (WebKit::UniqueIDBDatabase::resetTransaction):
2841         (WebKit::UniqueIDBDatabase::rollbackTransaction):
2842         (WebKit::UniqueIDBDatabase::postTransactionOperation):
2843         (WebKit::UniqueIDBDatabase::changeDatabaseVersion):
2844         (WebKit::UniqueIDBDatabase::createObjectStore):
2845         (WebKit::UniqueIDBDatabase::deleteObjectStore):
2846         (WebKit::UniqueIDBDatabase::clearObjectStore):
2847         (WebKit::UniqueIDBDatabase::createIndex):
2848         (WebKit::UniqueIDBDatabase::deleteIndex):
2849         (WebKit::UniqueIDBDatabase::putRecord):
2850         (WebKit::UniqueIDBDatabase::getRecord):
2851         (WebKit::UniqueIDBDatabase::openCursor):
2852         (WebKit::UniqueIDBDatabase::cursorAdvance):
2853         (WebKit::UniqueIDBDatabase::cursorIterate):
2854         (WebKit::UniqueIDBDatabase::count):
2855         (WebKit::UniqueIDBDatabase::deleteRange):
2856         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2857         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2858         (WebKit::NetworkCacheStorage::store):
2859         * Shared/AsyncTask.h:
2860         (WebKit::AsyncTask::AsyncTask):
2861         * Shared/ChildProcess.cpp:
2862         (WebKit::didCloseOnConnectionWorkQueue):
2863         * Shared/WebContextMenuItemData.cpp:
2864         (WebKit::WebContextMenuItemData::WebContextMenuItemData):
2865         * Shared/WebContextMenuItemData.h:
2866         (WebKit::WebContextMenuItemData::selectionHandler):
2867         * Shared/mac/SecItemShim.cpp:
2868         (WebKit::responseMap):
2869         * UIProcess/Plugins/PluginProcessManager.cpp:
2870         (WebKit::PluginProcessManager::PluginProcessManager):
2871         * UIProcess/WebContext.cpp:
2872         (WebKit::WebContext::WebContext):
2873         (WebKit::m_processSuppressionDisabledForPageCounter):
2874         * UIProcess/WebOriginDataManagerProxy.cpp:
2875         (WebKit::CallbackSynchronizer::create):
2876         (WebKit::CallbackSynchronizer::CallbackSynchronizer):
2877         * UIProcess/WebPageProxy.cpp:
2878         (WebKit::WebPageProxy::WebPageProxy):
2879         * UIProcess/mac/WebContextMenuProxyMac.mm:
2880         (-[WKSelectionHandlerWrapper initWithSelectionHandler:]):
2881         (WebKit::nsMenuItemVector):
2882         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2883         (WebKit::WebIDBServerConnection::deleteDatabase):
2884         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
2885         (WebKit::WebIDBServerConnection::openTransaction):
2886         (WebKit::WebIDBServerConnection::beginTransaction):
2887         (WebKit::WebIDBServerConnection::commitTransaction):
2888         (WebKit::WebIDBServerConnection::resetTransaction):
2889         (WebKit::WebIDBServerConnection::rollbackTransaction):
2890         (WebKit::WebIDBServerConnection::setIndexKeys):
2891         (WebKit::WebIDBServerConnection::createObjectStore):
2892         (WebKit::WebIDBServerConnection::createIndex):
2893         (WebKit::WebIDBServerConnection::deleteIndex):
2894         (WebKit::WebIDBServerConnection::get):
2895         (WebKit::WebIDBServerConnection::put):
2896         (WebKit::WebIDBServerConnection::count):
2897         (WebKit::WebIDBServerConnection::deleteRange):
2898         (WebKit::WebIDBServerConnection::clearObjectStore):
2899         (WebKit::WebIDBServerConnection::deleteObjectStore):
2900         (WebKit::WebIDBServerConnection::changeDatabaseVersion):
2901         (WebKit::WebIDBServerConnection::openCursor):
2902         (WebKit::WebIDBServerConnection::cursorAdvance):
2903         (WebKit::WebIDBServerConnection::cursorIterate):
2904         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2905         * WebProcess/OriginData/WebOriginDataManagerSupplement.h:
2906         * WebProcess/WebProcess.cpp:
2907         (WebKit::WebProcess::getOrigins):
2908         (WebKit::WebProcess::deleteEntriesForOrigin):
2909         (WebKit::WebProcess::deleteEntriesModifiedBetweenDates):
2910         (WebKit::WebProcess::deleteAllEntries):
2911         * WebProcess/WebProcess.h:
2912
2913 2014-12-16  Anders Carlsson  <andersca@apple.com>
2914
2915         Get rid of a couple of binds in WebKit2
2916         https://bugs.webkit.org/show_bug.cgi?id=139717
2917
2918         Reviewed by Sam Weinig.
2919
2920         * DatabaseProcess/DatabaseProcess.cpp:
2921         (WebKit::DatabaseProcess::postDatabaseTask):
2922         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2923         (WebKit::UniqueIDBDatabase::didShutdownBackingStore):
2924         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2925         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
2926         (WebKit::UniqueIDBDatabase::postDatabaseTask):
2927         (WebKit::UniqueIDBDatabase::performNextMainThreadTaskWithoutAdoptRef): Deleted.
2928         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2929         * Platform/IPC/mac/ConnectionMac.mm:
2930         (IPC::Connection::initializeDeadNameSource):
2931         * UIProcess/Launcher/ProcessLauncher.cpp:
2932         (WebKit::processLauncherWorkQueue):
2933         (WebKit::ProcessLauncher::ProcessLauncher):
2934         * WebProcess/Plugins/PluginView.cpp:
2935         (WebKit::PluginView::unprotectPluginFromDestruction):
2936         (WebKit::derefPluginView): Deleted.
2937
2938 2014-12-16  Andreas Kling  <akling@apple.com>
2939
2940         Use Ref for SecurityOrigin.
2941         <https://webkit.org/b/139710>
2942
2943         Reviewed by Anders Carlsson.
2944
2945         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2946         (WebKit::UniqueIDBDatabase::databaseFilenameIdentifier):
2947         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
2948         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
2949         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2950         (WebKit::WebIDBServerConnection::WebIDBServerConnection):
2951         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2952         (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
2953         (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
2954
2955 2014-12-16  Anders Carlsson  <andersca@apple.com>
2956
2957         Remove deprecated StorageNamespaceImpl overloads
2958         https://bugs.webkit.org/show_bug.cgi?id=139713
2959
2960         Reviewed by Andreas Kling.
2961
2962         * WebProcess/Storage/StorageNamespaceImpl.cpp:
2963         (WebKit::StorageNamespaceImpl::storageArea):
2964         (WebKit::StorageNamespaceImpl::copy):
2965         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace): Deleted.
2966         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace): Deleted.
2967         * WebProcess/Storage/StorageNamespaceImpl.h:
2968
2969 2014-12-16  Beth Dakin  <bdakin@apple.com>
2970
2971         Speculative build fix.
2972
2973         * UIProcess/mac/WKImmediateActionController.mm:
2974         (-[WKImmediateActionController _animationControllerForCustomPreview]):
2975
2976 2014-12-16  Beth Dakin  <bdakin@apple.com>
2977
2978         REGRESSION: Preview popovers obscure the link, look wrong
2979         https://bugs.webkit.org/show_bug.cgi?id=139711
2980         -and corresponding-
2981         rdar://problem/19271854
2982
2983         Reviewed by Tim Horton.
2984
2985         Switch to using NSPopoverAnimationController.
2986         * UIProcess/mac/WKImmediateActionController.mm:
2987         (-[WKImmediateActionController _defaultAnimationController]):
2988         (-[WKImmediateActionController _animationControllerForCustomPreview]):
2989
2990 2014-12-16  Timothy Horton  <timothy_horton@apple.com>
2991
2992         Immediate action popovers can get stuck open
2993         https://bugs.webkit.org/show_bug.cgi?id=139709
2994         <rdar://problem/19270279>
2995
2996         Reviewed by Beth Dakin.
2997
2998         * UIProcess/mac/WKImmediateActionController.mm:
2999         (-[WKImmediateActionController _clearImmediateActionState]):
3000         Don't clear the animation controller; it breaks things and was unnecessary.
3001
3002 2014-12-16  Conrad Shultz  <conrad_shultz@apple.com>
3003
3004         Add a progress indicator to the preview popover
3005         https://bugs.webkit.org/show_bug.cgi?id=139699
3006
3007         Reviewed by Tim Horton.
3008
3009         * UIProcess/API/Cocoa/WKViewPrivate.h:
3010         * UIProcess/API/mac/WKView.mm:
3011         (-[WKView _setPreviewLoading:]):
3012         Wrap -[WKImmediateActionController setPreviewLoading:].
3013
3014         * UIProcess/mac/WKImmediateActionController.h:
3015         * UIProcess/mac/WKImmediateActionController.mm:
3016         (-[WKImmediateActionController _createPreviewPopoverIfNeededForURL:]):
3017         Flag the preview view controller as loading before beginning the load.
3018         (-[WKImmediateActionController setPreviewLoading:]):
3019         Wrap -[WKPagePreviewViewController setLoading:].
3020
3021         * UIProcess/mac/WKPagePreviewViewController.h:
3022         * UIProcess/mac/WKPagePreviewViewController.mm:
3023         (-[WKPagePreviewViewController setLoading:]):
3024         Toggle the progress indicator animation state.
3025         (-[WKPagePreviewViewController isLoading]):
3026         Accessor.
3027         (-[WKPagePreviewViewController loadView]):
3028         Create and center an indeterminate progress indicator that won't scale with the preview content.
3029
3030 2014-12-16  Enrica Casucci  <enrica@apple.com>
3031
3032         Fix iOS builders for 8.0
3033         https://bugs.webkit.org/show_bug.cgi?id=139495
3034
3035         Reviewed by Jer Noble
3036
3037         * UIProcess/API/Cocoa/WKWebView.mm:
3038         (-[WKWebView _mayAutomaticallyShowVideoOptimized]):
3039         * UIProcess/WebPageProxy.cpp:
3040         (WebKit::WebPageProxy::WebPageProxy):
3041         (WebKit::WebPageProxy::reattachToWebProcess):
3042         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3043
3044 2014-12-16  Gavin Barraclough  <barraclough@apple.com>
3045
3046         Move Mac process suppression from WebCore to WebKit2
3047         https://bugs.webkit.org/show_bug.cgi?id=139705
3048
3049         Reviewed by Geoff Garen.
3050
3051         Currently PageThrottler constructs the PageActivityState, holds a copy of the ViewState,
3052         and an optional UserActivity.
3053
3054         Instead, still construct the PageActivityState but just pass this out via the Page to WebPage.
3055         Logic From PageThrottler::updateUserActivity merged into WebPage::updateUserActivity.
3056
3057         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3058         (WebKit::WebChromeClient::setPageActivityState):
3059             - added to propagate PageActivityState to WebPage.
3060         * WebProcess/WebCoreSupport/WebChromeClient.h:
3061             - added setPageActivityState to propagate PageActivityState to WebPage.
3062         * WebProcess/WebPage/WebPage.cpp:
3063         (WebKit::WebPage::WebPage):
3064             - calls to updateUserActivity.
3065         (WebKit::WebPage::setPageActivityState):
3066             - calls to updateUserActivity.
3067         (WebKit::WebPage::updateUserActivity):
3068             - incorporate logic from PageThrottler::updateUserActivity.
3069         (WebKit::WebPage::setViewState):
3070             - calls to updateUserActivity.
3071         (WebKit::WebPage::updatePreferences):
3072             - calls to updateUserActivity.
3073         * WebProcess/WebPage/WebPage.h:
3074             - added setPageActivityState, m_activityState.
3075
3076 2014-12-16  Anders Carlsson  <andersca@apple.com>
3077
3078         More StorageManager modernization
3079         https://bugs.webkit.org/show_bug.cgi?id=139704
3080
3081         Reviewed by Andreas Kling.
3082
3083         * UIProcess/Storage/StorageManager.cpp:
3084         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
3085         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
3086         (WebKit::StorageManager::createSessionStorageMap):
3087         (WebKit::StorageManager::destroyStorageMap):
3088         (WebKit::StorageManager::findStorageArea):
3089         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
3090
3091 2014-12-16  Anders Carlsson  <andersca@apple.com>
3092
3093         Use Ref in another StorageManager function
3094         https://bugs.webkit.org/show_bug.cgi?id=139700
3095
3096         Reviewed by Andreas Kling.
3097
3098         * UIProcess/Storage/StorageManager.cpp:
3099         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
3100
3101 2014-12-16  Anders Carlsson  <andersca@apple.com>
3102
3103         Use Ref in StorageManager
3104         https://bugs.webkit.org/show_bug.cgi?id=139698
3105
3106         Reviewed by Andreas Kling.
3107
3108         * UIProcess/Storage/StorageManager.cpp:
3109         (WebKit::StorageManager::TransientLocalStorageNamespace::create):
3110         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
3111         (WebKit::StorageManager::StorageArea::create):
3112         (WebKit::StorageManager::StorageArea::clone):
3113         (WebKit::StorageManager::LocalStorageNamespace::create):
3114         (WebKit::StorageManager::SessionStorageNamespace::create):
3115         (WebKit::StorageManager::create):
3116         * UIProcess/Storage/StorageManager.h:
3117
3118 2014-12-16  Gavin Barraclough  <barraclough@apple.com>
3119
3120         Split UserActivity from disabled flag in WebPage
3121         https://bugs.webkit.org/show_bug.cgi?id=139696
3122
3123         Reviewed by Geoffrey Garen.
3124
3125         In preparation for other things driving the UserActivity.
3126
3127         * WebProcess/WebPage/WebPage.cpp:
3128         (WebKit::WebPage::WebPage):
3129             - initialize new members.
3130         (WebKit::WebPage::updateUserActivity):
3131             - start/stop the m_userActivity, based on m_processSupressionEnabled
3132         (WebKit::WebPage::updatePreferences):
3133             - call updateUserActivity to account for m_processSupressionEnabled changes.
3134         * WebProcess/WebPage/WebPage.h:
3135             - split m_processSuppressionDisabledByWebPreference -> m_processSupressionEnabled, m_userActivity.
3136
3137 2014-12-16  Anders Carlsson  <andersca@apple.com>
3138
3139         Get rid of PassRefPtr inside StorageManager
3140         https://bugs.webkit.org/show_bug.cgi?id=139693
3141
3142         Reviewed by Andreas Kling.
3143
3144         * UIProcess/Storage/StorageManager.cpp:
3145         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
3146         (WebKit::StorageManager::StorageArea::create):
3147         (WebKit::StorageManager::StorageArea::StorageArea):
3148         (WebKit::StorageManager::StorageArea::clone):
3149         (WebKit::StorageManager::LocalStorageNamespace::create):
3150         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
3151         (WebKit::StorageManager::SessionStorageNamespace::create):
3152         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
3153         (WebKit::StorageManager::create):
3154         * UIProcess/Storage/StorageManager.h:
3155
3156 2014-12-16  Tim Horton  <timothy_horton@apple.com>
3157
3158         Disable TextIndication for Lookup immediate actions
3159         https://bugs.webkit.org/show_bug.cgi?id=139684
3160
3161         Reviewed by Anders Carlsson.
3162
3163         * UIProcess/mac/WKImmediateActionController.mm:
3164         (-[WKImmediateActionController _animationControllerForText]):
3165
3166 2014-12-16  Dan Bernstein  <mitz@apple.com>
3167
3168         [Cocoa] WKWebProcessPlugInLoadDelegate can’t tell what type of same-document navigation has happened
3169         https://bugs.webkit.org/show_bug.cgi?id=139669
3170
3171         Reviewed by Anders Carlsson.
3172
3173         * Shared/API/Cocoa/_WKSameDocumentNavigationType.h: Added. Moved the
3174         _WKSameDocumentNavigationType type definition here from WKNavigationDelegatePrivate.h.
3175         * Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h: Added.
3176         (WebKit::toWKSameDocumentNavigationType): Moved from NavigationState.mm.
3177
3178         * Shared/API/c/WKSharedAPICast.h:
3179         (WebKit::toSameDocumentNavigationType): Added this conversion helper.
3180
3181         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added #import.
3182
3183         * UIProcess/Cocoa/NavigationState.mm:
3184         (WebKit::toWKSameDocumentNavigationType): Deleted.
3185
3186         * WebKit2.xcodeproj/project.pbxproj: Updated for added headers.
3187
3188         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
3189         delegate method that take a navigation type parameter.
3190
3191         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3192         (didSameDocumentNavigationForFrame): Changed to call the new delegate method, passing the
3193         navigation type.
3194
3195 2014-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3196
3197         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.3 release.
3198
3199         * gtk/NEWS: Add release notes for 2.7.3.
3200
3201 2014-12-16  Antti Koivisto  <antti@apple.com>
3202
3203         WebKit level persistent caching
3204         https://bugs.webkit.org/show_bug.cgi?id=30322
3205
3206         Minor cleanups based on comments by Joseph Pecoraro.
3207
3208         * NetworkProcess/cache/NetworkCache.cpp:
3209         (WebKit::decodeStorageEntry):
3210         * NetworkProcess/cache/NetworkCache.h:
3211         * NetworkProcess/cache/NetworkCacheStorage.h:
3212         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3213         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3214
3215 2014-12-15  Bartlomiej Gajda  <b.gajda@samsung.com>
3216
3217         Build fix after r177301.
3218         https://bugs.webkit.org/show_bug.cgi?id=139666
3219
3220         Reviewed by Gyuyoung Kim.
3221
3222         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
3223         (WebKit::WebPage::findZoomableAreaForPoint):
3224
3225 2014-12-15  Simon Fraser  <simon.fraser@apple.com>
3226
3227         [iOS WK2] Possible crash when setting the WKWebViews's scroll view delegate, if the scroll view outlives the web view
3228         https://bugs.webkit.org/show_bug.cgi?id=139662
3229         rdar://problem/18083882
3230
3231         Reviewed by Benjamin Poulain.
3232         
3233         Null out the internal delegate on the WKScrollView when the WKWebView goes away, since
3234         it's possible for a client to set its own scroll view delegate, forcing the creation of
3235         a WKScrollViewDelegateForwarder, and then retain the UIScrollView past the lifetime of
3236         the WKWebView. In this situation, the WKScrollViewDelegateForwarder's internalDelegate
3237         would point to a deleted WKWebView.
3238
3239         * UIProcess/API/Cocoa/WKWebView.mm:
3240         (-[WKWebView dealloc]):
3241
3242 2014-12-15  Beth Dakin  <bdakin@apple.com>
3243
3244         Make lookup an immediate action instead of an action menu item
3245         https://bugs.webkit.org/show_bug.cgi?id=139661
3246         -and corresponding-
3247         rdar://problem/19198414
3248
3249         Reviewed by Tim Horton.
3250
3251         New type.
3252         * Shared/API/c/WKImmediateActionTypes.h:
3253
3254         ActionMenuHitTestResult now includes a DictionaryPopupInfo.
3255         * Shared/mac/ActionMenuHitTestResult.h:
3256         * Shared/mac/ActionMenuHitTestResult.mm:
3257         (WebKit::ActionMenuHitTestResult::encode):
3258         (WebKit::ActionMenuHitTestResult::decode):
3259
3260         Remove all lookup menu items.
3261         * UIProcess/mac/WKActionMenuController.mm:
3262         (-[WKActionMenuController _defaultMenuItemsForText]):
3263         (-[WKActionMenuController _defaultMenuItemsForEditableText]):
3264         (-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions]):
3265         (-[WKActionMenuController _createActionMenuItemForTag:]):
3266         (-[WKActionMenuController _lookupText:]): Deleted.
3267
3268         Set the defaultAnimationController to the lookup-provided animation controller 
3269         when appropriate.
3270         * UIProcess/mac/WKImmediateActionController.mm:
3271         (-[WKImmediateActionController _defaultAnimationController]):
3272         (-[WKImmediateActionController _animationControllerForText]):
3273
3274         Re-factor performDictionaryLookupForRange() so that most of the work is done in a 
3275         new function called dictionaryPopupInfoForRange(). This was that code can be used 
3276         for both performing a dictionary lookup and just getting the DictionaryPopupInfo 
3277         for the ActionMenuHitTest.
3278         * WebProcess/WebPage/WebPage.h:
3279         * WebProcess/WebPage/mac/WebPageMac.mm:
3280         (WebKit::WebPage::dictionaryPopupInfoForRange):
3281         (WebKit::WebPage::performDictionaryLookupForRange):
3282         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3283         (WebKit::WebPage::lookupTextAtLocation):
3284
3285 2014-12-15  Matt Baker  <mattbaker@apple.com>
3286
3287         Web Inspector: Docked inspector repositioned incorrectly when dragging frame borders
3288         https://bugs.webkit.org/show_bug.cgi?id=139415
3289
3290         Reviewed by Joseph Pecoraro.
3291
3292         The _ignoreNextInspectedViewFrameDidChange flag wasn't set back to NO after
3293         being tested by inspectedViewFrameDidChange.
3294
3295         * UIProcess/mac/WebInspectorProxyMac.mm:
3296         (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]):
3297
3298 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
3299
3300         Simplify tracking of process suppression disabled for PluginProcessManager
3301         https://bugs.webkit.org/show_bug.cgi?id=139611
3302
3303         Unreviewed gtk/efl build fix.
3304
3305         * UIProcess/Plugins/PluginProcessManager.h:
3306             - missing #ifdef
3307
3308 2014-12-15  Timothy Horton  <timothy_horton@apple.com>
3309
3310         Implement Data Detectors immediate actions for WebKit2
3311         https://bugs.webkit.org/show_bug.cgi?id=139617
3312         <rdar://problem/19198539>
3313
3314         Reviewed by Beth Dakin.
3315
3316         * UIProcess/mac/WKImmediateActionController.mm:
3317         (-[WKImmediateActionController _menuItemForDataDetectedText]):
3318         Note that this action context is only for immediate actions.
3319
3320 2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
3321
3322         Addressing post-review comments in r177035
3323         https://bugs.webkit.org/show_bug.cgi?id=139557
3324
3325         Reviewed by Darin Adler.
3326
3327         * Shared/WebHitTestResult.cpp:
3328         (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Migrate off rendererBoundingBox().
3329         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
3330         (WebKit::WebPage::findZoomableAreaForPoint): Ditto.
3331
3332 2014-12-15  Timothy Horton  <timothy_horton@apple.com>
3333
3334         Implement Data Detectors immediate actions for WebKit2
3335         https://bugs.webkit.org/show_bug.cgi?id=139617
3336         <rdar://problem/19198539>
3337
3338         Reviewed by Beth Dakin.
3339
3340         * Shared/API/c/WKImmediateActionTypes.h:
3341         Add a new type.
3342
3343         * UIProcess/API/mac/WKView.mm:
3344         (-[WKView mouseDown:]):
3345         Send mouseDown along to the WKImmediateActionController too.
3346
3347         (-[WKView initWithFrame:context:configuration:webView:]):
3348         Temporarily disable action menus.
3349
3350         (-[WKView _dismissContentRelativeChildWindows]):
3351         Hide the immediate action preview when detaching child windows.
3352
3353         * UIProcess/mac/WKImmediateActionController.h:
3354         * UIProcess/mac/WKImmediateActionController.mm:
3355         (-[WKImmediateActionController willDestroyView:]):
3356         Clear the DDActionContext when tearing down the view.
3357
3358         (-[WKImmediateActionController wkView:willHandleMouseDown:]):
3359         (-[WKImmediateActionController _cancelImmediateAction]):
3360         (-[WKImmediateActionController _clearImmediateActionState]):
3361         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
3362         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
3363         (-[WKImmediateActionController _defaultAnimationController]):
3364         (-[WKImmediateActionController _updateImmediateActionItem]):
3365         (-[WKImmediateActionController hidePreview]):
3366         (-[WKImmediateActionController popoverWillClose:]):
3367         (-[WKImmediateActionController _menuItemForDataDetectedText]):
3368         Copy most of the DataDetectors implementation into WKImmediateActionController.
3369
3370 2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
3371
3372         Delete Notation because we don't use it
3373         https://bugs.webkit.org/show_bug.cgi?id=139171
3374
3375         Reviewed by Kent Tamura.
3376
3377         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
3378         (WebKit::WKDOMNodeClass):
3379         * mac/MigrateHeadersFromWebKitLegacy.make:
3380
3381 2014-12-15  David Kilzer  <ddkilzer@apple.com>
3382
3383         Remove last references to OfflineStorage process
3384         <http://webkit.org/b/139648>
3385
3386         Reviewed by Anders Carlsson.
3387
3388         * WebKit2.xcodeproj/project.pbxproj: Remove last references to
3389         the OfflineStorage process.  See r154251 and r154256.
3390
3391 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
3392
3393         Change HysteresisActivity to use a lambda
3394         https://bugs.webkit.org/show_bug.cgi?id=139636
3395
3396         Reviewed by Darin Adler.
3397
3398         The current implementation provides notifications via callbacks to a delegate. Using a delegate
3399         with callbacks is limiting a number of ways. The callback names are very ambiguous, the callbacks
3400         must either be on a separate object (more boilerplate), or the callback must be public for
3401         HysteresisActivity to call them, or friends get involved. Without the boilerplate of extra
3402         delegate objects it's hard to scale use of these objects - a single object can't serve as a
3403         delegate for multiple HysteresisActivity members.
3404
3405         Instead, make HysteresisActivity take a lambda to callback on state change. To simplify, changed
3406         HysteresisState to only track Started/Stopped states (removed WillStopPendingTimeout).
3407
3408         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp:
3409         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
3410             - HysteresisActivity now takes a lambda, not a delegate.
3411         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
3412         (WebKit::WebSQLiteDatabaseTracker::started): Deleted.
3413         (WebKit::WebSQLiteDatabaseTracker::stopped): Deleted.
3414             - started/stopped merged into hysteresisUpdated
3415         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h:
3416             - HysteresisActivity is no longer templated on delegate type, changed function declarations.
3417
3418 2014-12-15  Antti Koivisto  <antti@apple.com>
3419
3420         WebKit level persistent caching
3421         https://bugs.webkit.org/show_bug.cgi?id=30322
3422
3423         Reviewed by Sam Weinig.
3424
3425         We can improve performance and open new optimization possibilities by bringing network caching into WebKit.
3426
3427         This patch implements an experimental HTTP cache living in the network process.
3428
3429         The main classes are:
3430
3431         NetworkCache
3432             - Implements HTTP cache validation logic including Vary header
3433             - Initially non-range GET only
3434             - Fast serialization using WebKit types (ResourcesResponse etc) instead of native network layer types
3435
3436         NetworkCacheKey
3437             - Unique identifier for cache entries
3438             - Keyed on method/partition/URL
3439
3440         NetworkCacheStorage
3441             - Storage backend
3442             - dispatch-IO based implementation (generic posix implementation wouldn't be difficult)
3443             - File system only (no SQLite or similar)
3444             - One file per resource containing both header and body data
3445             - Zero persistent global metadata
3446             - Bloom filter for fast fail
3447
3448         NetworkCacheEncoder/Decoder
3449             - Serializisation support with integrity verification.
3450
3451         The code is behind the NETWORK_CACHE feature flag and requires network process to be enabled to use.
3452
3453         This patch does not enable the feature yet by default.
3454
3455         Test: http/tests/cache/disk-cache-validation.html
3456
3457         * NetworkProcess/cache/NetworkCache.cpp: Added.
3458         * NetworkProcess/cache/NetworkCache.h: Added.
3459         * NetworkProcess/cache/NetworkCacheKey.cpp: Added.
3460         * NetworkProcess/cache/NetworkCacheKey.h: Added.
3461         * NetworkProcess/cache/NetworkCacheStorage.h: Added.
3462         * NetworkProcess/cache/NetworkCacheStorage.mm: Added.
3463         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3464         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3465         (WebKit::NetworkProcess::platformSetCacheModel):
3466         * NetworkProcess/ios/NetworkProcessIOS.mm:
3467         (WebKit::NetworkProcess::clearCacheForAllOrigins):
3468         * NetworkProcess/mac/NetworkProcessMac.mm:
3469         (WebKit::NetworkProcess::clearCacheForAllOrigins):
3470         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
3471         (WebKit::tryGetShareableHandleFromCFData):
3472         * Platform/Logging.h:
3473         * WebKit2.xcodeproj/project.pbxproj:
3474         * config.h:
3475
3476 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
3477
3478         Simplify tracking of process suppression disabled for PluginProcessManager
3479         https://bugs.webkit.org/show_bug.cgi?id=139611
3480
3481         Reviewed by Darin Adler.
3482
3483         Previously if process suppression state changed for any context we would
3484         iterate over all contexts to recompute.
3485
3486         There was also an inconsistency in the code. When plugin processes are
3487         created they called processSuppressionIsEnabledForAllContexts(), which