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