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