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