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