Keyboard input should be disabled in the preview popover
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-12-05  Tim Horton  <timothy_horton@apple.com>
2
3         Keyboard input should be disabled in the preview popover
4         https://bugs.webkit.org/show_bug.cgi?id=139219
5         <rdar://problem/19052381>
6
7         Reviewed by Anders Carlsson.
8
9         * UIProcess/API/mac/WKView.mm:
10         (-[WKView performKeyEquivalent:]):
11         (-[WKView keyUp:]):
12         (-[WKView keyDown:]):
13         (-[WKView flagsChanged:]):
14         There are two implementations of each of these methods in this file.
15         Adjust the ones that the original patch missed.
16
17 2014-12-05  Antti Koivisto  <antti@apple.com>
18
19         In NetworkResourceLoader always bail out after abort()
20         https://bugs.webkit.org/show_bug.cgi?id=139299
21
22         Reviewed by Alexey Proskuryakov.
23
24         Invoking abort() may kill the current object. Take care to bail out after it.
25
26         * NetworkProcess/NetworkResourceLoader.cpp:
27         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
28         (WebKit::NetworkResourceLoader::didReceiveBuffer):
29         (WebKit::NetworkResourceLoader::didFinishLoading):
30
31             Either make sure sendAbortingOnFailure() is called last in callbacks or the results is explicitly tested.
32
33         (WebKit::NetworkResourceLoader::bufferingTimerFired):
34         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
35
36             Rename and return a boolean to indicate if load should continue.
37
38         (WebKit::NetworkResourceLoader::sendBuffer): Deleted.
39         * NetworkProcess/NetworkResourceLoader.h:
40
41 2014-12-05  Anders Carlsson  <andersca@apple.com>
42
43         Don't use PLATFORM(IOS) in non-project headers.
44
45         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
46         (-[WKWebViewConfiguration _allowsAlternateFullscreen]):
47         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
48
49 2014-12-05  Sam Weinig  <sam@webkit.org>
50
51         WKBundleCSSStyleDeclarationRef needs to be a real API::Object
52         https://bugs.webkit.org/show_bug.cgi?id=139291
53
54         Reviewed by Dan Bernstein.
55
56         Change WKBundleCSSStyleDeclarationRef from being a WebCore::CSSStyleDeclaration, to
57         being a real API::Object.  WKRetain and WKRelease require this.
58
59         * Shared/APIObject.h:
60         * WebKit2.xcodeproj/project.pbxproj:
61         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
62         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp: Added.
63         (WebKit::domHandleCache):
64         (WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
65         (WebKit::InjectedBundleCSSStyleDeclarationHandle::InjectedBundleCSSStyleDeclarationHandle):
66         (WebKit::InjectedBundleCSSStyleDeclarationHandle::~InjectedBundleCSSStyleDeclarationHandle):
67         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.h: Added.
68         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
69         (WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):
70
71 2014-12-05  Anders Carlsson  <andersca@apple.com>
72
73         Oops, didn't mean to commit this.
74
75         * Shared/API/Cocoa/WKFoundation.h:
76
77 2014-12-05  Anders Carlsson  <andersca@apple.com>
78
79         Add an API::WebsiteDataStore object and use it for _WKWebsiteDataStore
80         https://bugs.webkit.org/show_bug.cgi?id=139304
81
82         Reviewed by Tim Horton.
83
84         * Shared/APIObject.h:
85         * Shared/Cocoa/APIObject.mm:
86         (API::Object::newObject):
87         Make _WKWebsiteDataStore a wrapper for API::WebsiteDataStore instead of API::Session.
88
89         * UIProcess/API/APIWebsiteDataStore.cpp: Added.
90         (API::generateNonPersistentSessionID):
91         (API::WebsiteDataStore::defaultDataStore):
92         (API::WebsiteDataStore::createNonPersistentDataStore):
93         (API::WebsiteDataStore::WebsiteDataStore):
94         (API::WebsiteDataStore::~WebsiteDataStore):
95         (API::WebsiteDataStore::isNonPersistent):
96         Add new WebsiteDataStore implementation. Currently it only contains the WebCore Session ID, but more will be
97         added to it in upcoming commits.
98
99         * UIProcess/API/APIWebsiteDataStore.h:
100         Add header.
101
102         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Added.
103         (API::WebsiteDataStore::defaultDataStoreConfiguration):
104         Platform specific file that returns the default data store configuration.
105
106         * UIProcess/API/Cocoa/WKWebView.mm:
107         (-[WKWebView initWithFrame:configuration:]):
108         Set the session ID from the website data store.
109
110         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
111         (+[_WKWebsiteDataStore defaultDataStore]):
112         (+[_WKWebsiteDataStore nonPersistentDataStore]):
113         (-[_WKWebsiteDataStore dealloc]):
114         (-[_WKWebsiteDataStore isNonPersistent]):
115         (-[_WKWebsiteDataStore _apiObject]):
116         Update now that we wrap an API::WebsiteDataStore instead.
117
118         * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h:
119         (WebKit::wrapper):
120         Update for API::Session -> API::WebsiteDataStore change.
121
122         * WebKit2.xcodeproj/project.pbxproj:
123         Add new files.
124
125 2014-12-05  David Kilzer  <ddkilzer@apple.com>
126
127         FeatureDefines.xcconfig: Workaround bug in Xcode 5.1.1 when defining ENABLE_WEB_REPLAY
128         <http://webkit.org/b/139286>
129
130         Reviewed by Daniel Bates.
131
132         * Configurations/FeatureDefines.xcconfig: Switch back to using
133         PLATFORM_NAME to workaround a bug in Xcode 5.1.1 on 10.8.
134
135 2014-12-05  Anders Carlsson  <andersca@apple.com>
136
137         Make WebPageProxy hold on to a SessionID instead of an API:Session
138         https://bugs.webkit.org/show_bug.cgi?id=139302
139
140         Reviewed by Sam Weinig.
141
142         This is in preparation for adding API::WebsiteDataStore. Currently we have to keep the
143         Session ID and the WebsiteDataStore separate because we still need to support toggling private browsing.
144
145         * UIProcess/API/C/WKPage.cpp:
146         (WKPageSetSession):
147         * UIProcess/API/C/WKSessionRef.cpp:
148         (WKSessionCreate):
149         * UIProcess/API/Cocoa/WKWebView.mm:
150         (-[WKWebView initWithFrame:configuration:]):
151         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
152         (+[_WKWebsiteDataStore nonPersistentDataStore]):
153         * UIProcess/APISession.cpp:
154         (API::generateID):
155         (API::Session::Session):
156         (API::Session::createEphemeral):
157         (API::Session::legacyPrivateSession): Deleted.
158         (API::Session::create): Deleted.
159         * UIProcess/APISession.h:
160         * UIProcess/WebContext.cpp:
161         (WebKit::WebContext::createWebPage):
162         * UIProcess/WebPageProxy.cpp:
163         (WebKit::WebPageProxy::WebPageProxy):
164         (WebKit::WebPageProxy::setSessionID):
165         (WebKit::WebPageProxy::creationParameters):
166         (WebKit::WebPageProxy::setSession): Deleted.
167         * UIProcess/WebPageProxy.h:
168         (WebKit::WebPageProxy::sessionID):
169
170 2014-12-05  Eric Carlson  <eric.carlson@apple.com>
171
172         [iOS] allow host application to opt-out of alternate fullscreen pt. 2
173         https://bugs.webkit.org/show_bug.cgi?id=139227
174
175         Reviewed by Jer Noble and Anders Carlsson.
176
177         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add bool param to setupFullscreenWithID.
178         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: Ditto.
179         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
180         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
181
182         * WebProcess/ios/WebVideoFullscreenManager.mm:
183         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Pass new parameter
184             to SetupFullscreenWithID.
185
186 2014-12-04  Anders Carlsson  <andersca@apple.com>
187
188         Add missing includes in preparation for making toAPI require that it's passed an API::Object
189         https://bugs.webkit.org/show_bug.cgi?id=139278
190
191         Reviewed by Tim Horton.
192
193         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
194         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
195         * UIProcess/API/C/WKContext.cpp:
196         * UIProcess/API/C/WKDownload.cpp:
197         * UIProcess/API/C/WKFrame.cpp:
198         * UIProcess/API/C/WKGeolocationManager.cpp:
199         * UIProcess/API/C/WKInspector.cpp:
200         * UIProcess/API/C/WKPage.cpp:
201         * UIProcess/GenericCallback.h:
202         * UIProcess/Notifications/WebNotificationProvider.cpp:
203         * UIProcess/WebContextConnectionClient.cpp:
204         * UIProcess/WebContextInjectedBundleClient.cpp:
205         * UIProcess/WebCookieManagerProxyClient.cpp:
206         * UIProcess/WebDatabaseManagerProxyClient.cpp:
207         * UIProcess/WebFindClient.cpp:
208         * UIProcess/WebFormClient.cpp:
209         * UIProcess/WebIconDatabaseClient.cpp:
210         * UIProcess/WebPageContextMenuClient.cpp:
211         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
212         * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
213         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
214         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
215         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
216         * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
217         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
218         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
219         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
220         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
221         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
222
223 2014-12-04  Anders Carlsson  <andersca@apple.com>
224
225         Make API::String copy the underlying strings if needed, for thread safety
226         https://bugs.webkit.org/show_bug.cgi?id=139261
227
228         Reviewed by Sam Weinig.
229
230         * Shared/API/c/WKString.cpp:
231         (WKStringCreateWithUTF8CString):
232         (WKStringCreateWithJSString):
233         (WKStringCopyJSString):
234         Move the implementations from API::String and directly into the API functions.
235
236         * Shared/APIString.h:
237         Add a create overload that takes an rvalue reference. Call it from the create overload
238         that takes an lvalue reference, but explicitly copy the string.
239         We call isolatedCopy() again on the string in the rvalue reference overload, but that is a no-op
240         if the string can be sent to another thread. Add assertions in the String constructor that we can
241         send the string to another thread.
242
243 2014-12-04  Beth Dakin  <bdakin@apple.com>
244
245         Clients disabling action menus sometimes still invoke action menu behaviors
246         https://bugs.webkit.org/show_bug.cgi?id=139270
247         -and corresponding-
248         rdar://problem/19147218
249
250         Reviewed by Tim Horton.
251
252         By default, we will keep a single item in the action menu up until the point where 
253         _state == ActionMenuState::Ready. So by checking _state here, we are preventing 
254         clients from opting out of our choice to wait. Ideally we would always still wait 
255         for the Ready state, but this will get the best behavior in the mean time.
256         * UIProcess/mac/WKActionMenuController.mm:
257         (-[WKActionMenuController _updateActionMenuItems]):
258
259 2014-12-04  Antti Koivisto  <antti@apple.com>
260
261         REGRESSION (r173468): Cannot step in WebInspector
262         https://bugs.webkit.org/show_bug.cgi?id=139260
263
264         Reviewed by Alexey Proskuryakov.
265
266         Inspector defers all loads and starts a nested runloop when it hits a breakpoint. When continuing it undefers the loads.
267         If the script execution was triggered from the didFinishLoading callback of the main resource then the main resource would
268         already be in the finished state in the network process side and setDefersLoading(false) message would end up restarting its load.
269         Since loads are not meant to restart the generated callbacks would assert or crash the web process when handled in the next
270         nested inspector runloop.
271
272         Fix by taking care that cleaned up NetworkResourceLoaders are always removed from the loader map of
273         the NetworkConnectionToWebProcess and so can't end up handling late messages.
274
275         No test, this requires JS debugger to trigger.
276
277         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
278         (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):
279
280             This is now the only way to remove resource loaders.
281             It is called from NetworkResourceLoader::cleanup only.
282
283         (WebKit::NetworkConnectionToWebProcess::didClose):
284         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
285
286             Calling abort  removes the resource loader (since it calls cleanup) so no need to do it explicitly anymore.
287
288         * NetworkProcess/NetworkConnectionToWebProcess.h:
289         * NetworkProcess/NetworkResourceLoader.cpp:
290         (WebKit::NetworkResourceLoader::start):
291
292             We are guaranteed to be reffed by NetworkConnectionToWebProcess until cleanup so the explicit ref/deref can be removed.
293
294         (WebKit::NetworkResourceLoader::cleanup):
295
296             Call to NetworkConnectionToWebProcess::didCleanupResourceLoader to make the loader unreachable.
297
298         * NetworkProcess/NetworkResourceLoader.h:
299         (WebKit::NetworkResourceLoader::identifier):
300
301 2014-12-04  Timothy Horton  <timothy_horton@apple.com>
302
303         Fix the 32-bit build.
304
305         * UIProcess/API/mac/WKView.mm:
306         (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
307
308 2014-12-04  Tim Horton  <timothy_horton@apple.com>
309
310         TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
311         https://bugs.webkit.org/show_bug.cgi?id=139252
312         <rdar://problem/19140827>
313
314         Reviewed by Anders Carlsson.
315
316         It turns out contentsToScreen requires sync IPC in Mac WebKit2, which we
317         really don't want to be doing here (especially since the UI process will often
318         be sitting in waitForAndDispatchImmediately waiting for didPerformActionMenuHitTest).
319
320         Go back to keeping TextIndicator rects in "window" coordinates and do the conversion
321         in each of the WebKits instead of trying to share that code.
322
323         * Shared/WebCoreArgumentCoders.cpp:
324         (IPC::ArgumentCoder<TextIndicatorData>::encode):
325         (IPC::ArgumentCoder<TextIndicatorData>::decode):
326         * UIProcess/API/mac/WKView.mm:
327         (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
328         * WebProcess/WebPage/FindController.cpp:
329         (WebKit::FindController::updateFindIndicator):
330         (WebKit::FindController::drawRect):
331         Adjust to the WebCore changes.
332
333 2014-12-04  Anders Carlsson  <andersca@apple.com>
334
335         Simplify StorageManager callback functions
336         https://bugs.webkit.org/show_bug.cgi?id=139257
337
338         Reviewed by Antti Koivisto.
339
340         * UIProcess/Storage/StorageManager.cpp:
341         (WebKit::StorageManager::getOrigins):
342         (WebKit::StorageManager::getStorageDetailsByOrigin):
343         (WebKit::callCallbackFunction): Deleted.
344         (WebKit::StorageManager::getOriginsInternal): Deleted.
345         (WebKit::StorageManager::getStorageDetailsByOriginInternal): Deleted.
346         * UIProcess/Storage/StorageManager.h:
347         * UIProcess/WebKeyValueStorageManager.cpp:
348         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
349         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
350         (WebKit::didGetKeyValueStorageOrigins): Deleted.
351         (WebKit::didGetStorageDetailsByOrigin): Deleted.
352
353 2014-12-04  Csaba Osztrogonác  <ossy@webkit.org>
354
355         URTBF after r176794.
356
357         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
358         (WebKit::fileCreationTime):
359         (WebKit::fileModificationTime):
360
361 2014-12-03  Anders Carlsson  <andersca@apple.com>
362
363         Add a way to delete local storage origins modified after a given date
364         https://bugs.webkit.org/show_bug.cgi?id=139249
365
366         Reviewed by Tim Horton.
367
368         Also change LocalStorageDatabaseTracker to hold on to WTF::Optional time_t values
369         instead of treating missing values as zero.
370
371         * UIProcess/LocalStorageDetails.h:
372         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
373         (WebKit::fileCreationTime):
374         (WebKit::fileModificationTime):
375         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
376         (WebKit::LocalStorageDatabaseTracker::details):
377         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
378         * UIProcess/Storage/StorageManager.cpp:
379         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
380         * UIProcess/Storage/StorageManager.h:
381         * UIProcess/WebKeyValueStorageManager.cpp:
382         (WebKit::didGetStorageDetailsByOrigin):
383
384 2014-12-04  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
385
386         [EFL][WK2] Add ewk API to allow accepting a specific TLS certificate for a specific host
387         https://bugs.webkit.org/show_bug.cgi?id=131160
388
389         Reviewed by Gyuyoung Kim.
390
391         * UIProcess/API/efl/ewk_context.cpp:
392         (EwkContext::allowSpecificHTTPSCertificateForHost):
393         (ewk_context_tls_certificate_for_host_allow):
394         * UIProcess/API/efl/ewk_context.h:
395         * UIProcess/API/efl/ewk_context_private.h:
396         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp:
397
398 2014-12-03  Commit Queue  <commit-queue@webkit.org>
399
400         Unreviewed, rolling out r176457.
401         https://bugs.webkit.org/show_bug.cgi?id=139247
402
403         More iOS breakage (Requested by andersca on #webkit).
404
405         Reverted changeset:
406
407         "Fix iOS build."
408         http://trac.webkit.org/changeset/176457
409
410 2014-12-03  Beth Dakin  <bdakin@apple.com>
411
412         <input> elements get whitespace action menu instead of editable text menu
413         https://bugs.webkit.org/show_bug.cgi?id=139241
414         -and corresponding-
415         rdar://problem/19072083
416
417         Reviewed by Sam Weinig.
418
419         Add isOverTextInsideFormControlElement to WebHitTestResult.
420         * Shared/WebHitTestResult.cpp:
421         (WebKit::WebHitTestResult::Data::Data):
422         (WebKit::WebHitTestResult::Data::encode):
423         (WebKit::WebHitTestResult::Data::decode):
424         * Shared/WebHitTestResult.h:
425         (WebKit::WebHitTestResult::isOverTextInsideFormControlElement):
426
427         Offer the text menus for text inside form controls.
428         * UIProcess/mac/WKActionMenuController.mm:
429         (-[WKActionMenuController _defaultMenuItems]):
430
431         We should disallow shadow content in the hit test. This is the default and it is 
432         how context menus behave. We originally wanted to text inside shadow content so 
433         that we could find the text, but the new function I added to HitTestResult will 
434         allow that.
435         * WebProcess/WebPage/mac/WebPageMac.mm:
436
437         Adjust to the fact that we don’t hit test shadow content any more.
438         (WebKit::WebPage::performActionMenuHitTestAtLocation):
439         (WebKit::WebPage::lookupTextAtLocation):
440         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
441
442 2014-12-03  Commit Queue  <commit-queue@webkit.org>
443
444         Unreviewed, rolling out r176489.
445         https://bugs.webkit.org/show_bug.cgi?id=139242
446
447         More iOS breakage (Requested by andersca on #webkit).
448
449         Reverted changeset:
450
451         "Unreviewed, iOS build fix after r176452."
452         http://trac.webkit.org/changeset/176489
453
454 2014-12-03  Tim Horton  <timothy_horton@apple.com>
455
456         Implement action menus for tel: URLs
457         https://bugs.webkit.org/show_bug.cgi?id=139240
458         <rdar://problem/19115662>
459
460         Reviewed by Anders Carlsson.
461
462         * Shared/API/c/WKActionMenuTypes.h:
463         Add a new type.
464
465         * UIProcess/mac/WKActionMenuController.mm:
466         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
467         Rename this function as it will work for both mailto and tel URLs.
468         Adjust it to use contextForView:.
469
470         (-[WKActionMenuController _clearActionMenuState]):
471         (-[WKActionMenuController menuNeedsUpdate:]):
472         (-[WKActionMenuController _defaultMenuItems]):
473         Don't check the menu type when going to interact with _currentActionContext.
474         We'll only have a _currentActionContext if we have a data detected item,
475         and there are multiple menu types that end up using DDActionContext.
476
477 2014-12-03  Commit Queue  <commit-queue@webkit.org>
478
479         Unreviewed, rolling out r176452 and r176559.
480         https://bugs.webkit.org/show_bug.cgi?id=139239
481
482         Broke iOS (Requested by andersca on #webkit).
483
484         Reverted changesets:
485
486         "Remove alignment code from IPC coders"
487         https://bugs.webkit.org/show_bug.cgi?id=138963
488         http://trac.webkit.org/changeset/176452
489
490         "[WK2] SecComp buildfix after r176452"
491         https://bugs.webkit.org/show_bug.cgi?id=139081
492         http://trac.webkit.org/changeset/176559
493
494 2014-12-03  Tim Horton  <timothy_horton@apple.com>
495
496         Keyboard input should be disabled in the preview popover
497         https://bugs.webkit.org/show_bug.cgi?id=139219
498         <rdar://problem/19052381>
499
500         Reviewed by Anders Carlsson.
501
502         Make sure that keyboard input, Quick Look, etc. are blocked in preview popovers
503         and WKThumbnailViews. Also block the fake mouseMove events that originate in
504         the Web process upon scrolling, because we were missing those despite blocking
505         ordinary mouseMove events.
506
507         * UIProcess/API/Cocoa/WKViewPrivate.h:
508         * UIProcess/API/mac/WKView.mm:
509         Rename _ignoresNonWheelMouseEvents to _ignoresNonWheelEvents, because it will
510         apply not only to mouse events but also key events, Quick Look events, menu
511         preparation events, swipe events, etc.
512
513         Add _ignoresAllEvents, which means the same thing as _ignoresNonWheelEvents
514         with the addition of ignoring scrollWheel events.
515
516         (-[WKView scrollWheel:]):
517         (-[WKView swipeWithEvent:]):
518         (-[WKView mouseMoved:]):
519         (-[WKView mouseDown:]):
520         (-[WKView mouseUp:]):
521         (-[WKView mouseDragged:]):
522         Adjust to the new name.
523
524         (-[WKView performKeyEquivalent:]):
525         (-[WKView keyUp:]):
526         (-[WKView keyDown:]):
527         (-[WKView flagsChanged:]):
528         (-[WKView quickLookWithEvent:]):
529         (-[WKView prepareForMenu:withEvent:]):
530         (-[WKView willOpenMenu:withEvent:]):
531         (-[WKView didCloseMenu:withEvent:]):
532         Block all of these events as well as those we were previously blocking.
533
534         (-[WKView _setIgnoresAllEvents:]):
535         (-[WKView _setIgnoresNonWheelMouseEvents:]):
536         (-[WKView _setIgnoresNonWheelEvents:]):
537         (-[WKView _ignoresNonWheelEvents]):
538         (-[WKView _ignoresAllEvents]):
539         * UIProcess/API/mac/WKViewInternal.h:
540         Adjust to the new names and the addition of ignoresAllEvents.
541
542         * UIProcess/mac/WKActionMenuController.mm:
543         (-[WKPagePreviewViewController loadView]):
544         Adjust to the new name.
545
546         (-[WKActionMenuController prepareForMenu:withEvent:]):
547         Move bailing from prepareForMenu: up to WKView.
548
549         * UIProcess/API/Cocoa/WKWebView.mm:
550         (-[WKWebView _ignoresNonWheelEvents]):
551         (-[WKWebView _setIgnoresNonWheelEvents:]):
552         (-[WKWebView _ignoresNonWheelMouseEvents]): Deleted.
553         (-[WKWebView _setIgnoresNonWheelMouseEvents:]): Deleted.
554         * UIProcess/API/Cocoa/WKWebViewInternal.h:
555         Adjust to the new name (without "mouse" in it).
556
557         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
558         (-[_WKThumbnailView _viewWasUnparented]):
559         (-[_WKThumbnailView _viewWasParented]):
560         Explicitly tell WKView to disable event handling while thumbnailed,
561         instead of having WKView special-case thumbnail views internally.
562
563         * UIProcess/WebPageProxy.cpp:
564         (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
565         * UIProcess/WebPageProxy.h:
566         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
567         (WebKit::WebChromeClient::shouldDispatchFakeMouseMoveEvents):
568         * WebProcess/WebCoreSupport/WebChromeClient.h:
569         * WebProcess/WebPage/WebPage.cpp:
570         (WebKit::WebPage::WebPage):
571         * WebProcess/WebPage/WebPage.h:
572         (WebKit::WebPage::shouldDispatchFakeMouseMoveEvents):
573         (WebKit::WebPage::setShouldDispatchFakeMouseMoveEvents):
574         * WebProcess/WebPage/WebPage.messages.in:
575         Plumb shouldDispatchFakeMouseMoveEvents from the UI process to the Web process
576         and through to WebKit2's ChromeClient implementation.
577
578 2014-12-03  Anders Carlsson  <andersca@apple.com>
579
580         Remove ENABLE_UI_PROCESS_STORAGE define, it's always 1.
581
582         Rubber-stamped by Beth Dakin.
583
584         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
585         (WebKit::WebPlatformStrategies::localStorageNamespace):
586         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
587         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
588
589 2014-12-03  Anders Carlsson  <andersca@apple.com>
590
591         Use an @autoreleasepool instead of NSAutoreleasePool.
592
593         Rubber-stamped by Tim Horton.
594
595         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
596         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
597
598 2014-12-03  Dan Bernstein  <mitz@apple.com>
599
600         REGRESSION(r176687): Caused webkit2 test assertion failure crashes in WebKit::WebPage::willStartDrag()
601         https://bugs.webkit.org/show_bug.cgi?id=139224
602
603         Reviewed by Alexey Proskuryakov.
604
605         * WebProcess/WebPage/WebPage.cpp:
606         (WebKit::WebPage::mouseEventSyncForTesting): Wait for the UI process to start dragging if
607         needed before handling the event.
608
609 2014-12-03  Michael Catanzaro  <mcatanzaro@igalia.com>
610
611         [GTK] outdated comment
612         https://bugs.webkit.org/show_bug.cgi?id=137801
613
614         Reviewed by Carlos Garcia Campos.
615
616         Remove a comment that is no longer correct.
617
618         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
619
620 2014-12-02  Conrad Shultz  <conrad_shultz@apple.com>
621
622         Don't block menu highlighting when presenting a page preview
623         https://bugs.webkit.org/show_bug.cgi?id=139217
624
625         Reviewed by Tim Horton.
626
627         * UIProcess/mac/WKActionMenuController.mm:
628         (-[WKActionMenuController _previewURLFromActionMenu:]):
629         Defer popover presentation to the next turn of the runloop.
630
631 2014-12-02  Timothy Horton  <timothy_horton@apple.com>
632
633         Fix the build.
634
635         * UIProcess/mac/WebContextMac.mm:
636
637 2014-12-02  Dan Bernstein  <mitz@apple.com>
638
639         <rdar://problem/18441138> [iOS] Text selection in WKWebView with WKSelectionGranularityCharacter only works in the most recent WKWebView to load
640         https://bugs.webkit.org/show_bug.cgi?id=139211
641
642         Reviewed by Anders Carlsson.
643
644         * UIProcess/ios/WKContentViewInteraction.mm:
645         (-[WKContentView becomeFirstResponder]): Override to activate the text selection for when
646         becoming first resopnder.
647         (-[WKContentView resignFirstResponder]): Deactiavte the text selection when resigning first
648         responder. This ensures that if another WKWebView becomes first responder, and it uses
649         block selection, we don’t end up with two active selection views.
650         (-[WKContentView useSelectionAssistantWithMode:]): Only activate the text selection if this
651         is the first responder. This ensures that loading content into a non-first-responder
652         WKWebView doesn‘t deactivate the text selection in the current first responder.
653
654 2014-12-02  Alexey Proskuryakov  <ap@apple.com>
655
656         http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests
657         https://bugs.webkit.org/show_bug.cgi?id=139149
658
659         Reviewed by Anders Carlsson.
660
661         This changes API behavior. I think that it's OK, because existing behavior made no sense.
662         We used to delete caches from disk, but they were still active in memory. Now we also
663         obsolete them in memory, so documents that use a cache still work, but new ones don't
664         pick one up.
665
666         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
667         (WebKit::WebApplicationCacheManager::deleteAllEntries): Use the new WebCore function
668         that properly deletes caches.
669
670 2014-12-02  Tim Horton  <timothy_horton@apple.com>
671
672         Remove a SnowLeopard-era quirk for QuickLook
673         https://bugs.webkit.org/show_bug.cgi?id=139208
674         <rdar://problem/19121822>
675
676         Reviewed by Alexey Proskuryakov.
677
678         * Shared/WebProcessCreationParameters.cpp:
679         (WebKit::WebProcessCreationParameters::encode):
680         (WebKit::WebProcessCreationParameters::decode):
681         * Shared/WebProcessCreationParameters.h:
682         * UIProcess/mac/WebContextMac.mm:
683         (WebKit::WebContext::platformInitializeWebProcess):
684         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
685         (WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks): Deleted.
686         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
687         * WebProcess/WebProcess.cpp:
688         (WebKit::WebProcess::WebProcess):
689         * WebProcess/WebProcess.h:
690         (WebKit::WebProcess::needsQuickLookResourceCachingQuirks): Deleted.
691         * WebProcess/cocoa/WebProcessCocoa.mm:
692         (WebKit::WebProcess::platformInitializeWebProcess):
693
694 2014-12-02  Beth Dakin  <bdakin@apple.com>
695
696         Build fix.
697
698         * UIProcess/mac/WKActionMenuController.mm:
699         (-[WKActionMenuController _defaultMenuItemsForLink]):
700
701 2014-12-02  Beth Dakin  <bdakin@apple.com>
702
703         More build fix.
704
705         * UIProcess/mac/WKActionMenuController.mm:
706         (-[WKActionMenuController _defaultMenuItemsForLink]):
707
708 2014-12-02  Dan Bernstein  <mitz@apple.com>
709
710         REGRESSION: Dragging selected text changes the selection
711         https://bugs.webkit.org/show_bug.cgi?id=139110
712
713         Reviewed by Simon Fraser.
714
715         After it sent the UI process the message to start dragging, the Web process handled mouse
716         move events that had already been in flight, interpreting them as a drag to start a new
717         selection. This is fixed by ignoring any mouse events received after asking the UI process
718         to start dragging.
719
720         * UIProcess/mac/WebPageProxyMac.mm:
721         (WebKit::WebPageProxy::setDragImage): Send the new DidStartDrag message back to the Web
722         process, so that it stops ignoring mouse events.
723
724         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
725         (WebKit::WebDragClient::startDrag): Call the new WebPage::willStartDrag, so that it starts
726         ignoring mouse events.
727
728         * WebProcess/WebPage/WebPage.cpp:
729         (WebKit::WebPage::WebPage): Initialize new member variable.
730         (WebKit::WebPage::mouseEvent): Don’t handle the event if we have asked the UI process to
731         start dragging.
732
733         * WebProcess/WebPage/WebPage.h:
734         (WebKit::WebPage::willStartDrag): Added. Sets new member variable m_isStartingDrag to true.
735         (WebKit::WebPage::didStartDrag): Added. Handles the message from the UI process by setting
736         m_isStartingDrag back to false.
737
738         * WebProcess/WebPage/WebPage.messages.in: Added DidStartDrag.
739
740 2014-12-02  Beth Dakin  <bdakin@apple.com>
741
742         Should use standardQuickLookMenuItem for apps that don't implement customizations
743         https://bugs.webkit.org/show_bug.cgi?id=139193
744         -and corresponding-
745         rdar://problem/18944696
746
747         Reviewed by Anders Carlsson.
748
749         New SPI will allow clients to opt-out of the standardQuickLookMenuItem. By 
750         default, opt in.
751         * UIProcess/API/Cocoa/WKViewPrivate.h:
752         * UIProcess/API/mac/WKView.mm:
753         (-[WKView _shouldUseStandardQuickLookPreview]):
754         * UIProcess/mac/WKActionMenuController.mm:
755
756         Use [NSMenuItem standardQuickLookMenuItem] unless the client has requested 
757         otherwise.
758         (-[WKActionMenuController _defaultMenuItemsForLink]):
759
760         Delegate methods to set up the standardQuickLookMenuItem.
761         (-[WKActionMenuController menuItem:viewAtScreenPoint:]):
762         (-[WKActionMenuController menuItem:previewItemAtPoint:]):
763         (-[WKActionMenuController menuItem:preferredEdgeForPoint:]):
764
765 2014-12-02  Tim Horton  <timothy_horton@apple.com>
766
767         TextIndicator can get stuck (especially if we don't get LUNotificationPopoverWillClose when we should)
768         https://bugs.webkit.org/show_bug.cgi?id=139175
769         <rdar://problem/19072236>
770
771         Reviewed by Beth Dakin.
772
773         * UIProcess/API/mac/WKView.mm:
774         (-[WKView scrollWheel:]):
775         (-[WKView mouseDown:]):
776         Work around <rdar://problem/19086993> by always explicitly clearing the
777         active text indicator in mouseDown: and scrollWheel:.
778         This way, even if you manage to get a text indicator that outlives the
779         Look Up popover (or find-in-page, or whatever), it will be dismissed
780         by clicking or scrolling the view.
781
782 2014-12-02  Anders Carlsson  <andersca@apple.com>
783
784         Remove visited link handling from PageGroup
785         https://bugs.webkit.org/show_bug.cgi?id=139185
786
787         Reviewed by Sam Weinig.
788
789         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
790         (WebKit::WebChromeClient::populateVisitedLinks): Deleted.
791         * WebProcess/WebCoreSupport/WebChromeClient.h:
792
793 2014-12-01  Anders Carlsson  <andersca@apple.com>
794
795         Remove WKBundleRemoveAllVisitedLinks
796         https://bugs.webkit.org/show_bug.cgi?id=139163
797
798         Reviewed by Sam Weinig.
799
800         WKBundleRemoveAllVisitedLinks has been a no-op since at least Yosemite; get rid of it.
801
802         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
803         (WKBundleRemoveAllVisitedLinks): Deleted.
804         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
805         * WebProcess/InjectedBundle/InjectedBundle.cpp:
806         (WebKit::InjectedBundle::removeAllVisitedLinks): Deleted.
807         * WebProcess/InjectedBundle/InjectedBundle.h:
808
809 2014-12-02  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
810
811         Fix class was previously declared as a struct warnings
812         https://bugs.webkit.org/show_bug.cgi?id=139131
813
814         Reviewed by Csaba Osztrogonác.
815
816         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
817         * UIProcess/CoordinatedGraphics/WebViewClient.h:
818
819 2014-12-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
820
821         [EFL] ewk_view_scale_set() doesn't work correctly
822         https://bugs.webkit.org/show_bug.cgi?id=139109
823
824         Reviewed by Csaba Osztrogonác.
825
826         When ewk_view_scale_set() is called, it has only updated a scale factor which is maintained by WebPageProxy.
827         It causes WebPageProxy unsynchronized with PageViewportController's scale factor. That's why wrong scale
828         behavior has occured through ewk_view_scale_set(). Besides zooming has similar problem as well.
829
830         Thus this patch updates m_pageScaleFactor of PageViewportController as well as prohibits to change the scale
831         factor through viewport meta tag update. Because ewk_view_scale_set() means that user wants to set a specific
832         value to scale factor of current viewport.
833
834         * UIProcess/API/efl/EwkView.cpp:
835         (EwkView::updateScaleToPageViewportController):
836             Set m_initiallyFitToViewport to false. And call didChangeContentsVisibility() with new scale and scale position.
837
838         * UIProcess/API/efl/EwkView.h:
839         * UIProcess/API/efl/ewk_view.cpp:
840         (ewk_view_scale_set):
841         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
842         (TEST_F):
843         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
844         (WebKit::PageViewportController::didCommitLoad):
845             Set m_initiallyFitToViewport to true in order to fit content to viewport size by default.
846             Initizlize content position with (0, 0).
847
848         (WebKit::PageViewportController::pageTransitionViewportReady):
849            Do not update scale when m_initiallyFitToViewport is false.
850
851         (WebKit::PageViewportController::syncVisibleContents):
852            Return false when syncVisibleContents is failed.
853
854         (WebKit::PageViewportController::didChangeViewportAttributes):
855            Do not update scale when m_initiallyFitToViewport is false.
856
857         (WebKit::PageViewportController::applyScaleAfterRenderingContents):
858             If syncVisibleContents() is failed, m_pageScaleFactor should be restored with previous value.
859             If not, new scale factor isn't applied though, PageViewportController uses it as own scale factor.
860
861         (WebKit::PageViewportController::updateMinimumScaleToFit):
862            Do not update scale when m_initiallyFitToViewport is false or m_hadUserInteraction is true.
863
864         * UIProcess/CoordinatedGraphics/PageViewportController.h:
865         (WebKit::PageViewportController::setInitiallyFitToViewport):
866
867 2014-11-20  Jeffrey Pfau  <jpfau@apple.com>
868
869         Add cancelable version of willSendRequest
870         https://bugs.webkit.org/show_bug.cgi?id=138987
871
872         Reviewed by Anders Carlsson.
873
874         * WebProcess/Network/WebResourceLoader.cpp:
875         (WebKit::WebResourceLoader::willSendRequest):
876
877 2014-12-01  Conrad Shultz  <conrad_shultz@apple.com>
878
879         Clients need a way to explicitly set the title of a page preview
880         https://bugs.webkit.org/show_bug.cgi?id=139161
881
882         Reviewed by Beth Dakin.
883
884         This implicitly assumes that only one page preview can be associate with a given WKView at a time.
885
886         * UIProcess/API/Cocoa/WKViewPrivate.h:
887         * UIProcess/API/mac/WKView.mm:
888         (-[WKView _setPreviewTitle:]):
889         Wrap -[WKActionMenuController setPreviewTitle:]
890
891         * UIProcess/mac/WKActionMenuController.h:
892         * UIProcess/mac/WKActionMenuController.mm:
893         Add ivars for the title and the title text field (previously not independently exposed).
894         (-[WKPagePreviewViewController previewTitle]):
895         Accessor.
896         (-[WKPagePreviewViewController setPreviewTitle:]):
897         Accessor; set the text field's string value.
898         (-[WKPagePreviewViewController loadView]):
899         Adopt the _titleTextField ivar; assume that if a client has explicitly set the previewTitle then we don't
900         need to ask for it again.
901         (-[WKActionMenuController setPreviewTitle:]):
902         Wrap -[WKPagePreviewViewController setPreviewTitle:].
903
904 2014-12-01  Anders Carlsson  <andersca@apple.com>
905
906         Make WebKit2 work slightly better with garbage collection
907         https://bugs.webkit.org/show_bug.cgi?id=139159
908         <rdar://problem/19108390>
909
910         Reviewed by Dan Bernstein.
911
912         * Shared/Cocoa/APIObject.mm:
913         (API::Object::ref):
914         (API::Object::deref):
915         Call CFRetain/CFRelease to prevent the memory from being collected.
916
917         (API::Object::newObject):
918         Call CFRetain under GC so we'll prevent memory from being collected prematurely.
919
920 2014-12-01  Tim Horton  <timothy_horton@apple.com>
921
922         Implement yellow highlight for WebKit1 data detectors
923         https://bugs.webkit.org/show_bug.cgi?id=138956
924         <rdar://problem/18992185>
925
926         Reviewed by Beth Dakin.
927
928         * Shared/WebCoreArgumentCoders.cpp:
929         (IPC::ArgumentCoder<TextIndicatorData>::encode):
930         (IPC::ArgumentCoder<TextIndicatorData>::decode):
931         * WebProcess/WebPage/FindController.cpp:
932         (WebKit::FindController::updateFindIndicator):
933         (WebKit::FindController::drawRect):
934         Adjust to the fact that TextIndicator keeps screen-relative rects.
935
936 2014-12-01  Anders Carlsson  <andersca@apple.com>
937
938         Remove old site specific quirks code that was added in 2009
939         https://bugs.webkit.org/show_bug.cgi?id=139141
940
941         Reviewed by Antti Koivisto.
942
943         * NetworkProcess/RemoteNetworkingContext.h:
944         * NetworkProcess/mac/RemoteNetworkingContext.mm:
945         (WebKit::RemoteNetworkingContext::needsSiteSpecificQuirks): Deleted.
946         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
947         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
948         (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks): Deleted.
949
950 2014-12-01  Joseph Pecoraro  <pecoraro@apple.com>
951
952         Web Inspector: Crash in WebInspectorClient::hideHighlight when page is destroyed
953         https://bugs.webkit.org/show_bug.cgi?id=139136
954
955         Reviewed by Simon Fraser.
956
957         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
958         (WebKit::WebInspectorClient::hideHighlight):
959         Speculatively fix by null-checking the main frame which
960         can be null during page destruction.
961
962 2014-11-30  Jaehun Lim  <ljaehun.lim@samsung.com>
963
964         [EFL] Add eldbus to the library list
965         https://bugs.webkit.org/show_bug.cgi?id=139120
966
967         Reviewed by Gyuyoung Kim.
968
969         Fix undefined reference errors for eldbus APIs.
970
971         * PlatformEfl.cmake:
972
973 2014-11-29  Anders Carlsson  <andersca@apple.com>
974
975         Crash when calling WKPageClose on the originated page from within createNewPage callback
976         https://bugs.webkit.org/show_bug.cgi?id=139099
977         <rdar://problem/19052564>
978
979         Reviewed by Sam Weinig.
980
981         Null check the namespace ID.
982
983         * UIProcess/Storage/StorageManager.cpp:
984         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
985
986 2014-11-28  Tim Horton  <timothy_horton@apple.com>
987
988         Stale userData is handed to WKView _actionMenuItemsForHitTestResult under prepareForMenu
989         https://bugs.webkit.org/show_bug.cgi?id=139069
990         <rdar://problem/19075587>
991
992         Reviewed by Sam Weinig.
993
994         * UIProcess/mac/WKActionMenuController.mm:
995         (-[WKActionMenuController wkView:willHandleMouseDown:]):
996         (-[WKActionMenuController didCloseMenu:withEvent:]):
997         (-[WKActionMenuController _clearActionMenuState]):
998         Previously, _userData was not being cleared in didCloseMenu, so a subsequent
999         action menu invocation would end up sending stale userData to _actionMenuItemsForHitTestResult.
1000
1001         Additionally, factor all of the cleanup code out into _clearActionMenuState,
1002         and call it from both wkView:willHandleMouseDown: and didCloseMenu:withEvent:.
1003
1004 2014-11-26  Timothy Horton  <timothy_horton@apple.com>
1005
1006         DataDetectors PageOverlay callbacks are never called
1007         https://bugs.webkit.org/show_bug.cgi?id=139067
1008         <rdar://problem/19086676>
1009
1010         Reviewed by Anders Carlsson.
1011
1012         * Shared/mac/ActionMenuHitTestResult.mm:
1013         (WebKit::ActionMenuHitTestResult::encode):
1014         (WebKit::ActionMenuHitTestResult::decode):
1015         Encode/decode the PageOverlay ID.
1016
1017 2014-11-28  Simon Fraser  <simon.fraser@apple.com>
1018
1019         Allow clients of the WKRenderLayerRef C SPI to connect layer trees across frame boundaries
1020         https://bugs.webkit.org/show_bug.cgi?id=139021
1021
1022         Reviewed by Dan Bernstein.
1023         
1024         Add WKRenderLayerGetFrameContentsLayer which returns a WKRenderLayerRef for
1025         the content document of a RenderWidget, if its has one (e.g. frames, iframes
1026         and <object> with document contents).
1027
1028         * Shared/API/c/WKRenderLayer.cpp:
1029         (WKRenderLayerGetFrameContentsLayer):
1030         * Shared/API/c/WKRenderLayer.h:
1031         * Shared/UserMessageCoders.h:
1032         (WebKit::UserMessageEncoder::baseEncode):
1033         (WebKit::UserMessageDecoder::baseDecode):
1034         * Shared/WebRenderLayer.cpp:
1035         (WebKit::WebRenderLayer::create):
1036         (WebKit::WebRenderLayer::WebRenderLayer):
1037         * Shared/WebRenderLayer.h:
1038         (WebKit::WebRenderLayer::frameContentsLayer):
1039
1040 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
1041
1042         [WK2] SecComp buildfix after r176452
1043         https://bugs.webkit.org/show_bug.cgi?id=139081
1044
1045         Reviewed by Antti Koivisto.
1046
1047         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
1048         (WebKit::SeccompBrokerClient::dispatch):
1049         (WebKit::SeccompBroker::runLoop):
1050
1051 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
1052
1053         Fix -Wc++11-narrowing error in SeccompFilters.cpp
1054         https://bugs.webkit.org/show_bug.cgi?id=139079
1055
1056         Reviewed by Carlos Garcia Campos.
1057
1058         * Shared/linux/SeccompFilters/SeccompFilters.cpp:
1059         (WebKit::SeccompFilters::addRule):
1060         * Shared/linux/SeccompFilters/SeccompFilters.h:
1061
1062 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
1063
1064         [WK2] SecComp buildfix after r168605 and r168999
1065         https://bugs.webkit.org/show_bug.cgi?id=139080
1066
1067         Reviewed by Carlos Garcia Campos.
1068
1069         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
1070         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
1071
1072 2014-11-27  Ryuan Choi  <ryuan.choi@navercorp.com>
1073
1074         [EFL] Remove E_Dbus dependency
1075         https://bugs.webkit.org/show_bug.cgi?id=136355
1076
1077         Reviewed by Gyuyoung Kim.
1078
1079         * UIProcess/API/efl/ewk_main.cpp: Added init/shutdown for eldbus.
1080         (WebKit::EwkMain::initialize):
1081         (WebKit::EwkMain::finalize):
1082         (WebKit::EwkMain::shutdownInitializedEFLModules):
1083
1084 2014-11-25  Anders Carlsson  <andersca@apple.com>
1085
1086         Remove user content handling from PageGroup
1087         https://bugs.webkit.org/show_bug.cgi?id=139051
1088
1089         Reviewed by Antti Koivisto.
1090
1091         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1092         (WebKit::InjectedBundle::addUserScript):
1093         (WebKit::InjectedBundle::addUserStyleSheet):
1094         (WebKit::InjectedBundle::removeUserScript):
1095         (WebKit::InjectedBundle::removeUserStyleSheet):
1096         (WebKit::InjectedBundle::removeUserScripts):
1097         (WebKit::InjectedBundle::removeUserStyleSheets):
1098         (WebKit::InjectedBundle::removeAllUserContent):
1099         Talk to the user content controller from the passed in WebPageGroupProxy.
1100
1101         * WebProcess/WebPage/WebPage.cpp:
1102         (WebKit::WebPage::WebPage):
1103         Create the WebPageGroupProxy before creating the page so we can get its user content controller and
1104         pass it to the page configuration if necessary.
1105         
1106         * WebProcess/WebPage/WebPageGroupProxy.cpp:
1107         (WebKit::WebPageGroupProxy::userContentController):
1108         New function that lazily creates a user content controller. We don't want to create this eagerly since
1109         it's not used with the modern API.
1110
1111         (WebKit::WebPageGroupProxy::addUserStyleSheet):
1112         (WebKit::WebPageGroupProxy::addUserScript):
1113         (WebKit::WebPageGroupProxy::removeAllUserStyleSheets):
1114         (WebKit::WebPageGroupProxy::removeAllUserScripts):
1115         (WebKit::WebPageGroupProxy::removeAllUserContent):
1116         Call through to the user content controller.
1117
1118         * WebProcess/WebPage/WebPageGroupProxy.h:
1119         Add an m_userContentController member.
1120
1121 2014-11-25  Ting-Wei Lan  <lantw44@gmail.com>
1122
1123         [GTK] Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built
1124         version of libraries when running the temporary executable
1125         https://bugs.webkit.org/show_bug.cgi?id=138833
1126
1127         Reviewed by Carlos Garcia Campos.
1128
1129         This patch modifies LD_LIBRARY_PATH to make sure the dynamic linker
1130         find the correct version of libraries when running the temporary
1131         executable to generate the .gir file.
1132
1133         * PlatformGTK.cmake:
1134
1135 2014-11-25  Csaba Osztrogonác  <ossy@webkit.org>
1136
1137         [EFL] REGRESSION(r176514): It made performance tests fail
1138         https://bugs.webkit.org/show_bug.cgi?id=139037
1139
1140         Reviewed by Gyuyoung Kim.
1141
1142         * WebProcess/efl/WebProcessMainEfl.cpp: Don't try to load/shutdown eail if eailLibraryPath() is empty.
1143
1144 2014-11-24  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1145
1146         Remove Qt cruft related to tap higlighting
1147         https://bugs.webkit.org/show_bug.cgi?id=139030
1148
1149         Reviewed by Andreas Kling.
1150
1151         * CMakeLists.txt:
1152         * WebProcess/WebPage/TapHighlightController.cpp: Removed.
1153         * WebProcess/WebPage/TapHighlightController.h: Removed.
1154
1155 2014-11-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1156
1157         Unreviewed, EFL build fix since r176530.
1158
1159         * UIProcess/CoordinatedGraphics/WebView.cpp: Replace pointer with reference.
1160         (WebKit::WebView::processDidExit):
1161
1162 2014-11-24  Benjamin Poulain  <bpoulain@apple.com>
1163
1164         [WK2] Remove some bad stuff from WebPageProxy
1165         https://bugs.webkit.org/show_bug.cgi?id=138896
1166
1167         Reviewed by Sam Weinig.
1168
1169         The state loadStateAtProcessExit does not seem to be used anywhere.
1170
1171         The state urlAtProcessExit only exists to forward the url from
1172         WebPageProxy::resetStateAfterProcessExited() to the coordinated graphics code
1173         WebView::processDidExit().
1174
1175         * UIProcess/CoordinatedGraphics/WebView.cpp:
1176         (WebKit::WebView::processDidExit):
1177         * UIProcess/WebPageProxy.cpp:
1178         (WebKit::WebPageProxy::WebPageProxy):
1179         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1180         * UIProcess/WebPageProxy.h:
1181         (WebKit::WebPageProxy::urlAtProcessExit): Deleted.
1182         (WebKit::WebPageProxy::loadStateAtProcessExit): Deleted.
1183
1184 2014-11-24  Ryuan Choi  <ryuan.choi@navercorp.com>
1185
1186         [EFL] REGRESSION(176066): It made all performance tests fail
1187         https://bugs.webkit.org/show_bug.cgi?id=138865
1188
1189         Reviewed by Csaba Osztrogonác.
1190
1191         Since r176066, there are crash because evas_gl_surface is destroyed with
1192         invalid evas_gl instance after evas_gl is destroyed.
1193
1194         * UIProcess/API/efl/EwkView.cpp:
1195         (EwkView::~EwkView):
1196
1197 2014-11-24  Alberto Garcia  <berto@igalia.com>
1198
1199         Webkit2 doesnt build on powerpc 32 bits
1200         https://bugs.webkit.org/show_bug.cgi?id=130837
1201
1202         Reviewed by Carlos Garcia Campos.
1203
1204         Check if libatomic is needed in order to use std::atomic, and add
1205         it to the list of WebKit2 libraries.
1206
1207         * PlatformGTK.cmake:
1208
1209 2014-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1210
1211         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.2 release.
1212
1213         * gtk/NEWS: Add release notes for 2.7.2.
1214
1215 2014-11-24  Krzysztof Czech  <k.czech@samsung.com>
1216
1217         [EFL] Utilize Eail library to support accessibility in EFL
1218         https://bugs.webkit.org/show_bug.cgi?id=137742
1219
1220         Reviewed by Gyuyoung Kim.
1221
1222         Initialize EAIL module so that all the listeners and atk-bridge started properly.
1223         Dynamic loading of EAIL help us to avoid elementary dependencies in WebKit.
1224
1225         * WebProcess/efl/WebProcessMainEfl.cpp:
1226         (eailLibraryPath): reads path provided by ACCESSIBILITY_EAIL_LIBRARY_PATH variable.
1227         (eail):
1228
1229 2014-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1230
1231         [GTK] WebKitWebView is created with the wrong web context when using webkit_web_view_new_with_related_view()
1232         https://bugs.webkit.org/show_bug.cgi?id=139023
1233
1234         Reviewed by Sergio Villar Senin.
1235
1236         The WebKitWebContext is a construct only property, so it's always
1237         set to the default value when not provided, during the
1238         construction. When a related-view is used to create a new web view
1239         we should ensure that the same web context is used for the new web
1240         view, instead of the default. We should also ignore any web
1241         context given as construct parameter if a related view is alos provided.
1242
1243         * UIProcess/API/gtk/WebKitWebView.cpp:
1244         (webkitWebViewConstructed): Do not set the context to the default
1245         one when not given during construction.
1246         (webkitWebViewSetProperty): Only use the default web context when
1247         not provided as construct parameter and there isn't a related view.
1248
1249 2014-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1250
1251         [GTK] Add API to override the default local storage directory
1252         https://bugs.webkit.org/show_bug.cgi?id=138828
1253
1254         Reviewed by Gustavo Noronha Silva.
1255
1256         Add WebKitWebContext:local-storage-directory construct-only
1257         property. If not provided the default will be used.
1258
1259         * UIProcess/API/gtk/WebKitWebContext.cpp:
1260         (webkitWebContextGetProperty):
1261         (webkitWebContextSetProperty):
1262         (webkitWebContextConstructed):
1263         (webkit_web_context_class_init):
1264
1265 2014-11-23  Conrad Shultz  <conrad_shultz@apple.com>
1266
1267         Page previews should have titles
1268         https://bugs.webkit.org/show_bug.cgi?id=139020
1269
1270         Reviewed by Tim Horton.
1271
1272         * UIProcess/API/Cocoa/WKViewPrivate.h:
1273         Declare -_titleForPreviewOfURL:.
1274
1275         * UIProcess/API/mac/WKView.mm:
1276         (-[WKView _titleForPreviewOfURL:]):
1277         Stub implementation.
1278
1279         * UIProcess/mac/WKActionMenuController.mm:
1280         (+[WKPagePreviewViewController previewPadding]):
1281         Account for the title height.
1282         (-[WKPagePreviewViewController loadView]):
1283         Set correct autoresize masks on some views; create and configure a title view that is
1284         horizontally and vertically centered.
1285         (-[WKActionMenuController pagePreviewViewController:titleForPreviewOfURL:]):
1286         WKPagePreviewViewControllerDelegate method; wrap -[WKView _titleForPreviewOfURL:].
1287
1288 2014-11-22  Simon Fraser  <simon.fraser@apple.com>
1289
1290         Extend WKRenderObject and WKRenderLayer with some more useful data
1291         https://bugs.webkit.org/show_bug.cgi?id=139006
1292
1293         Reviewed by Sam Weinig.
1294         
1295         Implement WKRenderLayerGetBackingStoreMemoryEstimate,
1296         WKRenderObjectCopyTextSnippet and WKRenderObjectGetTextLength for improved
1297         RenderLayer and RenderTree display in clients of the C SPI.        
1298
1299         * Shared/API/c/WKRenderLayer.cpp:
1300         (WKRenderLayerGetBackingStoreMemoryEstimate):
1301         * Shared/API/c/WKRenderLayer.h:
1302         * Shared/API/c/WKRenderObject.cpp:
1303         (WKRenderObjectCopyTextSnippet):
1304         (WKRenderObjectGetTextLength):
1305         * Shared/API/c/WKRenderObject.h:
1306         * Shared/UserMessageCoders.h:
1307         (WebKit::UserMessageEncoder::baseEncode):
1308         (WebKit::UserMessageDecoder::baseDecode):
1309         * Shared/WebRenderLayer.cpp:
1310         (WebKit::WebRenderLayer::create):
1311         (WebKit::WebRenderLayer::WebRenderLayer):
1312         * Shared/WebRenderLayer.h:
1313         (WebKit::WebRenderLayer::backingStoreMemoryEstimate):
1314         * Shared/WebRenderObject.cpp:
1315         (WebKit::WebRenderObject::create):
1316         (WebKit::WebRenderObject::WebRenderObject):
1317         * Shared/WebRenderObject.h:
1318         (WebKit::WebRenderObject::textSnippet):
1319         (WebKit::WebRenderObject::textLength):
1320
1321 2014-11-21  Jer Noble  <jer.noble@apple.com>
1322
1323         Support multiple signatures of diagnostic logging.
1324         https://bugs.webkit.org/show_bug.cgi?id=138690
1325
1326         Reviewed by Anders Carlsson.
1327
1328         Extend the existing WKBundlePageDiagnosticLoggingClient interface by deprecating
1329         the original logDiagnosticMessage client method in V1 and adding three new,
1330         explicit client methods.
1331
1332         * CMakeLists.txt:
1333         * WebKit2.xcodeproj/project.pbxproj:
1334         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
1335         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
1336         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageDeprecated):
1337             Renamed from logDiagnosticMessage().
1338         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Pass to the client.
1339         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageWithResult): Ditto.
1340         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageWithValue): Ditto.
1341         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
1342         * WebProcess/WebCoreSupport/WebChromeClient.h:
1343         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1344         (WebKit::WebChromeClient::logDiagnosticMessage): Deleted.
1345         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp: Added.
1346         (WebKit::WebDiagnosticLoggingClient::WebDiagnosticLoggingClient): Simple constructor.
1347         (WebKit::WebDiagnosticLoggingClient::~WebDiagnosticLoggingClient): Simple destructor.
1348         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage): Pass to the injected bundle.
1349         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult): Ditto.
1350         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue): Ditto.
1351         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h: Added.
1352         * WebProcess/WebPage/WebPage.cpp:
1353         (WebKit::WebPage::WebPage): Initialize the new client.
1354
1355 2014-11-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1356
1357         Unreviewed, EFL build fix since r176459.
1358
1359         r176459 removed Timer parameter in timer callbacks only for Mac port.
1360         So this patch applies it to remaining classes for EFL port.
1361
1362         * UIProcess/API/efl/EwkView.cpp:
1363         (EwkView::EwkView):
1364         (EwkView::displayTimerFired):
1365         * UIProcess/API/efl/EwkView.h:
1366         * UIProcess/efl/TextCheckerClientEfl.cpp:
1367         (TextCheckerClientEfl::TextCheckerClientEfl):
1368         (TextCheckerClientEfl::languagesUpdateTimerFired):
1369         (TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
1370         * UIProcess/efl/TextCheckerClientEfl.h:
1371         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1372         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1373         (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
1374         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1375
1376 2014-11-21  Chris Dumez  <cdumez@apple.com>
1377
1378         Unreviewed, iOS build fix after r176462.
1379
1380         Fix include path to TextIndicator.h to include WebCore/
1381         as it was moved.
1382
1383         * UIProcess/ios/PageClientImplIOS.mm:
1384
1385 2014-11-21  Chris Dumez  <cdumez@apple.com>
1386
1387         Unreviewed, iOS build fix after r176452.
1388
1389         dencodeFixedLengthData() now only takes 2 arguments instead of
1390         3.
1391
1392         * Shared/ios/QuickLookDocumentData.cpp:
1393         (WebKit::QuickLookDocumentData::decode):
1394
1395 2014-11-21  Zalan Bujtas  <zalan@apple.com>
1396
1397         Simple line layout: Add "show simple line layout debug borders" setting to MiniBrowser.
1398         https://bugs.webkit.org/show_bug.cgi?id=138981
1399
1400         Reviewed by Simon Fraser.
1401
1402         * UIProcess/API/Cocoa/WKPreferences.mm:
1403         (-[WKPreferences _simpleLineLayoutDebugBordersEnabled]):
1404         (-[WKPreferences _setSimpleLineLayoutDebugBordersEnabled:]):
1405         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1406
1407 2014-11-21  Eric Carlson  <eric.carlson@apple.com>
1408
1409         WebVideoFullscreenManagerProxy must clear pointers when invalidated
1410         https://bugs.webkit.org/show_bug.cgi?id=138982
1411
1412         Reviewed by Jer Noble.
1413
1414         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1415         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy): Call invalidate.
1416         (WebKit::WebVideoFullscreenManagerProxy::invalidate): Set WebVideoFullscreenModel and
1417             WebVideoFullscreenChangeObserver to NULL.
1418
1419 2014-11-21  Timothy Horton  <timothy_horton@apple.com>
1420
1421         Fix the build.
1422
1423         * UIProcess/API/mac/WKView.mm:
1424         (-[WKView mouseDown:]):
1425
1426 2014-11-21  Beth Dakin  <bdakin@apple.com>
1427
1428         The preview action menu item should not have a title
1429         https://bugs.webkit.org/show_bug.cgi?id=138989
1430         -and corresponding-
1431         rdar://problem/19061959
1432
1433         Reviewed by Anders Carlsson.
1434
1435         * UIProcess/mac/WKActionMenuController.mm:
1436         (-[WKActionMenuController _createActionMenuItemForTag:]):
1437
1438 2014-11-21  Conrad Shultz  <conrad_shultz@apple.com>
1439
1440         Page previews should have a margin.
1441         https://bugs.webkit.org/show_bug.cgi?id=138990
1442
1443         Reviewed by Beth Dakin.
1444
1445         Enclose the WKWebView (or client-supplied preview view) in a container slightly larger
1446         than the preview view. Adjust sizing code to accommodate the margin.
1447
1448         * UIProcess/mac/WKActionMenuController.mm:
1449         (+[WKPagePreviewViewController previewPadding]):
1450         Return the total amount of fixed padding surrounding the preview
1451         (-[WKPagePreviewViewController loadView]):
1452         Store the actual previewView in an ivar so that clients can distinguish it from the container
1453         view; wrap the preview in a container view; set frames appropriately.
1454         (-[WKActionMenuController _createPreviewPopover]):
1455         Update to reflect method rename; supplement the popover size with the fixed padding.
1456         (-[WKActionMenuController _preferredPopoverSizeWithPreviewPadding:]):
1457         Renamed from -_preferredPopoverSize; account for the fixed padding when computing the preferred size.
1458         (-[WKActionMenuController _clearPreviewPopover]):
1459         Use the previewView ivar instead of the view controller's view.
1460         (-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
1461         Ditto.
1462         (-[WKActionMenuController _preferredPopoverSize]): Deleted.
1463
1464 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1465
1466         REGRESSION (r176415): Can get stuck, unable to invoke any DataDetectors popovers
1467         https://bugs.webkit.org/show_bug.cgi?id=138955
1468         <rdar://problem/19056442>
1469
1470         Reviewed by Anders Carlsson.
1471
1472         * UIProcess/API/mac/WKView.mm:
1473         (-[WKView mouseDown:]):
1474         * UIProcess/mac/WKActionMenuController.h:
1475         * UIProcess/mac/WKActionMenuController.mm:
1476         (-[WKActionMenuController wkView:willHandleMouseDown:]):
1477         (-[WKActionMenuController didCloseMenu:withEvent:]):
1478         (-[WKActionMenuController menuNeedsUpdate:]):
1479         Keep track of whether we have called shouldUseActionsWithContext: on a
1480         DDActionContext; if we get a mouseDown without having seen didCloseMenu:
1481         (and thus don't properly pair the shouldUseActionsWithContext: with a didUseActions),
1482         tear down the old DDActionContext before proceeding.
1483
1484 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1485
1486         REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
1487         ​https://bugs.webkit.org/show_bug.cgi?id=138960
1488         <rdar://problem/19056715>
1489
1490         Reviewed by Anders Carlsson.
1491
1492         * UIProcess/mac/WKActionMenuController.mm:
1493         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1494         (-[WKActionMenuController _defaultMenuItemsForMailtoLink]): Deleted.
1495         Use DataDetectors SPI instead of an explicit blacklist.
1496
1497 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1498
1499         Crashes while encoding a TextIndicator with no contentImageWithHighlight
1500         https://bugs.webkit.org/show_bug.cgi?id=138984
1501         <rdar://problem/19063717>
1502
1503         Reviewed by Sam Weinig.
1504
1505         * Shared/WebCoreArgumentCoders.cpp:
1506         (IPC::ArgumentCoder<TextIndicatorData>::encode):
1507         (IPC::ArgumentCoder<TextIndicatorData>::decode):
1508         encodeImage doesn't deal with null images, so handle that case gracefully.
1509
1510 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1511
1512         REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
1513         https://bugs.webkit.org/show_bug.cgi?id=138960
1514         <rdar://problem/19056715>
1515
1516         Reviewed by Beth Dakin.
1517
1518         * UIProcess/mac/WKActionMenuController.mm:
1519         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1520         Blacklist contact results, because they don't have useful menus. If we
1521         bail before setting up _currentActionContext, we'll still allow fallthrough
1522         to ordinary text actions, avoiding mysterious failure when a contact is detected.
1523
1524         This doesn't break the case that r176351 was intended to fix,
1525         because in that case we were detecting e.g. addresses.
1526
1527 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1528
1529         Move TextIndicator{Window} to WebCore
1530         https://bugs.webkit.org/show_bug.cgi?id=138954
1531         <rdar://problem/18992185>
1532
1533         Some adjustments by Csaba Osztrogonác.
1534         Reviewed by Anders Carlsson.
1535
1536         * CMakeLists.txt:
1537         Remove TextIndicator.cpp.
1538
1539         * Scripts/webkit/messages.py:
1540         (struct_or_class):
1541         (headers_for_type):
1542         Tell messages.py that TextIndicatorData is a struct, and comes from TextIndicator.h.
1543
1544         * Shared/WebCoreArgumentCoders.h:
1545         * Shared/WebCoreArgumentCoders.cpp:
1546         (IPC::ArgumentCoder<TextIndicatorData>::encode):
1547         (IPC::ArgumentCoder<TextIndicatorData>::decode):
1548         Add argument coders for TextIndicatorData.
1549
1550         * Shared/DictionaryPopupInfo.h:        
1551         * Shared/mac/ActionMenuHitTestResult.h:
1552         * Shared/mac/ActionMenuHitTestResult.mm:
1553         * UIProcess/API/gtk/PageClientImpl.h:
1554         * UIProcess/API/gtk/PageClientImpl.cpp:
1555         * UIProcess/API/mac/WKView.mm:
1556         * UIProcess/API/mac/WKViewInternal.h:
1557         * UIProcess/CoordinatedGraphics/WebView.h:
1558         * UIProcess/CoordinatedGraphics/WebView.cpp:
1559         * UIProcess/PageClient.h:
1560         * UIProcess/WebPageProxy.cpp:
1561         * UIProcess/WebPageProxy.h:
1562         * UIProcess/WebPageProxy.messages.in:
1563         * UIProcess/ios/PageClientImplIOS.h:
1564         * UIProcess/ios/WKContentView.h:
1565         * UIProcess/mac/PageClientImpl.h:
1566         * UIProcess/mac/PageClientImpl.mm:
1567         * UIProcess/mac/WKActionMenuController.mm:
1568         * WebKit2.xcodeproj/project.pbxproj:
1569         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1570         * WebProcess/WebPage/FindController.cpp:
1571         * WebProcess/WebPage/WebPage.h:
1572         * WebProcess/WebPage/ios/WebPageIOS.mm:
1573         * WebProcess/WebPage/mac/WebPageMac.mm:
1574         Adjust to TextIndicator and TextIndicatorWindow's new home.
1575
1576 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1577
1578         REGRESSION (r176238): Mailto links are getting preloaded, which results in a compose window
1579         https://bugs.webkit.org/show_bug.cgi?id=138972
1580
1581         Reviewed by Beth Dakin.
1582
1583         * UIProcess/mac/WKActionMenuController.mm:
1584         (-[WKActionMenuController willOpenMenu:withEvent:]):
1585         Only preload links.
1586
1587 2014-11-21  Anders Carlsson  <andersca@apple.com>
1588
1589         Remove the Timer parameters from timer callbacks
1590         https://bugs.webkit.org/show_bug.cgi?id=138974
1591
1592         Reviewed by Antti Koivisto.
1593
1594         * NetworkProcess/NetworkResourceLoader.cpp:
1595         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1596         (WebKit::NetworkResourceLoader::bufferingTimerFired):
1597         * NetworkProcess/NetworkResourceLoader.h:
1598         * Shared/WebMemorySampler.cpp:
1599         (WebKit::WebMemorySampler::WebMemorySampler):
1600         (WebKit::WebMemorySampler::sampleTimerFired):
1601         (WebKit::WebMemorySampler::stopTimerFired):
1602         * Shared/WebMemorySampler.h:
1603         * Shared/mac/RemoteLayerBackingStoreCollection.h:
1604         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1605         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1606         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
1607         * WebProcess/Plugins/PluginView.cpp:
1608         (WebKit::PluginView::PluginView):
1609         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1610         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1611         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1612         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
1613         * WebProcess/WebProcess.cpp:
1614         (WebKit::WebProcess::WebProcess):
1615         (WebKit::WebProcess::processSuspensionCleanupTimerFired):
1616         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
1617         * WebProcess/WebProcess.h:
1618
1619 2014-11-21  Anders Carlsson  <andersca@apple.com>
1620
1621         Remove the Timer parameters from timer callbacks
1622         https://bugs.webkit.org/show_bug.cgi?id=138974
1623
1624         Reviewed by Antti Koivisto.
1625
1626         * NetworkProcess/NetworkResourceLoader.cpp:
1627         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1628         (WebKit::NetworkResourceLoader::bufferingTimerFired):
1629         * NetworkProcess/NetworkResourceLoader.h:
1630         * Shared/WebMemorySampler.cpp:
1631         (WebKit::WebMemorySampler::WebMemorySampler):
1632         (WebKit::WebMemorySampler::sampleTimerFired):
1633         (WebKit::WebMemorySampler::stopTimerFired):
1634         * Shared/WebMemorySampler.h:
1635         * Shared/mac/RemoteLayerBackingStoreCollection.h:
1636         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1637         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1638         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
1639         * WebProcess/Plugins/PluginView.cpp:
1640         (WebKit::PluginView::PluginView):
1641         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1642         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1643         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1644         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
1645         * WebProcess/WebProcess.cpp:
1646         (WebKit::WebProcess::WebProcess):
1647         (WebKit::WebProcess::processSuspensionCleanupTimerFired):
1648         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
1649         * WebProcess/WebProcess.h:
1650
1651 2014-11-21  Antti Koivisto  <antti@apple.com>
1652
1653         Fix iOS build.
1654
1655         * Shared/ios/QuickLookDocumentData.cpp:
1656         (WebKit::QuickLookDocumentData::encode):
1657
1658 2014-11-21  Antti Koivisto  <antti@apple.com>
1659
1660         Remove alignment code from IPC coders
1661         https://bugs.webkit.org/show_bug.cgi?id=138963
1662
1663         Reviewed by Anders Carlsson.
1664
1665         Alignment code achieves nothing except making the messages somewhat bigger.
1666
1667         * Platform/IPC/ArgumentCoders.cpp:
1668         (IPC::ArgumentCoder<CString>::encode):
1669         (IPC::ArgumentCoder<CString>::decode):
1670         (IPC::ArgumentCoder<String>::encode):
1671         (IPC::decodeStringText):
1672         * Platform/IPC/ArgumentCoders.h:
1673         (IPC::SimpleArgumentCoder::encode):
1674         (IPC::SimpleArgumentCoder::decode):
1675         * Platform/IPC/ArgumentDecoder.cpp:
1676         (IPC::ArgumentDecoder::initialize):
1677         (IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
1678         (IPC::ArgumentDecoder::decodeFixedLengthData):
1679         (IPC::ArgumentDecoder::decodeVariableLengthByteArray):
1680         (IPC::ArgumentDecoder::decodeNumber):
1681         (IPC::ArgumentDecoder::decode):
1682         (IPC::roundUpToAlignment): Deleted.
1683         (IPC::alignedBufferIsLargeEnoughToContain): Deleted.
1684         (IPC::ArgumentDecoder::alignBufferPosition): Deleted.
1685         (IPC::decodeValueFromBuffer): Deleted.
1686         * Platform/IPC/ArgumentDecoder.h:
1687         (IPC::ArgumentDecoder::isInvalid):
1688         (IPC::ArgumentDecoder::markInvalid):
1689         (IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
1690         * Platform/IPC/ArgumentEncoder.cpp:
1691         (IPC::ArgumentEncoder::ArgumentEncoder):
1692         (IPC::ArgumentEncoder::grow):
1693         (IPC::ArgumentEncoder::encodeFixedLengthData):
1694         (IPC::ArgumentEncoder::encodeVariableLengthByteArray):
1695         (IPC::ArgumentEncoder::encode):
1696         * Platform/IPC/ArgumentEncoder.h:
1697         (IPC::ArgumentEncoder::buffer):
1698         (IPC::ArgumentEncoder::mutableBuffer):
1699         * Platform/IPC/DataReference.cpp:
1700         (IPC::SharedBufferDataReference::encode):
1701         * Platform/IPC/MessageEncoder.cpp:
1702         (IPC::MessageEncoder::setIsSyncMessage):
1703         (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
1704         * Platform/IPC/mac/ConnectionMac.mm:
1705         (IPC::Connection::sendOutgoingMessage):
1706
1707 2014-11-21  Anders Carlsson  <andersca@apple.com>
1708
1709         Make memoryCache() return a reference
1710         https://bugs.webkit.org/show_bug.cgi?id=138939
1711
1712         Reviewed by Antti Koivisto.
1713
1714         * WebProcess/Network/NetworkProcessConnection.cpp:
1715         (WebKit::NetworkProcessConnection::didCacheResource):
1716         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1717         (WebKit::WebResourceCacheManager::getCacheOrigins):
1718         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
1719         * WebProcess/WebProcess.cpp:
1720         (WebKit::WebProcess::terminate):
1721         (WebKit::WebProcess::didClose):
1722         (WebKit::WebProcess::clearResourceCaches):
1723         (WebKit::getWebCoreMemoryCacheStatistics):
1724         (WebKit::WebProcess::setMemoryCacheDisabled):
1725         * WebProcess/cocoa/WebProcessCocoa.mm:
1726         (WebKit::WebProcess::platformSetCacheModel):
1727         * WebProcess/soup/WebProcessSoup.cpp:
1728         (WebKit::WebProcess::platformSetCacheModel):
1729
1730 2014-11-21  Daniel Bates  <dabates@apple.com>
1731
1732         [iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC
1733         https://bugs.webkit.org/show_bug.cgi?id=138930
1734
1735         Reviewed by Anders Carlsson.
1736
1737         * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Remove forward declaration for NSCachedURLResponse
1738         methods as this functionality was incorporated into CFNetworkSPI.h, which is included by this file.
1739         * Platform/mac/LayerHostingContext.mm: Moved QuartzCore forward declarations from this file to file
1740         QuartzCoreSPI.h and included header QuartzCoreSPI.h.
1741         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: Include header XPCSPI.h.
1742         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: Remove forward declarations of
1743         XPC SPI since these declarations are part of XCPSPI.h, which is included by header XPCServiceEntryPoint.h.
1744         * UIProcess/API/Cocoa/WKWebView.mm: Remove unnecessary include of header QuartzCore/CARenderServer.h
1745         as it will be included by header QuartzCoreSPI.h.
1746         * UIProcess/Network/NetworkProcessProxy.cpp: Include header XPCSPI.h when building for iOS with
1747         USE(XPC_SERVICES) enabled.
1748         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Include header MediaPlayerSPI.h instead of including
1749         MediaPlayer private headers directly. Also sort the list of #import directives.
1750
1751 2014-11-20  Dan Bernstein  <mitz@apple.com>
1752
1753         Build fix.
1754
1755         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1756         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Cast the return value of
1757         [getMPAudioVideoRoutingPopoverControllerClass() alloc] to resolve ambiguity about which
1758         -initWithType: we are calling.
1759         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Cast to resolve ambiguity.
1760         (-[WKAirPlayRoutePicker show:fromRect:]): Cast for consistency.
1761
1762 2014-11-20  Benjamin Poulain  <bpoulain@apple.com>
1763
1764         Remove the remaining vestiges of minimal-ui
1765         https://bugs.webkit.org/show_bug.cgi?id=138890
1766
1767         Reviewed by Sam Weinig.
1768
1769         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1770         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
1771         * WebProcess/WebPage/WebPage.cpp:
1772         (WebKit::WebPage::didCommitLoad):
1773         (WebKit::WebPage::didFinishDocumentLoad): Deleted.
1774         * WebProcess/WebPage/WebPage.h:
1775         * WebProcess/WebPage/ios/WebPageIOS.mm:
1776         (WebKit::WebPage::savePageState):
1777         (WebKit::WebPage::restorePageState):
1778         (WebKit::WebPage::viewportConfigurationChanged):
1779         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
1780
1781 2014-11-20  Beth Dakin  <bdakin@apple.com>
1782
1783         Preview popover needs minimum and maximum sizes
1784         https://bugs.webkit.org/show_bug.cgi?id=138943
1785         -and corresponding-
1786         rdar://problem/18904651
1787
1788         Reviewed by Tim Horton.
1789
1790         Quick follow-up to get the right screen.
1791         * UIProcess/mac/WKActionMenuController.mm:
1792         (-[WKActionMenuController largestPopoverSize]):
1793
1794 2014-11-20  Beth Dakin  <bdakin@apple.com>
1795
1796         Preview popover needs minimum and maximum sizes
1797         https://bugs.webkit.org/show_bug.cgi?id=138943
1798         -and corresponding-
1799         rdar://problem/18904651
1800
1801         Reviewed by Tim Horton.
1802
1803         This patch enforces minimum and maximum popover sizes. If the popover needs to be 
1804         sized up to be above the minimum, it will end up covering some of the 
1805         _hitTestResult, so we should compute a new origin rect based on the original 
1806         event location. 
1807         * UIProcess/mac/WKActionMenuController.h:
1808         * UIProcess/mac/WKActionMenuController.mm:
1809         (-[WKActionMenuController prepareForMenu:withEvent:]):
1810         (-[WKActionMenuController _previewURLFromActionMenu:]):
1811         (-[WKActionMenuController _createPreviewPopover]):
1812         (-[WKActionMenuController largestPopoverSize]):
1813         (-[WKActionMenuController _preferredPopoverSize]):
1814         (-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]): Deleted.
1815
1816 2014-11-20  Conrad Shultz  <conrad_shultz@apple.com>
1817
1818         Clicks on previews can be recognized multiple times
1819         https://bugs.webkit.org/show_bug.cgi?id=138944
1820
1821         Reviewed by Tim Horton.
1822
1823         * UIProcess/mac/WKActionMenuController.mm:
1824         (-[WKPagePreviewViewController _clickRecognized:]):
1825         Only dispatch the delegate message on the appropriate gesture recognizer state transition.
1826
1827 2014-11-20  Conrad Shultz  <conrad_shultz@apple.com>
1828
1829         Clients should be able to customize preview click behavior
1830         https://bugs.webkit.org/show_bug.cgi?id=138940
1831
1832         Reviewed by Tim Horton.
1833
1834         * UIProcess/API/Cocoa/WKViewPrivate.h:
1835         Declare -_handleClickInPreviewView:URL:.
1836
1837         * UIProcess/API/mac/WKView.mm:
1838         (-[WKView _handleClickInPreviewView:URL:]):
1839         Extracted from -[WKActionMenuController pagePreviewViewControllerWasClicked:].
1840
1841         * UIProcess/mac/WKActionMenuController.mm:
1842         (-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
1843         Extract code to -[WKView _handleClickInPreviewView:URL:].
1844
1845 2014-11-20  Csaba Osztrogonác  <ossy@webkit.org>
1846
1847         URTBF after r176420 to fix non Apple builds.
1848
1849         * WebProcess/WebProcess.cpp:
1850         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
1851
1852 2014-11-20  Anders Carlsson  <andersca@apple.com>
1853
1854         WebPlugInClient::m_webPage can never be null, use a reference
1855         https://bugs.webkit.org/show_bug.cgi?id=138937
1856
1857         Reviewed by Andreas Kling.
1858
1859         * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
1860         (WebKit::WebPlugInClient::WebPlugInClient):
1861         (WebKit::WebPlugInClient::shouldAutoStartFromOrigin):
1862         * WebProcess/WebCoreSupport/WebPlugInClient.h:
1863         * WebProcess/WebPage/WebPage.cpp:
1864         (WebKit::WebPage::WebPage):
1865         * WebProcess/WebProcess.cpp:
1866         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
1867         * WebProcess/WebProcess.h:
1868
1869 2014-11-20  Tim Horton  <timothy_horton@apple.com>
1870
1871         TextIndicator should have getters for TextIndicator::Data properties
1872         https://bugs.webkit.org/show_bug.cgi?id=138920
1873
1874         Reviewed by Beth Dakin.
1875
1876         Instead of having clients reach into the data(), add getters.
1877         Remove frameRect(), which is identical to the textBoundingRectInWindowCoordinates getter.
1878         Remove declarations for draw/drawContentImage, which were already removed.
1879
1880         * Shared/TextIndicator.cpp:
1881         (WebKit::TextIndicator::frameRect): Deleted.
1882         * Shared/TextIndicator.h:
1883         (WebKit::TextIndicator::textBoundingRectInWindowCoordinates):
1884         (WebKit::TextIndicator::textRectsInBoundingRectCoordinates):
1885         (WebKit::TextIndicator::contentImageScaleFactor):
1886         (WebKit::TextIndicator::contentImageWithHighlight):
1887         (WebKit::TextIndicator::contentImage):
1888         * UIProcess/mac/TextIndicatorWindow.mm:
1889         (-[WKTextIndicatorView initWithFrame:textIndicator:margin:]):
1890         (-[WKTextIndicatorView presentWithCompletionHandler:]):
1891         (WebKit::TextIndicatorWindow::setTextIndicator):
1892
1893 2014-11-20  Tim Horton  <timothy_horton@apple.com>
1894
1895         Cancel DataDetectors menu earlier if we know it can't be presented
1896         https://bugs.webkit.org/show_bug.cgi?id=138922
1897         <rdar://problem/18950441>
1898
1899         Reviewed by Beth Dakin.
1900
1901         * UIProcess/mac/WKActionMenuController.mm:
1902         (-[WKActionMenuController willOpenMenu:withEvent:]):
1903         If we end up with a menu with no items, don't change selection or anything.
1904
1905         (-[WKActionMenuController menuNeedsUpdate:]):
1906         Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate,
1907         and use a bigger hammer (removeAllItems).
1908
1909 2014-11-20  Tim Horton  <timothy_horton@apple.com>
1910
1911         Don't use a TextIndicator BounceAndCrossfade transition if the selection highlight is never shown
1912         https://bugs.webkit.org/show_bug.cgi?id=138919
1913         <rdar://problem/19042207>
1914
1915         Reviewed by Beth Dakin.
1916
1917         * Shared/TextIndicator.h:
1918         (WebKit::TextIndicator::presentationTransition):
1919         (WebKit::TextIndicator::setPresentationTransition):
1920         Add getter and setter pair.
1921
1922         * UIProcess/mac/WKActionMenuController.mm:
1923         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1924         If the selection highlight will never be shown because there's only a single menu item,
1925         use a normal bounce animation instead of bounce + crossfade.
1926
1927 2014-11-20  Beth Dakin  <bdakin@apple.com>
1928
1929         Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
1930         https://bugs.webkit.org/show_bug.cgi?id=138568
1931         -and corresponding-
1932         rdar://problem/18904600
1933
1934         Reviewed by Tim Horton.
1935
1936         Skip images for lookup.
1937         * WebProcess/WebPage/mac/WebPageMac.mm:
1938         (WebKit::WebPage::performDictionaryLookupForRange):
1939
1940 2014-11-20  Daniel Bates  <dabates@apple.com>
1941
1942         [iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
1943         https://bugs.webkit.org/show_bug.cgi?id=138928
1944
1945         Reviewed by Simon Fraser.
1946
1947         * UIProcess/ios/WKContentViewInteraction.h:
1948         * UIProcess/ios/WKContentViewInteraction.mm:
1949         (-[WKContentView setupInteraction]):
1950         * WebProcess/WebPage/WebPage.cpp:
1951         (WebKit::WebPage::didCommitLoad):
1952         * WebProcess/WebPage/WebPage.h:
1953         * WebProcess/WebPage/ios/WebPageIOS.mm:
1954         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
1955
1956 2014-11-20  Anders Carlsson  <andersca@apple.com>
1957
1958         Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
1959         https://bugs.webkit.org/show_bug.cgi?id=138929
1960         <rdar://problem/18683802>
1961
1962         Reviewed by Dan Bernstein.
1963
1964         Also, re-implement -[WKWebView loadHTMLString:baseURL:] in terms of this newly added function
1965         and assume a UTF-8 encoding. This matches what Legacy WebKit does.
1966
1967         * UIProcess/API/Cocoa/WKWebView.h:
1968         * UIProcess/API/Cocoa/WKWebView.mm:
1969         (-[WKWebView loadHTMLString:baseURL:]):
1970         (-[WKWebView loadData:MIMEType:textEncodingName:baseURL:]):
1971         * UIProcess/WebPageProxy.cpp:
1972         (WebKit::WebPageProxy::loadData):
1973         * UIProcess/WebPageProxy.h:
1974
1975 2014-11-20  Antti Koivisto  <antti@apple.com>
1976
1977         Remove alignment code from cache coders
1978         https://bugs.webkit.org/show_bug.cgi?id=138927
1979
1980         Failed to land this file.
1981
1982         * NetworkProcess/cache/NetworkCacheCoders.cpp:
1983         (WebKit::NetworkCacheCoder<CString>::encode):
1984         (WebKit::NetworkCacheCoder<CString>::decode):
1985         (WebKit::NetworkCacheCoder<String>::encode):
1986         (WebKit::decodeStringText):
1987         (WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::encode):
1988         (WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::decode):
1989         * NetworkProcess/cache/NetworkCacheCoders.h:
1990
1991 2014-11-20  Antti Koivisto  <antti@apple.com>
1992
1993         Remove alignment code from cache coders
1994         https://bugs.webkit.org/show_bug.cgi?id=138927
1995
1996         Reviewed by Anders Carlsson.
1997
1998         Alignment code doesn't do anything useful, wastes space and produces wrong results
1999         if the encoder and decoder buffers don't have the same 8-byte alignment.
2000
2001         * NetworkProcess/cache/NetworkCacheDecoder.cpp:
2002         (WebKit::NetworkCacheDecoder::NetworkCacheDecoder):
2003         (WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
2004         (WebKit::NetworkCacheDecoder::decodeFixedLengthData):
2005         (WebKit::NetworkCacheDecoder::decodeNumber):
2006         (WebKit::roundUpToAlignment): Deleted.
2007         (WebKit::alignedBufferIsLargeEnoughToContain): Deleted.
2008         (WebKit::NetworkCacheDecoder::alignBufferPosition): Deleted.
2009         * NetworkProcess/cache/NetworkCacheDecoder.h:
2010         (WebKit::NetworkCacheDecoder::currentOffset):
2011         (WebKit::NetworkCacheDecoder::isInvalid):
2012         (WebKit::NetworkCacheDecoder::markInvalid):
2013         (WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
2014         * NetworkProcess/cache/NetworkCacheEncoder.cpp:
2015         (WebKit::NetworkCacheEncoder::grow):
2016         (WebKit::NetworkCacheEncoder::encodeFixedLengthData):
2017         (WebKit::NetworkCacheEncoder::encodeNumber):
2018         (WebKit::roundUpToAlignment): Deleted.
2019         * NetworkProcess/cache/NetworkCacheEncoder.h:
2020
2021 2014-11-20  Csaba Osztrogonác  <ossy@webkit.org>
2022
2023         [GTK] URTBF after r176363.
2024
2025         * UIProcess/API/gtk/PageClientImpl.cpp:
2026         (WebKit::PageClientImpl::setTextIndicator):
2027         * UIProcess/API/gtk/PageClientImpl.h:
2028
2029 2014-11-19  Yongjun Zhang  <yongjun_zhang@apple.com>
2030
2031         Don't track sub-resources that are started after main frame progress has completed.
2032         https://bugs.webkit.org/show_bug.cgi?id=138582
2033
2034         Reviewed by Sam Weinig.
2035
2036         After main frame progress has finished, starting loading a sub-resource shouldn't affect
2037         UI process's view of page loading status (i.e., the page has already completed loading
2038         and the progress shouldn't change). To achive that, don't track the subresources that
2039         are started after the main frame has finished, except for those triggered by user interaction.
2040
2041         * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:  Notify WebPage that the main frame progress
2042             has started or finished.
2043         (WebKit::WebProgressTrackerClient::progressStarted):
2044         (WebKit::WebProgressTrackerClient::progressFinished):
2045         * WebProcess/WebPage/WebPage.cpp:
2046         (WebKit::WebPage::WebPage):
2047         (WebKit::WebPage::addResourceRequest): Don't track the resource request if it is initiated after
2048             the main frame is loaded and it is not triggered by user interaction.
2049         (WebKit::WebPage::removeResourceRequest):
2050         * WebProcess/WebPage/WebPage.h: Rename m_networkResourceRequestIdentifiers to m_trackedNetworkResourceRequestIdentifiers.
2051         (WebKit::WebPage::setMainFrameProgressCompleted):
2052
2053 2014-11-19  Sun-woo Nam  <sunny.nam@samsung.com>
2054
2055         [EFL] Fix build failure since r176363.
2056         https://bugs.webkit.org/show_bug.cgi?id=138903
2057
2058         Reviewed by Gyuyoung Kim.
2059
2060         The parameter for animation on setTextIndicator() was removed on 'PageClient' class.
2061
2062         * UIProcess/CoordinatedGraphics/WebView.cpp:
2063         (WebKit::WebView::setTextIndicator):
2064         * UIProcess/CoordinatedGraphics/WebView.h:
2065
2066 2014-11-19  Timothy Horton  <timothy_horton@apple.com>
2067
2068         Try to fix the iOS build
2069
2070         * WebProcess/WebPage/ios/WebPageIOS.mm:
2071         (WebKit::WebPage::performDictionaryLookupForSelection):
2072         (WebKit::WebPage::performDictionaryLookupForRange):
2073
2074 2014-11-19  Timothy Horton  <timothy_horton@apple.com>
2075
2076         Fix the 32-bit build
2077
2078         * UIProcess/mac/TextIndicatorWindow.mm:
2079         (WebKit::TextIndicatorWindow::setTextIndicator):
2080
2081 2014-11-19  Tim Horton  <timothy_horton@apple.com>
2082
2083         Add an optional entry transition (from selection highlight) to TextIndicator
2084         https://bugs.webkit.org/show_bug.cgi?id=138856
2085         <rdar://problem/18840128>
2086
2087         Reviewed by Anders Carlsson.
2088
2089         * Shared/TextIndicator.cpp:
2090         (WebKit::outsetIndicatorRectIncludingShadow):
2091         (WebKit::TextIndicator::createWithRange):
2092         (WebKit::snapshotSelectionWithHighlight):
2093         (WebKit::TextIndicator::createWithSelectionInFrame):
2094         (WebKit::TextIndicator::frameRect):
2095         (WebKit::TextIndicator::Data::encode):
2096         (WebKit::TextIndicator::Data::decode):
2097         Remove TextIndicator::draw and related functions; drawing is handled entirely
2098         by the TextIndicatorWindow now, and TextIndicator just stores the required data.
2099
2100         Unify outsetIndicatorRectIncludingShadow.
2101
2102         Add an argument to createWithRange/createWithSelectionInFrame to indicate
2103         if the TextIndicator should transition from the selection highlight to
2104         the yellow bubble.
2105
2106         If we're doing the transition, paint the selection into a second bitmap,
2107         without forcing the text to black and without hiding the blue highlight.
2108
2109         Encode/decode the second bitmap.
2110
2111         * Shared/TextIndicator.h:
2112         * UIProcess/mac/TextIndicatorWindow.h:
2113         * UIProcess/mac/TextIndicatorWindow.mm:
2114         (-[WKTextIndicatorView initWithFrame:textIndicator:margin:transitionFromSelectionColor:]):
2115         (-[WKTextIndicatorView presentWithCompletionHandler:]):
2116         (-[WKTextIndicatorView hideWithCompletionHandler:]):
2117         (-[WKTextIndicatorView isFlipped]):
2118         (WebKit::TextIndicatorWindow::TextIndicatorWindow):
2119         (WebKit::TextIndicatorWindow::setTextIndicator):
2120         (WebKit::TextIndicatorWindow::closeWindow):
2121         (WebKit::TextIndicatorWindow::startFadeOutTimerFired):
2122         Re-implement the bounce animation using CoreAnimation instead of
2123         the WKSI-based WKWindowBounceAnimation*.
2124
2125         * WebProcess/WebPage/WebPage.h:
2126         * WebProcess/WebPage/mac/WebPageMac.mm:
2127         (WebKit::WebPage::performDictionaryLookupForSelection):
2128         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
2129         (WebKit::WebPage::performDictionaryLookupForRange):
2130         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2131         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2132         Use the aforementioned transition animation for performDictionaryLookupOfCurrentSelection,
2133         the context menu lookup item, and for Data Detectors.
2134
2135 2014-11-19  Anders Carlsson  <andersca@apple.com>
2136
2137         Add a version of API::Data::createWithoutCopying that takes an NSData
2138         https://bugs.webkit.org/show_bug.cgi?id=138893
2139
2140         Reviewed by Dan Bernstein.
2141
2142         * Shared/APIData.h:
2143         * Shared/Cocoa/APIDataCocoa.mm: Added.
2144         (API::Data::createWithoutCopying):
2145         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2146         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
2147         (releaseNSData): Deleted.
2148         * WebKit2.xcodeproj/project.pbxproj:
2149         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2150         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
2151
2152 2014-11-19  Beth Dakin  <bdakin@apple.com>
2153
2154         Invoking an action menu on a selection should result in the text menu
2155         https://bugs.webkit.org/show_bug.cgi?id=138892
2156         -and corresponding-
2157         rdar://problem/18996776
2158
2159         Reviewed by Tim Horton.
2160
2161         * UIProcess/mac/WKActionMenuController.mm:
2162         (-[WKActionMenuController _defaultMenuItems]):
2163
2164 2014-11-19  Anders Carlsson  <andersca@apple.com>
2165
2166         Fix iOS build.
2167
2168         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2169
2170 2014-11-19  Anders Carlsson  <andersca@apple.com>
2171
2172         Rename two Cocoa-only .cpp files to .mm.
2173
2174         Rubber-stamped by Sam Weinig.
2175
2176         * Shared/APIWebArchive.mm: Renamed from Source/WebKit2/Shared/APIWebArchive.cpp.
2177         * Shared/APIWebArchiveResource.mm: Renamed from Source/WebKit2/Shared/APIWebArchiveResource.cpp.
2178         * WebKit2.xcodeproj/project.pbxproj:
2179
2180 2014-11-19  Beth Dakin  <bdakin@apple.com>
2181
2182         Data detected results with no menu items should not fall through to regular text 
2183         action menus
2184         https://bugs.webkit.org/show_bug.cgi?id=138887
2185         -and corresponding-
2186         rdar://problem/18971616
2187
2188         Reviewed by Tim Horton.
2189
2190         * UIProcess/mac/WKActionMenuController.mm:
2191         (-[WKActionMenuController _defaultMenuItems]):
2192
2193 2014-11-19  Daniel Bates  <dabates@apple.com>
2194
2195         [iOS] Make WebKit build with public iOS SDK
2196         https://bugs.webkit.org/show_bug.cgi?id=136863
2197
2198         Reviewed by David Kilzer.
2199
2200         * NetworkProcess/cocoa/NetworkProcessCocoa.mm: Moved CFNetwork forward declarations
2201         from this file to file CFNetworkSPI.h and included header CFNetworkSPI.h.
2202         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Ditto.
2203         * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Ditto.
2204         * UIProcess/API/Cocoa/WKProcessPool.mm: Ditto.
2205         * UIProcess/mac/WebContextMac.mm: Ditto.
2206         * WebProcess/cocoa/WebProcessCocoa.mm: Ditto.
2207
2208 2014-11-19  Anders Carlsson  <andersca@apple.com>
2209
2210         Add APIs for customizing the user agent
2211         https://bugs.webkit.org/show_bug.cgi?id=138881
2212         rdar://problem/17233981
2213
2214         Reviewed by Dan Bernstein.
2215
2216         * UIProcess/API/Cocoa/WKWebView.h:
2217         * UIProcess/API/Cocoa/WKWebView.mm:
2218         (-[WKWebView initWithFrame:configuration:]):
2219         (-[WKWebView customUserAgent]):
2220         (-[WKWebView setCustomUserAgent:]):
2221         (-[WKWebView _customUserAgent]):
2222         (-[WKWebView _setCustomUserAgent:]):
2223         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2224         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2225         (LazyInitialized::set):
2226         (-[WKWebViewConfiguration copyWithZone:]):
2227         (defaultApplicationNameForUserAgent):
2228         (-[WKWebViewConfiguration applicationNameForUserAgent]):
2229         (-[WKWebViewConfiguration setApplicationNameForUserAgent:]):
2230
2231 2014-11-19  Simon Fraser  <simon.fraser@apple.com>
2232
2233         [WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which are unset on Mac
2234         https://bugs.webkit.org/show_bug.cgi?id=138877
2235
2236         Reviewed by Tim Horton.
2237         
2238         These data members are unused on Mac, but still encoded, so initialize them with
2239         reasonable values.
2240
2241         * Shared/mac/RemoteLayerTreeTransaction.mm:
2242         (WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
2243
2244 2014-11-19  Enrica Casucci  <enrica@apple.com>
2245
2246         Refactor iOS selection gestures.
2247         https://bugs.webkit.org/show_bug.cgi?id=138720
2248         rdar://problem/18964359
2249
2250         Reviewed by Benjamin Poulain.
2251
2252         This is a first step towards refactoring the selection gestures code.
2253         It introduces more general selection movement functions that can be used to build
2254         the gestures.
2255
2256         * UIProcess/WebPageProxy.h:
2257         * UIProcess/ios/WKContentViewInteraction.h:
2258         * UIProcess/ios/WKContentViewInteraction.mm:
2259         (toWKTextGranularity):
2260         (toWKSelectionDirection):
2261         (-[WKContentView selectPositionAtPoint:completionHandler:]):
2262         (-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
2263         (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
2264         (-[WKContentView beginSelectionInDirection:completionHandler:]):
2265         (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
2266         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2267         * UIProcess/ios/WebPageProxyIOS.mm:
2268         (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
2269         (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
2270         (WebKit::WebPageProxy::selectPositionAtPoint):
2271         (WebKit::WebPageProxy::beginSelectionInDirection):
2272         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
2273         * WebProcess/WebPage/WebPage.cpp:
2274         (WebKit::WebPage::WebPage):
2275         * WebProcess/WebPage/WebPage.h:
2276         * WebProcess/WebPage/WebPage.messages.in:
2277         * WebProcess/WebPage/ios/WebPageIOS.mm:
2278         (WebKit::WebPage::selectWithGesture):
2279         (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
2280         (WebKit::WebPage::selectPositionAtPoint):
2281         (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
2282         (WebKit::WebPage::selectTextWithGranularityAtPoint):
2283         (WebKit::WebPage::beginSelectionInDirection):
2284         (WebKit::WebPage::updateSelectionWithExtentPoint):
2285
2286 2014-11-19  Simon Fraser  <simon.fraser@apple.com>
2287
2288         [WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled scrolling indicator
2289         https://bugs.webkit.org/show_bug.cgi?id=138876
2290
2291         Reviewed by Beth Dakin.
2292         
2293         Fix the position of the tiled scrolling indicator in MiniBrowser by taking top
2294         content offset into account.
2295         
2296         On Mac, pass the current scroll position back to the UI process via the RemoteLayerTreeTransaction
2297         so that we can use it to show the correctly scroll offset in the indicator. This is temporary until
2298         Mac does UI-side scrolling.
2299
2300         * Shared/mac/RemoteLayerTreeTransaction.h:
2301         (WebKit::RemoteLayerTreeTransaction::scrollPosition):
2302         (WebKit::RemoteLayerTreeTransaction::setScrollPosition):
2303         * Shared/mac/RemoteLayerTreeTransaction.mm:
2304         (WebKit::RemoteLayerTreeTransaction::encode):
2305         (WebKit::RemoteLayerTreeTransaction::decode):
2306         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2307         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2308         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2309         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
2310         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
2311         * WebProcess/WebPage/WebPage.cpp:
2312         (WebKit::WebPage::willCommitLayerTree):
2313
2314 2014-11-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2315
2316         [GTK] Error in documentation of webkit_print_operation_get_page_setup()
2317         https://bugs.webkit.org/show_bug.cgi?id=138868
2318
2319         Reviewed by Carlos Garcia Campos.
2320
2321         Fix copypaste error in documentation of
2322         webkit_print_operation_get_page_setup().
2323
2324         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2325
2326 2014-11-19  Mark Rowe  <mrowe@apple.com>
2327
2328         Remove an unused file.
2329
2330         * version.plist: Removed.
2331
2332 2014-11-18  Benjamin Poulain  <bpoulain@apple.com>
2333
2334         [WK2] Remove the minimalUI code from the UIProcess
2335         https://bugs.webkit.org/show_bug.cgi?id=138819
2336
2337         Reviewed by Sam Weinig.
2338
2339         It looks like the only interface we have to keep alive is
2340         [WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:].
2341
2342         Clean up everything else, it is a pile of useless code.
2343
2344         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2345         * UIProcess/API/Cocoa/WKWebView.mm:
2346         (-[WKWebView _didCommitLoadForMainFrame]):
2347         (-[WKWebView _didCommitLayerTree:]):
2348         (-[WKWebView _frameOrBoundsChanged]):
2349         (-[WKWebView _didRelaunchProcess]):
2350         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2351         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
2352         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
2353         (-[WKWebView _setUsesMinimalUI:]): Deleted.
2354         (-[WKWebView _usesMinimalUI]): Deleted.
2355         (activeMinimumLayoutSizeForMinimalUI): Deleted.
2356         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]): Deleted.
2357         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2358         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2359         * UIProcess/API/ios/WKViewIOS.mm:
2360         (-[WKView _frameOrBoundsChanged]):
2361         * UIProcess/PageClient.h:
2362         * UIProcess/WebPageProxy.h:
2363         * UIProcess/WebPageProxy.messages.in:
2364         * UIProcess/ios/PageClientImplIOS.h:
2365         * UIProcess/ios/PageClientImplIOS.mm:
2366         (WebKit::PageClientImpl::setUsesMinimalUI): Deleted.
2367         * UIProcess/ios/WebPageProxyIOS.mm:
2368         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2369         (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
2370         (WebKit::WebPageProxy::setUsesMinimalUI): Deleted.
2371         * WebProcess/WebPage/WebPage.h:
2372         * WebProcess/WebPage/WebPage.messages.in:
2373         * WebProcess/WebPage/ios/WebPageIOS.mm:
2374         (WebKit::WebPage::viewportPropertiesDidChange):
2375         (WebKit::WebPage::dynamicViewportSizeUpdate):
2376         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
2377
2378 2014-11-18  Conrad Shultz  <conrad_shultz@apple.com>
2379
2380         Unreviewed. Revision to the build fix in r176304.
2381
2382         The guarded method should simply be in the !TARGET_OS_IPHONE block.
2383
2384         * UIProcess/API/Cocoa/WKViewPrivate.h:
2385
2386 2014-11-18  Benjamin Poulain  <bpoulain@apple.com>
2387
2388         iOS8 new "slow tap" heuristic fires mouse compat events despite preventDefault on touchend
2389         https://bugs.webkit.org/show_bug.cgi?id=137069
2390         rdar://problem/18481464
2391
2392         Reviewed by Simon Fraser.
2393
2394         On WebKit2, we let UIWebTouchEventsGestureRecognizer and _UIWebHighlightLongPressGestureRecognizer
2395         run concurrently. This causes a race with an incorrect behavior:
2396         1) If UIWebTouchEventsGestureRecognizer does not cancel the native gestures on start.
2397         2) _UIWebHighlightLongPressGestureRecognizer starts after highlightDelay.
2398         3) When the finger leaves the screen, both gestures end.
2399         -> If the touch end sent to JavaScript in [3] ask the priority over native events, that no longer stops
2400            the _UIWebHighlightLongPressGestureRecognizer.
2401
2402         The two gesture recognizers can run in any order, there is no guarantee on which one runs first.
2403         To solve the bug, I must make sure the _UIWebHighlightLongPressGestureRecognizer never trigger a click
2404         if the page wants the event.
2405
2406         To solve the order problem, I use the fact that event recognition goes in two phases for
2407         non cancelled events:
2408         1) Update the gesture recognizers.
2409         2) Trigger the actions.
2410
2411         I do not know the order of recognizers in [1], but I know both have run before [2] is executed.
2412         I use that to stop _UIWebHighlightLongPressGestureRecognizer from ending with a click in the case of the bug:
2413         1) When _UIWebHighlightLongPressGestureRecognizer starts, I set _highlightLongPressCanClick signaling
2414            the gesture can end normally. This is done on a timer and not direct input so I don't really have to worry
2415            about a race here.
2416         2) When processing the touch event for UIWebTouchEventsGestureRecognizer, I reset the flag _highlightLongPressCanClick
2417            if the page wants the event.
2418         3) When the actions of _UIWebHighlightLongPressGestureRecognizer are processed, the touch event
2419            has already been processed by the page and the flag has been cleared if needed.
2420
2421         * UIProcess/ios/WKContentViewInteraction.h:
2422         * UIProcess/ios/WKContentViewInteraction.mm:
2423         (-[WKContentView _webTouchEvent:preventsNativeGestures:]):
2424         (-[WKContentView _highlightLongPressRecognized:]):
2425
2426 2014-11-18  Ryosuke Niwa  <rniwa@webkit.org>
2427
2428         iOS build fix after r176299. This method is not defined in WKViewIOS.mm.
2429
2430         * UIProcess/API/Cocoa/WKViewPrivate.h:
2431
2432 2014-11-18  David Kilzer  <ddkilzer@apple.com>
2433
2434         FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
2435         <http://webkit.org/b/138813>
2436
2437         Reviewed by Mark Rowe.
2438
2439         * Configurations/FeatureDefines.xcconfig: Switch to using SDK
2440         selectors.
2441
2442 2014-11-18  Conrad Shultz  <conrad_shultz@apple.com>
2443
2444         Give clients a way to cancel preview popovers
2445         https://bugs.webkit.org/show_bug.cgi?id=138855
2446
2447         Reviewed by Tim Horton.
2448
2449         Promote -[WKView _dismissActionMenuPopovers] from internal to private.
2450
2451         * UIProcess/API/Cocoa/WKViewPrivate.h:
2452         * UIProcess/API/mac/WKView.mm:
2453         (-[WKView _dismissActionMenuPopovers]):
2454         * UIProcess/API/mac/WKViewInternal.h:
2455
2456 2014-11-18  Chris Dumez  <cdumez@apple.com>
2457
2458         Add a setting to toggle DOMTimer throttling support
2459         https://bugs.webkit.org/show_bug.cgi?id=138844
2460         <rdar://problem/19020874>
2461
2462         Reviewed by Andreas Kling.
2463
2464         Add a setting to disable DOM timers throttling, in order to help
2465         developers determine if a specific issue is caused by timer
2466         throttling.
2467
2468         * Shared/WebPreferencesDefinitions.h:
2469         * UIProcess/API/C/WKPreferences.cpp:
2470         (WKPreferencesSetDOMTimersThrottlingEnabled):
2471         (WKPreferencesGetDOMTimersThrottlingEnabled):
2472         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2473         * WebProcess/WebPage/WebPage.cpp:
2474         (WebKit::WebPage::updatePreferences):
2475
2476 2014-11-18  Geoffrey Garen  <ggaren@apple.com>
2477
2478         Removed the custom allocator for ListHashSet nodes
2479         https://bugs.webkit.org/show_bug.cgi?id=138841
2480
2481         Reviewed by Andreas Kling.
2482
2483         Uses of ListHashSet no longer need to declare an inline capacity,
2484         since that was only used to specify the capacity of the custom allocator.
2485
2486         * UIProcess/Plugins/PluginInfoStore.cpp:
2487         (WebKit::PluginInfoStore::loadPluginsIfNecessary):
2488
2489 2014-11-18  Eric Carlson  <eric.carlson@apple.com>
2490
2491         Unreviewed build fix after r176283.
2492
2493         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2494
2495 2014-11-18  Tim Horton  <timothy_horton@apple.com>
2496
2497         Avoid re-encoding action menu image data
2498         https://bugs.webkit.org/show_bug.cgi?id=138817
2499         <rdar://problem/18840382>
2500
2501         Reviewed by Anders Carlsson.
2502
2503         * Shared/mac/ActionMenuHitTestResult.h:
2504         * Shared/mac/ActionMenuHitTestResult.mm:
2505         (WebKit::ActionMenuHitTestResult::encode):
2506         (WebKit::ActionMenuHitTestResult::decode):
2507         Store and encode a SharedMemory with the raw encoded image data,
2508         instead of re-painting the image into a ShareableBitmap.
2509
2510         * UIProcess/mac/WKActionMenuController.mm:
2511         (-[WKActionMenuController _hitTestResultImage]):
2512         (-[WKActionMenuController _defaultMenuItemsForImage]):
2513         (-[WKActionMenuController _copyImage:]):
2514         (-[WKActionMenuController _addImageToPhotos:]):
2515         (-[WKActionMenuController _defaultMenuItems]):
2516         (-[WKActionMenuController _canAddMediaToPhotos]): Deleted.
2517         Build a temporary filename from a UUID and the image's desired extension.
2518         Use the Image's encoded data instead of re-encoding it with CGImageDestination.
2519         Build an image menu only if we have an image, URL, data, and extension.
2520
2521         * WebProcess/WebPage/mac/WebPageMac.mm:
2522         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2523
2524 2014-11-18  Eric Carlson  <eric.carlson@apple.com>
2525
2526         [iOS] allow host application to opt-out of alternate fullscreen
2527         https://bugs.webkit.org/show_bug.cgi?id=138787
2528
2529         Reviewed by Sam Weinig.
2530         
2531         "allowsAlternateFullscreen" doesn't need to be in the public WKWebView header.
2532
2533         * UIProcess/API/Cocoa/WKWebView.mm:
2534         (-[WKWebView initWithFrame:configuration:]): allowsAlternateFullscreen -> _allowsAlternateFullscreen.
2535
2536         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Remove allowsAlternateFullscreen.
2537         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2538         (-[WKWebViewConfiguration _allowsAlternateFullscreen]): New.
2539         (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): New.
2540
2541         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declare _allowsAlternateFullscreen.
2542
2543 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
2544
2545         Subclass CachedFont for SVG fonts
2546         https://bugs.webkit.org/show_bug.cgi?id=138686
2547
2548         Reviewed by Simon Fraser.
2549
2550         Re-landing due to flakey bots.
2551
2552         Update for enum type.
2553
2554         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2555         (WebKit::maximumBufferingTime):
2556
2557 2014-11-18  Chris Dumez  <cdumez@apple.com>
2558
2559         Update the Vector API to deal with unsigned types instead of size_t
2560         https://bugs.webkit.org/show_bug.cgi?id=138824
2561
2562         Reviewed by Andreas Kling.
2563
2564         Update code base to fix build errors related to the typing changes
2565         in the Vector API (size_t -> unsigned).
2566
2567         * Platform/IPC/ArgumentCoders.h:
2568         * Platform/IPC/DataReference.h:
2569
2570 2014-11-18  Commit Queue  <commit-queue@webkit.org>
2571
2572         Unreviewed, rolling out r176264.
2573         https://bugs.webkit.org/show_bug.cgi?id=138837
2574
2575         caused many test failures (Requested by litherum on #webkit).
2576
2577         Reverted changeset:
2578
2579         "Subclass CachedFont for SVG fonts"
2580         https://bugs.webkit.org/show_bug.cgi?id=138686
2581         http://trac.webkit.org/changeset/176264
2582
2583 2014-11-18  Daniel Bates  <dabates@apple.com>
2584
2585         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
2586         SPI are not available in public SDK
2587         https://bugs.webkit.org/show_bug.cgi?id=138802
2588
2589         Reviewed by David Kilzer.
2590
2591         Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
2592         libdispatch and Mach headers directly.
2593
2594         * Platform/mac/SharedMemoryMac.cpp:
2595         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
2596
2597 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
2598
2599         Subclass CachedFont for SVG fonts
2600         https://bugs.webkit.org/show_bug.cgi?id=138686
2601
2602         Reviewed by Simon Fraser.
2603
2604         Update for enum type.
2605
2606         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2607         (WebKit::maximumBufferingTime):
2608
2609 2014-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2610
2611         [GTK] Add API to create a WebKitWebContext
2612         https://bugs.webkit.org/show_bug.cgi?id=138826
2613
2614         Reviewed by Gustavo Noronha Silva.
2615
2616         We have always used a default web context without providing API to
2617         create others. The main reason was that nobody requested it and we
2618         haven't needed it either. The main problem of the default web
2619         context is that you can't configure anything during
2620         construction. This hasn't been a problem so far because all the
2621         web context configuration we expose in the API can be configured
2622         after construction. But now we need to expose API to allow the
2623         user to configure the local storage directory, which is a
2624         construct only configuration. The default web context was also a
2625         problem for our unit tests, because sharing the same context made
2626         it difficult to ensure tests cases are independent to each other.
2627
2628         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
2629         (WebKitGeolocationProvider::~WebKitGeolocationProvider): Reset the
2630         provider to avoid crashes when web context is destroyed and a new
2631         one is created.
2632         * UIProcess/API/gtk/WebKitWebContext.cpp:
2633         (webkitWebContextConstructed): Add constructed implementation to
2634         create the WebContext and initialize it.
2635         (webkitWebContextDispose): Detach web context clients to avoid
2636         crashes when a client callback is called on a disposed WebKitWebContext.
2637         (webkit_web_context_class_init): Initialize gettext, add
2638         constructed implementation and add the pointer to the vmethods
2639         when creating signals.
2640         (createDefaultWebContext): Simply create a WebKitWebContext.
2641         (webkit_web_context_new): New public method to create a WebKitWebContext.
2642         (injectedBundleFilename): Deleted.
2643         * UIProcess/API/gtk/WebKitWebContext.h: Add virtual methods for
2644         signals, so that users can inherit from WebKitWebContext and
2645         override the virtual methods.
2646         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
2647
2648 2014-11-18  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2649
2650         [SOUP] [GnuTLS] Don't use a SSL3.0 record version in client hello.
2651         https://bugs.webkit.org/show_bug.cgi?id=138794
2652
2653         Reviewed by Sergio Villar Senin.
2654
2655         It seems that following POODLE many sites incorrectly banned SSL 3.0
2656         record packet versions. Since GnuTLS uses a SSL 3.0 record to
2657         advertise TLS 1.2, they are effectively banning it even if it doesn't
2658         advertise SSL 3.0. That is a server issue, but it can be worked around
2659         by using the modifier %LATEST_RECORD_VERSION.
2660
2661         With this modifier, GnuTLS will use the latest TLS version record
2662         in client hello instead of using the default SSL 3.0.
2663
2664         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
2665         (main):
2666         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
2667         (main):
2668
2669 2014-11-17  Conrad Shultz  <conrad_shultz@apple.com>
2670
2671         Page previews should be loaded sooner
2672         https://bugs.webkit.org/show_bug.cgi?id=138814
2673
2674         Reviewed by Tim Horton.
2675
2676         * UIProcess/mac/WKActionMenuController.mm:
2677         (-[WKActionMenuController willOpenMenu:withEvent:]):
2678         Send -_createPreviewPopover..
2679         (-[WKActionMenuController _previewURLFromActionMenu:]):
2680         Relocate some logic to the new -_createPreviewPopover; gate early return on popover visibility.
2681         (-[WKActionMenuController _createPreviewPopover]):
2682         Renamed from -_createPreviewPopoverForURL:originRect:; explicitly send -loadView to warm up the preview view.
2683         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]): Deleted.
2684
2685 2014-11-17  Beth Dakin  <bdakin@apple.com>
2686
2687         Preview is sometimes dismissed too early
2688         https://bugs.webkit.org/show_bug.cgi?id=138811
2689         -and corresponding-
2690         rdar://problem/18900839
2691
2692         Reviewed by Tim Horton.
2693
2694         Don’t make the popover transient until didCloseMenu: time.
2695         * UIProcess/mac/WKActionMenuController.mm:
2696         (-[WKActionMenuController didCloseMenu:withEvent:]):
2697         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
2698
2699 2014-11-17  Daniel Bates  <dabates@apple.com>
2700
2701         Unreviewed, rolling out r176232.
2702
2703         Broke the Mac build. Will investigate offline.
2704
2705         Reverted changeset:
2706
2707         "[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
2708         MobileGestalt"
2709         https://bugs.webkit.org/show_bug.cgi?id=138802
2710         http://trac.webkit.org/changeset/176232
2711
2712 2014-11-17  Daniel Bates  <dabates@apple.com>
2713
2714         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
2715         SPI are not available in public SDK
2716         https://bugs.webkit.org/show_bug.cgi?id=138802
2717
2718         Reviewed by David Kilzer.
2719
2720         Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
2721         libdispatch and Mach headers directly.
2722
2723         * Platform/mac/SharedMemoryMac.cpp:
2724         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
2725
2726 2014-11-17  Daniel Bates  <dabates@apple.com>
2727
2728         [iOS] CoreText and CoreUI SPI are not available in public SDK
2729         https://bugs.webkit.org/show_bug.cgi?id=138760
2730
2731         Reviewed by David Kilzer.
2732
2733         Include header CoreTextSPI.h instead of including CoreText private headers.
2734
2735         * WebProcess/WebPage/WebPage.cpp:
2736
2737 2014-11-17  Tim Horton  <timothy_horton@apple.com>
2738
2739         DataDetectors PageOverlay callbacks can come in to the wrong overlay
2740         https://bugs.webkit.org/show_bug.cgi?id=138801
2741         <rdar://problem/18991369>
2742
2743         Reviewed by Anders Carlsson.
2744
2745         We can call dataDetectorsDidHideUI on the wrong (or no) PageOverlay,
2746         because it's possible to have another performActionMenuHitTestAtLocation
2747         between the first one and the dataDetectorsDid*UI that correspond to it.
2748
2749         To make sure that the callbacks come to the right PageOverlay, plumb
2750         an integer ID through all of the callbacks and find the overlay based on that.
2751
2752         * Shared/mac/ActionMenuHitTestResult.h:
2753         Store the ID of the PageOverlay that overrode data detection.
2754
2755         * UIProcess/mac/WKActionMenuController.mm:
2756         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
2757         Send the ID back to the Web process when replying from DD callbacks.
2758
2759         * WebProcess/WebPage/WebPage.h:
2760         * WebProcess/WebPage/WebPage.messages.in:
2761         * WebProcess/WebPage/mac/WebPageMac.mm:
2762         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2763         Store the ID of the PageOverlay that overrode data detection instead of
2764         keeping the PageOverlay itself.
2765
2766         (WebKit::WebPage::dataDetectorsDidPresentUI):
2767         (WebKit::WebPage::dataDetectorsDidChangeUI):
2768         (WebKit::WebPage::dataDetectorsDidHideUI):
2769         Find and reply to the correct page overlay.
2770
2771 2014-11-17  Beth Dakin  <bdakin@apple.com>
2772
2773         Whitespace action menus should focus the HitTestResult and create an insertion 
2774         point
2775         https://bugs.webkit.org/show_bug.cgi?id=138786
2776         -and corresponding-
2777         rdar://problem/18944893
2778
2779         Reviewed by Tim Horton.
2780
2781         Whitespace menus should cause the HitTestResult to be focused, and they should set 
2782         the selection based on the HitTest location.
2783         * UIProcess/WebPageProxy.cpp:
2784         (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult):
2785         * UIProcess/WebPageProxy.h:
2786         * UIProcess/mac/WKActionMenuController.mm:
2787         (-[WKActionMenuController isMenuForTextContent]):
2788         (-[WKActionMenuController willOpenMenu:withEvent:]):
2789         * WebProcess/WebPage/WebPage.h:
2790         * WebProcess/WebPage/WebPage.messages.in:
2791         * WebProcess/WebPage/mac/WebPageMac.mm:
2792         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2793         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
2794
2795 2014-11-17  Daniel Bates  <dabates@apple.com>
2796
2797         [iOS] AVKit and MediaPlayer SPI are not available in public SDK
2798         https://bugs.webkit.org/show_bug.cgi?id=138756
2799
2800         Reviewed by Eric Carlson.
2801
2802         Include header MPAVRoutingControllerSPI.h instead of including the
2803         private header MPAVRoutingController.h.
2804
2805         Additionally, sort the list of #import directives.
2806
2807         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2808
2809 2014-11-17  Daniel Bates  <dabates@apple.com>
2810
2811         [iOS] QuartzCore SPI not available in public SDK
2812         https://bugs.webkit.org/show_bug.cgi?id=138751
2813
2814         Reviewed by David Kilzer.
2815
2816         * Shared/mac/RemoteLayerBackingStore.mm: Move CALayer forward declaration
2817         from this file to file QuartzCoreSPI.h and include header QuartzCoreSPI.h.
2818         * Shared/mac/RemoteLayerTreePropertyApplier.mm: Ditto.
2819         * UIProcess/API/Cocoa/WKWebView.mm: Include header QuartzCoreSPI.h instead
2820         of including QuartzCore headers directly.
2821         * UIProcess/ios/ViewGestureControllerIOS.mm: Ditto.
2822         * UIProcess/ios/WKContentView.mm: Ditto.
2823         * UIProcess/ios/WKPDFPageNumberIndicator.mm: Ditto.
2824         * UIProcess/mac/ViewGestureControllerMac.mm: Move CAFilter forward declarations
2825         from this file to fileQuartzCoreSPI.h and include header QuartzCoreSPI.h.
2826         Also sort the list of #import directives.
2827         * UIProcess/mac/ViewSnapshotStore.mm: Include header QuartzCoreSPI.h
2828         instead of including QuartzCore headers directly.
2829
2830 2014-11-17  Eric Carlson  <eric.carlson@apple.com>
2831
2832         [iOS] allow host application to opt-out of alternate fullscreen
2833         https://bugs.webkit.org/show_bug.cgi?id=138787
2834
2835         Reviewed by Darin Adler.
2836
2837         * Shared/WebPreferencesDefinitions.h:
2838         * UIProcess/API/C/WKPreferences.cpp:
2839         (WKPreferencesSetAllowsAlternateFullscreen):
2840         (WKPreferencesGetAllowsAlternateFullscreen):
2841         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2842         * UIProcess/API/Cocoa/WKWebView.mm:
2843         (-[WKWebView initWithFrame:configuration:]):
2844         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2845         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2846         (-[WKWebViewConfiguration init]):
2847         (-[WKWebViewConfiguration copyWithZone:]):
2848         * WebProcess/WebPage/WebPage.cpp:
2849         (WebKit::WebPage::updatePreferences):
2850
2851 2014-11-16  Benjamin Poulain  <bpoulain@apple.com>
2852
2853         Start cleaning up minimal UI from WKWebView
2854         https://bugs.webkit.org/show_bug.cgi?id=138725
2855
2856         Reviewed by Sam Weinig.
2857
2858         Start removing the old update path for minimumLayoutSize/maximumUnobscuredSize.
2859
2860         Unfortunately, I cannot remove everything yet because the clients still did not have
2861         alternatives to [_overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride]
2862         and might change the minimal UI options.
2863
2864         This patch adds [_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride] to move
2865         in the right direction. Next we'll udpate the client code and get rid of all the useless code.
2866
2867         * UIProcess/API/Cocoa/WKWebView.mm:
2868         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
2869         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
2870         (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]): Deleted.
2871         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2872
2873 2014-11-16  Zan Dobersek  <zdobersek@igalia.com>
2874
2875         [TexMap] Add typecasting support for GraphicsLayerTextureMapper
2876         https://bugs.webkit.org/show_bug.cgi?id=138741
2877
2878         Reviewed by Martin Robinson.
2879
2880         Replace uses of toTextureMapperLayer() with downcasting and
2881         calling the GraphicsLayerTextureMapper::layer() method.
2882
2883         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2884         (WebKit::LayerTreeHostGtk::initialize):
2885         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
2886         (WebKit::LayerTreeHostGtk::compositeLayersToContext):
2887
2888 2014-11-16  Tim Horton  <timothy_horton@apple.com>
2889
2890         Use TextIndicator instead of the built in Lookup highlight
2891         https://bugs.webkit.org/show_bug.cgi?id=138775
2892         <rdar://problem/18953982>
2893
2894         Follow-up to r176164.
2895
2896         * UIProcess/API/mac/WKView.mm:
2897         (-[WKView dealloc]):
2898         (-[WKView initWithFrame:context:configuration:webView:]):
2899         * UIProcess/mac/PageClientImpl.mm:
2900         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2901         Include the softlinking macros directly in the files they're used
2902         in, as they're supposed to be used.
2903
2904 2014-11-16  Tim Horton  <timothy_horton@apple.com>
2905
2906         Use TextIndicator instead of the built in Lookup highlight
2907         https://bugs.webkit.org/show_bug.cgi?id=138775
2908         <rdar://problem/18953982>
2909
2910         Reviewed by Anders Carlsson.
2911
2912         In order to make the yellow highlight for Lookup more accurately match the
2913         painted content of the web page (in light of e.g. Web fonts, and interesting
2914         text features that only WebKit implements and cannot round-trip through
2915         NSAttributedString), use a TextIndicator instead of the built-in Lookup
2916         highlight where possible.
2917
2918         * Configurations/BaseTarget.xcconfig:
2919         Make it possible to include headers from private frameworks. This matches WebCore.
2920
2921         * Shared/DictionaryPopupInfo.cpp:
2922         (WebKit::DictionaryPopupInfo::encode):
2923         (WebKit::DictionaryPopupInfo::decode):
2924         * Shared/DictionaryPopupInfo.h:
2925         Include the attributed string inside the DictionaryPopupInfo, instead of
2926         as a secondary argument to DidPerformDictionaryLookup.
2927         Add a TextIndicator to DictionaryPopupInfo, which can be used to highlight
2928         the text in the UI process.
2929
2930         * UIProcess/API/mac/WKView.mm:
2931         (-[WKView dealloc]):
2932         (-[WKView viewDidMoveToWindow]):
2933         (-[WKView _dictionaryLookupPopoverWillClose:]):
2934         (-[WKView _setTextIndicator:fadeOut:animate:animationCompletionHandler:]):
2935         (-[WKView _setTextIndicator:fadeOut:animate:]):
2936         (-[WKView initWithFrame:context:configuration:webView:]):
2937         (+[WKView hideWordDefinitionWindow]):
2938         * UIProcess/API/mac/WKViewInternal.h:
2939         Adopt the Lookup SPI header.
2940         If we have the requisite API, register the notification that Lookup sends
2941         when the popover closes, and hook that up to hide the text indicator.
2942         Add a version of _setTextIndicator: that takes an animation completion handler.
2943
2944         * UIProcess/PageClient.h:
2945         * UIProcess/WebPageProxy.h:
2946         * UIProcess/WebPageProxy.messages.in:
2947         * UIProcess/ios/WebPageProxyIOS.mm:
2948         (WebKit::WebPageProxy::didPerformDictionaryLookup):
2949         * UIProcess/mac/WebPageProxyMac.mm:
2950         (WebKit::WebPageProxy::didPerformDictionaryLookup):
2951         Adjust to the new didPerformDictionaryLookup signature.
2952
2953         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2954         (InitWebCoreSystemInterface):
2955         Remove a WKSI import.
2956
2957         * UIProcess/mac/PageClientImpl.h:
2958         * UIProcess/mac/PageClientImpl.mm:
2959         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2960         If we have the requisite API, disable Lookup's built-in highlight and
2961         present a TextIndicator instead.
2962         We currently have to run the animations serially (first bounce the TextIndicator,
2963         then animate in the Lookup popover) because the act of adding the Lookup popover
2964         blocks us from getting any animation events for the TextIndicator, and breaks
2965         the bounce. We could also fix this by using a threaded animation for the TextIndicator,
2966         but it's not clear that it's safe to do so.
2967
2968         (WebKit::PageClientImpl::dismissDictionaryLookupPanel):
2969         When explicitly dismissing the Lookup panel, also hide the text indicator.
2970
2971         * UIProcess/mac/TextIndicatorWindow.h:
2972         * UIProcess/mac/TextIndicatorWindow.mm:
2973         (WebKit::TextIndicatorWindow::setTextIndicator):
2974         Store the completion handler.
2975
2976         (WebKit::TextIndicatorWindow::bounceAnimationDidEnd):
2977         Call the completion handler when the animation completes.
2978
2979         * UIProcess/mac/WKActionMenuController.mm:
2980         (-[WKActionMenuController _createActionMenuItemForTag:]):
2981         Disable the Lookup item if lookup is not available.
2982
2983         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2984         (WebKit::PDFPlugin::showDefinitionForAttributedString):
2985         Adjust to the new didPerformDictionaryLookup signature.
2986         Since PDFPlugin can't trivially repaint the required part of the PDF,
2987         we don't build a TextIndicator. This will result in PDFPlugin continuing
2988         to use Lookup's built-in highlight.
2989         
2990         * WebProcess/WebPage/mac/WebPageMac.mm:
2991         (WebKit::WebPage::performDictionaryLookupForRange):
2992         Build a TextIndicator from the Lookup range and pass it along with
2993         the DictionaryPopupInfo.
2994
2995 2014-11-15  David Kilzer  <ddkilzer@apple.com>
2996
2997         REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
2998
2999         This regressed with the following commit:
3000
3001             Move DataDetectors scanning code to WebCore
3002             https://bugs.webkit.org/show_bug.cgi?id=138731
3003             <rdar://problem/18877535>
3004
3005         * Shared/mac/ActionMenuHitTestResult.mm: Add PLATFORM(MAC) check
3006         around the entire implementation since it it unused on iOS.
3007
3008 2014-11-14  Anders Carlsson  <andersca@apple.com>
3009
3010         Raise an exception if -[WKWebView initWithFrame:configuration:] is passed a nil configuration
3011         https://bugs.webkit.org/show_bug.cgi?id=138757
3012
3013         Reviewed by Simon Fraser.
3014
3015         * UIProcess/API/Cocoa/WKWebView.mm:
3016         (-[WKWebView initWithFrame:configuration:]):
3017
3018 2014-11-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3019
3020         Network process crash when running http/tests/appcache/fallback.html
3021         https://bugs.webkit.org/show_bug.cgi?id=138740
3022
3023         Reviewed by Alexey Proskuryakov.
3024
3025         It happens because ResourceHandle::continueWillSendRequest() is
3026         called with a null request. We could handle that case in the
3027         ResourceHandle, but the thing is tha the behaviour is
3028         not the same for async loads, or when loading in the web
3029         process. In WebResourceLoader::willSendRequest(),
3030         ResourceRequest::willSendRequest() is called, and cancels the load
3031         if the client returns a null request. In this case, the
3032         ResourceLoader is detached and WebResourceLoader::willSendRequest()
3033         returns early without sending the ContinueWillSendRequest message
3034         to the network process. However, for synchronous loads,
3035         NetworkResourceLoader::continueWillSendRequest() is always called.
3036
3037         Fixes http/tests/appcache/fallback.html for GTK port when using
3038         the network process.
3039
3040         * NetworkProcess/NetworkResourceLoader.cpp:
3041         (WebKit::NetworkResourceLoader::continueWillSendRequest): Do not
3042         call ResourceHandle::continueWillSendRequest() if the client
3043         request is null, since the load is going to be cancelled.
3044
3045 2014-11-15  Tim Horton  <timothy_horton@apple.com>
3046
3047         Implement data detectors and mailto action menus for WebKit1
3048         https://bugs.webkit.org/show_bug.cgi?id=138765
3049         <rdar://problem/18877535>
3050
3051         Reviewed by Beth Dakin.
3052
3053         * UIProcess/mac/WKActionMenuController.mm:
3054         (-[WKActionMenuController _defaultMenuItemsForMailtoLink]):
3055
3056 2014-11-14  Tim Horton  <timothy_horton@apple.com>
3057
3058         Remove pre-[DDActionContext contextForView:...] fallback path
3059         https://bugs.webkit.org/show_bug.cgi?id=138735
3060         <rdar://problem/18982046>
3061
3062         Reviewed by Simon Fraser.
3063
3064         * UIProcess/mac/WKActionMenuController.mm:
3065         (-[WKActionMenuController willOpenMenu:withEvent:]):
3066         (-[WKActionMenuController didCloseMenu:withEvent:]):
3067         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3068         (hasDataDetectorsCompletionAPI): Deleted.
3069         Remove the now-unnecessary fallback path.
3070
3071 2014-11-14  Tim Horton  <timothy_horton@apple.com>
3072
3073         Frequent crashes under actionContextForResultAtPoint
3074         https://bugs.webkit.org/show_bug.cgi?id=138761
3075         <rdar://problem/18990684>
3076
3077         Reviewed by Dean Jackson.
3078
3079         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3080         (PageOverlayClientImpl::actionContextForResultAtPoint):
3081         Initialize apiRange.
3082
3083 2014-11-14  Daniel Bates  <dabates@apple.com>
3084
3085         [iOS] CoreGraphics SPI not available in public SDK
3086         https://bugs.webkit.org/show_bug.cgi?id=138709
3087
3088         Reviewed by David Kilzer.
3089
3090         Include header CoreGraphicsSPI.h instead of including headers of
3091         CoreGraphics directly.
3092
3093         * UIProcess/API/Cocoa/WKWebView.mm:
3094         * UIProcess/ios/WKScrollView.mm:
3095
3096 2014-11-14  Tim Horton  <timothy_horton@apple.com>
3097
3098         Move DataDetectors scanning code to WebCore
3099         https://bugs.webkit.org/show_bug.cgi?id=138731
3100         <rdar://problem/18877535>
3101
3102         Reviewed by Anders Carlsson.
3103
3104         Move DataDetectors scanning code to WebCore, so that both WebKits can use it.
3105
3106         * Shared/TextIndicator.cpp:
3107         (WebKit::TextIndicator::createWithRange):
3108         Move createWithRange in from WebPageMac's textIndicatorForRange.
3109
3110         (WebKit::TextIndicator::createWithSelectionInFrame):
3111         * Shared/TextIndicator.h:
3112         * WebProcess/WebPage/WebFrame.cpp:
3113         (WebKit::WebFrame::createSelectionSnapshot):
3114         * WebProcess/WebPage/WebFrame.h:
3115         Constify some things.
3116
3117         * WebProcess/WebPage/mac/WebPageMac.mm:
3118         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3119         Avoid using the DD result if it didn't come with a non-null Range.
3120         Make use of detectItemAroundHitTestResult and TextIndicator::createWithRange.
3121
3122         (WebKit::scanForDataDetectedItems): Deleted.
3123         (WebKit::textIndicatorForRange): Deleted.
3124         Moved these two to other places.
3125
3126 2014-11-14  Dan Bernstein  <mitz@apple.com>
3127
3128         <rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
3129         https://bugs.webkit.org/show_bug.cgi?id=138753
3130
3131         Reviewed by Tim Horton.
3132
3133         Rather than having the UI process record a snapshot jut before the Web Content process’s
3134         notion of its current back/forward list item changes, have the UI process record a snapshot
3135         right before its own current back/forward list item changes. This ensures that the right
3136         snapshot gets attached to the right item in the UI process.
3137
3138         * UIProcess/WebBackForwardList.cpp:
3139         (WebKit::WebBackForwardList::addItem): If there is a current item, record a navigation
3140         snapshot of it before making the new item current.
3141         (WebKit::WebBackForwardList::goToItem): If there is a current item, record a navigation
3142         snapshot of it before making another item current.
3143
3144         * UIProcess/WebPageProxy.cpp:
3145         (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame): Deleted.
3146         * UIProcess/WebPageProxy.h:
3147
3148         * UIProcess/WebPageProxy.messages.in: Removed willChangeCurrentHistoryItemForMainFrame
3149         message.
3150
3151         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3152         (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
3153         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Removed declaration of
3154         willChangeCurrentHistoryItem override.
3155
3156         * WebProcess/WebPage/WebPage.cpp:
3157         (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame): Deleted.
3158         * WebProcess/WebPage/WebPage.h:
3159
3160 2014-11-14  Dan Bernstein  <mitz@apple.com>
3161
3162         Add some tracing to help investigating <rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
3163         https://bugs.webkit.org/show_bug.cgi?id=138750
3164
3165         Reviewed by Tim Horton.
3166
3167         Emit trace messages at various points, and log them prior to crashing if the error condition
3168         occurs. Otherwise, clear the trace messages.
3169
3170         * UIProcess/ios/ViewGestureControllerIOS.mm:
3171         (WebKit::addLogEntry): Helper function that adds a message, including a time stamp and a
3172         backtrace, to m_logEntries.
3173         (WebKit::dumpLogEntries): Helper function that logs everything in m_logEntries.
3174         (WebKit::ViewGestureController::beginSwipeGesture): Add a log entry.
3175         (WebKit::ViewGestureController::endSwipeGesture): If
3176         m_webPageProxyForBackForwardListForCurrentSwipe is null, dump the log entries just before
3177         crashing. Otherwise, clear m_logEntries.
3178         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree): Add a log entry.
3179         (WebKit::ViewGestureController::removeSwipeSnapshot): Add a log entry.
3180         * UIProcess/mac/ViewGestureController.h: Defined ENABLE_VIEW_GESTURE_CONTROLLER_TRACING,
3181         and added m_logEntries member variable.
3182
3183 2014-11-14  Beth Dakin  <bdakin@apple.com>
3184
3185         URLs for some videos are not valid URLs, should not be exposed to action menu
3186         https://bugs.webkit.org/show_bug.cgi?id=138746
3187         -and corresponding-
3188         rdar://problem/18941927
3189
3190         Reviewed by Tim Horton.
3191
3192         If the video cannot be downloaded, that is also an indication that the URL of the 
3193         video will not be valid on its own. In these cases, we should share or copy the 
3194         main page’s URL.
3195         * UIProcess/mac/WKActionMenuController.mm:
3196         (-[WKActionMenuController _defaultMenuItemsForVideo]):
3197         (-[WKActionMenuController _copyVideoURL:]):
3198
3199 2014-11-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3200
3201         [SOUP] Encode/Decode allowCookies in ResourceRequest
3202         https://bugs.webkit.org/show_bug.cgi?id=138730
3203
3204         Reviewed by Sergio Villar Senin.
3205
3206         We are not sending this information to the network process, making
3207         cookies always available. Fixes
3208         http/tests/xmlhttprequest/cross-origin-no-authorization.html when
3209         network process is enabled.
3210
3211         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
3212         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3213         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3214
3215 2014-11-14  Zan Dobersek  <zdobersek@igalia.com>
3216
3217         Unreviewed build fix for the GTK+ port using Clang.
3218
3219         * UIProcess/gtk/RedirectedXCompositeWindow.h: Include the <functional>
3220         header for the use of std::function<>.
3221
3222 2014-11-13  Dan Bernstein  <mitz@apple.com>
3223
3224         Two WKWebView internal methods are implemented in a category
3225         https://bugs.webkit.org/show_bug.cgi?id=138728
3226
3227         Reviewed by Tim HOrton.
3228
3229         Moved the implementations from the category to the class.
3230
3231         * UIProcess/API/Cocoa/WKWebView.mm:
3232         (-[WKWebView _ignoresNonWheelMouseEvents]):
3233         (-[WKWebView _setIgnoresNonWheelMouseEvents:]):
3234
3235 2014-11-13  Myles C. Maxfield  <mmaxfield@apple.com>
3236
3237         Move FontMac and FontCacheMac off of WKSI
3238         https://bugs.webkit.org/show_bug.cgi?id=138633
3239
3240         Reviewed by Simon Fraser.
3241
3242         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3243         (InitWebCoreSystemInterface):
3244         * mac/WebKit2.order:
3245
3246 2014-11-13  Eric Carlson  <eric.carlson@apple.com>
3247
3248         Context menus should not offer the "Download video" option for videos that cannot 
3249         be downloaded
3250         https://bugs.webkit.org/show_bug.cgi?id=138530
3251         -and corresponding-
3252         rdar://problem/18919130
3253
3254         Reviewed by Tim Horton.
3255
3256         Expose isDownloadableMedia() to the InjectedBundleHitTestResult.
3257         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
3258         (WKBundleHitTestResultIsDownloadableMedia):
3259         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
3260         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3261         (WebKit::InjectedBundleHitTestResult::isDownloadableMedia):
3262         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
3263
3264 2014-11-13  Daniel Bates  <dabates@apple.com>
3265
3266         [iOS] NSGeometry data types are not available in the public SDK
3267         https://bugs.webkit.org/show_bug.cgi?id=137536
3268
3269         Reviewed by David Kilzer.
3270
3271         Substitute header WAKAppKitStubs.h for NSGeometry.h as the latter is a
3272         private header.
3273
3274         * Shared/ios/NativeWebTouchEventIOS.mm:
3275
3276 2014-11-13  Simon Fraser  <simon.fraser@apple.com>
3277
3278         [WK2] Fire a layout milestone on session restore based on render tree size
3279         https://bugs.webkit.org/show_bug.cgi?id=138711
3280         rdar://problem/16033854
3281
3282         Reviewed by Anders Carlsson.
3283         
3284         Add a session-restore layout milestone which fires after restoring a session,
3285         when the render tree size reaches 50% of the size saved in the session state.
3286
3287         * Shared/SessionState.h: Add renderTreeSize.
3288         * UIProcess/API/Cocoa/WKWebView.mm:
3289         (layoutMilestones): Translate from SPI to WebCore milestones.
3290         * UIProcess/API/Cocoa/WKWebViewPrivate.h: New iOS-only milestone, er, event.
3291         * UIProcess/Cocoa/NavigationState.mm:
3292         (WebKit::renderingProgressEvents): Translate from WebCore milestone to rendering event.
3293         * UIProcess/WebPageProxy.cpp:
3294         (WebKit::WebPageProxy::WebPageProxy): Init stuff.
3295         (WebKit::WebPageProxy::sessionState):
3296         (WebKit::WebPageProxy::restoreFromSessionState): Zero out the target render tree size,
3297         then get it out of session state and set the flag to say that we haven't reached it yet.
3298         (WebKit::WebPageProxy::listenForLayoutMilestones): Set a flag to know that we should fire
3299         the milestone. The other milestones get sent directly to WebCore.
3300         * UIProcess/WebPageProxy.h:
3301         * UIProcess/ios/WebPageProxyIOS.mm:
3302         (WebKit::exceedsRenderTreeSizeSizeThreshold): Return true when we've reached 50%.
3303         (WebKit::WebPageProxy::didCommitLayerTree): Fire the milestone when appropriate.
3304         * UIProcess/mac/LegacySessionStateCoding.cpp: Rev the session state data for iOS
3305         (where doing so is less disruptive). Standardize some CFString constants.
3306         (WebKit::encodeSessionHistory): Wrap for legibility.
3307         (WebKit::encodeLegacySessionState): Make a CFNumber for render tree size, and store
3308         it in the root dictionary.
3309         (WebKit::decodeBackForwardTreeNode): Move a comment to match another similar block.
3310         (WebKit::decodeLegacySessionState): Decode render tree size and store it.
3311
3312 2014-11-13  Tim Horton  <timothy_horton@apple.com>
3313
3314         Adjust the WKBundlePageOverlay Data Detectors SPI
3315         https://bugs.webkit.org/show_bug.cgi?id=138685
3316         <rdar://problem/18947156>
3317
3318         Reviewed by Anders Carlsson.
3319
3320         * UIProcess/mac/WKActionMenuController.mm:
3321         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3322         Forward DDActionContext callbacks to the Web process.
3323
3324         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3325         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
3326         * WebProcess/WebPage/WebPageOverlay.cpp:
3327         * WebProcess/WebPage/WebPageOverlay.h:
3328         Add four DataDetectors-related WebKit2-only page overlay callbacks:
3329
3330         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
3331         Called during the action menu hit test; clients can reply with a DDActionContext
3332         and a DOM range, and WebKit will treat that result and range as if it had
3333         detected it itself, building the action menu and showing the yellow highlight as usual.
3334
3335         (WebKit::WebPageOverlay::dataDetectorsPresentedUI):
3336         (WebKit::WebPageOverlay::dataDetectorsChangedUI):
3337         (WebKit::WebPageOverlay::dataDetectorsHidUI):
3338         These correspond to the DDActionContext callbacks, and can be used by clients
3339         to show/hide corresponding UI while DataDetectors in the UI process is presenting UI.
3340
3341         (WebKit::WebPageOverlay::prepareForActionMenu): Deleted.
3342         Get rid of prepareForActionMenu, as nobody ever used it.
3343
3344         * WebProcess/WebPage/WebPage.cpp:
3345         Add WebPageOverlay.h so that we can build, because the destructor lives here.
3346
3347         * WebProcess/WebPage/WebPage.h:
3348         * WebProcess/WebPage/WebPage.messages.in:
3349         
3350         * WebProcess/WebPage/mac/WebPageMac.mm:
3351         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3352         Give all of the WebPageOverlays the first shot at data detection; if none of them
3353         reply with a valid DDActionContext/DOM range, we'll go ahead and do our normal detection.
3354
3355         (WebKit::WebPage::dataDetectorsPresentedUI):
3356         (WebKit::WebPage::dataDetectorsChangedUI):
3357         (WebKit::WebPage::dataDetectorsHidUI):
3358         Forward these along to the active WebPageOverlay.
3359
3360 2014-11-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3361
3362         [SOUP] Missing ResourceRequest members encoded/decoded
3363         https://bugs.webkit.org/show_bug.cgi?id=138694
3364
3365         Reviewed by Sergio Villar Senin.
3366
3367         At least timeoutInterval and priority should also be
3368         encoded/decoded. This fixes all http/tests/xmlhttprequest/timeout/
3369         tests when using the network process, since the timeout is always
3370         0 for all requests that we send to the network process.
3371
3372         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
3373         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3374         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3375
3376 2014-11-12  Ryuan Choi  <ryuan.choi@navercorp.com>
3377
3378         [EFL] Fix the build with EFL 1.12
3379         https://bugs.webkit.org/show_bug.cgi?id=138245
3380
3381         Reviewed by Gyuyoung Kim.
3382
3383         * UIProcess/API/efl/EwkView.cpp:
3384         First, modified to use Evas_GL raw pointer instead of UniquePtrEfl because
3385         Evas_GL.h can't be included in UniquePtrEfl.h
3386         It should be moved into EvasGLContext because WebKit/EFL use only one Evas_GL.
3387         Second, provided the version of GLES in Evas_GL_Config not to break build with
3388         EFL 1.12
3389         (EwkView::EwkView):
3390         (EwkView::~EwkView):
3391         (EwkView::displayTimerFired):
3392         (EwkView::createGLSurface):
3393         * UIProcess/API/efl/EwkView.h:
3394
3395 2014-11-12  Ada Chan  <adachan@apple.com>
3396
3397         Fix the iOS build.
3398
3399         * WebProcess/Plugins/PluginView.cpp:
3400         (WebKit::PluginView::pageMutedStateDidChange):
3401
3402 2014-11-05  Ada Chan  <adachan@apple.com>
3403
3404         Implement new plug-in API for muting plug-ins
3405         https://bugs.webkit.org/show_bug.cgi?id=138105
3406
3407         Reviewed by Anders Carlsson.
3408
3409         Handle the setting of NPNVmuteAudioBool on the plug-in.
3410
3411         * PluginProcess/PluginControllerProxy.cpp:
3412         (WebKit::PluginControllerProxy::PluginControllerProxy):
3413         Initialize m_isMuted.
3414         (WebKit::PluginControllerProxy::mutedStateChanged):
3415         Tell the plugin about the new muted state.
3416         * PluginProcess/PluginControllerProxy.h:
3417         * PluginProcess/PluginControllerProxy.messages.in:
3418         Add the MutedStateChanged message.
3419         * PluginProcess/PluginCreationParameters.cpp:
3420         (WebKit::PluginCreationParameters::PluginCreationParameters):
3421         Initialize isMuted.
3422         (WebKit::PluginCreationParameters::encode):
3423         Handle isMuted.
3424         (WebKit::PluginCreationParameters::decode):
3425         Ditto.
3426         * PluginProcess/PluginCreationParameters.h:
3427         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3428         (WebKit::NPN_GetValue):
3429         Get the plug-in's muted state.
3430         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3431         (WebKit::NetscapePlugin::isMuted):
3432         Get the muted state from PluginControllerProxy.
3433         (WebKit::NetscapePlugin::mutedStateChanged):
3434         Call NPP_SetValue with NPNVmuteAudioBool and the updated muted state.
3435         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3436         * WebProcess/Plugins/Plugin.h:
3437         (WebKit::Plugin::mutedStateChanged):
3438         * WebProcess/Plugins/PluginController.h:
3439         * WebProcess/Plugins/PluginProxy.cpp:
3440         (WebKit::PluginProxy::initialize):
3441         Set m_pendingPluginCreationParameters->isMuted.
3442         (WebKit::PluginProxy::mutedStateChanged):
3443         Send the MutedStateChanged message to the plugin process.
3444         * WebProcess/Plugins/PluginProxy.h:
3445         * WebProcess/Plugins/PluginView.cpp:
3446         (WebKit::PluginView::pageMutedStateDidChange):
3447         Call Plugin::mutedStateChanged() with the page's muted state.
3448         (WebKit::PluginView::isMuted):
3449         Get the page's current muted state.
3450         * WebProcess/Plugins/PluginView.h:
3451
3452 2014-11-12  Tim Horton  <timothy_horton@apple.com>
3453
3454         Two action menu item titles are swapped
3455         https://bugs.webkit.org/show_bug.cgi?id=138667
3456         <rdar://problem/18960409>
3457
3458         Reviewed by Beth Dakin.
3459
3460         * UIProcess/mac/WKActionMenuController.mm:
3461         (-[WKActionMenuController _createActionMenuItemForTag:]):
3462         Swap them back.
3463
3464 2014-11-12  Commit Queue  <commit-queue@webkit.org>
3465
3466         Unreviewed, rolling out r175806.
3467         https://bugs.webkit.org/show_bug.cgi?id=138666
3468
3469         Capturing CString is not thread safe (Requested by anttik on
3470         #webkit).
3471
3472         Reverted changeset:
3473
3474         "[WK2] Use C++ lambdas in IPC::Connection"
3475         https://bugs.webkit.org/show_bug.cgi?id=138018
3476         http://trac.webkit.org/changeset/175806
3477
3478 2014-11-12  Tim Horton  <timothy_horton@apple.com>
3479
3480         Need to show the text indicator when Data Detectors shows a popover
3481         https://bugs.webkit.org/show_bug.cgi?id=138664
3482         <rdar://problem/18869900>
3483
3484         Reviewed by Beth Dakin.
3485
3486         * UIProcess/mac/WKActionMenuController.h:
3487         * UIProcess/mac/WKActionMenuController.mm:
3488         (hasDataDetectorsCompletionAPI):
3489         Determine if we have the new API.
3490
3491         (-[WKActionMenuController willDestroyView:]):
3492         (-[WKActionMenuController willOpenMenu:withEvent:]):
3493         Make use of the new API.
3494         If we wanted to show a Data Detectors menu but have no items (or they're all
3495         disabled), cancel the menu.
3496         If we don't have it, manually manipulate the highlight.
3497
3498         (-[WKActionMenuController didCloseMenu:withEvent:]):
3499         Make use of the new API.
3500         If we don't have it, manually manipulate the highlight.
3501
3502         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3503         Set up completion handlers if we have the new API; when DataDetectors
3504         presents UI, show the text indicator, when it dismisses, hide it.
3505