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