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