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