[GTK] Move NEWS file to a new location
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-04-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [GTK] Move NEWS file to a new location
4         https://bugs.webkit.org/show_bug.cgi?id=130901
5
6         Reviewed by Brent Fulgham.
7
8         * gtk/NEWS: Renamed from Source/WebKit/gtk/NEWS.
9
10 2014-04-01  Benjamin Poulain  <bpoulain@apple.com>
11
12         <rdar://problem/16294704> Remove _pageExtendedBackgroundColor entirely
13         https://bugs.webkit.org/show_bug.cgi?id=131075
14
15         Reviewed by Beth Dakin.
16
17         * UIProcess/API/Cocoa/WKWebView.mm:
18         (-[WKWebView _pageExtendedBackgroundColor]): Deleted.
19         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
20
21 2014-04-01  Anders Carlsson  <andersca@apple.com>
22
23         Stub out more WKNavigation properties
24         https://bugs.webkit.org/show_bug.cgi?id=131080
25
26         Reviewed by Tim Horton.
27
28         * UIProcess/API/Cocoa/WKNavigation.h:
29         * UIProcess/API/Cocoa/WKNavigation.mm:
30         (-[WKNavigation initialRequest]):
31         (-[WKNavigation response]):
32         (-[WKNavigation error]):
33
34 2014-04-01  Anders Carlsson  <andersca@apple.com>
35
36         Rename -[WKWebView activeURL] to -[WKWebView URL]
37         https://bugs.webkit.org/show_bug.cgi?id=131077
38
39         Reviewed by Tim Horton.
40
41         Keep -[WKWebView activeURL] as SPI until no clients depend on it.
42
43         * UIProcess/API/Cocoa/WKWebView.h:
44         * UIProcess/API/Cocoa/WKWebView.mm:
45         (-[WKWebView URL]):
46         (-[WKWebView activeURL]):
47         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
48         * UIProcess/Cocoa/NavigationState.mm:
49         (WebKit::NavigationState::willChangeActiveURL):
50         (WebKit::NavigationState::didChangeActiveURL):
51
52 2014-04-01  Anders Carlsson  <andersca@apple.com>
53
54         Move -[WKWebView stopLoading:] back to WKIBActions
55         https://bugs.webkit.org/show_bug.cgi?id=131072
56
57         Reviewed by Tim Horton.
58
59         * UIProcess/API/Cocoa/WKWebView.h:
60         * UIProcess/API/Cocoa/WKWebView.mm:
61         (-[WKWebView stopLoading:]):
62
63 2014-04-01  Anders Carlsson  <andersca@apple.com>
64
65         Migrate more headers
66         https://bugs.webkit.org/show_bug.cgi?id=131068
67
68         Reviewed by Tim Horton.
69
70         * UIProcess/API/Cocoa/WKBackForwardList.h:
71         Remove a newline.
72
73         * WebKit2.xcodeproj/project.pbxproj:
74         Move files from the "Deprecated" group.
75
76 2014-04-01  Manuel Rego Casasnovas  <rego@igalia.com>
77
78         [CSS Grid Layout] Enable runtime feature if feature flag is enabled
79         https://bugs.webkit.org/show_bug.cgi?id=130013
80
81         Reviewed by Simon Fraser.
82
83         Enable CSS Grid Layout runtime feature when ENABLE_CSS_GRID_LAYOUT flag is true.
84
85         * Shared/WebPreferencesStore.h:
86
87 2014-04-01  Anders Carlsson  <andersca@apple.com>
88
89         Demote WKBackForwardListDidChangeNotification to SPI
90         https://bugs.webkit.org/show_bug.cgi?id=131059
91
92         Reviewed by Dan Bernstein.
93
94         * UIProcess/API/Cocoa/WKBackForwardList.h:
95         * UIProcess/API/Cocoa/WKBackForwardList.mm:
96         * UIProcess/API/Cocoa/WKBackForwardListInternal.h:
97         * UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListInternal.h.
98         * UIProcess/Cocoa/NavigationState.mm:
99         (WebKit::NavigationState::LoaderClient::didChangeBackForwardList):
100         * WebKit2.xcodeproj/project.pbxproj:
101
102 2014-04-01  Andy Estes  <aestes@apple.com>
103
104         [Cocoa] Add SPI to determine if a WKWebView is displaying a PDF
105         https://bugs.webkit.org/show_bug.cgi?id=131063
106
107         Reviewed by Tim Horton.
108
109         * UIProcess/API/Cocoa/WKWebView.mm:
110         (-[WKWebView _isDisplayingPDF]):
111         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
112
113 2014-04-01  Simon Fraser  <simon.fraser@apple.com>
114
115         Remove some explicit template instantiations from logging code
116         https://bugs.webkit.org/show_bug.cgi?id=131065
117
118         Reviewed by Tim Horton.
119         
120         No need to explicitly state template types.
121
122         * Shared/mac/RemoteLayerTreeTransaction.mm:
123         (WebKit::dumpChangedLayers):
124
125 2014-04-01  Tim Horton  <timothy_horton@apple.com>
126
127         [iOS WebKit2] Partial repaint is broken
128         https://bugs.webkit.org/show_bug.cgi?id=131056
129
130         Reviewed by Dean Jackson.
131
132         * Shared/mac/RemoteLayerBackingStore.mm:
133         (WebKit::RemoteLayerBackingStore::display):
134         We need to check if the repaint rects themselves cover the whole
135         layer's surface, not just their bounds. Otherwise, we'll optimize
136         out the back->front copy and end up not painting the whole layer.
137
138 2014-04-01  Anders Carlsson  <andersca@apple.com>
139
140         Pass a WKNavigationAction to the create UIDelegate method
141         https://bugs.webkit.org/show_bug.cgi?id=131053
142
143         Reviewed by Sam Weinig.
144
145         * UIProcess/API/Cocoa/WKUIDelegate.h:
146         * UIProcess/Cocoa/UIClient.h:
147         * UIProcess/Cocoa/UIClient.mm:
148         (WebKit::UIClient::setDelegate):
149         (WebKit::UIClient::createNewPage):
150
151 2014-04-01  Benjamin Poulain  <bpoulain@apple.com>
152
153         [iOS][WK2] Remove the two finger pan gesture recognizer until it is actually implemented
154         https://bugs.webkit.org/show_bug.cgi?id=131009
155
156         Reviewed by Sam Weinig.
157
158         The two finger pan should not block the pinch gesture recognizer.
159
160         * UIProcess/ios/WKContentViewInteraction.h:
161         * UIProcess/ios/WKContentViewInteraction.mm:
162         (-[WKContentView setupInteraction]):
163         (-[WKContentView cleanupInteraction]):
164         (-[WKContentView gestureRecognizerShouldBegin:]):
165         (-[WKContentView _twoFingerPanRecognized:]): Deleted.
166
167 2014-04-01  Anders Carlsson  <andersca@apple.com>
168
169         Remove limits from WKBackForwardList getters
170         https://bugs.webkit.org/show_bug.cgi?id=131052
171
172         Reviewed by Beth Dakin.
173
174         * UIProcess/API/Cocoa/WKBackForwardList.h:
175         * UIProcess/API/Cocoa/WKBackForwardList.mm:
176         (-[WKBackForwardList backList]):
177         (-[WKBackForwardList forwardList]):
178         (-[WKBackForwardList backListCount]): Deleted.
179         (-[WKBackForwardList forwardListCount]): Deleted.
180         (-[WKBackForwardList backListWithLimit:]): Deleted.
181         (-[WKBackForwardList forwardListWithLimit:]): Deleted.
182         * UIProcess/WebBackForwardList.cpp:
183         (WebKit::WebBackForwardList::backList):
184         (WebKit::WebBackForwardList::forwardList):
185         * UIProcess/WebBackForwardList.h:
186
187 2014-04-01  Anders Carlsson  <andersca@apple.com>
188
189         Stub out the web process -> UI process message SPI
190         https://bugs.webkit.org/show_bug.cgi?id=131048
191
192         Reviewed by Sam Weinig.
193
194         * UIProcess/API/Cocoa/WKWebView.mm:
195         (-[WKWebView initWithFrame:configuration:]):
196         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
197         (-[WKWebViewConfiguration copyWithZone:]):
198         (-[WKWebViewConfiguration _userContentController]):
199         (-[WKWebViewConfiguration _setUserContentController:]):
200         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
201         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
202         * UIProcess/API/Cocoa/_WKScriptMessage.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
203         * UIProcess/API/Cocoa/_WKScriptMessage.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
204         (-[_WKScriptMessage body]):
205         (-[_WKScriptMessage originatingWebView]):
206         * UIProcess/API/Cocoa/_WKScriptMessageHandler.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
207         * UIProcess/API/Cocoa/_WKScriptWorld.h:
208         * UIProcess/API/Cocoa/_WKUserContentController.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
209         * UIProcess/API/Cocoa/_WKUserContentController.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h.
210         (-[_WKUserContentController addScriptMessageHandler:name:world:]):
211         (-[_WKUserContentController removeScriptMessageHandler:]):
212         * WebKit2.xcodeproj/project.pbxproj:
213
214 2014-04-01  Andreas Kling  <akling@apple.com>
215
216         Invalidate CFNetwork connection cache on memory pressure.
217         <https://webkit.org/b/131038>
218
219         Stop holding on to cached HTTP connections if we come under memory pressure.
220
221         Reviewed by Geoff Malloc-Garen.
222
223         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
224         (WebKit::NetworkProcess::platformLowMemoryHandler):
225
226 2014-04-01  Anders Carlsson  <andersca@apple.com>
227
228         Tweak WKPreferences API
229         https://bugs.webkit.org/show_bug.cgi?id=131047
230
231         Reviewed by Simon Fraser.
232
233         * UIProcess/API/Cocoa/WKPreferences.h:
234         * UIProcess/API/Cocoa/WKPreferences.mm:
235         (-[WKPreferences init]):
236         (-[WKPreferences initWithUserDefaultsKeyPrefix:]):
237         (-[WKPreferences userDefaultsKeyPrefix]):
238         (-[WKPreferences initWithUserDefaultsPrefixKey:]): Deleted.
239         (-[WKPreferences userDefaultsPrefixKey]): Deleted.
240
241 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
242
243         Enable WEB_TIMING on Mac and iOS
244         https://bugs.webkit.org/show_bug.cgi?id=128064
245
246         Reviewed by Sam Weinig, Brent Fulgham.
247         
248         Enable WEB_TIMING.
249
250         * Configurations/FeatureDefines.xcconfig:
251
252 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
253
254         [UI-side compositing] Fix animations, and add logging
255         https://bugs.webkit.org/show_bug.cgi?id=131011
256
257         Reviewed by Tim Horton.
258         
259         UI-side animations were broken because GraphicsLayerCARemote::addAnimation()
260         never called the superclass, so fix.
261         
262         Add logging for animations to the layer tree commit output.
263
264         * Shared/mac/RemoteLayerTreeTransaction.mm:
265         (WebKit::dumpProperty):
266         (WebKit::RemoteLayerTreeTextStream::operator<<):
267         (WebKit::dumpChangedLayers):
268         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
269         (WebKit::GraphicsLayerCARemote::addAnimation):
270
271 2014-04-01  Zalan Bujtas  <zalan@apple.com>
272
273         Build fix after r166582.
274
275         * Shared/ContextMenuContextData.cpp:
276         (WebKit::ContextMenuContextData::ContextMenuContextData):
277
278 2014-04-01  Zalan Bujtas  <zalan@apple.com>
279
280         Subpixel rendering: Transition class Image (and its dependencies) from int to float to enable subpixel positioned/sized images.
281         https://bugs.webkit.org/show_bug.cgi?id=130643
282
283         Reviewed by Simon Fraser.
284
285         This is in preparation to support subpixel positioned/sized background images. While 1x bitmap images can't take
286         subpixel sizing on hidpi resolutions, both generated and hidpi images can.
287         This patch does not change Image behavior in general as both position and size are still snapped to integral values.  
288
289         No change in behavior.
290
291         * Shared/WebCoreArgumentCoders.cpp:
292         (IPC::encodeImage):
293         * UIProcess/API/efl/EwkView.cpp:
294         (EwkView::updateCursor):
295
296 2014-04-01  Joonghun Park  <jh718.park@samsung.com>
297
298         [EFL][WK2] Fix and update the existing test case for ewk_database_manager_origins_async_get API
299         https://bugs.webkit.org/show_bug.cgi?id=131017
300
301         Reviewed by Gyuyoung Kim.
302
303         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
304         Fix memory leaks and errors caused by duplication of Ecore_Timer deletion
305         as well as update a naming style of local variable.
306         (EWK2DatabaseManagerTest::databaseOriginsCallback):
307         (TEST_F):
308
309 2014-04-01  Zan Dobersek  <zdobersek@igalia.com>
310
311         Don't copy the children map in webkitWebViewBaseContainerForall
312         https://bugs.webkit.org/show_bug.cgi?id=131016
313
314         Reviewed by Carlos Garcia Campos.
315
316         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
317         (webkitWebViewBaseContainerForall): Avoid copying the GtkWidget-to-IntRect HashMap object
318         by transforming the iteration to a range-based for-loop over that HashMap's keys.
319
320 2014-04-01  Zan Dobersek  <zdobersek@igalia.com>
321
322         [GTK] Don't copy the ResourceResponse object in webkitWebViewDecidePolicy
323         https://bugs.webkit.org/show_bug.cgi?id=131015
324
325         Reviewed by Carlos Garcia Campos.
326
327         * UIProcess/API/gtk/WebKitWebView.cpp:
328         (webkitWebViewDecidePolicy): Avoid copying the ResourceResponce object returned by webkitURIResponseGetResourceResponse.
329         That function already returns a reference, so the return value should be stored accordingly.
330
331 2014-04-01  Eunmi Lee  <eunmi15.lee@samsung.com>
332
333         [CoordinatedGraphics] Content scale factor should not be applied to draw contents when fixed layout is not used.
334         https://bugs.webkit.org/show_bug.cgi?id=130962
335
336         Reviewed by Gyuyoung Kim.
337
338         Delegating scaling is turned off when fixed layout is not used in the
339         coordinated graphics, so page scale factor is applied to the contents
340         directly.
341         In that case, we should not apply page scale factor to coordinated
342         graphics to draw contents and calculate visible content rect.
343
344         Currently, page scale factor is applied twice to the coordinated
345         graphics and contents, so result of scaling is abnormal.
346
347         * UIProcess/CoordinatedGraphics/WebView.cpp:
348         (WebKit::WebView::transformToScene):
349         (WebKit::WebView::visibleContentsSize):
350
351 2014-04-01  Ryuan Choi  <ryuan.choi@samsung.com>
352
353         [EFL][WK2] Rename ewk_application_cache_manager_delete{_all}
354         https://bugs.webkit.org/show_bug.cgi?id=131012
355
356         Reviewed by Gyuyoung Kim.
357
358         While discussing Bug 130577, we resulted that _clear and _xxx_del is better name for the EFL.
359         This patch will rename similar API in ewk_application_cache_manager.
360
361         In addition, fixed some typos in doxygen.
362
363         * UIProcess/API/efl/ewk_application_cache_manager.cpp:
364         (ewk_application_cache_manager_clear): Renamed from ewk_application_cache_manager_delete_all
365         (ewk_application_cache_manager_entries_for_origin_del): Renamed from ewk_application_cache_manager_delete
366         (ewk_application_cache_manager_delete_all): Deleted.
367         (ewk_application_cache_manager_delete): Deleted.
368         * UIProcess/API/efl/ewk_application_cache_manager.h:
369         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
370         (TEST_F):
371
372 2014-03-31  Zan Dobersek  <zdobersek@igalia.com>
373
374         Unreviewed GTK build fix after r166553.
375
376         * UIProcess/API/gtk/WebKitSettings.cpp:
377         (_WebKitSettingsPrivate::_WebKitSettingsPrivate): Pass 'WebKit2.' as the second argument to WebPreferences::create().
378
379 2014-03-31  Ryuan Choi  <ryuan.choi@samsung.com>
380
381         [EFL][WK2] Extract the control of page background out of color_set
382         https://bugs.webkit.org/show_bug.cgi?id=127539
383
384         Reviewed by Gyuyoung Kim.
385
386         EFL have a way to change the color using evas_object_color_set and we used it to change background.
387         But, We should not use it because the alpha value of color_set is used
388         for the transparancy of object itself including background and contents.
389
390         This patch added ewk_view_bg_color_{get|set} to change the background color.
391
392         * UIProcess/API/C/efl/WKViewEfl.cpp:
393         Extracted controls of page background out of color_set.
394         color_set will be only used for the opacity of whole contents.
395         (WKViewSetBackgroundColor): Added to share page background color.
396         (WKViewGetBackgroundColor):
397         * UIProcess/API/C/efl/WKViewEfl.h:
398         * UIProcess/API/efl/EwkView.cpp:
399         (EwkView::handleEvasObjectColorSet):
400         * UIProcess/API/efl/ewk_view.cpp:
401         Removed ewk_view_draws_page_background_set which just control whether to draw background.
402         ewk_view_bg_color_set will conver it.
403         (ewk_view_bg_color_set):
404         (ewk_view_bg_color_get):
405         * UIProcess/API/efl/ewk_view.h:
406         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Added simple test case.
407         * UIProcess/efl/WebViewEfl.cpp:
408         (WebKit::WebViewEfl::setViewBackgroundColor):
409         (WebKit::WebViewEfl::viewBackgroundColor):
410         * UIProcess/efl/WebViewEfl.h:
411
412 2014-03-31  Joonghun Park  <jh718.park@samsung.com>
413
414         [EFL][WK2]Implement ewk APIs of web local storage which have deletion functions of the local storage entries
415         https://bugs.webkit.org/show_bug.cgi?id=130577
416
417         Reviewed by Gyuyoung Kim.
418
419         * UIProcess/API/efl/ewk_storage_manager.cpp:
420         (ewk_storage_manager_entries_clear):
421         (ewk_storage_manager_entries_for_origin_del):
422         * UIProcess/API/efl/ewk_storage_manager.h:
423         * UIProcess/API/efl/ewk_storage_manager_private.h:
424         (EwkStorageManager::wkStorageManager):
425         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
426         adding and updating API unittest and fixing memory leak of the existing test case
427         (EWK2StorageManagerTest::getStorageOriginsCallback):
428         (EWK2StorageManagerTest::checkOrigin):
429         (EWK2StorageManagerTest::getOrigin):
430         (TEST_F):
431
432 2014-03-31  Anders Carlsson  <andersca@apple.com>
433
434         Rename policy enums to match the delegate methods
435         https://bugs.webkit.org/show_bug.cgi?id=131002
436
437         Reviewed by Tim Horton.
438
439         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
440         (NS_ENUM):
441         * UIProcess/Cocoa/NavigationState.mm:
442         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
443         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
444
445 2014-03-31  Anders Carlsson  <andersca@apple.com>
446
447         Add more preferences
448         https://bugs.webkit.org/show_bug.cgi?id=131001
449
450         Reviewed by Simon Fraser.
451
452         * UIProcess/API/Cocoa/WKPreferences.h:
453         * UIProcess/API/Cocoa/WKPreferences.mm:
454         (-[WKPreferences isJavaScriptEnabled]):
455         (-[WKPreferences setJavaScriptEnabled:]):
456         (-[WKPreferences javaScriptCanOpenWindowsAutomatically]):
457         (-[WKPreferences setJavaScriptCanOpenWindowsAutomatically:]):
458         (-[WKPreferences suppressesIncrementalRendering]):
459         (-[WKPreferences setSuppressesIncrementalRendering:]):
460         (-[WKPreferences isJavaEnabled]):
461         (-[WKPreferences setJavaEnabled:]):
462         (-[WKPreferences arePlugInsEnabled]):
463         (-[WKPreferences setPlugInsEnabled:]):
464
465 2014-03-31  Tim Horton  <timothy_horton@apple.com>
466
467         Fix the build.
468
469         * WebProcess/WebPage/WebPage.cpp:
470         (WebKit::WebPage::updatePreferences):
471
472 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
473
474         Fix the iOS build.
475
476         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
477         (WebKit::RemoteLayerTreeHost::createLayer):
478         * UIProcess/mac/RemoteLayerTreeHost.h:
479         * UIProcess/mac/RemoteLayerTreeHost.mm:
480         (WebKit::RemoteLayerTreeHost::setLayerID):
481         (WebKit::RemoteLayerTreeHost::layerID):
482         (WebKit::RemoteLayerTreeHost::createLayer):
483
484 2014-03-31  Anders Carlsson  <andersca@apple.com>
485
486         Add a couple of iOS specific preferences
487         https://bugs.webkit.org/show_bug.cgi?id=130999
488
489         Reviewed by Simon Fraser.
490
491         * Shared/WebPreferencesStore.h:
492         * UIProcess/API/Cocoa/WKPreferences.h:
493         * UIProcess/API/Cocoa/WKPreferences.mm:
494         (-[WKPreferences allowsInlineMediaPlayback]):
495         (-[WKPreferences setAllowsInlineMediaPlayback:]):
496         (-[WKPreferences mediaPlaybackRequiresUserAction]):
497         (-[WKPreferences setMediaPlaybackRequiresUserAction:]):
498         (-[WKPreferences mediaPlaybackAllowsAirPlay]):
499         (-[WKPreferences setMediaPlaybackAllowsAirPlay:]):
500         * WebProcess/WebPage/WebPage.cpp:
501         (WebKit::WebPage::updatePreferences):
502
503 2014-03-31  Anders Carlsson  <andersca@apple.com>
504
505         Add a new -[WKPreferences initWithUserDefaultsPrefixKey:] initializer
506         https://bugs.webkit.org/show_bug.cgi?id=130996
507
508         Reviewed by Simon Fraser.
509
510         Add a "key prefix" to the WebKit::WebPreferences create function, so we can use a different
511         key prefix ("WebKit") for the modern API and not pollute the user defaults namespace with
512         the old key prefix ("WebKit2.").
513         
514         * UIProcess/API/C/WKPreferences.cpp:
515         (WKPreferencesCreate):
516         (WKPreferencesCreateWithIdentifier):
517         * UIProcess/API/Cocoa/WKPreferences.h:
518         * UIProcess/API/Cocoa/WKPreferences.mm:
519         (-[WKPreferences init]):
520         (-[WKPreferences initWithUserDefaultsPrefixKey:]):
521         (-[WKPreferences userDefaultsPrefixKey]):
522         * UIProcess/WebPageGroup.cpp:
523         (WebKit::WebPageGroup::WebPageGroup):
524         * UIProcess/WebPreferences.cpp:
525         (WebKit::WebPreferences::WebPreferences):
526         * UIProcess/WebPreferences.h:
527         (WebKit::WebPreferences::create):
528         * UIProcess/mac/WebPreferencesMac.mm:
529         (WebKit::makeKey):
530         (WebKit::setStringValueIfInUserDefaults):
531         (WebKit::setBoolValueIfInUserDefaults):
532         (WebKit::setUInt32ValueIfInUserDefaults):
533         (WebKit::setDoubleValueIfInUserDefaults):
534         (WebKit::WebPreferences::platformInitializeStore):
535         (WebKit::WebPreferences::platformUpdateStringValueForKey):
536         (WebKit::WebPreferences::platformUpdateBoolValueForKey):
537         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
538         (WebKit::WebPreferences::platformUpdateDoubleValueForKey):
539         (WebKit::WebPreferences::platformUpdateFloatValueForKey):
540
541 2014-03-31  Pratik Solanki  <psolanki@apple.com>
542
543         Remove duplicate entries in Derived Sources.
544
545         Rubber-stamped by Anders Carlsson.
546
547         * WebKit2.xcodeproj/project.pbxproj:
548
549 2014-03-31  Tim Horton  <timothy_horton@apple.com>
550
551         Fix the build.
552
553         * UIProcess/mac/RemoteLayerTreeHost.mm:
554         (WebKit::RemoteLayerTreeHost::updateLayerTree):
555
556 2014-03-31  Tim Horton  <timothy_horton@apple.com>
557
558         Fix the build.
559
560         * UIProcess/mac/RemoteLayerTreeHost.mm:
561         (WebKit::RemoteLayerTreeHost::updateLayerTree):
562
563 2014-03-31  Anders Carlsson  <andersca@apple.com>
564
565         Rename -[WKNavigationAction destinationFrame] to -[WKNavigationAction targetFrame]
566         https://bugs.webkit.org/show_bug.cgi?id=130994
567
568         Reviewed by Dan Bernstein.
569
570         * UIProcess/API/Cocoa/WKNavigationAction.h:
571         * UIProcess/API/Cocoa/WKNavigationAction.mm:
572         (-[WKNavigationAction description]):
573         (-[WKNavigationAction targetFrame]):
574         (-[WKNavigationAction setTargetFrame:]):
575         (-[WKNavigationAction destinationFrame]): Deleted.
576         (-[WKNavigationAction setDestinationFrame:]): Deleted.
577         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
578         * UIProcess/Cocoa/NavigationState.mm:
579         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
580
581 2014-03-31  Tim Horton  <timothy_horton@apple.com>
582
583         [iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
584         https://bugs.webkit.org/show_bug.cgi?id=130768
585         <rdar://problem/16421471>
586
587         Reviewed by Benjamin Poulain.
588
589         * Shared/mac/RemoteLayerBackingStore.h:
590         Make RemoteLayerBackingStore noncopyable.
591         Add flush(), which synchronously flushes painting operations on the underlying backing store.
592         Add storage for the CGContext that needs to be flushed, and ensure that it is flushed before we paint again.
593
594         * Shared/mac/RemoteLayerBackingStore.mm:
595         (RemoteLayerBackingStore::display):
596
597         (RemoteLayerBackingStore::drawInContext):
598         Don't flush the context immediately after painting.
599
600         (RemoteLayerBackingStore::flush):
601         Flush the current front surface/buffer's context.
602         Clear the new pending-flush members.
603
604         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
605         (WebKit::flushBackingStoreChangesInTransaction):
606         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
607         Crawl through all of the valid changed backing stores in the transaction and flush them.
608         Reset changed properties after encoding the commit.
609
610         * Shared/mac/RemoteLayerTreeTransaction.h:
611         (WebKit::RemoteLayerTreeTransaction::LayerProperties::resetChangedProperties):
612         (WebKit::RemoteLayerTreeTransaction::changedLayers):
613         (WebKit::RemoteLayerTreeTransaction::changedLayerProperties):
614         * Shared/mac/RemoteLayerTreeTransaction.mm:
615         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
616         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
617         (WebKit::RemoteLayerTreeTransaction::encode):
618         (WebKit::RemoteLayerTreeTransaction::decode):
619         (WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
620         (WebKit::dumpChangedLayers):
621         Instead of storing a copy of the LayerProperties struct for each changed layer
622         while building the transaction in the Web process, store a list of changed layers,
623         and directly encode the commit from those layers' LayerProperties. This provides a few benefits:
624                 - We avoid copying LayerProperties for every changed layer, every commit
625                 - We can make RemoteLayerBackingStore noncopyable
626                 - We can walk the changed layers after building the transaction
627                 in order to flush backing store, and actually affect the layers'
628                 own RemoteLayerBackingStore instead of a copy.
629         The UI process will still generate a LayerPropertiesMap at decode time.
630         
631         * UIProcess/mac/RemoteLayerTreeHost.mm:
632         (WebKit::RemoteLayerTreeHost::updateLayerTree):
633         Don't copy the LayerProperties struct for the debug overlay. Instead,
634         adjust the properties which the debug overlay whacks directly on the layer,
635         after applying the normal LayerProperties.
636
637         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
638         (PlatformCALayerRemote::recursiveBuildTransaction):
639         Don't reset changed layer properties in the middle of building a transaction. Instead,
640         RemoteLayerTreeDrawingArea::flushLayers() will reset all the flags on all changed layers
641         after the commit is encoded.
642
643         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
644         (WebKit::PlatformCALayerRemote::properties):
645
646 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
647
648         [UI-side compositing] Proxy animations to the UI process
649         https://bugs.webkit.org/show_bug.cgi?id=130946
650
651         Reviewed by Tim Horton.
652         
653         Add encoding/decoding of TimingFunctions. Add encoding support
654         for HashSet.
655         
656         Add PlatformCAAnimationRemote and have PlatformCALayerRemote allow
657         animations now. PlatformCALayerRemote's properties are defined in the class,
658         as is the encoding/decoding (much cleaner than having them in the transaction
659         class I think).
660         
661         Add support for the "animationDidStart" callback and sending this back to the
662         web process. This involves a HashMap of layerID->WKAnimationDelegate stored
663         on the RemoteLayerTreeHost, and a message send via the DrawingArea. On the
664         other side, RemoteLayerTreeContext stores a HashMap of layerID->PlatformCALayerRemote*
665         for layers which have just started animations, which is used to get the
666         PlatformCALayer* to call animationDidStart() on.
667         
668         This requires that the RemoteLayerTreeHost* be passed down into property application,
669         and that the RemoteLayerTreeHost have a reference to the drawing area.
670         
671         To every CALayer in the UI process we -setValue:forKey: to track the PlatformLayerID,
672         so we can get back to it in order to dispatch "animationDidStart".
673         
674         Replace some "using namespace WebKit" with "namespace WebKit { }".
675
676         * Platform/IPC/ArgumentCoders.h:
677         * Shared/WebCoreArgumentCoders.cpp:
678         (IPC::ArgumentCoder<LinearTimingFunction>::encode):
679         (IPC::ArgumentCoder<LinearTimingFunction>::decode):
680         (IPC::ArgumentCoder<CubicBezierTimingFunction>::encode):
681         (IPC::ArgumentCoder<CubicBezierTimingFunction>::decode):
682         (IPC::ArgumentCoder<StepsTimingFunction>::encode):
683         (IPC::ArgumentCoder<StepsTimingFunction>::decode):
684         * Shared/WebCoreArgumentCoders.h:
685         * Shared/mac/RemoteLayerBackingStore.mm:
686         * Shared/mac/RemoteLayerTreePropertyApplier.h:
687         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
688         (WebKit::applyPropertiesToLayer):
689         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
690         * Shared/mac/RemoteLayerTreeTransaction.h:
691         * Shared/mac/RemoteLayerTreeTransaction.mm:
692         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
693         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
694         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
695         (WebKit::dumpChangedLayers):
696         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
697         (WebKit::RemoteLayerTreeHost::layerID):
698         (WebKit::RemoteLayerTreeHost::createLayer):
699         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
700         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
701         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
702         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
703         (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
704         * UIProcess/mac/RemoteLayerTreeHost.h:
705         (WebKit::RemoteLayerTreeHost::animationDelegates):
706         * UIProcess/mac/RemoteLayerTreeHost.mm:
707         (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
708         (WebKit::RemoteLayerTreeHost::updateLayerTree):
709         (WebKit::RemoteLayerTreeHost::layerWillBeRemoved):
710         (WebKit::RemoteLayerTreeHost::animationDidStart):
711         (WebKit::RemoteLayerTreeHost::layerID):
712         (WebKit::RemoteLayerTreeHost::createLayer):
713         * WebKit2.xcodeproj/project.pbxproj:
714         * WebProcess/WebPage/DrawingArea.h:
715         (WebKit::DrawingArea::acceleratedAnimationDidStart):
716         * WebProcess/WebPage/DrawingArea.messages.in:
717         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
718         (WebKit::GraphicsLayerCARemote::createPlatformCAAnimation):
719         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
720         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h: Added.
721         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: Added.
722         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
723         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
724         (WebKit::PlatformCALayerRemote::animationStarted):
725         (WebKit::PlatformCALayerRemote::addAnimationForKey):
726         (WebKit::PlatformCALayerRemote::removeAnimationForKey):
727         (WebKit::PlatformCALayerRemote::animationForKey):
728         (PlatformCALayerRemote::recursiveBuildTransaction): Deleted.
729         (PlatformCALayerRemote::addAnimationForKey): Deleted.
730         (PlatformCALayerRemote::removeAnimationForKey): Deleted.
731         (PlatformCALayerRemote::animationForKey): Deleted.
732         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
733         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
734         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
735         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
736         (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
737         (WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer):
738         (WebKit::RemoteLayerTreeContext::animationDidStart):
739         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
740         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
741         (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
742         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
743         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
744
745 2014-03-31  Tim Horton  <timothy_horton@apple.com>
746
747         Double-buffer RemoteLayerBackingStore
748         https://bugs.webkit.org/show_bug.cgi?id=130990
749
750         Reviewed by Simon Fraser.
751
752         We'll keep a front and back buffer for each surface; the front is generally currently
753         being displayed in the UI process, and the back is the one we'll paint into.
754
755         Swap the two surfaces each time we paint; since we synchronize with the UI process,
756         the old front surface will generally be out-of-use by the render server by the time
757         we paint again. However, since render server commits are asynchronous and we have 
758         no way to syncronize with them yet, we have to check if the (swapped to front) back buffer is in use,
759         and create a new front buffer if it is.
760
761         Triple-buffering would solve this problem, as would synchronization with the render server,
762         as would a pool of surfaces - we will revisit these solutions in future patches.
763
764         * Shared/mac/RemoteLayerBackingStore.h:
765         * Shared/mac/RemoteLayerBackingStore.mm:
766         (RemoteLayerBackingStore::ensureBackingStore):
767         (RemoteLayerBackingStore::clearBackingStore):
768         Factor clearBackingStore() out of ensureBackingStore() and display().
769
770         (RemoteLayerBackingStore::display):
771         Swap buffers. Since m_backSurface will hold on to the back surface's CGContext,
772         we don't need to worry about tearing down the image first anymore.
773         Don't worry about creating a back image (nor copying it into the front image)
774         if we're going to paint the whole layer.
775
776         (RemoteLayerBackingStore::drawInContext):
777         Fix some names.
778
779         (RemoteLayerBackingStore::applyBackingStoreToLayer):
780         Reduce duplication.
781
782         (RemoteLayerBackingStore::createImageForFrontBuffer): Deleted.
783
784 2014-03-31  Tim Horton  <timothy_horton@apple.com>
785
786         Synchronize Web process remote layer tree commits with CoreAnimation commits in the UI process
787         https://bugs.webkit.org/show_bug.cgi?id=130984
788
789         Reviewed by Simon Fraser.
790
791         There's no reason for the Web process to paint faster than the UI process
792         can apply to and commit the CoreAnimation layer tree.
793
794         Also, once we get proper double-buffering and purgeable back buffers, we
795         will need the ability to make some assumptions about in-use surfaces.
796
797         Unfortunately, we can't actually tell when the render server commits, 
798         as this is an asynchronous operation in a process we don't control, so
799         for now, this is only an approximation.
800
801         This also means that the assumptions we would like to make won't be
802         strong guarantees yet.
803
804         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
805         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
806         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
807         When we commit, install a run loop observer to fire immediately after CoreAnimation commits.
808
809         (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
810         Fix a typo ('cmponents').
811
812         (WebKit::coreAnimationDidCommitLayersCallback):
813         (WebKit::RemoteLayerTreeDrawingAreaProxy::scheduleCoreAnimationLayerCommitObserver):
814         (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
815         When CA commits, send a message to the Web process letting it know that we
816         swapped to the new backing store.
817
818         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
819         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
820         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
821         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
822         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
823         Defer remote layer tree commits until we get didUpdate() from the UI process.
824
825 2014-03-31  Dean Jackson  <dino@apple.com>
826
827         Remove WEB_ANIMATIONS
828         https://bugs.webkit.org/show_bug.cgi?id=130989
829
830         Reviewed by Simon Fraser.
831
832         Remove this feature flag until we plan to implement.
833
834         * Configurations/FeatureDefines.xcconfig:
835
836 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
837
838         [iOS WK2] Hook up scroll events for accelerated overflow:scroll
839         https://bugs.webkit.org/show_bug.cgi?id=130976
840
841         Reviewed by Tim Horton.
842         
843         When an accelerated overflow:scroll is scrolled in the UI process,
844         tell the WebProcess that the scroll happened to update RenderLayer
845         state and fire events.
846         
847         Add a WKOverflowScrollViewDelegate which is set as the delegate of
848         UIScrollViews, owned by ScrollingTreeOverflowScrollingNodeIOS, and propagates
849         -scrollViewDidScroll: messages to ScrollingTree::scrollPositionChangedViaDelegatedScrolling(),
850         which updates child layers and then, via RemoteScrollingTree::scrollingTreeNodeDidScroll,
851         tells the RemoteScrollingCoordinator which sends a message to the WebProcess.
852         
853         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
854         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll): Name change
855         to try to reduce confusion.
856         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged): Deleted.
857         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
858         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
859         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
860         * UIProcess/Scrolling/RemoteScrollingTree.h:
861         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
862         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
863         (-[WKOverflowScrollViewDelegate initWithScrollingTreeNode:WebKit::]):
864         (-[WKOverflowScrollViewDelegate scrollViewDidScroll:]):
865         (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
866         (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
867         (-[WKOverflowScrollViewDelegate scrollViewDidEndScrollingAnimation:]):
868         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
869         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
870         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
871         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
872         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
873         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode): No need for
874         rounding.
875
876 2014-03-29  Simon Fraser  <simon.fraser@apple.com>
877
878         Fix scrolling on OS X with UI-side compositing
879         https://bugs.webkit.org/show_bug.cgi?id=130930
880
881         Reviewed by Tim Horton.
882         
883         On iOS, we rely on visible rect updates to propagate scroll offset
884         changes to the WebProcess. RemoteScrollingCoordinatorProxy was thus hardcoded
885         to bail from scrollPositionChanged() when the scrolled node was the root node,
886         but this broke OS X. Fix by adding a behavior flag to RemoteScrollingCoordinatorProxy.
887
888         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
889         (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
890         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
891         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
892         (WebKit::RemoteScrollingCoordinatorProxy::setPropagatesMainFrameScrolls):
893         (WebKit::RemoteScrollingCoordinatorProxy::propagatesMainFrameScrolls):
894         * UIProcess/WebPageProxy.cpp:
895         (WebKit::WebPageProxy::initializeWebPage):
896
897 2014-03-31  Tim Horton  <timothy_horton@apple.com>
898
899         [iOS WebKit2] Disable tile cohort retention for now
900         https://bugs.webkit.org/show_bug.cgi?id=130926
901         <rdar://problem/16465413>
902
903         Reviewed by Simon Fraser.
904
905         * Shared/WebPreferencesStore.h:
906         * WebProcess/WebPage/WebPage.cpp:
907         (WebKit::WebPage::updatePreferences):
908         Add a preference for temporary tile cohort retention (essentially, provide a setting
909         that means that we will never retain tiles at all once they leave the tile coverage rect).
910         Defaults to true to maintain existing behavior, except for iOS WebKit2, where
911         it defaults to false because we don't have the requisite support for purgeable tiles yet.
912
913         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
914         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
915         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
916
917 2014-03-31  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
918
919         Buildfix after r166497.
920
921         Reviewed by Csaba Osztrogonác.
922
923         * UIProcess/API/efl/ewk_context.h: Missing EAPI added.
924
925 2014-03-31  Martin Robinson  <mrobinson@igalia.com>
926
927         [GTK] Use PROJECT_VERSION_* instead of WEBKIT_*_VERSION
928         https://bugs.webkit.org/show_bug.cgi?id=130936
929
930         Reviewed by Carlos Garcia Campos.
931
932         * UIProcess/API/gtk/WebKitVersion.h.in: Use PROJECT_VERSION_* macros instead of the Autotools ones.
933
934 2014-03-31  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
935
936         [EFL][WK2] Add ewk APIs to control TLS error policy on WebContext.
937         https://bugs.webkit.org/show_bug.cgi?id=129740
938
939         Reviewed by Gyuyoung Kim.
940
941         * PlatformEfl.cmake:
942         Added the new SSL test.
943
944         * UIProcess/API/efl/ewk_context.cpp:
945         (EwkContext::ignoreTLSErrors):
946         (EwkContext::setIgnoreTLSErrors):
947         (ewk_context_ignore_tls_errors_get):
948         (ewk_context_ignore_tls_errors_set):
949         * UIProcess/API/efl/ewk_context.h:
950         * UIProcess/API/efl/ewk_context_private.h:
951         Added the API functions.
952
953         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
954         (EWK2UnitTestServer::EWK2UnitTestServer):
955         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
956         Extended the unit test server to handle TLS.
957
958         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp:
959         Added tests to check the TLS policy API.
960
961 2014-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
962
963         Unreviewed. Fix GTK2 plugin process binary name after r166492.
964
965         * PlatformGTK.cmake: Fix typo.
966
967 2014-03-31  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
968
969         Remove hostThisRegister() and hostThisValue()
970         https://bugs.webkit.org/show_bug.cgi?id=130895
971
972         Reviewed by Geoffrey Garen.
973
974         Removed hostThisRegister() and hostThisValue() and instead use thisArgumentOffset() and thisValue() respectively.
975
976         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
977         (WebKit::callMethod):
978
979 2014-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
980
981         [GTK] Add support for GTK3 plugins
982         https://bugs.webkit.org/show_bug.cgi?id=130599
983
984         Reviewed by Martin Robinson.
985
986         We currently have a gtk2 based plugin process mainly for flash
987         and a few other plugins that use GTK2, but many other plugins
988         don't even use gtk at all. This patch builds a lighter plugin
989         process based on GTK3, used by default for all the plugins expect
990         the ones requiring GTK2. And of course the default plugin process
991         supports GTK3 plugins.
992
993         * CMakeLists.txt: Add common rules to build the default plugin process.
994         * PlatformEfl.cmake: Remove common cmake code that is now in CMakeLists.txt.
995         * PlatformGTK.cmake: Rename WebKitPluginProcess to
996         WebKitPluginProcess2 and add the platform specific rules to build
997         the default plugin process.
998         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
999         (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
1000         Check if the loaded plugin module uses GTK2.
1001         (WebKit::NetscapePluginModule::getPluginInfo): Set requiresGtk2 accordingly.
1002         (WebKit::NetscapePluginModule::scanPlugin): Write "requires-gtk2"
1003         line to stdout if the plugin requires GTK2.
1004         * Shared/Plugins/PluginModuleInfo.h: Add requiresGtk2 boolean member.
1005         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1006         (WebKit::ProcessLauncher::launchProcess): Use the
1007         WebKitPluginProcess2 executable when the plugin requires GTK2.
1008         * UIProcess/Plugins/PluginProcessProxy.h: Add requiresGtk2 boolean
1009         member to RawPluginMetaData struct.
1010         * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Bump the cache schema version.
1011         (WebKit::PluginInfoCache::getPluginInfo): Read also requires-gtk2
1012         key from the cache.
1013         (WebKit::PluginInfoCache::updatePluginInfo): Save also
1014         requires-gtk2 key in the cache.
1015         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1016         (WebKit::PluginProcessProxy::platformGetLaunchOptions): Add an
1017         extra initialization data parameter if the plugin requires GTK2.
1018         (WebKit::PluginProcessProxy::scanPlugin): Check if "requires-gtk2"
1019         was written to stdout.
1020
1021 2014-03-30  Andy Estes  <aestes@apple.com>
1022
1023         [Cocoa] Add an originatingWebView property to _WKDownload
1024         https://bugs.webkit.org/show_bug.cgi?id=130945
1025
1026         Reviewed by Anders Carlsson.
1027
1028         * UIProcess/API/Cocoa/WKWebView.mm:
1029         (-[WKWebView initWithFrame:configuration:]): Passed self to WKView's initializer.
1030         * UIProcess/API/Cocoa/_WKDownload.h: Declared originatingWebView as a weak, readonly property.
1031         * UIProcess/API/Cocoa/_WKDownload.mm:
1032         (-[_WKDownload originatingWebView]):
1033         (-[_WKDownload setOriginatingWebView:]):
1034         * UIProcess/API/Cocoa/_WKDownloadInternal.h: Re-declared originatingWebView as readwrite so that
1035         PageClientImpl can call setOriginatingWebView:. Removed some dead code.
1036         * UIProcess/API/mac/WKView.mm:
1037         (-[WKView initWithFrame:context:configuration:webView:]): Updated to accept a webView parameter.
1038         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Passed nil for the webView parameter.
1039         * UIProcess/API/mac/WKViewInternal.h:
1040         * UIProcess/Cocoa/DownloadClient.mm:
1041         (WebKit::DownloadClient::decideDestinationWithSuggestedFilename): Ensured allowOverwrite is initialized.
1042         * UIProcess/PageClient.h: Included handleDownloadRequest() on all platforms.
1043         * UIProcess/WebPageProxy.cpp:
1044         (WebKit::WebPageProxy::receivedPolicyDecision): Ditto.
1045         (WebKit::WebPageProxy::handleDownloadRequest): Ditto.
1046         * UIProcess/WebPageProxy.h: Ditto.
1047         * UIProcess/ios/PageClientImplIOS.h:
1048         * UIProcess/ios/PageClientImplIOS.mm:
1049         (WebKit::PageClientImpl::handleDownloadRequest): Called -[_WKDownload setOriginatingWebView:].
1050         * UIProcess/mac/PageClientImpl.h: Added a m_webView member variable.
1051         * UIProcess/mac/PageClientImpl.mm:
1052         (WebKit::PageClientImpl::PageClientImpl): Asserted that m_webView is nil if WK API isn't enabled.
1053         (WebKit::PageClientImpl::handleDownloadRequest): Called -[_WKDownload setOriginatingWebView:].
1054
1055 2014-03-29  Commit Queue  <commit-queue@webkit.org>
1056
1057         Unreviewed, rolling out r166434.
1058         https://bugs.webkit.org/show_bug.cgi?id=130938
1059
1060         Caused crashes and other failures on cache tests (Requested by
1061         ap on #webkit).
1062
1063         Reverted changeset:
1064
1065         "Web Replay: add page-level setting to bypass the MemoryCache"
1066         https://bugs.webkit.org/show_bug.cgi?id=130728
1067         http://trac.webkit.org/changeset/166434
1068
1069 2014-03-28  Anders Carlsson  <andersca@apple.com>
1070
1071         Uncaught NSExceptions should crash the web process
1072         https://bugs.webkit.org/show_bug.cgi?id=130923
1073         <rdar://problem/16463751>
1074
1075         Reviewed by Dan Bernstein.
1076
1077         * WebProcess/cocoa/WebProcessCocoa.mm:
1078         (WebKit::WebProcess::platformInitializeWebProcess):
1079
1080 2014-03-28  Csaba Osztrogonác  <ossy@webkit.org>
1081
1082         Unreviewed buildfix after r166441 and r166443.
1083
1084         Missing PLATFORM(COCOA) guards added.
1085
1086         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1087         (WebKit::NPRuntimeObjectMap::evaluate):
1088         * WebProcess/Plugins/PluginProxy.cpp:
1089         * WebProcess/Plugins/PluginProxy.h:
1090
1091 2014-03-28  Stephanie Lewis  <slewis@apple.com>
1092
1093         Don't prevent AppSleep from sync messages.
1094         https://bugs.webkit.org/show_bug.cgi?id=130747.
1095
1096         Reviewed by Anders Carlsson.
1097
1098         We think sync messages only need to happen full throttle when the plugin is visible,
1099         the user is interacting with the plugin, or audio is playing.  Since we already
1100         take assertions for all these cases the assertion in sync messages doesn’t provide
1101         any value.  Since it can keep the PluginProcess awake in other instances remove it.
1102
1103         * PluginProcess/WebProcessConnection.cpp:
1104         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1105
1106 2014-03-28  Stephanie Lewis  <slewis@apple.com>
1107
1108         Stop waking up the web process in the background because of plugin activity.
1109         Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
1110
1111         Reviewed by Anders Carlsson.
1112
1113         Plugin activity in the background can constantly wake up web processes.  This is only
1114         necessary when audio is playing to support web apps like Pandora and youtube playing 
1115         in the background.  Use a new api in CoreAudio to see if there is audio playing in
1116         the PluginProcess.
1117
1118         * PluginProcess/PluginProcess.cpp:
1119         (WebKit::PluginProcess::PluginProcess): Add a AudioHardwareListener
1120         (WebKit::PluginProcess::createWebProcessConnection): tell web process current state
1121         (WebKit::PluginProcess::audioHardwareDidBecomeActive): respond to audio hardware notifications
1122         (WebKit::PluginProcess::audioHardwareDidBecomeInactive):
1123         * PluginProcess/PluginProcess.h:
1124         * PluginProcess/WebProcessConnection.cpp: tell WebProcess when audio state in PluginProcess
1125              changes.
1126         (WebKit::WebProcessConnection::audioHardwareDidBecomeActive):
1127         (WebKit::WebProcessConnection::audioHardwareDidBecomeInactive):
1128         * PluginProcess/WebProcessConnection.h:
1129         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1130              Only invoke pageThrottler activity when playing audio
1131         (WebKit::NPRuntimeObjectMap::evaluate):
1132         * WebProcess/Plugins/Plugin.h: add function to get audio state
1133         (WebKit::Plugin::audioIsPlayingInPluginProcess):
1134         * WebProcess/Plugins/PluginProcessConnection.cpp: store audio state
1135         (WebKit::PluginProcessConnection::PluginProcessConnection):
1136         (WebKit::PluginProcessConnection::didReceiveMessage):
1137         (WebKit::PluginProcessConnection::audioHardwareDidBecomeActive):
1138         (WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive):
1139         * WebProcess/Plugins/PluginProcessConnection.h:
1140         (WebKit::PluginProcessConnection::audioIsPlaying):
1141         * WebProcess/Plugins/PluginProcessConnection.messages.in:
1142         * WebProcess/Plugins/PluginProxy.cpp:
1143         (WebKit::PluginProxy::audioIsPlayingInPluginProcess):
1144         * WebProcess/Plugins/PluginProxy.h:
1145         * WebProcess/Plugins/PluginView.cpp:
1146         (WebKit::PluginView::audioIsPlayingInPluginProcess):
1147         * WebProcess/Plugins/PluginView.h:
1148
1149 2014-03-28  Stephanie Lewis  <slewis@apple.com>
1150
1151         Have the plugin process track visibility of it’s plugin and sleep when none
1152         are visible.
1153         Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
1154         https://bugs.webkit.org/show_bug.cgi?id=130694
1155
1156         Reviewed by Anders Carlsson.
1157
1158         Currently AppSleep is enabled on the PluginProcess based on web page visibility.
1159         Add visibility tracking to plugins and move the decision to AppSleep into the the
1160         PluginProcess
1161
1162         * PluginProcess/PluginProcess.cpp:
1163         (WebKit::PluginProcess::PluginProcess): Add a new activity for visible plugins
1164         (WebKit::PluginProcess::pluginsForWebProcessDidBecomeVisible): take an activity
1165              assertion if any web processes have a visible plugin.
1166         (WebKit::PluginProcess::pluginsForWebProcessDidBecomeHidden): 
1167         * PluginProcess/PluginProcess.h:
1168         * PluginProcess/WebProcessConnection.cpp: 
1169         (WebKit::WebProcessConnection::removePluginControllerProxy): remove plugin from 
1170             visible plugins when destroying it
1171         (WebKit::WebProcessConnection::pluginDidBecomeVisible):
1172         (WebKit::WebProcessConnection::pluginDidBecomeHidden): track which plugins are
1173             visible for each web process
1174         * PluginProcess/WebProcessConnection.h:
1175         * PluginProcess/mac/PluginControllerProxyMac.mm:
1176         (WebKit::PluginControllerProxy::windowVisibilityChanged): notify WebProcessConnection
1177             when visibility changed.
1178         * UIProcess/WebContext.h:
1179         * UIProcess/mac/WebContextMac.mm:  instead of tracking plugin app sleep state on the web pref.
1180             and visibility state, just use the web pref.
1181         (WebKit::WebContext::updateProcessSuppressionState):
1182         (WebKit::WebContext::processSuppressionPreferenceIsEnabledForAllContexts):
1183
1184 2014-03-28  Brian Burg  <bburg@apple.com>
1185
1186         Web Replay: add page-level setting to bypass the MemoryCache
1187         https://bugs.webkit.org/show_bug.cgi?id=130728
1188
1189         Reviewed by Timothy Hatcher.
1190
1191         * UIProcess/APISession.cpp:
1192         (API::generateID): update the base ID for generating unique sessions.
1193
1194 2014-03-28  Cody Krieger  <cjk@apple.com>
1195
1196         Add willSubmitForm callback support to WKWebProcessPlugInFormDelegatePrivate.
1197
1198         https://bugs.webkit.org/show_bug.cgi?id=130875
1199
1200         Reviewed by Anders Carlsson.
1201
1202         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h:
1203         Add -_webProcessPlugInBrowserContextController:willSubmitForm:toFrame:fromFrame:withValues:
1204         to the WKWebProcessPlugInFormDelegatePrivate protocol.
1205
1206         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1207         Wire up the willSubmitForm() callback to the new
1208         WKWebProcessPlugInFormDelegatePrivate method.
1209
1210 2014-03-28  Alexey Proskuryakov  <ap@apple.com>
1211
1212         [Mac] Enable async text input implementation
1213         https://bugs.webkit.org/show_bug.cgi?id=130856
1214
1215         Reviewed by Sam Weinig.
1216
1217         * UIProcess/API/mac/WKView.mm: (-[WKView _interpretKeyEvent:completionHandler:]):
1218         Temporarily work around <rdar://16393434>.
1219
1220 2014-03-28  Alexey Proskuryakov  <ap@apple.com>
1221
1222         Move sync CancelComposition message under an ifdef
1223         https://bugs.webkit.org/show_bug.cgi?id=130908
1224
1225         Reviewed by Enrica Casucci.
1226
1227         * UIProcess/WebPageProxy.h:
1228         * UIProcess/ios/WebPageProxyIOS.mm:
1229         (WebKit::WebPageProxy::cancelComposition): Deleted.
1230         * UIProcess/mac/WebPageProxyMac.mm:
1231         * WebProcess/WebPage/WebPage.h:
1232         * WebProcess/WebPage/WebPage.messages.in:
1233         * WebProcess/WebPage/mac/WebPageMac.mm:
1234
1235 2014-03-28  Alexey Proskuryakov  <ap@apple.com>
1236
1237         [iOS] Don't cancel composition on selection change
1238         https://bugs.webkit.org/show_bug.cgi?id=130909
1239
1240         Reviewed by Enrica Casucci.
1241
1242         Fixing a recent regression from bug 130727.
1243
1244         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection):
1245
1246 2014-03-28  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1247
1248         [WK2] Removed unused method logChannelByName.
1249         https://bugs.webkit.org/show_bug.cgi?id=130897
1250
1251         Reviewed by Anders Carlsson.
1252
1253         * Platform/Logging.cpp:
1254         (WebKit::logChannelByName): Deleted.
1255         * Platform/Logging.h:
1256
1257 2014-03-28  Alexey Proskuryakov  <ap@apple.com>
1258
1259         Eliminate a sync cancelComposition call in WebPageProxy::editorStateChanged
1260         https://bugs.webkit.org/show_bug.cgi?id=130727
1261
1262         Reviewed by Enrica Casucci.
1263
1264         Added a separate CompositionWasCanceled IPC call, with which WebProcess can tell
1265         UIProcess that it should notify an input method of canceled composition. There are
1266         a lot of incorrect edge cases where we don't call it correctly, but this was true
1267         in the old implementation too (for different edge cases).
1268
1269         This change only affects iOS and async NSTextInputClient code path on Mac. I don't
1270         want to change sync NSTextInputClient code path unless absolutely necessary.
1271
1272         * UIProcess/WebPageProxy.cpp:
1273         (WebKit::WebPageProxy::WebPageProxy):
1274         (WebKit::WebPageProxy::editorStateChanged):
1275         (WebKit::WebPageProxy::compositionWasCanceled):
1276         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1277         * UIProcess/WebPageProxy.h:
1278         * UIProcess/WebPageProxy.messages.in:
1279         * UIProcess/mac/WebPageProxyMac.mm:
1280         (WebKit::WebPageProxy::insertText):
1281         (WebKit::WebPageProxy::executeKeypressCommands):
1282         * WebProcess/WebPage/WebPage.cpp:
1283         (WebKit::WebPage::didChangeSelection):
1284
1285 2014-03-28  Mario Sanchez Prada  <mario.prada@samsung.com>
1286
1287         [GTK] Running minibrowser with url crashes in debug build
1288         https://bugs.webkit.org/show_bug.cgi?id=130492
1289
1290         Reviewed by Martin Robinson.
1291
1292         Use the ResourceRequest(const URL& url) constructor, instead of the
1293         one taking a String, to call WebPageProxy::loadRequest(), so we
1294         ensure that the passed URI is correctly constructed.
1295
1296         * UIProcess/API/gtk/WebKitWebView.cpp:
1297         (webkit_web_view_load_uri): Create an URL out of a SoupURI and
1298         use that to create a ResourceRequest to pass to loadRequest().
1299
1300 2014-03-27  Pratik Solanki  <psolanki@apple.com>
1301
1302         [iOS WebKit2] Tweak cache sizes for iOS
1303         https://bugs.webkit.org/show_bug.cgi?id=130871
1304
1305         Reviewed by Sam Weinig.
1306
1307         Bring over the tweaks we had made to memory cache size for WebKit1 on iOS to WebKit2. These
1308         were made per findings in <rdar://8611638>.
1309
1310         * Shared/CacheModel.cpp:
1311         (WebKit::calculateCacheSizes):
1312
1313 2014-03-27  Jinwoo Song  <jinwoo7.song@samsung.com>
1314
1315         [WK2][EFL] Fix wrong parameter name in ewk_view_user_agent_set()
1316         https://bugs.webkit.org/show_bug.cgi?id=130888
1317
1318         Reviewed by Gyuyoung Kim.
1319
1320         * UIProcess/API/efl/ewk_view.h:
1321
1322 2014-03-27  Alexey Proskuryakov  <ap@apple.com>
1323
1324         Confirm composition in resignFirstResponder, don't cancel it
1325         https://bugs.webkit.org/show_bug.cgi?id=130852
1326
1327         Reviewed by Darin Adler.
1328
1329         * UIProcess/API/mac/WKView.mm: (-[WKView resignFirstResponder]):
1330
1331 2014-03-27  Pratik Solanki  <psolanki@apple.com>
1332
1333         [iOS WebKit2] Don't pass disk cache directory path on iOS
1334         https://bugs.webkit.org/show_bug.cgi?id=130862
1335
1336         Reviewed by Sam Weinig.
1337
1338         The diskPath passed to NSURLCache initializer is treated differently on Mac and iOS. Just
1339         pass nil for now until we sort out the API.
1340
1341         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1342         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1343         * WebProcess/cocoa/WebProcessCocoa.mm:
1344         (WebKit::WebProcess::platformInitializeWebProcess):
1345
1346 2014-03-27  Pratik Solanki  <psolanki@apple.com>
1347
1348         [iOS WebKit2] Share network process code between iOS and Mac
1349         https://bugs.webkit.org/show_bug.cgi?id=130861
1350
1351         Reviewed by Sam Weinig.
1352
1353         Implement network process functions for iOS by moving common code from NetworkProcessMac.mm
1354         to a new shared file NetworkProcessCocoa.mm and sharing between iOS and Mac.
1355
1356         * NetworkProcess/NetworkProcess.h:
1357         * NetworkProcess/cocoa/NetworkProcessCocoa.mm: Added.
1358         (WebKit::NetworkProcess::platformLowMemoryHandler):
1359         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1360         Common initialization code for iOS and Mac.
1361         (WebKit::memorySize):
1362         (WebKit::volumeFreeSize):
1363         (WebKit::NetworkProcess::platformSetCacheModel):
1364         * NetworkProcess/ios/NetworkProcessIOS.mm:
1365         (WebKit::NetworkProcess::initializeProcess):
1366         Remove unnecessary #if PLATFORM(IOS).
1367         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1368         * NetworkProcess/mac/NetworkProcessMac.mm:
1369         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1370         * WebKit2.xcodeproj/project.pbxproj:
1371
1372 2014-03-27  Enrica Casucci  <enrica@apple.com>
1373
1374         Add support for AirPlay picker in WK2 for iOS.
1375         https://bugs.webkit.org/show_bug.cgi?id=130855
1376         <rdar://problem/15349859>
1377
1378         Reviewed by Joseph Pecoraro and Benjamin Poulain.
1379
1380         Adds support to display the airplay picker for iPhone and iPad
1381         in WK2.
1382         The picker on iPad is displayed next to the airplay button.
1383
1384         * UIProcess/PageClient.h:
1385         * UIProcess/WebPageProxy.h:
1386         * UIProcess/WebPageProxy.messages.in:
1387         * UIProcess/ios/PageClientImplIOS.h:
1388         * UIProcess/ios/PageClientImplIOS.mm:
1389         (WebKit::PageClientImpl::showAirPlayRoutePicker):
1390         * UIProcess/ios/WKContentViewInteraction.h:
1391         * UIProcess/ios/WKContentViewInteraction.mm:
1392         (-[WKContentView _showAirPlayRoutePicker:fromRect:]):
1393         * UIProcess/ios/WebPageProxyIOS.mm:
1394         (WebKit::WebPageProxy::showAirPlayRoutePicker):
1395         * UIProcess/ios/forms/WKAirPlayRoutePicker.h: Added.
1396         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Added.
1397         (-[WKAirPlayRoutePicker initWithView:]):
1398         (-[WKAirPlayRoutePicker dealloc]):
1399         (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]):
1400         (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]):
1401         (-[WKAirPlayRoutePicker _windowWillRotate:]):
1402         (-[WKAirPlayRoutePicker _windowDidRotate:]):
1403         (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]):
1404         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]):
1405         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):
1406         (-[WKAirPlayRoutePicker show:fromRect:]):
1407         * WebKit2.xcodeproj/project.pbxproj:
1408         * WebProcess/WebCoreSupport/WebChromeClient.h:
1409         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1410         (WebKit::WebChromeClient::showAirPlayRoutePicker):
1411         * WebProcess/WebPage/WebPage.cpp:
1412         (WebKit::WebPage::touchEvent):
1413         (WebKit::WebPage::touchEventSyncForTesting):
1414         * WebProcess/WebPage/WebPage.h:
1415         * WebProcess/WebPage/ios/WebPageIOS.mm:
1416         (WebKit::WebPage::rectForElementAtInteractionLocation):
1417         (WebKit::WebPage::handleTap):
1418
1419 2014-03-27  Benjamin Poulain  <bpoulain@apple.com>
1420
1421         [WK2][iOS] <rdar://problem/16414684> WKWebView should draw a white background before the page loads
1422         https://bugs.webkit.org/show_bug.cgi?id=130873
1423
1424         Reviewed by Simon Fraser.
1425
1426         * UIProcess/API/Cocoa/WKWebView.mm:
1427         (-[WKWebView initWithFrame:configuration:]):
1428
1429 2014-03-27  Benjamin Poulain  <bpoulain@apple.com>
1430
1431         [iOS][WK2] Compute a good exposed rect when scaling WKContentView
1432         https://bugs.webkit.org/show_bug.cgi?id=130761
1433
1434         Reviewed by Simon Fraser.
1435
1436         Add a simple heuristic to improve tiling while zooming. In theory we could take the zoom
1437         center and scaleRate to split the speed between scrolling and pinching. In practice,
1438         zoom is transitory and is not as predictable as scrolling, so this patch just does a very
1439         simple heuristic:
1440         -When zooming in, do not expand coverage.
1441         -When zooming out, add half a tile size on every side.
1442
1443         * Shared/VisibleContentRectUpdateInfo.cpp:
1444         (WebKit::VisibleContentRectUpdateInfo::encode):
1445         (WebKit::VisibleContentRectUpdateInfo::decode):
1446         * Shared/VisibleContentRectUpdateInfo.h:
1447         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1448         (WebKit::VisibleContentRectUpdateInfo::timestamp):
1449         (WebKit::VisibleContentRectUpdateInfo::horizontalVelocity):
1450         (WebKit::VisibleContentRectUpdateInfo::verticalVelocity):
1451         (WebKit::VisibleContentRectUpdateInfo::scaleChangeRate):
1452         * UIProcess/ios/WKContentView.mm:
1453         (WebKit::HistoricalVelocityData::VelocityData::VelocityData):
1454         (WebKit::HistoricalVelocityData::velocityForNewData):
1455         (WebKit::HistoricalVelocityData::append):
1456         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1457         * WebProcess/WebPage/ios/WebPageIOS.mm:
1458
1459         (WebKit::adjustExposedRectForBoundedScale):
1460         When zooming past the maximum size, adjust the exposed rect to continue tiling the area
1461         at maximum size. Otherwise, we tile a tiny area, and have to retile larger when the animation
1462         pull back the view to maximum scale.
1463
1464         (WebKit::adjustVelocityDataForBoundedScale):
1465         Since we do not split the velocity from scrolling from the scaling, just clear the velocity when zooming.
1466         Also clear the scaleChangeRate when the scale is out of bounds. There is no reason to add tiles for
1467         temporary state.
1468
1469         (WebKit::WebPage::updateVisibleContentRects):
1470
1471 2014-03-27  Anders Carlsson  <andersca@apple.com>
1472
1473         Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
1474         https://bugs.webkit.org/show_bug.cgi?id=130868
1475
1476         Reviewed by Sam Weinig.
1477
1478         * Shared/API/Cocoa/RemoteObjectRegistry.h:
1479         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
1480         (WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
1481         * Shared/API/Cocoa/WKRemoteObject.h:
1482         * Shared/API/Cocoa/WKRemoteObject.mm:
1483         (-[WKRemoteObject _initWithObjectRegistry:interface:]):
1484         * Shared/API/Cocoa/WKRemoteObjectCoder.h:
1485         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1486         (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
1487         * Shared/API/Cocoa/WKRemoteObjectInterface.h:
1488         * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
1489         (isContainerClass): Deleted.
1490         (propertyListClasses): Deleted.
1491         (allowedArgumentClassesForMethod): Deleted.
1492         (initializeAllowedArgumentClasses): Deleted.
1493         (-[WKRemoteObjectInterface initWithProtocol:identifier:]): Deleted.
1494         (+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]): Deleted.
1495         (-[WKRemoteObjectInterface description]): Deleted.
1496         (classesForSelectorArgument): Deleted.
1497         (-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Deleted.
1498         (-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Deleted.
1499         (methodArgumentTypeEncodingForSelector): Deleted.
1500         (-[WKRemoteObjectInterface _methodSignatureForSelector:]): Deleted.
1501         (-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Deleted.
1502         * Shared/API/Cocoa/WKRemoteObjectRegistry.h:
1503         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
1504         (-[WKRemoteObjectRegistry registerExportedObject:interface:]): Deleted.
1505         (-[WKRemoteObjectRegistry unregisterExportedObject:interface:]): Deleted.
1506         (-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]): Deleted.
1507         (-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]): Deleted.
1508         (-[WKRemoteObjectRegistry _invalidate]): Deleted.
1509         (-[WKRemoteObjectRegistry _sendInvocation:interface:]): Deleted.
1510         (-[WKRemoteObjectRegistry WebKit::]): Deleted.
1511         (-[WKRemoteObjectRegistry _invokeMethod:]): Deleted.
1512         (-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
1513         * Shared/API/Cocoa/_WKRemoteObjectInterface.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h.
1514         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm.
1515         (isContainerClass):
1516         (propertyListClasses):
1517         (allowedArgumentClassesForMethod):
1518         (initializeAllowedArgumentClasses):
1519         (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
1520         (+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
1521         (-[_WKRemoteObjectInterface description]):
1522         (classesForSelectorArgument):
1523         (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
1524         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
1525         (methodArgumentTypeEncodingForSelector):
1526         (-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
1527         (-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
1528         * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h.
1529         * Shared/API/Cocoa/_WKRemoteObjectRegistry.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h.
1530         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm.
1531         (-[_WKRemoteObjectRegistry registerExportedObject:interface:]):
1532         (-[_WKRemoteObjectRegistry unregisterExportedObject:interface:]):
1533         (-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
1534         (-[_WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
1535         (-[_WKRemoteObjectRegistry _invalidate]):
1536         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
1537         (-[_WKRemoteObjectRegistry WebKit::]):
1538         (-[_WKRemoteObjectRegistry _invokeMethod:]):
1539         (-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
1540         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h.
1541         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1542         (-[WKBrowsingContextController _remoteObjectRegistry]):
1543         (-[WKBrowsingContextController remoteObjectRegistry]): Deleted.
1544         * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
1545         * UIProcess/API/Cocoa/WKWebView.mm:
1546         (-[WKWebView _remoteObjectRegistry]):
1547         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1548         * WebKit2.xcodeproj/project.pbxproj:
1549         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h.
1550         (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
1551         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1552         (-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
1553         (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]): Deleted.
1554         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1555
1556 2014-03-27  Commit Queue  <commit-queue@webkit.org>
1557
1558         Unreviewed, rolling out r166360.
1559         https://bugs.webkit.org/show_bug.cgi?id=130869
1560
1561         Seems to have broken PLT (Requested by ap on #webkit).
1562
1563         Reverted changeset:
1564
1565         "Connection::dispatchOneMessage() can be re-entered while
1566         handling Cmd-key menu"
1567         https://bugs.webkit.org/show_bug.cgi?id=130767
1568         http://trac.webkit.org/changeset/166360
1569
1570 2014-03-27  Sam Weinig  <sam@webkit.org>
1571
1572         Support dynamic layer hosting context changes
1573         <rdar://problem/16278019>
1574         https://bugs.webkit.org/show_bug.cgi?id=130863
1575
1576         Reviewed by Anders Carlsson.
1577
1578         * UIProcess/API/mac/WKView.mm:
1579         (-[WKView addWindowObserversForWindow:]):
1580         (-[WKView removeWindowObservers]):
1581         (-[WKView _windowDidChangeLayerHosting:]):
1582         * UIProcess/WebPageProxy.cpp:
1583         (WebKit::WebPageProxy::layerHostingModeDidChange):
1584         * UIProcess/WebPageProxy.h:
1585
1586 2014-03-27  Simon Fraser  <simon.fraser@apple.com>
1587
1588         Don't leak the WKBrowsingContextController
1589         https://bugs.webkit.org/show_bug.cgi?id=130815
1590
1591         Reviewed by Tim Horton.
1592         
1593         Use adoptNS to avoid leaking the WKBrowsingContextController.
1594
1595         * UIProcess/ios/WKContentView.mm:
1596         (-[WKContentView browsingContextController]):
1597
1598 2014-03-27  Joseph Pecoraro  <pecoraro@apple.com>
1599
1600         Web Inspector: Give WebProcess a proxy application entitlement
1601         https://bugs.webkit.org/show_bug.cgi?id=130806
1602
1603         Reviewed by Timothy Hatcher.
1604
1605         * Configurations/WebContent-iOS.entitlements:
1606
1607 2014-03-27  Anders Carlsson  <andersca@apple.com>
1608
1609         Add reload and reloadFromOrigin as API
1610         https://bugs.webkit.org/show_bug.cgi?id=130858
1611
1612         Reviewed by Simon Fraser.
1613
1614         * UIProcess/API/Cocoa/WKWebView.h:
1615         * UIProcess/API/Cocoa/WKWebView.mm:
1616         (-[WKWebView reload]):
1617         (-[WKWebView reloadFromOrigin]):
1618         (-[WKWebView validateUserInterfaceItem:]):
1619         (-[WKWebView reload:]):
1620         (-[WKWebView reloadFromOrigin:]):
1621
1622 2014-03-27  Anders Carlsson  <andersca@apple.com>
1623
1624         Rename WKFrameHandle to _WKFrameHandle
1625         https://bugs.webkit.org/show_bug.cgi?id=130847
1626
1627         Reviewed by Tim Horton.
1628
1629         * Shared/API/Cocoa/_WKFrameHandle.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.h.
1630         * Shared/API/Cocoa/_WKFrameHandle.mm: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.mm.
1631         (-[_WKFrameHandle dealloc]):
1632         (-[_WKFrameHandle isEqual:]):
1633         (-[_WKFrameHandle hash]):
1634         (-[_WKFrameHandle _frameID]):
1635         (-[_WKFrameHandle copyWithZone:]):
1636         (+[_WKFrameHandle supportsSecureCoding]):
1637         (-[_WKFrameHandle initWithCoder:]):
1638         (-[_WKFrameHandle encodeWithCoder:]):
1639         (-[_WKFrameHandle API::]):
1640         * Shared/API/Cocoa/_WKFrameHandleInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandleInternal.h.
1641         (WebKit::wrapper):
1642         * Shared/Cocoa/APIObject.mm:
1643         (API::Object::newObject):
1644         * WebKit2.xcodeproj/project.pbxproj:
1645         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
1646         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1647         (+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]):
1648         (-[WKWebProcessPlugInFrame handle]):
1649         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
1650
1651 2014-03-27  Alexey Proskuryakov  <ap@apple.com>
1652
1653         Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
1654         equivalents, ASSERT(!_data->_keyDownEventBeingResent)
1655         https://bugs.webkit.org/show_bug.cgi?id=130767
1656         <rdar://problem/16307487>
1657
1658         Reviewed by Darin Adler.
1659
1660         * Shared/WebKit2Initialize.cpp: (WebKit::InitializeWebKit2): Added NSModalPanelRunLoopMode
1661         to RunLoop event source and timer modes.
1662
1663 2014-03-27  Jae Hyun Park  <jaepark@webkit.org>
1664
1665         Remove LayerTreeContextCairo.cpp
1666         https://bugs.webkit.org/show_bug.cgi?id=130807
1667
1668         Reviewed by Martin Robinson.
1669
1670         * Shared/cairo/LayerTreeContextCairo.cpp: Removed.
1671
1672 2014-03-27  Maciej Florek  <m.florek@samsung.com>
1673
1674         [EFL][WK2] Add tests of the set process model API
1675         https://bugs.webkit.org/show_bug.cgi?id=130830
1676
1677         Reviewed by Gyuyoung Kim.
1678
1679         Implement unit tests to check, if process model API works
1680         properly. When process model is set to EWK_PROCESS_MODEL_SHARED_SECONDARY,
1681         there should be only one WebProcess. In case of EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
1682         setting, each WebView should have own process, as well as the network process
1683         should exist.
1684
1685         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1686         (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
1687         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
1688         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1689         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1690         (EWK2ContextTestMultipleProcesses::EWK2ContextTestMultipleProcesses):
1691         (TEST_F):
1692
1693 2014-03-27  Commit Queue  <commit-queue@webkit.org>
1694
1695         Unreviewed, rolling out r166296 and r166331.
1696         https://bugs.webkit.org/show_bug.cgi?id=130822
1697
1698         caused some crashes and frequent assertion failures, and the
1699         fix is going to take a little while (Requested by thorton on
1700         #webkit).
1701
1702         Reverted changesets:
1703
1704         "[iOS WebKit2] Flush all surfaces after painting into all of
1705         them, instead of after painting into each one"
1706         https://bugs.webkit.org/show_bug.cgi?id=130768
1707         http://trac.webkit.org/changeset/166296
1708
1709         "Assertion failure in RemoteLayerBackingStore::flush"
1710         https://bugs.webkit.org/show_bug.cgi?id=130810
1711         http://trac.webkit.org/changeset/166331
1712
1713 2014-03-26  Tim Horton  <timothy_horton@apple.com>
1714
1715         Blind speculative iOS build fix.
1716
1717         * WebProcess/WebPage/ios/WebPageIOS.mm:
1718         (WebKit::WebPage::viewportConfigurationChanged):
1719
1720 2014-03-26  Benjamin Poulain  <bpoulain@apple.com>
1721
1722         [iOS][WK2] <rdar://problem/16265272> REGRESSION (WebKit2): Some pages appear blank until you scroll
1723         https://bugs.webkit.org/show_bug.cgi?id=130819
1724
1725         Reviewed by Tim Horton.
1726
1727         When loading a new page, we never define the unobscured rect and exposed rect on the new frame.
1728         As a result, there is nothing to render.
1729
1730         It uses to work thanks to dumb luck and a bug in Safari updating the visibleContentRects from
1731         the UIProcess. Now that the bug is gone, "dumb luck" is not reliable enough to get the content rects :)
1732
1733         What this patch does is save if we have ever received new rects from the UI. If we have not, create them
1734         based on the minimum layout size. This works because we know Safari shows the minimum layout size by default
1735         and will tell us if it changes the obscured rects.
1736
1737         * WebProcess/WebPage/WebPage.cpp:
1738         (WebKit::WebPage::WebPage):
1739         (WebKit::WebPage::didCommitLoad):
1740         * WebProcess/WebPage/WebPage.h:
1741         * WebProcess/WebPage/ios/WebPageIOS.mm:
1742         (WebKit::WebPage::viewportConfigurationChanged):
1743         (WebKit::WebPage::updateVisibleContentRects):
1744
1745 2014-03-26  Anders Carlsson  <andersca@apple.com>
1746
1747         Add a _WKScriptWorld class
1748         https://bugs.webkit.org/show_bug.cgi?id=130817
1749
1750         Reviewed by Dan Bernstein.
1751
1752         * UIProcess/API/Cocoa/_WKScriptWorld.h: Added.
1753         * UIProcess/API/Cocoa/_WKScriptWorld.mm: Added.
1754         (generateWorldID):
1755         (+[_WKScriptWorld defaultWorld]):
1756         (-[_WKScriptWorld init]):
1757         (-[_WKScriptWorld _initWithWorldID:]):
1758         * WebKit2.xcodeproj/project.pbxproj:
1759
1760 2014-03-26  Anders Carlsson  <andersca@apple.com>
1761
1762         Rename a delegate method to -webView:didFinishNavigation:
1763         https://bugs.webkit.org/show_bug.cgi?id=130814
1764
1765         Reviewed by Sam Weinig.
1766
1767         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1768         * UIProcess/Cocoa/NavigationState.h:
1769         * UIProcess/Cocoa/NavigationState.mm:
1770         (WebKit::NavigationState::setNavigationDelegate):
1771         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
1772
1773 2014-03-26  Tim Horton  <timothy_horton@apple.com>
1774
1775         [iOS WebKit2] Crashes on swipe
1776         <rdar://problem/16440867>
1777
1778         Reviewed by Benjamin Poulain.
1779
1780         * UIProcess/ios/ViewGestureControllerIOS.mm:
1781         (WebKit::ViewGestureController::beginSwipeGesture):
1782         Get the IOSurfaceRef from the WebCore::IOSurface.
1783
1784 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
1785
1786         Fix the build: include UIKit headers inside the iOS #ifdef.
1787
1788         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1789
1790 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
1791
1792         Hook up -webkit-overflow-scrolling:touch for iOS WK2
1793         https://bugs.webkit.org/show_bug.cgi?id=130809
1794
1795         Reviewed by Tim Horton.
1796
1797         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1798         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1799         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
1800         Set the content size of the UIScrollVIew based on the geometry.
1801         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1802         (WebKit::RemoteLayerTreeHost::createLayer): Make a UIScrollView if the
1803         layer properties tell us that we have the scrolling behavior.
1804         * UIProcess/ios/WKContentView.mm:
1805         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
1806         We need to allow user interaction in the _rootContentView so that events get to
1807         nested UIScrollViews (this could be optimized in future).
1808         * UIProcess/mac/RemoteLayerTreeHost.h:
1809         * UIProcess/mac/RemoteLayerTreeHost.mm:
1810         (WebKit::RemoteLayerTreeHost::updateLayerTree):
1811         (WebKit::RemoteLayerTreeHost::createLayer): Need to pass RemoteLayerTreeTransaction::LayerProperties
1812         in so we can get at the custom behavior.
1813
1814 2014-03-26  Anders Carlsson  <andersca@apple.com>
1815
1816         Add -[WKWebView stopLoading]
1817         https://bugs.webkit.org/show_bug.cgi?id=130812
1818
1819         Reviewed by Tim Horton.
1820
1821         * UIProcess/API/Cocoa/WKWebView.h:
1822         * UIProcess/API/Cocoa/WKWebView.mm:
1823         (-[WKWebView stopLoading]):
1824
1825 2014-03-26  Tim Horton  <timothy_horton@apple.com>
1826
1827         Assertion failure in RemoteLayerBackingStore::flush
1828         https://bugs.webkit.org/show_bug.cgi?id=130810
1829         <rdar://problem/16439276>
1830
1831         Reviewed by Simon Fraser.
1832
1833         * Shared/mac/RemoteLayerBackingStore.mm:
1834         (RemoteLayerBackingStore::flush):
1835         We don't always have backing store to flush, if platformCALayerDrawsContent() is false.
1836         We also can't assert that we have a back surface, because the very first paint will not.
1837
1838 2014-03-26  Andy Estes  <aestes@apple.com>
1839
1840         [Cocoa] Expose DownloadClient::didFail() and DownloadClient::didCancel()
1841         https://bugs.webkit.org/show_bug.cgi?id=130805
1842
1843         Reviewed by Dan Bernstein.
1844
1845         * UIProcess/API/Cocoa/_WKDownloadDelegate.h:
1846         * UIProcess/Cocoa/DownloadClient.h:
1847         * UIProcess/Cocoa/DownloadClient.mm:
1848         (WebKit::DownloadClient::DownloadClient):
1849         (WebKit::DownloadClient::didFail):
1850         (WebKit::DownloadClient::didCancel):
1851
1852 2014-03-26  Cody Krieger  <cjk@apple.com>
1853
1854         -[WKWebProcessPlugInNodeHandle HTMLInputElementIsUserEdited] and -HTMLTextAreaElementIsUserEdited do not return the correct values.
1855
1856         https://bugs.webkit.org/show_bug.cgi?id=130804
1857
1858         Reviewed by Dan Bernstein.
1859
1860         The existing implementations of these methods are mis-cased
1861         ("HTMLInputELementIsUserEdited" and "HTMLTextAreaELementIsUserEdited" —
1862         note the "EL" in both cases). This results in us getting
1863         auto-synthesized getters for the HTMLInputElementIsUserEdited and
1864         HTMLTextAreaElementIsUserEdited properties, which will return NO
1865         unconditionally.
1866
1867         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1868         Fix the capitalization of -HTMLInputElementIsUserEdited and
1869         -HTMLTextAreaElementIsUserEdited.
1870
1871 2014-03-26  Andy Estes  <aestes@apple.com>
1872
1873         [Cocoa] Expose DownloadProxy::cancel()
1874         https://bugs.webkit.org/show_bug.cgi?id=130799
1875
1876         Reviewed by Dan Bernstein.
1877
1878         * UIProcess/API/Cocoa/_WKDownload.h:
1879         * UIProcess/API/Cocoa/_WKDownload.mm:
1880         (-[_WKDownload cancel]):
1881
1882 2014-03-26  Timothy Hatcher  <timothy@apple.com>
1883
1884         Propagate the hiddenFromInspector flag on ResourceRequest in
1885         places when a new request a made or passed between processes.
1886
1887         https://bugs.webkit.org/show_bug.cgi?id=130741
1888
1889         Reviewed by Joseph Pecoraro.
1890
1891         * NetworkProcess/NetworkResourceLoader.cpp:
1892         (WebKit::NetworkResourceLoader::continueWillSendRequest): Use updateFromDelegatePreservingOldProperties.
1893         * Shared/WebCoreArgumentCoders.cpp:
1894         (IPC::ArgumentCoder<ResourceRequest>::encode): Added hiddenFromInspector support.
1895         (IPC::ArgumentCoder<ResourceRequest>::decode): Ditto.
1896         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
1897         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): Ditto.
1898
1899 2014-03-26  Andy Estes  <aestes@apple.com>
1900
1901         [Cocoa] Expose DownloadProxy::request()
1902         https://bugs.webkit.org/show_bug.cgi?id=130796
1903
1904         Reviewed by Anders Carlsson.
1905
1906         * UIProcess/API/Cocoa/_WKDownload.h:
1907         * UIProcess/API/Cocoa/_WKDownload.mm:
1908         (-[_WKDownload request]):
1909
1910 2014-03-26  Anders Carlsson  <andersca@apple.com>
1911
1912         Pass a real FrameLoadRequest to Chrome::createWindow
1913         https://bugs.webkit.org/show_bug.cgi?id=130795
1914
1915         Reviewed by Dan Bernstein.
1916
1917         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1918         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
1919
1920 2014-03-26  Jeremy Jones  <jeremyj@apple.com>
1921
1922         Implement hasLiveStreamingContent property in WebAVPlayerController
1923         https://bugs.webkit.org/show_bug.cgi?id=128684
1924
1925         Reviewed by Simon Fraser.
1926
1927         Plumb through the seekable ranges to the fullscreen interface.
1928
1929         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1930         Add declaration for setSeekableRangesVector()
1931
1932         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1933         Add interface SetSeekableRangesVector()
1934
1935         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1936         (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
1937         Add setSeekableRangesVector that translates the vector into a TimeRanges and calls setSeekableRanges()
1938
1939         * WebProcess/ios/WebVideoFullscreenManager.h:
1940         Add setSeekableRanges()
1941
1942         * WebProcess/ios/WebVideoFullscreenManager.mm:
1943         (WebKit::WebVideoFullscreenManager::setSeekableRanges):
1944         setSeekableRanges() converts TimeRanges to Vector and calls SetSeekableRangesVector()
1945
1946 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
1947
1948         Add a custom behavior flag to GraphicsLayer, piped down to PlatformCALayer, for scrolling layers
1949         https://bugs.webkit.org/show_bug.cgi?id=130778
1950
1951         Reviewed by Tim Horton.
1952
1953         Make it possible to put a "custom behavior" flag on a layer so that,
1954         with UI-side compositing, we know to create a specific type of
1955         layer or view for that GraphicsLayer.
1956
1957         * Shared/mac/RemoteLayerTreeTransaction.h:
1958         * Shared/mac/RemoteLayerTreeTransaction.mm:
1959         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1960         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1961         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1962         (WebKit::dumpChangedLayers):
1963         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1964         (PlatformCALayerRemote::customBehavior):
1965         (PlatformCALayerRemote::updateCustomBehavior):
1966         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1967
1968 2014-03-26  Zoltan Horvath  <zoltan@webkit.org>
1969
1970         [CSS Shapes] Remove shape-inside support
1971         https://bugs.webkit.org/show_bug.cgi?id=130698
1972
1973         Reviewed by David Hyatt.
1974
1975         * Configurations/FeatureDefines.xcconfig:
1976
1977 2014-03-26  Tim Horton  <timothy_horton@apple.com>
1978
1979         [iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
1980         https://bugs.webkit.org/show_bug.cgi?id=130768
1981         <rdar://problem/16421471>
1982
1983         Reviewed by Simon Fraser.
1984
1985         * Shared/mac/RemoteLayerBackingStore.h:
1986         Add flush(), which synchronously flushes painting operations on the underlying backing store.
1987         Factor clearBackingStore() out of ensureBackingStore/display, which releases our reference to underlying backing store.
1988         Add two members for storing the back surface and front buffer context until flush() is called.
1989                 - We need to keep the back surface alive because the CGImageRef created from it is referenced by
1990                 the front surface's drawing queue, and won't be freed until said queue is flushed. If we release
1991                 the back surface (and its associated CGContextRef) *before* the CGImageRef is freed, we will
1992                 do an expensive readback of the surface.
1993                 - When not using accelerated drawing, we need to keep the front buffer's CGContextRef around
1994                 until the flush occurs so that we can avoid re-creating it in order to perform the flush. This
1995                 happens automatically in the accelerated drawing case via WebCore::IOSurface.
1996
1997         * Shared/mac/RemoteLayerBackingStore.mm:
1998         (RemoteLayerBackingStore::ensureBackingStore):
1999         (RemoteLayerBackingStore::clearBackingStore):
2000         (RemoteLayerBackingStore::display):
2001         Factor clearBackingStore() out of ensureBackingStore() and display().
2002         Update a comment about the above performance gotcha.
2003         Store the current back surface/front buffer context.
2004
2005         (RemoteLayerBackingStore::drawInContext):
2006         Don't flush the context immediately after painting.
2007
2008         (RemoteLayerBackingStore::applyBackingStoreToLayer):
2009         Move things around to reduce duplicated code.
2010
2011         (RemoteLayerBackingStore::flush):
2012         Flush the current front surface/buffer's context.
2013         Clear the new pending-flush members.
2014
2015         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2016         (WebKit::flushBackingStoreChangesInTransaction):
2017         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2018         Crawl through all of the valid changed backing stores in the transaction and flush them.
2019         Remove a completely useless assertion.
2020
2021 2014-03-25  Simon Fraser  <simon.fraser@apple.com>
2022
2023         Add a new type of scrolling tree node for overflow scrolling
2024         https://bugs.webkit.org/show_bug.cgi?id=130763
2025
2026         Reviewed by Tim Horton.
2027
2028         Prepare for overflow scrolling via the scrolling tree by adding
2029         a new scrolling node type for overflow:scroll nodes. Mostly
2030         this is a new ScrollingNodeType that gets mapped to the same
2031         scrolling state nodes and scrolling nodes, but iOS creates
2032         state and scrolling nodes specific to overflow:scroll.
2033         
2034         Change the type checking on nodes to use virtual functions instead
2035         of just checking the node type, to allow the macros to work with
2036         the new scrolling node type.
2037
2038         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2039         (WebKit::encodeNodeAndDescendants):
2040         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2041         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2042         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2043         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2044         (WebKit::RemoteScrollingTree::createNode):
2045         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
2046         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
2047         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
2048         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
2049         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
2050         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2051         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2052         * WebKit2.xcodeproj/project.pbxproj:
2053
2054 2014-03-26  Zan Dobersek  <zdobersek@igalia.com>
2055
2056         Unreviewed. Removing the remaining Automake cruft.
2057
2058         * GNUmakefile.list.am: Removed.
2059
2060 2014-03-25  Pratik Solanki  <psolanki@apple.com>
2061
2062         Remove PLATFORM(IOS) from NetworkProcessMac.mm
2063         https://bugs.webkit.org/show_bug.cgi?id=130751
2064
2065         Reviewed by Alexey Proskuryakov.
2066
2067         Code in NetworkProcessMac.mm is guarded by PLATFORM(MAC) and so is not compiled on iOS.
2068         Having PLATFORM(IOS) code in this file is unnecessary and confusing.
2069
2070         * NetworkProcess/mac/NetworkProcessMac.mm:
2071         (WebKit::NetworkProcess::initializeProcessName):
2072         (WebKit::overrideSystemProxies):
2073         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2074
2075 2014-03-25  Anders Carlsson  <andersca@apple.com>
2076
2077         Add a UI delegate callback for handling window.open
2078         https://bugs.webkit.org/show_bug.cgi?id=130757
2079
2080         Reviewed by Sam Weinig.
2081
2082         * UIProcess/API/Cocoa/WKUIDelegate.h:
2083         * UIProcess/API/Cocoa/WKWebView.mm:
2084         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2085         * UIProcess/Cocoa/UIClient.h:
2086         * UIProcess/Cocoa/UIClient.mm:
2087         (WebKit::UIClient::setDelegate):
2088         (WebKit::UIClient::createNewPage):
2089
2090 2014-03-25  Anders Carlsson  <andersca@apple.com>
2091
2092         Move stopLoading: back for now.
2093
2094         * UIProcess/API/Cocoa/WKWebView.h:
2095         * UIProcess/API/Cocoa/WKWebView.mm:
2096         (-[WKWebView stopLoading:]):
2097
2098 2014-03-25  Anders Carlsson  <andersca@apple.com>
2099
2100         Change toolbarVisibility back to toolbarsVisibility
2101         https://bugs.webkit.org/show_bug.cgi?id=130749
2102
2103         Reviewed by Tim Horton.
2104
2105         * UIProcess/API/Cocoa/WKWindowFeatures.h:
2106         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
2107         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
2108
2109 2014-03-25  Anders Carlsson  <andersca@apple.com>
2110
2111         Pass the source frame to the CreateNewPage message
2112         https://bugs.webkit.org/show_bug.cgi?id=130752
2113
2114         Reviewed by Tim Horton.
2115
2116         * UIProcess/API/APIUIClient.h:
2117         (API::UIClient::createNewPage):
2118         * UIProcess/API/C/WKPage.cpp:
2119         (WKPageSetPageUIClient):
2120         * UIProcess/WebPageProxy.cpp:
2121         (WebKit::WebPageProxy::createNewPage):
2122         * UIProcess/WebPageProxy.h:
2123         * UIProcess/WebPageProxy.messages.in:
2124         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2125         (WebKit::WebChromeClient::createWindow):
2126
2127 2014-03-25  Anders Carlsson  <andersca@apple.com>
2128
2129         Add a WebFrame::fromCoreFrame static member function and use it where possible
2130         https://bugs.webkit.org/show_bug.cgi?id=130744
2131
2132         Reviewed by Tim Horton.
2133
2134         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2135         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
2136         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2137         (WebKit::InjectedBundleNodeHandle::documentFrame):
2138         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
2139         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
2140         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2141         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2142         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2143         (WebKit::InjectedBundleDOMWindowExtension::frame):
2144         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2145         (WebKit::InjectedBundleHitTestResult::frame):
2146         (WebKit::InjectedBundleHitTestResult::targetFrame):
2147         * WebProcess/Plugins/PluginView.cpp:
2148         (WebKit::webPage):
2149         (WebKit::PluginView::performFrameLoadURLRequest):
2150         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2151         (WebKit::WebChromeClient::focusedElementChanged):
2152         (WebKit::WebChromeClient::focusedFrameChanged):
2153         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2154         (WebKit::WebChromeClient::runJavaScriptAlert):
2155         (WebKit::WebChromeClient::runJavaScriptConfirm):
2156         (WebKit::WebChromeClient::runJavaScriptPrompt):
2157         (WebKit::WebChromeClient::print):
2158         (WebKit::WebChromeClient::exceededDatabaseQuota):
2159         (WebKit::WebChromeClient::runOpenPanel):
2160         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2161         (WebKit::WebEditorClient::textFieldDidBeginEditing):
2162         (WebKit::WebEditorClient::textFieldDidEndEditing):
2163         (WebKit::WebEditorClient::textDidChangeInTextField):
2164         (WebKit::WebEditorClient::textDidChangeInTextArea):
2165         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
2166         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
2167         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2168         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2169         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
2170         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
2171         * WebProcess/WebPage/WebFrame.cpp:
2172         (WebKit::WebFrame::fromCoreFrame):
2173         (WebKit::WebFrame::contentsAsString):
2174         (WebKit::WebFrame::parentFrame):
2175         (WebKit::WebFrame::childFrames):
2176         (WebKit::WebFrame::frameForContext):
2177         (WebKit::WebFrame::webArchiveData):
2178         * WebProcess/WebPage/WebFrame.h:
2179
2180 2014-03-25  Jeffrey Pfau  <jpfau@apple.com>
2181
2182         [WK2] Schemes registered as cache partitioned are not properly registered in new web processes
2183         https://bugs.webkit.org/show_bug.cgi?id=130739
2184
2185         Reviewed by Anders Carlsson.
2186
2187         * WebProcess/WebProcess.cpp:
2188         (WebKit::WebProcess::initializeWebProcess):
2189
2190 2014-03-25  Joseph Pecoraro  <pecoraro@apple.com>
2191
2192         [iOS] Inspector View Indication Support
2193         https://bugs.webkit.org/show_bug.cgi?id=130709
2194
2195         Reviewed by Simon Fraser.
2196
2197         * UIProcess/ios/WKContentView.h:
2198         * UIProcess/ios/WKContentView.mm:
2199         (-[WKInspectorIndicationView initWithFrame:]):
2200         (-[WKContentView isShowingInspectorIndication]):
2201         (-[WKContentView setShowingInspectorIndication:]):
2202         (-[WKContentView _didCommitLayerTree:WebKit::]):
2203         When indicating include a simple tinted UIView over the content.
2204
2205         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2206         * UIProcess/API/Cocoa/WKWebView.mm:
2207         (-[WKWebView _showInspectorIndication]):
2208         (-[WKWebView _hideInspectorIndication]):
2209         Have the content view show or hide an indication.
2210
2211         * UIProcess/PageClient.h:
2212         * UIProcess/ios/PageClientImplIOS.h:
2213         * UIProcess/ios/PageClientImplIOS.mm:
2214         (WebKit::PageClientImpl::showInspectorIndication):
2215         (WebKit::PageClientImpl::hideInspectorIndication):
2216         * UIProcess/WebPageProxy.h:
2217         * UIProcess/WebPageProxy.messages.in:
2218         * UIProcess/ios/WebPageProxyIOS.mm:
2219         (WebKit::WebPageProxy::showInspectorIndication):
2220         (WebKit::WebPageProxy::hideInspectorIndication):
2221         Pass WebProcess indication message up to the WKWebView.
2222
2223         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2224         (WebKit::WebInspectorClient::indicate):
2225         (WebKit::WebInspectorClient::hideIndication):
2226         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2227         * WebProcess/WebPage/WebPage.h:
2228         * WebProcess/WebPage/ios/WebPageIOS.mm:
2229         (WebKit::WebPage::indicate):
2230         (WebKit::WebPage::hideIndication):
2231         Pass WebCore / remote inspector indication message up to UIProcess.
2232
2233 2014-03-25  Anders Carlsson  <andersca@apple.com>
2234
2235         Add more properties to WKWindowFeatures
2236         https://bugs.webkit.org/show_bug.cgi?id=130738
2237
2238         Reviewed by Tim Horton.
2239
2240         * UIProcess/API/Cocoa/WKWindowFeatures.h:
2241         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
2242         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
2243         (-[WKWindowFeatures menuBarVisibility]):
2244         (-[WKWindowFeatures statusBarVisibility]):
2245         (-[WKWindowFeatures toolbarsVisibility]):
2246         (-[WKWindowFeatures allowsResizing]):
2247
2248 2014-03-25  Anders Carlsson  <andersca@apple.com>
2249
2250         Fix iOS build.
2251
2252         * UIProcess/API/Cocoa/WKWebView.h:
2253         * UIProcess/API/Cocoa/WKWebView.mm:
2254         Make WKIBActions OS X only for now.
2255
2256 2014-03-25  Anders Carlsson  <andersca@apple.com>
2257
2258         Begin stubbing out a WKWindowFeatures class
2259         https://bugs.webkit.org/show_bug.cgi?id=130733
2260
2261         Reviewed by Dan Bernstein.
2262
2263         * UIProcess/API/Cocoa/WKWindowFeatures.h: Added.
2264         * UIProcess/API/Cocoa/WKWindowFeatures.mm: Added.
2265         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
2266         (-[WKWindowFeatures x]):
2267         (-[WKWindowFeatures y]):
2268         (-[WKWindowFeatures width]):
2269         (-[WKWindowFeatures height]):
2270         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Added.
2271         * WebKit2.xcodeproj/project.pbxproj:
2272
2273 2014-03-25  Anders Carlsson  <andersca@apple.com>
2274
2275         Add goBack: and goForward: IBActions and move stopLoading: to a new WKIBActions category on WKWebView
2276         https://bugs.webkit.org/show_bug.cgi?id=130732
2277
2278         Reviewed by Tim Horton.
2279
2280         * UIProcess/API/Cocoa/WKWebView.h:
2281         * UIProcess/API/Cocoa/WKWebView.mm:
2282         (-[WKWebView goBack]):
2283         (-[WKWebView goForward]):
2284         (-[WKWebView validateUserInterfaceItem:]):
2285         (-[WKWebView goBack:]):
2286         (-[WKWebView goForward:]):
2287         (-[WKWebView stopLoading:]):
2288
2289 2014-03-25  Martin Robinson  <mrobinson@igalia.com>
2290
2291         [GTK] Remove the autotools build
2292         https://bugs.webkit.org/show_bug.cgi?id=130717
2293
2294         Reviewed by Anders Carlsson.
2295
2296         * GNUmakefile.am: Removed.
2297         * WebKit2Prefix.h: Removed references to the autotools configure file.
2298         * config.h: Ditto.
2299
2300 2014-03-25  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2301
2302         [EFL][WK2] Add NETWORK_PROCESS build option
2303         https://bugs.webkit.org/show_bug.cgi?id=130131
2304
2305         Reviewed by Gyuyoung Kim.
2306
2307         * PlatformEfl.cmake: Add file needed to build with NETWORK_PROCESS enabled.
2308
2309 2014-03-24 Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2310
2311         [EFL][WK2] Add an API to set process model
2312         https://bugs.webkit.org/show_bug.cgi?id=130133
2313
2314         Reviewed by Gyuyoung Kim.
2315
2316         Implement an API to set and get process model in ewk_context.
2317         By default process model enum value is set to EWK_PROCESS_MODEL_SHARED_SECONDARY
2318         which keeps current behaviour. Setting EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
2319         will make each web view use separate web process, also enables network process.
2320
2321         * UIProcess/API/efl/ewk_context.cpp:
2322         (toWKProcessModel):
2323         (EwkContext::setProcessModel):
2324         (toEwkProcessModel):
2325         (EwkContext::processModel):
2326         (ewk_context_process_model_set):
2327         (ewk_context_process_model_get):
2328         * UIProcess/API/efl/ewk_context.h:
2329         * UIProcess/API/efl/ewk_context_private.h:
2330         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2331         (TEST_F):
2332
2333 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
2334
2335         AX: hit-testing doesn't always work correctly with WK2
2336         https://bugs.webkit.org/show_bug.cgi?id=130706
2337
2338         Reviewed by Simon Fraser.
2339
2340         Accessibility code was trying to do screenToRootView itself, and in 
2341         some cases with embedded WK2 views that did not work.
2342
2343         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
2344         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2345
2346 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
2347
2348         [WK2] SpinLock are not initialized by default, ViewUpdateDispatcher is missing an initializer
2349         https://bugs.webkit.org/show_bug.cgi?id=130705
2350
2351         Reviewed by Simon Fraser.
2352
2353         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2354         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
2355
2356 2014-03-24  Enrica Casucci  <enrica@apple.com>
2357
2358         [iOS WebKit2] Dictation support.
2359         https://bugs.webkit.org/show_bug.cgi?id=130622
2360         <rdar://problem/15337316>
2361
2362         Reviewed by Benjamin Poulain.
2363
2364         Adding support for dictation on iOS. There are two main types of interactions
2365         with the dictation system:
2366         - initial request for context, which consists in retrieving the selected text
2367         and 5 words before the selection and 5 words after, if available.
2368         - insertion of recognized chunks of text, providing the text
2369         to replace.
2370     
2371         * UIProcess/AutoCorrectionCallback.h:
2372         (WebKit::DictationContextCallback::create):
2373         (WebKit::DictationContextCallback::~DictationContextCallback):
2374         (WebKit::DictationContextCallback::performCallbackWithReturnValue):
2375         (WebKit::DictationContextCallback::invalidate):
2376         (WebKit::DictationContextCallback::DictationContextCallback):
2377         * UIProcess/WebPageProxy.h:
2378         * UIProcess/WebPageProxy.messages.in:
2379         * UIProcess/ios/WKContentViewInteraction.h:
2380         * UIProcess/ios/WKContentViewInteraction.mm:
2381         (-[WKContentView replaceDictatedText:withText:]):
2382         (-[WKContentView requestDictationContext:]):
2383         * UIProcess/ios/WebPageProxyIOS.mm:
2384         (WebKit::WebPageProxy::dictationContextCallback):
2385         (WebKit::WebPageProxy::replaceDictatedText):
2386         (WebKit::WebPageProxy::requestDictationContext):
2387         * WebProcess/WebPage/WebPage.h:
2388         * WebProcess/WebPage/WebPage.messages.in:
2389         * WebProcess/WebPage/ios/WebPageIOS.mm:
2390         (WebKit::WebPage::requestDictationContext):
2391         (WebKit::WebPage::replaceDictatedText):
2392
2393 2014-03-24  Andy Estes  <aestes@apple.com>
2394
2395         Yet another iOS build fix, for the 32-bit build this time.
2396
2397         * Shared/Downloads/ios/DownloadIOS.mm:
2398         (WebKit::setUpDownloadClient):
2399
2400 2014-03-24  Tim Horton  <timothy_horton@apple.com>
2401
2402         REGRESSION (r165872): Double-applying device scale to snapshots
2403         https://bugs.webkit.org/show_bug.cgi?id=130697
2404         <rdar://problem/16396629>
2405
2406         Reviewed by Simon Fraser.
2407
2408         * WebProcess/WebPage/WebPage.cpp:
2409         (WebKit::WebPage::scaledSnapshotWithOptions):
2410         Drive-by, make scaledSnapshotWithOptions respect SnapshotOptionsExcludeDeviceScaleFactor.
2411
2412         (WebKit::WebPage::snapshotAtSize):
2413         Divide the device scale out of the scale factor
2414
2415         * WebProcess/WebPage/WebPage.h:
2416         Rename the scale argument to scaledSnapshotWithOptions to clarify
2417         that it is an additional scale on top of the device scale.
2418
2419 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
2420
2421         Activate WebVTT Tests Once Merging is Complete
2422         https://bugs.webkit.org/show_bug.cgi?id=130420
2423
2424         Reviewed by Eric Carlson.
2425
2426         * Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
2427
2428 2014-03-24  Andy Estes  <aestes@apple.com>
2429
2430         Fix the iOS build.
2431
2432         * Shared/Downloads/ios/DownloadIOS.mm:
2433         (WebKit::setUpDownloadClient):
2434         * UIProcess/Cocoa/DownloadClient.mm:
2435
2436 2014-03-24  Mark Rowe  <mrowe@apple.com>
2437
2438         Build fix after r166186.
2439
2440         * UIProcess/Cocoa/DownloadClient.mm:
2441
2442 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
2443
2444         [WK2] Make updates on ViewUpdateDispatcher less heavy
2445         https://bugs.webkit.org/show_bug.cgi?id=130626
2446
2447         Reviewed by Darin Adler.
2448
2449         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2450         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2451         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
2452         * WebProcess/WebPage/ViewUpdateDispatcher.h:
2453
2454 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
2455
2456         [iOS][WK2] Micro-optimize view state updates on the UIProcess side
2457         https://bugs.webkit.org/show_bug.cgi?id=130631
2458
2459         Reviewed by Darin Adler.
2460
2461         * UIProcess/API/Cocoa/WKWebView.mm:
2462         (contentZoomScale):
2463         [UIScrollView zoomScale] is not fast enough for -[WKWebView _updateVisibleContentRects]. Since we know what the zoom view is,
2464         make a fast version hardcoding that.
2465
2466         (-[WKWebView _updateScrollViewBackground]):
2467         (-[WKWebView _zoomToPoint:WebCore::atScale:]):
2468         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
2469         (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
2470         (-[WKWebView _updateVisibleContentRects]):
2471         * UIProcess/ios/WKContentView.mm:
2472         (fixedPositionRectFromExposedRect):
2473         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2474
2475 2014-03-24  Dean Jackson  <dino@apple.com>
2476
2477         Remove WebGL asset entitlement
2478         https://bugs.webkit.org/show_bug.cgi?id=130685
2479
2480         Reviewed by Simon Fraser.
2481
2482         No longer necessary on iOS.
2483
2484         * Configurations/WebContent-iOS.entitlements:
2485
2486 2014-03-24  Andy Estes  <aestes@apple.com>
2487
2488         [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
2489         https://bugs.webkit.org/show_bug.cgi?id=129322
2490
2491         Reviewed by Anders Carlsson.
2492
2493         Based on an original patch by Yongjun Zhang  <yongjun_zhang@apple.com>.
2494
2495         * Shared/Cocoa/APIObject.mm:
2496         (API::Object::newObject):
2497         * Shared/Downloads/ios/DownloadIOS.mm:
2498         (WebKit::dispatchOnMainThread):
2499         (WebKit::toDownload):
2500         (WebKit::setUpDownloadClient):
2501         (WebKit::Download::startWithHandle):
2502         * UIProcess/API/APIDownloadClient.h:
2503         (API::DownloadClient::~DownloadClient):
2504         * UIProcess/API/C/WKContext.cpp:
2505         (WKContextSetDownloadClient):
2506         * UIProcess/API/Cocoa/WKProcessPool.mm:
2507         (-[WKProcessPool _downloadDelegate]):
2508         (-[WKProcessPool _setDownloadDelegate:]):
2509         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2510         * UIProcess/API/Cocoa/_WKDownload.h: Added.
2511         * UIProcess/API/Cocoa/_WKDownload.mm: Added.
2512         (WebKit::wrapper):
2513         (WebKit::createAPIDownloadClient):
2514         (-[_WKDownload dealloc]):
2515         (-[_WKDownload API::]):
2516         * UIProcess/API/Cocoa/_WKDownloadDelegate.h: Added.
2517         * UIProcess/API/Cocoa/_WKDownloadInternal.h: Added.
2518         * UIProcess/Cocoa/DownloadClient.h: Added.
2519         * UIProcess/Cocoa/DownloadClient.mm: Added.
2520         * WebKit2.xcodeproj/project.pbxproj:
2521
2522 2014-03-24  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
2523
2524         [EFL][WK2] Buildfix after r166159.
2525
2526         Reviewed by Csaba Osztrogonác.
2527
2528         * UIProcess/API/efl/ewk_settings.cpp:
2529         (ewk_settings_file_access_from_file_urls_allowed_set):
2530         (ewk_settings_file_access_from_file_urls_allowed_get):
2531
2532 2014-03-24  Jinwoo Song  <jinwoo7.song@samsung.com>
2533
2534         [EFL][WK2] Use C API inside ewk_settings
2535         https://bugs.webkit.org/show_bug.cgi?id=107820
2536
2537         Reviewed by Gyuyoung Kim.
2538
2539         Use C API inside ewk_settings instead of accessing directly
2540         internal C++ classes, to avoid violating API layering.
2541
2542         Original-author: Christophe Dumez <ch.dumez@sisa.samsung.com>
2543
2544         * UIProcess/API/efl/EwkView.cpp:
2545         (EwkView::EwkView):
2546         * UIProcess/API/efl/ewk_settings.cpp:
2547         (ewk_settings_fullscreen_enabled_set):
2548         (ewk_settings_fullscreen_enabled_get):
2549         (ewk_settings_javascript_enabled_set):
2550         (ewk_settings_javascript_enabled_get):
2551         (ewk_settings_loads_images_automatically_set):
2552         (ewk_settings_loads_images_automatically_get):
2553         (ewk_settings_developer_extras_enabled_set):
2554         (ewk_settings_developer_extras_enabled_get):
2555         (ewk_settings_file_access_from_file_urls_allowed_set):
2556         (ewk_settings_file_access_from_file_urls_allowed_get):
2557         (ewk_settings_frame_flattening_enabled_set):
2558         (ewk_settings_frame_flattening_enabled_get):
2559         (ewk_settings_dns_prefetching_enabled_set):
2560         (ewk_settings_dns_prefetching_enabled_get):
2561         (ewk_settings_encoding_detector_enabled_set):
2562         (ewk_settings_encoding_detector_enabled_get):
2563         (ewk_settings_preferred_minimum_contents_width_set):
2564         (ewk_settings_preferred_minimum_contents_width_get):
2565         (ewk_settings_offline_web_application_cache_enabled_set):
2566         (ewk_settings_offline_web_application_cache_enabled_get):
2567         (ewk_settings_scripts_can_open_windows_set):
2568         (ewk_settings_scripts_can_open_windows_get):
2569         (ewk_settings_local_storage_enabled_set):
2570         (ewk_settings_local_storage_enabled_get):
2571         (ewk_settings_plugins_enabled_set):
2572         (ewk_settings_plugins_enabled_get):
2573         (ewk_settings_default_font_size_set):
2574         (ewk_settings_default_font_size_get):
2575         (ewk_settings_private_browsing_enabled_set):
2576         (ewk_settings_private_browsing_enabled_get):
2577         (ewk_settings_text_autosizing_enabled_set):
2578         (ewk_settings_text_autosizing_enabled_get):
2579         (ewk_settings_spatial_navigation_enabled_set):
2580         (ewk_settings_spatial_navigation_enabled_get):
2581         (EwkSettings::setDefaultTextEncodingName):
2582         * UIProcess/API/efl/ewk_settings_private.h:
2583         (EwkSettings::EwkSettings):
2584         (EwkSettings::preferences):
2585
2586 2014-03-24  Zan Dobersek  <zdobersek@igalia.com>
2587
2588         [GTK][WK2] Guard NetscapePluginModule methods used in PluginInfoCache that are specific to X11 architecture
2589         https://bugs.webkit.org/show_bug.cgi?id=130663
2590
2591         Reviewed by Carlos Garcia Campos.
2592
2593         The two used methods are specific to the X11 plugin architecture and are not declared when building for a
2594         Wayland-only configuration. Guarding them prevents build failures, but does not ensure proper functionality
2595         which isn't a problem anyway since there's no support yet for Netscape plugins on Wayland.
2596
2597         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2598         (WebKit::PluginInfoCache::getPluginInfo): Guard NetscapePluginModule::parseMIMEDescription with PLUGIN_ARCHITECTURE(X11).
2599         (WebKit::PluginInfoCache::updatePluginInfo): Ditto for NetscapePluginModule::buildMIMEDescription.
2600
2601 2014-03-24  Ryuan Choi  <ryuan.choi@samsung.com>
2602
2603         [EFL][WK2] Convert some more OwnPtr/PassOwnPtr to std::unique_ptr
2604         https://bugs.webkit.org/show_bug.cgi?id=130662
2605
2606         Reviewed by Gyuyoung Kim.
2607
2608         Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in remained WebKit2/Efl specific code.
2609
2610         * UIProcess/API/efl/EwkView.h:
2611         * UIProcess/API/efl/ewk_cookie_manager.cpp:
2612         * UIProcess/API/efl/ewk_database_manager.cpp:
2613         (getDatabaseOriginsCallback):
2614         * UIProcess/API/efl/ewk_error_private.h:
2615         * UIProcess/efl/DownloadManagerEfl.cpp:
2616         (WebKit::DownloadManagerEfl::didFail):
2617         * UIProcess/efl/InputMethodContextEfl.h:
2618         (WebKit::InputMethodContextEfl::create):
2619         * UIProcess/efl/PageLoadClientEfl.cpp:
2620         (WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
2621         (WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):
2622
2623 2014-03-23  Hyowon Kim  <hw1008.kim@samsung.com>
2624
2625         Move all EFL typedefs into EflTypedefs.h.
2626         https://bugs.webkit.org/show_bug.cgi?id=130511
2627
2628         Reviewed by Gyuyoung Kim.
2629
2630         * Shared/API/c/efl/WKArrayEfl.h: Remove EFL typedefs.
2631         * UIProcess/API/efl/EwkView.h: Ditto.
2632
2633 2014-03-23  Jinwoo Song  <jinwoo7.song@samsung.com>
2634
2635         [WK2] Refine WebKit2 BatteryStatus code
2636         https://bugs.webkit.org/show_bug.cgi?id=130573
2637
2638         Reviewed by Anders Carlsson.
2639
2640         Refinements
2641          - Return PassRef instead of PassRefPtr in create methods
2642          - Use auto instead of iterator
2643
2644         * UIProcess/WebBatteryManagerProxy.cpp:
2645         (WebKit::WebBatteryManagerProxy::create):
2646         * UIProcess/WebBatteryManagerProxy.h:
2647         * UIProcess/efl/BatteryProvider.cpp:
2648         (BatteryProvider::create):
2649         * UIProcess/efl/BatteryProvider.h:
2650         * WebProcess/Battery/WebBatteryManager.cpp:
2651         (WebKit::WebBatteryManager::didChangeBatteryStatus):
2652         (WebKit::WebBatteryManager::updateBatteryStatus):
2653
2654 2014-03-23  Sam Weinig  <sam@webkit.org>
2655
2656         Simplify the HTMLConverter interface (Part 2)
2657         https://bugs.webkit.org/show_bug.cgi?id=130654
2658
2659         Reviewed by Darin Adler.
2660
2661         * WebProcess/WebPage/WebPage.h:
2662         * WebProcess/WebPage/ios/WebPageIOS.mm:
2663         (WebKit::WebPage::performDictionaryLookupForRange):
2664         * WebProcess/WebPage/mac/WebPageMac.mm:
2665         (WebKit::WebPage::getAttributedSubstringFromRange):
2666         (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
2667         (WebKit::WebPage::performDictionaryLookupAtLocation):
2668         (WebKit::WebPage::performDictionaryLookupForSelection):
2669         (WebKit::WebPage::performDictionaryLookupForRange):
2670
2671 2014-03-23  David Kilzer  <ddkilzer@apple.com>
2672
2673         WebKit::resistanceForDelta() truncates 'scaleDistance' to integer value using abs()
2674         <http://webkit.org/b/130651>
2675
2676         Reviewed by Darin Adler.
2677
2678         Fixes the following build failure with trunk clang:
2679
2680             WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
2681                 double scaleDistance = abs(limit - currentScale);
2682                                        ^
2683             WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: note: use function 'fabs' instead
2684                 double scaleDistance = abs(limit - currentScale);
2685                                        ^~~
2686                                        fabs
2687
2688         * UIProcess/mac/ViewGestureControllerMac.mm:
2689         (WebKit::resistanceForDelta): Use fabs() instead of abs().
2690
2691 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
2692
2693         Clean up #includes by geometry classes
2694         https://bugs.webkit.org/show_bug.cgi?id=130645
2695
2696         Reviewed by Andreas Kling.
2697
2698         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
2699         classes brings in a lot of additional headers. Fix by adding a new
2700         GeometryUtilities file so that the basic files don't need Vector,
2701         and including GeometryUtilities.h where necessary.
2702         
2703         Also forward declare PrintStream.h and only bring in the header
2704         in implementation files.
2705
2706         * Shared/UpdateInfo.h:
2707         * UIProcess/BackingStore.h:
2708         * UIProcess/CoordinatedGraphics/PageViewportController.h:
2709         * UIProcess/FindIndicator.cpp:
2710         * UIProcess/mac/WKPrintingView.h:
2711
2712 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
2713
2714         Clean up #includes by geometry classes
2715         https://bugs.webkit.org/show_bug.cgi?id=130645
2716
2717         Reviewed by Andreas Kling.
2718
2719         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
2720         classes brings in a lot of additional headers. Fix by adding a new
2721         GeometryUtilities file so that the basic files don't need Vector,
2722         and including GeometryUtilities.h where necessary.
2723         
2724         Also forward declare PrintStream.h and only bring in the header
2725         in implementation files.
2726
2727         * UIProcess/BackingStore.h:
2728         * UIProcess/FindIndicator.cpp:
2729         * UIProcess/mac/WKPrintingView.h:
2730
2731 2014-03-22  Alexey Proskuryakov  <ap@apple.com>
2732
2733         Assertions in WebPage::rangeFromEditingRange when requested range location is NSNotFound
2734         https://bugs.webkit.org/show_bug.cgi?id=130633
2735         <rdar://problem/16397583>
2736
2737         Reviewed by Darin Adler.
2738
2739         * UIProcess/API/mac/WKView.mm:
2740         (-[WKView firstRectForCharacterRange:completionHandler:]):
2741         (-[WKView firstRectForCharacterRange:actualRange:]):
2742         Return NSZeroRect, like NSTextView does for any locations that are out of bounds.
2743         There is no need for a round trip to WebProcess in this case.
2744
2745 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
2746
2747         [iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
2748         https://bugs.webkit.org/show_bug.cgi?id=130555
2749
2750         Reviewed by Simon Fraser.
2751
2752         * Shared/VisibleContentRectUpdateInfo.cpp:
2753         (WebKit::VisibleContentRectUpdateInfo::encode):
2754         (WebKit::VisibleContentRectUpdateInfo::decode):
2755         * Shared/VisibleContentRectUpdateInfo.h:
2756         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2757         (WebKit::operator==):
2758         * UIProcess/ios/WKContentView.mm:
2759         (WebKit::HistoricalKinematicData::HistoricalKinematicData):
2760         (WebKit::HistoricalKinematicData::velocityForNewData):
2761         (WebKit::HistoricalKinematicData::clear):
2762         (WebKit::HistoricalKinematicData::append):
2763         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2764         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2765         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2766         * WebProcess/WebPage/ios/WebPageIOS.mm:
2767         (WebKit::WebPage::updateVisibleContentRects):
2768
2769 2014-03-21  Alexey Proskuryakov  <ap@apple.com>
2770
2771         REGRESSION (r165356): Predictive Chinese input is broken
2772         https://bugs.webkit.org/show_bug.cgi?id=130619
2773
2774         Reviewed by Enrica Casucci.
2775
2776         * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::executeKeypressCommands):
2777         Like after insertText, we are no longer in an intermediate state after executeKeypressCommands.
2778         Make sure that we don't call -discardMarkedText the next time we get a non-intermediate
2779         state with closed composition.
2780
2781 2014-03-21  Sam Weinig  <sam@webkit.org>
2782
2783         [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
2784         https://bugs.webkit.org/show_bug.cgi?id=130528
2785
2786         Reviewed by Tim Horton.
2787
2788         * Platform/IPC/Connection.h:
2789         * Platform/IPC/mac/ConnectionMac.cpp:
2790         (IPC::Connection::getAuditToken):
2791         Expose the audit data if available. 
2792
2793         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2794         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
2795         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2796         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
2797         Pass the audit data corresponding to the UIProcess.
2798
2799         * Configurations/Network-iOS.entitlements: Copied from Configurations/WebContent-iOS.entitlements.
2800         * Configurations/NetworkProcess.xcconfig:
2801         * Configurations/NetworkService.Development.xcconfig:
2802         * Configurations/NetworkService.xcconfig:
2803         * Configurations/WebContent-iOS.entitlements:
2804         Add entitlement allowing the audit data to be used.
2805
2806 2014-03-21  Tim Horton  <timothy_horton@apple.com>
2807
2808         Always retrieve the screen scale factor from WKSI
2809         <rdar://problem/16329679>
2810
2811         Reviewed by Sam Weinig.
2812
2813         * UIProcess/ios/WKContentView.mm:
2814         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
2815         (-[WKContentView _updateForScreen:]):
2816         Use WKGetScreenScaleFactor/WKGetScaleFactorForScreen.
2817
2818 2014-03-21  Yongjun Zhang  <yongjun_zhang@apple.com>
2819
2820         [Webkit2] Add APIDownloadClient for download support.
2821         https://bugs.webkit.org/show_bug.cgi?id=130484
2822
2823         Add API::DownloadClient to WebContext and get rid of WebDownloadClient.
2824
2825         Reviewed by Anders Carlsson.
2826
2827         * UIProcess/API/APIDownloadClient.h: Added.
2828         (API::DownloadClient::~DownloadClient):
2829         (API::DownloadClient::didStart):
2830         (API::DownloadClient::didReceiveAuthenticationChallenge):
2831         (API::DownloadClient::didReceiveResponse):
2832         (API::DownloadClient::didReceiveData):
2833         (API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
2834         (API::DownloadClient::decideDestinationWithSuggestedFilename):
2835         (API::DownloadClient::didCreateDestination):
2836         (API::DownloadClient::didFinish):
2837         (API::DownloadClient::didFail):
2838         (API::DownloadClient::didCancel):
2839         (API::DownloadClient::processDidCrash):
2840         * UIProcess/API/C/WKContext.cpp:
2841         (WKContextSetDownloadClient): Move the original WebDownloadClient methods to a local class
2842             DownloadClient and set up the downloadClient for WebContext.
2843         * UIProcess/Downloads/DownloadProxy.cpp:
2844         * UIProcess/WebContext.cpp:
2845         (WebKit::WebContext::setDownloadClient):
2846         * UIProcess/WebContext.h:
2847         (WebKit::WebContext::downloadClient):
2848         * UIProcess/WebDownloadClient.cpp: Removed.
2849         * UIProcess/WebDownloadClient.h: Removed.
2850         * WebKit2.xcodeproj/project.pbxproj:
2851
2852 2014-03-21  Alexey Proskuryakov  <ap@apple.com>
2853
2854         ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
2855         https://bugs.webkit.org/show_bug.cgi?id=130526
2856         <rdar://problem/16371612> 
2857
2858         This was fixed yesterday for sync code path, landing the same this for async one.
2859
2860         * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]):
2861
2862 2014-03-21  Pratik Solanki  <psolanki@apple.com>
2863
2864         Add callbacks in WebKit2 Cocoa API for page load testing
2865         https://bugs.webkit.org/show_bug.cgi?id=130569
2866
2867         Reviewed by Anders Carlsson.
2868
2869         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2870         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2871         (didFirstVisuallyNonEmptyLayoutForFrame):
2872         (didHandleOnloadEventsForFrame):
2873         (setUpPageLoaderClient):
2874         (willSendRequestForFrame):
2875         (didInitiateLoadForResource):
2876         (didFinishLoadForResource):
2877         (didFailLoadForResource):
2878         (setUpResourceLoadClient):
2879
2880 2014-03-21  Ryuan Choi  <ryuan.choi@samsung.com>
2881
2882         [EFL][WK2] Remove Ewk_Error parameter from some async callbacks
2883         https://bugs.webkit.org/show_bug.cgi?id=130567
2884
2885         Reviewed by Gyuyoung Kim.
2886
2887         WebKit2 internally uses GenericCallbacks for several APIs such as WKKeyValueStorageManagerGetKeyValueStorageOrigins.
2888         But only few callbacks really return errors.
2889
2890         This patch removes Ewk_Error parameters from these callbacks not to make
2891         the confusion for application developers.
2892
2893         * UIProcess/API/efl/ewk_cookie_manager.cpp:
2894         (getAcceptPolicyCallback):
2895         (getHostnamesWithCookiesCallback):
2896         * UIProcess/API/efl/ewk_cookie_manager.h:
2897         * UIProcess/API/efl/ewk_database_manager.cpp:
2898         (getDatabaseOriginsCallback):
2899         * UIProcess/API/efl/ewk_database_manager.h:
2900         * UIProcess/API/efl/ewk_storage_manager.cpp:
2901         (getStorageOriginsCallback):
2902         * UIProcess/API/efl/ewk_storage_manager.h:
2903         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
2904         (EWK2CookieManagerTest::getAcceptPolicyCallback):
2905         (EWK2CookieManagerTest::getHostnamesWithCookiesCallback):
2906         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
2907         (EWK2DatabaseManagerTest::databaseOriginsCallback):
2908         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
2909         (EWK2StorageManagerTest::getStorageOriginsCallback):
2910
2911 2014-03-21  Darin Adler  <darin@apple.com>
2912
2913         Improve idiom used for string building in a few places
2914         https://bugs.webkit.org/show_bug.cgi?id=130561
2915
2916         Reviewed by Andreas Kling.
2917
2918         * Shared/mac/ChildProcessMac.mm:
2919         (WebKit::ChildProcess::initializeSandbox): Use a more efficient idiom for string
2920         concatenation.
2921
2922         * UIProcess/WebInspectorProxy.cpp:
2923         (WebKit::WebInspectorProxy::createInspectorPage): Use a StringBuilder.
2924
2925 2014-03-20  Hyowon Kim  <hw1008.kim@samsung.com>
2926
2927         Move to using std::unique_ptr for EFL objects.
2928         https://bugs.webkit.org/show_bug.cgi?id=129853
2929
2930         Reviewed by Gyuyoung Kim.
2931
2932         EflUniquePtr is a template alias of std::unique_ptr
2933         with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
2934         This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
2935
2936         * Platform/Module.h:
2937         * Platform/efl/ModuleEfl.cpp:
2938         (WebKit::Module::load):
2939         * UIProcess/API/efl/EwkView.cpp:
2940         (EwkView::EwkView):
2941         * UIProcess/API/efl/EwkView.h:
2942         * UIProcess/efl/InputMethodContextEfl.cpp:
2943         (WebKit::InputMethodContextEfl::InputMethodContextEfl):
2944         (WebKit::InputMethodContextEfl::createIMFContext):
2945         * UIProcess/efl/InputMethodContextEfl.h:
2946         (WebKit::InputMethodContextEfl::create):
2947
2948 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2949
2950         [EFL][GTK] Get CMake to find Freetype2 properly
2951         https://bugs.webkit.org/show_bug.cgi?id=130150
2952
2953         Reviewed by Martin Robinson.
2954
2955         Newer versions of CMake are not able to find Freetype2 correctly.
2956         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
2957         freetype2 repo, because a completely different version number is found in freetype2.pc.
2958
2959         * PlatformEfl.cmake:
2960
2961 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
2962
2963         [GTK] Suppress errors about using gdk_threads_enter gdk_threads_leave
2964         https://bugs.webkit.org/show_bug.cgi?id=130517
2965
2966         Reviewed by Sergio Villar Senin.
2967
2968         * UIProcess/API/gtk/WebKitWebView.cpp: Use GCC suppression to suppress errors about deprecations.
2969         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
2970
2971 2014-03-20  Ryuan Choi  <ryuan.choi@samsung.com>
2972
2973         [EFL][WK2] tests of test_ewk2_cookie_manager are flaky
2974         https://bugs.webkit.org/show_bug.cgi?id=130498
2975
2976         Reviewed by Gyuyoung Kim.
2977
2978         Loaded web page before calling getAcceptPolicy() to guarantee that webprocess
2979         or networkprocess was launched and registered WebCookieManager.
2980
2981         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
2982         (TEST_F):
2983
2984 2014-03-20  Commit Queue  <commit-queue@webkit.org>
2985
2986         Unreviewed, rolling out r165985.
2987         https://bugs.webkit.org/show_bug.cgi?id=130551
2988
2989         broke page loading on all cocoa platforms (Requested by
2990         thorton on #webkit).
2991
2992         Reverted changeset:
2993
2994         "[WebKit2] Implement
2995         NetworkingContext::sourceApplicationAuditData() for WebKit2"
2996         https://bugs.webkit.org/show_bug.cgi?id=130528
2997         http://trac.webkit.org/changeset/165985
2998
2999 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
3000
3001         Fix a long-standing typo that's now breaking USE(ASYNC_NSTEXTINPUTCLIENT) build.
3002
3003         Rubber-stamped by Tim Horton.
3004
3005         * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::cancelComposition):
3006         Use a correct type for reply (it's really the same type, but ConfirmComposition
3007         is behind an ifdef, and not available).
3008
3009 2014-03-20  Enrica Casucci  <enrica@apple.com>
3010
3011         [iOS WebKit2] typing and deleting text lags behind the caret movement on google.com.
3012         https://bugs.webkit.org/show_bug.cgi?id=130544
3013         <rdar://problem/16380296>
3014
3015         Reviewed by Tim Horton.
3016
3017         On iOS the selection is drawn in the UIProcess. If the WebProcess is
3018         processing multiple requests within the same runloop, the caret could be
3019         updated in the UIProcess before the WebProcess has had a chance to paint.
3020         This change synchronizes the selection drawing with the tile update.
3021
3022         * UIProcess/WebPageProxy.h:
3023         * UIProcess/ios/WKContentView.mm:
3024         (-[WKContentView _didCommitLayerTree:WebKit::]):
3025         * UIProcess/ios/WKContentViewInteraction.h:
3026         * UIProcess/ios/WKContentViewInteraction.mm:
3027         (-[WKContentView _selectionChanged]):
3028         (-[WKContentView _updateChangedSelection]):
3029         * WebProcess/WebPage/WebPage.cpp:
3030         (WebKit::WebPage::didChangeSelection):
3031
3032 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
3033
3034         Generalize WebInspector check in maybeInitializeSandboxExtensionHandle().
3035         https://bugs.webkit.org/show_bug.cgi?id=130079
3036         <rdar://problem/16286683>
3037
3038         Reviewed by Anders Carlsson.
3039
3040         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
3041         Perform an early return for all paths that don't need a sandbox extension due to
3042         access being assumed, not only for WebInspector pages.
3043
3044         * UIProcess/WebProcessProxy.cpp:
3045         (WebKit::WebProcessProxy::hasAssumedReadAccessToURL):
3046         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
3047         * UIProcess/WebProcessProxy.h:
3048         Factored out m_localPathsWithAssumedReadAccess iteration to a public function.
3049
3050 2014-03-20  Csaba Osztrogonác  <ossy@webkit.org>
3051
3052         Unreviewed buildfix after r165983 for non Cocoa platforms.
3053
3054         * UIProcess/API/C/WKAPICast.h:
3055         * UIProcess/API/C/WKPreferences.cpp:
3056         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3057
3058 2014-03-20  Beth Dakin  <bdakin@apple.com>
3059
3060         Implement contentInset for Mac WebKit2
3061         https://bugs.webkit.org/show_bug.cgi?id=130273
3062
3063         Reviewed by Simon Fraser.
3064
3065         This patch adds WKView API for setting a topContentInset(). All of this work gets 
3066         that number plumbed down to WebCore.
3067
3068         * Shared/WebPageCreationParameters.cpp:
3069         (WebKit::WebPageCreationParameters::encode):
3070         (WebKit::WebPageCreationParameters::decode):
3071         * Shared/WebPageCreationParameters.h:
3072         * UIProcess/API/Cocoa/WKViewPrivate.h:
3073         * UIProcess/API/Cocoa/WKWebView.mm:
3074         (-[WKWebView _setTopContentInset:]):
3075         (-[WKWebView _topContentInset]):
3076         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3077         * UIProcess/API/mac/WKView.mm:
3078         (-[WKView _setTopContentInset:]):
3079         (-[WKView _topContentInset]):
3080         * UIProcess/WebPageProxy.cpp:
3081         (WebKit::WebPageProxy::WebPageProxy):
3082         (WebKit::WebPageProxy::setTopContentInset):
3083         (WebKit::WebPageProxy::creationParameters):
3084         * UIProcess/WebPageProxy.h:
3085         (WebKit::WebPageProxy::topContentInset):
3086         * WebProcess/WebPage/WebPage.cpp:
3087         (WebKit::WebPage::WebPage):
3088         (WebKit::WebPage::setTopContentInset):
3089         * WebProcess/WebPage/WebPage.h:
3090         * WebProcess/WebPage/WebPage.messages.in:
3091
3092 2014-03-20  Anders Carlsson  <andersca@apple.com>
3093
3094         Fix 32-bit build.
3095
3096         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
3097
3098 2014-03-20  Anders Carlsson  <andersca@apple.com>
3099
3100         Make WKProcessPoolConfiguration SPI
3101         https://bugs.webkit.org/show_bug.cgi?id=130537
3102
3103         Reviewed by Tim Horton.
3104
3105         * UIProcess/API/Cocoa/WKProcessPool.h:
3106         * UIProcess/API/Cocoa/WKProcessPool.mm:
3107         (-[WKProcessPool init]):
3108         (-[WKProcessPool dealloc]):
3109         (-[WKProcessPool description]):
3110         (-[WKProcessPool _configuration]):
3111         (-[WKProcessPool API::]):
3112         (-[WKProcessPool _initWithConfiguration:]):
3113         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h:
3114         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
3115         (-[WKProcessPoolConfiguration _injectedBundleURL]):
3116         (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
3117         * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h:
3118         * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
3119         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3120         * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
3121         (-[WKProcessPool initWithConfiguration:]):
3122         (-[WKProcessPool configuration]):
3123         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h.
3124         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm.
3125         (-[_WKProcessPoolConfiguration injectedBundleURL]):
3126         (-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
3127         (-[_WKProcessPoolConfiguration description]):
3128         (-[_WKProcessPoolConfiguration copyWithZone:]):
3129         * WebKit2.xcodeproj/project.pbxproj:
3130
3131 2014-03-20  Tim Horton  <timothy_horton@apple.com>
3132
3133         Add WebCore::IOSurface wrapper
3134         https://bugs.webkit.org/show_bug.cgi?id=130529
3135
3136         Reviewed by Simon Fraser.
3137
3138         * Shared/mac/RemoteLayerBackingStore.h:
3139         * Shared/mac/RemoteLayerBackingStore.mm:
3140         (RemoteLayerBackingStore::encode):
3141         (RemoteLayerBackingStore::decode):
3142         (RemoteLayerBackingStore::display):
3143         (RemoteLayerBackingStore::applyBackingStoreToLayer):
3144         * UIProcess/ios/ViewGestureControllerIOS.mm:
3145         (WebKit::ViewGestureController::beginSwipeGesture):
3146         (WebKit::ViewGestureController::removeSwipeSnapshot):
3147         * UIProcess/mac/ViewGestureController.h:
3148         * UIProcess/mac/ViewGestureControllerMac.mm:
3149         (WebKit::ViewGestureController::beginSwipeGesture):
3150         (WebKit::ViewGestureController::removeSwipeSnapshot):
3151         * UIProcess/mac/ViewSnapshotStore.h:
3152         * UIProcess/mac/ViewSnapshotStore.mm:
3153         (WebKit::createIOSurfaceFromImage):
3154         (WebKit::ViewSnapshotStore::recordSnapshot):
3155         Adopt WebCore::IOSurface.
3156
3157 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
3158
3159         Update iOS input method code to use new cross-platform async functions
3160         https://bugs.webkit.org/show_bug.cgi?id=130530
3161
3162         Reviewed by Enrica Casucci.
3163
3164         Merge identical iOS and cross-platform functions.
3165
3166         Also tightened up ifdefs, and removed stub iOS implementations of sync methods,
3167         which hopefully won't be ever needed. The only tricky case is sync cancelComposition,
3168         will I'll investigate separately.
3169
3170         * UIProcess/WebPageProxy.h:
3171         * UIProcess/ios/WKContentViewInteraction.mm:
3172         (-[WKContentView setMarkedText:selectedRange:]):
3173         (-[WKContentView unmarkText]):
3174         (-[WKContentView insertText:]):
3175         * UIProcess/ios/WebPageProxyIOS.mm:
3176         (WebKit::WebPageProxy::cancelComposition):
3177         * UIProcess/mac/WebPageProxyMac.mm:
3178         (WebKit::WebPageProxy::cancelComposition):
3179         (WebKit::WebPageProxy::insertDictatedTextAsync):
3180         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
3181         (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
3182         * WebProcess/WebPage/WebPage.h:
3183         * WebProcess/WebPage/WebPage.messages.in:
3184         * WebProcess/WebPage/ios/WebPageIOS.mm:
3185         * WebProcess/WebPage/mac/WebPageMac.mm:
3186         (WebKit::WebPage::cancelComposition):
3187         (WebKit::WebPage::insertDictatedTextAsync):
3188         (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
3189
3190 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
3191
3192         ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
3193         https://bugs.webkit.org/show_bug.cgi?id=130526
3194         <rdar://problem/16371612>
3195
3196         Reviewed by Anders Carlsson.
3197
3198         * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]): Cut custom
3199         processing short whenever we are redispatching an event, not just when the event
3200         we are handling is the one being redispatched. There shouldn't be any other unrelated
3201         events here, just the one being redispatched and synthetic ones generated from it by AppKit.
3202
3203 2014-03-20  Anders Carlsson  <andersca@apple.com>
3204
3205         Fix build.
3206
3207         Rename WKPreferencesPrivate.h to WKPreferencesRefPrivate.h.
3208
3209         * UIProcess/API/C/WKPreferencesRefPrivate.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h.
3210         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3211         * WebKit2.xcodeproj/project.pbxproj:
3212
3213 2014-03-20  Gavin Barraclough  <barraclough@apple.com>
3214
3215         Merge AtomicString, Identifier
3216         https://bugs.webkit.org/show_bug.cgi?id=128624
3217
3218         Unreviewed build fix following r165982.
3219
3220         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3221             - update includes.
3222
3223 2014-03-20  Sam Weinig  <sam@webkit.org>
3224
3225         [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
3226         https://bugs.webkit.org/show_bug.cgi?id=130528
3227
3228         Reviewed by Anders Carlsson.
3229
3230         * Platform/IPC/Connection.h:
3231         * Platform/IPC/mac/ConnectionMac.cpp:
3232         (IPC::Connection::getAuditToken):
3233         Expose the audit data if available. 
3234
3235         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3236         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
3237         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3238         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
3239         Pass the audit data corresponding to the UIProcess.
3240
3241 2014-03-20  Sam Weinig  <sam@webkit.org>
3242
3243         [Cocoa] Expose preference to enable telephone number detection
3244         https://bugs.webkit.org/show_bug.cgi?id=130524
3245
3246         Reviewed by Anders Carlsson.
3247
3248         * UIProcess/API/Cocoa/WKPreferences.mm:
3249         (-[WKPreferences _telephoneNumberDetectionIsEnabled]):
3250         (-[WKPreferences _setTelephoneNumberDetectionIsEnabled:]):
3251         * UIProcess/API/Cocoa/WKPreferencesInternal.h:
3252         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added.
3253         * WebKit2.xcodeproj/project.pbxproj:
3254
3255 2014-03-19  Alexey Proskuryakov  <ap@apple.com>
3256
3257         [Mac] Support asynchronous NSTextInputClient
3258         https://bugs.webkit.org/show_bug.cgi?id=130479
3259
3260         Reviewed by Anders Carlsson.
3261
3262         The implementation is currently disabled, pending lower level support.
3263         Most of the code is not under compile time guard however, to facilitate cross-platform
3264         reuse, or at least under a PLATFORM(COCOA) guard to share the code with iOS.
3265
3266         * UIProcess/API/mac/WKView.mm: Added a compile time branch for USE(ASYNC_NSTEXTINPUTCLIENT).
3267         We still implement sync NSTextInputClient here, in order to get assertions when
3268         its methods are unexpectedly called.
3269         The new code first sends an event to input method asynchronously, handling any callbacks
3270         that may arrive. During this time, we no longer care about WKViewInterpretKeyEventsParameters
3271         at all. Once done, we interpret key bindings synchronously, collecting them into
3272         a vector.
3273
3274         * UIProcess/API/mac/WKViewInternal.h: We no longer expose _interpretKeyEvent outside
3275         WKView.
3276
3277         * UIProcess/WebPageProxy.cpp:
3278         * UIProcess/WebPageProxy.h:
3279         Added async calls and callbacks. Removed unnecessary and slightly harmful .get() when moving
3280         a callback pointer into map. Moved insertDictatedText() and getAttributedSubstringFromRange()
3281         from PLATFORM(COCOA) to PLATFORM(MAC), because they are unused and unimplemented on
3282         iOS, and unlikely to be needed any time soon. Changed USE(APPKIT) to PLATFORM(MAC),
3283         because that's more accurate in this case (nothing depends on AppKit, it's just code
3284         that we only need on Mac).
3285
3286         * UIProcess/WebPageProxy.messages.in: Added messages for new async IM responses.
3287
3288         * UIProcess/ios/WebPageProxyIOS.mm: Removed insertDictatedText() and getAttributedSubstringFromRange().
3289
3290         * UIProcess/mac/WebPageProxyMac.mm:
3291         (WebKit::WebPageProxy::insertDictatedTextAsync):
3292         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
3293         (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
3294         Added async calls and callbacks that are Mac only.
3295
3296         * WebProcess/WebPage/WebPage.cpp:
3297         * WebProcess/WebPage/WebPage.h:
3298         * WebProcess/WebPage/mac/WebPageMac.mm:
3299         Added async implementations (which are essentially the same as sync ones, sadly).
3300
3301         * WebProcess/WebPage/WebPage.messages.in: Added async messages, moved some messages
3302         under PLATFORM(MAC).
3303
3304         * WebProcess/WebPage/ios/WebPageIOS.mm: More of deleting functions that are Mac only,
3305         and cannot be easily implemented in WebPage.cpp with shared code.
3306
3307 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
3308
3309         Remove remaining GTK+ unused parameter warnings from WebKit2
3310         https://bugs.webkit.org/show_bug.cgi?id=130518
3311
3312         Reviewed by Sergio Villar Senin.
3313
3314         Fix almost all unused parameter warnings in the WebKit2GTK+ build.
3315
3316 2014-03-20  Commit Queue  <commit-queue@webkit.org>
3317
3318         Unreviewed, rolling out r165962.
3319         https://bugs.webkit.org/show_bug.cgi?id=130512
3320
3321         It broke the build (Requested by Ossy on #webkit).
3322
3323         Reverted changeset:
3324
3325         "[EFL][GTK] Get CMake to find Freetype2 properly"
3326         https://bugs.webkit.org/show_bug.cgi?id=130150
3327         http://trac.webkit.org/changeset/165962
3328
3329 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3330
3331         [EFL][GTK] Get CMake to find Freetype2 properly
3332         https://bugs.webkit.org/show_bug.cgi?id=130150
3333
3334         Reviewed by Csaba Osztrogonác.
3335
3336         Newer versions of CMake are not able to find Freetype2 correctly.
3337         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
3338         freetype2 repo, because a completely different version number is found in freetype2.pc.
3339
3340         * PlatformEfl.cmake:
3341
3342 2014-03-20  Ryuan Choi  <ryuan.choi@samsung.com>
3343
3344         [EFL][WK2] test_ewk2_application_cache_manager is flaky
3345         https://bugs.webkit.org/show_bug.cgi?id=130501
3346
3347         Reviewed by Gyuyoung Kim.
3348
3349         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
3350         (timerCallback): Return ECORE_CALLBACK_CANCEL to clear the timer.
3351
3352 2014-03-19  Tim Horton  <timothy_horton@apple.com>
3353
3354         Address late review comment and style nit after r165934.
3355
3356         * UIProcess/ios/ViewGestureControllerIOS.mm:
3357         (WebKit::ViewGestureController::beginSwipeGesture):
3358
3359 2014-03-19  Tim Horton  <timothy_horton@apple.com>
3360
3361         [iOS][WebKit2] Back-forward swipe doesn't always complete with fingers down
3362         https://bugs.webkit.org/show_bug.cgi?id=130489
3363         <rdar://problem/16027007>
3364
3365         Reviewed by Simon Fraser.
3366
3367         * UIProcess/ios/ViewGestureControllerIOS.mm:
3368         (WebKit::ViewGestureController::beginSwipeGesture):
3369         In order to have fingers-down swipe completion work correctly, we need
3370         to give UIKit an empty interactive update block.
3371
3372 2014-03-19  Anders Carlsson  <andersca@apple.com>
3373
3374         Get rid of two IPC::Connection functions by folding them into lambdas
3375         https://bugs.webkit.org/show_bug.cgi?id=130482
3376
3377         Reviewed by Tim Horton.
3378
3379         * Platform/IPC/Connection.cpp:
3380         (IPC::Connection::addWorkQueueMessageReceiver):
3381         (IPC::Connection::removeWorkQueueMessageReceiver):
3382         * Platform/IPC/Connection.h:
3383
3384 2014-03-19  Simon Fraser  <simon.fraser@apple.com>
3385
3386         Expose text and page zoom in WK2 SPI, and hook them up in MiniBrowser
3387         https://bugs.webkit.org/show_bug.cgi?id=130476
3388
3389         Reviewed by Anders Carlsson.
3390         
3391         Expose page and text zoom as SPI.
3392
3393         * UIProcess/API/Cocoa/WKWebView.mm:
3394         (-[WKWebView _supportsTextZoom]):
3395         (-[WKWebView _textZoomFactor]):
3396         (-[WKWebView _setTextZoomFactor:]):
3397         (-[WKWebView _pageZoomFactor]):
3398         (-[WKWebView _setPageZoomFactor:]):
3399         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3400
3401 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
3402
3403         [iOS][WK2] Reduce the extended background's opacity when WKContentView is smaller than its WKWebView
3404         https://bugs.webkit.org/show_bug.cgi?id=130436
3405
3406         Reviewed by Beth Dakin.
3407
3408         * UIProcess/API/Cocoa/WKWebView.mm:
3409         (-[WKWebView _updateScrollViewBackground]):
3410
3411 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
3412
3413         [iOS][WebKit2] <rdar://problem/16330387> Do not use the keyboard rect for computing the general unobscuredRect, only use it for centering
3414         https://bugs.webkit.org/show_bug.cgi?id=130382
3415
3416         Reviewed by Simon Fraser.
3417
3418         Always accumulating the keyboard rect out of the exposedRect caused some issues (see <rdar://problem/16330387>).
3419         This patch split the rect in two: unobscured rect for WebCore, and unobscuredContentRectIncludingKeyboard for centering
3420         UI Elements in view.
3421
3422         * UIProcess/API/Cocoa/WKWebView.mm:
3423         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
3424         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
3425         (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
3426         (-[WKWebView _contentRectForUserInteraction]):
3427         (-[WKWebView _updateVisibleContentRects]):
3428
3429 2014-03-19  Anders Carlsson  <andersca@apple.com>
3430
3431         Get rid of WKProcessClass
3432         https://bugs.webkit.org/show_bug.cgi?id=130478
3433
3434         Reviewed by Dan Bernstein.
3435
3436         * UIProcess/API/Cocoa/WKProcessClass.h: Removed.
3437         * UIProcess/API/Cocoa/WKProcessClass.mm: Removed.
3438         * UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Removed.
3439         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Removed.
3440         * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Removed.
3441         * UIProcess/API/Cocoa/WKProcessClassPrivate.h: Removed.
3442         * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Removed.
3443         * WebKit2.xcodeproj/project.pbxproj:
3444
3445 2014-03-19  Jer Noble  <jer.noble@apple.com>
3446
3447         [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
3448         https://bugs.webkit.org/show_bug.cgi?id=130459
3449
3450         Reviewed by Eric Carlson.
3451
3452         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3453         (InitWebCoreSystemInterface): Initialize the new WCSI method.
3454
3455 2014-03-19  Brady Eidson  <beidson@apple.com>
3456
3457         Filter out editable services from image menu for non-contenteditable images
3458         <rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
3459
3460         Reviewed by Tim Horton.
3461
3462         * UIProcess/mac/WebContextMenuProxyMac.h:
3463         * UIProcess/mac/WebContextMenuProxyMac.mm:
3464         (-[WKSharingServicePickerDelegate setIncludeEditorServices:]):
3465         (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
3466           Filter out editing services based on the includeEditorServices flag.
3467         (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
3468         (WebKit::WebContextMenuProxyMac::populate):
3469
3470 2014-03-19  Yongjun Zhang  <yongjun_zhang@apple.com>
3471
3472         [iOS] WebKit2 Quicklook.
3473         https://bugs.webkit.org/show_bug.cgi?id=130360
3474
3475         For WebKit2 resource loads, if we detect a quicklook content that QLConverter is able to
3476         convert, handle the response data to QLConverter and use its delegate WKWebResourceQuickLookDelegate
3477         to rounte the converted results (HTML) back into WebCore.  Thie similiar logic has been in place
3478         for WebKit1.
3479
3480         Reviewed by Tim Horton.
3481
3482         * WebKit2.xcodeproj/project.pbxproj: Add WebResourceLoaderIOS.mm to the project.
3483         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3484         * WebProcess/ios/WebResourceLoaderIOS.mm: Added.
3485         (-[WKWebResourceQuickLookDelegate initWithWebResourceLoader:WebKit::]): WKWebResourceQuickLookDelegate holds
3486             the original WebResourceLoader so that we could send converted result to WebCore.
3487         (-[WKWebResourceQuickLookDelegate connection:didReceiveDataArray:]):
3488         (-[WKWebResourceQuickLookDelegate connection:didReceiveData:lengthReceived:]):
3489         (-[WKWebResourceQuickLookDelegate connectionDidFinishLoading:]):
3490         (-[WKWebResourceQuickLookDelegate connection:didFailWithError:]):
3491         (-[WKWebResourceQuickLookDelegate clearHandle]):
3492         (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
3493
3494 2014-03-19  Tim Horton  <timothy_horton@apple.com>
3495
3496         WebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizontal movement
3497         https://bugs.webkit.org/show_bug.cgi?id=130441
3498         <rdar://problem/16337279>