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