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