5b47523a94815f2ca5bcdc63d5953e012331040d
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-03-25  Pratik Solanki  <psolanki@apple.com>
2
3         Remove PLATFORM(IOS) from NetworkProcessMac.mm
4         https://bugs.webkit.org/show_bug.cgi?id=130751
5
6         Reviewed by Alexey Proskuryakov.
7
8         Code in NetworkProcessMac.mm is guarded by PLATFORM(MAC) and so is not compiled on iOS.
9         Having PLATFORM(IOS) code in this file is unnecessary and confusing.
10
11         * NetworkProcess/mac/NetworkProcessMac.mm:
12         (WebKit::NetworkProcess::initializeProcessName):
13         (WebKit::overrideSystemProxies):
14         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
15
16 2014-03-25  Anders Carlsson  <andersca@apple.com>
17
18         Add a UI delegate callback for handling window.open
19         https://bugs.webkit.org/show_bug.cgi?id=130757
20
21         Reviewed by Sam Weinig.
22
23         * UIProcess/API/Cocoa/WKUIDelegate.h:
24         * UIProcess/API/Cocoa/WKWebView.mm:
25         * UIProcess/API/Cocoa/WKWebViewInternal.h:
26         * UIProcess/Cocoa/UIClient.h:
27         * UIProcess/Cocoa/UIClient.mm:
28         (WebKit::UIClient::setDelegate):
29         (WebKit::UIClient::createNewPage):
30
31 2014-03-25  Anders Carlsson  <andersca@apple.com>
32
33         Move stopLoading: back for now.
34
35         * UIProcess/API/Cocoa/WKWebView.h:
36         * UIProcess/API/Cocoa/WKWebView.mm:
37         (-[WKWebView stopLoading:]):
38
39 2014-03-25  Anders Carlsson  <andersca@apple.com>
40
41         Change toolbarVisibility back to toolbarsVisibility
42         https://bugs.webkit.org/show_bug.cgi?id=130749
43
44         Reviewed by Tim Horton.
45
46         * UIProcess/API/Cocoa/WKWindowFeatures.h:
47         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
48         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
49
50 2014-03-25  Anders Carlsson  <andersca@apple.com>
51
52         Pass the source frame to the CreateNewPage message
53         https://bugs.webkit.org/show_bug.cgi?id=130752
54
55         Reviewed by Tim Horton.
56
57         * UIProcess/API/APIUIClient.h:
58         (API::UIClient::createNewPage):
59         * UIProcess/API/C/WKPage.cpp:
60         (WKPageSetPageUIClient):
61         * UIProcess/WebPageProxy.cpp:
62         (WebKit::WebPageProxy::createNewPage):
63         * UIProcess/WebPageProxy.h:
64         * UIProcess/WebPageProxy.messages.in:
65         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
66         (WebKit::WebChromeClient::createWindow):
67
68 2014-03-25  Anders Carlsson  <andersca@apple.com>
69
70         Add a WebFrame::fromCoreFrame static member function and use it where possible
71         https://bugs.webkit.org/show_bug.cgi?id=130744
72
73         Reviewed by Tim Horton.
74
75         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
76         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
77         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
78         (WebKit::InjectedBundleNodeHandle::documentFrame):
79         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
80         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
81         * WebProcess/InjectedBundle/InjectedBundle.cpp:
82         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
83         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
84         (WebKit::InjectedBundleDOMWindowExtension::frame):
85         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
86         (WebKit::InjectedBundleHitTestResult::frame):
87         (WebKit::InjectedBundleHitTestResult::targetFrame):
88         * WebProcess/Plugins/PluginView.cpp:
89         (WebKit::webPage):
90         (WebKit::PluginView::performFrameLoadURLRequest):
91         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
92         (WebKit::WebChromeClient::focusedElementChanged):
93         (WebKit::WebChromeClient::focusedFrameChanged):
94         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
95         (WebKit::WebChromeClient::runJavaScriptAlert):
96         (WebKit::WebChromeClient::runJavaScriptConfirm):
97         (WebKit::WebChromeClient::runJavaScriptPrompt):
98         (WebKit::WebChromeClient::print):
99         (WebKit::WebChromeClient::exceededDatabaseQuota):
100         (WebKit::WebChromeClient::runOpenPanel):
101         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
102         (WebKit::WebEditorClient::textFieldDidBeginEditing):
103         (WebKit::WebEditorClient::textFieldDidEndEditing):
104         (WebKit::WebEditorClient::textDidChangeInTextField):
105         (WebKit::WebEditorClient::textDidChangeInTextArea):
106         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
107         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
108         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
109         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
110         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
111         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
112         * WebProcess/WebPage/WebFrame.cpp:
113         (WebKit::WebFrame::fromCoreFrame):
114         (WebKit::WebFrame::contentsAsString):
115         (WebKit::WebFrame::parentFrame):
116         (WebKit::WebFrame::childFrames):
117         (WebKit::WebFrame::frameForContext):
118         (WebKit::WebFrame::webArchiveData):
119         * WebProcess/WebPage/WebFrame.h:
120
121 2014-03-25  Jeffrey Pfau  <jpfau@apple.com>
122
123         [WK2] Schemes registered as cache partitioned are not properly registered in new web processes
124         https://bugs.webkit.org/show_bug.cgi?id=130739
125
126         Reviewed by Anders Carlsson.
127
128         * WebProcess/WebProcess.cpp:
129         (WebKit::WebProcess::initializeWebProcess):
130
131 2014-03-25  Joseph Pecoraro  <pecoraro@apple.com>
132
133         [iOS] Inspector View Indication Support
134         https://bugs.webkit.org/show_bug.cgi?id=130709
135
136         Reviewed by Simon Fraser.
137
138         * UIProcess/ios/WKContentView.h:
139         * UIProcess/ios/WKContentView.mm:
140         (-[WKInspectorIndicationView initWithFrame:]):
141         (-[WKContentView isShowingInspectorIndication]):
142         (-[WKContentView setShowingInspectorIndication:]):
143         (-[WKContentView _didCommitLayerTree:WebKit::]):
144         When indicating include a simple tinted UIView over the content.
145
146         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
147         * UIProcess/API/Cocoa/WKWebView.mm:
148         (-[WKWebView _showInspectorIndication]):
149         (-[WKWebView _hideInspectorIndication]):
150         Have the content view show or hide an indication.
151
152         * UIProcess/PageClient.h:
153         * UIProcess/ios/PageClientImplIOS.h:
154         * UIProcess/ios/PageClientImplIOS.mm:
155         (WebKit::PageClientImpl::showInspectorIndication):
156         (WebKit::PageClientImpl::hideInspectorIndication):
157         * UIProcess/WebPageProxy.h:
158         * UIProcess/WebPageProxy.messages.in:
159         * UIProcess/ios/WebPageProxyIOS.mm:
160         (WebKit::WebPageProxy::showInspectorIndication):
161         (WebKit::WebPageProxy::hideInspectorIndication):
162         Pass WebProcess indication message up to the WKWebView.
163
164         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
165         (WebKit::WebInspectorClient::indicate):
166         (WebKit::WebInspectorClient::hideIndication):
167         * WebProcess/WebCoreSupport/WebInspectorClient.h:
168         * WebProcess/WebPage/WebPage.h:
169         * WebProcess/WebPage/ios/WebPageIOS.mm:
170         (WebKit::WebPage::indicate):
171         (WebKit::WebPage::hideIndication):
172         Pass WebCore / remote inspector indication message up to UIProcess.
173
174 2014-03-25  Anders Carlsson  <andersca@apple.com>
175
176         Add more properties to WKWindowFeatures
177         https://bugs.webkit.org/show_bug.cgi?id=130738
178
179         Reviewed by Tim Horton.
180
181         * UIProcess/API/Cocoa/WKWindowFeatures.h:
182         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
183         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
184         (-[WKWindowFeatures menuBarVisibility]):
185         (-[WKWindowFeatures statusBarVisibility]):
186         (-[WKWindowFeatures toolbarsVisibility]):
187         (-[WKWindowFeatures allowsResizing]):
188
189 2014-03-25  Anders Carlsson  <andersca@apple.com>
190
191         Fix iOS build.
192
193         * UIProcess/API/Cocoa/WKWebView.h:
194         * UIProcess/API/Cocoa/WKWebView.mm:
195         Make WKIBActions OS X only for now.
196
197 2014-03-25  Anders Carlsson  <andersca@apple.com>
198
199         Begin stubbing out a WKWindowFeatures class
200         https://bugs.webkit.org/show_bug.cgi?id=130733
201
202         Reviewed by Dan Bernstein.
203
204         * UIProcess/API/Cocoa/WKWindowFeatures.h: Added.
205         * UIProcess/API/Cocoa/WKWindowFeatures.mm: Added.
206         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
207         (-[WKWindowFeatures x]):
208         (-[WKWindowFeatures y]):
209         (-[WKWindowFeatures width]):
210         (-[WKWindowFeatures height]):
211         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Added.
212         * WebKit2.xcodeproj/project.pbxproj:
213
214 2014-03-25  Anders Carlsson  <andersca@apple.com>
215
216         Add goBack: and goForward: IBActions and move stopLoading: to a new WKIBActions category on WKWebView
217         https://bugs.webkit.org/show_bug.cgi?id=130732
218
219         Reviewed by Tim Horton.
220
221         * UIProcess/API/Cocoa/WKWebView.h:
222         * UIProcess/API/Cocoa/WKWebView.mm:
223         (-[WKWebView goBack]):
224         (-[WKWebView goForward]):
225         (-[WKWebView validateUserInterfaceItem:]):
226         (-[WKWebView goBack:]):
227         (-[WKWebView goForward:]):
228         (-[WKWebView stopLoading:]):
229
230 2014-03-25  Martin Robinson  <mrobinson@igalia.com>
231
232         [GTK] Remove the autotools build
233         https://bugs.webkit.org/show_bug.cgi?id=130717
234
235         Reviewed by Anders Carlsson.
236
237         * GNUmakefile.am: Removed.
238         * WebKit2Prefix.h: Removed references to the autotools configure file.
239         * config.h: Ditto.
240
241 2014-03-25  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
242
243         [EFL][WK2] Add NETWORK_PROCESS build option
244         https://bugs.webkit.org/show_bug.cgi?id=130131
245
246         Reviewed by Gyuyoung Kim.
247
248         * PlatformEfl.cmake: Add file needed to build with NETWORK_PROCESS enabled.
249
250 2014-03-24 Michał Pakuła vel Rutka  <m.pakula@samsung.com>
251
252         [EFL][WK2] Add an API to set process model
253         https://bugs.webkit.org/show_bug.cgi?id=130133
254
255         Reviewed by Gyuyoung Kim.
256
257         Implement an API to set and get process model in ewk_context.
258         By default process model enum value is set to EWK_PROCESS_MODEL_SHARED_SECONDARY
259         which keeps current behaviour. Setting EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
260         will make each web view use separate web process, also enables network process.
261
262         * UIProcess/API/efl/ewk_context.cpp:
263         (toWKProcessModel):
264         (EwkContext::setProcessModel):
265         (toEwkProcessModel):
266         (EwkContext::processModel):
267         (ewk_context_process_model_set):
268         (ewk_context_process_model_get):
269         * UIProcess/API/efl/ewk_context.h:
270         * UIProcess/API/efl/ewk_context_private.h:
271         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
272         (TEST_F):
273
274 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
275
276         AX: hit-testing doesn't always work correctly with WK2
277         https://bugs.webkit.org/show_bug.cgi?id=130706
278
279         Reviewed by Simon Fraser.
280
281         Accessibility code was trying to do screenToRootView itself, and in 
282         some cases with embedded WK2 views that did not work.
283
284         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
285         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
286
287 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
288
289         [WK2] SpinLock are not initialized by default, ViewUpdateDispatcher is missing an initializer
290         https://bugs.webkit.org/show_bug.cgi?id=130705
291
292         Reviewed by Simon Fraser.
293
294         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
295         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
296
297 2014-03-24  Enrica Casucci  <enrica@apple.com>
298
299         [iOS WebKit2] Dictation support.
300         https://bugs.webkit.org/show_bug.cgi?id=130622
301         <rdar://problem/15337316>
302
303         Reviewed by Benjamin Poulain.
304
305         Adding support for dictation on iOS. There are two main types of interactions
306         with the dictation system:
307         - initial request for context, which consists in retrieving the selected text
308         and 5 words before the selection and 5 words after, if available.
309         - insertion of recognized chunks of text, providing the text
310         to replace.
311     
312         * UIProcess/AutoCorrectionCallback.h:
313         (WebKit::DictationContextCallback::create):
314         (WebKit::DictationContextCallback::~DictationContextCallback):
315         (WebKit::DictationContextCallback::performCallbackWithReturnValue):
316         (WebKit::DictationContextCallback::invalidate):
317         (WebKit::DictationContextCallback::DictationContextCallback):
318         * UIProcess/WebPageProxy.h:
319         * UIProcess/WebPageProxy.messages.in:
320         * UIProcess/ios/WKContentViewInteraction.h:
321         * UIProcess/ios/WKContentViewInteraction.mm:
322         (-[WKContentView replaceDictatedText:withText:]):
323         (-[WKContentView requestDictationContext:]):
324         * UIProcess/ios/WebPageProxyIOS.mm:
325         (WebKit::WebPageProxy::dictationContextCallback):
326         (WebKit::WebPageProxy::replaceDictatedText):
327         (WebKit::WebPageProxy::requestDictationContext):
328         * WebProcess/WebPage/WebPage.h:
329         * WebProcess/WebPage/WebPage.messages.in:
330         * WebProcess/WebPage/ios/WebPageIOS.mm:
331         (WebKit::WebPage::requestDictationContext):
332         (WebKit::WebPage::replaceDictatedText):
333
334 2014-03-24  Andy Estes  <aestes@apple.com>
335
336         Yet another iOS build fix, for the 32-bit build this time.
337
338         * Shared/Downloads/ios/DownloadIOS.mm:
339         (WebKit::setUpDownloadClient):
340
341 2014-03-24  Tim Horton  <timothy_horton@apple.com>
342
343         REGRESSION (r165872): Double-applying device scale to snapshots
344         https://bugs.webkit.org/show_bug.cgi?id=130697
345         <rdar://problem/16396629>
346
347         Reviewed by Simon Fraser.
348
349         * WebProcess/WebPage/WebPage.cpp:
350         (WebKit::WebPage::scaledSnapshotWithOptions):
351         Drive-by, make scaledSnapshotWithOptions respect SnapshotOptionsExcludeDeviceScaleFactor.
352
353         (WebKit::WebPage::snapshotAtSize):
354         Divide the device scale out of the scale factor
355
356         * WebProcess/WebPage/WebPage.h:
357         Rename the scale argument to scaledSnapshotWithOptions to clarify
358         that it is an additional scale on top of the device scale.
359
360 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
361
362         Activate WebVTT Tests Once Merging is Complete
363         https://bugs.webkit.org/show_bug.cgi?id=130420
364
365         Reviewed by Eric Carlson.
366
367         * Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
368
369 2014-03-24  Andy Estes  <aestes@apple.com>
370
371         Fix the iOS build.
372
373         * Shared/Downloads/ios/DownloadIOS.mm:
374         (WebKit::setUpDownloadClient):
375         * UIProcess/Cocoa/DownloadClient.mm:
376
377 2014-03-24  Mark Rowe  <mrowe@apple.com>
378
379         Build fix after r166186.
380
381         * UIProcess/Cocoa/DownloadClient.mm:
382
383 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
384
385         [WK2] Make updates on ViewUpdateDispatcher less heavy
386         https://bugs.webkit.org/show_bug.cgi?id=130626
387
388         Reviewed by Darin Adler.
389
390         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
391         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
392         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
393         * WebProcess/WebPage/ViewUpdateDispatcher.h:
394
395 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
396
397         [iOS][WK2] Micro-optimize view state updates on the UIProcess side
398         https://bugs.webkit.org/show_bug.cgi?id=130631
399
400         Reviewed by Darin Adler.
401
402         * UIProcess/API/Cocoa/WKWebView.mm:
403         (contentZoomScale):
404         [UIScrollView zoomScale] is not fast enough for -[WKWebView _updateVisibleContentRects]. Since we know what the zoom view is,
405         make a fast version hardcoding that.
406
407         (-[WKWebView _updateScrollViewBackground]):
408         (-[WKWebView _zoomToPoint:WebCore::atScale:]):
409         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
410         (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
411         (-[WKWebView _updateVisibleContentRects]):
412         * UIProcess/ios/WKContentView.mm:
413         (fixedPositionRectFromExposedRect):
414         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
415
416 2014-03-24  Dean Jackson  <dino@apple.com>
417
418         Remove WebGL asset entitlement
419         https://bugs.webkit.org/show_bug.cgi?id=130685
420
421         Reviewed by Simon Fraser.
422
423         No longer necessary on iOS.
424
425         * Configurations/WebContent-iOS.entitlements:
426
427 2014-03-24  Andy Estes  <aestes@apple.com>
428
429         [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
430         https://bugs.webkit.org/show_bug.cgi?id=129322
431
432         Reviewed by Anders Carlsson.
433
434         Based on an original patch by Yongjun Zhang  <yongjun_zhang@apple.com>.
435
436         * Shared/Cocoa/APIObject.mm:
437         (API::Object::newObject):
438         * Shared/Downloads/ios/DownloadIOS.mm:
439         (WebKit::dispatchOnMainThread):
440         (WebKit::toDownload):
441         (WebKit::setUpDownloadClient):
442         (WebKit::Download::startWithHandle):
443         * UIProcess/API/APIDownloadClient.h:
444         (API::DownloadClient::~DownloadClient):
445         * UIProcess/API/C/WKContext.cpp:
446         (WKContextSetDownloadClient):
447         * UIProcess/API/Cocoa/WKProcessPool.mm:
448         (-[WKProcessPool _downloadDelegate]):
449         (-[WKProcessPool _setDownloadDelegate:]):
450         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
451         * UIProcess/API/Cocoa/_WKDownload.h: Added.
452         * UIProcess/API/Cocoa/_WKDownload.mm: Added.
453         (WebKit::wrapper):
454         (WebKit::createAPIDownloadClient):
455         (-[_WKDownload dealloc]):
456         (-[_WKDownload API::]):
457         * UIProcess/API/Cocoa/_WKDownloadDelegate.h: Added.
458         * UIProcess/API/Cocoa/_WKDownloadInternal.h: Added.
459         * UIProcess/Cocoa/DownloadClient.h: Added.
460         * UIProcess/Cocoa/DownloadClient.mm: Added.
461         * WebKit2.xcodeproj/project.pbxproj:
462
463 2014-03-24  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
464
465         [EFL][WK2] Buildfix after r166159.
466
467         Reviewed by Csaba Osztrogonác.
468
469         * UIProcess/API/efl/ewk_settings.cpp:
470         (ewk_settings_file_access_from_file_urls_allowed_set):
471         (ewk_settings_file_access_from_file_urls_allowed_get):
472
473 2014-03-24  Jinwoo Song  <jinwoo7.song@samsung.com>
474
475         [EFL][WK2] Use C API inside ewk_settings
476         https://bugs.webkit.org/show_bug.cgi?id=107820
477
478         Reviewed by Gyuyoung Kim.
479
480         Use C API inside ewk_settings instead of accessing directly
481         internal C++ classes, to avoid violating API layering.
482
483         Original-author: Christophe Dumez <ch.dumez@sisa.samsung.com>
484
485         * UIProcess/API/efl/EwkView.cpp:
486         (EwkView::EwkView):
487         * UIProcess/API/efl/ewk_settings.cpp:
488         (ewk_settings_fullscreen_enabled_set):
489         (ewk_settings_fullscreen_enabled_get):
490         (ewk_settings_javascript_enabled_set):
491         (ewk_settings_javascript_enabled_get):
492         (ewk_settings_loads_images_automatically_set):
493         (ewk_settings_loads_images_automatically_get):
494         (ewk_settings_developer_extras_enabled_set):
495         (ewk_settings_developer_extras_enabled_get):
496         (ewk_settings_file_access_from_file_urls_allowed_set):
497         (ewk_settings_file_access_from_file_urls_allowed_get):
498         (ewk_settings_frame_flattening_enabled_set):
499         (ewk_settings_frame_flattening_enabled_get):
500         (ewk_settings_dns_prefetching_enabled_set):
501         (ewk_settings_dns_prefetching_enabled_get):
502         (ewk_settings_encoding_detector_enabled_set):
503         (ewk_settings_encoding_detector_enabled_get):
504         (ewk_settings_preferred_minimum_contents_width_set):
505         (ewk_settings_preferred_minimum_contents_width_get):
506         (ewk_settings_offline_web_application_cache_enabled_set):
507         (ewk_settings_offline_web_application_cache_enabled_get):
508         (ewk_settings_scripts_can_open_windows_set):
509         (ewk_settings_scripts_can_open_windows_get):
510         (ewk_settings_local_storage_enabled_set):
511         (ewk_settings_local_storage_enabled_get):
512         (ewk_settings_plugins_enabled_set):
513         (ewk_settings_plugins_enabled_get):
514         (ewk_settings_default_font_size_set):
515         (ewk_settings_default_font_size_get):
516         (ewk_settings_private_browsing_enabled_set):
517         (ewk_settings_private_browsing_enabled_get):
518         (ewk_settings_text_autosizing_enabled_set):
519         (ewk_settings_text_autosizing_enabled_get):
520         (ewk_settings_spatial_navigation_enabled_set):
521         (ewk_settings_spatial_navigation_enabled_get):
522         (EwkSettings::setDefaultTextEncodingName):
523         * UIProcess/API/efl/ewk_settings_private.h:
524         (EwkSettings::EwkSettings):
525         (EwkSettings::preferences):
526
527 2014-03-24  Zan Dobersek  <zdobersek@igalia.com>
528
529         [GTK][WK2] Guard NetscapePluginModule methods used in PluginInfoCache that are specific to X11 architecture
530         https://bugs.webkit.org/show_bug.cgi?id=130663
531
532         Reviewed by Carlos Garcia Campos.
533
534         The two used methods are specific to the X11 plugin architecture and are not declared when building for a
535         Wayland-only configuration. Guarding them prevents build failures, but does not ensure proper functionality
536         which isn't a problem anyway since there's no support yet for Netscape plugins on Wayland.
537
538         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
539         (WebKit::PluginInfoCache::getPluginInfo): Guard NetscapePluginModule::parseMIMEDescription with PLUGIN_ARCHITECTURE(X11).
540         (WebKit::PluginInfoCache::updatePluginInfo): Ditto for NetscapePluginModule::buildMIMEDescription.
541
542 2014-03-24  Ryuan Choi  <ryuan.choi@samsung.com>
543
544         [EFL][WK2] Convert some more OwnPtr/PassOwnPtr to std::unique_ptr
545         https://bugs.webkit.org/show_bug.cgi?id=130662
546
547         Reviewed by Gyuyoung Kim.
548
549         Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in remained WebKit2/Efl specific code.
550
551         * UIProcess/API/efl/EwkView.h:
552         * UIProcess/API/efl/ewk_cookie_manager.cpp:
553         * UIProcess/API/efl/ewk_database_manager.cpp:
554         (getDatabaseOriginsCallback):
555         * UIProcess/API/efl/ewk_error_private.h:
556         * UIProcess/efl/DownloadManagerEfl.cpp:
557         (WebKit::DownloadManagerEfl::didFail):
558         * UIProcess/efl/InputMethodContextEfl.h:
559         (WebKit::InputMethodContextEfl::create):
560         * UIProcess/efl/PageLoadClientEfl.cpp:
561         (WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
562         (WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):
563
564 2014-03-23  Hyowon Kim  <hw1008.kim@samsung.com>
565
566         Move all EFL typedefs into EflTypedefs.h.
567         https://bugs.webkit.org/show_bug.cgi?id=130511
568
569         Reviewed by Gyuyoung Kim.
570
571         * Shared/API/c/efl/WKArrayEfl.h: Remove EFL typedefs.
572         * UIProcess/API/efl/EwkView.h: Ditto.
573
574 2014-03-23  Jinwoo Song  <jinwoo7.song@samsung.com>
575
576         [WK2] Refine WebKit2 BatteryStatus code
577         https://bugs.webkit.org/show_bug.cgi?id=130573
578
579         Reviewed by Anders Carlsson.
580
581         Refinements
582          - Return PassRef instead of PassRefPtr in create methods
583          - Use auto instead of iterator
584
585         * UIProcess/WebBatteryManagerProxy.cpp:
586         (WebKit::WebBatteryManagerProxy::create):
587         * UIProcess/WebBatteryManagerProxy.h:
588         * UIProcess/efl/BatteryProvider.cpp:
589         (BatteryProvider::create):
590         * UIProcess/efl/BatteryProvider.h:
591         * WebProcess/Battery/WebBatteryManager.cpp:
592         (WebKit::WebBatteryManager::didChangeBatteryStatus):
593         (WebKit::WebBatteryManager::updateBatteryStatus):
594
595 2014-03-23  Sam Weinig  <sam@webkit.org>
596
597         Simplify the HTMLConverter interface (Part 2)
598         https://bugs.webkit.org/show_bug.cgi?id=130654
599
600         Reviewed by Darin Adler.
601
602         * WebProcess/WebPage/WebPage.h:
603         * WebProcess/WebPage/ios/WebPageIOS.mm:
604         (WebKit::WebPage::performDictionaryLookupForRange):
605         * WebProcess/WebPage/mac/WebPageMac.mm:
606         (WebKit::WebPage::getAttributedSubstringFromRange):
607         (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
608         (WebKit::WebPage::performDictionaryLookupAtLocation):
609         (WebKit::WebPage::performDictionaryLookupForSelection):
610         (WebKit::WebPage::performDictionaryLookupForRange):
611
612 2014-03-23  David Kilzer  <ddkilzer@apple.com>
613
614         WebKit::resistanceForDelta() truncates 'scaleDistance' to integer value using abs()
615         <http://webkit.org/b/130651>
616
617         Reviewed by Darin Adler.
618
619         Fixes the following build failure with trunk clang:
620
621             WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
622                 double scaleDistance = abs(limit - currentScale);
623                                        ^
624             WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: note: use function 'fabs' instead
625                 double scaleDistance = abs(limit - currentScale);
626                                        ^~~
627                                        fabs
628
629         * UIProcess/mac/ViewGestureControllerMac.mm:
630         (WebKit::resistanceForDelta): Use fabs() instead of abs().
631
632 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
633
634         Clean up #includes by geometry classes
635         https://bugs.webkit.org/show_bug.cgi?id=130645
636
637         Reviewed by Andreas Kling.
638
639         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
640         classes brings in a lot of additional headers. Fix by adding a new
641         GeometryUtilities file so that the basic files don't need Vector,
642         and including GeometryUtilities.h where necessary.
643         
644         Also forward declare PrintStream.h and only bring in the header
645         in implementation files.
646
647         * Shared/UpdateInfo.h:
648         * UIProcess/BackingStore.h:
649         * UIProcess/CoordinatedGraphics/PageViewportController.h:
650         * UIProcess/FindIndicator.cpp:
651         * UIProcess/mac/WKPrintingView.h:
652
653 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
654
655         Clean up #includes by geometry classes
656         https://bugs.webkit.org/show_bug.cgi?id=130645
657
658         Reviewed by Andreas Kling.
659
660         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
661         classes brings in a lot of additional headers. Fix by adding a new
662         GeometryUtilities file so that the basic files don't need Vector,
663         and including GeometryUtilities.h where necessary.
664         
665         Also forward declare PrintStream.h and only bring in the header
666         in implementation files.
667
668         * UIProcess/BackingStore.h:
669         * UIProcess/FindIndicator.cpp:
670         * UIProcess/mac/WKPrintingView.h:
671
672 2014-03-22  Alexey Proskuryakov  <ap@apple.com>
673
674         Assertions in WebPage::rangeFromEditingRange when requested range location is NSNotFound
675         https://bugs.webkit.org/show_bug.cgi?id=130633
676         <rdar://problem/16397583>
677
678         Reviewed by Darin Adler.
679
680         * UIProcess/API/mac/WKView.mm:
681         (-[WKView firstRectForCharacterRange:completionHandler:]):
682         (-[WKView firstRectForCharacterRange:actualRange:]):
683         Return NSZeroRect, like NSTextView does for any locations that are out of bounds.
684         There is no need for a round trip to WebProcess in this case.
685
686 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
687
688         [iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
689         https://bugs.webkit.org/show_bug.cgi?id=130555
690
691         Reviewed by Simon Fraser.
692
693         * Shared/VisibleContentRectUpdateInfo.cpp:
694         (WebKit::VisibleContentRectUpdateInfo::encode):
695         (WebKit::VisibleContentRectUpdateInfo::decode):
696         * Shared/VisibleContentRectUpdateInfo.h:
697         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
698         (WebKit::operator==):
699         * UIProcess/ios/WKContentView.mm:
700         (WebKit::HistoricalKinematicData::HistoricalKinematicData):
701         (WebKit::HistoricalKinematicData::velocityForNewData):
702         (WebKit::HistoricalKinematicData::clear):
703         (WebKit::HistoricalKinematicData::append):
704         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
705         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
706         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
707         * WebProcess/WebPage/ios/WebPageIOS.mm:
708         (WebKit::WebPage::updateVisibleContentRects):
709
710 2014-03-21  Alexey Proskuryakov  <ap@apple.com>
711
712         REGRESSION (r165356): Predictive Chinese input is broken
713         https://bugs.webkit.org/show_bug.cgi?id=130619
714
715         Reviewed by Enrica Casucci.
716
717         * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::executeKeypressCommands):
718         Like after insertText, we are no longer in an intermediate state after executeKeypressCommands.
719         Make sure that we don't call -discardMarkedText the next time we get a non-intermediate
720         state with closed composition.
721
722 2014-03-21  Sam Weinig  <sam@webkit.org>
723
724         [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
725         https://bugs.webkit.org/show_bug.cgi?id=130528
726
727         Reviewed by Tim Horton.
728
729         * Platform/IPC/Connection.h:
730         * Platform/IPC/mac/ConnectionMac.cpp:
731         (IPC::Connection::getAuditToken):
732         Expose the audit data if available. 
733
734         * NetworkProcess/mac/RemoteNetworkingContext.mm:
735         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
736         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
737         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
738         Pass the audit data corresponding to the UIProcess.
739
740         * Configurations/Network-iOS.entitlements: Copied from Configurations/WebContent-iOS.entitlements.
741         * Configurations/NetworkProcess.xcconfig:
742         * Configurations/NetworkService.Development.xcconfig:
743         * Configurations/NetworkService.xcconfig:
744         * Configurations/WebContent-iOS.entitlements:
745         Add entitlement allowing the audit data to be used.
746
747 2014-03-21  Tim Horton  <timothy_horton@apple.com>
748
749         Always retrieve the screen scale factor from WKSI
750         <rdar://problem/16329679>
751
752         Reviewed by Sam Weinig.
753
754         * UIProcess/ios/WKContentView.mm:
755         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
756         (-[WKContentView _updateForScreen:]):
757         Use WKGetScreenScaleFactor/WKGetScaleFactorForScreen.
758
759 2014-03-21  Yongjun Zhang  <yongjun_zhang@apple.com>
760
761         [Webkit2] Add APIDownloadClient for download support.
762         https://bugs.webkit.org/show_bug.cgi?id=130484
763
764         Add API::DownloadClient to WebContext and get rid of WebDownloadClient.
765
766         Reviewed by Anders Carlsson.
767
768         * UIProcess/API/APIDownloadClient.h: Added.
769         (API::DownloadClient::~DownloadClient):
770         (API::DownloadClient::didStart):
771         (API::DownloadClient::didReceiveAuthenticationChallenge):
772         (API::DownloadClient::didReceiveResponse):
773         (API::DownloadClient::didReceiveData):
774         (API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
775         (API::DownloadClient::decideDestinationWithSuggestedFilename):
776         (API::DownloadClient::didCreateDestination):
777         (API::DownloadClient::didFinish):
778         (API::DownloadClient::didFail):
779         (API::DownloadClient::didCancel):
780         (API::DownloadClient::processDidCrash):
781         * UIProcess/API/C/WKContext.cpp:
782         (WKContextSetDownloadClient): Move the original WebDownloadClient methods to a local class
783             DownloadClient and set up the downloadClient for WebContext.
784         * UIProcess/Downloads/DownloadProxy.cpp:
785         * UIProcess/WebContext.cpp:
786         (WebKit::WebContext::setDownloadClient):
787         * UIProcess/WebContext.h:
788         (WebKit::WebContext::downloadClient):
789         * UIProcess/WebDownloadClient.cpp: Removed.
790         * UIProcess/WebDownloadClient.h: Removed.
791         * WebKit2.xcodeproj/project.pbxproj:
792
793 2014-03-21  Alexey Proskuryakov  <ap@apple.com>
794
795         ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
796         https://bugs.webkit.org/show_bug.cgi?id=130526
797         <rdar://problem/16371612> 
798
799         This was fixed yesterday for sync code path, landing the same this for async one.
800
801         * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]):
802
803 2014-03-21  Pratik Solanki  <psolanki@apple.com>
804
805         Add callbacks in WebKit2 Cocoa API for page load testing
806         https://bugs.webkit.org/show_bug.cgi?id=130569
807
808         Reviewed by Anders Carlsson.
809
810         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
811         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
812         (didFirstVisuallyNonEmptyLayoutForFrame):
813         (didHandleOnloadEventsForFrame):
814         (setUpPageLoaderClient):
815         (willSendRequestForFrame):
816         (didInitiateLoadForResource):
817         (didFinishLoadForResource):
818         (didFailLoadForResource):
819         (setUpResourceLoadClient):
820
821 2014-03-21  Ryuan Choi  <ryuan.choi@samsung.com>
822
823         [EFL][WK2] Remove Ewk_Error parameter from some async callbacks
824         https://bugs.webkit.org/show_bug.cgi?id=130567
825
826         Reviewed by Gyuyoung Kim.
827
828         WebKit2 internally uses GenericCallbacks for several APIs such as WKKeyValueStorageManagerGetKeyValueStorageOrigins.
829         But only few callbacks really return errors.
830
831         This patch removes Ewk_Error parameters from these callbacks not to make
832         the confusion for application developers.
833
834         * UIProcess/API/efl/ewk_cookie_manager.cpp:
835         (getAcceptPolicyCallback):
836         (getHostnamesWithCookiesCallback):
837         * UIProcess/API/efl/ewk_cookie_manager.h:
838         * UIProcess/API/efl/ewk_database_manager.cpp:
839         (getDatabaseOriginsCallback):
840         * UIProcess/API/efl/ewk_database_manager.h:
841         * UIProcess/API/efl/ewk_storage_manager.cpp:
842         (getStorageOriginsCallback):
843         * UIProcess/API/efl/ewk_storage_manager.h:
844         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
845         (EWK2CookieManagerTest::getAcceptPolicyCallback):
846         (EWK2CookieManagerTest::getHostnamesWithCookiesCallback):
847         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
848         (EWK2DatabaseManagerTest::databaseOriginsCallback):
849         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
850         (EWK2StorageManagerTest::getStorageOriginsCallback):
851
852 2014-03-21  Darin Adler  <darin@apple.com>
853
854         Improve idiom used for string building in a few places
855         https://bugs.webkit.org/show_bug.cgi?id=130561
856
857         Reviewed by Andreas Kling.
858
859         * Shared/mac/ChildProcessMac.mm:
860         (WebKit::ChildProcess::initializeSandbox): Use a more efficient idiom for string
861         concatenation.
862
863         * UIProcess/WebInspectorProxy.cpp:
864         (WebKit::WebInspectorProxy::createInspectorPage): Use a StringBuilder.
865
866 2014-03-20  Hyowon Kim  <hw1008.kim@samsung.com>
867
868         Move to using std::unique_ptr for EFL objects.
869         https://bugs.webkit.org/show_bug.cgi?id=129853
870
871         Reviewed by Gyuyoung Kim.
872
873         EflUniquePtr is a template alias of std::unique_ptr
874         with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
875         This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
876
877         * Platform/Module.h:
878         * Platform/efl/ModuleEfl.cpp:
879         (WebKit::Module::load):
880         * UIProcess/API/efl/EwkView.cpp:
881         (EwkView::EwkView):
882         * UIProcess/API/efl/EwkView.h:
883         * UIProcess/efl/InputMethodContextEfl.cpp:
884         (WebKit::InputMethodContextEfl::InputMethodContextEfl):
885         (WebKit::InputMethodContextEfl::createIMFContext):
886         * UIProcess/efl/InputMethodContextEfl.h:
887         (WebKit::InputMethodContextEfl::create):
888
889 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
890
891         [EFL][GTK] Get CMake to find Freetype2 properly
892         https://bugs.webkit.org/show_bug.cgi?id=130150
893
894         Reviewed by Martin Robinson.
895
896         Newer versions of CMake are not able to find Freetype2 correctly.
897         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
898         freetype2 repo, because a completely different version number is found in freetype2.pc.
899
900         * PlatformEfl.cmake:
901
902 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
903
904         [GTK] Suppress errors about using gdk_threads_enter gdk_threads_leave
905         https://bugs.webkit.org/show_bug.cgi?id=130517
906
907         Reviewed by Sergio Villar Senin.
908
909         * UIProcess/API/gtk/WebKitWebView.cpp: Use GCC suppression to suppress errors about deprecations.
910         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
911
912 2014-03-20  Ryuan Choi  <ryuan.choi@samsung.com>
913
914         [EFL][WK2] tests of test_ewk2_cookie_manager are flaky
915         https://bugs.webkit.org/show_bug.cgi?id=130498
916
917         Reviewed by Gyuyoung Kim.
918
919         Loaded web page before calling getAcceptPolicy() to guarantee that webprocess
920         or networkprocess was launched and registered WebCookieManager.
921
922         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
923         (TEST_F):
924
925 2014-03-20  Commit Queue  <commit-queue@webkit.org>
926
927         Unreviewed, rolling out r165985.
928         https://bugs.webkit.org/show_bug.cgi?id=130551
929
930         broke page loading on all cocoa platforms (Requested by
931         thorton on #webkit).
932
933         Reverted changeset:
934
935         "[WebKit2] Implement
936         NetworkingContext::sourceApplicationAuditData() for WebKit2"
937         https://bugs.webkit.org/show_bug.cgi?id=130528
938         http://trac.webkit.org/changeset/165985
939
940 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
941
942         Fix a long-standing typo that's now breaking USE(ASYNC_NSTEXTINPUTCLIENT) build.
943
944         Rubber-stamped by Tim Horton.
945
946         * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::cancelComposition):
947         Use a correct type for reply (it's really the same type, but ConfirmComposition
948         is behind an ifdef, and not available).
949
950 2014-03-20  Enrica Casucci  <enrica@apple.com>
951
952         [iOS WebKit2] typing and deleting text lags behind the caret movement on google.com.
953         https://bugs.webkit.org/show_bug.cgi?id=130544
954         <rdar://problem/16380296>
955
956         Reviewed by Tim Horton.
957
958         On iOS the selection is drawn in the UIProcess. If the WebProcess is
959         processing multiple requests within the same runloop, the caret could be
960         updated in the UIProcess before the WebProcess has had a chance to paint.
961         This change synchronizes the selection drawing with the tile update.
962
963         * UIProcess/WebPageProxy.h:
964         * UIProcess/ios/WKContentView.mm:
965         (-[WKContentView _didCommitLayerTree:WebKit::]):
966         * UIProcess/ios/WKContentViewInteraction.h:
967         * UIProcess/ios/WKContentViewInteraction.mm:
968         (-[WKContentView _selectionChanged]):
969         (-[WKContentView _updateChangedSelection]):
970         * WebProcess/WebPage/WebPage.cpp:
971         (WebKit::WebPage::didChangeSelection):
972
973 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
974
975         Generalize WebInspector check in maybeInitializeSandboxExtensionHandle().
976         https://bugs.webkit.org/show_bug.cgi?id=130079
977         <rdar://problem/16286683>
978
979         Reviewed by Anders Carlsson.
980
981         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
982         Perform an early return for all paths that don't need a sandbox extension due to
983         access being assumed, not only for WebInspector pages.
984
985         * UIProcess/WebProcessProxy.cpp:
986         (WebKit::WebProcessProxy::hasAssumedReadAccessToURL):
987         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
988         * UIProcess/WebProcessProxy.h:
989         Factored out m_localPathsWithAssumedReadAccess iteration to a public function.
990
991 2014-03-20  Csaba Osztrogonác  <ossy@webkit.org>
992
993         Unreviewed buildfix after r165983 for non Cocoa platforms.
994
995         * UIProcess/API/C/WKAPICast.h:
996         * UIProcess/API/C/WKPreferences.cpp:
997         * UIProcess/efl/WebInspectorProxyEfl.cpp:
998
999 2014-03-20  Beth Dakin  <bdakin@apple.com>
1000
1001         Implement contentInset for Mac WebKit2
1002         https://bugs.webkit.org/show_bug.cgi?id=130273
1003
1004         Reviewed by Simon Fraser.
1005
1006         This patch adds WKView API for setting a topContentInset(). All of this work gets 
1007         that number plumbed down to WebCore.
1008
1009         * Shared/WebPageCreationParameters.cpp:
1010         (WebKit::WebPageCreationParameters::encode):
1011         (WebKit::WebPageCreationParameters::decode):
1012         * Shared/WebPageCreationParameters.h:
1013         * UIProcess/API/Cocoa/WKViewPrivate.h:
1014         * UIProcess/API/Cocoa/WKWebView.mm:
1015         (-[WKWebView _setTopContentInset:]):
1016         (-[WKWebView _topContentInset]):
1017         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1018         * UIProcess/API/mac/WKView.mm:
1019         (-[WKView _setTopContentInset:]):
1020         (-[WKView _topContentInset]):
1021         * UIProcess/WebPageProxy.cpp:
1022         (WebKit::WebPageProxy::WebPageProxy):
1023         (WebKit::WebPageProxy::setTopContentInset):
1024         (WebKit::WebPageProxy::creationParameters):
1025         * UIProcess/WebPageProxy.h:
1026         (WebKit::WebPageProxy::topContentInset):
1027         * WebProcess/WebPage/WebPage.cpp:
1028         (WebKit::WebPage::WebPage):
1029         (WebKit::WebPage::setTopContentInset):
1030         * WebProcess/WebPage/WebPage.h:
1031         * WebProcess/WebPage/WebPage.messages.in:
1032
1033 2014-03-20  Anders Carlsson  <andersca@apple.com>
1034
1035         Fix 32-bit build.
1036
1037         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
1038
1039 2014-03-20  Anders Carlsson  <andersca@apple.com>
1040
1041         Make WKProcessPoolConfiguration SPI
1042         https://bugs.webkit.org/show_bug.cgi?id=130537
1043
1044         Reviewed by Tim Horton.
1045
1046         * UIProcess/API/Cocoa/WKProcessPool.h:
1047         * UIProcess/API/Cocoa/WKProcessPool.mm:
1048         (-[WKProcessPool init]):
1049         (-[WKProcessPool dealloc]):
1050         (-[WKProcessPool description]):
1051         (-[WKProcessPool _configuration]):
1052         (-[WKProcessPool API::]):
1053         (-[WKProcessPool _initWithConfiguration:]):
1054         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h:
1055         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
1056         (-[WKProcessPoolConfiguration _injectedBundleURL]):
1057         (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
1058         * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h:
1059         * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
1060         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1061         * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1062         (-[WKProcessPool initWithConfiguration:]):
1063         (-[WKProcessPool configuration]):
1064         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h.
1065         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm.
1066         (-[_WKProcessPoolConfiguration injectedBundleURL]):
1067         (-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
1068         (-[_WKProcessPoolConfiguration description]):
1069         (-[_WKProcessPoolConfiguration copyWithZone:]):
1070         * WebKit2.xcodeproj/project.pbxproj:
1071
1072 2014-03-20  Tim Horton  <timothy_horton@apple.com>
1073
1074         Add WebCore::IOSurface wrapper
1075         https://bugs.webkit.org/show_bug.cgi?id=130529
1076
1077         Reviewed by Simon Fraser.
1078
1079         * Shared/mac/RemoteLayerBackingStore.h:
1080         * Shared/mac/RemoteLayerBackingStore.mm:
1081         (RemoteLayerBackingStore::encode):
1082         (RemoteLayerBackingStore::decode):
1083         (RemoteLayerBackingStore::display):
1084         (RemoteLayerBackingStore::applyBackingStoreToLayer):
1085         * UIProcess/ios/ViewGestureControllerIOS.mm:
1086         (WebKit::ViewGestureController::beginSwipeGesture):
1087         (WebKit::ViewGestureController::removeSwipeSnapshot):
1088         * UIProcess/mac/ViewGestureController.h:
1089         * UIProcess/mac/ViewGestureControllerMac.mm:
1090         (WebKit::ViewGestureController::beginSwipeGesture):
1091         (WebKit::ViewGestureController::removeSwipeSnapshot):
1092         * UIProcess/mac/ViewSnapshotStore.h:
1093         * UIProcess/mac/ViewSnapshotStore.mm:
1094         (WebKit::createIOSurfaceFromImage):
1095         (WebKit::ViewSnapshotStore::recordSnapshot):
1096         Adopt WebCore::IOSurface.
1097
1098 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
1099
1100         Update iOS input method code to use new cross-platform async functions
1101         https://bugs.webkit.org/show_bug.cgi?id=130530
1102
1103         Reviewed by Enrica Casucci.
1104
1105         Merge identical iOS and cross-platform functions.
1106
1107         Also tightened up ifdefs, and removed stub iOS implementations of sync methods,
1108         which hopefully won't be ever needed. The only tricky case is sync cancelComposition,
1109         will I'll investigate separately.
1110
1111         * UIProcess/WebPageProxy.h:
1112         * UIProcess/ios/WKContentViewInteraction.mm:
1113         (-[WKContentView setMarkedText:selectedRange:]):
1114         (-[WKContentView unmarkText]):
1115         (-[WKContentView insertText:]):
1116         * UIProcess/ios/WebPageProxyIOS.mm:
1117         (WebKit::WebPageProxy::cancelComposition):
1118         * UIProcess/mac/WebPageProxyMac.mm:
1119         (WebKit::WebPageProxy::cancelComposition):
1120         (WebKit::WebPageProxy::insertDictatedTextAsync):
1121         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
1122         (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
1123         * WebProcess/WebPage/WebPage.h:
1124         * WebProcess/WebPage/WebPage.messages.in:
1125         * WebProcess/WebPage/ios/WebPageIOS.mm:
1126         * WebProcess/WebPage/mac/WebPageMac.mm:
1127         (WebKit::WebPage::cancelComposition):
1128         (WebKit::WebPage::insertDictatedTextAsync):
1129         (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
1130
1131 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
1132
1133         ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
1134         https://bugs.webkit.org/show_bug.cgi?id=130526
1135         <rdar://problem/16371612>
1136
1137         Reviewed by Anders Carlsson.
1138
1139         * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]): Cut custom
1140         processing short whenever we are redispatching an event, not just when the event
1141         we are handling is the one being redispatched. There shouldn't be any other unrelated
1142         events here, just the one being redispatched and synthetic ones generated from it by AppKit.
1143
1144 2014-03-20  Anders Carlsson  <andersca@apple.com>
1145
1146         Fix build.
1147
1148         Rename WKPreferencesPrivate.h to WKPreferencesRefPrivate.h.
1149
1150         * UIProcess/API/C/WKPreferencesRefPrivate.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h.
1151         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1152         * WebKit2.xcodeproj/project.pbxproj:
1153
1154 2014-03-20  Gavin Barraclough  <barraclough@apple.com>
1155
1156         Merge AtomicString, Identifier
1157         https://bugs.webkit.org/show_bug.cgi?id=128624
1158
1159         Unreviewed build fix following r165982.
1160
1161         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1162             - update includes.
1163
1164 2014-03-20  Sam Weinig  <sam@webkit.org>
1165
1166         [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
1167         https://bugs.webkit.org/show_bug.cgi?id=130528
1168
1169         Reviewed by Anders Carlsson.
1170
1171         * Platform/IPC/Connection.h:
1172         * Platform/IPC/mac/ConnectionMac.cpp:
1173         (IPC::Connection::getAuditToken):
1174         Expose the audit data if available. 
1175
1176         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1177         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
1178         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1179         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
1180         Pass the audit data corresponding to the UIProcess.
1181
1182 2014-03-20  Sam Weinig  <sam@webkit.org>
1183
1184         [Cocoa] Expose preference to enable telephone number detection
1185         https://bugs.webkit.org/show_bug.cgi?id=130524
1186
1187         Reviewed by Anders Carlsson.
1188
1189         * UIProcess/API/Cocoa/WKPreferences.mm:
1190         (-[WKPreferences _telephoneNumberDetectionIsEnabled]):
1191         (-[WKPreferences _setTelephoneNumberDetectionIsEnabled:]):
1192         * UIProcess/API/Cocoa/WKPreferencesInternal.h:
1193         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added.
1194         * WebKit2.xcodeproj/project.pbxproj:
1195
1196 2014-03-19  Alexey Proskuryakov  <ap@apple.com>
1197
1198         [Mac] Support asynchronous NSTextInputClient
1199         https://bugs.webkit.org/show_bug.cgi?id=130479
1200
1201         Reviewed by Anders Carlsson.
1202
1203         The implementation is currently disabled, pending lower level support.
1204         Most of the code is not under compile time guard however, to facilitate cross-platform
1205         reuse, or at least under a PLATFORM(COCOA) guard to share the code with iOS.
1206
1207         * UIProcess/API/mac/WKView.mm: Added a compile time branch for USE(ASYNC_NSTEXTINPUTCLIENT).
1208         We still implement sync NSTextInputClient here, in order to get assertions when
1209         its methods are unexpectedly called.
1210         The new code first sends an event to input method asynchronously, handling any callbacks
1211         that may arrive. During this time, we no longer care about WKViewInterpretKeyEventsParameters
1212         at all. Once done, we interpret key bindings synchronously, collecting them into
1213         a vector.
1214
1215         * UIProcess/API/mac/WKViewInternal.h: We no longer expose _interpretKeyEvent outside
1216         WKView.
1217
1218         * UIProcess/WebPageProxy.cpp:
1219         * UIProcess/WebPageProxy.h:
1220         Added async calls and callbacks. Removed unnecessary and slightly harmful .get() when moving
1221         a callback pointer into map. Moved insertDictatedText() and getAttributedSubstringFromRange()
1222         from PLATFORM(COCOA) to PLATFORM(MAC), because they are unused and unimplemented on
1223         iOS, and unlikely to be needed any time soon. Changed USE(APPKIT) to PLATFORM(MAC),
1224         because that's more accurate in this case (nothing depends on AppKit, it's just code
1225         that we only need on Mac).
1226
1227         * UIProcess/WebPageProxy.messages.in: Added messages for new async IM responses.
1228
1229         * UIProcess/ios/WebPageProxyIOS.mm: Removed insertDictatedText() and getAttributedSubstringFromRange().
1230
1231         * UIProcess/mac/WebPageProxyMac.mm:
1232         (WebKit::WebPageProxy::insertDictatedTextAsync):
1233         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
1234         (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
1235         Added async calls and callbacks that are Mac only.
1236
1237         * WebProcess/WebPage/WebPage.cpp:
1238         * WebProcess/WebPage/WebPage.h:
1239         * WebProcess/WebPage/mac/WebPageMac.mm:
1240         Added async implementations (which are essentially the same as sync ones, sadly).
1241
1242         * WebProcess/WebPage/WebPage.messages.in: Added async messages, moved some messages
1243         under PLATFORM(MAC).
1244
1245         * WebProcess/WebPage/ios/WebPageIOS.mm: More of deleting functions that are Mac only,
1246         and cannot be easily implemented in WebPage.cpp with shared code.
1247
1248 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
1249
1250         Remove remaining GTK+ unused parameter warnings from WebKit2
1251         https://bugs.webkit.org/show_bug.cgi?id=130518
1252
1253         Reviewed by Sergio Villar Senin.
1254
1255         Fix almost all unused parameter warnings in the WebKit2GTK+ build.
1256
1257 2014-03-20  Commit Queue  <commit-queue@webkit.org>
1258
1259         Unreviewed, rolling out r165962.
1260         https://bugs.webkit.org/show_bug.cgi?id=130512
1261
1262         It broke the build (Requested by Ossy on #webkit).
1263
1264         Reverted changeset:
1265
1266         "[EFL][GTK] Get CMake to find Freetype2 properly"
1267         https://bugs.webkit.org/show_bug.cgi?id=130150
1268         http://trac.webkit.org/changeset/165962
1269
1270 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1271
1272         [EFL][GTK] Get CMake to find Freetype2 properly
1273         https://bugs.webkit.org/show_bug.cgi?id=130150
1274
1275         Reviewed by Csaba Osztrogonác.
1276
1277         Newer versions of CMake are not able to find Freetype2 correctly.
1278         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
1279         freetype2 repo, because a completely different version number is found in freetype2.pc.
1280
1281         * PlatformEfl.cmake:
1282
1283 2014-03-20  Ryuan Choi  <ryuan.choi@samsung.com>
1284
1285         [EFL][WK2] test_ewk2_application_cache_manager is flaky
1286         https://bugs.webkit.org/show_bug.cgi?id=130501
1287
1288         Reviewed by Gyuyoung Kim.
1289
1290         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
1291         (timerCallback): Return ECORE_CALLBACK_CANCEL to clear the timer.
1292
1293 2014-03-19  Tim Horton  <timothy_horton@apple.com>
1294
1295         Address late review comment and style nit after r165934.
1296
1297         * UIProcess/ios/ViewGestureControllerIOS.mm:
1298         (WebKit::ViewGestureController::beginSwipeGesture):
1299
1300 2014-03-19  Tim Horton  <timothy_horton@apple.com>
1301
1302         [iOS][WebKit2] Back-forward swipe doesn't always complete with fingers down
1303         https://bugs.webkit.org/show_bug.cgi?id=130489
1304         <rdar://problem/16027007>
1305
1306         Reviewed by Simon Fraser.
1307
1308         * UIProcess/ios/ViewGestureControllerIOS.mm:
1309         (WebKit::ViewGestureController::beginSwipeGesture):
1310         In order to have fingers-down swipe completion work correctly, we need
1311         to give UIKit an empty interactive update block.
1312
1313 2014-03-19  Anders Carlsson  <andersca@apple.com>
1314
1315         Get rid of two IPC::Connection functions by folding them into lambdas
1316         https://bugs.webkit.org/show_bug.cgi?id=130482
1317
1318         Reviewed by Tim Horton.
1319
1320         * Platform/IPC/Connection.cpp:
1321         (IPC::Connection::addWorkQueueMessageReceiver):
1322         (IPC::Connection::removeWorkQueueMessageReceiver):
1323         * Platform/IPC/Connection.h:
1324
1325 2014-03-19  Simon Fraser  <simon.fraser@apple.com>
1326
1327         Expose text and page zoom in WK2 SPI, and hook them up in MiniBrowser
1328         https://bugs.webkit.org/show_bug.cgi?id=130476
1329
1330         Reviewed by Anders Carlsson.
1331         
1332         Expose page and text zoom as SPI.
1333
1334         * UIProcess/API/Cocoa/WKWebView.mm:
1335         (-[WKWebView _supportsTextZoom]):
1336         (-[WKWebView _textZoomFactor]):
1337         (-[WKWebView _setTextZoomFactor:]):
1338         (-[WKWebView _pageZoomFactor]):
1339         (-[WKWebView _setPageZoomFactor:]):
1340         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1341
1342 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
1343
1344         [iOS][WK2] Reduce the extended background's opacity when WKContentView is smaller than its WKWebView
1345         https://bugs.webkit.org/show_bug.cgi?id=130436
1346
1347         Reviewed by Beth Dakin.
1348
1349         * UIProcess/API/Cocoa/WKWebView.mm:
1350         (-[WKWebView _updateScrollViewBackground]):
1351
1352 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
1353
1354         [iOS][WebKit2] <rdar://problem/16330387> Do not use the keyboard rect for computing the general unobscuredRect, only use it for centering
1355         https://bugs.webkit.org/show_bug.cgi?id=130382
1356
1357         Reviewed by Simon Fraser.
1358
1359         Always accumulating the keyboard rect out of the exposedRect caused some issues (see <rdar://problem/16330387>).
1360         This patch split the rect in two: unobscured rect for WebCore, and unobscuredContentRectIncludingKeyboard for centering
1361         UI Elements in view.
1362
1363         * UIProcess/API/Cocoa/WKWebView.mm:
1364         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
1365         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
1366         (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
1367         (-[WKWebView _contentRectForUserInteraction]):
1368         (-[WKWebView _updateVisibleContentRects]):
1369
1370 2014-03-19  Anders Carlsson  <andersca@apple.com>
1371
1372         Get rid of WKProcessClass
1373         https://bugs.webkit.org/show_bug.cgi?id=130478
1374
1375         Reviewed by Dan Bernstein.
1376
1377         * UIProcess/API/Cocoa/WKProcessClass.h: Removed.
1378         * UIProcess/API/Cocoa/WKProcessClass.mm: Removed.
1379         * UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Removed.
1380         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Removed.
1381         * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Removed.
1382         * UIProcess/API/Cocoa/WKProcessClassPrivate.h: Removed.
1383         * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Removed.
1384         * WebKit2.xcodeproj/project.pbxproj:
1385
1386 2014-03-19  Jer Noble  <jer.noble@apple.com>
1387
1388         [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
1389         https://bugs.webkit.org/show_bug.cgi?id=130459
1390
1391         Reviewed by Eric Carlson.
1392
1393         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1394         (InitWebCoreSystemInterface): Initialize the new WCSI method.
1395
1396 2014-03-19  Brady Eidson  <beidson@apple.com>
1397
1398         Filter out editable services from image menu for non-contenteditable images
1399         <rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
1400
1401         Reviewed by Tim Horton.
1402
1403         * UIProcess/mac/WebContextMenuProxyMac.h:
1404         * UIProcess/mac/WebContextMenuProxyMac.mm:
1405         (-[WKSharingServicePickerDelegate setIncludeEditorServices:]):
1406         (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
1407           Filter out editing services based on the includeEditorServices flag.
1408         (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
1409         (WebKit::WebContextMenuProxyMac::populate):
1410
1411 2014-03-19  Yongjun Zhang  <yongjun_zhang@apple.com>
1412
1413         [iOS] WebKit2 Quicklook.
1414         https://bugs.webkit.org/show_bug.cgi?id=130360
1415
1416         For WebKit2 resource loads, if we detect a quicklook content that QLConverter is able to
1417         convert, handle the response data to QLConverter and use its delegate WKWebResourceQuickLookDelegate
1418         to rounte the converted results (HTML) back into WebCore.  Thie similiar logic has been in place
1419         for WebKit1.
1420
1421         Reviewed by Tim Horton.
1422
1423         * WebKit2.xcodeproj/project.pbxproj: Add WebResourceLoaderIOS.mm to the project.
1424         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1425         * WebProcess/ios/WebResourceLoaderIOS.mm: Added.
1426         (-[WKWebResourceQuickLookDelegate initWithWebResourceLoader:WebKit::]): WKWebResourceQuickLookDelegate holds
1427             the original WebResourceLoader so that we could send converted result to WebCore.
1428         (-[WKWebResourceQuickLookDelegate connection:didReceiveDataArray:]):
1429         (-[WKWebResourceQuickLookDelegate connection:didReceiveData:lengthReceived:]):
1430         (-[WKWebResourceQuickLookDelegate connectionDidFinishLoading:]):
1431         (-[WKWebResourceQuickLookDelegate connection:didFailWithError:]):
1432         (-[WKWebResourceQuickLookDelegate clearHandle]):
1433         (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
1434
1435 2014-03-19  Tim Horton  <timothy_horton@apple.com>
1436
1437         WebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizontal movement
1438         https://bugs.webkit.org/show_bug.cgi?id=130441
1439         <rdar://problem/16337279>
1440
1441         Reviewed by Simon Fraser.
1442
1443         * UIProcess/mac/ViewGestureControllerMac.mm:
1444         (WebKit::scrollEventCanBecomeSwipe):
1445         Factor logic that determines if a scroll event can become a swipe
1446         out into scrollEventCanBecomeSwipe.
1447         Use <= instead of < when comparing the axes, because we don't want
1448         to start a swipe on a completely diagonal scroll either (because AppKit
1449         can start tracking a vertical swipe in that case).
1450
1451         (WebKit::ViewGestureController::handleScrollWheelEvent):
1452         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
1453         Make use of scrollEventCanBecomeSwipe.
1454
1455 2014-03-18  Anders Carlsson  <andersca@apple.com>
1456
1457         Add new functionality that will be required by the history item decoding
1458         https://bugs.webkit.org/show_bug.cgi?id=130433
1459
1460         Reviewed by Sam Weinig.
1461
1462         * Shared/cf/KeyedDecoder.cpp:
1463         (WebKit::KeyedDecoder::decodeUInt32):
1464         (WebKit::KeyedDecoder::decodeInt32):
1465         (WebKit::KeyedDecoder::decodeFloat):
1466         * Shared/cf/KeyedDecoder.h:
1467
1468 2014-03-19  Tim Horton  <timothy_horton@apple.com>
1469
1470         [iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
1471         https://bugs.webkit.org/show_bug.cgi?id=130444
1472         <rdar://problem/15580682>
1473
1474         Reviewed by Sam Weinig.
1475
1476         * UIProcess/ios/WKPDFView.mm:
1477         (-[WKPDFView web_setContentProviderData:]):
1478         Don't make UIPDFPageViews for null pages.
1479
1480 2014-03-18  Tim Horton  <timothy_horton@apple.com>
1481
1482         [iOS][WebKit2] Provide generic software-snapshotting API
1483         https://bugs.webkit.org/show_bug.cgi?id=130385
1484         <rdar://problem/16005957>
1485
1486         Reviewed by Sam Weinig.
1487
1488         * UIProcess/API/Cocoa/WKWebView.mm:
1489         (-[WKWebView _didCommitLayerTree:WebKit::]):
1490         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1491         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1492         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1493         (-[_WKThumbnailView initWithFrame:fromWKView:]):
1494         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
1495         * UIProcess/WebPageProxy.cpp:
1496         (WebKit::WebPageProxy::internalShowContextMenu):
1497         * UIProcess/WebPageProxy.h:
1498         * WebProcess/WebPage/WebPage.cpp:
1499         (WebKit::WebPage::takeSnapshot):
1500         (WebKit::WebPage::scaledSnapshotWithOptions):
1501         (WebKit::WebPage::snapshotAtSize):
1502         * WebProcess/WebPage/WebPage.h:
1503         * WebProcess/WebPage/WebPage.messages.in:
1504         Rename TakeThumbnailSnapshot message to TakeSnapshot.
1505
1506         Fill the snapshot image with the FrameView's background color, to avoid
1507         half-pixel alpha around the edges.
1508
1509         Factor snapshotAtSize out of scaledSnapshotWithOptions.
1510
1511         Don't apply both the custom and device scale factor to the base CTM,
1512         only the device scale factor. Custom scale factor should only be
1513         applied to the user CTM.
1514
1515         * Shared/ImageOptions.h:
1516         Add a snapshot option, RespectDrawingAreaTransform, that maps
1517         the rect through the drawing area's root layer transform.
1518         Use this in place of the thumbnail-specific code in TakeThumbnailSnapshot.
1519         Add a snapshot option, ExcludeDeviceScaleFactor, which means that
1520         snapshotting will not factor the device scale in (useful for drawing
1521         to a bitmap at an exact requested size).
1522
1523 2014-03-18  Samuel White  <samuel_white@apple.com>
1524
1525         AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
1526         https://bugs.webkit.org/show_bug.cgi?id=130250
1527
1528         Reviewed by Chris Fleizach.
1529
1530         Added ability to toggle enhanced accessibility on and off to support tests that require it.
1531
1532         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1533         (WKAccessibilityEnableEnhancedAccessibility):
1534         (WKAccessibilityEnhancedAccessibilityEnabled):
1535         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1536
1537 2014-03-18  Ryuan Choi  <ryuan.choi@samsung.com>
1538
1539         [EFL][WK2] Rename async APIs for better consistency with EFL
1540         https://bugs.webkit.org/show_bug.cgi?id=130319
1541
1542         Reviewed by Gyuyoung Kim.
1543
1544         There are inconsistency with async keyword in several ewebkit2 APIs.
1545         This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
1546         In addition, added Async keyword into their callback name.
1547
1548         * UIProcess/API/efl/ewk_application_cache_manager.cpp:
1549         (EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
1550         (getApplicationCacheOriginsCallback):
1551         (ewk_application_cache_manager_origins_async_get):
1552         * UIProcess/API/efl/ewk_application_cache_manager.h:
1553         * UIProcess/API/efl/ewk_cookie_manager.cpp:
1554         (EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
1555         (getAcceptPolicyCallback):
1556         (ewk_cookie_manager_accept_policy_async_get):
1557         (EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
1558         (getHostnamesWithCookiesCallback):
1559         (ewk_cookie_manager_hostnames_with_cookies_async_get):
1560         * UIProcess/API/efl/ewk_cookie_manager.h:
1561         * UIProcess/API/efl/ewk_database_manager.cpp:
1562         (EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
1563         (getDatabaseOriginsCallback):
1564         (ewk_database_manager_origins_async_get):
1565         * UIProcess/API/efl/ewk_database_manager.h:
1566         * UIProcess/API/efl/ewk_storage_manager.cpp:
1567         (EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
1568         (getStorageOriginsCallback):
1569         (ewk_storage_manager_origins_async_get):
1570         * UIProcess/API/efl/ewk_storage_manager.h:
1571         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
1572         (timerCallback):
1573         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
1574         (EWK2CookieManagerTest::getAcceptPolicy):
1575         (EWK2CookieManagerTest::getHostnamesWithCookies):
1576         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
1577         (EWK2DatabaseManagerTest::timerCallback):
1578         (TEST_F):
1579         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
1580         (EWK2StorageManagerTest::timerCallback):
1581         (TEST_F):
1582
1583 2014-03-18  Tim Horton  <timothy_horton@apple.com>
1584
1585         [iOS][WebKit2] Mark layer contents as being opaque if they are
1586         https://bugs.webkit.org/show_bug.cgi?id=130427
1587         <rdar://problem/15540434>
1588
1589         Reviewed by Simon Fraser.
1590
1591         * Shared/mac/RemoteLayerBackingStore.h:
1592         (WebKit::RemoteLayerBackingStore::isOpaque):
1593         * Shared/mac/RemoteLayerBackingStore.mm:
1594         (RemoteLayerBackingStore::RemoteLayerBackingStore):
1595         (RemoteLayerBackingStore::ensureBackingStore):
1596         (RemoteLayerBackingStore::encode):
1597         (RemoteLayerBackingStore::decode):
1598         (RemoteLayerBackingStore::display):
1599         (RemoteLayerBackingStore::applyBackingStoreToLayer):
1600         Move the code to set a RemoteLayerBackingStore as a CALayer's contents
1601         from RemoteLayerTreePropertyApplier to RemoteLayerBackingStore (mostly
1602         as a way to keep the USE(IOSURFACE) #ifs in one place).
1603         Remove the surface() getter, because it's no longer needed, and make
1604         image() private as it can be now (and rename it to createImageForFrontBuffer
1605         for clarity's sake).
1606
1607         Add an isOpaque argument to ensureBackingStore, encode/decode it, and
1608         add a getter. If isOpaque is true when applying backing store to the
1609         CALayer on the UI process side, set CALayer.contentsOpaque to let CA know.
1610
1611         Make opaque bitmaps if not using accelerated drawing. For the IOSurface
1612         case, we can't make opaque IOSurfaces, but telling CA that we have filled
1613         the whole bitmap still enables similar optimizations.
1614
1615         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1616         (WebKit::applyPropertiesToLayer):
1617         Reset contentsOpaque if the layer loses its backing store.
1618
1619         * Shared/mac/RemoteLayerTreeTransaction.mm:
1620         (WebKit::RemoteLayerTreeTextStream::operator<<):
1621         (WebKit::dumpChangedLayers):
1622         Add a bit more logging about RemoteLayerBackingStore's opaqueness
1623         and acceleratedness.
1624
1625         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1626         (PlatformCALayerRemote::updateBackingStore):
1627         (PlatformCALayerRemote::setOpaque):
1628         Invalidate the RemoteLayerBackingStore if layer opaqueness changes.
1629
1630 2014-03-18  Brady Eidson  <beidson@apple.com>
1631
1632         Make image controls menu work in WK2
1633         <rdar://problem/16294412> and https://bugs.webkit.org/show_bug.cgi?id=130424
1634
1635         Reviewed by Tim Horton.
1636
1637         * Platform/SharedMemory.h:
1638         * Platform/mac/SharedMemoryMac.cpp:
1639         (WebKit::SharedMemory::Handle::~Handle):
1640         (WebKit::SharedMemory::Handle::clear):
1641
1642         * Platform/unix/SharedMemoryUnix.cpp:
1643         (WebKit::SharedMemory::Handle::~Handle):
1644         (WebKit::SharedMemory::Handle::clear):
1645
1646         * Shared/ContextMenuContextData.cpp:
1647         (WebKit::ContextMenuContextData::ContextMenuContextData):
1648         (WebKit::ContextMenuContextData::operator=):
1649         (WebKit::ContextMenuContextData::encode):
1650         (WebKit::ContextMenuContextData::decode):
1651         * Shared/ContextMenuContextData.h:
1652         (WebKit::ContextMenuContextData::controlledImageHandle):
1653
1654         * Shared/ShareableBitmap.cpp:
1655         (WebKit::ShareableBitmap::Handle::clear):
1656         * Shared/ShareableBitmap.h:
1657         * UIProcess/WebContextMenuProxy.h:
1658
1659         * UIProcess/WebPageProxy.cpp:
1660         (WebKit::WebPageProxy::internalShowContextMenu):
1661         (WebKit::WebPageProxy::replaceControlledImage):
1662         * UIProcess/WebPageProxy.h:
1663
1664         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
1665         (WebKit::WebContextMenuProxyEfl::showContextMenu):
1666         * UIProcess/efl/WebContextMenuProxyEfl.h:
1667
1668         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1669         (WebKit::WebContextMenuProxyGtk::showContextMenu):
1670         * UIProcess/gtk/WebContextMenuProxyGtk.h:
1671
1672         Add a sharing service context menu that lives side-by-side with the normal one:
1673         * UIProcess/mac/WebContextMenuProxyMac.h:
1674         * UIProcess/mac/WebContextMenuProxyMac.mm:
1675         (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
1676         (-[WKSharingServicePickerDelegate setMenuProxy:WebKit::]):
1677         (-[WKSharingServicePickerDelegate setPicker:]):
1678         (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
1679         (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
1680         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
1681         (-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
1682         (-[WKSharingServicePickerDelegate sharingService:transitionImageForShareItem:contentRect:]):
1683         (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
1684         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
1685         (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
1686         (WebKit::WebContextMenuProxyMac::clearImageServicesMenu):
1687         (WebKit::WebContextMenuProxyMac::populate):
1688         (WebKit::WebContextMenuProxyMac::showContextMenu):
1689         (WebKit::WebContextMenuProxyMac::window):
1690         (WebKit::WebContextMenuProxyMac::replaceControlledImage):
1691
1692         * WebProcess/WebPage/WebContextMenu.cpp:
1693         (WebKit::WebContextMenu::show):
1694         (WebKit::WebContextMenu::replaceControlledImage):
1695         * WebProcess/WebPage/WebContextMenu.h:
1696
1697         Teach the WebProcess how to accept the replaced image.
1698         * WebProcess/WebPage/WebPage.cpp:
1699         (WebKit::WebPage::replaceControlledImage):
1700         * WebProcess/WebPage/WebPage.h:
1701         * WebProcess/WebPage/WebPage.messages.in:
1702
1703 2014-03-18  Anders Carlsson  <andersca@apple.com>
1704
1705         Begin cleaning up KeyedDecoder and KeyedEncoder
1706         https://bugs.webkit.org/show_bug.cgi?id=130431
1707
1708         Reviewed by Tim Horton.
1709
1710         * Shared/cf/KeyedDecoder.cpp:
1711         (WebKit::KeyedDecoder::KeyedDecoder):
1712         If we can't parse the property list data, just add an empty dictionary to the stack.
1713
1714         (WebKit::KeyedDecoder::decodeBool):
1715         Remove unneeded m_dictionaryStack.last() null check. m_dictionaryStack would either be empty
1716         or at least have a root element; it would never have a null element.
1717         
1718         (WebKit::KeyedDecoder::decodeDouble):
1719         Remove the same check as above and remove the CFNumberGetType checks since CFNumberGetValue will
1720         do the type conversion for us and return false if it's lossy.
1721
1722         (WebKit::KeyedDecoder::decodeInt64):
1723         Remove the m_dictionaryStack.last() check.
1724
1725         (WebKit::KeyedDecoder::decodeUInt32):
1726         Ditto.
1727
1728         (WebKit::KeyedDecoder::decodeString):
1729         Ditto.
1730
1731         (WebKit::KeyedDecoder::beginObject):
1732         Ditto.
1733
1734         (WebKit::KeyedDecoder::beginArray):
1735         Ditto.
1736
1737         (WebKit::KeyedDecoder::beginArrayElement):
1738         Ditto.
1739
1740         * Shared/cf/KeyedDecoder.h:
1741         Sort functions to be in the same logical order as the base class.
1742
1743         * Shared/cf/KeyedEncoder.cpp:
1744         (WebKit::KeyedEncoder::finishEncoding):
1745         Don't check for a non-null CFErrorRef here (which we incidentally never released on error). Instead,
1746         just null check the returned CFDataRef object.
1747
1748 2014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
1749
1750         Unreviewed typo build fix for r165846.
1751
1752         * Shared/WebPageCreationParameters.cpp:
1753         (WebKit::WebPageCreationParameters::decode):
1754
1755 2014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
1756
1757         WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
1758         https://bugs.webkit.org/show_bug.cgi?id=130371
1759
1760         Reviewed by Dan Bernstein.
1761
1762         * Shared/WebPageCreationParameters.h:
1763         * Shared/WebPageCreationParameters.cpp:
1764         (WebKit::WebPageCreationParameters::encode):
1765         (WebKit::WebPageCreationParameters::decode):
1766         Add allowsRemoteInspection bool.
1767
1768         * UIProcess/API/C/WKPagePrivate.h:
1769         * UIProcess/API/C/WKPage.cpp:
1770         (WKPageGetAllowsRemoteInspection):
1771         (WKPageSetAllowsRemoteInspection):
1772         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1773         * UIProcess/API/Cocoa/WKWebView.mm:
1774         (-[WKWebView _allowsRemoteInspection]):
1775         (-[WKWebView _setAllowsRemoteInspection:]):
1776         Getter and setter for allowing remote inspection state.
1777
1778         * UIProcess/WebPageProxy.h:
1779         (WebKit::WebPageProxy::allowsRemoteInspection):
1780         * UIProcess/WebPageProxy.cpp:
1781         (WebKit::WebPageProxy::WebPageProxy):
1782         (WebKit::WebPageProxy::setAllowsRemoteInspection):
1783         (WebKit::WebPageProxy::creationParameters):
1784         Cached allows remote inspection state, with getter and setter.
1785
1786         * WebProcess/WebPage/WebPage.h:
1787         * WebProcess/WebPage/WebPage.messages.in:
1788         * WebProcess/WebPage/WebPage.cpp:
1789         (WebKit::WebPage::setAllowsRemoteInspection):
1790         When setting, call into WebCore to adjust the Page's setting.
1791
1792 2014-03-18  Anders Carlsson  <andersca@apple.com>
1793
1794         REGRESSION: Visited link coloring seems to be completely broken in tip of tree
1795         https://bugs.webkit.org/show_bug.cgi?id=130419
1796         <rdar://problem/16337850>
1797
1798         Reviewed by Dan Bernstein.
1799
1800         Make sure to send any queued up messages before calling connectionWillOpen so we'll ensure
1801         FIFO ordering if any messages are sent from within connectionWillOpen.
1802
1803         * Shared/ChildProcessProxy.cpp:
1804         (WebKit::ChildProcessProxy::didFinishLaunching):
1805
1806 2014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
1807
1808         WebPageCreationParameters colorSpace should be MAC not COCOA
1809         https://bugs.webkit.org/show_bug.cgi?id=130414
1810
1811         Reviewed by Dan Bernstein.
1812
1813         The colorSpace param was only set and used on Mac, not iOS.
1814
1815         * Shared/WebPageCreationParameters.h:
1816         * Shared/WebPageCreationParameters.cpp:
1817         (WebKit::WebPageCreationParameters::encode):
1818         (WebKit::WebPageCreationParameters::decode):
1819
1820 2014-03-18  Simon Fraser  <simon.fraser@apple.com>
1821
1822         Dan says that options should be unsigned, and enums should be signed.
1823         
1824         Reviewed by Dan Bernstein.
1825
1826         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1827         (NS_ENUM):
1828
1829 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
1830
1831         [WK2] Pass ranges over IPC in a cross-platform manner
1832         https://bugs.webkit.org/show_bug.cgi?id=130376
1833
1834         Reviewed by Anders Carlsson.
1835
1836         Added an EditingRange class for IPC, which automatically converts to and from
1837         NSRanges, knowing the difference between notFound and NSNotFound.
1838
1839         Manually applied the same fix to characterIndexForPoint.
1840
1841         * Scripts/webkit2/messages.py:
1842         (struct_or_class):
1843         * Shared/EditingRange.h: Added.
1844         (WebKit::EditingRange::EditingRange):
1845         (WebKit::EditingRange::isValid):
1846         (WebKit::EditingRange::operator NSRange):
1847         * UIProcess/API/mac/WKView.mm:
1848         (-[WKView insertText:replacementRange:]):
1849         (-[WKView selectedRange]):
1850         (-[WKView hasMarkedText]):
1851         (-[WKView setMarkedText:selectedRange:replacementRange:]):
1852         (-[WKView markedRange]):
1853         (-[WKView attributedSubstringForProposedRange:actualRange:]):
1854         (-[WKView characterIndexForPoint:]):
1855         (-[WKView firstRectForCharacterRange:actualRange:]):
1856         * UIProcess/WebPageProxy.h:
1857         * UIProcess/ios/WKContentViewInteraction.mm:
1858         (-[WKContentView setMarkedText:selectedRange:]):
1859         (-[WKContentView insertText:]):
1860         * UIProcess/ios/WebPageProxyIOS.mm:
1861         (WebKit::WebPageProxy::setComposition):
1862         (WebKit::WebPageProxy::insertText):
1863         (WebKit::WebPageProxy::insertDictatedText):
1864         (WebKit::WebPageProxy::getMarkedRange):
1865         (WebKit::WebPageProxy::getSelectedRange):
1866         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
1867         (WebKit::WebPageProxy::firstRectForCharacterRange):
1868         * UIProcess/mac/WebPageProxyMac.mm:
1869         (WebKit::WebPageProxy::setComposition):
1870         (WebKit::WebPageProxy::insertText):
1871         (WebKit::WebPageProxy::insertDictatedText):
1872         (WebKit::WebPageProxy::getMarkedRange):
1873         (WebKit::WebPageProxy::getSelectedRange):
1874         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
1875         (WebKit::WebPageProxy::firstRectForCharacterRange):
1876         * WebKit2.xcodeproj/project.pbxproj:
1877         * WebProcess/WebPage/WebPage.cpp:
1878         (WebKit::WebPage::rangeFromEditingRange):
1879         * WebProcess/WebPage/WebPage.h:
1880         * WebProcess/WebPage/WebPage.messages.in:
1881         * WebProcess/WebPage/ios/WebPageIOS.mm:
1882         (WebKit::WebPage::setComposition):
1883         (WebKit::WebPage::insertText):
1884         (WebKit::WebPage::insertDictatedText):
1885         (WebKit::WebPage::getMarkedRange):
1886         (WebKit::WebPage::getSelectedRange):
1887         (WebKit::WebPage::getAttributedSubstringFromRange):
1888         (WebKit::WebPage::firstRectForCharacterRange):
1889         * WebProcess/WebPage/mac/WebPageMac.mm:
1890         (WebKit::WebPage::setComposition):
1891         (WebKit::WebPage::insertText):
1892         (WebKit::WebPage::insertDictatedText):
1893         (WebKit::WebPage::getMarkedRange):
1894         (WebKit::WebPage::getSelectedRange):
1895         (WebKit::WebPage::getAttributedSubstringFromRange):
1896         (WebKit::WebPage::characterIndexForPoint):
1897         (WebKit::WebPage::firstRectForCharacterRange):
1898
1899 2014-03-17  Filip Pizlo  <fpizlo@apple.com>
1900
1901         More FTL enabling.
1902
1903         Rubber stamped by Dan Bernstein.
1904
1905         * Configurations/FeatureDefines.xcconfig:
1906
1907 2014-03-17  Simon Fraser  <simon.fraser@apple.com>
1908
1909         Renable pagination mode in WK2 MiniBrowser
1910         https://bugs.webkit.org/show_bug.cgi?id=130374
1911
1912         Reviewed by Anders Carlsson.
1913         
1914         Add SPI for pagination mode.
1915
1916         * UIProcess/API/Cocoa/WKWebView.mm:
1917         (-[WKWebView _paginationMode]):
1918         (-[WKWebView _setPaginationMode:]):
1919         (-[WKWebView _paginationBehavesLikeColumns]):
1920         (-[WKWebView _setPaginationBehavesLikeColumns:]):
1921         (-[WKWebView _pageLength]):
1922         (-[WKWebView _setPageLength:]):
1923         (-[WKWebView _gapBetweenPages]):
1924         (-[WKWebView _setGapBetweenPages:]):
1925         (-[WKWebView _pageCount]):
1926         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1927         (NS_ENUM):
1928
1929 2014-03-18  Ryuan Choi  <ryuan.choi@samsung.com>
1930
1931         [CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
1932         https://bugs.webkit.org/show_bug.cgi?id=130390
1933
1934         Reviewed by Martin Robinson.
1935
1936         Now, only EFL port use CoordinatedGraphics among CMake based ports.
1937
1938         * CMakeLists.txt:
1939         * PlatformEfl.cmake:
1940         * PlatformGTK.cmake: Removed CoordinatedGraphics related files.
1941
1942 2014-03-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1943
1944         [GTK] Race condition when the socket event source is cancelled
1945         https://bugs.webkit.org/show_bug.cgi?id=130395
1946
1947         Reviewed by Martin Robinson.
1948
1949         In some cases when the socket event source is cancelled the socket
1950         event source callback is called with the condition of the previous
1951         poll instead of 0. This can happen sometimes when the source is
1952         cancelled from the socket event source callback. Once the socket
1953         event source is cancelled, it's dispatched by glib without
1954         polling, so the condition is never reset again and the callback is
1955         called again and again with the previous condition. When the
1956         condition is G_IO_IN, the source is re-scheduled entering into an
1957         infinite loop. We should always check if the source has been
1958         cancelled at the beginning of the callback to destroy the source
1959         instead of relying on the condition being 0.
1960
1961         * Platform/gtk/WorkQueueGtk.cpp:
1962         (WorkQueue::SocketEventSource::isCancelled):
1963         (WorkQueue::SocketEventSource::eventCallback):
1964
1965 2014-03-18  Csaba Osztrogonác  <ossy@webkit.org>
1966
1967         [GTK] URTFB after r165789. Stub function added.
1968
1969         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
1970         (WebKit::InjectedBundle::setBundleParameter):
1971
1972 2014-03-17  Jaehun Lim  <ljaehun.lim@samsung.com>
1973
1974         Unreviewed, EFL build fix after r165789
1975
1976         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
1977         (WebKit::InjectedBundle::setBundleParameter): Implemented.
1978
1979 2014-03-17  Jae Hyun Park  <jaepark@webkit.org>
1980
1981         [GTK] Build fix for debug build
1982
1983         Unreviewed.
1984
1985         finalizedListItem was actually used in ASSERT.  So, use ASSERT_UNUSED
1986         instead of ASSERT.
1987
1988         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
1989         (webkitBackForwardListItemFinalized):
1990
1991 2014-03-17  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1992
1993         [WK2] Getting rid of compilation warnings
1994         https://bugs.webkit.org/show_bug.cgi?id=130348
1995
1996         Reviewed by Benjamin Poulain.
1997
1998         * UIProcess/API/APIHistoryClient.h:
1999         (API::HistoryClient::didPerformClientRedirect):
2000         (API::HistoryClient::didPerformServerRedirect):
2001         (API::HistoryClient::didUpdateHistoryTitle):
2002         * UIProcess/API/APILoaderClient.h:
2003         (API::LoaderClient::didStartProvisionalLoadForFrame):
2004         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
2005         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2006         (API::LoaderClient::didCommitLoadForFrame):
2007         (API::LoaderClient::didFinishLoadForFrame):
2008         (API::LoaderClient::didFailLoadWithErrorForFrame):
2009         (API::LoaderClient::didChangeBackForwardList):
2010         * UIProcess/API/APIPolicyClient.h:
2011         (API::PolicyClient::decidePolicyForNavigationAction):
2012         (API::PolicyClient::decidePolicyForNewWindowAction):
2013         (API::PolicyClient::decidePolicyForResponse):
2014         (API::PolicyClient::unableToImplementPolicy):
2015         * UIProcess/API/APIUIClient.h:
2016         (API::UIClient::exceededDatabaseQuota):
2017         (API::UIClient::saveDataToFileInDownloadsFolder):
2018         * UIProcess/API/C/WKPage.cpp:
2019         (WKPageSetPageLoaderClient):
2020         * UIProcess/APISession.cpp:
2021         (API::generateID):
2022         * WebProcess/Plugins/PluginView.cpp:
2023         (WebKit::PluginView::viewStateDidChange):
2024
2025 2014-03-17  Anders Carlsson  <andersca@apple.com>
2026
2027         Update the bundle parameters dictionary and send out KVO notifications
2028         https://bugs.webkit.org/show_bug.cgi?id=130379
2029         <rdar://problem/16213914>
2030
2031         Reviewed by Dan Bernstein.
2032
2033         * UIProcess/API/Cocoa/WKProcessPool.mm:
2034         (-[WKProcessPool _setObject:forBundleParameter:]):
2035         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2036         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
2037         (-[WKWebProcessBundleParameters setParameter:forKey:]):
2038         * WebProcess/InjectedBundle/InjectedBundle.h:
2039         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2040         (WebKit::InjectedBundle::setBundleParameter):
2041         * WebProcess/WebProcess.cpp:
2042         (WebKit::WebProcess::setInjectedBundleParameter):
2043         * WebProcess/WebProcess.h:
2044         * WebProcess/WebProcess.messages.in:
2045
2046 2014-03-17  Tim Horton  <timothy_horton@apple.com>
2047
2048         Address some style nits.
2049
2050         * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h:
2051
2052 2014-03-17  Simon Fraser  <simon.fraser@apple.com>
2053
2054         Address some style nits.
2055
2056         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2057
2058 2014-03-17  Simon Fraser  <simon.fraser@apple.com>
2059
2060         Add transparent window support back into MiniBrowser
2061         https://bugs.webkit.org/show_bug.cgi?id=130363
2062
2063         Reviewed by Anders Carlsson.
2064         
2065         Expose SPI for transparent window support.
2066
2067         * UIProcess/API/Cocoa/WKWebView.mm:
2068         (-[WKWebView _drawsTransparentBackground]):
2069         (-[WKWebView _setDrawsTransparentBackground:]):
2070         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2071
2072 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2073
2074         Undo some accidental Gtk changes from http://trac.webkit.org/changeset/165759
2075
2076         * UIProcess/WebPageProxy.cpp:
2077         * WebProcess/WebPage/WebPage.messages.in:
2078
2079 2014-03-17  Csaba Osztrogonác  <ossy@webkit.org>
2080
2081         [WK2] URTBF after r165755 for non Apple platforms, stub functions added.
2082
2083         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
2084         (WebKit::InjectedBundle::platformInitialize):
2085         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2086         (WebKit::InjectedBundle::platformInitialize):
2087
2088 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2089
2090         Move convertToRange() helper to cross-platform WebPage.cpp
2091         https://bugs.webkit.org/show_bug.cgi?id=130365
2092
2093         Reviewed by Tim Horton.
2094
2095         Also renamed it to rangeFromEditingLocationAndLength().
2096
2097         * WebProcess/WebPage/WebPage.cpp:
2098         (WebKit::WebPage::rangeFromEditingLocationAndLength):
2099         * WebProcess/WebPage/WebPage.h:
2100         * WebProcess/WebPage/ios/WebPageIOS.mm:
2101         (WebKit::WebPage::insertText):
2102         * WebProcess/WebPage/mac/WebPageMac.mm:
2103         (WebKit::WebPage::setComposition):
2104         (WebKit::WebPage::insertText):
2105         (WebKit::WebPage::insertDictatedText):
2106         (WebKit::WebPage::getAttributedSubstringFromRange):
2107         (WebKit::WebPage::characterIndexForPoint):
2108         (WebKit::WebPage::firstRectForCharacterRange):
2109
2110 2014-03-17  Anders Carlsson  <andersca@apple.com>
2111
2112         Follow-up fix.
2113
2114         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2115
2116 2014-03-17  Enrica Casucci  <enrica@apple.com>
2117
2118         WK2: support data detectors driven action sheet..
2119         https://bugs.webkit.org/show_bug.cgi?id=130362
2120         <rdar://problem/16319711>
2121
2122         Reviewed by Benjamin Poulain.
2123
2124         * UIProcess/ios/WKActionSheetAssistant.mm:
2125         (-[WKActionSheetAssistant showDataDetectorsSheet]):
2126
2127 2014-03-17  Anders Carlsson  <andersca@apple.com>
2128
2129         Fix 32-bit OS X build.
2130
2131         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2132         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
2133         * WebProcess/InjectedBundle/InjectedBundle.h:
2134         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2135         (WebKit::InjectedBundle::platformInitialize):
2136
2137 2014-03-17  Jae Hyun Park  <jaepark@webkit.org>
2138
2139         [GTK][CMake] Fix WebKit2 unused parameter warnings
2140         https://bugs.webkit.org/show_bug.cgi?id=130316
2141
2142         Reviewed by Martin Robinson.
2143
2144         * Platform/gtk/WorkQueueGtk.cpp: Fix unused parameter warnings.
2145         * UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
2146         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
2147         * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Ditto.
2148         * UIProcess/API/gtk/WebKitContextMenuItem.cpp: Ditto.
2149         * UIProcess/API/gtk/WebKitDownloadClient.cpp: Ditto.
2150         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Ditto.
2151         * UIProcess/API/gtk/WebKitFindController.cpp: Ditto.
2152         * UIProcess/API/gtk/WebKitFormClient.cpp: Ditto.
2153         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Ditto.
2154         * UIProcess/API/gtk/WebKitLoaderClient.cpp: Ditto.
2155         * UIProcess/API/gtk/WebKitPlugin.cpp: Ditto.
2156         * UIProcess/API/gtk/WebKitPolicyClient.cpp: Ditto.
2157         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Ditto.
2158         * UIProcess/API/gtk/WebKitTextChecker.cpp: Ditto.
2159         * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
2160         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Ditto.
2161         * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
2162         * UIProcess/API/gtk/WebKitWebInspector.cpp: Ditto.
2163         * UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
2164         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
2165         * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Ditto.
2166         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Ditto.
2167         * UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
2168         * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Ditto.
2169         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
2170         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Ditto.
2171         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Ditto.
2172         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Ditto.
2173         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Ditto.
2174         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Ditto.
2175
2176 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2177
2178         [Mac] Standardize on start/length in text input IPC methods
2179         https://bugs.webkit.org/show_bug.cgi?id=130359
2180
2181         Reviewed by Anders Carlsson.
2182
2183         Some IPC methods used start/length, and others use start/end. This was confusing.
2184
2185         While here, changed WebPageMac.mm to not use NSMakeRange where we don't need it
2186         (I want to move this code to WebPage.cpp, where it could be shared with iOS and
2187         other platforms, as it doesn't depend on Foundation much).
2188
2189         * UIProcess/API/mac/WKView.mm:
2190         (-[WKView insertText:replacementRange:]):
2191         (-[WKView setMarkedText:selectedRange:replacementRange:]):
2192         (-[WKView attributedSubstringForProposedRange:actualRange:]):
2193         * UIProcess/WebPageProxy.cpp:
2194         (WebKit::WebPageProxy::internalShowContextMenu):
2195         * UIProcess/WebPageProxy.h:
2196         * UIProcess/ios/WebPageProxyIOS.mm:
2197         (WebKit::WebPageProxy::setComposition):
2198         (WebKit::WebPageProxy::insertText):
2199         * UIProcess/mac/WebPageProxyMac.mm:
2200         (WebKit::WebPageProxy::setComposition):
2201         (WebKit::WebPageProxy::insertText):
2202         (WebKit::WebPageProxy::insertDictatedText):
2203         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
2204         * WebProcess/WebPage/WebPage.cpp:
2205         (WebKit::WebPage::setComposition):
2206         * WebProcess/WebPage/WebPage.h:
2207         * WebProcess/WebPage/WebPage.messages.in:
2208         * WebProcess/WebPage/ios/WebPageIOS.mm:
2209         (WebKit::WebPage::setComposition):
2210         (WebKit::WebPage::insertText):
2211         * WebProcess/WebPage/mac/WebPageMac.mm:
2212         (WebKit::WebPage::setComposition):
2213         (WebKit::WebPage::insertText):
2214         (WebKit::WebPage::insertDictatedText):
2215         (WebKit::WebPage::getAttributedSubstringFromRange):
2216         (WebKit::convertToRange):
2217         (WebKit::WebPage::firstRectForCharacterRange):
2218
2219 2014-03-17  Tim Horton  <timothy_horton@apple.com>
2220
2221         Rename WKThumbnailView to _WKThumbnailView
2222         https://bugs.webkit.org/show_bug.cgi?id=130361
2223
2224         Reviewed by Anders Carlsson.
2225
2226         * UIProcess/API/Cocoa/_WKThumbnailView.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h.
2227         * UIProcess/API/Cocoa/_WKThumbnailView.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm.
2228         (-[_WKThumbnailView initWithFrame:fromWKView:]):
2229         (-[_WKThumbnailView _viewWasUnparented]):
2230         (-[_WKThumbnailView _viewWasParented]):
2231         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
2232         (-[_WKThumbnailView _didTakeSnapshot:]):
2233         (-[_WKThumbnailView viewDidMoveToWindow]):
2234         (-[_WKThumbnailView setScale:]):
2235         (-[_WKThumbnailView setUsesSnapshot:]):
2236         (-[_WKThumbnailView _setThumbnailLayer:]):
2237         (-[_WKThumbnailView _thumbnailLayer]):
2238         * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailViewInternal.h.
2239         * UIProcess/API/mac/WKView.mm:
2240         (-[WKView _setThumbnailView:]):
2241         (-[WKView _thumbnailView]):
2242         (-[WKView _updateThumbnailViewLayer]):
2243         * UIProcess/API/mac/WKViewInternal.h:
2244         * UIProcess/mac/PageClientImpl.mm:
2245         * WebKit2.xcodeproj/project.pbxproj:
2246
2247 2014-03-17  Anders Carlsson  <andersca@apple.com>
2248
2249         Add SPI for getting bundle parameters from the injected bundle
2250         https://bugs.webkit.org/show_bug.cgi?id=130355
2251
2252         Reviewed by Dan Bernstein.
2253
2254         * UIProcess/mac/WebContextMac.mm:
2255         (WebKit::WebContext::platformInitializeWebProcess):
2256         * WebKit2.xcodeproj/project.pbxproj:
2257         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
2258         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
2259         (-[WKWebProcessBundleParameters initWithDictionary:]):
2260         (-[WKWebProcessBundleParameters valueForKey:]):
2261         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
2262         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
2263         (-[WKWebProcessPlugInController parameters]):
2264         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2265         (WebKit::InjectedBundle::InjectedBundle):
2266         * WebProcess/InjectedBundle/InjectedBundle.h:
2267         (WebKit::InjectedBundle::create):
2268         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2269         (WebKit::InjectedBundle::bundleParameters):
2270         (WebKit::InjectedBundle::platformInitialize):
2271         * WebProcess/WebProcess.cpp:
2272         (WebKit::WebProcess::initializeWebProcess):
2273
2274 2014-03-17  Brent Fulgham  <bfulgham@apple.com>
2275
2276         Provide preference to enable additional AVFoundation options
2277         https://bugs.webkit.org/show_bug.cgi?id=130275
2278
2279         Reviewed by Eric Carlson.
2280
2281         * Shared/WebPreferencesStore.h: Added new preference.
2282         * UIProcess/API/C/WKPreferences.cpp:
2283         (WKPreferencesSetEnableInheritURIQueryComponent): Added.
2284         (WKPreferencesGetEnableInheritURIQueryComponent): Added.
2285         * UIProcess/API/C/WKPreferencesPrivate.h:
2286         * WebProcess/WebPage/WebPage.cpp:
2287         (WebKit::WebPage::updatePreferences): Handle new preference.
2288
2289 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2290
2291         [Mac] getAttributedSubstringFromRange arguments are incorrectly named
2292         https://bugs.webkit.org/show_bug.cgi?id=130349
2293
2294         Reviewed by Tim Horton.
2295
2296         There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
2297         all, but now, let's at least name them correctly.
2298
2299         No behavior change.
2300
2301         * UIProcess/WebPageProxy.h:
2302         * UIProcess/mac/WebPageProxyMac.mm:
2303         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
2304         * WebProcess/WebPage/WebPage.h:
2305         * WebProcess/WebPage/WebPage.messages.in:
2306         * WebProcess/WebPage/mac/WebPageMac.mm:
2307         (WebKit::WebPage::getAttributedSubstringFromRange):
2308
2309 2014-03-17  Tim Horton  <timothy_horton@apple.com>
2310
2311         WKThumbnailView should support snapshots
2312         https://bugs.webkit.org/show_bug.cgi?id=130335
2313         <rdar://problem/16255139>
2314
2315         Reviewed by Simon Fraser.
2316
2317         Add a mode where WKThumbnailView takes a software snapshot of the web content,
2318         replacing the live layer tree with said snapshot once it returns from the
2319         web process. This may improve animation performance in cases where the
2320         layer tree would otherwise be very complex.
2321
2322         * UIProcess/API/Cocoa/WKThumbnailView.h:
2323         Add a property, usesSnapshot, which determines whether the thumbnail view
2324         should use the live layer tree or a snapshot of the content.
2325
2326         * UIProcess/API/Cocoa/WKThumbnailView.mm:
2327         (-[WKThumbnailView initWithFrame:fromWKView:]):
2328         (-[WKThumbnailView _viewWasUnparented]):
2329         Clear the snapshot when unparented.
2330
2331         (-[WKThumbnailView _viewWasParented]):
2332         Take a snapshot of the web content when parented, if needed.
2333
2334         (-[WKThumbnailView _requestSnapshotIfNeeded]):
2335         If we're using snapshots, and haven't already dispatched an async snapshot request,
2336         and don't already have a snapshot, request a snapshot from the web process.
2337
2338         When it returns, use it as the contents of the WKThumbnailView layer, and
2339         unparent the live layer tree.
2340
2341         (-[WKThumbnailView setScale:]):
2342         (-[WKThumbnailView setUsesSnapshot:]):
2343         (-[WKThumbnailView _setThumbnailLayer:]):
2344         (-[WKThumbnailView _thumbnailLayer]):
2345         * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
2346
2347         * UIProcess/API/mac/WKView.mm:
2348         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
2349         (-[WKView _acceleratedCompositingModeRootLayer]):
2350         WKView should always keep track of the current root layer, instead of totally
2351         handing control over to WKThumbnailView when it is used.
2352
2353         (-[WKView _setThumbnailView:]):
2354         (-[WKView _updateThumbnailViewLayer]):
2355         (-[WKView _reparentLayerTreeInThumbnailView]):
2356         If needed (either we're not using snapshots, or still waiting for the snapshot to be painted),
2357         push the WKView's live layer tree into the thumbnail view.
2358
2359         * UIProcess/API/mac/WKViewInternal.h:
2360         * UIProcess/WebPageProxy.cpp:
2361         (WebKit::WebPageProxy::internalShowContextMenu):
2362         * UIProcess/WebPageProxy.h:
2363         * WebProcess/WebPage/WebPage.h:
2364         * WebProcess/WebPage/WebPage.messages.in:
2365         * WebProcess/WebPage/WebPage.cpp:
2366         (WebKit::WebPage::takeThumbnailSnapshot):
2367         Add a message that asynchronously returns a snapshot that respects the
2368         current thumbnail scale and position.
2369
2370         (WebKit::WebPage::scaledSnapshotWithOptions):
2371         Use some nullptr.
2372
2373         * WebProcess/WebPage/DrawingArea.cpp:
2374         (WebKit::DrawingArea::transform):
2375         * WebProcess/WebPage/DrawingArea.h:
2376         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2377         Add a getter for the DrawingArea's transform.
2378         Rename it to rootLayerTransform.
2379
2380 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
2381
2382         Use RunLoop objects through references instead of pointers
2383         https://bugs.webkit.org/show_bug.cgi?id=130313
2384
2385         Reviewed by Andreas Kling.
2386
2387         Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
2388         return RunLoop reference instead of a pointer.
2389
2390         * DatabaseProcess/DatabaseProcess.cpp:
2391         (WebKit::DatabaseProcess::didClose):
2392         (WebKit::DatabaseProcess::didReceiveInvalidMessage):
2393         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2394         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2395         * NetworkProcess/NetworkProcess.cpp:
2396         (WebKit::NetworkProcess::didClose):
2397         (WebKit::NetworkProcess::didReceiveInvalidMessage):
2398         * NetworkProcess/NetworkResourceLoader.cpp:
2399         (WebKit::NetworkResourceLoader::continueWillSendRequest):
2400         * Platform/IPC/Connection.cpp:
2401         (IPC::Connection::SyncMessageState::getOrCreate):
2402         (IPC::Connection::SyncMessageState::SyncMessageState):
2403         (IPC::Connection::SyncMessageState::~SyncMessageState):
2404         (IPC::Connection::SyncMessageState::processIncomingMessage):
2405         (IPC::Connection::SyncMessageState::dispatchMessages):
2406         (IPC::Connection::createServerConnection):
2407         (IPC::Connection::createClientConnection):
2408         (IPC::Connection::Connection):
2409         (IPC::Connection::addWorkQueueMessageReceiver):
2410         (IPC::Connection::removeWorkQueueMessageReceiver):
2411         (IPC::Connection::sendSyncMessage):
2412         (IPC::Connection::sendSyncMessageFromSecondaryThread):
2413         (IPC::Connection::waitForSyncReply):
2414         (IPC::Connection::processIncomingMessage):
2415         (IPC::Connection::connectionDidClose):
2416         (IPC::Connection::dispatchDidReceiveInvalidMessage):
2417         (IPC::Connection::enqueueIncomingMessage):
2418         (IPC::Connection::wakeUpRunLoop):
2419         * Platform/IPC/Connection.h:
2420         * Platform/IPC/mac/ConnectionMac.cpp:
2421         (IPC::Connection::receiveSourceEventHandler):
2422         * Shared/ChildProcess.cpp:
2423         (WebKit::ChildProcess::stopRunLoop):
2424         * Shared/Plugins/NPObjectProxy.cpp:
2425         (WebKit::NPObjectProxy::NP_Deallocate):
2426         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2427         (WebKit::ProcessLauncher::launchProcess):
2428         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2429         (WebKit::ProcessLauncher::launchProcess):
2430         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2431         (WebKit::connectToService):
2432         (WebKit::tryPreexistingProcess):
2433         (WebKit::createProcess):
2434         * UIProcess/Storage/StorageManager.cpp:
2435         (WebKit::StorageManager::getOrigins):
2436         (WebKit::StorageManager::getStorageDetailsByOrigin):
2437         * UIProcess/Storage/StorageManager.h:
2438         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2439         (WebKit::NetscapePlugin::pluginThreadAsyncCall):
2440         * WebProcess/Plugins/PluginView.cpp:
2441         (WebKit::PluginView::unprotectPluginFromDestruction):
2442         * WebProcess/WebPage/EventDispatcher.cpp:
2443         (WebKit::EventDispatcher::wheelEvent):
2444         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2445         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2446         * WebProcess/WebPage/WebPage.cpp:
2447         (WebKit::WebPage::close):
2448
2449 2014-03-17  Giovanni Campagna  <gcampagna@src.gnome.org>
2450
2451         [GTK] Don't busy loop when the socket is full
2452         https://bugs.webkit.org/show_bug.cgi?id=129802
2453
2454         Reviewed by Carlos Garcia Campos.
2455
2456         When the socket is full and we see EAGAIN or EWOULDBLOCK
2457         (because the socket is non blocking), don't busy loop by
2458         tring to write again, instead poll() until the socket
2459         becomes writable.
2460
2461         * Platform/IPC/unix/ConnectionUnix.cpp:
2462         (IPC::Connection::sendOutgoingMessage):
2463
2464 2014-03-17  Martin Robinson  <mrobinson@igalia.com>
2465
2466         [GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
2467         https://bugs.webkit.org/show_bug.cgi?id=130155
2468
2469         Reviewed by Philippe Normand.
2470
2471         * PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.
2472
2473 2014-03-17  Ryuan Choi  <ryuan.choi@samsung.com>
2474
2475         [EFL][WK2] Restore cursor when moving mouse into webview
2476         https://bugs.webkit.org/show_bug.cgi?id=130182
2477
2478         Reviewed by Gyuyoung Kim.
2479
2480         We changed mouse cursor when the type of cursor is changed.
2481         But once mouse is moved out of webview, ewebkit will not know whether cursor
2482         is changed or not.
2483
2484         So, this patch added a logic to restore the last applied type of cursor when
2485         mouse is moved into webview again.
2486
2487         * UIProcess/API/efl/EwkView.cpp:
2488         (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
2489         Call updateCursor to restore the last applied type of cursor.
2490         (EwkView::EwkView):
2491         (EwkView::updateCursor): Extracted from setCursor.
2492         (EwkView::setCursor):
2493         (EwkView::handleEvasObjectAdd):
2494         * UIProcess/API/efl/EwkView.h:
2495
2496 2014-03-16  Ryuan Choi  <ryuan.choi@samsung.com>
2497
2498         [EFL][WK2] Add ewk_application_cache_manager APIs
2499         https://bugs.webkit.org/show_bug.cgi?id=102853
2500
2501         Reviewed by Gyuyoung Kim.
2502
2503         Implemented application cache manager to get list of origins which stores
2504         application cache and remove specified origin or all.
2505
2506         * PlatformEfl.cmake: Added newly added files.
2507         * UIProcess/API/efl/ewk_application_cache_manager.cpp: Added.
2508         (EwkApplicationCacheManager::EwkApplicationCacheManager):
2509         (EwkApplicationCacheManager::~EwkApplicationCacheManager):
2510         (Get_Origins_Data::Get_Origins_Data):
2511         (getApplicationCacheOriginsCallback):
2512         (ewk_application_cache_manager_origins_get):
2513         (ewk_application_cache_origins_free):
2514         (ewk_application_cache_manager_delete_all):
2515         (ewk_application_cache_manager_delete):
2516         * UIProcess/API/efl/ewk_application_cache_manager.h: Added.
2517         * UIProcess/API/efl/ewk_application_cache_manager_private.h: Added.
2518         (EwkApplicationCacheManager::impl):
2519         * UIProcess/API/efl/ewk_context.cpp:
2520         (EwkContext::applicationCacheManager):
2521         (ewk_context_application_cache_manager_get):
2522         * UIProcess/API/efl/ewk_context.h:
2523         * UIProcess/API/efl/ewk_context_private.h:
2524         * UIProcess/API/efl/ewk_security_origin_private.h:
2525         (EwkSecurityOrigin::wkSecurityOrigin):
2526         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
2527         (EWK2UnitTestServer::port):
2528         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
2529         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
2530         Added to test application_cache_manager.
2531         (serverCallback):
2532         (getOriginsCallback):
2533         (timerCallback):
2534         (TEST_F):
2535         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2536         Added test case to test getter of application_cache_manager.
2537         (TEST_F):
2538
2539 2014-03-16  Zan Dobersek  <zdobersek@igalia.com>
2540
2541         Move GTK WebKit2 code to std::unique_ptr
2542         https://bugs.webkit.org/show_bug.cgi?id=129672
2543
2544         Reviewed by Anders Carlsson.
2545
2546         Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.
2547
2548         * Shared/Downloads/Download.h:
2549         * Shared/Downloads/soup/DownloadSoup.cpp:
2550         (WebKit::Download::start):
2551         (WebKit::Download::startWithHandle):
2552         (WebKit::Download::platformInvalidate):
2553         * UIProcess/API/gtk/PageClientImpl.cpp:
2554         * UIProcess/API/gtk/PageClientImpl.h:
2555         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
2556         (webkitContextMenuItemCreate):
2557         (webkitContextMenuItemCreateForGtkItem):
2558         (webkit_context_menu_item_new):
2559         (webkit_context_menu_item_new_from_stock_action):
2560         (webkit_context_menu_item_new_from_stock_action_with_label):
2561         (webkit_context_menu_item_new_with_submenu):
2562         (webkit_context_menu_item_new_separator):
2563         * UIProcess/API/gtk/WebKitTextChecker.h:
2564         * UIProcess/API/gtk/WebKitWebContext.cpp:
2565         (createDefaultWebContext):
2566         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2567         (webkitWebViewBaseConstructed):
2568         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2569         (WebKit::WebPrintOperationGtk::print):
2570         * WebProcess/gtk/WebGtkExtensionManager.cpp:
2571         (WebKit::WebGtkExtensionManager::initialize):
2572         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2573         (webkitSoupRequestInputStreamPendingReadAsyncComplete):
2574         (webkitSoupRequestInputStreamReadAsync):
2575         * WebProcess/soup/WebSoupRequestManager.cpp:
2576         (WebKit::WebSoupRequestManager::send):
2577         * WebProcess/soup/WebSoupRequestManager.h:
2578
2579 2014-03-16  Brian Burg  <bburg@apple.com>
2580
2581         Web Inspector: vended backend commands file should be generated as part of the build
2582         https://bugs.webkit.org/show_bug.cgi?id=130110
2583
2584         Reviewed by Timothy Hatcher.
2585
2586         * PlatformGTK.cmake: Copy over generated inspector backend commands files.
2587
2588 2014-03-16  Darin Adler  <darin@apple.com>
2589
2590         Try to fix 32-bit Mac build.
2591
2592         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Add missing include.
2593
2594 2014-03-16  Philippe Normand  <pnormand@igalia.com>
2595
2596         Unreviewed, GTK build fix after r165692.
2597
2598         * UIProcess/gtk/TextCheckerGtk.cpp:
2599         (WebKit::TextChecker::checkSpellingOfString):
2600         (WebKit::TextChecker::checkGrammarOfString):
2601
2602 2014-03-15  Darin Adler  <darin@apple.com>
2603
2604         Remove all uses of deprecatedCharacters from WebKit2
2605         https://bugs.webkit.org/show_bug.cgi?id=130197
2606
2607         Reviewed by Andreas Kling.
2608
2609         * Shared/APIString.h: Rewrote getCharacters to use StringView,
2610         substring, and getCharactersWithUpconvert. Added an 8-bit case
2611         to getUTF8CString.
2612
2613         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2614         (WebKit::writeByte): Added.
2615         (WebKit::writeCharacter): Added.
2616         (WebKit::writeLine): Added. Uses operator[] instead of characters16 to get
2617         the UTF-16 characters out of the string.
2618         (WebKit::NetscapePluginModule::scanPlugin): Replaced code that writes out
2619         text to stdout with much simpler version using the functions above.
2620
2621         * UIProcess/TextChecker.h: Changed text arguments to use StringView instead
2622         of UChar/int pairs.
2623
2624         * UIProcess/WebPageProxy.cpp:
2625         (WebKit::WebPageProxy::internalShowContextMenu): Updated to pass StringView.
2626
2627         * UIProcess/efl/TextCheckerEfl.cpp:
2628         (WebKit::nextWordOffset): Changed function to use StringView and unsigned.
2629         (WebKit::TextChecker::checkTextOfParagraph): Changed to use StringView and
2630         substring.
2631         (WebKit::TextChecker::checkSpellingOfString): Ditto.
2632         (WebKit::TextChecker::checkGrammarOfString): Ditto.
2633         (WebKit::TextChecker::requestCheckingOfString): Pass in a StringView, so no
2634         need to call deprecatedCharacters.
2635
2636         * UIProcess/ios/TextCheckerIOS.mm:
2637         (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView.
2638         (WebKit::TextChecker::checkSpellingOfString): Ditto.
2639         (WebKit::TextChecker::checkGrammarOfString): Ditto.
2640
2641         * UIProcess/mac/TextCheckerMac.mm:
2642         (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView and
2643         use StringView::createNSStringWithoutCopying.
2644         (WebKit::TextChecker::checkSpellingOfString): CHanged to take StringView.
2645         (WebKit::TextChecker::checkGrammarOfString): Ditto.
2646
2647         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2648         (WebKit::convertStringToKeyCodes): Changed to take StringView and use
2649         upconvertedCharacters instead of deprecatedCharacters. Also use move instead
2650         of swap.
2651         (WebKit::NetscapePlugin::sendComplexTextInput): Updated to new style for loop.
2652
2653         * WebProcess/WebPage/EncoderAdapter.cpp:
2654         (WebKit::EncoderAdapter::encodeString): Use StringView::upconvertedCharacters
2655         instead of String::deprecatedCharacters.
2656
2657 2014-03-15  David Kilzer  <ddkilzer@apple.com>
2658
2659         [iOS] Define SYSTEM_VERSION_PREFIX consistently
2660         <http://webkit.org/b/130293>
2661         <rdar://problem/15926359>
2662
2663         Reviewed by Dan Bernstein.
2664
2665         * Configurations/Version.xcconfig:
2666         (SYSTEM_VERSION_PREFIX): Sync with
2667         Source/WebKit/mac/Version.xcconfig.
2668
2669 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
2670
2671         [Mac] Sync extended attribute related rules with AppSandbox profile
2672         https://bugs.webkit.org/show_bug.cgi?id=130263
2673         <rdar://problem/16318965>
2674
2675         Reviewed by Sam Weinig.
2676
2677         Update the fix to use a different syntax in some OS versions.
2678
2679         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2680         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2681         * WebProcess/com.apple.WebProcess.sb.in:
2682
2683 2014-03-14  Ryosuke Niwa  <rniwa@webkit.org>
2684
2685         Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
2686
2687         * UIProcess/API/Cocoa/WKBackForwardList.h:
2688         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
2689         * UIProcess/API/Cocoa/WKNavigation.h:
2690         * UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
2691         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
2692         (NS_ENUM):
2693         * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
2694         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
2695         * UIProcess/API/Cocoa/WKWebView.h:
2696
2697 2014-03-14  Mark Rowe  <mrowe@apple.com>
2698
2699         Fix the production build.
2700
2701         Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
2702         be at the expected relative path when working from installed source.
2703
2704         * Configurations/Base.xcconfig:
2705
2706 2014-03-14  Maciej Stachowiak  <mjs@apple.com>
2707
2708         Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
2709         https://bugs.webkit.org/show_bug.cgi?id=130276
2710         <rdar://problem/16266927>
2711         
2712         Reviewed by Simon Fraser.
2713
2714         * Shared/AsyncRequest.cpp:
2715         * Shared/AsyncRequest.h:
2716         * Shared/ContextMenuContextData.cpp:
2717         * Shared/ContextMenuContextData.h:
2718         * Shared/Databases/DatabaseProcessCreationParameters.h:
2719         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
2720         * Shared/Databases/IndexedDB/IDBUtilities.h:
2721         * Shared/mac/RemoteLayerBackingStore.h:
2722         * Shared/mac/RemoteLayerBackingStore.mm:
2723         * UIProcess/API/Cocoa/WKBackForwardList.h:
2724         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Removed.
2725         * UIProcess/API/Cocoa/WKNavigation.h:
2726         * UIProcess/API/Cocoa/WKNavigationAction.h: Removed.
2727         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
2728         * UIProcess/API/Cocoa/WKNavigationResponse.h: Removed.
2729         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Added.
2730         (NS_ENUM):
2731         * UIProcess/API/Cocoa/WKWebView.h:
2732         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
2733         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
2734         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
2735         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
2736         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
2737         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2738         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2739         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
2740         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
2741         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
2742         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
2743         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2744         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2745         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2746         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2747         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2748         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
2749         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
2750         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2751         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2752
2753 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
2754
2755         [iOS WK2] background-attachment: fixed renders oddly, moves around
2756         https://bugs.webkit.org/show_bug.cgi?id=130277
2757         <rdar://problem/16332883>
2758
2759         Reviewed by Tim Horton.
2760         
2761         Actually send scrolling and counter-scrolling layers to the UI process!
2762
2763         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2764         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2765         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2766
2767 2014-03-14  Anders Carlsson  <andersca@apple.com>
2768
2769         Try to fix the iOS build.
2770
2771         * UIProcess/mac/WebContextMac.mm:
2772
2773 2014-03-14  Anders Carlsson  <andersca@apple.com>
2774
2775         Begin work on the bundle parameter API
2776         https://bugs.webkit.org/show_bug.cgi?id=130267
2777
2778         Reviewed by Dan Bernstein.
2779
2780         * Shared/WebProcessCreationParameters.cpp:
2781         (WebKit::WebProcessCreationParameters::encode):
2782         (WebKit::WebProcessCreationParameters::decode):
2783         * Shared/WebProcessCreationParameters.h:
2784         * UIProcess/API/Cocoa/WKProcessPool.mm:
2785         (-[WKProcessPool _objectForBundleParameter:]):
2786         (-[WKProcessPool _setObject:forBundleParameter:]):
2787         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2788         * UIProcess/WebContext.h:
2789         (WebKit::WebContext::bundleParameters):
2790         * UIProcess/mac/WebContextMac.mm:
2791         (WebKit::WebContext::ensureBundleParameters):
2792         (WebKit::WebContext::platformInitializeWebProcess):
2793
2794 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
2795
2796         [Mac] Sync extended attribute related rules with AppSandbox profile
2797         https://bugs.webkit.org/show_bug.cgi?id=130263
2798         <rdar://problem/16318965>
2799
2800         Reviewed by Sam Weinig.
2801
2802         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2803         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
2804         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2805         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2806         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2807         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2808         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
2809         * WebProcess/com.apple.WebProcess.sb.in:
2810
2811 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
2812
2813         [iOS WK2] Improve behavior of fixed elments on zooming
2814         https://bugs.webkit.org/show_bug.cgi?id=130253
2815
2816         Reviewed by Beth Dakin.
2817
2818         Correctly reposition right- and bottom-relative position:fixed
2819         elements on zooming in WK2 iOS by telling the scrolling tree
2820         about zoom-related viewport changes.
2821
2822         * Shared/mac/RemoteLayerTreeTransaction.h:
2823         (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged):
2824         Drive-by cleanup; typedef the flags field to an unsigned, to avoid ugly casting.
2825         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2826         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Pass out a flag to say
2827         if the update contained a new fixed or sticky layer.
2828         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2829         (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
2830         Call into the new ScrolingTree::viewportChangedViaDelegatedScrolling().
2831         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2832         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: If we got a new fixed
2833         or sticky layer, set fixedOrStickyLayerChanged to true.
2834         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
2835         * UIProcess/ios/WKContentView.mm:
2836         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2837         Remember both the old zoomScale and the filteredScale, since the fixed position rect
2838         should be computed using the unfiltered scale.
2839         Some FloatRect -> CGRect changes.
2840         Now call viewportChangedViaDelegatedScrolling() on the scrolling coordinator.
2841         (-[WKContentView fixedPositionRectFromExposedRect:scale:]): Call the
2842         FrameView function to compute the iOS fixed position rect.
2843         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2844         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): If the update
2845         got a new fixed or sticky layer, run the scrolling tree logic to make sure
2846         it gets into the right place.
2847         * UIProcess/mac/RemoteLayerTreeHost.mm:
2848         (WebKit::RemoteLayerTreeHost::updateLayerTree): If we logged here,
2849         we'd log twice if the tiled scrolling indicator was enabled, so 
2850         hoisted the logging out into the caller.
2851
2852 2014-03-14  Landry Breuil  <landry@openbsd.org>
2853
2854         Use the correct type in webkitSoupRequestInputStreamNew()'s declaration.
2855         Nhttps://bugs.webkit.org/show_bug.cgi?id=129974
2856
2857         Reviewed by Andreas Kling.
2858
2859         * WebProcess/soup/WebKitSoupRequestInputStream.h:
2860
2861 2014-03-14  Anders Carlsson  <andersca@apple.com>
2862
2863         Fix crash when resizing the visited link table
2864         https://bugs.webkit.org/show_bug.cgi?id=130257
2865         <rdar://problem/16328177>
2866
2867         Reviewed by Dan Bernstein.
2868
2869         We're iterating over the old table, so use currentTableSize in the loop termination condition.
2870
2871         * UIProcess/VisitedLinkProvider.cpp:
2872         (WebKit::VisitedLinkProvider::resizeTable):
2873
2874 2014-03-14  Dan Bernstein  <mitz@apple.com>
2875
2876         [Cocoa] Expose a way to set the cookie accept policy
2877         https://bugs.webkit.org/show_bug.cgi?id=130251
2878
2879         Reviewed by Anders Carlsson.
2880
2881         * UIProcess/API/Cocoa/WKProcessPool.mm:
2882         (toHTTPCookieAcceptPolicy): Added a helper function that maps from NSHTTPCookieAcceptPolicy
2883         values to WebKit::HTTPCookieAcceptPolicy values.
2884         (-[WKProcessPool _setCookieAcceptPolicy:]): Added. Calls
2885         WebCookieManagerProxy::setHTTPCookieAcceptPolicy. 
2886         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared new method.
2887
2888 2014-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2889
2890         [GTK] WebKit2WebExtension GIR can't be used in vala
2891         https://bugs.webkit.org/show_bug.cgi?id=127179
2892
2893         Reviewed by Martin Robinson.
2894
2895         Do not include all WebKit2 gir symbols from WebKit2WebExtension gir
2896         file.
2897
2898         * GNUmakefile.am:
2899         * PlatformGTK.cmake:
2900
2901 2014-03-14  Csaba Osztrogonác  <ossy@webkit.org>
2902
2903         [CMake] URTBF after r165619.
2904
2905         * CMakeLists.txt: Add new files.
2906
2907 2014-03-14  Anders Carlsson  <andersca@apple.com>
2908
2909         Remove WebContext::addVisitedLink
2910         https://bugs.webkit.org/show_bug.cgi?id=130242
2911
2912         Reviewed by Dan Bernstein.
2913
2914         Fold the function into WKContextAddVisitedLink instead.
2915
2916         * UIProcess/API/C/WKContext.cpp:
2917         (WKContextAddVisitedLink):
2918         * UIProcess/WebContext.cpp:
2919         * UIProcess/WebContext.h:
2920         (WebKit::WebContext::visitedLinkProvider):
2921
2922 2014-03-13  Anders Carlsson  <andersca@apple.com>
2923
2924         Move visited link handling to VisitedLinkTableController and VisitedLinkProvider
2925         https://bugs.webkit.org/show_bug.cgi?id=130223
2926         <rdar://problem/16315792>
2927
2928         Reviewed by Dan Bernstein.
2929
2930         * DerivedSources.make:
2931         Generate messages for VisitedLinkProvider and VisitedLinkTableController.
2932         
2933         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2934         (-[WKWebViewConfiguration copyWithZone:]):
2935         Set the visited link provider.
2936
2937         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
2938         Add addVisitedLinkWithURL: method.
2939
2940         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
2941         (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]):
2942         Compute a link hash from the absolute URL string and pass it to the underlying VisitedLinkProvider object.
2943
2944         * UIProcess/VisitedLinkProvider.cpp:
2945         (WebKit::VisitedLinkProvider::addProcess):
2946         Add the process to the m_processes HashCountedSet. If it's the first time we're adding the process, 
2947         add the VisitedLinkProvider object as a message receiver and send the visited link table to the process.
2948
2949         (WebKit::VisitedLinkProvider::removeProcess):
2950         Remove the process from the m_processes HashCountedSet. If we're removing the last reference to the process,
2951         remove ourselves as a  message receiver.
2952
2953         (WebKit::VisitedLinkProvider::addVisitedLinkHash):
2954         Rename this from addVisitedLink to better indicate what it's doing.
2955
2956         (WebKit::tableSizeForKeyCount):
2957         Update for constant rename.
2958
2959         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
2960         Compute the new pending visited links table size. If it's bigger than our current table, resize the table
2961         by calling resizeTable. Otherwise, simply try to add the pending hashes to our shared hash table. If successful,
2962         add the link hash to the addedVisitedLinks table and eventually send it to all processes associated with the visited link provider.
2963
2964         (WebKit::VisitedLinkProvider::resizeTable):
2965         Create a new shared memory segment, Set it as the table backing store and add all visited links from the old table. Finally,
2966         add our pending visited link hashes and send the new table memory to all processes associated with the visited link provider.
2967
2968         (WebKit::VisitedLinkProvider::sendTable):
2969         Helper function that creates a shared memory handle and sends it to a given web process.
2970
2971         * UIProcess/VisitedLinkProvider.h:
2972         Add new members.
2973
2974         * UIProcess/VisitedLinkProvider.messages.in:
2975         Add messages.
2976
2977         * UIProcess/WebContext.cpp:
2978         (WebKit::WebContext::processDidFinishLaunching):
2979         (WebKit::WebContext::disconnectProcess):
2980         The WebContext no longer needs to inform the visited link provider about the processes coming and going, that's already handled
2981         by the WebPageProxy objects.
2982
2983         (WebKit::WebContext::addVisitedLink):
2984         Call addVisitedLinkHash on the visited link provider.
2985
2986         * UIProcess/WebContext.h:
2987         * UIProcess/WebContext.messages.in:
2988         Remove a message that is now implemented by the visited link provider.
2989
2990         * WebKit2.xcodeproj/project.pbxproj:
2991         Add new files.
2992
2993         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2994         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
2995         Add the table controller as a message receiver.
2996
2997         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
2998         Remove the table controller as a message receiver.
2999
3000         (WebKit::VisitedLinkTableController::isLinkVisited):
3001         Check if the link is visited according to the visited link table.
3002
3003         (WebKit::VisitedLinkTableController::addVisitedLink):
3004         Send the link hash to the UI process if it's not already visited.
3005
3006         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
3007         Set the backing store memory and invalidate all styles.
3008
3009         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
3010         Invalidate the styles for the given links.
3011
3012         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
3013         Invalidate the styles for all links.
3014
3015         * WebProcess/WebPage/VisitedLinkTableController.h:
3016         Add new members.
3017
3018         * WebProcess/WebPage/VisitedLinkTableController.messages.in:
3019         Add new messages.
3020
3021         * WebProcess/WebProcess.cpp:
3022         Remove unused functions; these are handled by VisitedLinkTableController now.
3023
3024         * WebProcess/WebProcess.h:
3025         (WebKit::WebProcess::shouldTrackVisitedLinks):
3026         Add getter.
3027
3028         * WebProcess/WebProcess.messages.in:
3029         Remove messages.
3030
3031 2014-03-12  Sergio Villar Senin  <svillar@igalia.com>
3032
3033         Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
3034         https://bugs.webkit.org/show_bug.cgi?id=129612
3035
3036         Reviewed by Darin Adler.
3037
3038         For new code use static NeverDestroyed<T> instead.
3039
3040         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
3041         (WebKit::getIndexStatement):
3042         (WebKit::getObjectStoreStatement):
3043         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
3044         (WebKit::SeccompBrokerClient::shared):
3045         * UIProcess/InspectorServer/WebInspectorServer.cpp:
3046         (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
3047
3048 2014-03-14  Dan Bernstein  <mitz@apple.com>
3049
3050         <rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
3051         https://bugs.webkit.org/show_bug.cgi?id=130228
3052
3053         Reviewed by Mark Rowe.
3054
3055         * UIProcess/Cocoa/HistoryClient.mm:
3056         (WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
3057         main frame.
3058         (WebKit::HistoryClient::didPerformClientRedirect): Ditto.
3059         (WebKit::HistoryClient::didPerformServerRedirect): Ditto.
3060         (WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
3061
3062 2014-03-13  Jinwoo Jeong  <jw00.jeong@samsung.com>
3063
3064         Refactor Vibration algorithm to use only one timer.
3065         https://bugs.webkit.org/show_bug.cgi?id=130059
3066
3067         Reviewed by Darin Adler.
3068
3069         This patch adds a vibration unit test regression after r161257.
3070         It consists of two short term requests to check
3071         that Vibration could work properly by sequential requests.
3072
3073         Indeed this patch tightens condition of existing tests.
3074
3075         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3076         (TEST_F):
3077
3078 2014-03-13  Paul Hankes Drielsma  <phd@apple.com>
3079
3080         Add SPI to set a custom user agent on WKWebView
3081         https://bugs.webkit.org/show_bug.cgi?id=130164
3082
3083         Reviewed by Dan Bernstein.
3084
3085         * UIProcess/API/Cocoa/WKWebView.mm:
3086         (-[WKWebView _customUserAgent]):
3087         (-[WKWebView _setCustomUserAgent:]):
3088         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3089
3090 2014-03-13  Paul Hankes Drielsma  <phd@apple.com>
3091
3092         Add SPI to run javascript in main frame on WKWebView
3093         https://bugs.webkit.org/show_bug.cgi?id=130047
3094
3095         Reviewed by Anders Carlsson.
3096
3097         * UIProcess/API/Cocoa/WKWebView.mm:
3098         (-[WKWebView _runJavaScriptInMainFrame:]):
3099
3100 2014-03-13  Benjamin Poulain  <bpoulain@apple.com>
3101
3102         The viewport code should not depend on WebKitSystemInterface
3103         https://bugs.webkit.org/show_bug.cgi?id=130218
3104
3105         Reviewed by Tim Horton.
3106
3107         Get the viewport size from the UIProcess when creating a new WebProcess.
3108         From there, the value is stored in WebPage and used whenever we need to update
3109         the viewport parameters.
3110
3111         * Shared/WebPageCreationParameters.cpp:
3112         (WebKit::WebPageCreationParameters::encode):
3113         (WebKit::WebPageCreationParameters::decode):
3114         * Shared/WebPageCreationParameters.h:
3115         * UIProcess/WebPageProxy.cpp:
3116         (WebKit::WebPageProxy::internalShowContextMenu):
3117         * UIProcess/WebPageProxy.h:
3118         * UIProcess/ios/WebPageProxyIOS.mm:
3119         (WebKit::WebPageProxy::viewportScreenSize):
3120         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3121         (WebKit::WebChromeClient::viewportScreenSize):
3122         * WebProcess/WebCoreSupport/WebChromeClient.h:
3123         * WebProcess/WebPage/WebPage.cpp:
3124         (WebKit::WebPage::WebPage):
3125         * WebProcess/WebPage/WebPage.h:
3126         * WebProcess/WebPage/ios/WebPageIOS.mm:
3127         (WebKit::WebPage::viewportScreenSize):
3128
3129 2014-03-13  Beth Dakin  <bdakin@apple.com>
3130
3131         Do not show extended background during a pinch gesture on iOS
3132         https://bugs.webkit.org/show_bug.cgi?id=130152
3133         -and corresponding-
3134         <rdar://problem/16303819>
3135
3136         Reviewed by Simon Fraser.
3137
3138         This patch refactors the backgroundColor-setting logic into its own method so that 
3139         it can be called from both _didCommitLayerTree and scrollViewDidZoom.
3140
3141         Only set the UIScrollView’s background color when the zoomScale is greater than or 
3142         equal to the minimumZoomScale. Also do not set it during the zoom bounce 
3143         animation. Otherwise, clear the background color by setting it to nil.
3144         * UIProcess/API/Cocoa/WKWebView.mm:
3145         (-[WKWebView updateScrollViewBackground]):
3146         (-[WKWebView _didCommitLayerTree:WebKit::]):
3147         (-[WKWebView scrollViewDidZoom:]):
3148
3149 2014-03-13  Enrica Casucci  <enrica@apple.com>
3150
3151         [iOS WebKit2] block selection should avoid large blocks.
3152         https://bugs.webkit.org/show_bug.cgi?id=130208
3153         <rdar://problem/16251785>
3154
3155         Reviewed by Benjamin Poulain.
3156
3157         When creating a block selection, we should discard blocks that
3158         are larger than most of the visible portion of the document.
3159         This prevents the accidental selection the entire document, which
3160         is fairly common when tapping over empty areas.
3161
3162         * Shared/InteractionInformationAtPosition.cpp:
3163         (WebKit::InteractionInformationAtPosition::encode):
3164         (WebKit::InteractionInformationAtPosition::decode):
3165         * Shared/InteractionInformationAtPosition.h: Removed selectionRects that was not really needed and
3166         added isSelectable to indicate whether the selection can start.
3167         (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
3168         * UIProcess/ios/WKContentViewInteraction.mm:
3169         (-[WKContentView hasSelectablePositionAtPoint:]): Now uses isSelectable.
3170         * WebProcess/WebPage/ios/WebPageIOS.mm:
3171         (WebKit::WebPage::getPositionInformation): Takes into account the userSelect property
3172         to figure out if the element can be selected and discards blocks that are
3173         larger than 97% of the visible area of the document.
3174
3175 2014-03-13  Anders Carlsson  <andersca@apple.com>
3176
3177         Rename WKVisitedLinkProvider to _WKVisitedLinkProvider and make it private
3178         https://bugs.webkit.org/show_bug.cgi?id=130207
3179
3180         Reviewed by Dan Bernstein.
3181
3182         * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Removed.
3183         * UIProcess/API/Cocoa/WKWebView.mm:
3184         (-[WKWebView initWithFrame:configuration:]):
3185         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3186         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3187         (-[WKWebViewConfiguration _visitedLinkProvider]):
3188         (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
3189         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3190         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.h.
3191         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.mm.
3192         (-[_WKVisitedLinkProvider init]):
3193         * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h.
3194         * WebKit2.xcodeproj/project.pbxproj:
3195
3196 2014-03-13  Anders Carlsson  <andersca@apple.com>
3197
3198         Remove a commented out member function
3199         https://bugs.webkit.org/show_bug.cgi?id=130204
3200
3201         Reviewed by Tim Horton.
3202
3203         * Shared/ChildProcessProxy.h:
3204         (WebKit::ChildProcessProxy::canSendMessage):
3205
3206 2014-03-13  Enrica Casucci  <enrica@apple.com>
3207
3208         [iOS WebKit2] Crash on iPad when displaying a select element with options.
3209         https://bugs.webkit.org/show_bug.cgi?id=130200
3210         <rdar://problem/16316187>
3211
3212         Reviewed by Simon Fraser.
3213
3214         _singleSelectionIndex should be initialized to NSNotFound for multiSelect elements.
3215
3216         * UIProcess/ios/forms/WKFormSelectPopover.mm:
3217         (-[WKSelectTableViewController initWithView:hasGroups:]):
3218
3219 2014-03-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3220
3221         [GTK] Close the connection when we fail to read from the socket for any unhandled error
3222         https://bugs.webkit.org/show_bug.cgi?id=130191
3223
3224         Reviewed by Martin Robinson.
3225
3226         We currently show an error message, but we should close the
3227         connection avoid entering an infinite loop. Also provide more
3228         information in the error message to help when debugging the issue.
3229
3230         * Platform/IPC/unix/ConnectionUnix.cpp:
3231         (IPC::Connection::readyReadHandler):
3232
3233 2014-03-13  Radu Stavila  <stavila@adobe.com>
3234
3235         Webkit not building on XCode 5.1 due to garbage collection no longer being supported
3236         https://bugs.webkit.org/show_bug.cgi?id=130087
3237
3238         Reviewed by Mark Rowe.
3239
3240         Disable garbage collection on macosx when not using internal SDK.
3241
3242         * Configurations/Base.xcconfig:
3243
3244 2014-03-10  Darin Adler  <darin@apple.com>
3245
3246         Avoid copy-prone idiom "for (auto item : collection)"
3247         https://bugs.webkit.org/show_bug.cgi?id=129990
3248
3249         Reviewed by Geoffrey Garen.
3250
3251         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3252         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&.
3253
3254         * Shared/mac/RemoteLayerTreeTransaction.mm:
3255         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&
3256         even though the type is a scalar. This does no harm and makes it easier
3257         to spot uses that trigger unnecessary copying with grep.
3258         (WebKit::RemoteLayerTreeTransaction::decode): Ditto.
3259         (WebKit::dumpChangedLayers): Ditto.
3260         * UIProcess/mac/RemoteLayerTreeHost.mm:
3261         (WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
3262         * WebProcess/WebProcess.cpp:
3263         (WebKit::WebProcess::visitedLinkStateChanged): Ditto.
3264
3265 2014-03-12  Brian Burg  <bburg@apple.com>
3266
3267         Web Inspector: Remove unused callId parameter from evaluateInWebInspector
3268         https://bugs.webkit.org/show_bug.cgi?id=129744
3269
3270         Reviewed by Timothy Hatcher.
3271
3272         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
3273         (WKBundleInspectorEvaluateScriptForTest):
3274         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
3275         * WebProcess/WebPage/WebInspector.cpp:
3276         (WebKit::WebInspector::evaluateScriptForTest):
3277         * WebProcess/WebPage/WebInspector.h:
3278
3279 2014-03-13  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
3280
3281         Fix the !ENABLE(SQL_DATABASE) build
3282         https://bugs.webkit.org/show_bug.cgi?id=130130
3283
3284         Reviewed by Csaba Osztrogonác.
3285
3286         Add missing #ifdef guard to typedef.
3287
3288         * UIProcess/API/C/WKDatabaseManager.cpp:
3289
3290 2014-03-12  Dean Jackson  <dino@apple.com>
3291
3292         [WebGL] WebKit1 + WebKit2 iOS clients should check load policy
3293         https://bugs.webkit.org/show_bug.cgi?id=130162
3294
3295         Reviewed by Simon Fraser.
3296
3297         Implement webGLPolicyForURL() methods for iOS.
3298
3299         * Configurations/WebContent-iOS.entitlements: Add the MobileAsset asset type.
3300         * Configurations/WebKit2.xcconfig: Add MobileAsset to iOS link list.
3301         * WebProcess/WebPage/WebPage.cpp: Exclude iOS.
3302         * WebProcess/WebPage/ios/WebPageIOS.mm:
3303         (WebKit::WebPage::webGLPolicyForURL): Call into WKSI.
3304         (WebKit::WebPage::resolveWebGLPolicyForURL):
3305
3306 2014-03-12  Joseph Pecoraro  <pecoraro@apple.com>
3307
3308         Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
3309         https://bugs.webkit.org/show_bug.cgi?id=130118
3310
3311         Reviewed by Timothy Hatcher.
3312
3313         * Configurations/FeatureDefines.xcconfig:
3314
3315 2014-03-12  Enrica Casucci  <enrica@apple.com>
3316
3317         [iOS WebKit2] Crash when trying to select inside a video element with longpress..
3318         https://bugs.webkit.org/show_bug.cgi?id=130095
3319         <rdar://problem/16294534>
3320
3321         Reviewed by Benjamin Poulain.
3322
3323         We only need to set the assisted node for nodes that will receive an
3324         input peripheral (keyboard, picker, popover, etc.).
3325
3326         * WebProcess/WebPage/ios/WebPageIOS.mm:
3327         (WebKit::WebPage::rangeForWebSelectionAtPosition):
3328         (WebKit::WebPage::elementDidFocus):
3329
3330 2014-03-12  Simon Fraser  <simon.fraser@apple.com>
3331
3332         Have the scrolling tree track the viewport size, not the viewport rect
3333         https://bugs.webkit.org/show_bug.cgi?id=130141
3334
3335         Reviewed by Beth Dakin.
3336
3337         The scrolling tree only needs to know the size of the viewport, not its
3338         origin, since the origin is deduced from the updated scroll position.
3339
3340         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3341         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
3342         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
3343
3344 2014-03-12  Commit Queue  <commit-queue@webkit.org>
3345
3346         Unreviewed, rolling out r165481.
3347         https://bugs.webkit.org/show_bug.cgi?id=130151
3348
3349         That didn't go well. (Requested by kling on #webkit).
3350
3351         Reverted changeset:
3352
3353         https://bugs.webkit.org/show_bug.cgi?id=130140
3354         http://trac.webkit.org/changeset/165481
3355
3356 2014-03-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3357
3358         [GTK] Runtime error when page is closed while print operation is in progress
3359         https://bugs.webkit.org/show_bug.cgi?id=129869
3360
3361         Reviewed by Anders Carlsson.
3362
3363         Sometimes when the page is closed right after printing the web
3364         process aborts with the runtime message "pure virtual method
3365         called terminate called without an active exception".
3366         This happens because the page is closed when the pages have been
3367         printed, but print job is still ongoing sending the data to the
3368         printer. When print job finishes, we try to notify the UI process
3369         sending the print callback message using WebPage::send(), but the
3370         web page object has been destroyed. The virtual method it complains
3371         about is probably MessageSender::messageSenderDestinationID() used
3372         by send(). Since our print operation is always asynchronous, we
3373         need a way to notify the web page when the print operation has
3374         actually finished to clean it up, but also notify the print
3375         operation when the page has been closed to not try to notify the
3376         UI process in that case.
3377
3378         * WebProcess/WebPage/WebPage.cpp:
3379         (WebKit::WebPage::close): Call disconnectFromPage to notify the
3380         print operation in case there's an ongoing print job.
3381         (WebKit::WebPage::endPrinting): Do not cleanup the print operation
3382         here, since the print opertation might not have finished yet.
3383         (WebKit::WebPage::didFinishPrintOperation): Send
3384         PrintFinishedCallback message to the Ui process and cleanup the
3385         print operation.
3386         * WebProcess/WebPage/WebPage.h:
3387         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
3388         (WebKit::WebPrintOperationGtk::disconnectFromPage): Set m_webPage
3389         to nullptr.
3390         (WebKit::WebPrintOperationGtk::printDone): Call
3391         didFinishPrintOperation() is the web page hasn't been closed.
3392         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
3393
3394 2014-03-12  Andreas Kling  <akling@apple.com>
3395
3396         BundlePageDiagnosticLoggingClient leaks every string passing through it.
3397         <https://webkit.org/b/130140>
3398         <rdar://problem/15416838>
3399
3400         Use toAPI() instead of toCopiedAPI() so the receiving end doesn't need
3401         to worry about adopting the WKStringRef.
3402
3403         Reviewed by Anders Carlsson.
3404
3405         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
3406         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
3407
3408 2014-03-12  Tim Horton  <timothy_horton@apple.com>
3409
3410         Hook up image controls for WebKit1
3411         https://bugs.webkit.org/show_bug.cgi?id=130062
3412         <rdar://problem/15964809>
3413
3414         Reviewed by Brady Eidson.
3415
3416         * Shared/ContextMenuContextData.cpp:
3417         (WebKit::ContextMenuContextData::ContextMenuContextData):
3418
3419 2014-03-11  Alexey Proskuryakov  <ap@apple.com>
3420
3421         REGRESSION (r165356): [Mac] Multi-part key bindings don't work
3422         https://bugs.webkit.org/show_bug.cgi?id=130100
3423
3424         Reviewed by Darin Adler.
3425
3426         Restore the previous behavior, where we only interpreted keydowns (including those
3427         coming through performKeyEquivalent).
3428
3429         In the future, we might send all events to input methods, but not to key bindings.
3430
3431         * UIProcess/API/mac/WKView.mm:
3432         (-[WKView keyUp:]):
3433         (-[WKView flagsChanged:]):
3434
3435 2014-03-11  Beth Dakin  <bdakin@apple.com>
3436
3437         _pageExtendedBackgroundColor should not be exposed on WKWebView
3438         https://bugs.webkit.org/show_bug.cgi?id=130093
3439
3440         Reviewed by Simon Fraser.
3441
3442         Added comment indicating that _pageExtendedBackgroundColor is deprecated.
3443         * UIProcess/API/Cocoa/WKViewPrivate.h:
3444
3445         _pageExtendedBackgroundColor now returns nil, but the conversation functionality 
3446         is maintained with a convenience method pageExtendedBackgroundColor.
3447         * UIProcess/API/Cocoa/WKWebView.mm:
3448         (-[WKWebView pageExtendedBackgroundColor]):
3449         (-[WKWebView _didCommitLayerTree:WebKit::]):
3450         (-[WKWebView _pageExtendedBackgroundColor]):
3451
3452         Added comment indicating that _pageExtendedBackgroundColor is deprecated.
3453         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3454
3455         Return nil.
3456         * UIProcess/API/ios/WKViewIOS.mm:
3457         (-[WKView _pageExtendedBackgroundColor]):
3458
3459 2014-03-11  Jae Hyun Park  <jaepark@webkit.org>
3460
3461         [GTK][CMake] Add HARFBUZZ_INCLUDE_DIRS to WebKit and WebKit2
3462         https://bugs.webkit.org/show_bug.cgi?id=130070
3463
3464         Reviewed by Martin Robinson.
3465
3466         * PlatformGTK.cmake:
3467
3468 2014-03-10  Dan Bernstein  <mitz@apple.com>
3469
3470         [Cocoa] Expose WebPageProxy::close
3471         https://bugs.webkit.org/show_bug.cgi?id=130068
3472
3473         Reviewed by Adele Peterson.
3474
3475         * UIProcess/API/Cocoa/WKWebView.mm:
3476         (-[WKWebView _close]):
3477         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3478
3479 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
3480
3481         [iOS][WebKit 2] Wire the unobscured rect in the WebProcess
3482         https://bugs.webkit.org/show_bug.cgi?id=130058
3483
3484         Reviewed by Simon Fraser.
3485
3486         * WebProcess/WebPage/ios/WebPageIOS.mm:
3487         (WebKit::WebPage::updateVisibleContentRects):
3488
3489 2014-03-10  Simon Fraser  <simon.fraser@apple.com>
3490
3491         Fix three leaks
3492         https://bugs.webkit.org/show_bug.cgi?id=130048
3493
3494         Reviewed by Anders Carlsson.
3495
3496         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3497         (decodeObject): Code is simpler and less leaky without the RetainPtr.
3498         * UIProcess/API/Cocoa/WKNavigationAction.mm: Fix _originalURL leak
3499         by making it a RetainPtr and implementing the getter and setter.
3500         (-[WKNavigationAction _setOriginalURL:]):
3501         (-[WKNavigationAction _originalURL]):
3502
3503 2014-03-10  Beth Dakin  <bdakin@apple.com>
3504
3505         Set background color of WK2's UIScrollView to the pageExtendedBackgroundColor
3506         https://bugs.webkit.org/show_bug.cgi?id=129919
3507
3508         Reviewed by Benjamin Poulain.
3509
3510         Make the pageExtendedBackgroundColor part of a RemoteLayerTreeTransaction.
3511         * Shared/mac/RemoteLayerTreeTransaction.h:
3512         (WebKit::RemoteLayerTreeTransaction::pageExtendedBackgroundColor):
3513         (WebKit::RemoteLayerTreeTransaction::setPageExtendedBackgroundColor):
3514         * Shared/mac/RemoteLayerTreeTransaction.mm:
3515         (WebKit::RemoteLayerTreeTransaction::encode):
3516         (WebKit::RemoteLayerTreeTransaction::decode):
3517
3518         Set the background color of the UIScrollView based on the 
3519         pageExtendedBackgroundColor.
3520         * UIProcess/API/Cocoa/WKWebView.mm:
3521         (-[WKWebView _didCommitLayerTree:WebKit::]):
3522
3523         For the sake of PLATFORM(MAC), continue to support the fact that this color can be 
3524         set via a message from the WebProcess or the new RemoteLayerTreeTransaction.
3525         * UIProcess/WebPageProxy.h:
3526
3527         Cache the pageExtendedBackgroundColor as provided by the 
3528         RemoteLayerTreeTransaction.
3529         * UIProcess/ios/WebPageProxyIOS.mm:
3530         (WebKit::WebPageProxy::didCommitLayerTree):
3531
3532         It’s not necessary to do anything here in non-Mac platforms anymore.
3533         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3534         (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
3535
3536         Include the pageExtendedBackgroundColor in the RemoteLayerTreeTransaction.
3537         * WebProcess/WebPage/WebPage.cpp:
3538         (WebKit::WebPage::willCommitLayerTree):
3539
3540 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
3541
3542         Generalize unobscured rect to all ports
3543         https://bugs.webkit.org/show_bug.cgi?id=130036
3544
3545         Reviewed by Simon Fraser.
3546
3547         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
3548         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
3549         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
3550         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3551         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
3552
3553 2014-03-10  Dan Bernstein  <mitz@apple.com>
3554
3555         <rdar://problem/16278716> [Cocoa] Allow setting a custom group identifier on a WKWebView
3556         https://bugs.webkit.org/show_bug.cgi?id=130033
3557
3558         Reviewed by Tim Horton.
3559
3560         * UIProcess/API/Cocoa/WKWebView.mm:
3561         (-[WKWebView initWithFrame:configuration:]): Create a page group with the group identifier
3562         from the configuration, if it’s non-empty.
3563         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3564         (-[WKWebViewConfiguration _groupIdentifier]): Added this accessor.
3565         (-[WKWebViewConfiguration _setGroupIdentifier:]): Ditto.
3566         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared _groupIdentifier property.
3567
3568 2014-03-10  Enrica Casucci  <enrica@apple.com>
3569
3570         WebKit2: Crash in WebPage::getPositionInformation.
3571         https://bugs.webkit.org/show_bug.cgi?id=129936
3572         <rdar://problem/16264550>
3573  
3574         Reviewed by Eric Carlson.
3575  
3576         Missing null check on the node renderer in one code path.
3577         If the page body is smaller than the document, hit testing
3578         will return HTMLHtmlElement that has no renderer.
3579
3580         * WebProcess/WebPage/ios/WebPageIOS.mm:
3581         (WebKit::WebPage::getPositionInformation):
3582
3583 2014-03-10  Martin Robinson  <mrobinson@igalia.com>
3584
3585         [GTK] [CMake] Clean up library linking
3586         https://bugs.webkit.org/show_bug.cgi?id=129782
3587
3588         Reviewed by Philippe Normand.
3589
3590         * PlatformGTK.cmake: Use the new macro.
3591
3592 2014-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3593
3594         [GTK] The web process can finish while a print operation is still ongoing
3595         https://bugs.webkit.org/show_bug.cgi?id=129871
3596
3597         Reviewed by Martin Robinson.
3598
3599         This can happen when the last page is closed while the print job
3600         is sending data to the printer.
3601
3602         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web
3603         process termination when the print job is sending data to the
3604         printer and enable it again when job finishes.
3605
3606 2014-03-09  Jeong Yong-uk  <yong@company100.com>
3607
3608         Update comment in NetworkResourceLoader
3609         https://bugs.webkit.org/show_bug.cgi?id=129997
3610
3611         Reviewed by Andreas Kling.
3612
3613         NetworkResourceLoader::resourceHandleStopped() has been renamed to
3614         NetworkResourceLoader::cleanup() but the comment is not updated.
3615
3616         * NetworkProcess/NetworkResourceLoader.cpp:
3617         (WebKit::NetworkResourceLoader::start):
3618
3619 2014-03-09  Alexey Proskuryakov  <ap@apple.com>
3620
3621         iOS build fix.
3622
3623         * WebProcess/WebPage/ios/WebPageIOS.mm: Include WebCore/KeyboardEvent.h.
3624
3625 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
3626
3627         [Mac] Don't perform a round-trip through WebProcess before interpreting key events
3628         https://bugs.webkit.org/show_bug.cgi?id=129812
3629
3630         Reviewed by Darin Adler.
3631
3632         * Shared/NativeWebKeyboardEvent.h:
3633         * Shared/WebEvent.h:
3634         (WebKit::WebKeyboardEvent::handledByInputMethod):
3635         (WebKit::WebKeyboardEvent::commands):
3636         * Shared/WebEventConversion.cpp:
3637         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
3638         * Shared/WebKeyboardEvent.cpp:
3639         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
3640         (WebKit::WebKeyboardEvent::~WebKeyboardEvent):
3641         (WebKit::WebKeyboardEvent::encode):
3642         (WebKit::WebKeyboardEvent::decode):
3643         * Shared/mac/NativeWebKeyboardEventMac.mm:
3644         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
3645         * Shared/mac/WebEventFactory.h:
3646         * Shared/mac/WebEventFactory.mm:
3647         (WebKit::WebEventFactory::createWebKeyboardEvent):
3648         Keyboard events now carry results of interpretation with them.
3649         Ideally, mouse events should also have a handledByInputMethod member, because IMs
3650         can handle events, but that can wait until we have actual bugs caused by not diabling
3651         default processing for these.
3652
3653         * UIProcess/API/mac/WKView.mm:
3654         (-[WKView becomeFirstResponder]): Updated for new NativeWebKeyboardEvent contructor
3655         signature. We don't interpret the event in this code path.
3656         (-[WKView doCommandBySelector:]): Added logging.
3657         (-[WKView performKeyEquivalent:]): Reimplemented Esc and Cmd+period handling to avoid
3658         infinite loops and re-entrancy. These two work in a unique way in AppKit.
3659         Interpret key event before sending it down to WebProcess.
3660         (-[WKView keyUp:]): Interpret key event before sending it down to WebProcess.
3661         We need to tell IMs about the event, but key binding processing is moot, all commands
3662         are executed on keydown.
3663         (-[WKView keyDown:]): Interpret the event.
3664         (-[WKView flagsChanged:]): Ditto.
3665         (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): Added an assertion in
3666         consumedByIM code path.
3667         (-[WKView _executeSavedCommandBySelector:]): Added logging.
3668
3669         * UIProcess/PageClient.h:
3670         * UIProcess/ios/PageClientImplIOS.h:
3671         * UIProcess/ios/PageClientImplIOS.mm:
3672         * UIProcess/mac/PageClientImpl.h:
3673         * UIProcess/mac/PageClientImpl.mm:
3674         * UIProcess/WebPageProxy.h:
3675         * UIProcess/WebPageProxy.messages.in:
3676         * UIProcess/ios/WebPageProxyIOS.mm:
3677         * UIProcess/mac/WebPageProxyMac.mm:
3678         Removed interpretQueuedKeyEvent/interpretKeyEvent, WebProcess no longer asks UIProcess to do this.
3679
3680         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
3681         (WebKit::WebEditorClient::handleKeyboardEvent):
3682         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3683         (WebKit::WebEditorClient::handleKeyboardEvent):
3684         (WebKit::WebEditorClient::handleInputMethodKeydown):
3685         WebPage::handleEditingKeyboardEvent is now one function instead of two with a boolean
3686         switch between two behaviors.
3687
3688         * WebProcess/WebPage/WebPage.cpp:(WebKit::WebPage::WebPage):
3689         * WebProcess/WebPage/WebPage.h:
3690         Removed m_keyboardEventBeingInterpreted, as we no longer send the event for interpretation.
3691         This means that we sometimes have to pass a null event down to WebCore, but I wasn't
3692         able to find any behavior differences from us doing so.
3693
3694         * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent):
3695         Added a FIXME.
3696
3697         * WebProcess/WebPage/mac/WebPageMac.mm:
3698         (WebKit::WebPage::executeKeypressCommandsInternal): When we don't have an event,
3699         use current frame as a target, just like input method messages do.
3700         (WebKit::WebPage::handleEditingKeyboardEvent): This function no longer saves commands,
3701         it only interprets them.
3702         Added a check for Esc, as we don't want to handle it in keydown event handler.
3703         (WebKit::WebPage::insertText): Pass 0 instead of m_keyboardEventBeingInterpreted.
3704         (WebKit::WebPage::insertDictatedText): Ditto.
3705         (WebKit::WebPage::executeKeypressCommands): Ditto.
3706
3707 2014-03-09  Zalan Bujtas  <zalan@apple.com>
3708
3709         Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
3710         https://bugs.webkit.org/show_bug.cgi?id=129985
3711
3712         Reviewed by Simon Fraser.
3713
3714         This is in preparation to stop passing integral positioned boxes to transform animations.
3715
3716         No change in behavior.
3717
3718         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
3719
3720 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
3721
3722         [iOS Wk2] Can't scroll after going back to page in page cache
3723         https://bugs.webkit.org/show_bug.cgi?id=129989
3724         <rdar://problem/16217588>
3725
3726         Reviewed by Dan Bernstein.
3727
3728         iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
3729         function that is called instead of FrameView::forceLayout(). This was unimplemented
3730         for the WK2 FrameLoaderClient, so no layout was forced, with the result
3731         that the contentSize was never updated and scrolling was broken.
3732         
3733         Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
3734         and having it return a bool to say whether the default forceLayout()
3735         should be done. WK1 can then continue to have its custom behavior,
3736         and Wk2 will simply do a forceLayout().
3737         
3738         Also remove FrameLaoderClient::forceLayout(), which was never called.
3739
3740         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3741         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3742         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
3743         (WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
3744
3745 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
3746
3747         [iOS WK2] Get position:fixed working slighlty better
3748         https://bugs.webkit.org/show_bug.cgi?id=129988
3749
3750         Reviewed by Dan Bernstein.
3751         
3752         iOS uses fixed layout, but does not want fixed elements laid
3753         out relative to the frame.
3754
3755         * WebProcess/WebPage/WebPage.cpp:
3756         (WebKit::WebPage::setUseFixedLayout):
3757
3758 2014-03-08  Jon Lee  <jonlee@apple.com>
3759
3760         iOS broken after r165342
3761         https://bugs.webkit.org/show_bug.cgi?id=129987
3762
3763         Reviewed by Simon Fraser.
3764
3765         * NetworkProcess/ios/NetworkProcessIOS.mm:
3766         (WebKit::NetworkProcess::platformLowMemoryHandler): Add missing stub implementation for
3767         platformLowMemoryHandler().
3768
3769 2014-03-08  Eric Carlson  <eric.carlson@apple.com>
3770
3771         [iOS] media preferences not initialized correctly in WebKit2
3772         https://bugs.webkit.org/show_bug.cgi?id=129983
3773
3774         Reviewed by Dan Bernstein.
3775
3776         * Shared/WebPreferencesStore.h: Initialize mediaPlaybackAllowsInline and 
3777         mediaPlaybackRequiresUserGesture correctly for iOS.
3778
3779 2014-03-08  Jeremy Jones  <jeremyj@apple.com>
3780
3781         Allow media element to supply the video layer after fullscreen transition has already begun.
3782         https://bugs.webkit.org/show_bug.cgi?id=129870
3783
3784         Reviewed by Eric Carlson.
3785
3786         WebVideoFullscreenManager and WebVideoFullscreenManagerProxy do their own remote hosting of the video layer instead of needing the video layer to have already been hosted elsewhere. This allows the removal of the coordination with WebPageProxy via a RemoteLayerTreeTransaction.
3787
3788         * Shared/mac/RemoteLayerTreeTransaction.h:
3789         Remove m_videoLayerIDsPendingFullscreen and accessors.
3790
3791         * Shared/mac/RemoteLayerTreeTransaction.mm:
3792         (WebKit::RemoteLayerTreeTransaction::encode):
3793         Don't encode m_videoLayerIDsPendingFullscreen
3794
3795         (WebKit::RemoteLayerTreeTransaction::decode):
3796         Don't decode m_videoLayerIDsPendingFullscreen
3797
3798         * UIProcess/ios/WebPageProxyIOS.mm:
3799         (WebKit::WebPageProxy::didCommitLayerTree):
3800         Don't forward didCommitLayerTree to m_videoFullscreenManager.
3801
3802         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3803         Remove code for synchronizing with the RenderTree.
3804         Add a hosting layer and methods to keep video layer frame and video gravity synchronized.
3805
3806         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
3807         Change IPC interface to fascilitate rehosting video layer with a instead of coordinating with the RenderTree by PlatformLayerID.
3808
3809         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3810         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
3811         Remove initialization for removed members.
3812
3813         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID):
3814         Rehost the video layer by id and pass on the layer.
3815         This replaces didCommitLayerTree() and  willLendVideoLayerWithID(). 
3816
3817         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
3818         Cleanup the hosting layer.
3819
3820         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
3821         Forward on the video layer's frame to keep the hosted layer in sync with the interface.
3822
3823         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
3824         Forward the videolayer gravity.
3825
3826         * WebKit2.xcodeproj/project.pbxproj:
3827         Rename WebVideoFullscreenManager.cpp to WebVideoFullscreenManager.mm
3828
3829         * WebProcess/WebPage/WebPage.cpp:
3830         (WebKit::WebPage::willCommitLayerTree):
3831         Don't invovle the m_videoFullscreenManager in layer tree transactions.
3832
3833         * WebProcess/ios/WebVideoFullscreenManager.h:
3834         Remove code that synchronizes with the render tree via RemoteLayerTreeTransaction.
3835         Instead rehost the video layer directly.
3836         Instead of hoping the WebVideoFullscreenModel has a videoLayer, supply one into which
3837         it can add whatever it likes as needed.
3838
3839         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
3840         No more explicit borrowing and returning video layers.
3841         Add functions to keep video layer bounds and gravity in sync with the UI. 
3842
3843         * WebProcess/ios/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.cpp.
3844         Removed code for synchronizing via RemoteLAyerTreeTransaction.
3845
3846         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
3847         Remove initialization for removed memeber m_sendUnparentVideoLayerTransaction.
3848
3849         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
3850         Creates a fullscreen layer, gives it to the WebVideoFullscreenModel to fill in,
3851         and hosts it in a context to send to the UIProcess.
3852
3853         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
3854         remove enterFullscreen() and just directly send the IPC message. 
3855
3856         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
3857         Clean up the hosting context.
3858
3859         (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
3860         Forward on the video gravity. Type convert from unsigned to MediaPlayer::VideoGravity.
3861
3862 2014-03-08  Andreas Kling  <akling@apple.com>
3863
3864         [WK2] Improve the network process low memory handler.
3865         <https://webkit.org/b/129977>
3866
3867         Split the network process low memory handler into platform-specific
3868         and shared parts. The shared part tells FastMalloc to release freed
3869         pages back to the OS.
3870
3871         For Mac, added a call to purge the in-memory part of CFURLCache.
3872         Remove the malloc_zone_pressure_relief() since that is now taken care
3873         of by the shared MemoryPressureHandler code.
3874
3875         Reviewed by Darin Adler.
3876
3877         * NetworkProcess/NetworkProcess.cpp:
3878         (WebKit::NetworkProcess::initializeNetworkProcess):
3879         (WebKit::NetworkProcess::lowMemoryHandler):
3880         (WebKit::NetworkProcess::platformLowMemoryHandler):
3881         * NetworkProcess/NetworkProcess.h:
3882         * NetworkProcess/mac/NetworkProcessMac.mm:
3883         (WebKit::NetworkProcess::platformLowMemoryHandler):
3884         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
3885
3886 2014-03-08  Jae Hyun Park  <jaepark@webkit.org>
3887
3888         Remove unnecessary casting in NetworkProcessMainUnix.cpp
3889         https://bugs.webkit.org/show_bug.cgi?id=129968
3890
3891         Reviewed by Andreas Kling.
3892
3893         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
3894         Since socket is an int, int casting is not necessary.
3895
3896         (WebKit::NetworkProcessMain):
3897
3898 2014-03-08  Aaron Golden  <golden@inkling.com>
3899
3900         Prevent processes spawned by WebProcess from trying to insert the SecItem shim.
3901         https://bugs.webkit.org/show_bug.cgi?id=129864
3902
3903         Reviewed by Anders Carlsson.
3904
3905         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
3906         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
3907
3908 2014-03-07  Tim Horton  <timothy_horton@apple.com>
3909
3910         [WebKit2][iOS] PDF
3911         https://bugs.webkit.org/show_bug.cgi?id=129600
3912         <rdar://problem/15260216>
3913
3914         Reviewed by Anders Carlsson.
3915
3916         Add a single custom content provider which installs a very primitive PDF view
3917         in place of the WKContentView if a PDF is loaded in the main frame.
3918
3919         * Configurations/WebKit2.xcconfig:
3920         Link against CorePDF, for UIPDFPageView.
3921
3922         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
3923         (-[WKWebViewContentProviderRegistry init]):
3924         Initialize the registry, using WKPDFView for all PDF MIME types.
3925
3926         * WebKit2.xcodeproj/project.pbxproj:
3927         * UIProcess/ios/WKPDFView.h: Added.
3928         * UIProcess/ios/WKPDFView.mm: Added.
3929         Add a very simple PDF view based on UIPDFPageView. Additional functionality
3930         can come in the future; right now, we just create one view for each page, and
3931         depend on CATiledLayer to only paint the pages that are being displayed.
3932
3933 2014-03-07  Andreas Kling  <akling@apple.com>
3934
3935         ArgumentEncoder and ArgumentDecoder should be fastmalloced.
3936         <https://webkit.org/b/129960>
3937
3938         Reviewed by Ryosuke Niwa.
3939
3940         * Platform/IPC/ArgumentDecoder.h:
3941         * Platform/IPC/ArgumentEncoder.h:
3942
3943 2014-03-07  Martin Robinson  <mrobinson@igalia.com>
3944
3945         Fix the GTK+ build after the recent iOS merge.
3946
3947         * UIProcess/API/gtk/PageClientImpl.cpp: Make some methods available to non-Cocoa ports and fix some signatures.
3948         * UIProcess/WebPageProxy.h: Ditto.
3949
3950 2014-03-07  Ryuan Choi  <ryuan.choi@samsung.com>
3951
3952         Unreviewed. Fix build on the EFL port after r165303
3953
3954         * UIProcess/CoordinatedGraphics/WebView.cpp:
3955         (WebKit::WebView::didCommitLoadForMainFrame): Added new parameters.
3956         * UIProcess/CoordinatedGraphics/WebView.h: Ditto.
3957         * UIProcess/WebPageProxy.h:
3958         * UIProcess/efl/WebViewEfl.cpp: Added dummy didFinishLoadingDataForCustomContentProvider()
3959         (WebKit::WebViewEfl::exitFullScreen):
3960         (WebKit::WebViewEfl::didFinishLoadingDataForCustomContentProvider):
3961         * UIProcess/efl/WebViewEfl.h: Ditto.
3962
3963 2014-03-07  Enrica Casucci  <enrica@apple.com>
3964
3965         [iOS WebKit2] Keyboard accessory comes up when I click a link.
3966         https://bugs.webkit.org/show_bug.cgi?id=129949
3967         <rdar://problem/16265305>
3968
3969         Reviewed by Simon Fraser.
3970
3971         We need to create the accessory view only when needed.
3972
3973         * UIProcess/ios/WKContentViewInteraction.mm:
3974         (-[WKContentView requiresAccessoryView]):
3975         (-[WKContentView inputAccessoryView]):
3976
3977 2014-03-07  Enrica Casucci  <enrica@apple.com>
3978
3979         [iOS WebKit2] Long-press on a link shows just "Copy".
3980         https://bugs.webkit.org/show_bug.cgi?id=129938
3981         <rdar://problem/16266054>
3982
3983         Reviewed by Benjamin Poulain.
3984
3985         When adding a FIXME comment, I accidentally removed the ! on
3986         the if (!element) condition.
3987
3988         * WebProcess/WebPage/ios/WebPageIOS.mm:
3989         (WebKit::WebPage::getPositionInformation):
3990
3991 2014-03-07  Tim Horton  <timothy_horton@apple.com>
3992
3993         [WebKit2][iOS] Main-frame custom content providers
3994         https://bugs.webkit.org/show_bug.cgi?id=129809
3995
3996         Reviewed by Dan Bernstein.
3997
3998         Re-introduce custom content providers to WebKit2 (removed in r152841), but
3999         for iOS this time.
4000
4001         * UIProcess/API/Cocoa/WKWebView.mm:
4002         (-[WKWebView initWithFrame:configuration:]):
4003         Send the initial MIME types that have custom content providers to the WebProcess.
4004
4005         (-[WKWebView dealloc]):
4006         Unregister our page from the content provider registry.
4007         
4008         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
4009         Install/uninstall the custom content provider. Create a view, if needed,
4010         based on the class that the registry has associated with the given MIME type.
4011         We unparent the WKContentView while the custom content provider is active,
4012         and re-use the existing WKScrollView to contain the custom content provider.
4013
4014         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:dataReference:]):
4015         Forward loaded data on to the custom content provider for display.
4016
4017         (-[WKWebView _didCommitLayerTree:WebKit::]):
4018         Assert that we aren't getting layer tree commits while using a custom content provider.
4019
4020         (-[WKWebView viewForZoomingInScrollView:]):
4021         If we're using a custom content provider, its view should be used for zooming
4022         instead of the (unparented) web content view.
4023
4024         (-[WKWebView hasContentView]):
4025         (-[WKWebView scrollViewWillBeginZooming:withView:]):
4026         (-[WKWebView scrollViewWillBeginDragging:]):
4027         (-[WKWebView _didFinishScrolling]):
4028         (-[WKWebView _updateVisibleContentRects]):
4029         If we do not have a parented WKContentView because we are using a custom
4030         content provider, we should not forward scroll view related changes to it.
4031
4032         (-[WKWebView _frameOrBoundsChanged]):
4033         Update the minimum size of the custom content provider if the web view size changes.
4034
4035         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
4036         (-[WKWebViewConfiguration copyWithZone:]):
4037         (-[WKWebViewConfiguration _contentProviderRegistry]):
4038         (-[WKWebViewConfiguration _setContentProviderRegistry:]):
4039         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h: Added.
4040         Add an internal WKWebViewConfiguration property, the WKWebViewContentProviderRegistry.
4041
4042         * UIProcess/API/Cocoa/WKWebViewInternal.h:
4043
4044         * UIProcess/Cocoa/WKWebViewContentProvider.h: Added.
4045         A minimal protocol for informing custom content providers of changes to
4046         the size of the view, the represented data, and the owning scroll view.
4047
4048         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h: Added.
4049         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Added.
4050         (-[WKWebViewContentProviderRegistry addPage:]):
4051         (-[WKWebViewContentProviderRegistry removePage:]):
4052         (-[WKWebViewContentProviderRegistry registerProvider:forMIMEType:]):
4053         (-[WKWebViewContentProviderRegistry providerForMIMEType:]):
4054         (-[WKWebViewContentProviderRegistry mimeTypesWithContentProviders]):
4055         New class, keeps track of a mapping from MIME types to UIViews that
4056         conform to the WKWebViewContentProvider protocol.
4057
4058         * UIProcess/WebPageProxy.cpp:
4059         (WebKit::WebPageProxy::WebPageProxy):
4060         (WebKit::WebPageProxy::didCommitLoadForFrame):
4061         * UIProcess/WebPageProxy.h:
4062         * UIProcess/WebPageProxy.messages.in:
4063
4064         * UIProcess/PageClient.h:
4065         * UIProcess/ios/PageClientImplIOS.h:
4066         * UIProcess/ios/PageClientImplIOS.mm:
4067         (WebKit::PageClientImpl::PageClientImpl):
4068         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
4069         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
4070         * UIProcess/mac/PageClientImpl.h:
4071         * UIProcess/mac/PageClientImpl.mm:
4072         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
4073         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
4074         Add parameters to didCommitLoadForMainFrame, indicating if we should use
4075         a custom content provider to display the main frame, and what MIME type
4076         was loaded in said frame, and add didFinishLoadingDataForCustomContentProvider.
4077         On iOS, forward these to the WKWebView.
4078         Also, give PageClientImplIOS a reference to the WKWebView.
4079         
4080         * UIProcess/ios/WKContentView.mm:
4081         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
4082         
4083         * WebKit2.xcodeproj/project.pbxproj:
4084         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
4085         (-[WKWebProcessPlugInFrame _hasCustomContentProvider]):
4086         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
4087         Expose whether or not a given frame has a custom content provider to the plug-in.
4088
4089         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4090         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
4091         (WebKit::WebFrameLoaderClient::hasHTMLView):
4092         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
4093         (WebKit::WebFrameLoaderClient::committedLoad):
4094         (WebKit::WebFrameLoaderClient::finishedLoading):
4095         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
4096         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
4097         (WebKit::WebFrameLoaderClient::canCachePage):
4098         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
4099         (WebKit::WebFrameLoaderClient::frameHasCustomContentProvider):
4100         Restore WebFrameLoaderClient custom representation code, which ensures
4101         that data is routed correctly (to the UI process, and not to WebCore) and
4102         that we don't try to use the page cache for frames with content providers.
4103
4104         * WebProcess/WebPage/WebPage.cpp:
4105         (WebKit::WebPage::mainFrameHasCustomContentProvider):
4106         (WebKit::WebPage::addMIMETypeWithCustomContentProvider):
4107         (WebKit::WebPage::shouldUseCustomContentProviderForResponse):
4108         (WebKit::WebPage::canShowMIMEType):
4109         * WebProcess/WebPage/WebPage.h:
4110         * WebProcess/WebPage/WebPage.messages.in:
4111         Keep a list of MIME types which can be displayed via custom content providers
4112         in WebPage, which will be pushed down from the registry as new providers
4113         are added. Plug-ins still take precendence over custom content providers.
4114
4115 2014-03-07  Anders Carlsson  <andersca@apple.com>
4116
4117         MigrateHeaders.make should remove C SPI includes from WebKit2 headers
4118         https://bugs.webkit.org/show_bug.cgi?id=129937
4119         <rdar://problem/15920020>
4120
4121         Reviewed by Tim Horton.
4122
4123         * WebKit2.xcodeproj/project.pbxproj:
4124         Make WKPreferences.h and all headers it includes public. Update the post processing of WKBase.h
4125         to account for WKBase.h now being a public header again.