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