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