Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-03-27  Anders Carlsson  <andersca@apple.com>
2
3         Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
4         https://bugs.webkit.org/show_bug.cgi?id=130868
5
6         Reviewed by Sam Weinig.
7
8         * Shared/API/Cocoa/RemoteObjectRegistry.h:
9         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
10         (WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
11         * Shared/API/Cocoa/WKRemoteObject.h:
12         * Shared/API/Cocoa/WKRemoteObject.mm:
13         (-[WKRemoteObject _initWithObjectRegistry:interface:]):
14         * Shared/API/Cocoa/WKRemoteObjectCoder.h:
15         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
16         (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
17         * Shared/API/Cocoa/WKRemoteObjectInterface.h:
18         * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
19         (isContainerClass): Deleted.
20         (propertyListClasses): Deleted.
21         (allowedArgumentClassesForMethod): Deleted.
22         (initializeAllowedArgumentClasses): Deleted.
23         (-[WKRemoteObjectInterface initWithProtocol:identifier:]): Deleted.
24         (+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]): Deleted.
25         (-[WKRemoteObjectInterface description]): Deleted.
26         (classesForSelectorArgument): Deleted.
27         (-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Deleted.
28         (-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Deleted.
29         (methodArgumentTypeEncodingForSelector): Deleted.
30         (-[WKRemoteObjectInterface _methodSignatureForSelector:]): Deleted.
31         (-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Deleted.
32         * Shared/API/Cocoa/WKRemoteObjectRegistry.h:
33         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
34         (-[WKRemoteObjectRegistry registerExportedObject:interface:]): Deleted.
35         (-[WKRemoteObjectRegistry unregisterExportedObject:interface:]): Deleted.
36         (-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]): Deleted.
37         (-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]): Deleted.
38         (-[WKRemoteObjectRegistry _invalidate]): Deleted.
39         (-[WKRemoteObjectRegistry _sendInvocation:interface:]): Deleted.
40         (-[WKRemoteObjectRegistry WebKit::]): Deleted.
41         (-[WKRemoteObjectRegistry _invokeMethod:]): Deleted.
42         (-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
43         * Shared/API/Cocoa/_WKRemoteObjectInterface.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h.
44         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm.
45         (isContainerClass):
46         (propertyListClasses):
47         (allowedArgumentClassesForMethod):
48         (initializeAllowedArgumentClasses):
49         (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
50         (+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
51         (-[_WKRemoteObjectInterface description]):
52         (classesForSelectorArgument):
53         (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
54         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
55         (methodArgumentTypeEncodingForSelector):
56         (-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
57         (-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
58         * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h.
59         * Shared/API/Cocoa/_WKRemoteObjectRegistry.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h.
60         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm.
61         (-[_WKRemoteObjectRegistry registerExportedObject:interface:]):
62         (-[_WKRemoteObjectRegistry unregisterExportedObject:interface:]):
63         (-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
64         (-[_WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
65         (-[_WKRemoteObjectRegistry _invalidate]):
66         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
67         (-[_WKRemoteObjectRegistry WebKit::]):
68         (-[_WKRemoteObjectRegistry _invokeMethod:]):
69         (-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
70         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h.
71         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
72         (-[WKBrowsingContextController _remoteObjectRegistry]):
73         (-[WKBrowsingContextController remoteObjectRegistry]): Deleted.
74         * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
75         * UIProcess/API/Cocoa/WKWebView.mm:
76         (-[WKWebView _remoteObjectRegistry]):
77         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
78         * WebKit2.xcodeproj/project.pbxproj:
79         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h.
80         (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
81         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
82         (-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
83         (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]): Deleted.
84         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
85
86 2014-03-27  Commit Queue  <commit-queue@webkit.org>
87
88         Unreviewed, rolling out r166360.
89         https://bugs.webkit.org/show_bug.cgi?id=130869
90
91         Seems to have broken PLT (Requested by ap on #webkit).
92
93         Reverted changeset:
94
95         "Connection::dispatchOneMessage() can be re-entered while
96         handling Cmd-key menu"
97         https://bugs.webkit.org/show_bug.cgi?id=130767
98         http://trac.webkit.org/changeset/166360
99
100 2014-03-27  Sam Weinig  <sam@webkit.org>
101
102         Support dynamic layer hosting context changes
103         <rdar://problem/16278019>
104         https://bugs.webkit.org/show_bug.cgi?id=130863
105
106         Reviewed by Anders Carlsson.
107
108         * UIProcess/API/mac/WKView.mm:
109         (-[WKView addWindowObserversForWindow:]):
110         (-[WKView removeWindowObservers]):
111         (-[WKView _windowDidChangeLayerHosting:]):
112         * UIProcess/WebPageProxy.cpp:
113         (WebKit::WebPageProxy::layerHostingModeDidChange):
114         * UIProcess/WebPageProxy.h:
115
116 2014-03-27  Simon Fraser  <simon.fraser@apple.com>
117
118         Don't leak the WKBrowsingContextController
119         https://bugs.webkit.org/show_bug.cgi?id=130815
120
121         Reviewed by Tim Horton.
122         
123         Use adoptNS to avoid leaking the WKBrowsingContextController.
124
125         * UIProcess/ios/WKContentView.mm:
126         (-[WKContentView browsingContextController]):
127
128 2014-03-27  Joseph Pecoraro  <pecoraro@apple.com>
129
130         Web Inspector: Give WebProcess a proxy application entitlement
131         https://bugs.webkit.org/show_bug.cgi?id=130806
132
133         Reviewed by Timothy Hatcher.
134
135         * Configurations/WebContent-iOS.entitlements:
136
137 2014-03-27  Anders Carlsson  <andersca@apple.com>
138
139         Add reload and reloadFromOrigin as API
140         https://bugs.webkit.org/show_bug.cgi?id=130858
141
142         Reviewed by Simon Fraser.
143
144         * UIProcess/API/Cocoa/WKWebView.h:
145         * UIProcess/API/Cocoa/WKWebView.mm:
146         (-[WKWebView reload]):
147         (-[WKWebView reloadFromOrigin]):
148         (-[WKWebView validateUserInterfaceItem:]):
149         (-[WKWebView reload:]):
150         (-[WKWebView reloadFromOrigin:]):
151
152 2014-03-27  Anders Carlsson  <andersca@apple.com>
153
154         Rename WKFrameHandle to _WKFrameHandle
155         https://bugs.webkit.org/show_bug.cgi?id=130847
156
157         Reviewed by Tim Horton.
158
159         * Shared/API/Cocoa/_WKFrameHandle.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.h.
160         * Shared/API/Cocoa/_WKFrameHandle.mm: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.mm.
161         (-[_WKFrameHandle dealloc]):
162         (-[_WKFrameHandle isEqual:]):
163         (-[_WKFrameHandle hash]):
164         (-[_WKFrameHandle _frameID]):
165         (-[_WKFrameHandle copyWithZone:]):
166         (+[_WKFrameHandle supportsSecureCoding]):
167         (-[_WKFrameHandle initWithCoder:]):
168         (-[_WKFrameHandle encodeWithCoder:]):
169         (-[_WKFrameHandle API::]):
170         * Shared/API/Cocoa/_WKFrameHandleInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandleInternal.h.
171         (WebKit::wrapper):
172         * Shared/Cocoa/APIObject.mm:
173         (API::Object::newObject):
174         * WebKit2.xcodeproj/project.pbxproj:
175         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
176         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
177         (+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]):
178         (-[WKWebProcessPlugInFrame handle]):
179         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
180
181 2014-03-27  Alexey Proskuryakov  <ap@apple.com>
182
183         Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
184         equivalents, ASSERT(!_data->_keyDownEventBeingResent)
185         https://bugs.webkit.org/show_bug.cgi?id=130767
186         <rdar://problem/16307487>
187
188         Reviewed by Darin Adler.
189
190         * Shared/WebKit2Initialize.cpp: (WebKit::InitializeWebKit2): Added NSModalPanelRunLoopMode
191         to RunLoop event source and timer modes.
192
193 2014-03-27  Jae Hyun Park  <jaepark@webkit.org>
194
195         Remove LayerTreeContextCairo.cpp
196         https://bugs.webkit.org/show_bug.cgi?id=130807
197
198         Reviewed by Martin Robinson.
199
200         * Shared/cairo/LayerTreeContextCairo.cpp: Removed.
201
202 2014-03-27  Maciej Florek  <m.florek@samsung.com>
203
204         [EFL][WK2] Add tests of the set process model API
205         https://bugs.webkit.org/show_bug.cgi?id=130830
206
207         Reviewed by Gyuyoung Kim.
208
209         Implement unit tests to check, if process model API works
210         properly. When process model is set to EWK_PROCESS_MODEL_SHARED_SECONDARY,
211         there should be only one WebProcess. In case of EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
212         setting, each WebView should have own process, as well as the network process
213         should exist.
214
215         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
216         (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
217         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
218         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
219         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
220         (EWK2ContextTestMultipleProcesses::EWK2ContextTestMultipleProcesses):
221         (TEST_F):
222
223 2014-03-27  Commit Queue  <commit-queue@webkit.org>
224
225         Unreviewed, rolling out r166296 and r166331.
226         https://bugs.webkit.org/show_bug.cgi?id=130822
227
228         caused some crashes and frequent assertion failures, and the
229         fix is going to take a little while (Requested by thorton on
230         #webkit).
231
232         Reverted changesets:
233
234         "[iOS WebKit2] Flush all surfaces after painting into all of
235         them, instead of after painting into each one"
236         https://bugs.webkit.org/show_bug.cgi?id=130768
237         http://trac.webkit.org/changeset/166296
238
239         "Assertion failure in RemoteLayerBackingStore::flush"
240         https://bugs.webkit.org/show_bug.cgi?id=130810
241         http://trac.webkit.org/changeset/166331
242
243 2014-03-26  Tim Horton  <timothy_horton@apple.com>
244
245         Blind speculative iOS build fix.
246
247         * WebProcess/WebPage/ios/WebPageIOS.mm:
248         (WebKit::WebPage::viewportConfigurationChanged):
249
250 2014-03-26  Benjamin Poulain  <bpoulain@apple.com>
251
252         [iOS][WK2] <rdar://problem/16265272> REGRESSION (WebKit2): Some pages appear blank until you scroll
253         https://bugs.webkit.org/show_bug.cgi?id=130819
254
255         Reviewed by Tim Horton.
256
257         When loading a new page, we never define the unobscured rect and exposed rect on the new frame.
258         As a result, there is nothing to render.
259
260         It uses to work thanks to dumb luck and a bug in Safari updating the visibleContentRects from
261         the UIProcess. Now that the bug is gone, "dumb luck" is not reliable enough to get the content rects :)
262
263         What this patch does is save if we have ever received new rects from the UI. If we have not, create them
264         based on the minimum layout size. This works because we know Safari shows the minimum layout size by default
265         and will tell us if it changes the obscured rects.
266
267         * WebProcess/WebPage/WebPage.cpp:
268         (WebKit::WebPage::WebPage):
269         (WebKit::WebPage::didCommitLoad):
270         * WebProcess/WebPage/WebPage.h:
271         * WebProcess/WebPage/ios/WebPageIOS.mm:
272         (WebKit::WebPage::viewportConfigurationChanged):
273         (WebKit::WebPage::updateVisibleContentRects):
274
275 2014-03-26  Anders Carlsson  <andersca@apple.com>
276
277         Add a _WKScriptWorld class
278         https://bugs.webkit.org/show_bug.cgi?id=130817
279
280         Reviewed by Dan Bernstein.
281
282         * UIProcess/API/Cocoa/_WKScriptWorld.h: Added.
283         * UIProcess/API/Cocoa/_WKScriptWorld.mm: Added.
284         (generateWorldID):
285         (+[_WKScriptWorld defaultWorld]):
286         (-[_WKScriptWorld init]):
287         (-[_WKScriptWorld _initWithWorldID:]):
288         * WebKit2.xcodeproj/project.pbxproj:
289
290 2014-03-26  Anders Carlsson  <andersca@apple.com>
291
292         Rename a delegate method to -webView:didFinishNavigation:
293         https://bugs.webkit.org/show_bug.cgi?id=130814
294
295         Reviewed by Sam Weinig.
296
297         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
298         * UIProcess/Cocoa/NavigationState.h:
299         * UIProcess/Cocoa/NavigationState.mm:
300         (WebKit::NavigationState::setNavigationDelegate):
301         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
302
303 2014-03-26  Tim Horton  <timothy_horton@apple.com>
304
305         [iOS WebKit2] Crashes on swipe
306         <rdar://problem/16440867>
307
308         Reviewed by Benjamin Poulain.
309
310         * UIProcess/ios/ViewGestureControllerIOS.mm:
311         (WebKit::ViewGestureController::beginSwipeGesture):
312         Get the IOSurfaceRef from the WebCore::IOSurface.
313
314 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
315
316         Fix the build: include UIKit headers inside the iOS #ifdef.
317
318         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
319
320 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
321
322         Hook up -webkit-overflow-scrolling:touch for iOS WK2
323         https://bugs.webkit.org/show_bug.cgi?id=130809
324
325         Reviewed by Tim Horton.
326
327         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
328         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
329         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
330         Set the content size of the UIScrollVIew based on the geometry.
331         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
332         (WebKit::RemoteLayerTreeHost::createLayer): Make a UIScrollView if the
333         layer properties tell us that we have the scrolling behavior.
334         * UIProcess/ios/WKContentView.mm:
335         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
336         We need to allow user interaction in the _rootContentView so that events get to
337         nested UIScrollViews (this could be optimized in future).
338         * UIProcess/mac/RemoteLayerTreeHost.h:
339         * UIProcess/mac/RemoteLayerTreeHost.mm:
340         (WebKit::RemoteLayerTreeHost::updateLayerTree):
341         (WebKit::RemoteLayerTreeHost::createLayer): Need to pass RemoteLayerTreeTransaction::LayerProperties
342         in so we can get at the custom behavior.
343
344 2014-03-26  Anders Carlsson  <andersca@apple.com>
345
346         Add -[WKWebView stopLoading]
347         https://bugs.webkit.org/show_bug.cgi?id=130812
348
349         Reviewed by Tim Horton.
350
351         * UIProcess/API/Cocoa/WKWebView.h:
352         * UIProcess/API/Cocoa/WKWebView.mm:
353         (-[WKWebView stopLoading]):
354
355 2014-03-26  Tim Horton  <timothy_horton@apple.com>
356
357         Assertion failure in RemoteLayerBackingStore::flush
358         https://bugs.webkit.org/show_bug.cgi?id=130810
359         <rdar://problem/16439276>
360
361         Reviewed by Simon Fraser.
362
363         * Shared/mac/RemoteLayerBackingStore.mm:
364         (RemoteLayerBackingStore::flush):
365         We don't always have backing store to flush, if platformCALayerDrawsContent() is false.
366         We also can't assert that we have a back surface, because the very first paint will not.
367
368 2014-03-26  Andy Estes  <aestes@apple.com>
369
370         [Cocoa] Expose DownloadClient::didFail() and DownloadClient::didCancel()
371         https://bugs.webkit.org/show_bug.cgi?id=130805
372
373         Reviewed by Dan Bernstein.
374
375         * UIProcess/API/Cocoa/_WKDownloadDelegate.h:
376         * UIProcess/Cocoa/DownloadClient.h:
377         * UIProcess/Cocoa/DownloadClient.mm:
378         (WebKit::DownloadClient::DownloadClient):
379         (WebKit::DownloadClient::didFail):
380         (WebKit::DownloadClient::didCancel):
381
382 2014-03-26  Cody Krieger  <cjk@apple.com>
383
384         -[WKWebProcessPlugInNodeHandle HTMLInputElementIsUserEdited] and -HTMLTextAreaElementIsUserEdited do not return the correct values.
385
386         https://bugs.webkit.org/show_bug.cgi?id=130804
387
388         Reviewed by Dan Bernstein.
389
390         The existing implementations of these methods are mis-cased
391         ("HTMLInputELementIsUserEdited" and "HTMLTextAreaELementIsUserEdited" —
392         note the "EL" in both cases). This results in us getting
393         auto-synthesized getters for the HTMLInputElementIsUserEdited and
394         HTMLTextAreaElementIsUserEdited properties, which will return NO
395         unconditionally.
396
397         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
398         Fix the capitalization of -HTMLInputElementIsUserEdited and
399         -HTMLTextAreaElementIsUserEdited.
400
401 2014-03-26  Andy Estes  <aestes@apple.com>
402
403         [Cocoa] Expose DownloadProxy::cancel()
404         https://bugs.webkit.org/show_bug.cgi?id=130799
405
406         Reviewed by Dan Bernstein.
407
408         * UIProcess/API/Cocoa/_WKDownload.h:
409         * UIProcess/API/Cocoa/_WKDownload.mm:
410         (-[_WKDownload cancel]):
411
412 2014-03-26  Timothy Hatcher  <timothy@apple.com>
413
414         Propagate the hiddenFromInspector flag on ResourceRequest in
415         places when a new request a made or passed between processes.
416
417         https://bugs.webkit.org/show_bug.cgi?id=130741
418
419         Reviewed by Joseph Pecoraro.
420
421         * NetworkProcess/NetworkResourceLoader.cpp:
422         (WebKit::NetworkResourceLoader::continueWillSendRequest): Use updateFromDelegatePreservingOldProperties.
423         * Shared/WebCoreArgumentCoders.cpp:
424         (IPC::ArgumentCoder<ResourceRequest>::encode): Added hiddenFromInspector support.
425         (IPC::ArgumentCoder<ResourceRequest>::decode): Ditto.
426         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
427         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): Ditto.
428
429 2014-03-26  Andy Estes  <aestes@apple.com>
430
431         [Cocoa] Expose DownloadProxy::request()
432         https://bugs.webkit.org/show_bug.cgi?id=130796
433
434         Reviewed by Anders Carlsson.
435
436         * UIProcess/API/Cocoa/_WKDownload.h:
437         * UIProcess/API/Cocoa/_WKDownload.mm:
438         (-[_WKDownload request]):
439
440 2014-03-26  Anders Carlsson  <andersca@apple.com>
441
442         Pass a real FrameLoadRequest to Chrome::createWindow
443         https://bugs.webkit.org/show_bug.cgi?id=130795
444
445         Reviewed by Dan Bernstein.
446
447         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
448         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
449
450 2014-03-26  Jeremy Jones  <jeremyj@apple.com>
451
452         Implement hasLiveStreamingContent property in WebAVPlayerController
453         https://bugs.webkit.org/show_bug.cgi?id=128684
454
455         Reviewed by Simon Fraser.
456
457         Plumb through the seekable ranges to the fullscreen interface.
458
459         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
460         Add declaration for setSeekableRangesVector()
461
462         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
463         Add interface SetSeekableRangesVector()
464
465         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
466         (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
467         Add setSeekableRangesVector that translates the vector into a TimeRanges and calls setSeekableRanges()
468
469         * WebProcess/ios/WebVideoFullscreenManager.h:
470         Add setSeekableRanges()
471
472         * WebProcess/ios/WebVideoFullscreenManager.mm:
473         (WebKit::WebVideoFullscreenManager::setSeekableRanges):
474         setSeekableRanges() converts TimeRanges to Vector and calls SetSeekableRangesVector()
475
476 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
477
478         Add a custom behavior flag to GraphicsLayer, piped down to PlatformCALayer, for scrolling layers
479         https://bugs.webkit.org/show_bug.cgi?id=130778
480
481         Reviewed by Tim Horton.
482
483         Make it possible to put a "custom behavior" flag on a layer so that,
484         with UI-side compositing, we know to create a specific type of
485         layer or view for that GraphicsLayer.
486
487         * Shared/mac/RemoteLayerTreeTransaction.h:
488         * Shared/mac/RemoteLayerTreeTransaction.mm:
489         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
490         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
491         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
492         (WebKit::dumpChangedLayers):
493         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
494         (PlatformCALayerRemote::customBehavior):
495         (PlatformCALayerRemote::updateCustomBehavior):
496         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
497
498 2014-03-26  Zoltan Horvath  <zoltan@webkit.org>
499
500         [CSS Shapes] Remove shape-inside support
501         https://bugs.webkit.org/show_bug.cgi?id=130698
502
503         Reviewed by David Hyatt.
504
505         * Configurations/FeatureDefines.xcconfig:
506
507 2014-03-26  Tim Horton  <timothy_horton@apple.com>
508
509         [iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
510         https://bugs.webkit.org/show_bug.cgi?id=130768
511         <rdar://problem/16421471>
512
513         Reviewed by Simon Fraser.
514
515         * Shared/mac/RemoteLayerBackingStore.h:
516         Add flush(), which synchronously flushes painting operations on the underlying backing store.
517         Factor clearBackingStore() out of ensureBackingStore/display, which releases our reference to underlying backing store.
518         Add two members for storing the back surface and front buffer context until flush() is called.
519                 - We need to keep the back surface alive because the CGImageRef created from it is referenced by
520                 the front surface's drawing queue, and won't be freed until said queue is flushed. If we release
521                 the back surface (and its associated CGContextRef) *before* the CGImageRef is freed, we will
522                 do an expensive readback of the surface.
523                 - When not using accelerated drawing, we need to keep the front buffer's CGContextRef around
524                 until the flush occurs so that we can avoid re-creating it in order to perform the flush. This
525                 happens automatically in the accelerated drawing case via WebCore::IOSurface.
526
527         * Shared/mac/RemoteLayerBackingStore.mm:
528         (RemoteLayerBackingStore::ensureBackingStore):
529         (RemoteLayerBackingStore::clearBackingStore):
530         (RemoteLayerBackingStore::display):
531         Factor clearBackingStore() out of ensureBackingStore() and display().
532         Update a comment about the above performance gotcha.
533         Store the current back surface/front buffer context.
534
535         (RemoteLayerBackingStore::drawInContext):
536         Don't flush the context immediately after painting.
537
538         (RemoteLayerBackingStore::applyBackingStoreToLayer):
539         Move things around to reduce duplicated code.
540
541         (RemoteLayerBackingStore::flush):
542         Flush the current front surface/buffer's context.
543         Clear the new pending-flush members.
544
545         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
546         (WebKit::flushBackingStoreChangesInTransaction):
547         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
548         Crawl through all of the valid changed backing stores in the transaction and flush them.
549         Remove a completely useless assertion.
550
551 2014-03-25  Simon Fraser  <simon.fraser@apple.com>
552
553         Add a new type of scrolling tree node for overflow scrolling
554         https://bugs.webkit.org/show_bug.cgi?id=130763
555
556         Reviewed by Tim Horton.
557
558         Prepare for overflow scrolling via the scrolling tree by adding
559         a new scrolling node type for overflow:scroll nodes. Mostly
560         this is a new ScrollingNodeType that gets mapped to the same
561         scrolling state nodes and scrolling nodes, but iOS creates
562         state and scrolling nodes specific to overflow:scroll.
563         
564         Change the type checking on nodes to use virtual functions instead
565         of just checking the node type, to allow the macros to work with
566         the new scrolling node type.
567
568         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
569         (WebKit::encodeNodeAndDescendants):
570         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
571         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
572         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
573         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
574         (WebKit::RemoteScrollingTree::createNode):
575         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
576         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
577         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
578         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
579         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
580         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
581         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
582         * WebKit2.xcodeproj/project.pbxproj:
583
584 2014-03-26  Zan Dobersek  <zdobersek@igalia.com>
585
586         Unreviewed. Removing the remaining Automake cruft.
587
588         * GNUmakefile.list.am: Removed.
589
590 2014-03-25  Pratik Solanki  <psolanki@apple.com>
591
592         Remove PLATFORM(IOS) from NetworkProcessMac.mm
593         https://bugs.webkit.org/show_bug.cgi?id=130751
594
595         Reviewed by Alexey Proskuryakov.
596
597         Code in NetworkProcessMac.mm is guarded by PLATFORM(MAC) and so is not compiled on iOS.
598         Having PLATFORM(IOS) code in this file is unnecessary and confusing.
599
600         * NetworkProcess/mac/NetworkProcessMac.mm:
601         (WebKit::NetworkProcess::initializeProcessName):
602         (WebKit::overrideSystemProxies):
603         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
604
605 2014-03-25  Anders Carlsson  <andersca@apple.com>
606
607         Add a UI delegate callback for handling window.open
608         https://bugs.webkit.org/show_bug.cgi?id=130757
609
610         Reviewed by Sam Weinig.
611
612         * UIProcess/API/Cocoa/WKUIDelegate.h:
613         * UIProcess/API/Cocoa/WKWebView.mm:
614         * UIProcess/API/Cocoa/WKWebViewInternal.h:
615         * UIProcess/Cocoa/UIClient.h:
616         * UIProcess/Cocoa/UIClient.mm:
617         (WebKit::UIClient::setDelegate):
618         (WebKit::UIClient::createNewPage):
619
620 2014-03-25  Anders Carlsson  <andersca@apple.com>
621
622         Move stopLoading: back for now.
623
624         * UIProcess/API/Cocoa/WKWebView.h:
625         * UIProcess/API/Cocoa/WKWebView.mm:
626         (-[WKWebView stopLoading:]):
627
628 2014-03-25  Anders Carlsson  <andersca@apple.com>
629
630         Change toolbarVisibility back to toolbarsVisibility
631         https://bugs.webkit.org/show_bug.cgi?id=130749
632
633         Reviewed by Tim Horton.
634
635         * UIProcess/API/Cocoa/WKWindowFeatures.h:
636         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
637         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
638
639 2014-03-25  Anders Carlsson  <andersca@apple.com>
640
641         Pass the source frame to the CreateNewPage message
642         https://bugs.webkit.org/show_bug.cgi?id=130752
643
644         Reviewed by Tim Horton.
645
646         * UIProcess/API/APIUIClient.h:
647         (API::UIClient::createNewPage):
648         * UIProcess/API/C/WKPage.cpp:
649         (WKPageSetPageUIClient):
650         * UIProcess/WebPageProxy.cpp:
651         (WebKit::WebPageProxy::createNewPage):
652         * UIProcess/WebPageProxy.h:
653         * UIProcess/WebPageProxy.messages.in:
654         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
655         (WebKit::WebChromeClient::createWindow):
656
657 2014-03-25  Anders Carlsson  <andersca@apple.com>
658
659         Add a WebFrame::fromCoreFrame static member function and use it where possible
660         https://bugs.webkit.org/show_bug.cgi?id=130744
661
662         Reviewed by Tim Horton.
663
664         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
665         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
666         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
667         (WebKit::InjectedBundleNodeHandle::documentFrame):
668         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
669         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
670         * WebProcess/InjectedBundle/InjectedBundle.cpp:
671         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
672         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
673         (WebKit::InjectedBundleDOMWindowExtension::frame):
674         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
675         (WebKit::InjectedBundleHitTestResult::frame):
676         (WebKit::InjectedBundleHitTestResult::targetFrame):
677         * WebProcess/Plugins/PluginView.cpp:
678         (WebKit::webPage):
679         (WebKit::PluginView::performFrameLoadURLRequest):
680         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
681         (WebKit::WebChromeClient::focusedElementChanged):
682         (WebKit::WebChromeClient::focusedFrameChanged):
683         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
684         (WebKit::WebChromeClient::runJavaScriptAlert):
685         (WebKit::WebChromeClient::runJavaScriptConfirm):
686         (WebKit::WebChromeClient::runJavaScriptPrompt):
687         (WebKit::WebChromeClient::print):
688         (WebKit::WebChromeClient::exceededDatabaseQuota):
689         (WebKit::WebChromeClient::runOpenPanel):
690         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
691         (WebKit::WebEditorClient::textFieldDidBeginEditing):
692         (WebKit::WebEditorClient::textFieldDidEndEditing):
693         (WebKit::WebEditorClient::textDidChangeInTextField):
694         (WebKit::WebEditorClient::textDidChangeInTextArea):
695         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
696         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
697         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
698         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
699         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
700         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
701         * WebProcess/WebPage/WebFrame.cpp:
702         (WebKit::WebFrame::fromCoreFrame):
703         (WebKit::WebFrame::contentsAsString):
704         (WebKit::WebFrame::parentFrame):
705         (WebKit::WebFrame::childFrames):
706         (WebKit::WebFrame::frameForContext):
707         (WebKit::WebFrame::webArchiveData):
708         * WebProcess/WebPage/WebFrame.h:
709
710 2014-03-25  Jeffrey Pfau  <jpfau@apple.com>
711
712         [WK2] Schemes registered as cache partitioned are not properly registered in new web processes
713         https://bugs.webkit.org/show_bug.cgi?id=130739
714
715         Reviewed by Anders Carlsson.
716
717         * WebProcess/WebProcess.cpp:
718         (WebKit::WebProcess::initializeWebProcess):
719
720 2014-03-25  Joseph Pecoraro  <pecoraro@apple.com>
721
722         [iOS] Inspector View Indication Support
723         https://bugs.webkit.org/show_bug.cgi?id=130709
724
725         Reviewed by Simon Fraser.
726
727         * UIProcess/ios/WKContentView.h:
728         * UIProcess/ios/WKContentView.mm:
729         (-[WKInspectorIndicationView initWithFrame:]):
730         (-[WKContentView isShowingInspectorIndication]):
731         (-[WKContentView setShowingInspectorIndication:]):
732         (-[WKContentView _didCommitLayerTree:WebKit::]):
733         When indicating include a simple tinted UIView over the content.
734
735         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
736         * UIProcess/API/Cocoa/WKWebView.mm:
737         (-[WKWebView _showInspectorIndication]):
738         (-[WKWebView _hideInspectorIndication]):
739         Have the content view show or hide an indication.
740
741         * UIProcess/PageClient.h:
742         * UIProcess/ios/PageClientImplIOS.h:
743         * UIProcess/ios/PageClientImplIOS.mm:
744         (WebKit::PageClientImpl::showInspectorIndication):
745         (WebKit::PageClientImpl::hideInspectorIndication):
746         * UIProcess/WebPageProxy.h:
747         * UIProcess/WebPageProxy.messages.in:
748         * UIProcess/ios/WebPageProxyIOS.mm:
749         (WebKit::WebPageProxy::showInspectorIndication):
750         (WebKit::WebPageProxy::hideInspectorIndication):
751         Pass WebProcess indication message up to the WKWebView.
752
753         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
754         (WebKit::WebInspectorClient::indicate):
755         (WebKit::WebInspectorClient::hideIndication):
756         * WebProcess/WebCoreSupport/WebInspectorClient.h:
757         * WebProcess/WebPage/WebPage.h:
758         * WebProcess/WebPage/ios/WebPageIOS.mm:
759         (WebKit::WebPage::indicate):
760         (WebKit::WebPage::hideIndication):
761         Pass WebCore / remote inspector indication message up to UIProcess.
762
763 2014-03-25  Anders Carlsson  <andersca@apple.com>
764
765         Add more properties to WKWindowFeatures
766         https://bugs.webkit.org/show_bug.cgi?id=130738
767
768         Reviewed by Tim Horton.
769
770         * UIProcess/API/Cocoa/WKWindowFeatures.h:
771         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
772         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
773         (-[WKWindowFeatures menuBarVisibility]):
774         (-[WKWindowFeatures statusBarVisibility]):
775         (-[WKWindowFeatures toolbarsVisibility]):
776         (-[WKWindowFeatures allowsResizing]):
777
778 2014-03-25  Anders Carlsson  <andersca@apple.com>
779
780         Fix iOS build.
781
782         * UIProcess/API/Cocoa/WKWebView.h:
783         * UIProcess/API/Cocoa/WKWebView.mm:
784         Make WKIBActions OS X only for now.
785
786 2014-03-25  Anders Carlsson  <andersca@apple.com>
787
788         Begin stubbing out a WKWindowFeatures class
789         https://bugs.webkit.org/show_bug.cgi?id=130733
790
791         Reviewed by Dan Bernstein.
792
793         * UIProcess/API/Cocoa/WKWindowFeatures.h: Added.
794         * UIProcess/API/Cocoa/WKWindowFeatures.mm: Added.
795         (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
796         (-[WKWindowFeatures x]):
797         (-[WKWindowFeatures y]):
798         (-[WKWindowFeatures width]):
799         (-[WKWindowFeatures height]):
800         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Added.
801         * WebKit2.xcodeproj/project.pbxproj:
802
803 2014-03-25  Anders Carlsson  <andersca@apple.com>
804
805         Add goBack: and goForward: IBActions and move stopLoading: to a new WKIBActions category on WKWebView
806         https://bugs.webkit.org/show_bug.cgi?id=130732
807
808         Reviewed by Tim Horton.
809
810         * UIProcess/API/Cocoa/WKWebView.h:
811         * UIProcess/API/Cocoa/WKWebView.mm:
812         (-[WKWebView goBack]):
813         (-[WKWebView goForward]):
814         (-[WKWebView validateUserInterfaceItem:]):
815         (-[WKWebView goBack:]):
816         (-[WKWebView goForward:]):
817         (-[WKWebView stopLoading:]):
818
819 2014-03-25  Martin Robinson  <mrobinson@igalia.com>
820
821         [GTK] Remove the autotools build
822         https://bugs.webkit.org/show_bug.cgi?id=130717
823
824         Reviewed by Anders Carlsson.
825
826         * GNUmakefile.am: Removed.
827         * WebKit2Prefix.h: Removed references to the autotools configure file.
828         * config.h: Ditto.
829
830 2014-03-25  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
831
832         [EFL][WK2] Add NETWORK_PROCESS build option
833         https://bugs.webkit.org/show_bug.cgi?id=130131
834
835         Reviewed by Gyuyoung Kim.
836
837         * PlatformEfl.cmake: Add file needed to build with NETWORK_PROCESS enabled.
838
839 2014-03-24 Michał Pakuła vel Rutka  <m.pakula@samsung.com>
840
841         [EFL][WK2] Add an API to set process model
842         https://bugs.webkit.org/show_bug.cgi?id=130133
843
844         Reviewed by Gyuyoung Kim.
845
846         Implement an API to set and get process model in ewk_context.
847         By default process model enum value is set to EWK_PROCESS_MODEL_SHARED_SECONDARY
848         which keeps current behaviour. Setting EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
849         will make each web view use separate web process, also enables network process.
850
851         * UIProcess/API/efl/ewk_context.cpp:
852         (toWKProcessModel):
853         (EwkContext::setProcessModel):
854         (toEwkProcessModel):
855         (EwkContext::processModel):
856         (ewk_context_process_model_set):
857         (ewk_context_process_model_get):
858         * UIProcess/API/efl/ewk_context.h:
859         * UIProcess/API/efl/ewk_context_private.h:
860         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
861         (TEST_F):
862
863 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
864
865         AX: hit-testing doesn't always work correctly with WK2
866         https://bugs.webkit.org/show_bug.cgi?id=130706
867
868         Reviewed by Simon Fraser.
869
870         Accessibility code was trying to do screenToRootView itself, and in 
871         some cases with embedded WK2 views that did not work.
872
873         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
874         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
875
876 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
877
878         [WK2] SpinLock are not initialized by default, ViewUpdateDispatcher is missing an initializer
879         https://bugs.webkit.org/show_bug.cgi?id=130705
880
881         Reviewed by Simon Fraser.
882
883         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
884         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
885
886 2014-03-24  Enrica Casucci  <enrica@apple.com>
887
888         [iOS WebKit2] Dictation support.
889         https://bugs.webkit.org/show_bug.cgi?id=130622
890         <rdar://problem/15337316>
891
892         Reviewed by Benjamin Poulain.
893
894         Adding support for dictation on iOS. There are two main types of interactions
895         with the dictation system:
896         - initial request for context, which consists in retrieving the selected text
897         and 5 words before the selection and 5 words after, if available.
898         - insertion of recognized chunks of text, providing the text
899         to replace.
900     
901         * UIProcess/AutoCorrectionCallback.h:
902         (WebKit::DictationContextCallback::create):
903         (WebKit::DictationContextCallback::~DictationContextCallback):
904         (WebKit::DictationContextCallback::performCallbackWithReturnValue):
905         (WebKit::DictationContextCallback::invalidate):
906         (WebKit::DictationContextCallback::DictationContextCallback):
907         * UIProcess/WebPageProxy.h:
908         * UIProcess/WebPageProxy.messages.in:
909         * UIProcess/ios/WKContentViewInteraction.h:
910         * UIProcess/ios/WKContentViewInteraction.mm:
911         (-[WKContentView replaceDictatedText:withText:]):
912         (-[WKContentView requestDictationContext:]):
913         * UIProcess/ios/WebPageProxyIOS.mm:
914         (WebKit::WebPageProxy::dictationContextCallback):
915         (WebKit::WebPageProxy::replaceDictatedText):
916         (WebKit::WebPageProxy::requestDictationContext):
917         * WebProcess/WebPage/WebPage.h:
918         * WebProcess/WebPage/WebPage.messages.in:
919         * WebProcess/WebPage/ios/WebPageIOS.mm:
920         (WebKit::WebPage::requestDictationContext):
921         (WebKit::WebPage::replaceDictatedText):
922
923 2014-03-24  Andy Estes  <aestes@apple.com>
924
925         Yet another iOS build fix, for the 32-bit build this time.
926
927         * Shared/Downloads/ios/DownloadIOS.mm:
928         (WebKit::setUpDownloadClient):
929
930 2014-03-24  Tim Horton  <timothy_horton@apple.com>
931
932         REGRESSION (r165872): Double-applying device scale to snapshots
933         https://bugs.webkit.org/show_bug.cgi?id=130697
934         <rdar://problem/16396629>
935
936         Reviewed by Simon Fraser.
937
938         * WebProcess/WebPage/WebPage.cpp:
939         (WebKit::WebPage::scaledSnapshotWithOptions):
940         Drive-by, make scaledSnapshotWithOptions respect SnapshotOptionsExcludeDeviceScaleFactor.
941
942         (WebKit::WebPage::snapshotAtSize):
943         Divide the device scale out of the scale factor
944
945         * WebProcess/WebPage/WebPage.h:
946         Rename the scale argument to scaledSnapshotWithOptions to clarify
947         that it is an additional scale on top of the device scale.
948
949 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
950
951         Activate WebVTT Tests Once Merging is Complete
952         https://bugs.webkit.org/show_bug.cgi?id=130420
953
954         Reviewed by Eric Carlson.
955
956         * Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
957
958 2014-03-24  Andy Estes  <aestes@apple.com>
959
960         Fix the iOS build.
961
962         * Shared/Downloads/ios/DownloadIOS.mm:
963         (WebKit::setUpDownloadClient):
964         * UIProcess/Cocoa/DownloadClient.mm:
965
966 2014-03-24  Mark Rowe  <mrowe@apple.com>
967
968         Build fix after r166186.
969
970         * UIProcess/Cocoa/DownloadClient.mm:
971
972 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
973
974         [WK2] Make updates on ViewUpdateDispatcher less heavy
975         https://bugs.webkit.org/show_bug.cgi?id=130626
976
977         Reviewed by Darin Adler.
978
979         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
980         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
981         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
982         * WebProcess/WebPage/ViewUpdateDispatcher.h:
983
984 2014-03-24  Benjamin Poulain  <bpoulain@apple.com>
985
986         [iOS][WK2] Micro-optimize view state updates on the UIProcess side
987         https://bugs.webkit.org/show_bug.cgi?id=130631
988
989         Reviewed by Darin Adler.
990
991         * UIProcess/API/Cocoa/WKWebView.mm:
992         (contentZoomScale):
993         [UIScrollView zoomScale] is not fast enough for -[WKWebView _updateVisibleContentRects]. Since we know what the zoom view is,
994         make a fast version hardcoding that.
995
996         (-[WKWebView _updateScrollViewBackground]):
997         (-[WKWebView _zoomToPoint:WebCore::atScale:]):
998         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
999         (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
1000         (-[WKWebView _updateVisibleContentRects]):
1001         * UIProcess/ios/WKContentView.mm:
1002         (fixedPositionRectFromExposedRect):
1003         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1004
1005 2014-03-24  Dean Jackson  <dino@apple.com>
1006
1007         Remove WebGL asset entitlement
1008         https://bugs.webkit.org/show_bug.cgi?id=130685
1009
1010         Reviewed by Simon Fraser.
1011
1012         No longer necessary on iOS.
1013
1014         * Configurations/WebContent-iOS.entitlements:
1015
1016 2014-03-24  Andy Estes  <aestes@apple.com>
1017
1018         [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
1019         https://bugs.webkit.org/show_bug.cgi?id=129322
1020
1021         Reviewed by Anders Carlsson.
1022
1023         Based on an original patch by Yongjun Zhang  <yongjun_zhang@apple.com>.
1024
1025         * Shared/Cocoa/APIObject.mm:
1026         (API::Object::newObject):
1027         * Shared/Downloads/ios/DownloadIOS.mm:
1028         (WebKit::dispatchOnMainThread):
1029         (WebKit::toDownload):
1030         (WebKit::setUpDownloadClient):
1031         (WebKit::Download::startWithHandle):
1032         * UIProcess/API/APIDownloadClient.h:
1033         (API::DownloadClient::~DownloadClient):
1034         * UIProcess/API/C/WKContext.cpp:
1035         (WKContextSetDownloadClient):
1036         * UIProcess/API/Cocoa/WKProcessPool.mm:
1037         (-[WKProcessPool _downloadDelegate]):
1038         (-[WKProcessPool _setDownloadDelegate:]):
1039         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1040         * UIProcess/API/Cocoa/_WKDownload.h: Added.
1041         * UIProcess/API/Cocoa/_WKDownload.mm: Added.
1042         (WebKit::wrapper):
1043         (WebKit::createAPIDownloadClient):
1044         (-[_WKDownload dealloc]):
1045         (-[_WKDownload API::]):
1046         * UIProcess/API/Cocoa/_WKDownloadDelegate.h: Added.
1047         * UIProcess/API/Cocoa/_WKDownloadInternal.h: Added.
1048         * UIProcess/Cocoa/DownloadClient.h: Added.
1049         * UIProcess/Cocoa/DownloadClient.mm: Added.
1050         * WebKit2.xcodeproj/project.pbxproj:
1051
1052 2014-03-24  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
1053
1054         [EFL][WK2] Buildfix after r166159.
1055
1056         Reviewed by Csaba Osztrogonác.
1057
1058         * UIProcess/API/efl/ewk_settings.cpp:
1059         (ewk_settings_file_access_from_file_urls_allowed_set):
1060         (ewk_settings_file_access_from_file_urls_allowed_get):
1061
1062 2014-03-24  Jinwoo Song  <jinwoo7.song@samsung.com>
1063
1064         [EFL][WK2] Use C API inside ewk_settings
1065         https://bugs.webkit.org/show_bug.cgi?id=107820
1066
1067         Reviewed by Gyuyoung Kim.
1068
1069         Use C API inside ewk_settings instead of accessing directly
1070         internal C++ classes, to avoid violating API layering.
1071
1072         Original-author: Christophe Dumez <ch.dumez@sisa.samsung.com>
1073
1074         * UIProcess/API/efl/EwkView.cpp:
1075         (EwkView::EwkView):
1076         * UIProcess/API/efl/ewk_settings.cpp:
1077         (ewk_settings_fullscreen_enabled_set):
1078         (ewk_settings_fullscreen_enabled_get):
1079         (ewk_settings_javascript_enabled_set):
1080         (ewk_settings_javascript_enabled_get):
1081         (ewk_settings_loads_images_automatically_set):
1082         (ewk_settings_loads_images_automatically_get):
1083         (ewk_settings_developer_extras_enabled_set):
1084         (ewk_settings_developer_extras_enabled_get):
1085         (ewk_settings_file_access_from_file_urls_allowed_set):
1086         (ewk_settings_file_access_from_file_urls_allowed_get):
1087         (ewk_settings_frame_flattening_enabled_set):
1088         (ewk_settings_frame_flattening_enabled_get):
1089         (ewk_settings_dns_prefetching_enabled_set):
1090         (ewk_settings_dns_prefetching_enabled_get):
1091         (ewk_settings_encoding_detector_enabled_set):
1092         (ewk_settings_encoding_detector_enabled_get):
1093         (ewk_settings_preferred_minimum_contents_width_set):
1094         (ewk_settings_preferred_minimum_contents_width_get):
1095         (ewk_settings_offline_web_application_cache_enabled_set):
1096         (ewk_settings_offline_web_application_cache_enabled_get):
1097         (ewk_settings_scripts_can_open_windows_set):
1098         (ewk_settings_scripts_can_open_windows_get):
1099         (ewk_settings_local_storage_enabled_set):
1100         (ewk_settings_local_storage_enabled_get):
1101         (ewk_settings_plugins_enabled_set):
1102         (ewk_settings_plugins_enabled_get):
1103         (ewk_settings_default_font_size_set):
1104         (ewk_settings_default_font_size_get):
1105         (ewk_settings_private_browsing_enabled_set):
1106         (ewk_settings_private_browsing_enabled_get):
1107         (ewk_settings_text_autosizing_enabled_set):
1108         (ewk_settings_text_autosizing_enabled_get):
1109         (ewk_settings_spatial_navigation_enabled_set):
1110         (ewk_settings_spatial_navigation_enabled_get):
1111         (EwkSettings::setDefaultTextEncodingName):
1112         * UIProcess/API/efl/ewk_settings_private.h:
1113         (EwkSettings::EwkSettings):
1114         (EwkSettings::preferences):
1115
1116 2014-03-24  Zan Dobersek  <zdobersek@igalia.com>
1117
1118         [GTK][WK2] Guard NetscapePluginModule methods used in PluginInfoCache that are specific to X11 architecture
1119         https://bugs.webkit.org/show_bug.cgi?id=130663
1120
1121         Reviewed by Carlos Garcia Campos.
1122
1123         The two used methods are specific to the X11 plugin architecture and are not declared when building for a
1124         Wayland-only configuration. Guarding them prevents build failures, but does not ensure proper functionality
1125         which isn't a problem anyway since there's no support yet for Netscape plugins on Wayland.
1126
1127         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1128         (WebKit::PluginInfoCache::getPluginInfo): Guard NetscapePluginModule::parseMIMEDescription with PLUGIN_ARCHITECTURE(X11).
1129         (WebKit::PluginInfoCache::updatePluginInfo): Ditto for NetscapePluginModule::buildMIMEDescription.
1130
1131 2014-03-24  Ryuan Choi  <ryuan.choi@samsung.com>
1132
1133         [EFL][WK2] Convert some more OwnPtr/PassOwnPtr to std::unique_ptr
1134         https://bugs.webkit.org/show_bug.cgi?id=130662
1135
1136         Reviewed by Gyuyoung Kim.
1137
1138         Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in remained WebKit2/Efl specific code.
1139
1140         * UIProcess/API/efl/EwkView.h:
1141         * UIProcess/API/efl/ewk_cookie_manager.cpp:
1142         * UIProcess/API/efl/ewk_database_manager.cpp:
1143         (getDatabaseOriginsCallback):
1144         * UIProcess/API/efl/ewk_error_private.h:
1145         * UIProcess/efl/DownloadManagerEfl.cpp:
1146         (WebKit::DownloadManagerEfl::didFail):
1147         * UIProcess/efl/InputMethodContextEfl.h:
1148         (WebKit::InputMethodContextEfl::create):
1149         * UIProcess/efl/PageLoadClientEfl.cpp:
1150         (WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
1151         (WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):
1152
1153 2014-03-23  Hyowon Kim  <hw1008.kim@samsung.com>
1154
1155         Move all EFL typedefs into EflTypedefs.h.
1156         https://bugs.webkit.org/show_bug.cgi?id=130511
1157
1158         Reviewed by Gyuyoung Kim.
1159
1160         * Shared/API/c/efl/WKArrayEfl.h: Remove EFL typedefs.
1161         * UIProcess/API/efl/EwkView.h: Ditto.
1162
1163 2014-03-23  Jinwoo Song  <jinwoo7.song@samsung.com>
1164
1165         [WK2] Refine WebKit2 BatteryStatus code
1166         https://bugs.webkit.org/show_bug.cgi?id=130573
1167
1168         Reviewed by Anders Carlsson.
1169
1170         Refinements
1171          - Return PassRef instead of PassRefPtr in create methods
1172          - Use auto instead of iterator
1173
1174         * UIProcess/WebBatteryManagerProxy.cpp:
1175         (WebKit::WebBatteryManagerProxy::create):
1176         * UIProcess/WebBatteryManagerProxy.h:
1177         * UIProcess/efl/BatteryProvider.cpp:
1178         (BatteryProvider::create):
1179         * UIProcess/efl/BatteryProvider.h:
1180         * WebProcess/Battery/WebBatteryManager.cpp:
1181         (WebKit::WebBatteryManager::didChangeBatteryStatus):
1182         (WebKit::WebBatteryManager::updateBatteryStatus):
1183
1184 2014-03-23  Sam Weinig  <sam@webkit.org>
1185
1186         Simplify the HTMLConverter interface (Part 2)
1187         https://bugs.webkit.org/show_bug.cgi?id=130654
1188
1189         Reviewed by Darin Adler.
1190
1191         * WebProcess/WebPage/WebPage.h:
1192         * WebProcess/WebPage/ios/WebPageIOS.mm:
1193         (WebKit::WebPage::performDictionaryLookupForRange):
1194         * WebProcess/WebPage/mac/WebPageMac.mm:
1195         (WebKit::WebPage::getAttributedSubstringFromRange):
1196         (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
1197         (WebKit::WebPage::performDictionaryLookupAtLocation):
1198         (WebKit::WebPage::performDictionaryLookupForSelection):
1199         (WebKit::WebPage::performDictionaryLookupForRange):
1200
1201 2014-03-23  David Kilzer  <ddkilzer@apple.com>
1202
1203         WebKit::resistanceForDelta() truncates 'scaleDistance' to integer value using abs()
1204         <http://webkit.org/b/130651>
1205
1206         Reviewed by Darin Adler.
1207
1208         Fixes the following build failure with trunk clang:
1209
1210             WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
1211                 double scaleDistance = abs(limit - currentScale);
1212                                        ^
1213             WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: note: use function 'fabs' instead
1214                 double scaleDistance = abs(limit - currentScale);
1215                                        ^~~
1216                                        fabs
1217
1218         * UIProcess/mac/ViewGestureControllerMac.mm:
1219         (WebKit::resistanceForDelta): Use fabs() instead of abs().
1220
1221 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
1222
1223         Clean up #includes by geometry classes
1224         https://bugs.webkit.org/show_bug.cgi?id=130645
1225
1226         Reviewed by Andreas Kling.
1227
1228         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
1229         classes brings in a lot of additional headers. Fix by adding a new
1230         GeometryUtilities file so that the basic files don't need Vector,
1231         and including GeometryUtilities.h where necessary.
1232         
1233         Also forward declare PrintStream.h and only bring in the header
1234         in implementation files.
1235
1236         * Shared/UpdateInfo.h:
1237         * UIProcess/BackingStore.h:
1238         * UIProcess/CoordinatedGraphics/PageViewportController.h:
1239         * UIProcess/FindIndicator.cpp:
1240         * UIProcess/mac/WKPrintingView.h:
1241
1242 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
1243
1244         Clean up #includes by geometry classes
1245         https://bugs.webkit.org/show_bug.cgi?id=130645
1246
1247         Reviewed by Andreas Kling.
1248
1249         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
1250         classes brings in a lot of additional headers. Fix by adding a new
1251         GeometryUtilities file so that the basic files don't need Vector,
1252         and including GeometryUtilities.h where necessary.
1253         
1254         Also forward declare PrintStream.h and only bring in the header
1255         in implementation files.
1256
1257         * UIProcess/BackingStore.h:
1258         * UIProcess/FindIndicator.cpp:
1259         * UIProcess/mac/WKPrintingView.h:
1260
1261 2014-03-22  Alexey Proskuryakov  <ap@apple.com>
1262
1263         Assertions in WebPage::rangeFromEditingRange when requested range location is NSNotFound
1264         https://bugs.webkit.org/show_bug.cgi?id=130633
1265         <rdar://problem/16397583>
1266
1267         Reviewed by Darin Adler.
1268
1269         * UIProcess/API/mac/WKView.mm:
1270         (-[WKView firstRectForCharacterRange:completionHandler:]):
1271         (-[WKView firstRectForCharacterRange:actualRange:]):
1272         Return NSZeroRect, like NSTextView does for any locations that are out of bounds.
1273         There is no need for a round trip to WebProcess in this case.
1274
1275 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
1276
1277         [iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
1278         https://bugs.webkit.org/show_bug.cgi?id=130555
1279
1280         Reviewed by Simon Fraser.
1281
1282         * Shared/VisibleContentRectUpdateInfo.cpp:
1283         (WebKit::VisibleContentRectUpdateInfo::encode):
1284         (WebKit::VisibleContentRectUpdateInfo::decode):
1285         * Shared/VisibleContentRectUpdateInfo.h:
1286         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1287         (WebKit::operator==):
1288         * UIProcess/ios/WKContentView.mm:
1289         (WebKit::HistoricalKinematicData::HistoricalKinematicData):
1290         (WebKit::HistoricalKinematicData::velocityForNewData):
1291         (WebKit::HistoricalKinematicData::clear):
1292         (WebKit::HistoricalKinematicData::append):
1293         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1294         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1295         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
1296         * WebProcess/WebPage/ios/WebPageIOS.mm:
1297         (WebKit::WebPage::updateVisibleContentRects):
1298
1299 2014-03-21  Alexey Proskuryakov  <ap@apple.com>
1300
1301         REGRESSION (r165356): Predictive Chinese input is broken
1302         https://bugs.webkit.org/show_bug.cgi?id=130619
1303
1304         Reviewed by Enrica Casucci.
1305
1306         * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::executeKeypressCommands):
1307         Like after insertText, we are no longer in an intermediate state after executeKeypressCommands.
1308         Make sure that we don't call -discardMarkedText the next time we get a non-intermediate
1309         state with closed composition.
1310
1311 2014-03-21  Sam Weinig  <sam@webkit.org>
1312
1313         [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
1314         https://bugs.webkit.org/show_bug.cgi?id=130528
1315
1316         Reviewed by Tim Horton.
1317
1318         * Platform/IPC/Connection.h:
1319         * Platform/IPC/mac/ConnectionMac.cpp:
1320         (IPC::Connection::getAuditToken):
1321         Expose the audit data if available. 
1322
1323         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1324         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
1325         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1326         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
1327         Pass the audit data corresponding to the UIProcess.
1328
1329         * Configurations/Network-iOS.entitlements: Copied from Configurations/WebContent-iOS.entitlements.
1330         * Configurations/NetworkProcess.xcconfig:
1331         * Configurations/NetworkService.Development.xcconfig:
1332         * Configurations/NetworkService.xcconfig:
1333         * Configurations/WebContent-iOS.entitlements:
1334         Add entitlement allowing the audit data to be used.
1335
1336 2014-03-21  Tim Horton  <timothy_horton@apple.com>
1337
1338         Always retrieve the screen scale factor from WKSI
1339         <rdar://problem/16329679>
1340
1341         Reviewed by Sam Weinig.
1342
1343         * UIProcess/ios/WKContentView.mm:
1344         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
1345         (-[WKContentView _updateForScreen:]):
1346         Use WKGetScreenScaleFactor/WKGetScaleFactorForScreen.
1347
1348 2014-03-21  Yongjun Zhang  <yongjun_zhang@apple.com>
1349
1350         [Webkit2] Add APIDownloadClient for download support.
1351         https://bugs.webkit.org/show_bug.cgi?id=130484
1352
1353         Add API::DownloadClient to WebContext and get rid of WebDownloadClient.
1354
1355         Reviewed by Anders Carlsson.
1356
1357         * UIProcess/API/APIDownloadClient.h: Added.
1358         (API::DownloadClient::~DownloadClient):
1359         (API::DownloadClient::didStart):
1360         (API::DownloadClient::didReceiveAuthenticationChallenge):
1361         (API::DownloadClient::didReceiveResponse):
1362         (API::DownloadClient::didReceiveData):
1363         (API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
1364         (API::DownloadClient::decideDestinationWithSuggestedFilename):
1365         (API::DownloadClient::didCreateDestination):
1366         (API::DownloadClient::didFinish):
1367         (API::DownloadClient::didFail):
1368         (API::DownloadClient::didCancel):
1369         (API::DownloadClient::processDidCrash):
1370         * UIProcess/API/C/WKContext.cpp:
1371         (WKContextSetDownloadClient): Move the original WebDownloadClient methods to a local class
1372             DownloadClient and set up the downloadClient for WebContext.
1373         * UIProcess/Downloads/DownloadProxy.cpp:
1374         * UIProcess/WebContext.cpp:
1375         (WebKit::WebContext::setDownloadClient):
1376         * UIProcess/WebContext.h:
1377         (WebKit::WebContext::downloadClient):
1378         * UIProcess/WebDownloadClient.cpp: Removed.
1379         * UIProcess/WebDownloadClient.h: Removed.
1380         * WebKit2.xcodeproj/project.pbxproj:
1381
1382 2014-03-21  Alexey Proskuryakov  <ap@apple.com>
1383
1384         ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
1385         https://bugs.webkit.org/show_bug.cgi?id=130526
1386         <rdar://problem/16371612> 
1387
1388         This was fixed yesterday for sync code path, landing the same this for async one.
1389
1390         * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]):
1391
1392 2014-03-21  Pratik Solanki  <psolanki@apple.com>
1393
1394         Add callbacks in WebKit2 Cocoa API for page load testing
1395         https://bugs.webkit.org/show_bug.cgi?id=130569
1396
1397         Reviewed by Anders Carlsson.
1398
1399         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
1400         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1401         (didFirstVisuallyNonEmptyLayoutForFrame):
1402         (didHandleOnloadEventsForFrame):
1403         (setUpPageLoaderClient):
1404         (willSendRequestForFrame):
1405         (didInitiateLoadForResource):
1406         (didFinishLoadForResource):
1407         (didFailLoadForResource):
1408         (setUpResourceLoadClient):
1409
1410 2014-03-21  Ryuan Choi  <ryuan.choi@samsung.com>
1411
1412         [EFL][WK2] Remove Ewk_Error parameter from some async callbacks
1413         https://bugs.webkit.org/show_bug.cgi?id=130567
1414
1415         Reviewed by Gyuyoung Kim.
1416
1417         WebKit2 internally uses GenericCallbacks for several APIs such as WKKeyValueStorageManagerGetKeyValueStorageOrigins.
1418         But only few callbacks really return errors.
1419
1420         This patch removes Ewk_Error parameters from these callbacks not to make
1421         the confusion for application developers.
1422
1423         * UIProcess/API/efl/ewk_cookie_manager.cpp:
1424         (getAcceptPolicyCallback):
1425         (getHostnamesWithCookiesCallback):
1426         * UIProcess/API/efl/ewk_cookie_manager.h:
1427         * UIProcess/API/efl/ewk_database_manager.cpp:
1428         (getDatabaseOriginsCallback):
1429         * UIProcess/API/efl/ewk_database_manager.h:
1430         * UIProcess/API/efl/ewk_storage_manager.cpp:
1431         (getStorageOriginsCallback):
1432         * UIProcess/API/efl/ewk_storage_manager.h:
1433         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
1434         (EWK2CookieManagerTest::getAcceptPolicyCallback):
1435         (EWK2CookieManagerTest::getHostnamesWithCookiesCallback):
1436         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
1437         (EWK2DatabaseManagerTest::databaseOriginsCallback):
1438         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
1439         (EWK2StorageManagerTest::getStorageOriginsCallback):
1440
1441 2014-03-21  Darin Adler  <darin@apple.com>
1442
1443         Improve idiom used for string building in a few places
1444         https://bugs.webkit.org/show_bug.cgi?id=130561
1445
1446         Reviewed by Andreas Kling.
1447
1448         * Shared/mac/ChildProcessMac.mm:
1449         (WebKit::ChildProcess::initializeSandbox): Use a more efficient idiom for string
1450         concatenation.
1451
1452         * UIProcess/WebInspectorProxy.cpp:
1453         (WebKit::WebInspectorProxy::createInspectorPage): Use a StringBuilder.
1454
1455 2014-03-20  Hyowon Kim  <hw1008.kim@samsung.com>
1456
1457         Move to using std::unique_ptr for EFL objects.
1458         https://bugs.webkit.org/show_bug.cgi?id=129853
1459
1460         Reviewed by Gyuyoung Kim.
1461
1462         EflUniquePtr is a template alias of std::unique_ptr
1463         with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
1464         This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
1465
1466         * Platform/Module.h:
1467         * Platform/efl/ModuleEfl.cpp:
1468         (WebKit::Module::load):
1469         * UIProcess/API/efl/EwkView.cpp:
1470         (EwkView::EwkView):
1471         * UIProcess/API/efl/EwkView.h:
1472         * UIProcess/efl/InputMethodContextEfl.cpp:
1473         (WebKit::InputMethodContextEfl::InputMethodContextEfl):
1474         (WebKit::InputMethodContextEfl::createIMFContext):
1475         * UIProcess/efl/InputMethodContextEfl.h:
1476         (WebKit::InputMethodContextEfl::create):
1477
1478 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1479
1480         [EFL][GTK] Get CMake to find Freetype2 properly
1481         https://bugs.webkit.org/show_bug.cgi?id=130150
1482
1483         Reviewed by Martin Robinson.
1484
1485         Newer versions of CMake are not able to find Freetype2 correctly.
1486         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
1487         freetype2 repo, because a completely different version number is found in freetype2.pc.
1488
1489         * PlatformEfl.cmake:
1490
1491 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
1492
1493         [GTK] Suppress errors about using gdk_threads_enter gdk_threads_leave
1494         https://bugs.webkit.org/show_bug.cgi?id=130517
1495
1496         Reviewed by Sergio Villar Senin.
1497
1498         * UIProcess/API/gtk/WebKitWebView.cpp: Use GCC suppression to suppress errors about deprecations.
1499         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
1500
1501 2014-03-20  Ryuan Choi  <ryuan.choi@samsung.com>
1502
1503         [EFL][WK2] tests of test_ewk2_cookie_manager are flaky
1504         https://bugs.webkit.org/show_bug.cgi?id=130498
1505
1506         Reviewed by Gyuyoung Kim.
1507
1508         Loaded web page before calling getAcceptPolicy() to guarantee that webprocess
1509         or networkprocess was launched and registered WebCookieManager.
1510
1511         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
1512         (TEST_F):
1513
1514 2014-03-20  Commit Queue  <commit-queue@webkit.org>
1515
1516         Unreviewed, rolling out r165985.
1517         https://bugs.webkit.org/show_bug.cgi?id=130551
1518
1519         broke page loading on all cocoa platforms (Requested by
1520         thorton on #webkit).
1521
1522         Reverted changeset:
1523
1524         "[WebKit2] Implement
1525         NetworkingContext::sourceApplicationAuditData() for WebKit2"
1526         https://bugs.webkit.org/show_bug.cgi?id=130528
1527         http://trac.webkit.org/changeset/165985
1528
1529 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
1530
1531         Fix a long-standing typo that's now breaking USE(ASYNC_NSTEXTINPUTCLIENT) build.
1532
1533         Rubber-stamped by Tim Horton.
1534
1535         * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::cancelComposition):
1536         Use a correct type for reply (it's really the same type, but ConfirmComposition
1537         is behind an ifdef, and not available).
1538
1539 2014-03-20  Enrica Casucci  <enrica@apple.com>
1540
1541         [iOS WebKit2] typing and deleting text lags behind the caret movement on google.com.
1542         https://bugs.webkit.org/show_bug.cgi?id=130544
1543         <rdar://problem/16380296>
1544
1545         Reviewed by Tim Horton.
1546
1547         On iOS the selection is drawn in the UIProcess. If the WebProcess is
1548         processing multiple requests within the same runloop, the caret could be
1549         updated in the UIProcess before the WebProcess has had a chance to paint.
1550         This change synchronizes the selection drawing with the tile update.
1551
1552         * UIProcess/WebPageProxy.h:
1553         * UIProcess/ios/WKContentView.mm:
1554         (-[WKContentView _didCommitLayerTree:WebKit::]):
1555         * UIProcess/ios/WKContentViewInteraction.h:
1556         * UIProcess/ios/WKContentViewInteraction.mm:
1557         (-[WKContentView _selectionChanged]):
1558         (-[WKContentView _updateChangedSelection]):
1559         * WebProcess/WebPage/WebPage.cpp:
1560         (WebKit::WebPage::didChangeSelection):
1561
1562 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
1563
1564         Generalize WebInspector check in maybeInitializeSandboxExtensionHandle().
1565         https://bugs.webkit.org/show_bug.cgi?id=130079
1566         <rdar://problem/16286683>
1567
1568         Reviewed by Anders Carlsson.
1569
1570         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
1571         Perform an early return for all paths that don't need a sandbox extension due to
1572         access being assumed, not only for WebInspector pages.
1573
1574         * UIProcess/WebProcessProxy.cpp:
1575         (WebKit::WebProcessProxy::hasAssumedReadAccessToURL):
1576         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
1577         * UIProcess/WebProcessProxy.h:
1578         Factored out m_localPathsWithAssumedReadAccess iteration to a public function.
1579
1580 2014-03-20  Csaba Osztrogonác  <ossy@webkit.org>
1581
1582         Unreviewed buildfix after r165983 for non Cocoa platforms.
1583
1584         * UIProcess/API/C/WKAPICast.h:
1585         * UIProcess/API/C/WKPreferences.cpp:
1586         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1587
1588 2014-03-20  Beth Dakin  <bdakin@apple.com>
1589
1590         Implement contentInset for Mac WebKit2
1591         https://bugs.webkit.org/show_bug.cgi?id=130273
1592
1593         Reviewed by Simon Fraser.
1594
1595         This patch adds WKView API for setting a topContentInset(). All of this work gets 
1596         that number plumbed down to WebCore.
1597
1598         * Shared/WebPageCreationParameters.cpp:
1599         (WebKit::WebPageCreationParameters::encode):
1600         (WebKit::WebPageCreationParameters::decode):
1601         * Shared/WebPageCreationParameters.h:
1602         * UIProcess/API/Cocoa/WKViewPrivate.h:
1603         * UIProcess/API/Cocoa/WKWebView.mm:
1604         (-[WKWebView _setTopContentInset:]):
1605         (-[WKWebView _topContentInset]):
1606         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1607         * UIProcess/API/mac/WKView.mm:
1608         (-[WKView _setTopContentInset:]):
1609         (-[WKView _topContentInset]):
1610         * UIProcess/WebPageProxy.cpp:
1611         (WebKit::WebPageProxy::WebPageProxy):
1612         (WebKit::WebPageProxy::setTopContentInset):
1613         (WebKit::WebPageProxy::creationParameters):
1614         * UIProcess/WebPageProxy.h:
1615         (WebKit::WebPageProxy::topContentInset):
1616         * WebProcess/WebPage/WebPage.cpp:
1617         (WebKit::WebPage::WebPage):
1618         (WebKit::WebPage::setTopContentInset):
1619         * WebProcess/WebPage/WebPage.h:
1620         * WebProcess/WebPage/WebPage.messages.in:
1621
1622 2014-03-20  Anders Carlsson  <andersca@apple.com>
1623
1624         Fix 32-bit build.
1625
1626         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
1627
1628 2014-03-20  Anders Carlsson  <andersca@apple.com>
1629
1630         Make WKProcessPoolConfiguration SPI
1631         https://bugs.webkit.org/show_bug.cgi?id=130537
1632
1633         Reviewed by Tim Horton.
1634
1635         * UIProcess/API/Cocoa/WKProcessPool.h:
1636         * UIProcess/API/Cocoa/WKProcessPool.mm:
1637         (-[WKProcessPool init]):
1638         (-[WKProcessPool dealloc]):
1639         (-[WKProcessPool description]):
1640         (-[WKProcessPool _configuration]):
1641         (-[WKProcessPool API::]):
1642         (-[WKProcessPool _initWithConfiguration:]):
1643         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h:
1644         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
1645         (-[WKProcessPoolConfiguration _injectedBundleURL]):
1646         (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
1647         * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h:
1648         * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
1649         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1650         * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1651         (-[WKProcessPool initWithConfiguration:]):
1652         (-[WKProcessPool configuration]):
1653         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h.
1654         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm.
1655         (-[_WKProcessPoolConfiguration injectedBundleURL]):
1656         (-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
1657         (-[_WKProcessPoolConfiguration description]):
1658         (-[_WKProcessPoolConfiguration copyWithZone:]):
1659         * WebKit2.xcodeproj/project.pbxproj:
1660
1661 2014-03-20  Tim Horton  <timothy_horton@apple.com>
1662
1663         Add WebCore::IOSurface wrapper
1664         https://bugs.webkit.org/show_bug.cgi?id=130529
1665
1666         Reviewed by Simon Fraser.
1667
1668         * Shared/mac/RemoteLayerBackingStore.h:
1669         * Shared/mac/RemoteLayerBackingStore.mm:
1670         (RemoteLayerBackingStore::encode):
1671         (RemoteLayerBackingStore::decode):
1672         (RemoteLayerBackingStore::display):
1673         (RemoteLayerBackingStore::applyBackingStoreToLayer):
1674         * UIProcess/ios/ViewGestureControllerIOS.mm:
1675         (WebKit::ViewGestureController::beginSwipeGesture):
1676         (WebKit::ViewGestureController::removeSwipeSnapshot):
1677         * UIProcess/mac/ViewGestureController.h:
1678         * UIProcess/mac/ViewGestureControllerMac.mm:
1679         (WebKit::ViewGestureController::beginSwipeGesture):
1680         (WebKit::ViewGestureController::removeSwipeSnapshot):
1681         * UIProcess/mac/ViewSnapshotStore.h:
1682         * UIProcess/mac/ViewSnapshotStore.mm:
1683         (WebKit::createIOSurfaceFromImage):
1684         (WebKit::ViewSnapshotStore::recordSnapshot):
1685         Adopt WebCore::IOSurface.
1686
1687 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
1688
1689         Update iOS input method code to use new cross-platform async functions
1690         https://bugs.webkit.org/show_bug.cgi?id=130530
1691
1692         Reviewed by Enrica Casucci.
1693
1694         Merge identical iOS and cross-platform functions.
1695
1696         Also tightened up ifdefs, and removed stub iOS implementations of sync methods,
1697         which hopefully won't be ever needed. The only tricky case is sync cancelComposition,
1698         will I'll investigate separately.
1699
1700         * UIProcess/WebPageProxy.h:
1701         * UIProcess/ios/WKContentViewInteraction.mm:
1702         (-[WKContentView setMarkedText:selectedRange:]):
1703         (-[WKContentView unmarkText]):
1704         (-[WKContentView insertText:]):
1705         * UIProcess/ios/WebPageProxyIOS.mm:
1706         (WebKit::WebPageProxy::cancelComposition):
1707         * UIProcess/mac/WebPageProxyMac.mm:
1708         (WebKit::WebPageProxy::cancelComposition):
1709         (WebKit::WebPageProxy::insertDictatedTextAsync):
1710         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
1711         (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
1712         * WebProcess/WebPage/WebPage.h:
1713         * WebProcess/WebPage/WebPage.messages.in:
1714         * WebProcess/WebPage/ios/WebPageIOS.mm:
1715         * WebProcess/WebPage/mac/WebPageMac.mm:
1716         (WebKit::WebPage::cancelComposition):
1717         (WebKit::WebPage::insertDictatedTextAsync):
1718         (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
1719
1720 2014-03-20  Alexey Proskuryakov  <ap@apple.com>
1721
1722         ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
1723         https://bugs.webkit.org/show_bug.cgi?id=130526
1724         <rdar://problem/16371612>
1725
1726         Reviewed by Anders Carlsson.
1727
1728         * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]): Cut custom
1729         processing short whenever we are redispatching an event, not just when the event
1730         we are handling is the one being redispatched. There shouldn't be any other unrelated
1731         events here, just the one being redispatched and synthetic ones generated from it by AppKit.
1732
1733 2014-03-20  Anders Carlsson  <andersca@apple.com>
1734
1735         Fix build.
1736
1737         Rename WKPreferencesPrivate.h to WKPreferencesRefPrivate.h.
1738
1739         * UIProcess/API/C/WKPreferencesRefPrivate.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h.
1740         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1741         * WebKit2.xcodeproj/project.pbxproj:
1742
1743 2014-03-20  Gavin Barraclough  <barraclough@apple.com>
1744
1745         Merge AtomicString, Identifier
1746         https://bugs.webkit.org/show_bug.cgi?id=128624
1747
1748         Unreviewed build fix following r165982.
1749
1750         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1751             - update includes.
1752
1753 2014-03-20  Sam Weinig  <sam@webkit.org>
1754
1755         [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
1756         https://bugs.webkit.org/show_bug.cgi?id=130528
1757
1758         Reviewed by Anders Carlsson.
1759
1760         * Platform/IPC/Connection.h:
1761         * Platform/IPC/mac/ConnectionMac.cpp:
1762         (IPC::Connection::getAuditToken):
1763         Expose the audit data if available. 
1764
1765         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1766         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
1767         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1768         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
1769         Pass the audit data corresponding to the UIProcess.
1770
1771 2014-03-20  Sam Weinig  <sam@webkit.org>
1772
1773         [Cocoa] Expose preference to enable telephone number detection
1774         https://bugs.webkit.org/show_bug.cgi?id=130524
1775
1776         Reviewed by Anders Carlsson.
1777
1778         * UIProcess/API/Cocoa/WKPreferences.mm:
1779         (-[WKPreferences _telephoneNumberDetectionIsEnabled]):
1780         (-[WKPreferences _setTelephoneNumberDetectionIsEnabled:]):
1781         * UIProcess/API/Cocoa/WKPreferencesInternal.h:
1782         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added.
1783         * WebKit2.xcodeproj/project.pbxproj:
1784
1785 2014-03-19  Alexey Proskuryakov  <ap@apple.com>
1786
1787         [Mac] Support asynchronous NSTextInputClient
1788         https://bugs.webkit.org/show_bug.cgi?id=130479
1789
1790         Reviewed by Anders Carlsson.
1791
1792         The implementation is currently disabled, pending lower level support.
1793         Most of the code is not under compile time guard however, to facilitate cross-platform
1794         reuse, or at least under a PLATFORM(COCOA) guard to share the code with iOS.
1795
1796         * UIProcess/API/mac/WKView.mm: Added a compile time branch for USE(ASYNC_NSTEXTINPUTCLIENT).
1797         We still implement sync NSTextInputClient here, in order to get assertions when
1798         its methods are unexpectedly called.
1799         The new code first sends an event to input method asynchronously, handling any callbacks
1800         that may arrive. During this time, we no longer care about WKViewInterpretKeyEventsParameters
1801         at all. Once done, we interpret key bindings synchronously, collecting them into
1802         a vector.
1803
1804         * UIProcess/API/mac/WKViewInternal.h: We no longer expose _interpretKeyEvent outside
1805         WKView.
1806
1807         * UIProcess/WebPageProxy.cpp:
1808         * UIProcess/WebPageProxy.h:
1809         Added async calls and callbacks. Removed unnecessary and slightly harmful .get() when moving
1810         a callback pointer into map. Moved insertDictatedText() and getAttributedSubstringFromRange()
1811         from PLATFORM(COCOA) to PLATFORM(MAC), because they are unused and unimplemented on
1812         iOS, and unlikely to be needed any time soon. Changed USE(APPKIT) to PLATFORM(MAC),
1813         because that's more accurate in this case (nothing depends on AppKit, it's just code
1814         that we only need on Mac).
1815
1816         * UIProcess/WebPageProxy.messages.in: Added messages for new async IM responses.
1817
1818         * UIProcess/ios/WebPageProxyIOS.mm: Removed insertDictatedText() and getAttributedSubstringFromRange().
1819
1820         * UIProcess/mac/WebPageProxyMac.mm:
1821         (WebKit::WebPageProxy::insertDictatedTextAsync):
1822         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
1823         (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
1824         Added async calls and callbacks that are Mac only.
1825
1826         * WebProcess/WebPage/WebPage.cpp:
1827         * WebProcess/WebPage/WebPage.h:
1828         * WebProcess/WebPage/mac/WebPageMac.mm:
1829         Added async implementations (which are essentially the same as sync ones, sadly).
1830
1831         * WebProcess/WebPage/WebPage.messages.in: Added async messages, moved some messages
1832         under PLATFORM(MAC).
1833
1834         * WebProcess/WebPage/ios/WebPageIOS.mm: More of deleting functions that are Mac only,
1835         and cannot be easily implemented in WebPage.cpp with shared code.
1836
1837 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
1838
1839         Remove remaining GTK+ unused parameter warnings from WebKit2
1840         https://bugs.webkit.org/show_bug.cgi?id=130518
1841
1842         Reviewed by Sergio Villar Senin.
1843
1844         Fix almost all unused parameter warnings in the WebKit2GTK+ build.
1845
1846 2014-03-20  Commit Queue  <commit-queue@webkit.org>
1847
1848         Unreviewed, rolling out r165962.
1849         https://bugs.webkit.org/show_bug.cgi?id=130512
1850
1851         It broke the build (Requested by Ossy on #webkit).
1852
1853         Reverted changeset:
1854
1855         "[EFL][GTK] Get CMake to find Freetype2 properly"
1856         https://bugs.webkit.org/show_bug.cgi?id=130150
1857         http://trac.webkit.org/changeset/165962
1858
1859 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1860
1861         [EFL][GTK] Get CMake to find Freetype2 properly
1862         https://bugs.webkit.org/show_bug.cgi?id=130150
1863
1864         Reviewed by Csaba Osztrogonác.
1865
1866         Newer versions of CMake are not able to find Freetype2 correctly.
1867         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
1868         freetype2 repo, because a completely different version number is found in freetype2.pc.
1869
1870         * PlatformEfl.cmake:
1871
1872 2014-03-20  Ryuan Choi  <ryuan.choi@samsung.com>
1873
1874         [EFL][WK2] test_ewk2_application_cache_manager is flaky
1875         https://bugs.webkit.org/show_bug.cgi?id=130501
1876
1877         Reviewed by Gyuyoung Kim.
1878
1879         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
1880         (timerCallback): Return ECORE_CALLBACK_CANCEL to clear the timer.
1881
1882 2014-03-19  Tim Horton  <timothy_horton@apple.com>
1883
1884         Address late review comment and style nit after r165934.
1885
1886         * UIProcess/ios/ViewGestureControllerIOS.mm:
1887         (WebKit::ViewGestureController::beginSwipeGesture):
1888
1889 2014-03-19  Tim Horton  <timothy_horton@apple.com>
1890
1891         [iOS][WebKit2] Back-forward swipe doesn't always complete with fingers down
1892         https://bugs.webkit.org/show_bug.cgi?id=130489
1893         <rdar://problem/16027007>
1894
1895         Reviewed by Simon Fraser.
1896
1897         * UIProcess/ios/ViewGestureControllerIOS.mm:
1898         (WebKit::ViewGestureController::beginSwipeGesture):
1899         In order to have fingers-down swipe completion work correctly, we need
1900         to give UIKit an empty interactive update block.
1901
1902 2014-03-19  Anders Carlsson  <andersca@apple.com>
1903
1904         Get rid of two IPC::Connection functions by folding them into lambdas
1905         https://bugs.webkit.org/show_bug.cgi?id=130482
1906
1907         Reviewed by Tim Horton.
1908
1909         * Platform/IPC/Connection.cpp:
1910         (IPC::Connection::addWorkQueueMessageReceiver):
1911         (IPC::Connection::removeWorkQueueMessageReceiver):
1912         * Platform/IPC/Connection.h:
1913
1914 2014-03-19  Simon Fraser  <simon.fraser@apple.com>
1915
1916         Expose text and page zoom in WK2 SPI, and hook them up in MiniBrowser
1917         https://bugs.webkit.org/show_bug.cgi?id=130476
1918
1919         Reviewed by Anders Carlsson.
1920         
1921         Expose page and text zoom as SPI.
1922
1923         * UIProcess/API/Cocoa/WKWebView.mm:
1924         (-[WKWebView _supportsTextZoom]):
1925         (-[WKWebView _textZoomFactor]):
1926         (-[WKWebView _setTextZoomFactor:]):
1927         (-[WKWebView _pageZoomFactor]):
1928         (-[WKWebView _setPageZoomFactor:]):
1929         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1930
1931 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
1932
1933         [iOS][WK2] Reduce the extended background's opacity when WKContentView is smaller than its WKWebView
1934         https://bugs.webkit.org/show_bug.cgi?id=130436
1935
1936         Reviewed by Beth Dakin.
1937
1938         * UIProcess/API/Cocoa/WKWebView.mm:
1939         (-[WKWebView _updateScrollViewBackground]):
1940
1941 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
1942
1943         [iOS][WebKit2] <rdar://problem/16330387> Do not use the keyboard rect for computing the general unobscuredRect, only use it for centering
1944         https://bugs.webkit.org/show_bug.cgi?id=130382
1945
1946         Reviewed by Simon Fraser.
1947
1948         Always accumulating the keyboard rect out of the exposedRect caused some issues (see <rdar://problem/16330387>).
1949         This patch split the rect in two: unobscured rect for WebCore, and unobscuredContentRectIncludingKeyboard for centering
1950         UI Elements in view.
1951
1952         * UIProcess/API/Cocoa/WKWebView.mm:
1953         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
1954         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
1955         (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
1956         (-[WKWebView _contentRectForUserInteraction]):
1957         (-[WKWebView _updateVisibleContentRects]):
1958
1959 2014-03-19  Anders Carlsson  <andersca@apple.com>
1960
1961         Get rid of WKProcessClass
1962         https://bugs.webkit.org/show_bug.cgi?id=130478
1963
1964         Reviewed by Dan Bernstein.
1965
1966         * UIProcess/API/Cocoa/WKProcessClass.h: Removed.
1967         * UIProcess/API/Cocoa/WKProcessClass.mm: Removed.
1968         * UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Removed.
1969         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Removed.
1970         * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Removed.
1971         * UIProcess/API/Cocoa/WKProcessClassPrivate.h: Removed.
1972         * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Removed.
1973         * WebKit2.xcodeproj/project.pbxproj:
1974
1975 2014-03-19  Jer Noble  <jer.noble@apple.com>
1976
1977         [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
1978         https://bugs.webkit.org/show_bug.cgi?id=130459
1979
1980         Reviewed by Eric Carlson.
1981
1982         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1983         (InitWebCoreSystemInterface): Initialize the new WCSI method.
1984
1985 2014-03-19  Brady Eidson  <beidson@apple.com>
1986
1987         Filter out editable services from image menu for non-contenteditable images
1988         <rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
1989
1990         Reviewed by Tim Horton.
1991
1992         * UIProcess/mac/WebContextMenuProxyMac.h:
1993         * UIProcess/mac/WebContextMenuProxyMac.mm:
1994         (-[WKSharingServicePickerDelegate setIncludeEditorServices:]):
1995         (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
1996           Filter out editing services based on the includeEditorServices flag.
1997         (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
1998         (WebKit::WebContextMenuProxyMac::populate):
1999
2000 2014-03-19  Yongjun Zhang  <yongjun_zhang@apple.com>
2001
2002         [iOS] WebKit2 Quicklook.
2003         https://bugs.webkit.org/show_bug.cgi?id=130360
2004
2005         For WebKit2 resource loads, if we detect a quicklook content that QLConverter is able to
2006         convert, handle the response data to QLConverter and use its delegate WKWebResourceQuickLookDelegate
2007         to rounte the converted results (HTML) back into WebCore.  Thie similiar logic has been in place
2008         for WebKit1.
2009
2010         Reviewed by Tim Horton.
2011
2012         * WebKit2.xcodeproj/project.pbxproj: Add WebResourceLoaderIOS.mm to the project.
2013         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2014         * WebProcess/ios/WebResourceLoaderIOS.mm: Added.
2015         (-[WKWebResourceQuickLookDelegate initWithWebResourceLoader:WebKit::]): WKWebResourceQuickLookDelegate holds
2016             the original WebResourceLoader so that we could send converted result to WebCore.
2017         (-[WKWebResourceQuickLookDelegate connection:didReceiveDataArray:]):
2018         (-[WKWebResourceQuickLookDelegate connection:didReceiveData:lengthReceived:]):
2019         (-[WKWebResourceQuickLookDelegate connectionDidFinishLoading:]):
2020         (-[WKWebResourceQuickLookDelegate connection:didFailWithError:]):
2021         (-[WKWebResourceQuickLookDelegate clearHandle]):
2022         (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2023
2024 2014-03-19  Tim Horton  <timothy_horton@apple.com>
2025
2026         WebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizontal movement
2027         https://bugs.webkit.org/show_bug.cgi?id=130441
2028         <rdar://problem/16337279>
2029
2030         Reviewed by Simon Fraser.
2031
2032         * UIProcess/mac/ViewGestureControllerMac.mm:
2033         (WebKit::scrollEventCanBecomeSwipe):
2034         Factor logic that determines if a scroll event can become a swipe
2035         out into scrollEventCanBecomeSwipe.
2036         Use <= instead of < when comparing the axes, because we don't want
2037         to start a swipe on a completely diagonal scroll either (because AppKit
2038         can start tracking a vertical swipe in that case).
2039
2040         (WebKit::ViewGestureController::handleScrollWheelEvent):
2041         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
2042         Make use of scrollEventCanBecomeSwipe.
2043
2044 2014-03-18  Anders Carlsson  <andersca@apple.com>
2045
2046         Add new functionality that will be required by the history item decoding
2047         https://bugs.webkit.org/show_bug.cgi?id=130433
2048
2049         Reviewed by Sam Weinig.
2050
2051         * Shared/cf/KeyedDecoder.cpp:
2052         (WebKit::KeyedDecoder::decodeUInt32):
2053         (WebKit::KeyedDecoder::decodeInt32):
2054         (WebKit::KeyedDecoder::decodeFloat):
2055         * Shared/cf/KeyedDecoder.h:
2056
2057 2014-03-19  Tim Horton  <timothy_horton@apple.com>
2058
2059         [iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
2060         https://bugs.webkit.org/show_bug.cgi?id=130444
2061         <rdar://problem/15580682>
2062
2063         Reviewed by Sam Weinig.
2064
2065         * UIProcess/ios/WKPDFView.mm:
2066         (-[WKPDFView web_setContentProviderData:]):
2067         Don't make UIPDFPageViews for null pages.
2068
2069 2014-03-18  Tim Horton  <timothy_horton@apple.com>
2070
2071         [iOS][WebKit2] Provide generic software-snapshotting API
2072         https://bugs.webkit.org/show_bug.cgi?id=130385
2073         <rdar://problem/16005957>
2074
2075         Reviewed by Sam Weinig.
2076
2077         * UIProcess/API/Cocoa/WKWebView.mm:
2078         (-[WKWebView _didCommitLayerTree:WebKit::]):
2079         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2080         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2081         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2082         (-[_WKThumbnailView initWithFrame:fromWKView:]):
2083         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
2084         * UIProcess/WebPageProxy.cpp:
2085         (WebKit::WebPageProxy::internalShowContextMenu):
2086         * UIProcess/WebPageProxy.h:
2087         * WebProcess/WebPage/WebPage.cpp:
2088         (WebKit::WebPage::takeSnapshot):
2089         (WebKit::WebPage::scaledSnapshotWithOptions):
2090         (WebKit::WebPage::snapshotAtSize):
2091         * WebProcess/WebPage/WebPage.h:
2092         * WebProcess/WebPage/WebPage.messages.in:
2093         Rename TakeThumbnailSnapshot message to TakeSnapshot.
2094
2095         Fill the snapshot image with the FrameView's background color, to avoid
2096         half-pixel alpha around the edges.
2097
2098         Factor snapshotAtSize out of scaledSnapshotWithOptions.
2099
2100         Don't apply both the custom and device scale factor to the base CTM,
2101         only the device scale factor. Custom scale factor should only be
2102         applied to the user CTM.
2103
2104         * Shared/ImageOptions.h:
2105         Add a snapshot option, RespectDrawingAreaTransform, that maps
2106         the rect through the drawing area's root layer transform.
2107         Use this in place of the thumbnail-specific code in TakeThumbnailSnapshot.
2108         Add a snapshot option, ExcludeDeviceScaleFactor, which means that
2109         snapshotting will not factor the device scale in (useful for drawing
2110         to a bitmap at an exact requested size).
2111
2112 2014-03-18  Samuel White  <samuel_white@apple.com>
2113
2114         AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
2115         https://bugs.webkit.org/show_bug.cgi?id=130250
2116
2117         Reviewed by Chris Fleizach.
2118
2119         Added ability to toggle enhanced accessibility on and off to support tests that require it.
2120
2121         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2122         (WKAccessibilityEnableEnhancedAccessibility):
2123         (WKAccessibilityEnhancedAccessibilityEnabled):
2124         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2125
2126 2014-03-18  Ryuan Choi  <ryuan.choi@samsung.com>
2127
2128         [EFL][WK2] Rename async APIs for better consistency with EFL
2129         https://bugs.webkit.org/show_bug.cgi?id=130319
2130
2131         Reviewed by Gyuyoung Kim.
2132
2133         There are inconsistency with async keyword in several ewebkit2 APIs.
2134         This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
2135         In addition, added Async keyword into their callback name.
2136
2137         * UIProcess/API/efl/ewk_application_cache_manager.cpp:
2138         (EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
2139         (getApplicationCacheOriginsCallback):
2140         (ewk_application_cache_manager_origins_async_get):
2141         * UIProcess/API/efl/ewk_application_cache_manager.h:
2142         * UIProcess/API/efl/ewk_cookie_manager.cpp:
2143         (EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
2144         (getAcceptPolicyCallback):
2145         (ewk_cookie_manager_accept_policy_async_get):
2146         (EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
2147         (getHostnamesWithCookiesCallback):
2148         (ewk_cookie_manager_hostnames_with_cookies_async_get):
2149         * UIProcess/API/efl/ewk_cookie_manager.h:
2150         * UIProcess/API/efl/ewk_database_manager.cpp:
2151         (EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
2152         (getDatabaseOriginsCallback):
2153         (ewk_database_manager_origins_async_get):
2154         * UIProcess/API/efl/ewk_database_manager.h:
2155         * UIProcess/API/efl/ewk_storage_manager.cpp:
2156         (EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
2157         (getStorageOriginsCallback):
2158         (ewk_storage_manager_origins_async_get):
2159         * UIProcess/API/efl/ewk_storage_manager.h:
2160         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
2161         (timerCallback):
2162         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
2163         (EWK2CookieManagerTest::getAcceptPolicy):
2164         (EWK2CookieManagerTest::getHostnamesWithCookies):
2165         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
2166         (EWK2DatabaseManagerTest::timerCallback):
2167         (TEST_F):
2168         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
2169         (EWK2StorageManagerTest::timerCallback):
2170         (TEST_F):
2171
2172 2014-03-18  Tim Horton  <timothy_horton@apple.com>
2173
2174         [iOS][WebKit2] Mark layer contents as being opaque if they are
2175         https://bugs.webkit.org/show_bug.cgi?id=130427
2176         <rdar://problem/15540434>
2177
2178         Reviewed by Simon Fraser.
2179
2180         * Shared/mac/RemoteLayerBackingStore.h:
2181         (WebKit::RemoteLayerBackingStore::isOpaque):
2182         * Shared/mac/RemoteLayerBackingStore.mm:
2183         (RemoteLayerBackingStore::RemoteLayerBackingStore):
2184         (RemoteLayerBackingStore::ensureBackingStore):
2185         (RemoteLayerBackingStore::encode):
2186         (RemoteLayerBackingStore::decode):
2187         (RemoteLayerBackingStore::display):
2188         (RemoteLayerBackingStore::applyBackingStoreToLayer):
2189         Move the code to set a RemoteLayerBackingStore as a CALayer's contents
2190         from RemoteLayerTreePropertyApplier to RemoteLayerBackingStore (mostly
2191         as a way to keep the USE(IOSURFACE) #ifs in one place).
2192         Remove the surface() getter, because it's no longer needed, and make
2193         image() private as it can be now (and rename it to createImageForFrontBuffer
2194         for clarity's sake).
2195
2196         Add an isOpaque argument to ensureBackingStore, encode/decode it, and
2197         add a getter. If isOpaque is true when applying backing store to the
2198         CALayer on the UI process side, set CALayer.contentsOpaque to let CA know.
2199
2200         Make opaque bitmaps if not using accelerated drawing. For the IOSurface
2201         case, we can't make opaque IOSurfaces, but telling CA that we have filled
2202         the whole bitmap still enables similar optimizations.
2203
2204         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2205         (WebKit::applyPropertiesToLayer):
2206         Reset contentsOpaque if the layer loses its backing store.
2207
2208         * Shared/mac/RemoteLayerTreeTransaction.mm:
2209         (WebKit::RemoteLayerTreeTextStream::operator<<):
2210         (WebKit::dumpChangedLayers):
2211         Add a bit more logging about RemoteLayerBackingStore's opaqueness
2212         and acceleratedness.
2213
2214         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2215         (PlatformCALayerRemote::updateBackingStore):
2216         (PlatformCALayerRemote::setOpaque):
2217         Invalidate the RemoteLayerBackingStore if layer opaqueness changes.
2218
2219 2014-03-18  Brady Eidson  <beidson@apple.com>
2220
2221         Make image controls menu work in WK2
2222         <rdar://problem/16294412> and https://bugs.webkit.org/show_bug.cgi?id=130424
2223
2224         Reviewed by Tim Horton.
2225
2226         * Platform/SharedMemory.h:
2227         * Platform/mac/SharedMemoryMac.cpp:
2228         (WebKit::SharedMemory::Handle::~Handle):
2229         (WebKit::SharedMemory::Handle::clear):
2230
2231         * Platform/unix/SharedMemoryUnix.cpp:
2232         (WebKit::SharedMemory::Handle::~Handle):
2233         (WebKit::SharedMemory::Handle::clear):
2234
2235         * Shared/ContextMenuContextData.cpp:
2236         (WebKit::ContextMenuContextData::ContextMenuContextData):
2237         (WebKit::ContextMenuContextData::operator=):
2238         (WebKit::ContextMenuContextData::encode):
2239         (WebKit::ContextMenuContextData::decode):
2240         * Shared/ContextMenuContextData.h:
2241         (WebKit::ContextMenuContextData::controlledImageHandle):
2242
2243         * Shared/ShareableBitmap.cpp:
2244         (WebKit::ShareableBitmap::Handle::clear):
2245         * Shared/ShareableBitmap.h:
2246         * UIProcess/WebContextMenuProxy.h:
2247
2248         * UIProcess/WebPageProxy.cpp:
2249         (WebKit::WebPageProxy::internalShowContextMenu):
2250         (WebKit::WebPageProxy::replaceControlledImage):
2251         * UIProcess/WebPageProxy.h:
2252
2253         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
2254         (WebKit::WebContextMenuProxyEfl::showContextMenu):
2255         * UIProcess/efl/WebContextMenuProxyEfl.h:
2256
2257         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2258         (WebKit::WebContextMenuProxyGtk::showContextMenu):
2259         * UIProcess/gtk/WebContextMenuProxyGtk.h:
2260
2261         Add a sharing service context menu that lives side-by-side with the normal one:
2262         * UIProcess/mac/WebContextMenuProxyMac.h:
2263         * UIProcess/mac/WebContextMenuProxyMac.mm:
2264         (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
2265         (-[WKSharingServicePickerDelegate setMenuProxy:WebKit::]):
2266         (-[WKSharingServicePickerDelegate setPicker:]):
2267         (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
2268         (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
2269         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
2270         (-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
2271         (-[WKSharingServicePickerDelegate sharingService:transitionImageForShareItem:contentRect:]):
2272         (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
2273         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
2274         (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
2275         (WebKit::WebContextMenuProxyMac::clearImageServicesMenu):
2276         (WebKit::WebContextMenuProxyMac::populate):
2277         (WebKit::WebContextMenuProxyMac::showContextMenu):
2278         (WebKit::WebContextMenuProxyMac::window):
2279         (WebKit::WebContextMenuProxyMac::replaceControlledImage):
2280
2281         * WebProcess/WebPage/WebContextMenu.cpp:
2282         (WebKit::WebContextMenu::show):
2283         (WebKit::WebContextMenu::replaceControlledImage):
2284         * WebProcess/WebPage/WebContextMenu.h:
2285
2286         Teach the WebProcess how to accept the replaced image.
2287         * WebProcess/WebPage/WebPage.cpp:
2288         (WebKit::WebPage::replaceControlledImage):
2289         * WebProcess/WebPage/WebPage.h:
2290         * WebProcess/WebPage/WebPage.messages.in:
2291
2292 2014-03-18  Anders Carlsson  <andersca@apple.com>
2293
2294         Begin cleaning up KeyedDecoder and KeyedEncoder
2295         https://bugs.webkit.org/show_bug.cgi?id=130431
2296
2297         Reviewed by Tim Horton.
2298
2299         * Shared/cf/KeyedDecoder.cpp:
2300         (WebKit::KeyedDecoder::KeyedDecoder):
2301         If we can't parse the property list data, just add an empty dictionary to the stack.
2302
2303         (WebKit::KeyedDecoder::decodeBool):
2304         Remove unneeded m_dictionaryStack.last() null check. m_dictionaryStack would either be empty
2305         or at least have a root element; it would never have a null element.
2306         
2307         (WebKit::KeyedDecoder::decodeDouble):
2308         Remove the same check as above and remove the CFNumberGetType checks since CFNumberGetValue will
2309         do the type conversion for us and return false if it's lossy.
2310
2311         (WebKit::KeyedDecoder::decodeInt64):
2312         Remove the m_dictionaryStack.last() check.
2313
2314         (WebKit::KeyedDecoder::decodeUInt32):
2315         Ditto.
2316
2317         (WebKit::KeyedDecoder::decodeString):
2318         Ditto.
2319
2320         (WebKit::KeyedDecoder::beginObject):
2321         Ditto.
2322
2323         (WebKit::KeyedDecoder::beginArray):
2324         Ditto.
2325
2326         (WebKit::KeyedDecoder::beginArrayElement):
2327         Ditto.
2328
2329         * Shared/cf/KeyedDecoder.h:
2330         Sort functions to be in the same logical order as the base class.
2331
2332         * Shared/cf/KeyedEncoder.cpp:
2333         (WebKit::KeyedEncoder::finishEncoding):
2334         Don't check for a non-null CFErrorRef here (which we incidentally never released on error). Instead,
2335         just null check the returned CFDataRef object.
2336
2337 2014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
2338
2339         Unreviewed typo build fix for r165846.
2340
2341         * Shared/WebPageCreationParameters.cpp:
2342         (WebKit::WebPageCreationParameters::decode):
2343
2344 2014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
2345
2346         WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
2347         https://bugs.webkit.org/show_bug.cgi?id=130371
2348
2349         Reviewed by Dan Bernstein.
2350
2351         * Shared/WebPageCreationParameters.h:
2352         * Shared/WebPageCreationParameters.cpp:
2353         (WebKit::WebPageCreationParameters::encode):
2354         (WebKit::WebPageCreationParameters::decode):
2355         Add allowsRemoteInspection bool.
2356
2357         * UIProcess/API/C/WKPagePrivate.h:
2358         * UIProcess/API/C/WKPage.cpp:
2359         (WKPageGetAllowsRemoteInspection):
2360         (WKPageSetAllowsRemoteInspection):
2361         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2362         * UIProcess/API/Cocoa/WKWebView.mm:
2363         (-[WKWebView _allowsRemoteInspection]):
2364         (-[WKWebView _setAllowsRemoteInspection:]):
2365         Getter and setter for allowing remote inspection state.
2366
2367         * UIProcess/WebPageProxy.h:
2368         (WebKit::WebPageProxy::allowsRemoteInspection):
2369         * UIProcess/WebPageProxy.cpp:
2370         (WebKit::WebPageProxy::WebPageProxy):
2371         (WebKit::WebPageProxy::setAllowsRemoteInspection):
2372         (WebKit::WebPageProxy::creationParameters):
2373         Cached allows remote inspection state, with getter and setter.
2374
2375         * WebProcess/WebPage/WebPage.h:
2376         * WebProcess/WebPage/WebPage.messages.in:
2377         * WebProcess/WebPage/WebPage.cpp:
2378         (WebKit::WebPage::setAllowsRemoteInspection):
2379         When setting, call into WebCore to adjust the Page's setting.
2380
2381 2014-03-18  Anders Carlsson  <andersca@apple.com>
2382
2383         REGRESSION: Visited link coloring seems to be completely broken in tip of tree
2384         https://bugs.webkit.org/show_bug.cgi?id=130419
2385         <rdar://problem/16337850>
2386
2387         Reviewed by Dan Bernstein.
2388
2389         Make sure to send any queued up messages before calling connectionWillOpen so we'll ensure
2390         FIFO ordering if any messages are sent from within connectionWillOpen.
2391
2392         * Shared/ChildProcessProxy.cpp:
2393         (WebKit::ChildProcessProxy::didFinishLaunching):
2394
2395 2014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
2396
2397         WebPageCreationParameters colorSpace should be MAC not COCOA
2398         https://bugs.webkit.org/show_bug.cgi?id=130414
2399
2400         Reviewed by Dan Bernstein.
2401
2402         The colorSpace param was only set and used on Mac, not iOS.
2403
2404         * Shared/WebPageCreationParameters.h:
2405         * Shared/WebPageCreationParameters.cpp:
2406         (WebKit::WebPageCreationParameters::encode):
2407         (WebKit::WebPageCreationParameters::decode):
2408
2409 2014-03-18  Simon Fraser  <simon.fraser@apple.com>
2410
2411         Dan says that options should be unsigned, and enums should be signed.
2412         
2413         Reviewed by Dan Bernstein.
2414
2415         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2416         (NS_ENUM):
2417
2418 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2419
2420         [WK2] Pass ranges over IPC in a cross-platform manner
2421         https://bugs.webkit.org/show_bug.cgi?id=130376
2422
2423         Reviewed by Anders Carlsson.
2424
2425         Added an EditingRange class for IPC, which automatically converts to and from
2426         NSRanges, knowing the difference between notFound and NSNotFound.
2427
2428         Manually applied the same fix to characterIndexForPoint.
2429
2430         * Scripts/webkit2/messages.py:
2431         (struct_or_class):
2432         * Shared/EditingRange.h: Added.
2433         (WebKit::EditingRange::EditingRange):
2434         (WebKit::EditingRange::isValid):
2435         (WebKit::EditingRange::operator NSRange):
2436         * UIProcess/API/mac/WKView.mm:
2437         (-[WKView insertText:replacementRange:]):
2438         (-[WKView selectedRange]):
2439         (-[WKView hasMarkedText]):
2440         (-[WKView setMarkedText:selectedRange:replacementRange:]):
2441         (-[WKView markedRange]):
2442         (-[WKView attributedSubstringForProposedRange:actualRange:]):
2443         (-[WKView characterIndexForPoint:]):
2444         (-[WKView firstRectForCharacterRange:actualRange:]):
2445         * UIProcess/WebPageProxy.h:
2446         * UIProcess/ios/WKContentViewInteraction.mm:
2447         (-[WKContentView setMarkedText:selectedRange:]):
2448         (-[WKContentView insertText:]):
2449         * UIProcess/ios/WebPageProxyIOS.mm:
2450         (WebKit::WebPageProxy::setComposition):
2451         (WebKit::WebPageProxy::insertText):
2452         (WebKit::WebPageProxy::insertDictatedText):
2453         (WebKit::WebPageProxy::getMarkedRange):
2454         (WebKit::WebPageProxy::getSelectedRange):
2455         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
2456         (WebKit::WebPageProxy::firstRectForCharacterRange):
2457         * UIProcess/mac/WebPageProxyMac.mm:
2458         (WebKit::WebPageProxy::setComposition):
2459         (WebKit::WebPageProxy::insertText):
2460         (WebKit::WebPageProxy::insertDictatedText):
2461         (WebKit::WebPageProxy::getMarkedRange):
2462         (WebKit::WebPageProxy::getSelectedRange):
2463         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
2464         (WebKit::WebPageProxy::firstRectForCharacterRange):
2465         * WebKit2.xcodeproj/project.pbxproj:
2466         * WebProcess/WebPage/WebPage.cpp:
2467         (WebKit::WebPage::rangeFromEditingRange):
2468         * WebProcess/WebPage/WebPage.h:
2469         * WebProcess/WebPage/WebPage.messages.in:
2470         * WebProcess/WebPage/ios/WebPageIOS.mm:
2471         (WebKit::WebPage::setComposition):
2472         (WebKit::WebPage::insertText):
2473         (WebKit::WebPage::insertDictatedText):
2474         (WebKit::WebPage::getMarkedRange):
2475         (WebKit::WebPage::getSelectedRange):
2476         (WebKit::WebPage::getAttributedSubstringFromRange):
2477         (WebKit::WebPage::firstRectForCharacterRange):
2478         * WebProcess/WebPage/mac/WebPageMac.mm:
2479         (WebKit::WebPage::setComposition):
2480         (WebKit::WebPage::insertText):
2481         (WebKit::WebPage::insertDictatedText):
2482         (WebKit::WebPage::getMarkedRange):
2483         (WebKit::WebPage::getSelectedRange):
2484         (WebKit::WebPage::getAttributedSubstringFromRange):
2485         (WebKit::WebPage::characterIndexForPoint):
2486         (WebKit::WebPage::firstRectForCharacterRange):
2487
2488 2014-03-17  Filip Pizlo  <fpizlo@apple.com>
2489
2490         More FTL enabling.
2491
2492         Rubber stamped by Dan Bernstein.
2493
2494         * Configurations/FeatureDefines.xcconfig:
2495
2496 2014-03-17  Simon Fraser  <simon.fraser@apple.com>
2497
2498         Renable pagination mode in WK2 MiniBrowser
2499         https://bugs.webkit.org/show_bug.cgi?id=130374
2500
2501         Reviewed by Anders Carlsson.
2502         
2503         Add SPI for pagination mode.
2504
2505         * UIProcess/API/Cocoa/WKWebView.mm:
2506         (-[WKWebView _paginationMode]):
2507         (-[WKWebView _setPaginationMode:]):
2508         (-[WKWebView _paginationBehavesLikeColumns]):
2509         (-[WKWebView _setPaginationBehavesLikeColumns:]):
2510         (-[WKWebView _pageLength]):
2511         (-[WKWebView _setPageLength:]):
2512         (-[WKWebView _gapBetweenPages]):
2513         (-[WKWebView _setGapBetweenPages:]):
2514         (-[WKWebView _pageCount]):
2515         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2516         (NS_ENUM):
2517
2518 2014-03-18  Ryuan Choi  <ryuan.choi@samsung.com>
2519
2520         [CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
2521         https://bugs.webkit.org/show_bug.cgi?id=130390
2522
2523         Reviewed by Martin Robinson.
2524
2525         Now, only EFL port use CoordinatedGraphics among CMake based ports.
2526
2527         * CMakeLists.txt:
2528         * PlatformEfl.cmake:
2529         * PlatformGTK.cmake: Removed CoordinatedGraphics related files.
2530
2531 2014-03-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2532
2533         [GTK] Race condition when the socket event source is cancelled
2534         https://bugs.webkit.org/show_bug.cgi?id=130395
2535
2536         Reviewed by Martin Robinson.
2537
2538         In some cases when the socket event source is cancelled the socket
2539         event source callback is called with the condition of the previous
2540         poll instead of 0. This can happen sometimes when the source is
2541         cancelled from the socket event source callback. Once the socket
2542         event source is cancelled, it's dispatched by glib without
2543         polling, so the condition is never reset again and the callback is
2544         called again and again with the previous condition. When the
2545         condition is G_IO_IN, the source is re-scheduled entering into an
2546         infinite loop. We should always check if the source has been
2547         cancelled at the beginning of the callback to destroy the source
2548         instead of relying on the condition being 0.
2549
2550         * Platform/gtk/WorkQueueGtk.cpp:
2551         (WorkQueue::SocketEventSource::isCancelled):
2552         (WorkQueue::SocketEventSource::eventCallback):
2553
2554 2014-03-18  Csaba Osztrogonác  <ossy@webkit.org>
2555
2556         [GTK] URTFB after r165789. Stub function added.
2557
2558         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2559         (WebKit::InjectedBundle::setBundleParameter):
2560
2561 2014-03-17  Jaehun Lim  <ljaehun.lim@samsung.com>
2562
2563         Unreviewed, EFL build fix after r165789
2564
2565         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
2566         (WebKit::InjectedBundle::setBundleParameter): Implemented.
2567
2568 2014-03-17  Jae Hyun Park  <jaepark@webkit.org>
2569
2570         [GTK] Build fix for debug build
2571
2572         Unreviewed.
2573
2574         finalizedListItem was actually used in ASSERT.  So, use ASSERT_UNUSED
2575         instead of ASSERT.
2576
2577         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
2578         (webkitBackForwardListItemFinalized):
2579
2580 2014-03-17  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2581
2582         [WK2] Getting rid of compilation warnings
2583         https://bugs.webkit.org/show_bug.cgi?id=130348
2584
2585         Reviewed by Benjamin Poulain.
2586
2587         * UIProcess/API/APIHistoryClient.h:
2588         (API::HistoryClient::didPerformClientRedirect):
2589         (API::HistoryClient::didPerformServerRedirect):
2590         (API::HistoryClient::didUpdateHistoryTitle):
2591         * UIProcess/API/APILoaderClient.h:
2592         (API::LoaderClient::didStartProvisionalLoadForFrame):
2593         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
2594         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2595         (API::LoaderClient::didCommitLoadForFrame):
2596         (API::LoaderClient::didFinishLoadForFrame):
2597         (API::LoaderClient::didFailLoadWithErrorForFrame):
2598         (API::LoaderClient::didChangeBackForwardList):
2599         * UIProcess/API/APIPolicyClient.h:
2600         (API::PolicyClient::decidePolicyForNavigationAction):
2601         (API::PolicyClient::decidePolicyForNewWindowAction):
2602         (API::PolicyClient::decidePolicyForResponse):
2603         (API::PolicyClient::unableToImplementPolicy):
2604         * UIProcess/API/APIUIClient.h:
2605         (API::UIClient::exceededDatabaseQuota):
2606         (API::UIClient::saveDataToFileInDownloadsFolder):
2607         * UIProcess/API/C/WKPage.cpp:
2608         (WKPageSetPageLoaderClient):
2609         * UIProcess/APISession.cpp:
2610         (API::generateID):
2611         * WebProcess/Plugins/PluginView.cpp:
2612         (WebKit::PluginView::viewStateDidChange):
2613
2614 2014-03-17  Anders Carlsson  <andersca@apple.com>
2615
2616         Update the bundle parameters dictionary and send out KVO notifications
2617         https://bugs.webkit.org/show_bug.cgi?id=130379
2618         <rdar://problem/16213914>
2619
2620         Reviewed by Dan Bernstein.
2621
2622         * UIProcess/API/Cocoa/WKProcessPool.mm:
2623         (-[WKProcessPool _setObject:forBundleParameter:]):
2624         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2625         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
2626         (-[WKWebProcessBundleParameters setParameter:forKey:]):
2627         * WebProcess/InjectedBundle/InjectedBundle.h:
2628         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2629         (WebKit::InjectedBundle::setBundleParameter):
2630         * WebProcess/WebProcess.cpp:
2631         (WebKit::WebProcess::setInjectedBundleParameter):
2632         * WebProcess/WebProcess.h:
2633         * WebProcess/WebProcess.messages.in:
2634
2635 2014-03-17  Tim Horton  <timothy_horton@apple.com>
2636
2637         Address some style nits.
2638
2639         * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h:
2640
2641 2014-03-17  Simon Fraser  <simon.fraser@apple.com>
2642
2643         Address some style nits.
2644
2645         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2646
2647 2014-03-17  Simon Fraser  <simon.fraser@apple.com>
2648
2649         Add transparent window support back into MiniBrowser
2650         https://bugs.webkit.org/show_bug.cgi?id=130363
2651
2652         Reviewed by Anders Carlsson.
2653         
2654         Expose SPI for transparent window support.
2655
2656         * UIProcess/API/Cocoa/WKWebView.mm:
2657         (-[WKWebView _drawsTransparentBackground]):
2658         (-[WKWebView _setDrawsTransparentBackground:]):
2659         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2660
2661 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2662
2663         Undo some accidental Gtk changes from http://trac.webkit.org/changeset/165759
2664
2665         * UIProcess/WebPageProxy.cpp:
2666         * WebProcess/WebPage/WebPage.messages.in:
2667
2668 2014-03-17  Csaba Osztrogonác  <ossy@webkit.org>
2669
2670         [WK2] URTBF after r165755 for non Apple platforms, stub functions added.
2671
2672         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
2673         (WebKit::InjectedBundle::platformInitialize):
2674         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2675         (WebKit::InjectedBundle::platformInitialize):
2676
2677 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2678
2679         Move convertToRange() helper to cross-platform WebPage.cpp
2680         https://bugs.webkit.org/show_bug.cgi?id=130365
2681
2682         Reviewed by Tim Horton.
2683
2684         Also renamed it to rangeFromEditingLocationAndLength().
2685
2686         * WebProcess/WebPage/WebPage.cpp:
2687         (WebKit::WebPage::rangeFromEditingLocationAndLength):
2688         * WebProcess/WebPage/WebPage.h:
2689         * WebProcess/WebPage/ios/WebPageIOS.mm:
2690         (WebKit::WebPage::insertText):
2691         * WebProcess/WebPage/mac/WebPageMac.mm:
2692         (WebKit::WebPage::setComposition):
2693         (WebKit::WebPage::insertText):
2694         (WebKit::WebPage::insertDictatedText):
2695         (WebKit::WebPage::getAttributedSubstringFromRange):
2696         (WebKit::WebPage::characterIndexForPoint):
2697         (WebKit::WebPage::firstRectForCharacterRange):
2698
2699 2014-03-17  Anders Carlsson  <andersca@apple.com>
2700
2701         Follow-up fix.
2702
2703         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2704
2705 2014-03-17  Enrica Casucci  <enrica@apple.com>
2706
2707         WK2: support data detectors driven action sheet..
2708         https://bugs.webkit.org/show_bug.cgi?id=130362
2709         <rdar://problem/16319711>
2710
2711         Reviewed by Benjamin Poulain.
2712
2713         * UIProcess/ios/WKActionSheetAssistant.mm:
2714         (-[WKActionSheetAssistant showDataDetectorsSheet]):
2715
2716 2014-03-17  Anders Carlsson  <andersca@apple.com>
2717
2718         Fix 32-bit OS X build.
2719
2720         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2721         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
2722         * WebProcess/InjectedBundle/InjectedBundle.h:
2723         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2724         (WebKit::InjectedBundle::platformInitialize):
2725
2726 2014-03-17  Jae Hyun Park  <jaepark@webkit.org>
2727
2728         [GTK][CMake] Fix WebKit2 unused parameter warnings
2729         https://bugs.webkit.org/show_bug.cgi?id=130316
2730
2731         Reviewed by Martin Robinson.
2732
2733         * Platform/gtk/WorkQueueGtk.cpp: Fix unused parameter warnings.
2734         * UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
2735         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
2736         * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Ditto.
2737         * UIProcess/API/gtk/WebKitContextMenuItem.cpp: Ditto.
2738         * UIProcess/API/gtk/WebKitDownloadClient.cpp: Ditto.
2739         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Ditto.
2740         * UIProcess/API/gtk/WebKitFindController.cpp: Ditto.
2741         * UIProcess/API/gtk/WebKitFormClient.cpp: Ditto.
2742         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Ditto.
2743         * UIProcess/API/gtk/WebKitLoaderClient.cpp: Ditto.
2744         * UIProcess/API/gtk/WebKitPlugin.cpp: Ditto.
2745         * UIProcess/API/gtk/WebKitPolicyClient.cpp: Ditto.
2746         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Ditto.
2747         * UIProcess/API/gtk/WebKitTextChecker.cpp: Ditto.
2748         * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
2749         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Ditto.
2750         * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
2751         * UIProcess/API/gtk/WebKitWebInspector.cpp: Ditto.
2752         * UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
2753         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
2754         * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Ditto.
2755         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Ditto.
2756         * UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
2757         * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Ditto.
2758         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
2759         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Ditto.
2760         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Ditto.
2761         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Ditto.
2762         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Ditto.
2763         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Ditto.
2764
2765 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2766
2767         [Mac] Standardize on start/length in text input IPC methods
2768         https://bugs.webkit.org/show_bug.cgi?id=130359
2769
2770         Reviewed by Anders Carlsson.
2771
2772         Some IPC methods used start/length, and others use start/end. This was confusing.
2773
2774         While here, changed WebPageMac.mm to not use NSMakeRange where we don't need it
2775         (I want to move this code to WebPage.cpp, where it could be shared with iOS and
2776         other platforms, as it doesn't depend on Foundation much).
2777
2778         * UIProcess/API/mac/WKView.mm:
2779         (-[WKView insertText:replacementRange:]):
2780         (-[WKView setMarkedText:selectedRange:replacementRange:]):
2781         (-[WKView attributedSubstringForProposedRange:actualRange:]):
2782         * UIProcess/WebPageProxy.cpp:
2783         (WebKit::WebPageProxy::internalShowContextMenu):
2784         * UIProcess/WebPageProxy.h:
2785         * UIProcess/ios/WebPageProxyIOS.mm:
2786         (WebKit::WebPageProxy::setComposition):
2787         (WebKit::WebPageProxy::insertText):
2788         * UIProcess/mac/WebPageProxyMac.mm:
2789         (WebKit::WebPageProxy::setComposition):
2790         (WebKit::WebPageProxy::insertText):
2791         (WebKit::WebPageProxy::insertDictatedText):
2792         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
2793         * WebProcess/WebPage/WebPage.cpp:
2794         (WebKit::WebPage::setComposition):
2795         * WebProcess/WebPage/WebPage.h:
2796         * WebProcess/WebPage/WebPage.messages.in:
2797         * WebProcess/WebPage/ios/WebPageIOS.mm:
2798         (WebKit::WebPage::setComposition):
2799         (WebKit::WebPage::insertText):
2800         * WebProcess/WebPage/mac/WebPageMac.mm:
2801         (WebKit::WebPage::setComposition):
2802         (WebKit::WebPage::insertText):
2803         (WebKit::WebPage::insertDictatedText):
2804         (WebKit::WebPage::getAttributedSubstringFromRange):
2805         (WebKit::convertToRange):
2806         (WebKit::WebPage::firstRectForCharacterRange):
2807
2808 2014-03-17  Tim Horton  <timothy_horton@apple.com>
2809
2810         Rename WKThumbnailView to _WKThumbnailView
2811         https://bugs.webkit.org/show_bug.cgi?id=130361
2812
2813         Reviewed by Anders Carlsson.
2814
2815         * UIProcess/API/Cocoa/_WKThumbnailView.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h.
2816         * UIProcess/API/Cocoa/_WKThumbnailView.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm.
2817         (-[_WKThumbnailView initWithFrame:fromWKView:]):
2818         (-[_WKThumbnailView _viewWasUnparented]):
2819         (-[_WKThumbnailView _viewWasParented]):
2820         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
2821         (-[_WKThumbnailView _didTakeSnapshot:]):
2822         (-[_WKThumbnailView viewDidMoveToWindow]):
2823         (-[_WKThumbnailView setScale:]):
2824         (-[_WKThumbnailView setUsesSnapshot:]):
2825         (-[_WKThumbnailView _setThumbnailLayer:]):
2826         (-[_WKThumbnailView _thumbnailLayer]):
2827         * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailViewInternal.h.
2828         * UIProcess/API/mac/WKView.mm:
2829         (-[WKView _setThumbnailView:]):
2830         (-[WKView _thumbnailView]):
2831         (-[WKView _updateThumbnailViewLayer]):
2832         * UIProcess/API/mac/WKViewInternal.h:
2833         * UIProcess/mac/PageClientImpl.mm:
2834         * WebKit2.xcodeproj/project.pbxproj:
2835
2836 2014-03-17  Anders Carlsson  <andersca@apple.com>
2837
2838         Add SPI for getting bundle parameters from the injected bundle
2839         https://bugs.webkit.org/show_bug.cgi?id=130355
2840
2841         Reviewed by Dan Bernstein.
2842
2843         * UIProcess/mac/WebContextMac.mm:
2844         (WebKit::WebContext::platformInitializeWebProcess):
2845         * WebKit2.xcodeproj/project.pbxproj:
2846         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
2847         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
2848         (-[WKWebProcessBundleParameters initWithDictionary:]):
2849         (-[WKWebProcessBundleParameters valueForKey:]):
2850         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
2851         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
2852         (-[WKWebProcessPlugInController parameters]):
2853         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2854         (WebKit::InjectedBundle::InjectedBundle):
2855         * WebProcess/InjectedBundle/InjectedBundle.h:
2856         (WebKit::InjectedBundle::create):
2857         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2858         (WebKit::InjectedBundle::bundleParameters):
2859         (WebKit::InjectedBundle::platformInitialize):
2860         * WebProcess/WebProcess.cpp:
2861         (WebKit::WebProcess::initializeWebProcess):
2862
2863 2014-03-17  Brent Fulgham  <bfulgham@apple.com>
2864
2865         Provide preference to enable additional AVFoundation options
2866         https://bugs.webkit.org/show_bug.cgi?id=130275
2867
2868         Reviewed by Eric Carlson.
2869
2870         * Shared/WebPreferencesStore.h: Added new preference.
2871         * UIProcess/API/C/WKPreferences.cpp:
2872         (WKPreferencesSetEnableInheritURIQueryComponent): Added.
2873         (WKPreferencesGetEnableInheritURIQueryComponent): Added.
2874         * UIProcess/API/C/WKPreferencesPrivate.h:
2875         * WebProcess/WebPage/WebPage.cpp:
2876         (WebKit::WebPage::updatePreferences): Handle new preference.
2877
2878 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
2879
2880         [Mac] getAttributedSubstringFromRange arguments are incorrectly named
2881         https://bugs.webkit.org/show_bug.cgi?id=130349
2882
2883         Reviewed by Tim Horton.
2884
2885         There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
2886         all, but now, let's at least name them correctly.
2887
2888         No behavior change.
2889
2890         * UIProcess/WebPageProxy.h:
2891         * UIProcess/mac/WebPageProxyMac.mm:
2892         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
2893         * WebProcess/WebPage/WebPage.h:
2894         * WebProcess/WebPage/WebPage.messages.in:
2895         * WebProcess/WebPage/mac/WebPageMac.mm:
2896         (WebKit::WebPage::getAttributedSubstringFromRange):
2897
2898 2014-03-17  Tim Horton  <timothy_horton@apple.com>
2899
2900         WKThumbnailView should support snapshots
2901         https://bugs.webkit.org/show_bug.cgi?id=130335
2902         <rdar://problem/16255139>
2903
2904         Reviewed by Simon Fraser.
2905
2906         Add a mode where WKThumbnailView takes a software snapshot of the web content,
2907         replacing the live layer tree with said snapshot once it returns from the
2908         web process. This may improve animation performance in cases where the
2909         layer tree would otherwise be very complex.
2910
2911         * UIProcess/API/Cocoa/WKThumbnailView.h:
2912         Add a property, usesSnapshot, which determines whether the thumbnail view
2913         should use the live layer tree or a snapshot of the content.
2914
2915         * UIProcess/API/Cocoa/WKThumbnailView.mm:
2916         (-[WKThumbnailView initWithFrame:fromWKView:]):
2917         (-[WKThumbnailView _viewWasUnparented]):
2918         Clear the snapshot when unparented.
2919
2920         (-[WKThumbnailView _viewWasParented]):
2921         Take a snapshot of the web content when parented, if needed.
2922
2923         (-[WKThumbnailView _requestSnapshotIfNeeded]):
2924         If we're using snapshots, and haven't already dispatched an async snapshot request,
2925         and don't already have a snapshot, request a snapshot from the web process.
2926
2927         When it returns, use it as the contents of the WKThumbnailView layer, and
2928         unparent the live layer tree.
2929
2930         (-[WKThumbnailView setScale:]):
2931         (-[WKThumbnailView setUsesSnapshot:]):
2932         (-[WKThumbnailView _setThumbnailLayer:]):
2933         (-[WKThumbnailView _thumbnailLayer]):
2934         * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
2935
2936         * UIProcess/API/mac/WKView.mm:
2937         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
2938         (-[WKView _acceleratedCompositingModeRootLayer]):
2939         WKView should always keep track of the current root layer, instead of totally
2940         handing control over to WKThumbnailView when it is used.
2941
2942         (-[WKView _setThumbnailView:]):
2943         (-[WKView _updateThumbnailViewLayer]):
2944         (-[WKView _reparentLayerTreeInThumbnailView]):
2945         If needed (either we're not using snapshots, or still waiting for the snapshot to be painted),
2946         push the WKView's live layer tree into the thumbnail view.
2947
2948         * UIProcess/API/mac/WKViewInternal.h:
2949         * UIProcess/WebPageProxy.cpp:
2950         (WebKit::WebPageProxy::internalShowContextMenu):
2951         * UIProcess/WebPageProxy.h:
2952         * WebProcess/WebPage/WebPage.h:
2953         * WebProcess/WebPage/WebPage.messages.in:
2954         * WebProcess/WebPage/WebPage.cpp:
2955         (WebKit::WebPage::takeThumbnailSnapshot):
2956         Add a message that asynchronously returns a snapshot that respects the
2957         current thumbnail scale and position.
2958
2959         (WebKit::WebPage::scaledSnapshotWithOptions):
2960         Use some nullptr.
2961
2962         * WebProcess/WebPage/DrawingArea.cpp:
2963         (WebKit::DrawingArea::transform):
2964         * WebProcess/WebPage/DrawingArea.h:
2965         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2966         Add a getter for the DrawingArea's transform.
2967         Rename it to rootLayerTransform.
2968
2969 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
2970
2971         Use RunLoop objects through references instead of pointers
2972         https://bugs.webkit.org/show_bug.cgi?id=130313
2973
2974         Reviewed by Andreas Kling.
2975
2976         Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
2977         return RunLoop reference instead of a pointer.
2978
2979         * DatabaseProcess/DatabaseProcess.cpp:
2980         (WebKit::DatabaseProcess::didClose):
2981         (WebKit::DatabaseProcess::didReceiveInvalidMessage):
2982         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2983         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2984         * NetworkProcess/NetworkProcess.cpp:
2985         (WebKit::NetworkProcess::didClose):
2986         (WebKit::NetworkProcess::didReceiveInvalidMessage):
2987         * NetworkProcess/NetworkResourceLoader.cpp:
2988         (WebKit::NetworkResourceLoader::continueWillSendRequest):
2989         * Platform/IPC/Connection.cpp:
2990         (IPC::Connection::SyncMessageState::getOrCreate):
2991         (IPC::Connection::SyncMessageState::SyncMessageState):
2992         (IPC::Connection::SyncMessageState::~SyncMessageState):
2993         (IPC::Connection::SyncMessageState::processIncomingMessage):
2994         (IPC::Connection::SyncMessageState::dispatchMessages):
2995         (IPC::Connection::createServerConnection):
2996         (IPC::Connection::createClientConnection):
2997         (IPC::Connection::Connection):
2998         (IPC::Connection::addWorkQueueMessageReceiver):
2999         (IPC::Connection::removeWorkQueueMessageReceiver):
3000         (IPC::Connection::sendSyncMessage):
3001         (IPC::Connection::sendSyncMessageFromSecondaryThread):
3002         (IPC::Connection::waitForSyncReply):
3003         (IPC::Connection::processIncomingMessage):
3004         (IPC::Connection::connectionDidClose):
3005         (IPC::Connection::dispatchDidReceiveInvalidMessage):
3006         (IPC::Connection::enqueueIncomingMessage):
3007         (IPC::Connection::wakeUpRunLoop):
3008         * Platform/IPC/Connection.h:
3009         * Platform/IPC/mac/ConnectionMac.cpp:
3010         (IPC::Connection::receiveSourceEventHandler):
3011         * Shared/ChildProcess.cpp:
3012         (WebKit::ChildProcess::stopRunLoop):
3013         * Shared/Plugins/NPObjectProxy.cpp:
3014         (WebKit::NPObjectProxy::NP_Deallocate):
3015         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
3016         (WebKit::ProcessLauncher::launchProcess):
3017         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3018         (WebKit::ProcessLauncher::launchProcess):
3019         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3020         (WebKit::connectToService):
3021         (WebKit::tryPreexistingProcess):
3022         (WebKit::createProcess):
3023         * UIProcess/Storage/StorageManager.cpp:
3024         (WebKit::StorageManager::getOrigins):
3025         (WebKit::StorageManager::getStorageDetailsByOrigin):
3026         * UIProcess/Storage/StorageManager.h:
3027         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3028         (WebKit::NetscapePlugin::pluginThreadAsyncCall):
3029         * WebProcess/Plugins/PluginView.cpp:
3030         (WebKit::PluginView::unprotectPluginFromDestruction):
3031         * WebProcess/WebPage/EventDispatcher.cpp:
3032         (WebKit::EventDispatcher::wheelEvent):
3033         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
3034         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
3035         * WebProcess/WebPage/WebPage.cpp:
3036         (WebKit::WebPage::close):
3037
3038 2014-03-17  Giovanni Campagna  <gcampagna@src.gnome.org>
3039
3040         [GTK] Don't busy loop when the socket is full
3041         https://bugs.webkit.org/show_bug.cgi?id=129802
3042
3043         Reviewed by Carlos Garcia Campos.
3044
3045         When the socket is full and we see EAGAIN or EWOULDBLOCK
3046         (because the socket is non blocking), don't busy loop by
3047         tring to write again, instead poll() until the socket
3048         becomes writable.
3049
3050         * Platform/IPC/unix/ConnectionUnix.cpp:
3051         (IPC::Connection::sendOutgoingMessage):
3052
3053 2014-03-17  Martin Robinson  <mrobinson@igalia.com>
3054
3055         [GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
3056         https://bugs.webkit.org/show_bug.cgi?id=130155
3057
3058         Reviewed by Philippe Normand.
3059
3060         * PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.
3061
3062 2014-03-17  Ryuan Choi  <ryuan.choi@samsung.com>
3063
3064         [EFL][WK2] Restore cursor when moving mouse into webview
3065         https://bugs.webkit.org/show_bug.cgi?id=130182
3066
3067         Reviewed by Gyuyoung Kim.
3068
3069         We changed mouse cursor when the type of cursor is changed.
3070         But once mouse is moved out of webview, ewebkit will not know whether cursor
3071         is changed or not.
3072
3073         So, this patch added a logic to restore the last applied type of cursor when
3074         mouse is moved into webview again.
3075
3076         * UIProcess/API/efl/EwkView.cpp:
3077         (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
3078         Call updateCursor to restore the last applied type of cursor.
3079         (EwkView::EwkView):
3080         (EwkView::updateCursor): Extracted from setCursor.
3081         (EwkView::setCursor):
3082         (EwkView::handleEvasObjectAdd):
3083         * UIProcess/API/efl/EwkView.h:
3084
3085 2014-03-16  Ryuan Choi  <ryuan.choi@samsung.com>
3086
3087         [EFL][WK2] Add ewk_application_cache_manager APIs
3088         https://bugs.webkit.org/show_bug.cgi?id=102853
3089
3090         Reviewed by Gyuyoung Kim.
3091
3092         Implemented application cache manager to get list of origins which stores
3093         application cache and remove specified origin or all.
3094
3095         * PlatformEfl.cmake: Added newly added files.
3096         * UIProcess/API/efl/ewk_application_cache_manager.cpp: Added.
3097         (EwkApplicationCacheManager::EwkApplicationCacheManager):
3098         (EwkApplicationCacheManager::~EwkApplicationCacheManager):
3099         (Get_Origins_Data::Get_Origins_Data):
3100         (getApplicationCacheOriginsCallback):
3101         (ewk_application_cache_manager_origins_get):
3102         (ewk_application_cache_origins_free):
3103         (ewk_application_cache_manager_delete_all):
3104         (ewk_application_cache_manager_delete):
3105         * UIProcess/API/efl/ewk_application_cache_manager.h: Added.
3106         * UIProcess/API/efl/ewk_application_cache_manager_private.h: Added.
3107         (EwkApplicationCacheManager::impl):
3108         * UIProcess/API/efl/ewk_context.cpp:
3109         (EwkContext::applicationCacheManager):
3110         (ewk_context_application_cache_manager_get):
3111         * UIProcess/API/efl/ewk_context.h:
3112         * UIProcess/API/efl/ewk_context_private.h:
3113         * UIProcess/API/efl/ewk_security_origin_private.h:
3114         (EwkSecurityOrigin::wkSecurityOrigin):
3115         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
3116         (EWK2UnitTestServer::port):
3117         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
3118         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
3119         Added to test application_cache_manager.
3120         (serverCallback):
3121         (getOriginsCallback):
3122         (timerCallback):
3123         (TEST_F):
3124         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3125         Added test case to test getter of application_cache_manager.
3126         (TEST_F):
3127
3128 2014-03-16  Zan Dobersek  <zdobersek@igalia.com>
3129
3130         Move GTK WebKit2 code to std::unique_ptr
3131         https://bugs.webkit.org/show_bug.cgi?id=129672
3132
3133         Reviewed by Anders Carlsson.
3134
3135         Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.
3136
3137         * Shared/Downloads/Download.h:
3138         * Shared/Downloads/soup/DownloadSoup.cpp:
3139         (WebKit::Download::start):
3140         (WebKit::Download::startWithHandle):
3141         (WebKit::Download::platformInvalidate):
3142         * UIProcess/API/gtk/PageClientImpl.cpp:
3143         * UIProcess/API/gtk/PageClientImpl.h:
3144         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
3145         (webkitContextMenuItemCreate):
3146         (webkitContextMenuItemCreateForGtkItem):
3147         (webkit_context_menu_item_new):
3148         (webkit_context_menu_item_new_from_stock_action):
3149         (webkit_context_menu_item_new_from_stock_action_with_label):
3150         (webkit_context_menu_item_new_with_submenu):
3151         (webkit_context_menu_item_new_separator):
3152         * UIProcess/API/gtk/WebKitTextChecker.h:
3153         * UIProcess/API/gtk/WebKitWebContext.cpp:
3154         (createDefaultWebContext):
3155         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3156         (webkitWebViewBaseConstructed):
3157         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
3158         (WebKit::WebPrintOperationGtk::print):
3159         * WebProcess/gtk/WebGtkExtensionManager.cpp:
3160         (WebKit::WebGtkExtensionManager::initialize):
3161         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
3162         (webkitSoupRequestInputStreamPendingReadAsyncComplete):
3163         (webkitSoupRequestInputStreamReadAsync):
3164         * WebProcess/soup/WebSoupRequestManager.cpp:
3165         (WebKit::WebSoupRequestManager::send):
3166         * WebProcess/soup/WebSoupRequestManager.h:
3167
3168 2014-03-16  Brian Burg  <bburg@apple.com>
3169
3170         Web Inspector: vended backend commands file should be generated as part of the build
3171         https://bugs.webkit.org/show_bug.cgi?id=130110
3172
3173         Reviewed by Timothy Hatcher.
3174
3175         * PlatformGTK.cmake: Copy over generated inspector backend commands files.
3176
3177 2014-03-16  Darin Adler  <darin@apple.com>
3178
3179         Try to fix 32-bit Mac build.
3180
3181         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Add missing include.
3182
3183 2014-03-16  Philippe Normand  <pnormand@igalia.com>
3184
3185         Unreviewed, GTK build fix after r165692.
3186
3187         * UIProcess/gtk/TextCheckerGtk.cpp:
3188         (WebKit::TextChecker::checkSpellingOfString):
3189         (WebKit::TextChecker::checkGrammarOfString):
3190
3191 2014-03-15  Darin Adler  <darin@apple.com>
3192
3193         Remove all uses of deprecatedCharacters from WebKit2
3194         https://bugs.webkit.org/show_bug.cgi?id=130197
3195
3196         Reviewed by Andreas Kling.
3197
3198         * Shared/APIString.h: Rewrote getCharacters to use StringView,
3199         substring, and getCharactersWithUpconvert. Added an 8-bit case
3200         to getUTF8CString.
3201
3202         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
3203         (WebKit::writeByte): Added.
3204         (WebKit::writeCharacter): Added.
3205         (WebKit::writeLine): Added. Uses operator[] instead of characters16 to get
3206         the UTF-16 characters out of the string.
3207         (WebKit::NetscapePluginModule::scanPlugin): Replaced code that writes out
3208         text to stdout with much simpler version using the functions above.
3209
3210         * UIProcess/TextChecker.h: Changed text arguments to use StringView instead
3211         of UChar/int pairs.
3212
3213         * UIProcess/WebPageProxy.cpp:
3214         (WebKit::WebPageProxy::internalShowContextMenu): Updated to pass StringView.
3215
3216         * UIProcess/efl/TextCheckerEfl.cpp:
3217         (WebKit::nextWordOffset): Changed function to use StringView and unsigned.
3218         (WebKit::TextChecker::checkTextOfParagraph): Changed to use StringView and
3219         substring.
3220         (WebKit::TextChecker::checkSpellingOfString): Ditto.
3221         (WebKit::TextChecker::checkGrammarOfString): Ditto.
3222         (WebKit::TextChecker::requestCheckingOfString): Pass in a StringView, so no
3223         need to call deprecatedCharacters.
3224
3225         * UIProcess/ios/TextCheckerIOS.mm:
3226         (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView.
3227         (WebKit::TextChecker::checkSpellingOfString): Ditto.
3228         (WebKit::TextChecker::checkGrammarOfString): Ditto.
3229
3230         * UIProcess/mac/TextCheckerMac.mm:
3231         (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView and
3232         use StringView::createNSStringWithoutCopying.
3233         (WebKit::TextChecker::checkSpellingOfString): CHanged to take StringView.
3234         (WebKit::TextChecker::checkGrammarOfString): Ditto.
3235
3236         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3237         (WebKit::convertStringToKeyCodes): Changed to take StringView and use
3238         upconvertedCharacters instead of deprecatedCharacters. Also use move instead
3239         of swap.
3240         (WebKit::NetscapePlugin::sendComplexTextInput): Updated to new style for loop.
3241
3242         * WebProcess/WebPage/EncoderAdapter.cpp:
3243         (WebKit::EncoderAdapter::encodeString): Use StringView::upconvertedCharacters
3244         instead of String::deprecatedCharacters.
3245
3246 2014-03-15  David Kilzer  <ddkilzer@apple.com>
3247
3248         [iOS] Define SYSTEM_VERSION_PREFIX consistently
3249         <http://webkit.org/b/130293>
3250         <rdar://problem/15926359>
3251
3252         Reviewed by Dan Bernstein.
3253
3254         * Configurations/Version.xcconfig:
3255         (SYSTEM_VERSION_PREFIX): Sync with
3256         Source/WebKit/mac/Version.xcconfig.
3257
3258 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
3259
3260         [Mac] Sync extended attribute related rules with AppSandbox profile
3261         https://bugs.webkit.org/show_bug.cgi?id=130263
3262         <rdar://problem/16318965>
3263
3264         Reviewed by Sam Weinig.
3265
3266         Update the fix to use a different syntax in some OS versions.
3267
3268         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3269         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3270         * WebProcess/com.apple.WebProcess.sb.in:
3271
3272 2014-03-14  Ryosuke Niwa  <rniwa@webkit.org>
3273
3274         Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
3275
3276         * UIProcess/API/Cocoa/WKBackForwardList.h:
3277         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
3278         * UIProcess/API/Cocoa/WKNavigation.h:
3279         * UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
3280         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
3281         (NS_ENUM):
3282         * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
3283         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
3284         * UIProcess/API/Cocoa/WKWebView.h:
3285
3286 2014-03-14  Mark Rowe  <mrowe@apple.com>
3287
3288         Fix the production build.
3289
3290         Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
3291         be at the expected relative path when working from installed source.
3292
3293         * Configurations/Base.xcconfig:
3294
3295 2014-03-14  Maciej Stachowiak  <mjs@apple.com>
3296
3297         Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
3298         https://bugs.webkit.org/show_bug.cgi?id=130276
3299         <rdar://problem/16266927>
3300         
3301         Reviewed by Simon Fraser.
3302
3303         * Shared/AsyncRequest.cpp:
3304         * Shared/AsyncRequest.h:
3305         * Shared/ContextMenuContextData.cpp:
3306         * Shared/ContextMenuContextData.h:
3307         * Shared/Databases/DatabaseProcessCreationParameters.h:
3308         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
3309         * Shared/Databases/IndexedDB/IDBUtilities.h:
3310         * Shared/mac/RemoteLayerBackingStore.h:
3311         * Shared/mac/RemoteLayerBackingStore.mm:
3312         * UIProcess/API/Cocoa/WKBackForwardList.h:
3313         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Removed.
3314         * UIProcess/API/Cocoa/WKNavigation.h:
3315         * UIProcess/API/Cocoa/WKNavigationAction.h: Removed.
3316         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
3317         * UIProcess/API/Cocoa/WKNavigationResponse.h: Removed.
3318         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Added.
3319         (NS_ENUM):
3320         * UIProcess/API/Cocoa/WKWebView.h:
3321         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
3322         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
3323         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
3324         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3325         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
3326         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3327         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3328         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
3329         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
3330         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
3331         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
3332         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3333         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
3334         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
3335         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3336         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3337         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
3338         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
3339         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
3340         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
3341
3342 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
3343
3344         [iOS WK2] background-attachment: fixed renders oddly, moves around
3345         https://bugs.webkit.org/show_bug.cgi?id=130277
3346         <rdar://problem/16332883>
3347
3348         Reviewed by Tim Horton.
3349         
3350         Actually send scrolling and counter-scrolling layers to the UI process!
3351
3352         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3353         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
3354         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
3355
3356 2014-03-14  Anders Carlsson  <andersca@apple.com>
3357
3358         Try to fix the iOS build.
3359
3360         * UIProcess/mac/WebContextMac.mm:
3361
3362 2014-03-14  Anders Carlsson  <andersca@apple.com>
3363
3364         Begin work on the bundle parameter API
3365         https://bugs.webkit.org/show_bug.cgi?id=130267
3366
3367         Reviewed by Dan Bernstein.
3368
3369         * Shared/WebProcessCreationParameters.cpp:
3370         (WebKit::WebProcessCreationParameters::encode):
3371         (WebKit::WebProcessCreationParameters::decode):
3372         * Shared/WebProcessCreationParameters.h:
3373         * UIProcess/API/Cocoa/WKProcessPool.mm:
3374         (-[WKProcessPool _objectForBundleParameter:]):
3375         (-[WKProcessPool _setObject:forBundleParameter:]):
3376         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3377         * UIProcess/WebContext.h:
3378         (WebKit::WebContext::bundleParameters):
3379         * UIProcess/mac/WebContextMac.mm:
3380         (WebKit::WebContext::ensureBundleParameters):
3381         (WebKit::WebContext::platformInitializeWebProcess):
3382
3383 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
3384
3385         [Mac] Sync extended attribute related rules with AppSandbox profile
3386         https://bugs.webkit.org/show_bug.cgi?id=130263
3387         <rdar://problem/16318965>
3388
3389         Reviewed by Sam Weinig.
3390
3391         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3392         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
3393         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3394         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
3395         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
3396         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
3397         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
3398         * WebProcess/com.apple.WebProcess.sb.in:
3399
3400 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
3401
3402         [iOS WK2] Improve behavior of fixed elments on zooming
3403         https://bugs.webkit.org/show_bug.cgi?id=130253
3404
3405         Reviewed by Beth Dakin.
3406
3407         Correctly reposition right- and bottom-relative position:fixed
3408         elements on zooming in WK2 iOS by telling the scrolling tree
3409         about zoom-related viewport changes.
3410
3411         * Shared/mac/RemoteLayerTreeTransaction.h:
3412         (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged):
3413         Drive-by cleanup; typedef the flags field to an unsigned, to avoid ugly casting.
3414         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3415         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Pass out a flag to say
3416         if the update contained a new fixed or sticky layer.
3417         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
3418         (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
3419         Call into the new ScrolingTree::viewportChangedViaDelegatedScrolling().
3420         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3421         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: If we got a new fixed
3422         or sticky layer, set fixedOrStickyLayerChanged to true.
3423         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
3424         * UIProcess/ios/WKContentView.mm:
3425         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
3426         Remember both the old zoomScale and the filteredScale, since the fixed position rect
3427         should be computed using the unfiltered scale.
3428         Some FloatRect -> CGRect changes.
3429         Now call viewportChangedViaDelegatedScrolling() on the scrolling coordinator.
3430         (-[WKContentView fixedPositionRectFromExposedRect:scale:]): Call the
3431         FrameView function to compute the iOS fixed position rect.
3432         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3433         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): If the update
3434         got a new fixed or sticky layer, run the scrolling tree logic to make sure
3435         it gets into the right place.
3436         * UIProcess/mac/RemoteLayerTreeHost.mm:
3437         (WebKit::RemoteLayerTreeHost::updateLayerTree): If we logged here,
3438         we'd log twice if the tiled scrolling indicator was enabled, so 
3439         hoisted the logging out into the caller.
3440
3441 2014-03-14  Landry Breuil  <landry@openbsd.org>
3442
3443         Use the correct type in webkitSoupRequestInputStreamNew()'s declaration.
3444         Nhttps://bugs.webkit.org/show_bug.cgi?id=129974
3445
3446         Reviewed by Andreas Kling.
3447
3448         * WebProcess/soup/WebKitSoupRequestInputStream.h:
3449
3450 2014-03-14  Anders Carlsson  <andersca@apple.com>
3451
3452         Fix crash when resizing the visited link table
3453         https://bugs.webkit.org/show_bug.cgi?id=130257
3454         <rdar://problem/16328177>
3455
3456         Reviewed by Dan Bernstein.
3457
3458         We're iterating over the old table, so use currentTableSize in the loop termination condition.
3459
3460         * UIProcess/VisitedLinkProvider.cpp:
3461         (WebKit::VisitedLinkProvider::resizeTable):
3462
3463 2014-03-14  Dan Bernstein  <mitz@apple.com>
3464
3465         [Cocoa] Expose a way to set the cookie accept policy
3466         https://bugs.webkit.org/show_bug.cgi?id=130251
3467
3468         Reviewed by Anders Carlsson.
3469
3470         * UIProcess/API/Cocoa/WKProcessPool.mm:
3471         (toHTTPCookieAcceptPolicy): Added a helper function that maps from NSHTTPCookieAcceptPolicy
3472         values to WebKit::HTTPCookieAcceptPolicy values.
3473         (-[WKProcessPool _setCookieAcceptPolicy:]): Added. Calls
3474         WebCookieManagerProxy::setHTTPCookieAcceptPolicy. 
3475         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared new method.
3476
3477 2014-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3478
3479         [GTK] WebKit2WebExtension GIR can't be used in vala
3480         https://bugs.webkit.org/show_bug.cgi?id=127179
3481
3482         Reviewed by Martin Robinson.
3483
3484         Do not include all WebKit2 gir symbols from WebKit2WebExtension gir
3485         file.
3486
3487         * GNUmakefile.am:
3488         * PlatformGTK.cmake:
3489
3490 2014-03-14  Csaba Osztrogonác  <ossy@webkit.org>
3491
3492         [CMake] URTBF after r165619.
3493
3494         * CMakeLists.txt: Add new files.
3495
3496 2014-03-14  Anders Carlsson  <andersca@apple.com>
3497
3498         Remove WebContext::addVisitedLink
3499         https://bugs.webkit.org/show_bug.cgi?id=130242
3500
3501         Reviewed by Dan Bernstein.
3502
3503         Fold the function into WKContextAddVisitedLink instead.
3504
3505         * UIProcess/API/C/WKContext.cpp:
3506         (WKContextAddVisitedLink):
3507         * UIProcess/WebContext.cpp:
3508         * UIProcess/WebContext.h:
3509         (WebKit::WebContext::visitedLinkProvider):
3510
3511 2014-03-13  Anders Carlsson  <andersca@apple.com>
3512
3513         Move visited link handling to VisitedLinkTableController and VisitedLinkProvider
3514         https://bugs.webkit.org/show_bug.cgi?id=130223