5d6aec906ef539c55f49ccf8eeebea76daeae9f0
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
2
3         Change HysteresisActivity to use a lambda
4         https://bugs.webkit.org/show_bug.cgi?id=139636
5
6         Reviewed by Darin Adler.
7
8         The current implementation provides notifications via callbacks to a delegate. Using a delegate
9         with callbacks is limiting a number of ways. The callback names are very ambiguous, the callbacks
10         must either be on a separate object (more boilerplate), or the callback must be public for
11         HysteresisActivity to call them, or friends get involved. Without the boilerplate of extra
12         delegate objects it's hard to scale use of these objects – a single object can't serve as a
13         delegate for multiple HysteresisActivity members.
14
15         Instead, make HysteresisActivity take a lambda to callback on state change. To simplify, changed
16         HysteresisState to only track Started/Stopped states (removed WillStopPendingTimeout).
17
18         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp:
19         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
20             - HysteresisActivity now takes a lambda, not a delegate.
21         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
22         (WebKit::WebSQLiteDatabaseTracker::started): Deleted.
23         (WebKit::WebSQLiteDatabaseTracker::stopped): Deleted.
24             - started/stopped merged into hysteresisUpdated
25         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h:
26             - HysteresisActivity is no longer templated on delegate type, changed function declarations.
27
28 2014-12-15  Antti Koivisto  <antti@apple.com>
29
30         WebKit level persistent caching
31         https://bugs.webkit.org/show_bug.cgi?id=30322
32
33         Reviewed by Sam Weinig.
34
35         We can improve performance and open new optimization possibilities by bringing network caching into WebKit.
36
37         This patch implements an experimental HTTP cache living in the network process.
38
39         The main classes are:
40
41         NetworkCache
42             - Implements HTTP cache validation logic including Vary header
43             - Initially non-range GET only
44             - Fast serialization using WebKit types (ResourcesResponse etc) instead of native network layer types
45
46         NetworkCacheKey
47             - Unique identifier for cache entries
48             - Keyed on method/partition/URL
49
50         NetworkCacheStorage
51             - Storage backend
52             - dispatch-IO based implementation (generic posix implementation wouldn't be difficult)
53             - File system only (no SQLite or similar)
54             - One file per resource containing both header and body data
55             - Zero persistent global metadata
56             - Bloom filter for fast fail
57
58         NetworkCacheEncoder/Decoder
59             - Serializisation support with integrity verification.
60
61         The code is behind the NETWORK_CACHE feature flag and requires network process to be enabled to use.
62
63         This patch does not enable the feature yet by default.
64
65         Test: http/tests/cache/disk-cache-validation.html
66
67         * NetworkProcess/cache/NetworkCache.cpp: Added.
68         * NetworkProcess/cache/NetworkCache.h: Added.
69         * NetworkProcess/cache/NetworkCacheKey.cpp: Added.
70         * NetworkProcess/cache/NetworkCacheKey.h: Added.
71         * NetworkProcess/cache/NetworkCacheStorage.h: Added.
72         * NetworkProcess/cache/NetworkCacheStorage.mm: Added.
73         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
74         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
75         (WebKit::NetworkProcess::platformSetCacheModel):
76         * NetworkProcess/ios/NetworkProcessIOS.mm:
77         (WebKit::NetworkProcess::clearCacheForAllOrigins):
78         * NetworkProcess/mac/NetworkProcessMac.mm:
79         (WebKit::NetworkProcess::clearCacheForAllOrigins):
80         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
81         (WebKit::tryGetShareableHandleFromCFData):
82         * Platform/Logging.h:
83         * WebKit2.xcodeproj/project.pbxproj:
84         * config.h:
85
86 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
87
88         Simplify tracking of process suppression disabled for PluginProcessManager
89         https://bugs.webkit.org/show_bug.cgi?id=139611
90
91         Reviewed by Darin Adler.
92
93         Previously if process suppression state changed for any context we would
94         iterate over all contexts to recompute.
95
96         There was also an inconsistency in the code. When plugin processes are
97         created they called processSuppressionIsEnabledForAllContexts(), which
98         checked WebContext::processSuppressionEnabled(), which in turn checks
99         two things - whether any page is currently visible, and whether the
100         suppression is currently disabled for any page. However when updating
101         process supression state we would call
102         processSuppressionPreferenceIsEnabledForAllContexts(), which would just
103         check the value of the key from the context's default PageGroup.
104
105         We shouldn't be taking visibility into account (this is handled from the
106         content, where we know which pages have instances of which plugins), but
107         we should be checking the current pref value of each page.
108
109         We already track in each context whether any page has teh pref set to
110         disable throttling; add a counter to the shared PluginProcessManager to
111         coallesce across all contexts.
112
113         * UIProcess/Plugins/PluginProcessManager.cpp:
114         (WebKit::PluginProcessManager::PluginProcessManager):
115             - added m_processSuppressionDisabledForPageCounter, m_processSuppressionEnabled.
116         * UIProcess/Plugins/PluginProcessManager.h:
117         (WebKit::PluginProcessManager::processSuppressionDisabledForPageCount):
118             - accessor for WebContext to increment count.
119         (WebKit::PluginProcessManager::processSuppressionEnabled):
120             - accessor for PluginProcessProxy.
121         * UIProcess/Plugins/PluginProcessProxy.cpp:
122         (WebKit::PluginProcessProxy::didFinishLaunching):
123             - get initial supression state from the PluginProcessManager, not WebContext.
124         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
125         (WebKit::PluginProcessManager::updateProcessSuppressionState):
126         (WebKit::PluginProcessManager::setProcessSuppressionEnabled): Deleted.
127             - setProcessSuppressionEnabled -> updateProcessSuppressionState
128               rather than WebContext setting suppression state, PluginProcessManager detects
129               when this may need to change & determines a new value for itself.
130         * UIProcess/WebContext.h:
131             - removed processSuppressionIsEnabledForAllContexts, processSuppressionPreferenceIsEnabledForAllContexts
132               updateProcessSuppressionState is no longer const (updates m_pluginProcessManagerProcessSuppressionDisabledCount).
133         * UIProcess/mac/WebContextMac.mm:
134         (WebKit::WebContext::updateProcessSuppressionState):
135             - instead of explicitly recomputing plugin throttling state from Within the WebContext, just update
136               m_pluginProcessManagerProcessSuppressionDisabledCount to count a RefCounter on the shared PluginProcessManager.
137         (WebKit::WebContext::processSuppressionIsEnabledForAllContexts): Deleted.
138         (WebKit::WebContext::processSuppressionPreferenceIsEnabledForAllContexts): Deleted.
139             - removed.
140
141 2014-12-15  Carlos Garcia Campos  <cgarcia@igalia.com>
142
143         [GTK] Use API::LoaderClient instead of WKPageLoaderClient
144         https://bugs.webkit.org/show_bug.cgi?id=139583
145
146         Reviewed by Gustavo Noronha Silva.
147
148         It simplifies the code and it will make easier to implement new
149         loader client methods.
150
151         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
152         (webkitBackForwardListChanged):
153         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
154         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
155         (LoaderClient::LoaderClient):
156         (attachLoaderClientToView):
157         (didStartProvisionalLoadForFrame): Deleted.
158         (didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
159         (didFailProvisionalLoadWithErrorForFrame): Deleted.
160         (didCommitLoadForFrame): Deleted.
161         (didFinishLoadForFrame): Deleted.
162         (didFailLoadWithErrorForFrame): Deleted.
163         (didDisplayInsecureContentForFrame): Deleted.
164         (didRunInsecureContentForFrame): Deleted.
165         (didChangeBackForwardList): Deleted.
166         (didReceiveAuthenticationChallengeInFrame): Deleted.
167         (processDidCrash): Deleted.
168
169 2014-12-15  Gwang Yoon Hwang  <yoon@igalia.com>
170
171         Add initial implementation of ThreadSafeCoordinatedSurface, ThreadedCompositor, and SimpleViewportController
172         https://bugs.webkit.org/show_bug.cgi?id=118383
173
174         Reviewed by Martin Robinson.
175
176         Implements an initial version of the Threaded Compositor.
177
178         Threaded Compositor is a variant of Coordinated Graphics implementation.
179         Basic structure of the implementaion is simliar, thus, Threaded
180         Compositor reuses lots of classes from Coordinated Graphics. However,
181         instead of compositing on UI Process, Threaded Compositor performs
182         compositing on a dedicate thread of Web Process.
183
184         No new test, because it is in experimental stage.
185
186         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
187         (WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
188         Removed a assertion not to force its creation in the main thread. In
189         the Threaded Compositor, it can be created in the dedicated thread.
190
191         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp: Added.
192         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h: Added.
193         Implements a surface using ImageBuffer as a backend to use in the Web
194         Process.
195
196         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: Added.
197         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: Added.
198         Implements a compositor which runs on the created thread. It owns
199         SimpleViewportController and CoordinatedGraphicsScene to render scene on the
200         actual surface.
201
202         * Shared/CoordinatedGraphics/SimpleViewportController.cpp: Added.
203         * Shared/CoordinatedGraphics/SimpleViewportController.h: Added.
204         This class is responsible to handle scale factor and scrolling position
205         with a simplifed logic in the compositing thread.
206
207 2014-12-14  Andreas Kling  <akling@apple.com>
208
209         Replace PassRef with Ref/Ref&& across the board.
210         <https://webkit.org/b/139587>
211
212         Reviewed by Darin Adler.
213
214         * UIProcess/WebBackForwardList.h:
215         (WebKit::WebBackForwardList::create):
216         * UIProcess/WebBatteryManagerProxy.cpp:
217         (WebKit::WebBatteryManagerProxy::create):
218         * UIProcess/WebBatteryManagerProxy.h:
219         * UIProcess/WebPageGroup.cpp:
220         (WebKit::WebPageGroup::createNonNull):
221         * UIProcess/WebPageGroup.h:
222         * UIProcess/efl/BatteryProvider.cpp:
223         (BatteryProvider::create):
224         * UIProcess/efl/BatteryProvider.h:
225         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
226         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
227         (WebKit::WebEditorClient::shouldApplyStyle):
228         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
229         (WebKit::WebUserMediaClient::requestPermission):
230         * WebProcess/WebCoreSupport/WebUserMediaClient.h:
231         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
232         (WebKit::ViewUpdateDispatcher::create):
233         * WebProcess/WebPage/ViewUpdateDispatcher.h:
234
235 2014-12-12  Gavin Barraclough  <barraclough@apple.com>
236
237         Split WebPageProxy::m_preventProcessSuppression to track pref/visibility separately
238         https://bugs.webkit.org/show_bug.cgi?id=139600
239
240         Reviewed by Geoff Garen.
241
242         Previously WebPageProxy::m_preventProcessSuppression would be set if either the page was visible
243         or its suppression was disabled by the pref. Instead track these separately. This will make the
244         user observability state applicable on iOS, too.
245
246         Add a new counter to WebContext, and split the counting in WebPageProxy.
247         ::updateProccessSuppressionState continues to track the pref change (which matches its name),
248         tracking of user observability changes moved to updateActivityToken (which we should further
249         merge with; it already tracks observability to control process state for iOS).
250
251         * UIProcess/WebContext.cpp:
252         (WebKit::m_processSuppressionDisabledForPageCounter):
253             - added new RefCounter.
254         * UIProcess/WebContext.h:
255         (WebKit::WebContext::processSuppressionDisabledForPageCount):
256             - added new RefCounter.
257         * UIProcess/WebPageProxy.cpp:
258         (WebKit::WebPageProxy::reattachToWebProcess):
259             - no longer needs to call updateProccessSuppressionState (pref has not changed; handled by the call to updateActivityToken).
260         (WebKit::WebPageProxy::dispatchViewStateChange):
261             - no longer needs to call updateProccessSuppressionState (pref has not changed; handled by the call to updateActivityToken).
262         (WebKit::WebPageProxy::updateActivityToken):
263             - this now also updated the user observability counter.
264         (WebKit::WebPageProxy::updateProccessSuppressionState):
265             - now only tracks whether this is disabled via the preference.
266         (WebKit::WebPageProxy::resetStateAfterProcessExited):
267             - clear the user observability counter; thsi will be reset on reattach.
268         * UIProcess/WebPageProxy.h:
269             - added new RefCounter::Count.
270         * UIProcess/mac/WebContextMac.mm:
271         (WebKit::WebContext::processSuppressionEnabled):
272             - processSuppressionEnabled is disabled if *neither*:
273                 - there are user observable pages
274                 - disabled by pref for any page.
275
276 2014-12-12  Beth Dakin  <bdakin@apple.com>
277
278         Need a fake mouse move after hiding data detectors UI
279         https://bugs.webkit.org/show_bug.cgi?id=139608
280         -and corresponding-
281         rdar://problem/19221935
282
283         Reviewed by Tim Horton.
284
285         * WebProcess/WebPage/mac/WebPageMac.mm:
286         (WebKit::WebPage::dataDetectorsDidHideUI):
287
288 2014-12-12  Anders Carlsson  <andersca@apple.com>
289
290         Handle caches in WebsiteDataStore
291         https://bugs.webkit.org/show_bug.cgi?id=139607
292         <rdar://problem/19107614>
293
294         Reviewed by Sam Weinig.
295
296         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
297         (WebKit::computeNetworkProcessAccessType):
298
299 2014-12-12  Enrica Casucci  <enrica@apple.com>
300
301         [iOS] Predictions are not updated when using navigation buttons.
302         https://bugs.webkit.org/show_bug.cgi?id=139567
303         rdar://problem/19132585
304
305         Reviewed by Dan Bernstein.
306
307         When moving focus programmatically, we need to notify the keyboard so that it
308         can update the prediction bar.
309
310         * UIProcess/WebPageProxy.h:
311         * UIProcess/ios/WKContentViewInteraction.mm:
312         (-[WKFormInputSession setAccessoryViewCustomButtonTitle:]):
313         (-[WKContentView requiresAccessoryView]):
314         (-[WKContentView inputAssistantButtonItems]):
315         (-[WKContentView accessoryTab:]):
316         (-[WKContentView _startAssistingKeyboard]):
317         (-[WKContentView _stopAssistingNode]):
318         * UIProcess/ios/WebPageProxyIOS.mm:
319         (WebKit::WebPageProxy::focusNextAssistedNode):
320         * WebProcess/WebPage/WebPage.h:
321         * WebProcess/WebPage/WebPage.messages.in:
322         * WebProcess/WebPage/ios/WebPageIOS.mm:
323         (WebKit::WebPage::focusNextAssistedNode):
324
325 2014-12-12  Timothy Horton  <timothy_horton@apple.com>
326
327         TextIndicator (and other view-relative subwindows) is not dismissed on zoom gesture
328         https://bugs.webkit.org/show_bug.cgi?id=139580
329         <rdar://problem/19226350>
330
331         Reviewed by Anders Carlsson.
332
333         * UIProcess/PageClient.h:
334         * UIProcess/mac/PageClientImpl.h:
335         * UIProcess/mac/PageClientImpl.mm:
336         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
337         (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Deleted.
338         (WebKit::PageClientImpl::dismissActionMenuPopovers): Deleted.
339         Merge dismissDictionaryLookupPanel and dismissActionMenuPopovers into
340         _dismissContentRelativeChildWindows, which also dismisses TextIndicator and the
341         text correction panel. Dismissal of any child windows which are anchored to
342         the page content now bottlenecks through this function.
343
344         (WebKit::PageClientImpl::navigationGestureDidBegin):
345         Dismiss all anchored subwindows when starting a navigation gesture, not
346         just TextIndicator and action menu popovers.
347
348         * UIProcess/API/mac/WKView.mm:
349         (-[WKView scrollWheel:]):
350         No need to dismiss TextIndicator here; we've got this covered in the more-inclusive
351         WebPageProxy::pageDidScroll, and will now dismiss more things.
352
353         (-[WKView mouseDown:]):
354         Dismiss more things.
355
356         (-[WKView viewDidMoveToWindow]):
357         Dismiss more things.
358
359         (-[WKView _dismissContentRelativeChildWindows]):
360         The aforementioned combined dismissal function.
361
362         (-[WKView magnifyWithEvent:]):
363         (-[WKView smartMagnifyWithEvent:]):
364         (-[WKView setMagnification:centeredAtPoint:]):
365         (-[WKView setMagnification:]):
366         Any time the page magnification changes, dismiss all the things.
367
368         * UIProcess/API/mac/WKViewPrivate.h:
369         Expose _dismissContentRelativeChildWindows instead of _dismissActionMenuPopovers;
370         for all existing clients, it makes more sense to dismiss all view-relative subwindows
371         than just a subset of them.
372         
373         * UIProcess/WebPageProxy.cpp:
374         (WebKit::WebPageProxy::didCommitLoadForFrame):
375         (WebKit::WebPageProxy::pageDidScroll):
376         (WebKit::WebPageProxy::resetStateAfterProcessExited):
377         Make use of dismissAnchoredSubwindows.
378
379         * UIProcess/mac/WKActionMenuController.h:
380         * UIProcess/mac/WKActionMenuController.mm:
381         (-[WKActionMenuController prepareForMenu:withEvent:]):
382         Dismiss more things.
383
384         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
385         (-[WKActionMenuController dismissActionMenuPopovers]): Deleted.
386         dismissActionMenuPopovers is folded into WKView's _dismissContentRelativeChildWindows.
387
388         (-[WKActionMenuController _showTextIndicator]): Deleted.
389         (-[WKActionMenuController _hideTextIndicator]): Deleted.
390         Fold _showTextIndicator and _hideTextIndicator into their only callers.
391         _isShowingTextIndicator was never necessary, because it's OK to change
392         the current TextIndicator at any time, and a newer one is always more relevant.
393
394 2014-12-12  Gavin Barraclough  <barraclough@apple.com>
395
396         Keep single RefCounter to track whether any pages in a context are process suppressible
397         https://bugs.webkit.org/show_bug.cgi?id=139576
398
399         Reviewed by Sam Weinig.
400
401         Currently we keep separate counters in each process, and coallesce these in the
402         context. Instead we should have a counter in the WebContext.
403
404         Also, changed the name to better describe the state we're tracking, rather than
405         describing what it's currently used for. This counter will also be useful for
406         iOS, to better manage background state of the networking process.
407
408         * UIProcess/WebContext.cpp:
409         (WebKit::WebContext::WebContext):
410             - initialize m_userObservablePageCounter.
411         * UIProcess/WebContext.h:
412         (WebKit::WebContext::updateProcessSuppressionState):
413             - Added no-op implementation for non-cocoa platforms.
414         (WebKit::WebContext::userObservablePageCount):
415             - Count the number of user visible (audible / visible) pages in Context.
416         * UIProcess/WebPageProxy.cpp:
417         (WebKit::WebPageProxy::updateProccessSuppressionState):
418             - WebProcessProxy::processSuppressionCounter -> WebContext::userObservablePageCount
419         * UIProcess/WebProcessProxy.cpp:
420         (WebKit::WebProcessProxy::WebProcessProxy):
421         (WebKit::WebProcessProxy::didFinishLaunching):
422             - moved all processs supression state tracking to the WebContext.
423         * UIProcess/WebProcessProxy.h:
424         (WebKit::WebProcessProxy::processSuppressionCounter): Deleted.
425             - moved all processs supression state tracking to the WebContext.
426         * UIProcess/ios/WebProcessProxyIOS.mm:
427         (WebKit::WebProcessProxy::allPagesAreProcessSuppressible): Deleted.
428         (WebKit::WebProcessProxy::updateProcessSuppressionState): Deleted.
429             - moved all processs supression state tracking to the WebContext.
430         * UIProcess/mac/WebContextMac.mm:
431         (WebKit::WebContext::processSuppressionEnabled):
432             - no need to interate all processes; just have a single counter.
433         * UIProcess/mac/WebProcessProxyMac.mm:
434         (WebKit::WebProcessProxy::allPagesAreProcessSuppressible): Deleted.
435         (WebKit::WebProcessProxy::updateProcessSuppressionState): Deleted.
436             - moved all processs supression state tracking to the WebContext.
437
438 2014-12-12  Alexey Proskuryakov  <ap@apple.com>
439
440         Layout Test http/tests/loading/307-after-303-after-post.html is flaky
441         https://bugs.webkit.org/show_bug.cgi?id=73030
442
443         Reviewed by Anders Carlsson.
444
445         * UIProcess/WebContext.cpp:
446         (WebKit::WebContext::createNewWebProcess): Added a FIXME comment.
447         (WebKit::WebContext::setIconDatabasePath): Don't enable m_iconDatabase if the path
448         is empty, meaning that the database is disabled (which is not a great way to say
449         that, but WebKit2 icon database doesn't support enabling/disabling cleanly).
450         (WebKit::WebContext::iconDatabasePath): Keep it empty if it was empty.
451
452 2014-12-12  Mark Rowe  <mrowe@apple.com>
453
454         Fix the 32-bit build.
455
456         * UIProcess/API/mac/WKView.mm:
457         (-[WKView _setPreviewTitle:]):
458
459 2014-12-12  Timothy Horton  <timothy_horton@apple.com>
460
461         Fix the 32-bit build.
462
463         * UIProcess/mac/WKImmediateActionController.h:
464
465 2014-12-12  Rohit Kumar  <kumar.rohit@samsung.com>
466
467         Fix Build Warning in WebKit2/UIProcess module for GTK build and WebKit2/NetworkProcess module in GTK and EFL build
468         https://bugs.webkit.org/show_bug.cgi?id=139535
469
470         Reviewed by Martin Robinson.
471
472         * UIProcess/API/gtk/WebKitWebView.cpp: Use UNUSED_PARAM for conditional #if case
473         (webkitWebViewShowNotification):
474         (webkitWebViewCloseNotification):
475
476 2014-12-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
477
478         [EFL] Disable all EWK2Accessibility unit tests
479         https://bugs.webkit.org/show_bug.cgi?id=139577
480
481         Reviewed by Csaba Osztrogonác.
482
483         WebAccessibility functionality isn't supported by EFL WebKit2 though,
484         EWK2Accessibility unit tests have been tested. That's why those tests have been failed
485         so far.
486
487         * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp:
488         (TEST_F):
489
490 2014-12-12  Simon Fraser  <simon.fraser@apple.com>
491
492         Layer borders on contentsLayers don't correctly toggle with the rest of the borders
493         https://bugs.webkit.org/show_bug.cgi?id=139570
494         rdar://problem/18007746
495
496         Reviewed by Tim Horton.
497         
498         Return nil if the color is invalid, to remove the color from the layer's
499         border or background.
500
501         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
502         (WebKit::cgColorFromColor):
503
504 2014-12-11  Gavin Barraclough  <barraclough@apple.com>
505
506         Track pages preventing suppression in WebProcessProxy using RefCounter
507         https://bugs.webkit.org/show_bug.cgi?id=139108
508
509         Reviewed by Benjamin Poulain.
510
511         The networking process is allowed to app nap if all web pages are also currently in app nap.
512         In order to detect whether any page in any process currently requires the networking process
513         to be active we:
514          - maintain hash sets in every WebProcessProxy of pages that are okay with suppression.
515          - if anything changes, the WebContext iterates every WebProcessProxy to recompute state.
516
517         This is all crazy - all we actually need is a simple count of the number of pages that need
518         to prevent the networking process from entering app nap. This patch gets us half way there -
519         replace the HashSet with a RefCounter. Next step will be to hoist the RefCounters from the
520         process proxies up to the context to do away with the iteration.
521
522         * UIProcess/WebPageProxy.cpp:
523         (WebKit::WebPageProxy::WebPageProxy):
524         (WebKit::WebPageProxy::reattachToWebProcess):
525             - make sure we prevent process suppression, per current viewstate & preferences.
526         (WebKit::WebPageProxy::dispatchViewStateChange):
527             - make sure we prevent process suppression, per viewstate change.
528         (WebKit::WebPageProxy::updateProccessSuppressionState):
529             - recompute whether we need to prevent process suppression.
530         (WebKit::WebPageProxy::preferencesDidChange):
531             - when preferences change process supression may be disabled.
532         (WebKit::WebPageProxy::resetStateAfterProcessExited):
533             - we need to drop the old ref, to allow a new one to be taken when we reattach.
534         (WebKit::WebPageProxy::isProcessSuppressible): Deleted.
535             - moreged into updateProccessSuppressionState.
536         * UIProcess/WebPageProxy.h:
537             - added m_preventProcessSuppression.
538         * UIProcess/WebProcessProxy.cpp:
539         (WebKit::WebProcessProxy::WebProcessProxy):
540             - initialize m_pagesPreventingSuppression
541         (WebKit::WebProcessProxy::createWebPage):
542             - moved to WebPageProxy::WebPageProxy
543         (WebKit::WebProcessProxy::addExistingWebPage):
544             - moved to WebPageProxy::reattachToWebProcess
545         (WebKit::WebProcessProxy::removeWebPage):
546             - now implicit; when the page is destroyed the RefPtr will release.
547         (WebKit::WebProcessProxy::pageSuppressibilityChanged): Deleted.
548             - moved to WebPageProxy::dispatchViewStateChange.
549         (WebKit::WebProcessProxy::pagePreferencesChanged): Deleted.
550             - moved to WebPageProxy::preferencesDidChange.
551         * UIProcess/WebProcessProxy.h:
552         (WebKit::WebProcessProxy::preventProcessSuppressionForPage):
553             - reference count m_pagesPreventingSuppression
554         * UIProcess/mac/WebProcessProxyMac.mm:
555         (WebKit::WebProcessProxy::allPagesAreProcessSuppressible):
556             - converted to use m_pagesPreventingSuppression.
557             - removed guard that meant processes with no pages would keep the networking
558               process from entering app nap, which made no sense.
559
560 2014-12-11  Anders Carlsson  <andersca@apple.com>
561
562         Temporarily use WebCore session storage for transient local storage
563         https://bugs.webkit.org/show_bug.cgi?id=139574
564
565         Reviewed by Dan Bernstein.
566
567         * WebProcess/Storage/StorageNamespaceImpl.h:
568         Change the header guard so it won't conflict with StorageNamespaceImpl.h in WebCore.
569
570         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
571         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
572         Use the WebCore session storage for now, to avoid crashes.
573
574 2014-12-11  Commit Queue  <commit-queue@webkit.org>
575
576         Unreviewed, rolling out r177081.
577         https://bugs.webkit.org/show_bug.cgi?id=139569
578
579         broke iOS video playback (Requested by eric_carlson on
580         #webkit).
581
582         Reverted changeset:
583
584         "Fix iOS builders for 8.0"
585         https://bugs.webkit.org/show_bug.cgi?id=139495
586         http://trac.webkit.org/changeset/177081
587
588 2014-12-11  Beth Dakin  <bdakin@apple.com>
589
590         WK2: Need new SPI for Webkit clients to override default immediate action
591         https://bugs.webkit.org/show_bug.cgi?id=139564
592         -and corresponding-
593         rdar://problem/19225448
594
595         Reviewed by Tim Horton.
596
597         New SPI _immediateActionAnimationControllerForHitTestResult:withType:userData:
598         * UIProcess/API/Cocoa/WKViewPrivate.h:
599         * UIProcess/API/mac/WKView.mm:
600         (-[WKView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
601
602         Keep at ivar for the userData so that it can be passed to the new SPI.
603         * UIProcess/mac/WKImmediateActionController.h:
604         * UIProcess/mac/WKImmediateActionController.mm:
605         (-[WKImmediateActionController _clearImmediateActionState]):
606         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
607
608         Always give the SPI a chance to override the animationController.
609         (-[WKImmediateActionController _updateImmediateActionItem]):
610
611         Need to mark WKImmediateActionTypes.h as Private.
612         * WebKit2.xcodeproj/project.pbxproj:
613
614 2014-12-11  Timothy Horton  <timothy_horton@apple.com>
615
616         Move the preview popover to WebImmediateActionController
617         https://bugs.webkit.org/show_bug.cgi?id=139563
618         <rdar://problem/19208291>
619
620         Reviewed by Beth Dakin.
621
622         * UIProcess/mac/WKImmediateActionController.h:
623         Remove an unnecessary forward declaration.
624
625         * UIProcess/mac/WKImmediateActionController.mm:
626         (-[WKImmediateActionController willDestroyView:]):
627         Clear the immediate action recognizer when the view goes away.
628
629 2014-12-11  Timothy Horton  <timothy_horton@apple.com>
630
631         Fix the build.
632
633         * UIProcess/mac/WKImmediateActionController.h:
634         * UIProcess/mac/WKImmediateActionController.mm:
635
636 2014-12-11  Timothy Horton  <timothy_horton@apple.com>
637
638         Move the preview popover to WKImmediateActionController
639         https://bugs.webkit.org/show_bug.cgi?id=139560
640         <rdar://problem/19208291>
641
642         Reviewed by Beth Dakin.
643
644         * Shared/API/c/WKImmediateActionTypes.h:
645         Add a link preview type.
646
647         * UIProcess/API/mac/WKView.mm:
648         (-[WKView initWithFrame:context:configuration:webView:]):
649         Pass the gesture recognizer to the WKImmediateActionController.
650
651         (-[WKView _setPreviewTitle:]):
652         Forward preview title changes to the WKImmediateActionController,
653         because that's where the preview popover lives now.
654
655         * UIProcess/mac/WKActionMenuController.h:
656         * UIProcess/mac/WKActionMenuController.mm:
657         Move WKPagePreviewViewController into its own file.
658         Move page preview popover related code to WKImmediateActionController.
659
660         * UIProcess/mac/WKImmediateActionController.h:
661         * UIProcess/mac/WKImmediateActionController.mm:
662         Compare the gesture recognizers directly instead of their views, for accuracy.
663         Move page preview popover related code in from WKActionMenuController.
664         Some of this should eventually move to WKPagePreviewViewController, but
665         for now for ease of transition we will move it here.
666
667         * UIProcess/mac/WKPagePreviewViewController.h: Added.
668         * UIProcess/mac/WKPagePreviewViewController.mm: Added.
669         * WebKit2.xcodeproj/project.pbxproj:
670         Move WKPagePreviewViewController into its own file.
671
672 2014-12-11  Tomas Popela  <tpopela@redhat.com>
673
674         [GTK] Minor fixes for documentation and translations
675         https://bugs.webkit.org/show_bug.cgi?id=139450
676
677         Reviewed by Sergio Villar Senin.
678
679         * UIProcess/API/gtk/WebKitNavigationAction.cpp:
680         Fix typo in documentation.
681         * UIProcess/API/gtk/WebKitWebView.cpp:
682         (webkit_web_view_class_init):
683         Mark zoom-level and is-loading properties names for translation and
684         when touching them also fix the indentation style.
685
686 2014-12-11  Joseph Pecoraro  <pecoraro@apple.com>
687
688         Web Inspector: Inspector Process crash when navigating to non-inspectable page
689         https://bugs.webkit.org/show_bug.cgi?id=139508
690
691         Reviewed by Zalan Bujtas.
692
693         The Inspector Process can still receive InspectorFrontendHost messages
694         even though the backend connection has been invalidated and cleared.
695         Only send messages if the connection exists.
696
697         * WebProcess/WebPage/WebInspectorUI.cpp:
698         (WebKit::WebInspectorUI::openInNewTab):
699         (WebKit::WebInspectorUI::sendMessageToBackend):
700
701 2014-12-11  Yongjun Zhang  <yongjun_zhang@apple.com>
702
703         WebKit2 should expose FirstVisuallyNonEmptyLayout rendering milestone.
704         https://bugs.webkit.org/show_bug.cgi?id=139514
705
706         Expose DidFirstVisuallyNonEmptyLayout so that WebKit2 client can listen to visually non-empty layout rendering event.
707
708         Reviewed by Dan Bernstein.
709
710         * Shared/API/Cocoa/WKRenderingProgressEvents.h: Add WKRenderingProgressEventFirstVisuallyNonEmptyLayout to WKRenderingProgressEvents.
711         * Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Also map kWKDidFirstVisuallyNonEmptyLayout to WKRenderingProgressEventFirstVisuallyNonEmptyLayout.
712         (renderingProgressEvents):
713         * UIProcess/API/Cocoa/WKWebView.mm:
714         (layoutMilestones): Map _WKRenderingProgressEventFirstVisuallyNonEmptyLayout to WebCore::DidFirstVisuallyNonEmptyLayout.
715         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
716         * UIProcess/Cocoa/NavigationState.mm: Add _WKRenderingProgressEventFirstVisuallyNonEmptyLayout to _WKRenderingProgressEventFirstLayout.
717         (WebKit::renderingProgressEvents): Map WebCore::DidFirstVisuallyNonEmptyLayout to _WKRenderingProgressEventFirstVisuallyNonEmptyLayout.
718
719 2014-12-11  Michael Catanzaro  <mcatanzaro@igalia.com>
720
721         [GTK] Disable backspace key navigation
722         https://bugs.webkit.org/show_bug.cgi?id=136231
723
724         Reviewed by Carlos Garcia Campos.
725
726         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
727         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): remove handling
728         for backspace and <shift>backspace key combinations.
729
730 2014-12-11  Michael Catanzaro  <mcatanzaro@igalia.com>
731
732         [GTK] String changes for the HTTP authentication dialog
733         https://bugs.webkit.org/show_bug.cgi?id=136782
734
735         Reviewed by Carlos Garcia Campos.
736
737         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
738         (webkitAuthenticationDialogInitialize): Add a title to the dialog, add
739         some missing mnemonics, and tweak a few strings.
740
741 2014-12-09  Jeremy Jones  <jeremyj@apple.com>
742
743         Restore interface state when stopping optimized fullscreen.
744         https://bugs.webkit.org/show_bug.cgi?id=139465
745
746         Reviewed by Simon Fraser.
747
748         Implement fullscreenMayReturnToInline() to request the client application show the corresponding tab.
749
750         * UIProcess/API/APIUIClient.h:
751         (API::UIClient::fullscreenMayReturnToInline): added
752         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: add declaration
753         * UIProcess/Cocoa/UIDelegate.h: add declaration
754         * UIProcess/Cocoa/UIDelegate.mm:
755         (WebKit::UIDelegate::setDelegate): check for responds to selector
756         (WebKit::UIDelegate::UIClient::fullscreenMayReturnToInline): added
757         * UIProcess/WebPageProxy.cpp:
758         (WebKit::WebPageProxy::fullscreenMayReturnToInline): added.
759         * UIProcess/WebPageProxy.h: add declaration
760         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: add declaration
761         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
762         (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline): show the tab.
763
764 2014-12-11  Alexey Proskuryakov  <ap@apple.com>
765
766         REGRESSION (Async Text Input): Text input method state is not reset when reloading a page
767         https://bugs.webkit.org/show_bug.cgi?id=139504
768         rdar://problem/19034674
769
770         Reviewed by Enrica Casucci.
771
772         WebKit2 used to look at EditorState changes and guess when to cancel a composition.
773         This was quite unreliable, and needlessly complicated - WebCore knows when it decides
774         to destroy a composition, so it now explicitly notifies the clients.
775
776         * UIProcess/API/mac/WKView.mm: (-[WKView _processDidExit]): Address crashing case too.
777         * UIProcess/WebPageProxy.cpp:
778         (WebKit::WebPageProxy::resetStateAfterProcessExited):
779         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
780         (WebKit::WebEditorClient::discardedComposition):
781         * WebProcess/WebCoreSupport/WebEditorClient.h:
782         * WebProcess/WebPage/WebPage.cpp:
783         (WebKit::WebPage::didChangeSelection):
784         (WebKit::WebPage::discardedComposition):
785         * WebProcess/WebPage/WebPage.h:
786
787 2014-12-10  Anders Carlsson  <andersca@apple.com>
788
789         Get rid of the storage strategy
790         https://bugs.webkit.org/show_bug.cgi?id=139519
791
792         Reviewed by Antti Koivisto.
793
794         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
795         (WebKit::NetworkProcessPlatformStrategies::createStorageStrategy): Deleted.
796         * NetworkProcess/NetworkProcessPlatformStrategies.h:
797         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
798         (WebKit::WebPlatformStrategies::createStorageStrategy): Deleted.
799         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
800
801 2014-12-11  Carlos Garcia Campos  <cgarcia@igalia.com>
802
803         [GTK] WebKitNotification is defined twice
804         https://bugs.webkit.org/show_bug.cgi?id=139538
805
806         Reviewed by Martin Robinson.
807
808         Remove the typedef from WebKitForwardDeclarations.h since it's
809         already in WebKitNotification.h and include WebKitNotification.h
810         in WebKitWebView.h.
811
812         * UIProcess/API/gtk/WebKitForwardDeclarations.h:
813         * UIProcess/API/gtk/WebKitWebView.h:
814
815 2014-12-11  Carlos Garcia Campos  <cgarcia@igalia.com>
816
817         [GTK] Move click counter logic back to WebKitWebViewBase
818         https://bugs.webkit.org/show_bug.cgi?id=137685
819
820         Reviewed by Martin Robinson.
821
822         It was moved to a shared class in platform to be used by both
823         WebKit1 and WebKit2, but it's currently only used by WebKitWebViewBase.
824
825         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
826         (ClickCounter::reset):
827         (ClickCounter::currentClickCountForGdkButtonEvent):
828         (webkitWebViewBaseButtonPressEvent):
829
830 2014-12-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
831
832         [SOUP] [GTK] warning: unused parameter at NetworkProcessSoup.cpp after r177056.
833         https://bugs.webkit.org/show_bug.cgi?id=139534
834
835         Reviewed by Martin Robinson.
836
837         * NetworkProcess/soup/NetworkProcessSoup.cpp:
838         (WebKit::NetworkProcess::clearDiskCache): Comment the parameter names.
839
840 2014-12-11  Carlos Garcia Campos  <cgarcia@igalia.com>
841
842         [GTK] Timers might never be fired during animations
843         https://bugs.webkit.org/show_bug.cgi?id=139062
844
845         Reviewed by Martin Robinson.
846
847         This can happen in old/slow machines where the time to render
848         layers might take more than 0.016. Since the layer flush timer is
849         using a higher priority than WebCore timers, when scheduling all
850         (or several) layer flushes immediately, no other sources with
851         lower priority are dispatched in the main loop. We could detect if
852         we are scheduling layer flushes immediately for too long (100ms)
853         and schedule the next flush after a delay to ensure other sources
854         with lower priority have a chance to be dispatched. Also use a
855         lower priority, GDK_PRIORITY_EVENTS is too high, so we use
856         GDK_PRIORITY_REDRAW - 1 to ensure it's higher than WebCore timers.
857
858         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
859         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Rename
860         m_lastFlushTime as m_lastImmediateFlushTime.
861         (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Save the
862         fireTime before calling flushAndRenderLayers() and compute the
863         next flush delay based on the elapsed time using monotonically
864         increasing time instead of current time. Use the target delay
865         as next flush delay if we have scheduled flushes immediately for
866         more than 100ms.
867         (WebKit::LayerTreeHostGtk::flushAndRenderLayers): Do not save the
868         layer flush time here, it's done in layerFlushTimerFired() so that
869         we don't need to keep it as a member.
870         (WebKit::LayerTreeHostGtk::scheduleLayerFlush): Use global
871         layerFlushTimerPriority.
872         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
873
874 2014-12-10  Jaehun Lim  <ljaehun.lim@samsung.com>
875
876         [CMake] Fix build after WebStorageNamespaceProvider
877
878         Unreviewed, fix build.
879
880         * CMakeLists.txt: Add WebStorageNamespaceProvider.cpp to the source list.
881
882 2014-12-10  Sanghyup Lee  <sh53.lee@samsung.com>
883
884         Build fix for EFL and GTK ports since r177104
885         https://bugs.webkit.org/show_bug.cgi?id=139513
886
887         Reviewed by Tim Horton.
888
889         Moved WebPageProxy::installViewStateChangeCompletionHandler in PLATFORM(MAC) macro.
890
891         * UIProcess/WebPageProxy.cpp:
892         * UIProcess/WebPageProxy.h:
893
894 2014-12-10  Anders Carlsson  <andersca@apple.com>
895
896         Switch WebKit2 over to using the storage namespace provider
897         https://bugs.webkit.org/show_bug.cgi?id=139509
898
899         Reviewed by Tim Horton.
900
901         * WebProcess/Storage/StorageNamespaceImpl.cpp:
902         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
903         (WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
904         (WebKit::localStorageNamespaceMap): Deleted.
905         Get rid of the storage namespace map - we have a map inside WebStorageNamespaceProvider now.
906
907         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
908         (WebKit::WebPlatformStrategies::createStorageStrategy):
909         (WebKit::WebPlatformStrategies::populatePluginCache): Deleted.
910         (WebKit::WebPlatformStrategies::localStorageNamespace): Deleted.
911         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace): Deleted.
912         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
913         Get rid of the storage strategy.
914
915         * WebProcess/WebPage/WebPage.cpp:
916         (WebKit::WebPage::WebPage):
917         Set a storage namespace provider.
918
919 2014-12-10  Beth Dakin  <bdakin@apple.com>
920
921          Follow-up build fix.
922
923         * UIProcess/API/mac/WKView.mm:
924         (-[WKView initWithFrame:context:configuration:webView:]):
925
926 2014-12-09  Jon Honeycutt  <jhoneycutt@apple.com>
927
928         Null dereference performing a "TapAndAHalf" gesture in Google search field
929
930         <https://bugs.webkit.org/show_bug.cgi?id=139506>
931         <rdar://problem/19028828>
932
933         Reviewed by Darin Adler.
934
935         * WebProcess/WebPage/ios/WebPageIOS.mm:
936         (WebKit::WebPage::selectWithGesture):
937         Add a null check in the case that there is no word range for the
938         current position.
939
940 2014-12-10  Beth Dakin  <bdakin@apple.com>
941
942         Speculative build fix.
943
944         * UIProcess/API/mac/WKView.mm:
945         (-[WKView initWithFrame:context:configuration:webView:]):
946
947 2014-12-10  Beth Dakin  <bdakin@apple.com>
948
949         WK2: Add initial support for immediate actions
950         https://bugs.webkit.org/show_bug.cgi?id=139511
951
952         Reviewed by Tim Horton.
953
954         New enum to track immediate action types as we add them.
955         * Shared/API/c/WKImmediateActionTypes.h: Added.
956
957         Create an NSImmediateActionGestureRecognizer if possible and a controller.
958         * UIProcess/API/mac/WKView.mm:
959         (-[WKView dealloc]):
960         (-[WKView initWithFrame:context:configuration:webView:]):
961         (-[WKView _didPerformActionMenuHitTest:userData:]):
962
963         This basic implementation of the controller will use the delegate methods to 
964         perform an ActionMenuHitTest when relevant. Future patches will patch 
965         _updateImmediateActionItem to use the hit test result to determine if there is any 
966         immediate action that should be taken.
967         * UIProcess/mac/WKImmediateActionController.h: Added.
968         * UIProcess/mac/WKImmediateActionController.mm: Added.
969         (-[WKImmediateActionController willDestroyView:]):
970         (-[WKImmediateActionController _clearImmediateActionState]):
971         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
972
973         Does much of the work done in Action Menu’s prepareForMenu.
974         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
975
976         Does much of the work done in Action Menu’s menuNeedsUpdate.
977         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
978
979         Does much of the work done in Action Menu’s didCloseMenu.
980         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
981
982         Does much of the work done in Action Menu’s willOpenMenu.
983         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
984
985         To be filled in.
986         (-[WKImmediateActionController _updateImmediateActionItem]):
987         * WebKit2.xcodeproj/project.pbxproj:
988
989 2014-12-10  Timothy Horton  <timothy_horton@apple.com>
990
991         Should have copy and paste items in all text menus
992         https://bugs.webkit.org/show_bug.cgi?id=139510
993         <rdar://problem/19198388>
994
995         Reviewed by Beth Dakin.
996
997         * UIProcess/mac/WKActionMenuController.mm:
998         (-[WKActionMenuController _defaultMenuItemsForText]):
999         Add a disabled paste menu item into the read-only text menu.
1000
1001         (-[WKActionMenuController _defaultMenuItemsForWhitespaceInEditableArea]):
1002         Add a disabled copy menu item into the editable whitespace text menu.
1003
1004 2014-12-10  Martin Hock  <mhock@apple.com>
1005
1006         [iOS] Add setting to ignore viewport scaling constraints
1007         https://bugs.webkit.org/show_bug.cgi?id=139466
1008         <rdar://problem/19200328>
1009
1010         Reviewed by Benjamin Poulain.
1011
1012         * Shared/WebPreferencesDefinitions.h: Add ignoreViewportScalingConstraints preference.
1013         * UIProcess/API/C/WKPreferences.cpp:
1014         (WKPreferencesSetIgnoreViewportScalingConstraints):
1015         (WKPreferencesGetIgnoreViewportScalingConstraints):
1016         * UIProcess/API/C/WKPreferencesRef.h:
1017         * WebProcess/WebPage/WebPage.cpp:
1018         (WebKit::WebPage::updatePreferences):
1019
1020 2014-12-10  Timothy Horton  <timothy_horton@apple.com>
1021
1022         Fix the build.
1023
1024         * UIProcess/API/mac/WKView.mm:
1025         (-[WKView _targetWindowForMovePreparation]):
1026
1027 2014-12-10  Timothy Horton  <timothy_horton@apple.com>
1028
1029         Provide SPI to asynchronously move a WKView into a window and know when it has painted
1030         https://bugs.webkit.org/show_bug.cgi?id=139460
1031         <rdar://problem/19135389>
1032
1033         Reviewed by Anders Carlsson.
1034
1035         * UIProcess/API/Cocoa/WKViewPrivate.h:
1036         Add _prepareForMoveToWindow:withCompletionHandler:, which internally
1037         goes through the motions of being parented in that window and calls
1038         the completion handler once painting is done and the view is ready
1039         to be displayed (upon which we expect the view to actually move into the window).
1040
1041         * UIProcess/API/mac/WKView.mm:
1042         (-[WKView viewWillMoveToWindow:]):
1043         If we currently have a _targetWindowForMovePreparation (and are
1044         pretending to be in that window), avoid performing viewWillMoveToWindow:
1045         for a different window.
1046
1047         (-[WKView viewDidMoveToWindow]):
1048         (-[WKView doWindowDidChangeScreen]):
1049         (-[WKView _intrinsicDeviceScaleFactor]):
1050         (-[WKView _colorSpace]):
1051         (-[WKView _targetWindowForMovePreparation]):
1052         If we have a _targetWindowForMovePreparation, use its properties instead
1053         of self.window's.
1054
1055         (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
1056         Simulate a move into the target window, but defer sending the view state update.
1057         Then, send the view state update after registering the completion handler.
1058
1059         * UIProcess/API/mac/WKViewInternal.h:
1060         * UIProcess/WebPageProxy.cpp:
1061         (WebKit::WebPageProxy::WebPageProxy):
1062         Rename m_viewStateChangeWantsReply to m_viewStateChangeWantsSynchronousReply.
1063
1064         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
1065         Added. Allow installing a block that will be called the next time
1066         we get a didUpdateViewState back from the WebProcess after pushing the
1067         current view state changes.
1068
1069         (WebKit::WebPageProxy::viewStateDidChange):
1070         Adapt to the aforementioned rename.
1071
1072         (WebKit::WebPageProxy::dispatchViewStateChange):
1073         Adapt to the aforementioned rename.
1074         Send the view state change callback IDs along with SetViewState.
1075
1076         (WebKit::WebPageProxy::updateViewState):
1077         Adapt to the aforementioned rename.
1078
1079         * UIProcess/WebPageProxy.h:
1080         * UIProcess/mac/PageClientImpl.h:
1081         * UIProcess/mac/PageClientImpl.mm:
1082         (WebKit::PageClientImpl::activeWindow):
1083         (WebKit::PageClientImpl::isViewWindowActive):
1084         (WebKit::PageClientImpl::isViewVisible):
1085         (WebKit::PageClientImpl::isViewVisibleOrOccluded):
1086         (WebKit::PageClientImpl::isViewInWindow):
1087         (WebKit::PageClientImpl::viewLayerHostingMode):
1088         If we have a _targetWindowForMovePreparation, use its properties instead
1089         of the WKView's window's.
1090
1091         * WebProcess/WebPage/DrawingArea.h:
1092         (WebKit::DrawingArea::viewStateDidChange):
1093         * WebProcess/WebPage/WebPage.cpp:
1094         (WebKit::WebPage::reinitializeWebPage):
1095         (WebKit::WebPage::setViewState):
1096         * WebProcess/WebPage/WebPage.h:
1097         * WebProcess/WebPage/WebPage.messages.in:
1098         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1099         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1100         (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
1101         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1102         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1103         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
1104         Push the callback IDs to the WebProcess, and accumulate them in TiledCoreAnimationDrawingArea.
1105
1106         (WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired):
1107         Call all of the callbacks after one runloop cycle, just like DidUpdateViewState.
1108
1109 2014-12-10  Anders Carlsson  <andersca@apple.com>
1110
1111         Add session storage handling to StorageNamespaceProvider
1112         https://bugs.webkit.org/show_bug.cgi?id=139507
1113
1114         Reviewed by Tim Horton.
1115
1116         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1117         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
1118         * WebProcess/Storage/StorageNamespaceImpl.h:
1119         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
1120         (WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
1121         * WebProcess/Storage/WebStorageNamespaceProvider.h:
1122
1123 2014-12-10  Anders Carlsson  <andersca@apple.com>
1124
1125         Implement the rest of the transient local storage namespace code
1126         https://bugs.webkit.org/show_bug.cgi?id=139505
1127
1128         Reviewed by Tim Horton.
1129
1130         * UIProcess/Storage/StorageManager.cpp:
1131         (WebKit::StorageManager::TransientLocalStorageNamespace::create):
1132         (WebKit::StorageManager::TransientLocalStorageNamespace::~TransientLocalStorageNamespace):
1133         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
1134         (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
1135         (WebKit::StorageManager::TransientLocalStorageNamespace::clearAllStorageAreas):
1136         (WebKit::StorageManager::TransientLocalStorageNamespace::TransientLocalStorageNamespace):
1137         Introduce a new TransientLocalStorageNamespace that's just a glorified SecurityOrigin -> StorageArea HashMap.
1138
1139         (WebKit::StorageManager::StorageArea::create):
1140         Change the return type to RefPtr.
1141
1142         (WebKit::StorageManager::deleteEntriesForOrigin):
1143         (WebKit::StorageManager::deleteAllEntries):
1144         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
1145         Use lambdas instead of bind. Delete the transient local storage as well.
1146
1147         (WebKit::StorageManager::createTransientLocalStorageMap):
1148         Get a transient local storage namespace and ask it for a storage area.
1149
1150         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
1151         Look up the namespace from the map and create one if it doesn't exist.
1152
1153         (WebKit::StorageManager::deleteEntriesForOriginInternal): Deleted.
1154         (WebKit::StorageManager::deleteAllEntriesInternal): Deleted.
1155
1156         * UIProcess/Storage/StorageManager.h:
1157
1158 2014-12-10  Anders Carlsson  <andersca@apple.com>
1159
1160         Begin fixing transient local storage handling
1161         https://bugs.webkit.org/show_bug.cgi?id=139503
1162
1163         Reviewed by Sam Weinig.
1164
1165         * UIProcess/Storage/StorageManager.cpp:
1166         (WebKit::StorageManager::createTransientLocalStorageMap):
1167         * UIProcess/Storage/StorageManager.h:
1168         Add empty stub implementation of createTransientLocalStorageMap.
1169
1170         * UIProcess/Storage/StorageManager.messages.in:
1171         Add CreateTransientLocalStorageMap message.
1172
1173         * WebProcess/Storage/StorageAreaMap.cpp:
1174         (WebKit::StorageAreaMap::StorageAreaMap):
1175         If we have a local storage namespace with a non-null top-level origin, create a 
1176         transient local storage map.
1177
1178         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1179         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1180         Pass a null top-level origin to the StorageNamespaceImpl constructor.
1181
1182         (WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
1183         Create a new StorageNamespaceImpl, passing the top-level origin to the constructor.
1184
1185         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
1186         Pass a null top-level origin to the StorageNamespaceImpl constructor.
1187
1188         (WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
1189         Add a top-level origin parameter.
1190
1191         * WebProcess/Storage/StorageNamespaceImpl.h:
1192         (WebKit::StorageNamespaceImpl::topLevelOrigin):
1193         Add top-level origin member and getter.
1194
1195         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
1196         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
1197         Call StorageNamespaceImpl::createTransientLocalStorageNamespace.
1198
1199 2014-12-10  Anders Carlsson  <andersca@apple.com>
1200
1201         Implement WebStorageNamespaceProvider::createLocalStorageNamespace
1202         https://bugs.webkit.org/show_bug.cgi?id=139498
1203
1204         Reviewed by Beth Dakin.
1205
1206         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1207         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1208         Add a new overload that takes an identifier + quota. Have the old overload call the new one.
1209
1210         * WebProcess/Storage/StorageNamespaceImpl.h:
1211         Add new member.
1212
1213         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
1214         (WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
1215         Call StorageNamespaceImpl::createLocalStorageNamespace.
1216
1217 2014-12-10  Anders Carlsson  <andersca@apple.com>
1218
1219         Add a stubbed out WebStorageNamespaceProvider class to WebKit2
1220         https://bugs.webkit.org/show_bug.cgi?id=139497
1221
1222         Reviewed by Beth Dakin.
1223
1224         * WebKit2.xcodeproj/project.pbxproj:
1225         * WebProcess/Storage/WebStorageNamespaceProvider.cpp: Added.
1226         (WebKit::storageNamespaceProviders):
1227         (WebKit::WebStorageNamespaceProvider::getOrCreate):
1228         (WebKit::WebStorageNamespaceProvider::WebStorageNamespaceProvider):
1229         (WebKit::WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
1230         (WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
1231         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
1232         * WebProcess/Storage/WebStorageNamespaceProvider.h: Added.
1233
1234 2014-12-10  Enrica Casucci  <enrica@apple.com>
1235
1236         Fix iOS builders for 8.0
1237         https://bugs.webkit.org/show_bug.cgi?id=139495
1238
1239         Reviewed by Eric Carlson.
1240
1241         * UIProcess/API/Cocoa/WKWebView.mm:
1242         (-[WKWebView _mayAutomaticallyShowVideoOptimized]):
1243         * UIProcess/WebPageProxy.cpp:
1244         (WebKit::WebPageProxy::WebPageProxy):
1245         (WebKit::WebPageProxy::reattachToWebProcess):
1246         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1247
1248 2014-12-10  Julien Isorce  <j.isorce@samsung.com>
1249
1250         [GTK] Enable depth 32 for the RedirectedXCompositeWindow
1251         https://bugs.webkit.org/show_bug.cgi?id=139028
1252
1253         On gtk/X11, the layout compositing is done in the web process.
1254         If one needs to handle alpha with the rest of the application
1255         then it is not enough to make to browser's window as RGBA.
1256         The shared redirected window needs to be RGBA as well.
1257         (The shared X composite window between UIProcess and WebProcess).
1258
1259         This allows an end-to-end RGBA solution when the application
1260         wants to interact with the alpha channel at compositing time.
1261         For example for transparent Web UI.
1262
1263         Reviewed by Martin Robinson.
1264
1265         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1266         (webkitWebViewBaseRealize):
1267         (webkitWebViewBaseConstructed):
1268         (webkitWebViewRenderAcceleratedCompositingResults):
1269         (webkitWebViewBaseUpdatePreferences):
1270         (webkitWebViewBaseCreateWebPage):
1271         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
1272         (WebKit::RedirectedXCompositeWindow::create):
1273         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
1274         * UIProcess/gtk/RedirectedXCompositeWindow.h:
1275
1276 2014-12-09  Claudio Saavedra  <csaavedra@igalia.com> and Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1277
1278         [GTK][WK2] Add HTML5 Notifications support
1279         https://bugs.webkit.org/show_bug.cgi?id=61140
1280
1281         Reviewed by Carlos Garcia Campos.
1282
1283         * PlatformGTK.cmake: add new files to the build.
1284         * UIProcess/API/gtk/WebKitForwardDeclarations.h:
1285         * UIProcess/API/gtk/WebKitNotification.cpp: Added. New GObject used to expose information about
1286         the notification to the API.
1287         (webkitNotificationGetProperty):
1288         (webkit_notification_class_init):
1289         (webkitNotificationCreate):
1290         (webkit_notification_get_id):
1291         (webkit_notification_get_title):
1292         (webkit_notification_get_body):
1293         * UIProcess/API/gtk/WebKitNotification.h: Added.
1294         * UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp: Added. Permission request object
1295         for notifications.
1296         (webkitNotificationPermissionRequestAllow):
1297         (webkitNotificationPermissionRequestDeny):
1298         (webkit_permission_request_interface_init):
1299         (webkitNotificationPermissionRequestDispose):
1300         (webkit_notification_permission_request_class_init):
1301         (webkitNotificationPermissionRequestCreate):
1302         * UIProcess/API/gtk/WebKitNotificationPermissionRequest.h: Added.
1303         * UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h: Added.
1304         * UIProcess/API/gtk/WebKitNotificationPrivate.h: Added.
1305         * UIProcess/API/gtk/WebKitNotificationProvider.cpp: Added. Notification provider that emits signals.
1306         The C API allows overriding the notification providers and managers for customizing the handling of
1307         notifications. We decided to go for a single manager and a single provider which provide more idiomatic
1308         GObject API - signals.
1309         (toNotificationProvider):
1310         (showCallback):
1311         (cancelCallback):
1312         (WebKitNotificationProvider::~WebKitNotificationProvider):
1313         (WebKitNotificationProvider::create):
1314         (WebKitNotificationProvider::WebKitNotificationProvider):
1315         (WebKitNotificationProvider::show):
1316         (WebKitNotificationProvider::cancel):
1317         * UIProcess/API/gtk/WebKitNotificationProvider.h: Added.
1318         * UIProcess/API/gtk/WebKitUIClient.cpp: implemented decidePolicyForNotificationPermissionRequest.
1319         * UIProcess/API/gtk/WebKitWebContext.cpp:
1320         (webkitWebContextConstructed): initialize the notification provider.
1321         * UIProcess/API/gtk/WebKitWebView.cpp:
1322         (webkitWebViewShowNotification): default implementation for showing the notification, currently
1323         using GNotification, about to be ported to libnotify.
1324         (webkit_web_view_class_init): set the default implementation for the show-notification signal.
1325         (webkitWebViewEmitCloseNotification): emit the close-notification signal.
1326         (webkitWebViewEmitShowNotification): emit the show-notification signal.
1327         * UIProcess/API/gtk/WebKitWebView.h:
1328         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1329         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: list new objects and methods.
1330         * UIProcess/API/gtk/webkit2.h: include new headers.
1331
1332 2014-12-10  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1333
1334         [EFL][[WK2] test_ewk2_text_checker is failed
1335         https://bugs.webkit.org/show_bug.cgi?id=132982
1336
1337         Reviewed by Gyuyoung Kim.
1338
1339         Insert misspelled word to the input field using execCommand instead of
1340         input.value attribute change which stops spell check, tracked by
1341         https://bugs.webkit.org/show_bug.cgi?id=139473.
1342
1343         Since text checker API tests do not verify spellchecker itself (it's being
1344         tested by LayoutTests/editing/spelling) but rather opportunity for overriding
1345         its functionality this patch unskips those tests in order to API coverage.
1346
1347         * PlatformEfl.cmake:
1348         Unskip test_ewk2_text_checker
1349
1350         * UIProcess/API/efl/tests/resources/spelling_test.html:
1351         Use document.execCommand("InsertText", false, "aa ") instead of
1352         input.value = "aa " to trigger spellchecker.
1353
1354 2014-12-10  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1355
1356         REGRESSION(r177038): [SOUP] [GTK] Debug build broken
1357         https://bugs.webkit.org/show_bug.cgi?id=139475
1358
1359         Reviewed by Martin Robinson.
1360
1361         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1362         (WebKit::NetworkProcess::clearCacheForAllOrigins): Call clearDiskCache().
1363         (WebKit::NetworkProcess::clearDiskCache): Implement this for SOUP.
1364         SoupCache don't seems to have API for clearing a part of the cache,
1365         so add a FIXME note regarding that.
1366
1367 2014-12-09  Csaba Osztrogonác  <ossy@webkit.org>
1368
1369         URTBF after r177032.
1370
1371         * CMakeLists.txt:
1372
1373 2014-12-09  Alexey Proskuryakov  <ap@apple.com>
1374
1375         Kotoeri sometimes doesn't correctly process the first chanaracter in a text field in Safari 7.1 or 6.2
1376         https://bugs.webkit.org/show_bug.cgi?id=139459
1377         rdar://problem/19017432
1378         rdar://problem/19036869
1379
1380         Reviewed by Enrica Casucci.
1381
1382         When inputContext changes, notify the application. We already did this when the context
1383         changed due to plug-ins, and this used to sort of make it work on on yahoo.co.jp,
1384         which has plug-ins. But that was quite unreliable, as evidenced by the reproducible
1385         cases where we didn't use an input method for the first keypress.
1386
1387         * UIProcess/PageClient.h:
1388         * UIProcess/WebPageProxy.cpp:
1389         (WebKit::WebPageProxy::editorStateChanged):
1390         * UIProcess/mac/PageClientImpl.h:
1391         * UIProcess/mac/PageClientImpl.mm:
1392         (WebKit::PageClientImpl::notifyApplicationAboutInputContextChange):
1393
1394 2014-12-09  Jeremy Jones  <jeremyj@apple.com>
1395
1396         Enable automatic optimized fullscreen mode.
1397         https://bugs.webkit.org/show_bug.cgi?id=139437
1398
1399         Reviewed by Simon Fraser.
1400
1401         Anticipate the automatic transition to optimized video fullscreen mode when deciding if the page is visible.
1402
1403         * UIProcess/API/Cocoa/WKWebView.mm:
1404         (-[WKWebView _isShowingVideoOptimized]): Renamed. Test precondition.
1405         (-[WKWebView _mayAutomaticallyShowVideoOptimized]): Added.
1406         (-[WKWebView _isPlayingFullscreenOptimizedVideo]): Deleted.
1407         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1408         * UIProcess/ios/PageClientImplIOS.mm:
1409         (WebKit::PageClientImpl::isViewVisible): Test for optimized modes even when not in a window.
1410
1411 2014-12-09  Anders Carlsson  <andersca@apple.com>
1412
1413         Add support for clearing the disk cache
1414         https://bugs.webkit.org/show_bug.cgi?id=139458
1415
1416         Reviewed by Antti Koivisto.
1417
1418         * NetworkProcess/NetworkProcess.cpp:
1419         (WebKit::NetworkProcess::deleteWebsiteData):
1420         If we're asked to clear the disk cache, do so. Clearing the cache is asynchronous,
1421         so we make sure not to call the completion handler right away in that case.
1422
1423         * NetworkProcess/NetworkProcess.h:
1424         Add clearDiskCache member function.
1425
1426         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1427         (WebKit::NetworkProcess::clearDiskCache):
1428         Clear the disk cache, then call the completion handler.
1429
1430         * NetworkProcess/mac/NetworkProcessMac.mm:
1431         (WebKit::NetworkProcess::clearCacheForAllOrigins):
1432         Call the new clearDiskCache function.
1433
1434         * Shared/WebsiteData/WebsiteDataTypes.h:
1435         Add WebsiteDataTypeDiskCache.
1436
1437         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1438         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1439         (toWebsiteDataTypes):
1440         Handle WKWebsiteDataTypeDiskCache.
1441
1442 2014-12-09  Myles C. Maxfield  <mmaxfield@apple.com>
1443
1444         Delete Node::boundingBox()
1445         https://bugs.webkit.org/show_bug.cgi?id=139333
1446
1447         Reviewed by Zalan Bujtas.
1448
1449         * Shared/WebHitTestResult.cpp:
1450         (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates):
1451         Use RenderObject::absoluteBoundingBoxRect().
1452         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
1453         (WebKit::WebPage::findZoomableAreaForPoint): Use
1454         RenderObject::absoluteBoundingBoxRect().
1455
1456 2014-12-09  Chris Dumez  <cdumez@apple.com>
1457
1458         [WK2] Crash when answering notification permission request after navigating
1459         https://bugs.webkit.org/show_bug.cgi?id=139429
1460         <rdar://problem/18921122>
1461
1462         Reviewed by Andreas Kling.
1463
1464         When requesting a notification permission, navigating away and then
1465         answering the permission, WebKit2 would crash. This is because upon
1466         navigating, the request is cancelled and removed from the HashMaps
1467         in NotificationPermissionRequestManager. When
1468         didReceiveNotificationPermissionDecision() is later called, it would
1469         look for the request identifier in m_idToOriginMap HashMap. As the
1470         request was cancelled, HashMap::take() call would return null for
1471         the SecurityOrigin*. This security origin pointer is then removed
1472         from m_originToIDMap, but the code was failing to do a null check
1473         first. Calling HashMap::remove(nullptr) would then crash.
1474
1475         This patch adds the missing null check and a layout test to cover
1476         this case.
1477
1478         Test: http/tests/notifications/legacy/notification-request-permission-then-navigate.html
1479         
1480
1481         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
1482         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
1483
1484 2014-12-09  Anders Carlsson  <andersca@apple.com>
1485
1486         Implement clearing of cookies
1487         https://bugs.webkit.org/show_bug.cgi?id=139455
1488
1489         Reviewed by Andreas Kling.
1490
1491         * NetworkProcess/NetworkProcess.cpp:
1492         (WebKit::NetworkProcess::deleteWebsiteData):
1493         Handle deleting cookies by finding the right network storage session and deleting the cookies from it.
1494         Then, send a DidDeleteWebsiteData message back.
1495
1496         * NetworkProcess/NetworkProcess.h:
1497         Add new members.
1498
1499         * NetworkProcess/NetworkProcess.messages.in:
1500         Add new DeleteWebsiteData message.
1501
1502         * Shared/WebsiteData/WebsiteDataTypes.h:
1503         Move the website data types enum to its own file so it can be shared.
1504
1505         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1506         (toWebsiteDataTypes):
1507         Update now that WebsiteDataTypes is its own enum.
1508
1509         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1510         removeDataModifiedSince was renamed to removeData.
1511
1512         * UIProcess/Network/NetworkProcessProxy.cpp:
1513         (WebKit::generateCallbackID):
1514         Helper function to create a callback ID.
1515
1516         (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
1517         Assert that we have no pending callbacks.
1518
1519         (WebKit::NetworkProcessProxy::deleteWebsiteData):
1520         Put the completion handler in our map and message the network process.
1521
1522         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
1523         Call all completion handlers.
1524
1525         (WebKit::NetworkProcessProxy::didDeleteWebsiteData):
1526         Grab the completion handler and call it.
1527
1528         * UIProcess/Network/NetworkProcessProxy.h:
1529         Add new members.
1530
1531         * UIProcess/Network/NetworkProcessProxy.messages.in:
1532         Add DidDeleteWebsiteData callback.
1533
1534         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1535         (WebKit::computeNetworkProcessAccessType):
1536         Helper function that computes the type of process access we'd need for the given mask of
1537         website data types.
1538
1539         (WebKit::WebsiteDataStore::removeData):
1540         Gather all the network processes and message them. Use a callback aggregator object to track callbacks
1541         so we'll call the completion handler once all callbacks have been invoked.
1542
1543         * UIProcess/WebsiteData/WebsiteDataStore.h:
1544         Move WebsiteDataTypes to its own file.
1545
1546         * WebKit2.xcodeproj/project.pbxproj:
1547         Add new files.
1548
1549 2014-12-09  Anders Carlsson  <andersca@apple.com>
1550
1551         Give WebsiteDataStore a unique ID
1552         https://bugs.webkit.org/show_bug.cgi?id=139448
1553
1554         Reviewed by Andreas Kling.
1555
1556         * Shared/WebPageCreationParameters.cpp:
1557         (WebKit::WebPageCreationParameters::encode):
1558         (WebKit::WebPageCreationParameters::decode):
1559         * Shared/WebPageCreationParameters.h:
1560         * UIProcess/WebPageProxy.cpp:
1561         (WebKit::WebPageProxy::creationParameters):
1562         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1563         (WebKit::generateIdentifier):
1564         (WebKit::WebsiteDataStore::WebsiteDataStore):
1565         * UIProcess/WebsiteData/WebsiteDataStore.h:
1566         (WebKit::WebsiteDataStore::identifier):
1567
1568 2014-12-09  Anders Carlsson  <andersca@apple.com>
1569
1570         Build fix.
1571
1572         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1573
1574 2014-12-09  Ting-Wei Lan  <lantw44@gmail.com>
1575
1576         [GTK] LDFLAGS is ignored when running g-ir-scanner
1577         https://bugs.webkit.org/show_bug.cgi?id=138832
1578
1579         Reviewed by Carlos Garcia Campos.
1580
1581         GTK+ requires libintl on FreeBSD because there is no gettext
1582         implementation in FreeBSD libc. In order to link to libintl, which is
1583         not located in the default search path of the linker, we need to add
1584         the required path via the linker command line. However, LDFLAGS is
1585         ignored when running g-ir-scanner starting from r167873, so we have
1586         to manually pick required flags from CMAKE_SHARED_LINKER_FLAGS and
1587         put them in correct order to prevent g-ir-scanner from linking to
1588         the installed version of libraries.
1589
1590         * PlatformGTK.cmake:
1591
1592 2014-12-09  Jeremy Jones  <jeremyj@apple.com>
1593
1594         Enable activating optimized fullscreen mode from standard fulscreen mode.
1595         https://bugs.webkit.org/show_bug.cgi?id=139137
1596
1597         Reviewed by Simon Fraser.
1598
1599         Going from standard fullscreen mode to optimized fullscreen mode requires the ability to
1600         update the fullscreen mode and a new standard-and-optimized-fullscreen mode.
1601
1602         * UIProcess/API/Cocoa/WKWebView.mm:
1603         (-[WKWebView _isPlayingFullscreenOptimizedVideo]): 
1604         Treat new standard-and-optimized as a kind of optimized.
1605         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: IPC fullscreen mode changes
1606         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: ditto
1607         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): dito
1608         * WebProcess/ios/WebVideoFullscreenManager.h: ditto
1609         * WebProcess/ios/WebVideoFullscreenManager.messages.in: ditto
1610         * WebProcess/ios/WebVideoFullscreenManager.mm: dito
1611         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): ditto
1612         (WebKit::WebVideoFullscreenManager::setFullscreenModeChanged): ditto
1613
1614 2014-12-08  Jaehun Lim  <ljaehun.lim@samsung.com>
1615
1616         [EFL] Use DependenciesEFL instead of Dependencies
1617
1618         Unreviewed, fix simple typo.
1619
1620         * PlatformEfl.cmake:
1621
1622 2014-12-08  Beth Dakin  <bdakin@apple.com>
1623
1624         Copy and Lookup menu items should be disabled when something is not copyable
1625         https://bugs.webkit.org/show_bug.cgi?id=139423
1626
1627         Reviewed by Tim Horton.
1628
1629         Add allowsCopy to the WebHitTestResult.
1630         * Shared/WebHitTestResult.cpp:
1631         (WebKit::WebHitTestResult::Data::Data):
1632         (WebKit::WebHitTestResult::Data::encode):
1633         (WebKit::WebHitTestResult::Data::decode):
1634         * Shared/WebHitTestResult.h:
1635         (WebKit::WebHitTestResult::allowsCopy):
1636
1637         Set autoenablesItems to NO. It’s messing with our ability to control the enable/
1638         disable state otherwise.
1639         * UIProcess/API/mac/WKView.mm:
1640         (-[WKView initWithFrame:context:configuration:webView:]):
1641
1642         Disable both lookup and copy when a WebHitTestResult does not allow copy.
1643         * UIProcess/mac/WKActionMenuController.mm:
1644
1645 2014-12-08  Dan Bernstein  <mitz@apple.com>
1646
1647         <rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
1648         https://bugs.webkit.org/show_bug.cgi?id=138750
1649
1650         Reviewed by Tim Horton.
1651
1652         The snapshot for the current gesture was being removed mid-gesture by the callback from
1653         dispatchAfterEnsuringDrawing scheduled by the previous gesture. The fix is to ignore the
1654         callback for a gesture if it is made after the snapshot for that gesture has already been
1655         removed (which can happen as a result of the watchdog timer firing).
1656
1657         * UIProcess/ios/ViewGestureControllerIOS.mm:
1658         (WebKit::ViewGestureController::ViewGestureController): Initialize new member variable.
1659         (WebKit::addLogEntry): Fixed the log message format.
1660         (WebKit::ViewGestureController::endSwipeGesture): When dispatchAfterEnsuringDrawing() calls
1661         us back, bail out if the gesture snapshot has already been removed.
1662         (WebKit::ViewGestureController::removeSwipeSnapshot): Increment
1663         m_gesturePendingSnapshotRemoval.
1664         * UIProcess/mac/ViewGestureController.h: Added m_gesturePendingSnapshotRemoval member
1665         variable.
1666
1667 2014-12-08  Anders Carlsson  <andersca@apple.com>
1668
1669         The website data store should know all its associated pages
1670         https://bugs.webkit.org/show_bug.cgi?id=139411
1671
1672         Reviewed by Tim Horton.
1673
1674         * UIProcess/WebPageProxy.cpp:
1675         (WebKit::WebPageProxy::WebPageProxy):
1676         (WebKit::WebPageProxy::close):
1677         * UIProcess/WebPageProxy.h:
1678         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1679         (WebKit::WebsiteDataStore::~WebsiteDataStore):
1680         (WebKit::WebsiteDataStore::addWebPage):
1681         (WebKit::WebsiteDataStore::removeWebPage):
1682         * UIProcess/WebsiteData/WebsiteDataStore.h:
1683
1684 2014-12-08  Dan Bernstein  <mitz@apple.com>
1685
1686         <rdar://problem/18046692> [iOS] Safari crashes at -[_NSUndoStack popAndInvoke] when trying to undo typing on closed tab
1687         https://bugs.webkit.org/show_bug.cgi?id=139408
1688
1689         Reviewed by Anders Carlsson.
1690
1691         * UIProcess/ios/WKContentView.mm:
1692         (-[WKContentView undoManager]): Override to initialize if necessary and return a unique undo
1693         manager for this instance. This ensures that undoable operations for this webview don’t get
1694         put in other undo managers, and matches UIWebView behavior.
1695
1696 2014-12-08  Chris Dumez  <cdumez@apple.com>
1697
1698         Revert r176293 & r176275
1699
1700         Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
1701         instead of size_t. There is some disagreement regarding the long-term direction
1702         of the API and we shouldn’t leave the API partly transitioned to unsigned type
1703         while making a decision.
1704
1705         * Platform/IPC/ArgumentCoders.h:
1706         * Platform/IPC/DataReference.h:
1707
1708 2014-12-08  Anders Carlsson  <andersca@apple.com>
1709
1710         Make deleting all cookies after a given date a little more sane
1711         https://bugs.webkit.org/show_bug.cgi?id=139409
1712
1713         Reviewed by Antti Koivisto.
1714
1715         Change all the doubles to std::chrono::system_clock::time_points instead.
1716
1717         * Platform/IPC/ArgumentCoders.cpp:
1718         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode):
1719         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode):
1720         * Platform/IPC/ArgumentCoders.h:
1721         * Scripts/webkit/messages.py:
1722         (headers_for_type):
1723         * UIProcess/API/C/WKCookieManager.cpp:
1724         (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
1725         * UIProcess/API/C/WKCookieManager.h:
1726         * UIProcess/WebCookieManagerProxy.cpp:
1727         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
1728         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedAfterDate): Deleted.
1729         * UIProcess/WebCookieManagerProxy.h:
1730         * WebProcess/Cookies/WebCookieManager.cpp:
1731         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
1732         (WebKit::WebCookieManager::deleteAllCookiesModifiedAfterDate): Deleted.
1733         * WebProcess/Cookies/WebCookieManager.h:
1734         * WebProcess/Cookies/WebCookieManager.messages.in:
1735
1736 2014-12-08  Anders Carlsson  <andersca@apple.com>
1737
1738         Move the callback invocation outside of the loop.
1739
1740         Rubber-stamped by Tim Horton.
1741
1742         * UIProcess/WebKeyValueStorageManager.cpp:
1743         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1744
1745 2014-12-08  Anders Carlsson  <andersca@apple.com>
1746
1747         Add a stub implementation of WebsiteDataStore::removeDataModifiedSince
1748         https://bugs.webkit.org/show_bug.cgi?id=139406
1749
1750         Reviewed by Antti Koivisto.
1751
1752         Change _WKWebsiteDataStore to call the newly added function.
1753
1754         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1755         (toWebsiteDataTypes):
1756         (toSystemClockTime):
1757         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1758         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1759         (WebKit::WebsiteDataStore::removeDataModifiedSince):
1760         * UIProcess/WebsiteData/WebsiteDataStore.h:
1761
1762 2014-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
1763
1764         [GTK] Let DrawingArea manages setAcceleratedCompositingWindowId
1765         https://bugs.webkit.org/show_bug.cgi?id=117230
1766
1767         Reviewed by Anders Carlsson.
1768
1769         This is a preparation patch for Threaded Coordinated Graphics.
1770
1771         LayerTreeHostGtk uses a native window handle to make glContext for
1772         accelerated compositing. Therefore it is natural for DrawingArea to take
1773         responsibility for the native window handle. And, in Coordinated
1774         Graphics case, WebPage creates LayerTreeHost before receiving a native
1775         window handle from UIProcess. It means we need a method to pass the
1776         native window handle to already created LayerTreeHost.
1777
1778         This patch uses DrawingAreaProxy::setNativeSurfaceHandleForCompositing
1779         instead of WebCoreProxy::setAcceleratedCompositingWindowId to set window
1780         ID for accelerated compositing.
1781
1782         Also, this patch renames the setAcceleratedCompositingWindowId with a
1783         more generic name, setNativeSurfaceHandleForCompositing.
1784
1785         No new tests. No change in functionality.
1786
1787         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1788         (webkitWebViewBaseCreateWebPage):
1789         * UIProcess/DrawingAreaProxyImpl.cpp:
1790         (WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing):
1791         * UIProcess/DrawingAreaProxyImpl.h:
1792         * UIProcess/WebPageProxy.h:
1793         * UIProcess/gtk/WebPageProxyGtk.cpp:
1794         (WebKit::WebPageProxy::setAcceleratedCompositingWindowId): Deleted.
1795         * WebProcess/WebPage/DrawingArea.h:
1796         (WebKit::DrawingArea::nativeSurfaceHandleForCompositing):
1797         * WebProcess/WebPage/DrawingArea.messages.in:
1798         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1799         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
1800         * WebProcess/WebPage/DrawingAreaImpl.h:
1801         * WebProcess/WebPage/WebPage.h:
1802         * WebProcess/WebPage/WebPage.messages.in:
1803         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1804         (WebKit::LayerTreeHostGtk::glContext):
1805         (WebKit::LayerTreeHostGtk::initialize):
1806         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1807         (WebKit::WebPage::platformInitialize):
1808         (WebKit::WebPage::setAcceleratedCompositingWindowId): Deleted.
1809
1810 2014-12-08  Philippe Normand  <pnormand@igalia.com>
1811
1812         [GTK] UserMedia Permission Request API
1813         https://bugs.webkit.org/show_bug.cgi?id=136449
1814
1815         Reviewed by Carlos Garcia Campos.
1816
1817         * PlatformGTK.cmake: GTK-specific new files.
1818         * UIProcess/API/gtk/WebKitUIClient.cpp:  DecidePolicy handler
1819         implementation for UserMediaPermissionRequest.
1820         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp: Added,
1821         WebKitGTK API for UserMediaPermissionRequest, very similar to the
1822         one used for Geolocation.
1823         (webkitUserMediaPermissionRequestAllow):
1824         (webkitUserMediaPermissionRequestDeny):
1825         (webkit_permission_request_interface_init):
1826         (webkitUserMediaPermissionRequestDispose):
1827         (webkit_user_media_permission_get_media_types):
1828         (webkitUserMediaPermissionRequestGetProperty):
1829         (webkit_user_media_permission_request_class_init):
1830         (webkitUserMediaPermissionRequestCreate):
1831         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h: Added.
1832         * UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h: Added.
1833         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Expose new API
1834         in documentation.
1835         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
1836         * UIProcess/API/gtk/webkit2.h: Expose UserMediaPermissionRequest API.
1837
1838 2014-12-08  Anders Carlsson  <andersca@apple.com>
1839
1840         Add a stubbed out method for clearing out the website data store
1841         https://bugs.webkit.org/show_bug.cgi?id=139404
1842
1843         Reviewed by Antti Koivisto.
1844
1845         Add stubbed out method that just calls the completion handler.
1846
1847         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1848         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1849         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1850
1851 2014-12-06  Antti Koivisto  <antti@apple.com>
1852
1853         REGRESSION (173394): Support for webcam is broken
1854         https://bugs.webkit.org/show_bug.cgi?id=139313
1855
1856         Reviewed by Alexey Proskuryakov.
1857
1858         * NetworkProcess/NetworkResourceLoader.cpp:
1859         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1860
1861             Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.
1862
1863 2014-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
1864
1865         [CoordinatedGraphics] Move CoordinatedBackingStore and CoordinatedGraphicsScene to Shared
1866         https://bugs.webkit.org/show_bug.cgi?id=139385
1867
1868         Reviewed by Martin Robinson.
1869
1870         For the Threaded Compositor, CoordinatedBackingStore and
1871         CoordinatedGraphicsScene should be placed at the Shared instead of
1872         UIProcess because it can be used in the WebProcess also.
1873
1874         No new tests because there is no behavior change.
1875
1876         * PlatformEfl.cmake:
1877         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp.
1878         * Shared/CoordinatedGraphics/CoordinatedBackingStore.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h.
1879         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp.
1880         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h.
1881
1882 2014-12-08  Shivakumar JM  <shiva.jm@samsung.com>
1883
1884         Fix build warning in WebKit2/UIProcess module.
1885         https://bugs.webkit.org/show_bug.cgi?id=139386
1886
1887         Reviewed by Alexey Proskuryakov.
1888
1889         Fix build warning by removing unused parameter name from function
1890
1891         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1892         (WebKit::WebsiteDataStore::WebsiteDataStore):
1893
1894 2014-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
1895
1896         [CoordinatedGraphics] Change the namespace of CoordinatedBackingStore and CoordinatedGraphicsScene
1897         https://bugs.webkit.org/show_bug.cgi?id=139372
1898
1899         Reviewed by Gyuyoung Kim.
1900
1901         CoordinatedBackingStore and CoordinatedGraphicsScene should be declared in the WebKit namespace
1902         instead of WebCore namespace.
1903
1904         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
1905         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
1906         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
1907         (WebKit::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile):
1908         (WebKit::CoordinatedBackingStore::rect):
1909         (WebCore::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile): Deleted.
1910         (WebCore::CoordinatedBackingStore::rect): Deleted.
1911         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1912         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1913         (WebKit::CoordinatedGraphicsScene::setViewBackgroundColor):
1914         (WebKit::CoordinatedGraphicsScene::viewBackgroundColor):
1915         (WebKit::CoordinatedGraphicsScene::layerByID):
1916         (WebKit::CoordinatedGraphicsScene::rootLayer):
1917         (WebCore::CoordinatedGraphicsScene::setViewBackgroundColor): Deleted.
1918         (WebCore::CoordinatedGraphicsScene::viewBackgroundColor): Deleted.
1919         (WebCore::CoordinatedGraphicsScene::layerByID): Deleted.
1920         (WebCore::CoordinatedGraphicsScene::rootLayer): Deleted.
1921         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1922         (WebKit::CoordinatedLayerTreeHostProxy::coordinatedGraphicsScene):
1923         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
1924         (WebKit::toImpl):
1925         (WebKit::toAPI):
1926         (toImpl): Deleted.
1927         (toAPI): Deleted.
1928         * UIProcess/CoordinatedGraphics/WebView.h:
1929
1930 2014-12-07  Dan Bernstein  <mitz@apple.com>
1931
1932         Introduce and deploy a function that allocates and returns an instance of a soft-linked class
1933         https://bugs.webkit.org/show_bug.cgi?id=139348
1934
1935         Reviewed by Anders Carlsson.
1936
1937         In [[getFooClass() alloc] init*], the type of the result of +alloc is id, so the compiler
1938         picks an arbitrary declaration of init*, not necessarily the Foo one. This can then lead
1939         to warnings or errors if the types or attributes don’t match, or to runtime errors if Foo
1940         doesn’t even have the expected initializer. The new allocFooInstance() returns a Foo *, thus
1941         avoiding the ambiguity.
1942
1943         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1944         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]):
1945         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):
1946         (-[WKAirPlayRoutePicker show:fromRect:]):
1947         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1948         (-[_WKVideoFileUploadItem displayImage]):
1949         * UIProcess/mac/WKActionMenuController.mm:
1950         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
1951         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1952         (WebKit::PlatformCALayerRemoteCustom::clone):
1953
1954 2014-12-06  Anders Carlsson  <andersca@apple.com>
1955
1956         Fix build with newer versions of clang.
1957         rdar://problem/18978733
1958
1959         Add missing overrides and casts.
1960
1961         * NetworkProcess/NetworkProcess.h:
1962         * Shared/Downloads/DownloadAuthenticationClient.h:
1963         (WebKit::DownloadAuthenticationClient::refAuthenticationClient): Deleted.
1964         (WebKit::DownloadAuthenticationClient::derefAuthenticationClient): Deleted.
1965         * UIProcess/API/C/WKPage.cpp:
1966         (WKPageSetPageUIClient):
1967         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1968         (-[WKWebViewConfiguration copyWithZone:]):
1969         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1970         (-[_WKProcessPoolConfiguration copyWithZone:]):
1971         * UIProcess/Cocoa/NavigationState.h:
1972         * UIProcess/Network/NetworkProcessProxy.h:
1973         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1974         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange): Deleted.
1975         * UIProcess/WebPageProxy.h:
1976         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
1977         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork): Deleted.
1978         (WebKit::WebContentProcessMainDelegate::getConnectionIdentifier): Deleted.
1979         (WebKit::WebContentProcessMainDelegate::getClientIdentifier): Deleted.
1980         (WebKit::WebContentProcessMainDelegate::getClientProcessName): Deleted.
1981         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
1982         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1983         (WebKit::InjectedBundle::initialize):
1984         * WebProcess/WebCoreSupport/WebChromeClient.h:
1985         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1986         * WebProcess/WebPage/WebBackForwardListProxy.h:
1987         * WebProcess/WebPage/WebInspector.h:
1988         (WebKit::WebInspector::didClose): Deleted.
1989         (WebKit::WebInspector::didReceiveInvalidMessage): Deleted.
1990         * WebProcess/WebPage/WebInspectorUI.h:
1991         (WebKit::WebInspectorUI::didClose): Deleted.
1992         (WebKit::WebInspectorUI::didReceiveInvalidMessage): Deleted.
1993         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
1994         * WebProcess/WebProcess.h:
1995         * WebProcess/ios/WebVideoFullscreenManager.h:
1996
1997 2014-12-06  Anders Carlsson  <andersca@apple.com>
1998
1999         Only include TUCallSPI on Mac.
2000
2001         * Platform/mac/MenuUtilities.mm:
2002
2003 2014-12-06  Commit Queue  <commit-queue@webkit.org>
2004
2005         Unreviewed, rolling out r176905.
2006         https://bugs.webkit.org/show_bug.cgi?id=139337
2007
2008         the test case is failing in bots (Requested by anttik on
2009         #webkit).
2010
2011         Reverted changeset:
2012
2013         "REGRESSION (173394): Support for webcam is broken"
2014         https://bugs.webkit.org/show_bug.cgi?id=139313
2015         http://trac.webkit.org/changeset/176905
2016
2017 2014-12-05  Antti Koivisto  <antti@apple.com>
2018
2019         REGRESSION (173394): Support for webcam is broken
2020         https://bugs.webkit.org/show_bug.cgi?id=139313
2021
2022         Reviewed by Alexey Proskuryakov.
2023
2024         * NetworkProcess/NetworkResourceLoader.cpp:
2025         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2026
2027             Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.
2028
2029 2014-12-05  Yongjun Zhang  <yongjun_zhang@apple.com>
2030
2031         Add a delegate method for didReceiveServerRedirectForProvisionalLoadForFrame.
2032         https://bugs.webkit.org/show_bug.cgi?id=139325
2033
2034         Add delegate method webProcessPlugInBrowserContextController:didReceiveServerRedirectForProvisionalLoadForFrame: into
2035         WKWebProcessPlugInLoadDelegate to listen to server side redirect in injected bundle.
2036
2037         Reviewed by Dan Bernstein.
2038
2039         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2040         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2041         (didReceiveServerRedirectForProvisionalLoadForFrame):
2042         (setUpPageLoaderClient):
2043
2044 2014-12-05  Csaba Osztrogonác  <ossy@webkit.org>
2045
2046         URTBF, EFL is happy now.
2047
2048         * UIProcess/API/APIWebsiteDataStore.cpp:
2049         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2050         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2051         (WebKit::WebsiteDataStore::createNonPersistent):
2052
2053 2014-12-05  Mark Lam  <mark.lam@apple.com>
2054
2055         Gardening: one more build fix for GTK builds.
2056
2057         * CMakeLists.txt:
2058
2059 2014-12-05  Csaba Osztrogonác  <ossy@webkit.org>
2060
2061         URTBF, remove duplicated entry due to parallel buildfixing.
2062
2063         * CMakeLists.txt:
2064
2065 2014-12-05  Csaba Osztrogonác  <ossy@webkit.org>
2066
2067         URTBF after r176849.
2068
2069         * CMakeLists.txt: Added WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp.
2070
2071 2014-12-05  Mark Lam  <mark.lam@apple.com>
2072
2073         Gardening: another build fix for GTK builds.
2074
2075         * CMakeLists.txt:
2076
2077 2014-12-05  Mark Lam  <mark.lam@apple.com>
2078
2079         Gardening: more speculative build fix for GTK builds.
2080
2081         * CMakeLists.txt:
2082
2083 2014-12-05  Tim Horton  <timothy_horton@apple.com>
2084
2085         Use the system string for telephone number menu
2086         https://bugs.webkit.org/show_bug.cgi?id=139324
2087         <rdar://problem/18726471>
2088
2089         Reviewed by Anders Carlsson.
2090
2091         * Platform/mac/MenuUtilities.mm:
2092         (WebKit::menuItemTitleForTelephoneNumberGroup):
2093         Make use of the SPI to retrieve the string if it exists.
2094
2095 2014-12-05  Tim Horton  <timothy_horton@apple.com>
2096
2097         If the action menu hit test times out, a menu with a single separator appears
2098         https://bugs.webkit.org/show_bug.cgi?id=139320
2099         <rdar://problem/19158331>
2100
2101         Reviewed by Beth Dakin.
2102
2103         * UIProcess/mac/WKActionMenuController.h:
2104         * UIProcess/mac/WKActionMenuController.mm:
2105         (-[WKActionMenuController menuNeedsUpdate:]):
2106         (-[WKActionMenuController _defaultMenuItems]):
2107         Add a new "TimedOut" state, which we get into if the sync wait for
2108         didPerformActionMenuHitTest times out. In this case, we'll drop the
2109         separator item and give up on the menu. This way, the menu will never
2110         have just a single separator item at the end of menuNeedsUpdate:.
2111
2112 2014-12-05  Mark Lam  <mark.lam@apple.com>
2113
2114         Gardening: speculative build fix for GTK builds.
2115
2116         * CMakeLists.txt:
2117
2118 2014-12-05  Anders Carlsson  <andersca@apple.com>
2119
2120         Fix build.
2121
2122         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2123         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2124
2125 2014-12-05  Anders Carlsson  <andersca@apple.com>
2126
2127         Give all web pages a website data store
2128         https://bugs.webkit.org/show_bug.cgi?id=139317
2129
2130         Reviewed by Tim Horton.
2131
2132         * UIProcess/API/Cocoa/WKWebView.mm:
2133         (-[WKWebView initWithFrame:configuration:]):
2134         Set the website data store on the window.
2135
2136         * UIProcess/WebContext.cpp:
2137         (WebKit::websiteDataStoreConfiguration):
2138         Helper function that will create the default website data store configuration for a context.
2139
2140         (WebKit::WebContext::WebContext):
2141         Create a new, per-context data store.
2142
2143         (WebKit::WebContext::createWebPage):
2144         If we don't have a data store filled in, use the default per-context one.
2145
2146         * UIProcess/WebContext.h:
2147         * UIProcess/WebPageProxy.h:
2148
2149 2014-12-05  Anders Carlsson  <andersca@apple.com>
2150
2151         Move the website data store code to a new file
2152         https://bugs.webkit.org/show_bug.cgi?id=139312
2153
2154         Reviewed by Tim Horton.
2155
2156         It's weird to have all the website data code in the API class, so move it to a new file.
2157
2158         * UIProcess/API/APIWebsiteDataStore.cpp:
2159         (API::WebsiteDataStore::WebsiteDataStore):
2160         (API::WebsiteDataStore::isNonPersistent):
2161         (API::generateNonPersistentSessionID): Deleted.
2162         * UIProcess/API/APIWebsiteDataStore.h:
2163         * UIProcess/API/Cocoa/WKWebView.mm:
2164         (-[WKWebView initWithFrame:configuration:]):
2165         * UIProcess/WebsiteData/WebsiteDataStore.cpp: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp.
2166         (WebKit::generateNonPersistentSessionID):
2167         (WebKit::WebsiteDataStore::createNonPersistent):
2168         (WebKit::WebsiteDataStore::create):
2169         (WebKit::WebsiteDataStore::WebsiteDataStore):
2170         (WebKit::WebsiteDataStore::~WebsiteDataStore):
2171         * UIProcess/WebsiteData/WebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h.
2172         (WebKit::WebsiteDataStore::isNonPersistent):
2173         (WebKit::WebsiteDataStore::sessionID):
2174         * WebKit2.xcodeproj/project.pbxproj:
2175
2176 2014-12-05  Tim Horton  <timothy_horton@apple.com>
2177
2178         Keyboard input should be disabled in the preview popover
2179         https://bugs.webkit.org/show_bug.cgi?id=139219
2180         <rdar://problem/19052381>
2181
2182         Reviewed by Anders Carlsson.
2183
2184         * UIProcess/API/mac/WKView.mm:
2185         (-[WKView performKeyEquivalent:]):
2186         (-[WKView keyUp:]):
2187         (-[WKView keyDown:]):
2188         (-[WKView flagsChanged:]):
2189         There are two implementations of each of these methods in this file.
2190         Adjust the ones that the original patch missed.
2191
2192 2014-12-05  Antti Koivisto  <antti@apple.com>
2193
2194         In NetworkResourceLoader always bail out after abort()
2195         https://bugs.webkit.org/show_bug.cgi?id=139299
2196
2197         Reviewed by Alexey Proskuryakov.
2198
2199         Invoking abort() may kill the current object. Take care to bail out after it.
2200
2201         * NetworkProcess/NetworkResourceLoader.cpp:
2202         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2203         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2204         (WebKit::NetworkResourceLoader::didFinishLoading):
2205
2206             Either make sure sendAbortingOnFailure() is called last in callbacks or the results is explicitly tested.
2207
2208         (WebKit::NetworkResourceLoader::bufferingTimerFired):
2209         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
2210
2211             Rename and return a boolean to indicate if load should continue.
2212
2213         (WebKit::NetworkResourceLoader::sendBuffer): Deleted.
2214         * NetworkProcess/NetworkResourceLoader.h:
2215
2216 2014-12-05  Anders Carlsson  <andersca@apple.com>
2217
2218         Don't use PLATFORM(IOS) in non-project headers.
2219
2220         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2221         (-[WKWebViewConfiguration _allowsAlternateFullscreen]):
2222         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2223
2224 2014-12-05  Sam Weinig  <sam@webkit.org>
2225
2226         WKBundleCSSStyleDeclarationRef needs to be a real API::Object
2227         https://bugs.webkit.org/show_bug.cgi?id=139291
2228
2229         Reviewed by Dan Bernstein.
2230
2231         Change WKBundleCSSStyleDeclarationRef from being a WebCore::CSSStyleDeclaration, to
2232         being a real API::Object.  WKRetain and WKRelease require this.
2233
2234         * Shared/APIObject.h:
2235         * WebKit2.xcodeproj/project.pbxproj:
2236         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2237         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp: Added.
2238         (WebKit::domHandleCache):
2239         (WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
2240         (WebKit::InjectedBundleCSSStyleDeclarationHandle::InjectedBundleCSSStyleDeclarationHandle):
2241         (WebKit::InjectedBundleCSSStyleDeclarationHandle::~InjectedBundleCSSStyleDeclarationHandle):
2242         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.h: Added.
2243         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
2244         (WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):
2245
2246 2014-12-05  Anders Carlsson  <andersca@apple.com>
2247
2248         Oops, didn't mean to commit this.
2249
2250         * Shared/API/Cocoa/WKFoundation.h:
2251
2252 2014-12-05  Anders Carlsson  <andersca@apple.com>
2253
2254         Add an API::WebsiteDataStore object and use it for _WKWebsiteDataStore
2255         https://bugs.webkit.org/show_bug.cgi?id=139304
2256
2257         Reviewed by Tim Horton.
2258
2259         * Shared/APIObject.h:
2260         * Shared/Cocoa/APIObject.mm:
2261         (API::Object::newObject):
2262         Make _WKWebsiteDataStore a wrapper for API::WebsiteDataStore instead of API::Session.
2263
2264         * UIProcess/API/APIWebsiteDataStore.cpp: Added.
2265         (API::generateNonPersistentSessionID):
2266         (API::WebsiteDataStore::defaultDataStore):
2267         (API::WebsiteDataStore::createNonPersistentDataStore):
2268         (API::WebsiteDataStore::WebsiteDataStore):
2269         (API::WebsiteDataStore::~WebsiteDataStore):
2270         (API::WebsiteDataStore::isNonPersistent):
2271         Add new WebsiteDataStore implementation. Currently it only contains the WebCore Session ID, but more will be
2272         added to it in upcoming commits.
2273
2274         * UIProcess/API/APIWebsiteDataStore.h:
2275         Add header.
2276
2277         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Added.
2278         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2279         Platform specific file that returns the default data store configuration.
2280
2281         * UIProcess/API/Cocoa/WKWebView.mm:
2282         (-[WKWebView initWithFrame:configuration:]):
2283         Set the session ID from the website data store.
2284
2285         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2286         (+[_WKWebsiteDataStore defaultDataStore]):
2287         (+[_WKWebsiteDataStore nonPersistentDataStore]):
2288         (-[_WKWebsiteDataStore dealloc]):
2289         (-[_WKWebsiteDataStore isNonPersistent]):
2290         (-[_WKWebsiteDataStore _apiObject]):
2291         Update now that we wrap an API::WebsiteDataStore instead.
2292
2293         * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h:
2294         (WebKit::wrapper):
2295         Update for API::Session -> API::WebsiteDataStore change.
2296
2297         * WebKit2.xcodeproj/project.pbxproj:
2298         Add new files.
2299
2300 2014-12-05  David Kilzer  <ddkilzer@apple.com>
2301
2302         FeatureDefines.xcconfig: Workaround bug in Xcode 5.1.1 when defining ENABLE_WEB_REPLAY
2303         <http://webkit.org/b/139286>
2304
2305         Reviewed by Daniel Bates.
2306
2307         * Configurations/FeatureDefines.xcconfig: Switch back to using
2308         PLATFORM_NAME to workaround a bug in Xcode 5.1.1 on 10.8.
2309
2310 2014-12-05  Anders Carlsson  <andersca@apple.com>
2311
2312         Make WebPageProxy hold on to a SessionID instead of an API:Session
2313         https://bugs.webkit.org/show_bug.cgi?id=139302
2314
2315         Reviewed by Sam Weinig.
2316
2317         This is in preparation for adding API::WebsiteDataStore. Currently we have to keep the
2318         Session ID and the WebsiteDataStore separate because we still need to support toggling private browsing.
2319
2320         * UIProcess/API/C/WKPage.cpp:
2321         (WKPageSetSession):
2322         * UIProcess/API/C/WKSessionRef.cpp:
2323         (WKSessionCreate):
2324         * UIProcess/API/Cocoa/WKWebView.mm:
2325         (-[WKWebView initWithFrame:configuration:]):
2326         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2327         (+[_WKWebsiteDataStore nonPersistentDataStore]):
2328         * UIProcess/APISession.cpp:
2329         (API::generateID):
2330         (API::Session::Session):
2331         (API::Session::createEphemeral):
2332         (API::Session::legacyPrivateSession): Deleted.
2333         (API::Session::create): Deleted.
2334         * UIProcess/APISession.h:
2335         * UIProcess/WebContext.cpp:
2336         (WebKit::WebContext::createWebPage):
2337         * UIProcess/WebPageProxy.cpp:
2338         (WebKit::WebPageProxy::WebPageProxy):
2339         (WebKit::WebPageProxy::setSessionID):
2340         (WebKit::WebPageProxy::creationParameters):
2341         (WebKit::WebPageProxy::setSession): Deleted.
2342         * UIProcess/WebPageProxy.h:
2343         (WebKit::WebPageProxy::sessionID):
2344
2345 2014-12-05  Eric Carlson  <eric.carlson@apple.com>
2346
2347         [iOS] allow host application to opt-out of alternate fullscreen pt. 2
2348         https://bugs.webkit.org/show_bug.cgi?id=139227
2349
2350         Reviewed by Jer Noble and Anders Carlsson.
2351
2352         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add bool param to setupFullscreenWithID.
2353         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: Ditto.
2354         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2355         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
2356
2357         * WebProcess/ios/WebVideoFullscreenManager.mm:
2358         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Pass new parameter
2359             to SetupFullscreenWithID.
2360
2361 2014-12-04  Anders Carlsson  <andersca@apple.com>
2362
2363         Add missing includes in preparation for making toAPI require that it's passed an API::Object
2364         https://bugs.webkit.org/show_bug.cgi?id=139278
2365
2366         Reviewed by Tim Horton.
2367
2368         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
2369         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
2370         * UIProcess/API/C/WKContext.cpp:
2371         * UIProcess/API/C/WKDownload.cpp:
2372         * UIProcess/API/C/WKFrame.cpp:
2373         * UIProcess/API/C/WKGeolocationManager.cpp:
2374         * UIProcess/API/C/WKInspector.cpp:
2375         * UIProcess/API/C/WKPage.cpp:
2376         * UIProcess/GenericCallback.h:
2377         * UIProcess/Notifications/WebNotificationProvider.cpp:
2378         * UIProcess/WebContextConnectionClient.cpp:
2379         * UIProcess/WebContextInjectedBundleClient.cpp:
2380         * UIProcess/WebCookieManagerProxyClient.cpp:
2381         * UIProcess/WebDatabaseManagerProxyClient.cpp:
2382         * UIProcess/WebFindClient.cpp:
2383         * UIProcess/WebFormClient.cpp:
2384         * UIProcess/WebIconDatabaseClient.cpp:
2385         * UIProcess/WebPageContextMenuClient.cpp:
2386         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2387         * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
2388         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2389         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2390         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2391         * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
2392         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
2393         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2394         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
2395         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
2396         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2397
2398 2014-12-04  Anders Carlsson  <andersca@apple.com>
2399
2400         Make API::String copy the underlying strings if needed, for thread safety
2401         https://bugs.webkit.org/show_bug.cgi?id=139261
2402
2403         Reviewed by Sam Weinig.
2404
2405         * Shared/API/c/WKString.cpp:
2406         (WKStringCreateWithUTF8CString):
2407         (WKStringCreateWithJSString):
2408         (WKStringCopyJSString):
2409         Move the implementations from API::String and directly into the API functions.
2410
2411         * Shared/APIString.h:
2412         Add a create overload that takes an rvalue reference. Call it from the create overload
2413         that takes an lvalue reference, but explicitly copy the string.
2414         We call isolatedCopy() again on the string in the rvalue reference overload, but that is a no-op
2415         if the string can be sent to another thread. Add assertions in the String constructor that we can
2416         send the string to another thread.
2417
2418 2014-12-04  Beth Dakin  <bdakin@apple.com>
2419
2420         Clients disabling action menus sometimes still invoke action menu behaviors
2421         https://bugs.webkit.org/show_bug.cgi?id=139270
2422         -and corresponding-
2423         rdar://problem/19147218
2424
2425         Reviewed by Tim Horton.
2426
2427         By default, we will keep a single item in the action menu up until the point where 
2428         _state == ActionMenuState::Ready. So by checking _state here, we are preventing 
2429         clients from opting out of our choice to wait. Ideally we would always still wait 
2430         for the Ready state, but this will get the best behavior in the mean time.
2431         * UIProcess/mac/WKActionMenuController.mm:
2432         (-[WKActionMenuController _updateActionMenuItems]):
2433
2434 2014-12-04  Antti Koivisto  <antti@apple.com>
2435
2436         REGRESSION (r173468): Cannot step in WebInspector
2437         https://bugs.webkit.org/show_bug.cgi?id=139260
2438
2439         Reviewed by Alexey Proskuryakov.
2440
2441         Inspector defers all loads and starts a nested runloop when it hits a breakpoint. When continuing it undefers the loads.
2442         If the script execution was triggered from the didFinishLoading callback of the main resource then the main resource would
2443         already be in the finished state in the network process side and setDefersLoading(false) message would end up restarting its load.
2444         Since loads are not meant to restart the generated callbacks would assert or crash the web process when handled in the next
2445         nested inspector runloop.
2446
2447         Fix by taking care that cleaned up NetworkResourceLoaders are always removed from the loader map of
2448         the NetworkConnectionToWebProcess and so can't end up handling late messages.
2449
2450         No test, this requires JS debugger to trigger.
2451
2452         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2453         (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):
2454
2455             This is now the only way to remove resource loaders.
2456             It is called from NetworkResourceLoader::cleanup only.
2457
2458         (WebKit::NetworkConnectionToWebProcess::didClose):
2459         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
2460
2461             Calling abort  removes the resource loader (since it calls cleanup) so no need to do it explicitly anymore.
2462
2463         * NetworkProcess/NetworkConnectionToWebProcess.h:
2464         * NetworkProcess/NetworkResourceLoader.cpp:
2465         (WebKit::NetworkResourceLoader::start):
2466
2467             We are guaranteed to be reffed by NetworkConnectionToWebProcess until cleanup so the explicit ref/deref can be removed.
2468
2469         (WebKit::NetworkResourceLoader::cleanup):
2470
2471             Call to NetworkConnectionToWebProcess::didCleanupResourceLoader to make the loader unreachable.
2472
2473         * NetworkProcess/NetworkResourceLoader.h:
2474         (WebKit::NetworkResourceLoader::identifier):
2475
2476 2014-12-04  Timothy Horton  <timothy_horton@apple.com>
2477
2478         Fix the 32-bit build.
2479
2480         * UIProcess/API/mac/WKView.mm:
2481         (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
2482
2483 2014-12-04  Tim Horton  <timothy_horton@apple.com>
2484
2485         TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
2486         https://bugs.webkit.org/show_bug.cgi?id=139252
2487         <rdar://problem/19140827>
2488
2489         Reviewed by Anders Carlsson.
2490
2491         It turns out contentsToScreen requires sync IPC in Mac WebKit2, which we
2492         really don't want to be doing here (especially since the UI process will often
2493         be sitting in waitForAndDispatchImmediately waiting for didPerformActionMenuHitTest).
2494
2495         Go back to keeping TextIndicator rects in "window" coordinates and do the conversion
2496         in each of the WebKits instead of trying to share that code.
2497
2498         * Shared/WebCoreArgumentCoders.cpp:
2499         (IPC::ArgumentCoder<TextIndicatorData>::encode):
2500         (IPC::ArgumentCoder<TextIndicatorData>::decode):
2501         * UIProcess/API/mac/WKView.mm:
2502         (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
2503         * WebProcess/WebPage/FindController.cpp:
2504         (WebKit::FindController::updateFindIndicator):
2505         (WebKit::FindController::drawRect):
2506         Adjust to the WebCore changes.
2507
2508 2014-12-04  Anders Carlsson  <andersca@apple.com>
2509
2510         Simplify StorageManager callback functions
2511         https://bugs.webkit.org/show_bug.cgi?id=139257
2512
2513         Reviewed by Antti Koivisto.
2514
2515         * UIProcess/Storage/StorageManager.cpp:
2516         (WebKit::StorageManager::getOrigins):
2517         (WebKit::StorageManager::getStorageDetailsByOrigin):
2518         (WebKit::callCallbackFunction): Deleted.
2519         (WebKit::StorageManager::getOriginsInternal): Deleted.
2520         (WebKit::StorageManager::getStorageDetailsByOriginInternal): Deleted.
2521         * UIProcess/Storage/StorageManager.h:
2522         * UIProcess/WebKeyValueStorageManager.cpp:
2523         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2524         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
2525         (WebKit::didGetKeyValueStorageOrigins): Deleted.
2526         (WebKit::didGetStorageDetailsByOrigin): Deleted.
2527
2528 2014-12-04  Csaba Osztrogonác  <ossy@webkit.org>
2529
2530         URTBF after r176794.
2531
2532         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2533         (WebKit::fileCreationTime):
2534         (WebKit::fileModificationTime):
2535
2536 2014-12-03  Anders Carlsson  <andersca@apple.com>
2537
2538         Add a way to delete local storage origins modified after a given date
2539         https://bugs.webkit.org/show_bug.cgi?id=139249
2540
2541         Reviewed by Tim Horton.
2542
2543         Also change LocalStorageDatabaseTracker to hold on to WTF::Optional time_t values
2544         instead of treating missing values as zero.
2545
2546         * UIProcess/LocalStorageDetails.h:
2547         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2548         (WebKit::fileCreationTime):
2549         (WebKit::fileModificationTime):
2550         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
2551         (WebKit::LocalStorageDatabaseTracker::details):
2552         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2553         * UIProcess/Storage/StorageManager.cpp:
2554         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
2555         * UIProcess/Storage/StorageManager.h:
2556         * UIProcess/WebKeyValueStorageManager.cpp:
2557         (WebKit::didGetStorageDetailsByOrigin):
2558
2559 2014-12-04  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2560
2561         [EFL][WK2] Add ewk API to allow accepting a specific TLS certificate for a specific host
2562         https://bugs.webkit.org/show_bug.cgi?id=131160
2563
2564         Reviewed by Gyuyoung Kim.
2565
2566         * UIProcess/API/efl/ewk_context.cpp:
2567         (EwkContext::allowSpecificHTTPSCertificateForHost):
2568         (ewk_context_tls_certificate_for_host_allow):
2569         * UIProcess/API/efl/ewk_context.h:
2570         * UIProcess/API/efl/ewk_context_private.h:
2571         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp:
2572
2573 2014-12-03  Commit Queue  <commit-queue@webkit.org>
2574
2575         Unreviewed, rolling out r176457.
2576         https://bugs.webkit.org/show_bug.cgi?id=139247
2577
2578         More iOS breakage (Requested by andersca on #webkit).
2579
2580         Reverted changeset:
2581
2582         "Fix iOS build."
2583         http://trac.webkit.org/changeset/176457
2584
2585 2014-12-03  Beth Dakin  <bdakin@apple.com>
2586
2587         <input> elements get whitespace action menu instead of editable text menu
2588         https://bugs.webkit.org/show_bug.cgi?id=139241
2589         -and corresponding-
2590         rdar://problem/19072083
2591
2592         Reviewed by Sam Weinig.
2593
2594         Add isOverTextInsideFormControlElement to WebHitTestResult.
2595         * Shared/WebHitTestResult.cpp:
2596         (WebKit::WebHitTestResult::Data::Data):
2597         (WebKit::WebHitTestResult::Data::encode):
2598         (WebKit::WebHitTestResult::Data::decode):
2599         * Shared/WebHitTestResult.h:
2600         (WebKit::WebHitTestResult::isOverTextInsideFormControlElement):
2601
2602         Offer the text menus for text inside form controls.
2603         * UIProcess/mac/WKActionMenuController.mm:
2604         (-[WKActionMenuController _defaultMenuItems]):
2605
2606         We should disallow shadow content in the hit test. This is the default and it is 
2607         how context menus behave. We originally wanted to text inside shadow content so 
2608         that we could find the text, but the new function I added to HitTestResult will 
2609         allow that.
2610         * WebProcess/WebPage/mac/WebPageMac.mm:
2611
2612         Adjust to the fact that we don’t hit test shadow content any more.
2613         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2614         (WebKit::WebPage::lookupTextAtLocation):
2615         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
2616
2617 2014-12-03  Commit Queue  <commit-queue@webkit.org>
2618
2619         Unreviewed, rolling out r176489.
2620         https://bugs.webkit.org/show_bug.cgi?id=139242
2621
2622         More iOS breakage (Requested by andersca on #webkit).
2623
2624         Reverted changeset:
2625
2626         "Unreviewed, iOS build fix after r176452."
2627         http://trac.webkit.org/changeset/176489
2628
2629 2014-12-03  Tim Horton  <timothy_horton@apple.com>
2630
2631         Implement action menus for tel: URLs
2632         https://bugs.webkit.org/show_bug.cgi?id=139240
2633         <rdar://problem/19115662>
2634
2635         Reviewed by Anders Carlsson.
2636
2637         * Shared/API/c/WKActionMenuTypes.h:
2638         Add a new type.
2639
2640         * UIProcess/mac/WKActionMenuController.mm:
2641         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
2642         Rename this function as it will work for both mailto and tel URLs.
2643         Adjust it to use contextForView:.
2644
2645         (-[WKActionMenuController _clearActionMenuState]):
2646         (-[WKActionMenuController menuNeedsUpdate:]):
2647         (-[WKActionMenuController _defaultMenuItems]):
2648         Don't check the menu type when going to interact with _currentActionContext.
2649         We'll only have a _currentActionContext if we have a data detected item,
2650         and there are multiple menu types that end up using DDActionContext.
2651
2652 2014-12-03  Commit Queue  <commit-queue@webkit.org>
2653
2654         Unreviewed, rolling out r176452 and r176559.
2655         https://bugs.webkit.org/show_bug.cgi?id=139239
2656
2657         Broke iOS (Requested by andersca on #webkit).
2658
2659         Reverted changesets:
2660
2661         "Remove alignment code from IPC coders"
2662         https://bugs.webkit.org/show_bug.cgi?id=138963
2663         http://trac.webkit.org/changeset/176452
2664
2665         "[WK2] SecComp buildfix after r176452"
2666         https://bugs.webkit.org/show_bug.cgi?id=139081
2667         http://trac.webkit.org/changeset/176559
2668
2669 2014-12-03  Tim Horton  <timothy_horton@apple.com>
2670
2671         Keyboard input should be disabled in the preview popover
2672         https://bugs.webkit.org/show_bug.cgi?id=139219
2673         <rdar://problem/19052381>
2674
2675         Reviewed by Anders Carlsson.
2676
2677         Make sure that keyboard input, Quick Look, etc. are blocked in preview popovers
2678         and WKThumbnailViews. Also block the fake mouseMove events that originate in
2679         the Web process upon scrolling, because we were missing those despite blocking
2680         ordinary mouseMove events.
2681
2682         * UIProcess/API/Cocoa/WKViewPrivate.h:
2683         * UIProcess/API/mac/WKView.mm:
2684         Rename _ignoresNonWheelMouseEvents to _ignoresNonWheelEvents, because it will
2685         apply not only to mouse events but also key events, Quick Look events, menu
2686         preparation events, swipe events, etc.
2687
2688         Add _ignoresAllEvents, which means the same thing as _ignoresNonWheelEvents
2689         with the addition of ignoring scrollWheel events.
2690
2691         (-[WKView scrollWheel:]):
2692         (-[WKView swipeWithEvent:]):
2693         (-[WKView mouseMoved:]):
2694         (-[WKView mouseDown:]):
2695         (-[WKView mouseUp:]):
2696         (-[WKView mouseDragged:]):
2697         Adjust to the new name.
2698
2699         (-[WKView performKeyEquivalent:]):
2700         (-[WKView keyUp:]):
2701         (-[WKView keyDown:]):
2702         (-[WKView flagsChanged:]):
2703         (-[WKView quickLookWithEvent:]):
2704         (-[WKView prepareForMenu:withEvent:]):
2705         (-[WKView willOpenMenu:withEvent:]):
2706         (-[WKView didCloseMenu:withEvent:]):
2707         Block all of these events as well as those we were previously blocking.
2708
2709         (-[WKView _setIgnoresAllEvents:]):
2710         (-[WKView _setIgnoresNonWheelMouseEvents:]):
2711         (-[WKView _setIgnoresNonWheelEvents:]):
2712         (-[WKView _ignoresNonWheelEvents]):
2713         (-[WKView _ignoresAllEvents]):
2714         * UIProcess/API/mac/WKViewInternal.h:
2715         Adjust to the new names and the addition of ignoresAllEvents.
2716
2717         * UIProcess/mac/WKActionMenuController.mm:
2718         (-[WKPagePreviewViewController loadView]):
2719         Adjust to the new name.
2720
2721         (-[WKActionMenuController prepareForMenu:withEvent:]):
2722         Move bailing from prepareForMenu: up to WKView.
2723
2724         * UIProcess/API/Cocoa/WKWebView.mm:
2725         (-[WKWebView _ignoresNonWheelEvents]):
2726         (-[WKWebView _setIgnoresNonWheelEvents:]):
2727         (-[WKWebView _ignoresNonWheelMouseEvents]): Deleted.
2728         (-[WKWebView _setIgnoresNonWheelMouseEvents:]): Deleted.
2729         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2730         Adjust to the new name (without "mouse" in it).
2731
2732         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2733         (-[_WKThumbnailView _viewWasUnparented]):
2734         (-[_WKThumbnailView _viewWasParented]):
2735         Explicitly tell WKView to disable event handling while thumbnailed,
2736         instead of having WKView special-case thumbnail views internally.
2737
2738         * UIProcess/WebPageProxy.cpp:
2739         (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
2740         * UIProcess/WebPageProxy.h:
2741         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2742         (WebKit::WebChromeClient::shouldDispatchFakeMouseMoveEvents):
2743         * WebProcess/WebCoreSupport/WebChromeClient.h:
2744         * WebProcess/WebPage/WebPage.cpp:
2745         (WebKit::WebPage::WebPage):
2746         * WebProcess/WebPage/WebPage.h:
2747         (WebKit::WebPage::shouldDispatchFakeMouseMoveEvents):
2748         (WebKit::WebPage::setShouldDispatchFakeMouseMoveEvents):
2749         * WebProcess/WebPage/WebPage.messages.in:
2750         Plumb shouldDispatchFakeMouseMoveEvents from the UI process to the Web process
2751         and through to WebKit2's ChromeClient implementation.
2752
2753 2014-12-03  Anders Carlsson  <andersca@apple.com>
2754
2755         Remove ENABLE_UI_PROCESS_STORAGE define, it's always 1.
2756
2757         Rubber-stamped by Beth Dakin.
2758
2759         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2760         (WebKit::WebPlatformStrategies::localStorageNamespace):
2761         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
2762         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
2763
2764 2014-12-03  Anders Carlsson  <andersca@apple.com>
2765
2766         Use an @autoreleasepool instead of NSAutoreleasePool.
2767
2768         Rubber-stamped by Tim Horton.
2769
2770         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2771         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2772
2773 2014-12-03  Dan Bernstein  <mitz@apple.com>
2774
2775         REGRESSION(r176687): Caused webkit2 test assertion failure crashes in WebKit::WebPage::willStartDrag()
2776         https://bugs.webkit.org/show_bug.cgi?id=139224
2777
2778         Reviewed by Alexey Proskuryakov.
2779
2780         * WebProcess/WebPage/WebPage.cpp:
2781         (WebKit::WebPage::mouseEventSyncForTesting): Wait for the UI process to start dragging if
2782         needed before handling the event.
2783
2784 2014-12-03  Michael Catanzaro  <mcatanzaro@igalia.com>
2785
2786         [GTK] outdated comment
2787         https://bugs.webkit.org/show_bug.cgi?id=137801
2788
2789         Reviewed by Carlos Garcia Campos.
2790
2791         Remove a comment that is no longer correct.
2792
2793         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
2794
2795 2014-12-02  Conrad Shultz  <conrad_shultz@apple.com>
2796
2797         Don't block menu highlighting when presenting a page preview
2798         https://bugs.webkit.org/show_bug.cgi?id=139217
2799
2800         Reviewed by Tim Horton.
2801
2802         * UIProcess/mac/WKActionMenuController.mm:
2803         (-[WKActionMenuController _previewURLFromActionMenu:]):
2804         Defer popover presentation to the next turn of the runloop.
2805
2806 2014-12-02  Timothy Horton  <timothy_horton@apple.com>
2807
2808         Fix the build.
2809
2810         * UIProcess/mac/WebContextMac.mm:
2811
2812 2014-12-02  Dan Bernstein  <mitz@apple.com>
2813
2814         <rdar://problem/18441138> [iOS] Text selection in WKWebView with WKSelectionGranularityCharacter only works in the most recent WKWebView to load
2815         https://bugs.webkit.org/show_bug.cgi?id=139211
2816
2817         Reviewed by Anders Carlsson.
2818
2819         * UIProcess/ios/WKContentViewInteraction.mm:
2820         (-[WKContentView becomeFirstResponder]): Override to activate the text selection for when
2821         becoming first resopnder.
2822         (-[WKContentView resignFirstResponder]): Deactiavte the text selection when resigning first
2823         responder. This ensures that if another WKWebView becomes first responder, and it uses
2824         block selection, we don’t end up with two active selection views.
2825         (-[WKContentView useSelectionAssistantWithMode:]): Only activate the text selection if this
2826         is the first responder. This ensures that loading content into a non-first-responder
2827         WKWebView doesn‘t deactivate the text selection in the current first responder.
2828
2829 2014-12-02  Alexey Proskuryakov  <ap@apple.com>
2830
2831         http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests
2832         https://bugs.webkit.org/show_bug.cgi?id=139149
2833
2834         Reviewed by Anders Carlsson.
2835
2836         This changes API behavior. I think that it's OK, because existing behavior made no sense.
2837         We used to delete caches from disk, but they were still active in memory. Now we also
2838         obsolete them in memory, so documents that use a cache still work, but new ones don't
2839         pick one up.
2840
2841         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
2842         (WebKit::WebApplicationCacheManager::deleteAllEntries): Use the new WebCore function
2843         that properly deletes caches.
2844
2845 2014-12-02  Tim Horton  <timothy_horton@apple.com>
2846
2847         Remove a SnowLeopard-era quirk for QuickLook
2848         https://bugs.webkit.org/show_bug.cgi?id=139208
2849         <rdar://problem/19121822>
2850
2851         Reviewed by Alexey Proskuryakov.
2852
2853         * Shared/WebProcessCreationParameters.cpp:
2854         (WebKit::WebProcessCreationParameters::encode):
2855         (WebKit::WebProcessCreationParameters::decode):
2856         * Shared/WebProcessCreationParameters.h:
2857         * UIProcess/mac/WebContextMac.mm:
2858         (WebKit::WebContext::platformInitializeWebProcess):
2859         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2860         (WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks): Deleted.
2861         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2862         * WebProcess/WebProcess.cpp:
2863         (WebKit::WebProcess::WebProcess):
2864         * WebProcess/WebProcess.h:
2865         (WebKit::WebProcess::needsQuickLookResourceCachingQuirks): Deleted.
2866         * WebProcess/cocoa/WebProcessCocoa.mm:
2867         (WebKit::WebProcess::platformInitializeWebProcess):
2868
2869 2014-12-02  Beth Dakin  <bdakin@apple.com>
2870
2871         Build fix.
2872
2873         * UIProcess/mac/WKActionMenuController.mm:
2874         (-[WKActionMenuController _defaultMenuItemsForLink]):
2875
2876 2014-12-02  Beth Dakin  <bdakin@apple.com>
2877
2878         More build fix.
2879
2880         * UIProcess/mac/WKActionMenuController.mm:
2881         (-[WKActionMenuController _defaultMenuItemsForLink]):
2882
2883 2014-12-02  Dan Bernstein  <mitz@apple.com>
2884
2885         REGRESSION: Dragging selected text changes the selection
2886         https://bugs.webkit.org/show_bug.cgi?id=139110
2887
2888         Reviewed by Simon Fraser.
2889
2890         After it sent the UI process the message to start dragging, the Web process handled mouse
2891         move events that had already been in flight, interpreting them as a drag to start a new
2892         selection. This is fixed by ignoring any mouse events received after asking the UI process
2893         to start dragging.
2894
2895         * UIProcess/mac/WebPageProxyMac.mm:
2896         (WebKit::WebPageProxy::setDragImage): Send the new DidStartDrag message back to the Web
2897         process, so that it stops ignoring mouse events.
2898
2899         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2900         (WebKit::WebDragClient::startDrag): Call the new WebPage::willStartDrag, so that it starts
2901         ignoring mouse events.
2902
2903         * WebProcess/WebPage/WebPage.cpp:
2904         (WebKit::WebPage::WebPage): Initialize new member variable.
2905         (WebKit::WebPage::mouseEvent): Don’t handle the event if we have asked the UI process to
2906         start dragging.
2907
2908         * WebProcess/WebPage/WebPage.h:
2909         (WebKit::WebPage::willStartDrag): Added. Sets new member variable m_isStartingDrag to true.
2910         (WebKit::WebPage::didStartDrag): Added. Handles the message from the UI process by setting
2911         m_isStartingDrag back to false.
2912
2913         * WebProcess/WebPage/WebPage.messages.in: Added DidStartDrag.
2914
2915 2014-12-02  Beth Dakin  <bdakin@apple.com>
2916
2917         Should use standardQuickLookMenuItem for apps that don't implement customizations
2918         https://bugs.webkit.org/show_bug.cgi?id=139193
2919         -and corresponding-
2920         rdar://problem/18944696
2921
2922         Reviewed by Anders Carlsson.
2923
2924         New SPI will allow clients to opt-out of the standardQuickLookMenuItem. By 
2925         default, opt in.
2926         * UIProcess/API/Cocoa/WKViewPrivate.h:
2927         * UIProcess/API/mac/WKView.mm:
2928         (-[WKView _shouldUseStandardQuickLookPreview]):
2929         * UIProcess/mac/WKActionMenuController.mm:
2930
2931         Use [NSMenuItem standardQuickLookMenuItem] unless the client has requested 
2932         otherwise.
2933         (-[WKActionMenuController _defaultMenuItemsForLink]):
2934
2935         Delegate methods to set up the standardQuickLookMenuItem.
2936         (-[WKActionMenuController menuItem:viewAtScreenPoint:]):
2937         (-[WKActionMenuController menuItem:previewItemAtPoint:]):
2938         (-[WKActionMenuController menuItem:preferredEdgeForPoint:]):
2939
2940 2014-12-02  Tim Horton  <timothy_horton@apple.com>
2941
2942         TextIndicator can get stuck (especially if we don't get LUNotificationPopoverWillClose when we should)
2943         https://bugs.webkit.org/show_bug.cgi?id=139175
2944         <rdar://problem/19072236>
2945
2946         Reviewed by Beth Dakin.
2947
2948         * UIProcess/API/mac/WKView.mm:
2949         (-[WKView scrollWheel:]):
2950         (-[WKView mouseDown:]):
2951         Work around <rdar://problem/19086993> by always explicitly clearing the
2952         active text indicator in mouseDown: and scrollWheel:.
2953         This way, even if you manage to get a text indicator that outlives the
2954         Look Up popover (or find-in-page, or whatever), it will be dismissed
2955         by clicking or scrolling the view.
2956
2957 2014-12-02  Anders Carlsson  <andersca@apple.com>
2958
2959         Remove visited link handling from PageGroup
2960         https://bugs.webkit.org/show_bug.cgi?id=139185
2961
2962         Reviewed by Sam Weinig.
2963
2964         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2965         (WebKit::WebChromeClient::populateVisitedLinks): Deleted.
2966         * WebProcess/WebCoreSupport/WebChromeClient.h:
2967
2968 2014-12-01  Anders Carlsson  <andersca@apple.com>
2969
2970         Remove WKBundleRemoveAllVisitedLinks
2971         https://bugs.webkit.org/show_bug.cgi?id=139163
2972
2973         Reviewed by Sam Weinig.
2974
2975         WKBundleRemoveAllVisitedLinks has been a no-op since at least Yosemite; get rid of it.
2976
2977         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2978         (WKBundleRemoveAllVisitedLinks): Deleted.
2979         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2980         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2981         (WebKit::InjectedBundle::removeAllVisitedLinks): Deleted.
2982         * WebProcess/InjectedBundle/InjectedBundle.h:
2983
2984 2014-12-02  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2985
2986         Fix class was previously declared as a struct warnings
2987         https://bugs.webkit.org/show_bug.cgi?id=139131
2988
2989         Reviewed by Csaba Osztrogonác.
2990
2991         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
2992         * UIProcess/CoordinatedGraphics/WebViewClient.h:
2993
2994 2014-12-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2995
2996         [EFL] ewk_view_scale_set() doesn't work correctly
2997         https://bugs.webkit.org/show_bug.cgi?id=139109
2998
2999         Reviewed by Csaba Osztrogonác.
3000
3001         When ewk_view_scale_set() is called, it has only updated a scale factor which is maintained by WebPageProxy.
3002         It causes WebPageProxy unsynchronized with PageViewportController's scale factor. That's why wrong scale
3003         behavior has occured through ewk_view_scale_set(). Besides zooming has similar problem as well.
3004
3005         Thus this patch updates m_pageScaleFactor of PageViewportController as well as prohibits to change the scale
3006         factor through viewport meta tag update. Because ewk_view_scale_set() means that user wants to set a specific
3007         value to scale factor of current viewport.
3008
3009         * UIProcess/API/efl/EwkView.cpp:
3010         (EwkView::updateScaleToPageViewportController):
3011             Set m_initiallyFitToViewport to false. And call didChangeContentsVisibility() with new scale and scale position.
3012
3013         * UIProcess/API/efl/EwkView.h:
3014         * UIProcess/API/efl/ewk_view.cpp:
3015         (ewk_view_scale_set):
3016         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3017         (TEST_F):
3018         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
3019         (WebKit::PageViewportController::didCommitLoad):
3020             Set m_initiallyFitToViewport to true in order to fit content to viewport size by default.
3021             Initizlize content position with (0, 0).
3022
3023         (WebKit::PageViewportController::pageTransitionViewportReady):
3024            Do not update scale when m_initiallyFitToViewport is false.
3025
3026         (WebKit::PageViewportController::syncVisibleContents):
3027            Return false when syncVisibleContents is failed.
3028
3029         (WebKit::PageViewportController::didChangeViewportAttributes):
3030            Do not update scale when m_initiallyFitToViewport is false.
3031
3032         (WebKit::PageViewportController::applyScaleAfterRenderingContents):
3033             If syncVisibleContents() is failed, m_pageScaleFactor should be restored with previous value.
3034             If not, new scale factor isn't applied though, PageViewportController uses it as own scale factor.
3035
3036         (WebKit::PageViewportController::updateMinimumScaleToFit):
3037            Do not update scale when m_initiallyFitToViewport is false or m_hadUserInteraction is true.
3038
3039         * UIProcess/CoordinatedGraphics/PageViewportController.h:
3040         (WebKit::PageViewportController::setInitiallyFitToViewport):
3041
3042 2014-11-20  Jeffrey Pfau  <jpfau@apple.com>
3043
3044         Add cancelable version of willSendRequest
3045         https://bugs.webkit.org/show_bug.cgi?id=138987
3046
3047         Reviewed by Anders Carlsson.
3048
3049         * WebProcess/Network/WebResourceLoader.cpp:
3050         (WebKit::WebResourceLoader::willSendRequest):
3051
3052 2014-12-01  Conrad Shultz  <conrad_shultz@apple.com>
3053
3054         Clients need a way to explicitly set the title of a page preview
3055         https://bugs.webkit.org/show_bug.cgi?id=139161
3056
3057         Reviewed by Beth Dakin.
3058
3059         This implicitly assumes that only one page preview can be associate with a given WKView at a time.
3060
3061         * UIProcess/API/Cocoa/WKViewPrivate.h:
3062         * UIProcess/API/mac/WKView.mm:
3063         (-[WKView _setPreviewTitle:]):
3064         Wrap -[WKActionMenuController setPreviewTitle:]
3065
3066         * UIProcess/mac/WKActionMenuController.h:
3067         * UIProcess/mac/WKActionMenuController.mm:
3068         Add ivars for the title and the title text field (previously not independently exposed).
3069         (-[WKPagePreviewViewController previewTitle]):
3070         Accessor.
3071         (-[WKPagePreviewViewController setPreviewTitle:]):
3072         Accessor; set the text field's string value.
3073         (-[WKPagePreviewViewController loadView]):
3074         Adopt the _titleTextField ivar; assume that if a client has explicitly set the previewTitle then we don't
3075         need to ask for it again.
3076         (-[WKActionMenuController setPreviewTitle:]):
3077         Wrap -[WKPagePreviewViewController setPreviewTitle:].
3078
3079 2014-12-01  Anders Carlsson  <andersca@apple.com>
3080
3081         Make WebKit2 work slightly better with garbage collection
3082         https://bugs.webkit.org/show_bug.cgi?id=139159
3083         <rdar://problem/19108390>
3084
3085         Reviewed by Dan Bernstein.
3086
3087         * Shared/Cocoa/APIObject.mm:
3088         (API::Object::ref):
3089         (API::Object::deref):
3090         Call CFRetain/CFRelease to prevent the memory from being collected.
3091
3092         (API::Object::newObject):
3093         Call CFRetain under GC so we'll prevent memory from being collected prematurely.
3094
3095 2014-12-01  Tim Horton  <timothy_horton@apple.com>
3096
3097         Implement yellow highlight for WebKit1 data detectors
3098         https://bugs.webkit.org/show_bug.cgi?id=138956
3099         <rdar://problem/18992185>
3100
3101         Reviewed by Beth Dakin.
3102
3103         * Shared/WebCoreArgumentCoders.cpp:
3104         (IPC::ArgumentCoder<TextIndicatorData>::encode):
3105         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3106         * WebProcess/WebPage/FindController.cpp:
3107         (WebKit::FindController::updateFindIndicator):
3108         (WebKit::FindController::drawRect):
3109         Adjust to the fact that TextIndicator keeps screen-relative rects.
3110
3111 2014-12-01  Anders Carlsson  <andersca@apple.com>
3112
3113         Remove old site specific quirks code that was added in 2009
3114         https://bugs.webkit.org/show_bug.cgi?id=139141
3115
3116         Reviewed by Antti Koivisto.
3117
3118         * NetworkProcess/RemoteNetworkingContext.h:
3119         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3120         (WebKit::RemoteNetworkingContext::needsSiteSpecificQuirks): Deleted.
3121         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3122         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3123         (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks): Deleted.
3124
3125 2014-12-01  Joseph Pecoraro  <pecoraro@apple.com>
3126
3127         Web Inspector: Crash in WebInspectorClient::hideHighlight when page is destroyed
3128         https://bugs.webkit.org/show_bug.cgi?id=139136
3129
3130         Reviewed by Simon Fraser.
3131
3132         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3133         (WebKit::WebInspectorClient::hideHighlight):
3134         Speculatively fix by null-checking the main frame which
3135         can be null during page destruction.
3136
3137 2014-11-30  Jaehun Lim  <ljaehun.lim@samsung.com>
3138
3139         [EFL] Add eldbus to the library list
3140         https://bugs.webkit.org/show_bug.cgi?id=139120
3141
3142         Reviewed by Gyuyoung Kim.
3143
3144         Fix undefined reference errors for eldbus APIs.
3145
3146         * PlatformEfl.cmake:
3147
3148 2014-11-29  Anders Carlsson  <andersca@apple.com>
3149
3150         Crash when calling WKPageClose on the originated page from within createNewPage callback
3151         https://bugs.webkit.org/show_bug.cgi?id=139099
3152         <rdar://problem/19052564>
3153
3154         Reviewed by Sam Weinig.
3155
3156         Null check the namespace ID.
3157
3158         * UIProcess/Storage/StorageManager.cpp:
3159         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
3160
3161 2014-11-28  Tim Horton  <timothy_horton@apple.com>
3162
3163         Stale userData is handed to WKView _actionMenuItemsForHitTestResult under prepareForMenu
3164         https://bugs.webkit.org/show_bug.cgi?id=139069
3165         <rdar://problem/19075587>
3166
3167         Reviewed by Sam Weinig.
3168
3169         * UIProcess/mac/WKActionMenuController.mm:
3170         (-[WKActionMenuController wkView:willHandleMouseDown:]):
3171         (-[WKActionMenuController didCloseMenu:withEvent:]):
3172         (-[WKActionMenuController _clearActionMenuState]):
3173         Previously, _userData was not being cleared in didCloseMenu, so a subsequent
3174         action menu invocation would end up sending stale userData to _actionMenuItemsForHitTestResult.
3175
3176         Additionally, factor all of the cleanup code out into _clearActionMenuState,
3177         and call it from both wkView:willHandleMouseDown: and didCloseMenu:withEvent:.
3178
3179 2014-11-26  Timothy Horton  <timothy_horton@apple.com>
3180
3181         DataDetectors PageOverlay callbacks are never called
3182         https://bugs.webkit.org/show_bug.cgi?id=139067
3183         <rdar://problem/19086676>
3184
3185         Reviewed by Anders Carlsson.
3186
3187         * Shared/mac/ActionMenuHitTestResult.mm:
3188         (WebKit::ActionMenuHitTestResult::encode):
3189         (WebKit::ActionMenuHitTestResult::decode):
3190         Encode/decode the PageOverlay ID.
3191
3192 2014-11-28  Simon Fraser  <simon.fraser@apple.com>
3193
3194         Allow clients of the WKRenderLayerRef C SPI to connect layer trees across frame boundaries
3195         https://bugs.webkit.org/show_bug.cgi?id=139021
3196
3197         Reviewed by Dan Bernstein.
3198         
3199         Add WKRenderLayerGetFrameContentsLayer which returns a WKRenderLayerRef for
3200         the content document of a RenderWidget, if its has one (e.g. frames, iframes
3201         and <object> with document contents).
3202
3203         * Shared/API/c/WKRenderLayer.cpp:
3204         (WKRenderLayerGetFrameContentsLayer):
3205         * Shared/API/c/WKRenderLayer.h:
3206         * Shared/UserMessageCoders.h:
3207         (WebKit::UserMessageEncoder::baseEncode):
3208         (WebKit::UserMessageDecoder::baseDecode):
3209         * Shared/WebRenderLayer.cpp:
3210         (WebKit::WebRenderLayer::create):
3211         (WebKit::WebRenderLayer::WebRenderLayer):
3212         * Shared/WebRenderLayer.h:
3213         (WebKit::WebRenderLayer::frameContentsLayer):
3214
3215 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
3216
3217         [WK2] SecComp buildfix after r176452
3218         https://bugs.webkit.org/show_bug.cgi?id=139081
3219
3220         Reviewed by Antti Koivisto.
3221
3222         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
3223         (WebKit::SeccompBrokerClient::dispatch):
3224         (WebKit::SeccompBroker::runLoop):
3225
3226 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
3227
3228         Fix -Wc++11-narrowing error in SeccompFilters.cpp
3229         https://bugs.webkit.org/show_bug.cgi?id=139079
3230
3231         Reviewed by Carlos Garcia Campos.
3232
3233         * Shared/linux/SeccompFilters/SeccompFilters.cpp:
3234         (WebKit::SeccompFilters::addRule):
3235         * Shared/linux/SeccompFilters/SeccompFilters.h:
3236
3237 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
3238
3239         [WK2] SecComp buildfix after r168605 and r168999
3240         https://bugs.webkit.org/show_bug.cgi?id=139080
3241
3242         Reviewed by Carlos Garcia Campos.
3243
3244         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
3245         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
3246
3247 2014-11-27  Ryuan Choi  <ryuan.choi@navercorp.com>
3248
3249         [EFL] Remove E_Dbus dependency
3250         https://bugs.webkit.org/show_bug.cgi?id=136355
3251
3252         Reviewed by Gyuyoung Kim.
3253
3254         * UIProcess/API/efl/ewk_main.cpp: Added init/shutdown for eldbus.
3255         (WebKit::EwkMain::initialize):
3256         (WebKit::EwkMain::finalize):
3257         (WebKit::EwkMain::shutdownInitializedEFLModules):
3258
3259 2014-11-25  Anders Carlsson  <andersca@apple.com>
3260
3261         Remove user content handling from PageGroup
3262         https://bugs.webkit.org/show_bug.cgi?id=139051
3263
3264         Reviewed by Antti Koivisto.
3265
3266         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3267         (WebKit::InjectedBundle::addUserScript):
3268         (WebKit::InjectedBundle::addUserStyleSheet):
3269         (WebKit::InjectedBundle::removeUserScript):
3270         (WebKit::InjectedBundle::removeUserStyleSheet):
3271         (WebKit::InjectedBundle::removeUserScripts):
3272         (WebKit::InjectedBundle::removeUserStyleSheets):
3273         (WebKit::InjectedBundle::removeAllUserContent):
3274         Talk to the user content controller from the passed in WebPageGroupProxy.
3275
3276         * WebProcess/WebPage/WebPage.cpp:
3277         (WebKit::WebPage::WebPage):
3278         Create the WebPageGroupProxy before creating the page so we can get its user content controller and
3279         pass it to the page configuration if necessary.
3280         
3281         * WebProcess/WebPage/WebPageGroupProxy.cpp:
3282         (WebKit::WebPageGroupProxy::userContentController):
3283         New function that lazily creates a user content controller. We don't want to create this eagerly since
3284         it's not used with the modern API.
3285
3286         (WebKit::WebPageGroupProxy::addUserStyleSheet):
3287         (WebKit::WebPageGroupProxy::addUserScript):
3288         (WebKit::WebPageGroupProxy::removeAllUserStyleSheets):
3289         (WebKit::WebPageGroupProxy::removeAllUserScripts):
3290         (WebKit::WebPageGroupProxy::removeAllUserContent):
3291         Call through to the user content controller.
3292
3293         * WebProcess/WebPage/WebPageGroupProxy.h:
3294         Add an m_userContentController member.
3295
3296 2014-11-25  Ting-Wei Lan  <lantw44@gmail.com>
3297
3298         [GTK] Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built
3299         version of libraries when running the temporary executable
3300         https://bugs.webkit.org/show_bug.cgi?id=138833
3301
3302         Reviewed by Carlos Garcia Campos.
3303
3304         This patch modifies LD_LIBRARY_PATH to make sure the dynamic linker
3305         find the correct version of libraries when running the temporary
3306         executable to generate the .gir file.
3307
3308         * PlatformGTK.cmake:
3309
3310 2014-11-25  Csaba Osztrogonác  <ossy@webkit.org>
3311
3312         [EFL] REGRESSION(r176514): It made performance tests fail
3313         https://bugs.webkit.org/show_bug.cgi?id=139037
3314
3315         Reviewed by Gyuyoung Kim.
3316
3317         * WebProcess/efl/WebProcessMainEfl.cpp: Don't try to load/shutdown eail if eailLibraryPath() is empty.
3318
3319 2014-11-24  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
3320
3321         Remove Qt cruft related to tap higlighting
3322         https://bugs.webkit.org/show_bug.cgi?id=139030
3323
3324         Reviewed by Andreas Kling.
3325
3326         * CMakeLists.txt:
3327         * WebProcess/WebPage/TapHighlightController.cpp: Removed.
3328         * WebProcess/WebPage/TapHighlightController.h: Removed.
3329
3330 2014-11-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3331
3332         Unreviewed, EFL build fix since r176530.
3333
3334         * UIProcess/CoordinatedGraphics/WebView.cpp: Replace pointer with reference.
3335         (WebKit::WebView::processDidExit):
3336
3337 2014-11-24  Benjamin Poulain  <bpoulain@apple.com>
3338
3339         [WK2] Remove some bad stuff from WebPageProxy
3340         https://bugs.webkit.org/show_bug.cgi?id=138896
3341
3342         Reviewed by Sam Weinig.
3343
3344         The state loadStateAtProcessExit does not seem to be used anywhere.
3345
3346         The state urlAtProcessExit only exists to forward the url from
3347         WebPageProxy::resetStateAfterProcessExited() to the coordinated graphics code
3348         WebView::processDidExit().
3349
3350         * UIProcess/CoordinatedGraphics/WebView.cpp:
3351         (WebKit::WebView::processDidExit):
3352         * UIProcess/WebPageProxy.cpp:
3353         (WebKit::WebPageProxy::WebPageProxy):
3354         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3355         * UIProcess/WebPageProxy.h:
3356         (WebKit::WebPageProxy::urlAtProcessExit): Deleted.
3357         (WebKit::WebPageProxy::loadStateAtProcessExit): Deleted.
3358
3359 2014-11-24  Ryuan Choi  <ryuan.choi@navercorp.com>
3360
3361         [EFL] REGRESSION(176066): It made all performance tests fail
3362         https://bugs.webkit.org/show_bug.cgi?id=138865
3363
3364         Reviewed by Csaba Osztrogonác.
3365
3366         Since r176066, there are crash because evas_gl_surface is destroyed with
3367         invalid evas_gl instance after evas_gl is destroyed.
3368
3369         * UIProcess/API/efl/EwkView.cpp:
3370         (EwkView::~EwkView):
3371
3372 2014-11-24  Alberto Garcia  <berto@igalia.com>
3373
3374         Webkit2 doesnt build on powerpc 32 bits
3375         https://bugs.webkit.org/show_bug.cgi?id=130837
3376
3377         Reviewed by Carlos Garcia Campos.
3378
3379         Check if libatomic is needed in order to use std::atomic, and add
3380         it to the list of WebKit2 libraries.
3381
3382         * PlatformGTK.cmake:
3383
3384 2014-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3385
3386         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.2 release.
3387
3388         * gtk/NEWS: Add release notes for 2.7.2.
3389
3390 2014-11-24  Krzysztof Czech  <k.czech@samsung.com>
3391
3392         [EFL] Utilize Eail library to support accessibility in EFL
3393         https://bugs.webkit.org/show_bug.cgi?id=137742
3394
3395         Reviewed by Gyuyoung Kim.
3396
3397         Initialize EAIL module so that all the listeners and atk-bridge started properly.
3398         Dynamic loading of EAIL help us to avoid elementary dependencies in WebKit.
3399
3400         * WebProcess/efl/WebProcessMainEfl.cpp:
3401         (eailLibraryPath): reads path provided by ACCESSIBILITY_EAIL_LIBRARY_PATH variable.
3402         (eail):
3403
3404 2014-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3405
3406         [GTK] WebKitWebView is created with the wrong web context when using webkit_web_view_new_with_related_view()
3407         https://bugs.webkit.org/show_bug.cgi?id=139023
3408
3409         Reviewed by Sergio Villar Senin.
3410
3411         The WebKitWebContext is a construct only property, so it's always
3412         set to the default value when not provided, during the
3413         construction. When a related-view is used to create a new web view
3414         we should ensure that the same web context is used for the new web
3415         view, instead of the default. We should also ignore any web
3416         context given as construct parameter if a related view is alos provided.
3417
3418         * UIProcess/API/gtk/WebKitWebView.cpp:
3419         (webkitWebViewConstructed): Do not set the context to the default
3420         one when not given during construction.
3421         (webkitWebViewSetProperty): Only use the default web context when
3422         not provided as construct parameter and there isn't a related view.
3423
3424 2014-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3425
3426         [GTK] Add API to override the default local storage directory
3427         https://bugs.webkit.org/show_bug.cgi?id=138828
3428
3429         Reviewed by Gustavo Noronha Silva.
3430
3431         Add WebKitWebContext:local-storage-directory construct-only
3432         property. If not provided the default will be used.
3433
3434         * UIProcess/API/gtk/WebKitWebContext.cpp:
3435         (webkitWebContextGetProperty):
3436         (webkitWebContextSetProperty):
3437         (webkitWebContextConstructed):
3438         (webkit_web_context_class_init):
3439
3440 2014-11-23  Conrad Shultz  <conrad_shultz@apple.com>
3441
3442         Page previews should have titles
3443         https://bugs.webkit.org/show_bug.cgi?id=139020
3444
3445         Reviewed by Tim Horton.
3446
3447         * UIProcess/API/Cocoa/WKViewPrivate.h:
3448         Declare -_titleForPreviewOfURL:.
3449
3450         * UIProcess/API/mac/WKView.mm:
3451         (-[WKView _titleForPreviewOfURL:]):
3452         Stub implementation.
3453
3454         * UIProcess/mac/WKActionMenuController.mm:
3455         (+[WKPagePreviewViewController previewPadding]):
3456         Account for the title height.
3457         (-[WKPagePreviewViewController loadView]):
3458         Set correct autoresize masks on some views; create and configure a title view that is
3459         horizontally and vertically centered.
3460         (-[WKActionMenuController pagePreviewViewController:titleForPreviewOfURL:]):
3461         WKPagePreviewViewControllerDelegate method; wrap -[WKView _titleForPreviewOfURL:].
3462
3463 2014-11-22  Simon Fraser  <simon.fraser@apple.com>
3464
3465         Extend WKRenderObject and WKRenderLayer with some more useful data
3466         https://bugs.webkit.org/show_bug.cgi?id=139006
3467
3468         Reviewed by Sam Weinig.
3469         
3470         Implement WKRenderLayerGetBackingStoreMemoryEstimate,
3471         WKRenderObjectCopyTextSnippet and WKRenderObjectGetTextLength for improved
3472         RenderLayer and RenderTree display in clients of the C SPI.        
3473
3474         * Shared/API/c/WKRenderLayer.cpp:
3475         (WKRenderLayerGetBackingStoreMemoryEstimate):
3476         * Shared/API/c/WKRenderLayer.h:
3477         * Shared/API/c/WKRenderObject.cpp:
3478         (WKRenderObjectCopyTextSnippet):
3479         (WKRenderObjectGetTextLength):
3480         * Shared/API/c/WKRenderObject.h:
3481         * Shared/UserMessageCoders.h:
3482         (WebKit::UserMessageEncoder::baseEncode):
3483         (WebKit::UserMessageDecoder::baseDecode):
3484         * Shared/WebRenderLayer.cpp:
3485         (WebKit::WebRenderLayer::create):
3486         (WebKit::WebRenderLayer::WebRenderLayer):
3487         * Shared/WebRenderLayer.h:
3488         (WebKit::WebRenderLayer::backingStoreMemoryEstimate):
3489         * Shared/WebRenderObject.cpp:
3490         (WebKit::WebRenderObject::create):
3491         (WebKit::WebRenderObject::WebRenderObject):
3492         * Shared/WebRenderObject.h:
3493         (WebKit::WebRenderObject::textSnippet):
3494         (WebKit::WebRenderObject::textLength):
3495
3496 2014-11-21  Jer Noble  <jer.noble@apple.com>
3497
3498         Support multiple signatures of diagnostic logging.
3499         https://bugs.webkit.org/show_bug.cgi?id=138690
3500
3501         Reviewed by Anders Carlsson.
3502
3503         Extend the existing WKBundlePageDiagnosticLoggingClient interface by deprecating
3504         the original logDiagnosticMessage client method in V1 and adding three new,
3505         explicit client methods.
3506
3507         * CMakeLists.txt:
3508         * WebKit2.xcodeproj/project.pbxproj:
3509         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
3510         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
3511         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageDeprecated):
3512             Renamed from logDiagnosticMessage().
3513         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Pass to the client.
3514         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageWithResult): Ditto.
3515         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageWithValue): Ditto.
3516         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
3517         * WebProcess/WebCoreSupport/WebChromeClient.h:
3518         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3519         (WebKit::WebChromeClient::logDiagnosticMessage): Deleted.
3520         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp: Added.
3521         (WebKit::WebDiagnosticLoggingClient::WebDiagnosticLoggingClient): Simple constructor.
3522         (WebKit::WebDiagnosticLoggingClient::~WebDiagnosticLoggingClient): Simple destructor.
3523         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage): Pass to the injected bundle.
3524         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult): Ditto.
3525         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue): Ditto.
3526         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h: Added.
3527         * WebProcess/WebPage/WebPage.cpp:
3528         (WebKit::WebPage::WebPage): Initialize the new client.
3529
3530 2014-11-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3531
3532         Unreviewed, EFL build fix since r176459.
3533
3534         r176459 removed Timer parameter in timer callbacks only for Mac port.
3535         So this patch applies it to remaining classes for EFL port.
3536
3537         * UIProcess/API/efl/EwkView.cpp:
3538         (EwkView::EwkView):
3539         (EwkView::displayTimerFired):
3540         * UIProcess/API/efl/EwkView.h:
3541         * UIProcess/efl/TextCheckerClientEfl.cpp:
3542         (TextCheckerClientEfl::TextCheckerClientEfl):
3543         (TextCheckerClientEfl::languagesUpdateTimerFired):
3544         (TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
3545         * UIProcess/efl/TextCheckerClientEfl.h:
3546         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3547         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3548         (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
3549         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3550
3551 2014-11-21  Chris Dumez  <cdumez@apple.com>
3552
3553         Unreviewed, iOS build fix after r176462.
3554
3555         Fix include path to TextIndicator.h to include WebCore/
3556         as it was moved.
3557
3558         * UIProcess/ios/PageClientImplIOS.mm:
3559
3560 2014-11-21  Chris Dumez  <cdumez@apple.com>
3561
3562         Unreviewed, iOS build fix after r176452.
3563
3564         dencodeFixedLengthData() now only takes 2 arguments instead of
3565         3.
3566
3567         * Shared/ios/QuickLookDocumentData.cpp:
3568         (WebKit::QuickLookDocumentData::decode):
3569
3570 2014-11-21  Zalan Bujtas  <zalan@apple.com>
3571
3572         Simple line layout: Add "show simple line layout debug borders" setting to MiniBrowser.
3573         https://bugs.webkit.org/show_bug.cgi?id=138981
3574
3575         Reviewed by Simon Fraser.
3576
3577         * UIProcess/API/Cocoa/WKPreferences.mm:
3578         (-[WKPreferences _simpleLineLayoutDebugBordersEnabled]):
3579         (-[WKPreferences _setSimpleLineLayoutDebugBordersEnabled:]):
3580         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3581
3582 2014-11-21  Eric Carlson  <eric.carlson@apple.com>
3583
3584         WebVideoFullscreenManagerProxy must clear pointers when invalidated
3585         https://bugs.webkit.org/show_bug.cgi?id=138982
3586
3587         Reviewed by Jer Noble.
3588
3589         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3590         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy): Call invalidate.
3591         (WebKit::WebVideoFullscreenManagerProxy::invalidate): Set WebVideoFullscreenModel and
3592             WebVideoFullscreenChangeObserver to NULL.
3593
3594 2014-11-21  Timothy Horton  <timothy_horton@apple.com>
3595
3596         Fix the build.
3597
3598         * UIProcess/API/mac/WKView.mm:
3599         (-[WKView mouseDown:]):
3600
3601 2014-11-21  Beth Dakin  <bdakin@apple.com>
3602
3603         The preview action menu item should not have a title
3604         https://bugs.webkit.org/show_bug.cgi?id=138989
3605         -and corresponding-
3606         rdar://problem/19061959
3607
3608         Reviewed by Anders Carlsson.
3609
3610         * UIProcess/mac/WKActionMenuController.mm:
3611         (-[WKActionMenuController _createActionMenuItemForTag:]):
3612
3613 2014-11-21  Conrad Shultz  <conrad_shultz@apple.com>
3614
3615         Page previews should have a margin.
3616         https://bugs.webkit.org/show_bug.cgi?id=138990
3617
3618         Reviewed by Beth Dakin.
3619
3620         Enclose the WKWebView (or client-supplied preview view) in a container slightly larger
3621         than the preview view. Adjust sizing code to accommodate the margin.
3622
3623         * UIProcess/mac/WKActionMenuController.mm:
3624         (+[WKPagePreviewViewController previewPadding]):
3625         Return the total amount of fixed padding surrounding the preview
3626         (-[WKPagePreviewViewController loadView]):
3627         Store the actual previewView in an ivar so that clients can distinguish it from the container
3628         view; wrap the preview in a container view; set frames appropriately.
3629         (-[WKActionMenuController _createPreviewPopover]):
3630         Update to reflect method rename; supplement the popover size with the fixed padding.
3631         (-[WKActionMenuController _preferredPopoverSizeWithPreviewPadding:]):
3632         Renamed from -_preferredPopoverSize; account for the fixed padding when computing the preferred size.
3633         (-[WKActionMenuController _clearPreviewPopover]):
3634         Use the previewView ivar instead of the view controller's view.
3635         (-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
3636         Ditto.
3637         (-[WKActionMenuController _preferredPopoverSize]): Deleted.
3638
3639 2014-11-21  Tim Horton  <timothy_horton@apple.com>
3640
3641         REGRESSION (r176415): Can get stuck, unable to invoke any DataDetectors popovers
3642         https://bugs.webkit.org/show_bug.cgi?id=138955
3643         <rdar://problem/19056442>
3644
3645         Reviewed by Anders Carlsson.
3646
3647         * UIProcess/API/mac/WKView.mm:
3648         (-[WKView mouseDown:]):
3649         * UIProcess/mac/WKActionMenuController.h:
3650         * UIProcess/mac/WKActionMenuController.mm:
3651         (-[WKActionMenuController wkView:willHandleMouseDown:]):
3652         (-[WKActionMenuController didCloseMenu:withEvent:]):
3653         (-[WKActionMenuController menuNeedsUpdate:]):
3654         Keep track of whether we have called shouldUseActionsWithContext: on a
3655         DDActionContext; if we get a mouseDown without having seen didCloseMenu:
3656         (and thus don't properly pair the shouldUseActionsWithContext: with a didUseActions),
3657         tear down the old DDActionContext before proceeding.
3658
3659 2014-11-21  Tim Horton  <timothy_horton@apple.com>
3660
3661         REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
3662         ​https://bugs.webkit.org/show_bug.cgi?id=138960
3663         <rdar://problem/19056715>
3664
3665         Reviewed by Anders Carlsson.
3666
3667         * UIProcess/mac/WKActionMenuController.mm:
3668         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3669         (-[WKActionMenuController _defaultMenuItemsForMailtoLink]): Deleted.
3670         Use DataDetectors SPI instead of an explicit blacklist.
3671
3672 2014-11-21  Tim Horton  <timothy_horton@apple.com>
3673
3674         Crashes while encoding a TextIndicator with no contentImageWithHighlight
3675         https://bugs.webkit.org/show_bug.cgi?id=138984
3676         <rdar://problem/19063717>
3677
3678         Reviewed by Sam Weinig.
3679
3680         * Shared/WebCoreArgumentCoders.cpp:
3681         (IPC::ArgumentCoder<TextIndicatorData>::encode):
3682         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3683         encodeImage doesn't deal with null images, so handle that case gracefully.
3684
3685 2014-11-21  Tim Horton  <timothy_horton@apple.com>
3686
3687         REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
3688         https://bugs.webkit.org/show_bug.cgi?id=138960
3689         <rdar://problem/19056715>
3690
3691         Reviewed by Beth Dakin.
3692
3693         * UIProcess/mac/WKActionMenuController.mm:
3694         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3695         Blacklist contact results, because they don't have useful menus. If we
3696         bail before setting up _currentActionContext, we'll still allow fallthrough
3697         to ordinary text actions, avoiding mysterious failure when a contact is detected.
3698
3699         This doesn't break the case that r176351 was intended to fix,
3700         because in that case we were detecting e.g. addresses.
3701
3702 2014-11-21  Tim Horton  <timothy_horton@apple.com>
3703
3704         Move TextIndicator{Window} to WebCore
3705         https://bugs.webkit.org/show_bug.cgi?id=138954
3706         <rdar://problem/18992185>
3707
3708         Some adjustments by Csaba Osztrogonác.
3709         Reviewed by Anders Carlsson.
3710
3711         * CMakeLists.txt:
3712         Remove TextIndicator.cpp.
3713
3714         * Scripts/webkit/messages.py:
3715         (struct_or_class):
3716         (headers_for_type):
3717         Tell messages.py that TextIndicatorData is a struct, and comes from TextIndicator.h.
3718
3719         * Shared/WebCoreArgumentCoders.h:
3720         * Shared/WebCoreArgumentCoders.cpp:
3721         (IPC::ArgumentCoder<TextIndicatorData>::encode):
3722         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3723         Add argument coders for TextIndicatorData.
3724
3725         * Shared/DictionaryPopupInfo.h:        
3726         * Shared/mac/ActionMenuHitTestResult.h:
3727         * Shared/mac/ActionMenuHitTestResult.mm:
3728         * UIProcess/API/gtk/PageClientImpl.h:
3729         * UIProcess/API/gtk/PageClientImpl.cpp:
3730         * UIProcess/API/mac/WKView.mm:
3731         * UIProcess/API/mac/WKViewInternal.h:
3732         * UIProcess/CoordinatedGraphics/WebView.h:
3733         * UIProcess/CoordinatedGraphics/WebView.cpp:
3734         * UIProcess/PageClient.h:
3735         * UIProcess/WebPageProxy.cpp:
3736         * UIProcess/WebPageProxy.h:
3737         * UIProcess/WebPageProxy.messages.in:
3738         * UIProcess/ios/PageClientImplIOS.h:
3739         * UIProcess/ios/WKContentView.h:
3740         * UIProcess/mac/PageClientImpl.h:
3741         * UIProcess/mac/PageClientImpl.mm:
3742         * UIProcess/mac/WKActionMenuController.mm:
3743         * WebKit2.xcodeproj/project.pbxproj:
3744         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3745         * WebProcess/WebPage/FindController.cpp:
3746         * WebProcess/WebPage/WebPage.h:
3747         * WebProcess/WebPage/ios/WebPageIOS.mm:
3748         * WebProcess/WebPage/mac/WebPageMac.mm:
3749         Adjust to TextIndicator and TextIndicatorWindow's new home.
3750
3751 2014-11-21  Tim Horton  <timothy_horton@apple.com>
3752
3753         REGRESSION (r176238): Mailto links are getting preloaded, which results in a compose window
3754         https://bugs.webkit.org/show_bug.cgi?id=138972
3755
3756         Reviewed by Beth Dakin.
3757
3758         * UIProcess/mac/WKActionMenuController.mm:
3759         (-[WKActionMenuController willOpenMenu:withEvent:]):
3760         Only preload links.
3761
3762 2014-11-21  Anders Carlsson  <andersca@apple.com>
3763
3764         Remove the Timer parameters from timer callbacks
3765         https://bugs.webkit.org/show_bug.cgi?id=138974
3766
3767         Reviewed by Antti Koivisto.
3768
3769         * NetworkProcess/NetworkResourceLoader.cpp:
3770         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3771         (WebKit::NetworkResourceLoader::bufferingTimerFired):
3772         * NetworkProcess/NetworkResourceLoader.h:
3773         * Shared/WebMemorySampler.cpp:
3774         (WebKit::WebMemorySampler::WebMemorySampler):
3775         (WebKit::WebMemorySampler::sampleTimerFired):
3776         (WebKit::WebMemorySampler::stopTimerFired):
3777         * Shared/WebMemorySampler.h:
3778         * Shared/mac/RemoteLayerBackingStoreCollection.h:
3779         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
3780         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
3781         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
3782         * WebProcess/Plugins/PluginView.cpp:
3783         (WebKit::PluginView::PluginView):
3784         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3785         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3786         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3787         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
3788         * WebProcess/WebProcess.cpp:
3789         (WebKit::WebProcess::WebProcess):
3790         (WebKit::WebProcess::processSuspensionCleanupTimerFired):
3791         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
3792         * WebProcess/WebProcess.h:
3793
3794 2014-11-21  Anders Carlsson  <andersca@apple.com>
3795
3796         Remove the Timer parameters from timer callbacks
3797         https://bugs.webkit.org/show_bug.cgi?id=138974
3798
3799         Reviewed by Antti Koivisto.
3800
3801         * NetworkProcess/NetworkResourceLoader.cpp:
3802         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3803         (WebKit::NetworkResourceLoader::bufferingTimerFired):
3804         * NetworkProcess/NetworkResourceLoader.h:
3805         * Shared/WebMemorySampler.cpp:
3806         (WebKit::WebMemorySampler::WebMemorySampler):
3807         (WebKit::WebMemorySampler::sampleTimerFired):
3808         (WebKit::WebMemorySampler::stopTimerFired):
3809         * Shared/WebMemorySampler.h:
3810         * Shared/mac/RemoteLayerBackingStoreCollection.h:
3811         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
3812         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
3813         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
3814         * WebProcess/Plugins/PluginView.cpp:
3815         (WebKit::PluginView::PluginView):
3816         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3817         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3818         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3819         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
3820         * WebProcess/WebProcess.cpp:
3821         (WebKit::WebProcess::WebProcess):
3822         (WebKit::WebProcess::processSuspensionCleanupTimerFired):
3823         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
3824         * WebProcess/WebProcess.h:
3825
3826 2014-11-21  Antti Koivisto  <antti@apple.com>
3827
3828         Fix iOS build.
3829
3830         * Shared/ios/QuickLookDocumentData.cpp:
3831         (WebKit::QuickLookDocumentData::encode):
3832
3833 2014-11-21  Antti Koivisto  <antti@apple.com>
3834
3835         Remove alignment code from IPC coders
3836         https://bugs.webkit.org/show_bug.cgi?id=138963
3837
3838         Reviewed by Anders Carlsson.
3839
3840         Alignment code achieves nothing except making the messages somewhat bigger.
3841
3842         * Platform/IPC/ArgumentCoders.cpp:
3843         (IPC::ArgumentCoder<CString>::encode):
3844         (IPC::ArgumentCoder<CString>::decode):
3845         (IPC::ArgumentCoder<String>::encode):
3846         (IPC::decodeStringText):
3847         * Platform/IPC/ArgumentCoders.h:
3848         (IPC::SimpleArgumentCoder::encode):
3849         (IPC::SimpleArgumentCoder::decode):
3850         * Platform/IPC/ArgumentDecoder.cpp:
3851         (IPC::ArgumentDecoder::initialize):
3852         (IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
3853         (IPC::ArgumentDecoder::decodeFixedLengthData):
3854         (IPC::ArgumentDecoder::decodeVariableLengthByteArray):
3855         (IPC::ArgumentDecoder::decodeNumber):
3856         (IPC::ArgumentDecoder::decode):
3857         (IPC::roundUpToAlignment): Deleted.
3858         (IPC::alignedBufferIsLargeEnoughToContain): Deleted.
3859         (IPC::ArgumentDecoder::alignBufferPosition): Deleted.
3860         (IPC::decodeValueFromBuffer): Deleted.
3861         * Platform/IPC/ArgumentDecoder.h:
3862         (IPC::ArgumentDecoder::isInvalid):
3863         (IPC::ArgumentDecoder::markInvalid):
3864         (IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
3865         * Platform/IPC/ArgumentEncoder.cpp:
3866         (IPC::ArgumentEncoder::ArgumentEncoder):
3867         (IPC::ArgumentEncoder::grow):
3868         (IPC::ArgumentEncoder::encodeFixedLengthData):
3869         (IPC::ArgumentEncoder::encodeVariableLengthByteArray):
3870         (IPC::ArgumentEncoder::encode):
3871         * Platform/IPC/ArgumentEncoder.h:
3872         (IPC::ArgumentEncoder::buffer):
3873         (IPC::ArgumentEncoder::mutableBuffer):
3874         * Platform/IPC/DataReference.cpp:
3875         (IPC::SharedBufferDataReference::encode):
3876         * Platform/IPC/MessageEncoder.cpp:
3877         (IPC::MessageEncoder::setIsSyncMessage):
3878         (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
3879         * Platform/IPC/mac/ConnectionMac.mm:
3880         (IPC::Connection::sendOutgoingMessage):
3881
3882 2014-11-21  Anders Carlsson  <andersca@apple.com>
3883
3884         Make memoryCache() return a reference
3885         https://bugs.webkit.org/show_bug.cgi?id=138939
3886
3887         Reviewed by Antti Koivisto.
3888
3889         * WebProcess/Network/NetworkProcessConnection.cpp:
3890         (WebKit::NetworkProcessConnection::didCacheResource):
3891         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3892         (WebKit::WebResourceCacheManager::getCacheOrigins):
3893         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
3894         * WebProcess/WebProcess.cpp:
3895         (WebKit::WebProcess::terminate):
3896         (WebKit::WebProcess::didClose):
3897         (WebKit::WebProcess::clearResourceCaches):
3898         (WebKit::getWebCoreMemoryCacheStatistics):
3899         (WebKit::WebProcess::setMemoryCacheDisabled):
3900         * WebProcess/cocoa/WebProcessCocoa.mm:
3901         (WebKit::WebProcess::platformSetCacheModel):
3902         * WebProcess/soup/WebProcessSoup.cpp:
3903         (WebKit::WebProcess::platformSetCacheModel):
3904
3905 2014-11-21  Daniel Bates  <dabates@apple.com>
3906
3907         [iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC
3908         https://bugs.webkit.org/show_bug.cgi?id=138930
3909
3910         Reviewed by Anders Carlsson.
3911
3912         * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Remove forward declaration for NSCachedURLResponse
3913         methods as this functionality was incorporated into CFNetworkSPI.h, which is included by this file.
3914         * Platform/mac/LayerHostingContext.mm: Moved QuartzCore forward declarations from this file to file
3915         QuartzCoreSPI.h and included header QuartzCoreSPI.h.
3916         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: Include header XPCSPI.h.
3917         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: Remove forward declarations of
3918         XPC SPI since these declarations are part of XCPSPI.h, which is included by header XPCServiceEntryPoint.h.
3919         * UIProcess/API/Cocoa/WKWebView.mm: Remove unnecessary include of header QuartzCore/CARenderServer.h
3920         as it will be included by header QuartzCoreSPI.h.
3921         * UIProcess/Network/NetworkProcessProxy.cpp: Include header XPCSPI.h when building for iOS with
3922         USE(XPC_SERVICES) enabled.
3923         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Include header MediaPlayerSPI.h instead of including
3924         MediaPlayer private headers directly. Also sort the list of #import directives.
3925
3926 2014-11-20  Dan Bernstein  <mitz@apple.com>
3927
3928         Build fix.
3929
3930         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
3931         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Cast the return value of
3932         [getMPAudioVideoRoutingPopoverControllerClass() alloc] to resolve ambiguity about which
3933         -initWithType: we are calling.
3934         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Cast to resolve ambiguity.
3935         (-[WKAirPlayRoutePicker show:fromRect:]): Cast for consistency.
3936
3937 2014-11-20  Benjamin Poulain  <bpoulain@apple.com>
3938
3939         Remove the remaining vestiges of minimal-ui
3940         https://bugs.webkit.org/show_bug.cgi?id=138890
3941
3942         Reviewed by Sam Weinig.
3943
3944         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3945         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
3946         * WebProcess/WebPage/WebPage.cpp:
3947         (WebKit::WebPage::didCommitLoad):
3948         (WebKit::WebPage::didFinishDocumentLoad): Deleted.
3949         * WebProcess/WebPage/WebPage.h:
3950         * WebProcess/WebPage/ios/WebPageIOS.mm:
3951         (WebKit::WebPage::savePageState):
3952         (WebKit::WebPage::restorePageState):
3953         (WebKit::WebPage::viewportConfigurationChanged):
3954         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
3955
3956 2014-11-20  Beth Dakin  <bdakin@apple.com>
3957
3958         Preview popover needs minimum and maximum sizes
3959         https://bugs.webkit.org/show_bug.cgi?id=138943
3960         -and corresponding-
3961         rdar://problem/18904651
3962
3963         Reviewed by Tim Horton.
3964
3965         Quick follow-up to get the right screen.
3966         * UIProcess/mac/WKActionMenuController.mm:
3967         (-[WKActionMenuController largestPopoverSize]):
3968
3969 2014-11-20  Beth Dakin  <bdakin@apple.com>
3970
3971         Preview popover needs minimum and maximum sizes
3972         https://bugs.webkit.org/show_bug.cgi?id=138943
3973         -and corresponding-
3974         rdar://problem/18904651
3975
3976         Reviewed by Tim Horton.
3977
3978         This patch enforces minimum and maximum popover sizes. If the popover needs to be 
3979         sized up to be above the minimum, it will end up covering some of the 
3980         _hitTestResult, so we should compute a new origin rect based on the original 
3981         event location. 
3982         * UIProcess/mac/WKActionMenuController.h:
3983         * UIProcess/mac/WKActionMenuController.mm:
3984         (-[WKActionMenuController prepareForMenu:withEvent:]):
3985         (-[WKActionMenuController _previewURLFromActionMenu:]):
3986         (-[WKActionMenuController _createPreviewPopover]):
3987         (-[WKActionMenuController largestPopoverSize]):
3988         (-[WKActionMenuController _preferredPopoverSize]):
3989         (-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]): Deleted.
3990
3991 2014-11-20  Conrad Shultz  <conrad_shultz@apple.com>
3992
3993         Clicks on previews can be recognized multiple times
3994         https://bugs.webkit.org/show_bug.cgi?id=138944
3995
3996         Reviewed by Tim Horton.
3997
3998         * UIProcess/mac/WKActionMenuController.mm:
3999         (-[WKPagePreviewViewController _clickRecognized:]):
4000         Only dispatch the delegate message on the appropriate gesture recognizer state transition.
4001
4002 2014-11-20  Conrad Shultz  <conrad_shultz@apple.com>
4003
4004         Clients should be able to customize preview click behavior
4005         https://bugs.webkit.org/show_bug.cgi?id=138940
4006
4007         Reviewed by Tim Horton.
4008
4009         * UIProcess/API/Cocoa/WKViewPrivate.h:
4010         Declare -_handleClickInPreviewView:URL:.
4011
4012         * UIProcess/API/mac/WKView.mm:
4013         (-[WKView _handleClickInPreviewView:URL:]):
4014         Extracted from -[WKActionMenuController pagePreviewViewControllerWasClicked:].
4015
4016         * UIProcess/mac/WKActionMenuController.mm:
4017         (-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
4018         Extract code to -[WKView _handleClickInPreviewView:URL:].
4019
4020 2014-11-20  Csaba Osztrogonác  <ossy@webkit.org>
4021
4022         URTBF after r176420 to fix non Apple builds.
4023
4024         * WebProcess/WebProcess.cpp:
4025         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
4026
4027 2014-11-20  Anders Carlsson  <andersca@apple.com>
4028
4029         WebPlugInClient::m_webPage can never be null, use a reference
4030         https://bugs.webkit.org/show_bug.cgi?id=138937
4031
4032         Reviewed by Andreas Kling.
4033
4034         * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
4035         (WebKit::WebPlugInClient::WebPlugInClient):
4036         (WebKit::WebPlugInClient::shouldAutoStartFromOrigin):
4037         * WebProcess/WebCoreSupport/WebPlugInClient.h:
4038         * WebProcess/WebPage/WebPage.cpp:
4039         (WebKit::WebPage::WebPage):
4040         * WebProcess/WebProcess.cpp:
4041         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
4042         * WebProcess/WebProcess.h:
4043
4044 2014-11-20  Tim Horton  <timothy_horton@apple.com>
4045
4046         TextIndicator should have getters for TextIndicator::Data properties
4047         https://bugs.webkit.org/show_bug.cgi?id=138920
4048
4049         Reviewed by Beth Dakin.
4050
4051         Instead of having clients reach into the data(), add getters.
4052         Remove frameRect(), which is identical to the textBoundingRectInWindowCoordinates getter.
4053         Remove declarations for draw/drawContentImage, which were already removed.
4054
4055         * Shared/TextIndicator.cpp:
4056         (WebKit::TextIndicator::frameRect): Deleted.
4057         * Shared/TextIndicator.h:
4058         (WebKit::TextIndicator::textBoundingRectInWindowCoordinates):
4059         (WebKit::TextIndicator::textRectsInBoundingRectCoordinates):
4060         (WebKit::TextIndicator::contentImageScaleFactor):
4061         (WebKit::TextIndicator::contentImageWithHighlight):
4062         (WebKit::TextIndicator::contentImage):
4063         * UIProcess/mac/TextIndicatorWindow.mm:
4064         (-[WKTextIndicatorView initWithFrame:textIndicator:margin:]):
4065         (-[WKTextIndicatorView presentWithCompletionHandler:]):
4066         (WebKit::TextIndicatorWindow::setTextIndicator):
4067
4068 2014-11-20  Tim Horton  <timothy_horton@apple.com>
4069
4070         Cancel DataDetectors menu earlier if we know it can't be presented
4071         https://bugs.webkit.org/show_bug.cgi?id=138922
4072         <rdar://problem/18950441>
4073
4074         Reviewed by Beth Dakin.
4075
4076         * UIProcess/mac/WKActionMenuController.mm:
4077         (-[WKActionMenuController willOpenMenu:withEvent:]):
4078         If we end up with a menu with no items, don't change selection or anything.
4079
4080         (-[WKActionMenuController menuNeedsUpdate:]):
4081         Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate,
4082         and use a bigger hammer (removeAllItems).
4083
4084 2014-11-20  Tim Horton  <timothy_horton@apple.com>
4085
4086         Don't use a TextIndicator BounceAndCrossfade transition if the selection highlight is never shown
4087         https://bugs.webkit.org/show_bug.cgi?id=138919
4088         <rdar://problem/19042207>
4089
4090         Reviewed by Beth Dakin.
4091