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