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