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