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