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