Removing PAGE_VISIBILITY_API compile guard.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-06-21  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2
3         Removing PAGE_VISIBILITY_API compile guard.
4         https://bugs.webkit.org/show_bug.cgi?id=133844
5
6         Reviewed by Gavin Barraclough.
7
8         * Configurations/FeatureDefines.xcconfig:
9         * WebProcess/WebPage/WebPage.cpp:
10         (WebKit::WebPage::updatePreferences):
11
12 2014-06-20  Anders Carlsson  <andersca@apple.com>
13
14         Implement more of LegacySessionStateDecoder
15         https://bugs.webkit.org/show_bug.cgi?id=134145
16
17         Reviewed by Sam Weinig.
18
19         * Shared/SessionState.h:
20         * UIProcess/mac/LegacySessionStateCoding.cpp:
21         (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntry):
22         (WebKit::HistoryEntryDataDecoder::HistoryEntryDataDecoder):
23         (WebKit::HistoryEntryDataDecoder::finishDecoding):
24         (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData):
25         * UIProcess/mac/LegacySessionStateCoding.h:
26
27 2014-06-20  Anders Carlsson  <andersca@apple.com>
28
29         Implement more of LegacySessionStateDecoder
30         https://bugs.webkit.org/show_bug.cgi?id=134144
31
32         Reviewed by Sam Weinig.
33
34         * Shared/SessionState.cpp:
35         (WebKit::BackForwardListState::encode):
36         (WebKit::SessionState::encode): Deleted.
37         * Shared/SessionState.h:
38         * UIProcess/mac/LegacySessionStateCoding.cpp:
39         (WebKit::LegacySessionStateDecoder::decodeSessionState):
40         (WebKit::LegacySessionStateDecoder::decodeSessionHistory):
41         (WebKit::LegacySessionStateDecoder::decodeV0SessionHistory):
42         (WebKit::LegacySessionStateDecoder::decodeV1SessionHistory):
43         (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntries):
44         (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntry):
45         * UIProcess/mac/LegacySessionStateCoding.h:
46
47 2014-06-20  Ryuan Choi  <ryuan.choi@samsung.com>
48
49         Unreviewed. build fix for the cmake based ports since r170188
50
51         * CMakeLists.txt: Added LegacySessionState.cpp in source list.
52
53 2014-06-20  Dan Bernstein  <mitz@apple.com>
54
55         [Cocoa] No way to get the main frame’s main resource’s data
56         https://bugs.webkit.org/show_bug.cgi?id=134113
57
58         Reviewed by Sam Weinig.
59
60         * UIProcess/API/Cocoa/WKWebView.mm:
61         (-[WKWebView _getMainResourceDataWithCompletionHandler:]): Added. Calls
62         WebPageProxy::getMainResourceDataOfFrame and invokes the completion handler form the
63         callback.
64         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.
65
66         * UIProcess/WebPageProxy.cpp:
67         (WebKit::WebPageProxy::getMainResourceDataOfFrame): Made it safe to pass a NULL frame into
68         this function.
69
70 2014-06-20  Anders Carlsson  <andersca@apple.com>
71
72         Introduce a WKSessionStateRef object
73         https://bugs.webkit.org/show_bug.cgi?id=134136
74
75         Reviewed by Tim Horton.
76
77         WKSessionStateRef is going to hold session state, making it possible to migrate state from one 
78         webpage to another without having to do any serialization/deserialization.
79
80         * Shared/API/c/WKBase.h:
81         * Shared/APIObject.h:
82         * Shared/SessionState.cpp:
83         (WebKit::SessionState::encode):
84         * Shared/SessionState.h:
85         * UIProcess/API/APISessionState.cpp: Added.
86         (API::SessionState::create):
87         (API::SessionState::SessionState):
88         (API::SessionState::~SessionState):
89         * UIProcess/API/APISessionState.h:
90         * UIProcess/API/C/WKAPICast.h:
91         * UIProcess/API/C/WKSessionStateRef.cpp:
92         (WKSessionStateCreateFromData):
93         * UIProcess/API/C/WKSessionStateRef.h:
94         * UIProcess/mac/LegacySessionStateCoding.cpp:
95         (WebKit::LegacySessionStateDecoder::LegacySessionStateDecoder):
96         (WebKit::LegacySessionStateDecoder::~LegacySessionStateDecoder):
97         (WebKit::LegacySessionStateDecoder::decodeSessionState):
98         * UIProcess/mac/LegacySessionStateCoding.h:
99         * WebKit2.xcodeproj/project.pbxproj:
100
101 2014-06-19  Enrica Casucci  <enrica@apple.com>
102
103         iOS WebKit2: selection handles become too large when zooming a page.
104         https://bugs.webkit.org/show_bug.cgi?id=134084
105         <rdar://problem/16799164>
106
107         Reviewed by Benjamin Poulain.
108
109         Since the document view is zoomed, we add a subview that has the inverse transform
110         of the document view. This new view becomes the root for the selection hierarchy.
111         The new view has zero size, not to interfere with the existing gestures on the WKContenView
112         therefore we implement hitTest to detect interaction with the selection elements.
113
114         * UIProcess/ios/WKContentView.mm:
115         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
116         * UIProcess/ios/WKContentViewInteraction.h:
117         * UIProcess/ios/WKContentViewInteraction.mm:
118         (-[WKContentView setupInteraction]):
119         (-[WKContentView cleanupInteraction]):
120         (-[WKContentView unscaledView]):
121         (-[WKContentView inverseScale]):
122         (-[WKContentView _updateUnscaledView]):
123         (-[WKContentView hitTest:withEvent:::]):
124         (-[WKContentView selectedTextRange]):
125
126 2014-06-20  Timothy Horton  <timothy_horton@apple.com>
127
128         Snapshotting WKThumbnailViews should not tell Web processes backing unparented WKViews that they're in window
129         https://bugs.webkit.org/show_bug.cgi?id=134134
130         <rdar://problem/17402119>
131
132         Reviewed by Anders Carlsson.
133
134         * UIProcess/API/mac/WKView.mm:
135         (-[WKView _setThumbnailView:]):
136         Re-evaluating our in-window state is only useful if we're going to use the live layer tree;
137         snapshots can be taken of unparented views with no trouble. Plus, doing so sets off a chain of
138         expensive things in the Web process which we can avoid if using snapshots.
139
140 2014-06-20  Timothy Horton  <timothy_horton@apple.com>
141
142         WKThumbnailView should only use live layer trees before the snapshot arrives for parented WKViews
143         https://bugs.webkit.org/show_bug.cgi?id=134129
144         <rdar://problem/17401591>
145
146         Reviewed by Anders Carlsson.
147
148         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
149         (-[_WKThumbnailView initWithFrame:fromWKView:]):
150         Add a white background to WKThumbnailView, so that if we have no snapshot and no layer tree,
151         the view isn't transparent.
152
153         * UIProcess/API/mac/WKView.mm:
154         (-[WKView _updateThumbnailViewLayer]):
155         We currently pull the live layer tree into the WKThumbnailView even in snapshot mode,
156         before the snapshot arrives, to avoid flashing when transitioning a live WKView to a thumbnail view.
157         This is, however, not useful for unparented WKViews, because their layer tree will be detached
158         and we'll flash anyway. So, only do that when the WKView is parented.
159
160 2014-06-20  Geoffrey Garen  <ggaren@apple.com>
161
162         WebKit delegate methods should document their default behaviors
163         https://bugs.webkit.org/show_bug.cgi?id=134132
164
165         Reviewed by Dan Bernstein.
166
167         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
168         * UIProcess/API/Cocoa/WKUIDelegate.h:
169
170 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
171
172         Fix lots of WK2 test crashes.
173
174         We don't always have a ScrollingCoordinator.
175
176         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
177         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
178
179 2014-06-20  Anders Carlsson  <andersca@apple.com>
180
181         Always use XPC on iOS
182         https://bugs.webkit.org/show_bug.cgi?id=134130
183
184         Reviewed by Sam Weinig.
185
186         * UIProcess/ios/WebProcessProxyIOS.mm:
187         (WebKit::WebProcessProxy::platformGetLaunchOptions):
188         (WebKit::shouldUseXPC): Deleted.
189
190 2014-06-20  Anders Carlsson  <andersca@apple.com>
191
192         Fix build.
193
194         * Shared/SessionState.cpp:
195
196 2014-06-20  Anders Carlsson  <andersca@apple.com>
197
198         Add ArgumentEncoder support to PageState and friends
199         https://bugs.webkit.org/show_bug.cgi?id=134128
200
201         Reviewed by Andreas Kling.
202
203         Change the classes to structs, get rid of the constructors/destructors
204         and add encode member functions.
205
206         * Shared/SessionState.cpp:
207         (WebKit::HTTPBody::Element::encode):
208         (WebKit::HTTPBody::encode):
209         (WebKit::FrameState::encode):
210         (WebKit::PageState::encode):
211         (WebKit::HTTPBody::Element::Element): Deleted.
212         (WebKit::HTTPBody::Element::~Element): Deleted.
213         (WebKit::FrameState::FrameState): Deleted.
214         (WebKit::FrameState::~FrameState): Deleted.
215         (WebKit::PageState::PageState): Deleted.
216         (WebKit::PageState::~PageState): Deleted.
217         * Shared/SessionState.h:
218         (WebKit::HTTPBody::Element::type): Deleted.
219
220 2014-06-20  Anders Carlsson  <andersca@apple.com>
221
222         Add encoding and decoding support for WTF::Optional
223         https://bugs.webkit.org/show_bug.cgi?id=134125
224
225         Reviewed by Andreas Kling.
226
227         * Platform/IPC/ArgumentCoders.h:
228         (IPC::ArgumentCoder<WTF::Optional<T>>::encode):
229         (IPC::ArgumentCoder<WTF::Optional<T>>::decode):
230
231 2014-06-20  Anders Carlsson  <andersca@apple.com>
232
233         Give NPAPI post requests a default content type
234         https://bugs.webkit.org/show_bug.cgi?id=134120
235
236         Reviewed by Andreas Kling.
237
238         * WebProcess/Plugins/PluginView.cpp:
239         (WebKit::PluginView::loadURL):
240
241 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
242
243         Always commit the scrolling tree when we flush layers
244         https://bugs.webkit.org/show_bug.cgi?id=134115
245
246         Reviewed by Beth Dakin.
247         
248         The scrolling state tree contains bare pointers to GraphicsLayers, which get
249         converted to CALayers at commit time. To avoid a window of time where those
250         GraphicsLayer pointers go stale, commit the scrolling tree whenever we flush the
251         compositing layer tree.
252
253         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
254         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
255
256 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
257
258         [iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
259         https://bugs.webkit.org/show_bug.cgi?id=134085
260         <rdar://problem/16440586>
261
262         Reviewed by Tim Horton.
263         
264         Add some debug-only assertions that check that the number of nodes we encoded is
265         the expected number.
266
267         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
268         (WebKit::encodeNodeAndDescendants):
269         (WebKit::RemoteScrollingCoordinatorTransaction::encode):
270
271 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
272
273         Handle scrolling tree modifications which remove intermediate nodes
274         https://bugs.webkit.org/show_bug.cgi?id=134082
275
276         Reviewed by Tim Horton.
277
278         When updating the scrolling tree from the state tree, we failed to maintain
279         the children arrays correctly. Fix by removing all children on scrolling nodes,
280         and allowing the calls on children to add them back. A temporary hash map
281         keeps the nodes alive.
282         
283         The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
284         to make it easier to handle removal followed by re-insertion.
285
286         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
287         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
288         (WebKit::RemoteScrollingTreeTextStream::dump):
289
290 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
291
292         Make ScrollingTreeNodes refounted, for easier tree reconfiguration
293         https://bugs.webkit.org/show_bug.cgi?id=134075
294
295         Reviewed by Tim Horton.
296
297         Make ScrollingTreeNode be ref-counted.
298
299         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
300         (WebKit::RemoteScrollingTree::createNode):
301         * UIProcess/Scrolling/RemoteScrollingTree.h:
302         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
303         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
304         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
305         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
306         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
307         (WebKit::RemoteScrollingCoordinator::createScrollingTreeNode):
308
309 2014-06-20  Dan Bernstein  <mitz@apple.com>
310
311         [Cocoa] No way to get the MIME type of the main frame
312         https://bugs.webkit.org/show_bug.cgi?id=134111
313
314         Reviewed by Anders Carlsson.
315
316         * UIProcess/API/Cocoa/WKWebView.mm:
317         (-[WKWebView _MIMEType]): Added. Returns the MIME type of the main frame, or nil.
318         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
319
320 2014-06-20  Joseph Pecoraro  <pecoraro@apple.com>
321
322         [iOS]: Overrelease of RetainPtr object in file upload
323         https://bugs.webkit.org/show_bug.cgi?id=134072
324
325         Reviewed by Brady Eidson.
326
327         This ivar is a RetainPtr, the release will be done automatically
328         for us when we assign to nil or destruct.
329
330         * UIProcess/ios/WKContentViewInteraction.mm:
331         (-[WKContentView fileUploadPanelDidDismiss:]):
332
333 2014-06-20  Anders Carlsson  <andersca@apple.com>
334
335         Begin stubbing out new session state classes
336         https://bugs.webkit.org/show_bug.cgi?id=134110
337
338         Reviewed by Geoffrey Garen.
339
340         The basic idea is that these classes will replace the data blobs representing HistoryItems
341         that we currently send back and forth between the web and UI processes.
342         
343         * Shared/SessionState.cpp: Added.
344         (WebKit::HTTPBody::Element::Element):
345         (WebKit::HTTPBody::Element::~Element):
346         (WebKit::FrameState::FrameState):
347         (WebKit::FrameState::~FrameState):
348         (WebKit::PageState::PageState):
349         (WebKit::PageState::~PageState):
350         * Shared/SessionState.h: Added.
351         (WebKit::HTTPBody::Element::type):
352         * WebKit2.xcodeproj/project.pbxproj:
353
354 2014-06-20  Anders Carlsson  <andersca@apple.com>
355
356         Rename SessionState to LegacySessionState
357         https://bugs.webkit.org/show_bug.cgi?id=134107
358
359         Reviewed by Dan Bernstein.
360
361         * Shared/LegacySessionState.cpp: Renamed from Source/WebKit2/Shared/SessionState.cpp.
362         (IPC::ArgumentCoder<RefPtr<T>>::encode):
363         (IPC::ArgumentCoder<RefPtr<T>>::decode):
364         (WebKit::LegacySessionState::LegacySessionState):
365         (WebKit::LegacySessionState::isEmpty):
366         (WebKit::LegacySessionState::encode):
367         (WebKit::LegacySessionState::decode):
368         * Shared/LegacySessionState.h: Renamed from Source/WebKit2/Shared/SessionState.h.
369         (WebKit::LegacySessionState::list):
370         (WebKit::LegacySessionState::currentIndex):
371         * Shared/WebPageCreationParameters.h:
372         * UIProcess/WebPageProxy.cpp:
373         (WebKit::WebPageProxy::creationParameters):
374         * UIProcess/cf/WebPageProxyCF.cpp:
375         (WebKit::WebPageProxy::restoreFromSessionStateData):
376         * WebKit2.xcodeproj/project.pbxproj:
377         * WebProcess/WebPage/WebPage.cpp:
378         (WebKit::WebPage::restoreSession):
379         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
380         * WebProcess/WebPage/WebPage.h:
381         * WebProcess/WebPage/WebPage.messages.in:
382
383 2014-06-20  Anders Carlsson  <andersca@apple.com>
384
385         Document the underlying types of the WKWindowFeatures rect properties
386         https://bugs.webkit.org/show_bug.cgi?id=134103
387
388         Reviewed by Dan Bernstein.
389
390         * UIProcess/API/Cocoa/WKWindowFeatures.h:
391
392 2014-06-20  Zan Dobersek  <zdobersek@igalia.com>
393
394         PluginProcessMainUnix should only scan for plugins when X11 plugin architecture is enabled
395         https://bugs.webkit.org/show_bug.cgi?id=134098
396
397         Reviewed by Carlos Garcia Campos.
398
399         * PluginProcess/unix/PluginProcessMainUnix.cpp: Guard the call to NetscapePluginModule::scanPlugin()
400         with PLUGIN_ARCHITECTURE(X11) since the declaration has the same build guard. In case the X11 plugin
401         architecture is not enabled the program exits with EXIT_FAILURE.
402
403 2014-06-20  Tim Horton  <timothy_horton@apple.com>
404
405         LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
406         https://bugs.webkit.org/show_bug.cgi?id=134050
407         <rdar://problem/17315114>
408
409         Reviewed by Simon Fraser.
410
411         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
412         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
413         (WebKit::PlatformCALayerRemote::layerPool):
414         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
415         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
416         (WebKit::RemoteLayerTreeContext::layerPool):
417         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
418         (WebKit::RemoteLayerTreeContext::buildTransaction):
419         Ensure that layers being committed are always in the context that is committing them.
420         Use a LayerPool per RemoteLayerTreeContext, to avoid moving layers between contexts.
421
422 2014-06-20  Tim Horton  <timothy_horton@apple.com>
423
424         WKContentViewInteraction isn't cleaned up when the Web Content process crashes
425         https://bugs.webkit.org/show_bug.cgi?id=134080
426         <rdar://problem/17387652> and <rdar://problem/16848360>
427
428         Reviewed by Benjamin Poulain.
429
430         * UIProcess/ios/WKContentView.mm:
431         (-[WKContentView _processDidExit]):
432         Tear down WKContentViewInteraction when the process crashes.
433
434         (-[WKContentView _didRelaunchProcess]):
435         Set WKContentViewInteraction back up when the process is relaunched.
436
437         * UIProcess/ios/WKContentViewInteraction.mm:
438         (-[WKContentView cleanupInteraction]):
439         Clear the SmartMagnificationController, which is a message receiver and thus must be re-created with the new page.
440         Remove all gesture recognizers from the content view.
441         Clear _fileUploadPanel, else we'll get an assert the next time we try to open one.
442
443         * UIProcess/WebPageProxy.cpp:
444         (WebKit::WebPageProxy::resetStateAfterProcessExited):
445         Give the PageClient a chance to clean up *before* we clean up internals;
446         it is at a higher level and some cleanup depends on WebPageProxy members
447         not having been cleared yet.
448
449 2014-06-19  Dan Bernstein  <mitz@apple.com>
450
451         Removed unused SPI -[WKWebView _runJavaScriptInMainFrame:].
452
453         Rubber-stamped by Simon Fraser.
454
455         * UIProcess/API/Cocoa/WKWebView.mm:
456         (-[WKWebView _runJavaScriptInMainFrame:]): Deleted.
457         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
458
459 2014-06-19  Dan Bernstein  <mitz@apple.com>
460
461         Use a single map for all callback types in WebPageProxy
462         https://bugs.webkit.org/show_bug.cgi?id=134069
463
464         Reviewed by Tim Horton.
465
466         * UIProcess/GenericCallback.h:
467         (WebKit::CallbackMap::take):
468         * UIProcess/WebPageProxy.cpp:
469         (WebKit::WebPageProxy::printFinishedCallback):
470         (WebKit::WebPageProxy::resetState):
471         (WebKit::WebPageProxy::drawPagesForPrinting):
472         * UIProcess/WebPageProxy.h:
473         * UIProcess/mac/WebPageProxyMac.mm:
474         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
475         (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
476
477 2014-06-19  Anders Carlsson  <andersca@apple.com>
478
479         Another build fix attempt.
480
481         * Shared/API/Cocoa/WKFoundation.h:
482
483 2014-06-19  Dan Bernstein  <mitz@apple.com>
484
485         [iOS] Legacy processes are installed inside WebKit.framework
486         https://bugs.webkit.org/show_bug.cgi?id=134079
487
488         Reviewed by Anders Carlsson.
489
490         * Configurations/All.xcconfig: Exclude the legacy processes on iOS so they don’t get copied.
491         * Configurations/BaseLegacyProcess.xcconfig: Set SKIP_INSTALL to YES on iOS.
492
493 2014-06-19  Anders Carlsson  <andersca@apple.com>
494
495         It's OS X, not OSX...
496
497         * Shared/API/Cocoa/WKFoundation.h:
498
499 2014-06-19  Antti Koivisto  <antti@apple.com>
500
501         Unfreeze the layer tree on DidFirstVisuallyNonEmptyLayout
502         https://bugs.webkit.org/show_bug.cgi?id=134073
503
504         Reviewed by Simon Fraser.
505         
506         DidFirstLayout is too early and we usually get a blank page. This doesn't match the existing iOS behavior either.
507
508         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
509         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
510         * WebProcess/WebPage/WebPage.cpp:
511         (WebKit::WebPage::WebPage):
512
513 2014-06-19  Anders Carlsson  <andersca@apple.com>
514
515         Try to fix the Mavericks build.
516
517         * Shared/API/Cocoa/WKFoundation.h:
518
519 2014-06-19  Sam Weinig  <sam@webkit.org>
520
521         [Cocoa] Need SPI to determine if the WKWebView is displaying a standalone image
522         https://bugs.webkit.org/show_bug.cgi?id=134071
523
524         Reviewed by Anders Carlsson.
525
526         * UIProcess/API/Cocoa/WKWebView.mm:
527         (-[WKWebView _isDisplayingStandaloneImageDocument]):
528         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
529
530 2014-06-19  Dan Bernstein  <mitz@apple.com>
531
532         Use a single map for all callback types in WebPageProxy
533         https://bugs.webkit.org/show_bug.cgi?id=134069
534
535         Reviewed by Anders Carlsson.
536
537         * UIProcess/GenericCallback.h:
538         (WebKit::CallbackBase::as): Added. Performs a dynamic cast to a specific callback type.
539         (WebKit::CallbackBase::CallbackBase): Added a type parameter, which is used to initialize
540         the new m_type member.
541         (WebKit::GenericCallback::GenericCallback): Pass the type to the base class constructor.
542         (WebKit::GenericCallback::type): Added. Returns a unique type.
543         (WebKit::GenericCallback::invalidate): Now virtual.
544
545         (WebKit::CallbackMap::put): Adds the callback to the map.
546         (WebKit::CallbackMap::take): Removes the callback from the map, and dynamically casts it to
547         the specified type.
548         (WebKit::CallbackMap::invalidate): Invalidates the map.
549
550         * UIProcess/WebPageProxy.cpp:
551         (WebKit::WebPageProxy::validateCommand):
552         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
553         (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
554         (WebKit::WebPageProxy::getSourceForFrame):
555         (WebKit::WebPageProxy::getContentsAsString):
556         (WebKit::WebPageProxy::getBytecodeProfile):
557         (WebKit::WebPageProxy::getSelectionOrContentsAsString):
558         (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
559         (WebKit::WebPageProxy::getMainResourceDataOfFrame):
560         (WebKit::WebPageProxy::getResourceDataFromFrame):
561         (WebKit::WebPageProxy::getWebArchiveOfFrame):
562         (WebKit::WebPageProxy::forceRepaint):
563         (WebKit::WebPageProxy::clearLoadDependentCallbacks):
564         (WebKit::WebPageProxy::voidCallback):
565         (WebKit::WebPageProxy::dataCallback):
566         (WebKit::WebPageProxy::imageCallback):
567         (WebKit::WebPageProxy::stringCallback):
568         (WebKit::WebPageProxy::scriptValueCallback):
569         (WebKit::WebPageProxy::computedPagesCallback):
570         (WebKit::WebPageProxy::validateCommandCallback):
571         (WebKit::WebPageProxy::unsignedCallback):
572         (WebKit::WebPageProxy::editingRangeCallback):
573         (WebKit::WebPageProxy::rectForCharacterRangeCallback):
574         (WebKit::WebPageProxy::resetState):
575         (WebKit::WebPageProxy::computePagesForPrinting):
576         (WebKit::WebPageProxy::drawRectToImage):
577         (WebKit::WebPageProxy::drawPagesToPDF):
578         (WebKit::WebPageProxy::getMarkedRangeAsync):
579         (WebKit::WebPageProxy::getSelectedRangeAsync):
580         (WebKit::WebPageProxy::characterIndexForPointAsync):
581         (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
582         (WebKit::WebPageProxy::takeSnapshot):
583         * UIProcess/WebPageProxy.h:
584         * UIProcess/ios/WebPageProxyIOS.mm:
585         (WebKit::WebPageProxy::gestureCallback):
586         (WebKit::WebPageProxy::touchesCallback):
587         (WebKit::WebPageProxy::autocorrectionDataCallback):
588         (WebKit::WebPageProxy::dictationContextCallback):
589         (WebKit::WebPageProxy::autocorrectionContextCallback):
590         (WebKit::WebPageProxy::selectWithGesture):
591         (WebKit::WebPageProxy::updateSelectionWithTouches):
592         (WebKit::WebPageProxy::requestAutocorrectionData):
593         (WebKit::WebPageProxy::applyAutocorrection):
594         (WebKit::WebPageProxy::requestDictationContext):
595         (WebKit::WebPageProxy::requestAutocorrectionContext):
596         (WebKit::WebPageProxy::selectWithTwoTouches):
597
598 2014-06-19  Anders Carlsson  <andersca@apple.com>
599
600         No way to handle HTTP Authentication with WKWebView
601         https://bugs.webkit.org/show_bug.cgi?id=134067
602         <rdar://problem/17317874>
603
604         Reviewed by Dan Bernstein.
605
606         Add a public webView:didReceiveAuthenticationChallenge:completionHandler: delegate method and get rid of the SPI.
607         
608         * Shared/API/Cocoa/WKFoundation.h:
609         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
610         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
611         * UIProcess/Cocoa/NavigationState.mm:
612         (WebKit::NavigationState::setNavigationDelegate):
613         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
614
615 2014-06-18  Roger Fong  <roger_fong@apple.com>
616
617         Don't kill the UIProcess until all local storage transactions have been committed.
618         https://bugs.webkit.org/show_bug.cgi?id=134042.
619         <rdar://problem/16660724>.
620
621         Reviewed by Anders Carlsson.
622
623         * UIProcess/API/mac/WKView.mm: Add a listener for the application will terminate notification.
624         (-[WKView _applicationWillTerminate:]):
625         (-[WKView initWithFrame:context:configuration:webView:]):
626         * UIProcess/WebContext.cpp: Calls code in StorageManager to cleanup local storage transactions upon application termination.
627         (WebKit::WebContext::applicationWillTerminate):
628         * UIProcess/WebContext.h:
629
630         * UIProcess/Storage/StorageManager.cpp:
631         (WebKit::StorageManager::applicationWillTerminate):
632         Dispatch local storage cleanup task to background thread and make sure the UIProcess can't exit early.
633         * UIProcess/Storage/StorageManager.h:
634
635 2014-06-19  Oliver Hunt  <oliver@apple.com>
636
637         Switch to using the process parameters during initialisation
638         to determine whether we hsould be using the network process.
639
640         RS=Sam Weinig
641
642         * WebProcess/cocoa/WebProcessCocoa.mm:
643         (WebKit::WebProcess::platformInitializeWebProcess):
644
645 2014-06-19  Pratik Solanki  <psolanki@apple.com>
646
647         Copy SharedBuffer data into IPC message directly
648         https://bugs.webkit.org/show_bug.cgi?id=133920
649
650         Reviewed by Anders Carlsson.
651
652         When data array callbacks are enabled, we currently merge all the CFDataRefs in SharedBuffer
653         into one contiguous memory buffer when creating IPC::DataReference. This patch creates a
654         subclass of DataReference that uses SharedBuffer::getSomeData() to copy the data directly
655         into the IPC message.
656
657         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
658         (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
659         * Platform/IPC/ArgumentEncoder.cpp:
660         (IPC::ArgumentEncoder::reserve): Added.
661         (IPC::ArgumentEncoder::grow):
662         * Platform/IPC/ArgumentEncoder.h:
663         * Platform/IPC/DataReference.cpp:
664         (IPC::SharedBufferDataReference::encode):
665         * Platform/IPC/DataReference.h:
666         (IPC::DataReference::~DataReference):
667
668 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
669
670         Unreviewed. Fixing the GTK+ build after r170114.
671
672         * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
673         (webkit_authentication_request_get_proposed_credential):
674         The core() accessor has been renamed to credential().
675
676 2014-06-18  Dan Bernstein  <mitz@apple.com>
677
678         Try to fix the Mountain Lion build.
679
680         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
681         * UIProcess/Cocoa/NavigationState.mm:
682         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
683
684 2014-06-18  Tim Horton  <timothy_horton@apple.com>
685
686         Remove RemoteLayerBackingStore’s RemoteLayerTreeContext pointer
687         https://bugs.webkit.org/show_bug.cgi?id=134055
688
689         Reviewed by Simon Fraser.
690
691         * Shared/mac/RemoteLayerBackingStore.h:
692         * Shared/mac/RemoteLayerBackingStore.mm:
693         (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
694         (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
695         (WebKit::RemoteLayerBackingStore::ensureBackingStore):
696         (WebKit::RemoteLayerBackingStore::display):
697         (WebKit::RemoteLayerBackingStore::drawInContext):
698         Remove RemoteLayerBackingStore's RemoteLayerTreeContext pointer. Instead, use the PlatformCALayer's.
699         Pass the PlatformCALayer in to the constructor, and remove it from ensureBackingStore();
700         RemoteLayerBackingStore is (for now) strictly tied to a single layer.
701
702         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
703         (WebKit::PlatformCALayerRemote::ensureBackingStore):
704         (WebKit::PlatformCALayerRemote::updateBackingStore):
705         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
706         (WebKit::PlatformCALayerRemote::context):
707
708 2014-06-18  Dan Bernstein  <mitz@apple.com>
709
710         [Cocoa] Modernize one-method authentication
711         https://bugs.webkit.org/show_bug.cgi?id=134051
712
713         Reviewed by Anders Carlsson.
714
715         Instead of an NSURLConnection-style delegate method that takes a challenge and responds to
716         its sender, provide an NSURLSession-style method that takes a challenge and a completion
717         handler.
718
719         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method, replacing
720         old unused method.
721         * UIProcess/Cocoa/NavigationState.h: Renamed flag in m_navigationDelegateMethods struct.
722         * UIProcess/Cocoa/NavigationState.mm:
723         (WebKit::NavigationState::setNavigationDelegate): Check for new delegate method and update
724         new flag.
725
726         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
727         the delegate implements the new method, return true (if it cannot handle the protection
728         space, it can reject it through the completion handler), except for server-trust
729         authentication, which is not supported yet.
730         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
731         delegate implements the new method, call it, passing a completion handler that calls the
732         right AuthenticationDecisionListener function based on its disposition and credential
733         parameters.
734
735 2014-06-18  Anders Carlsson  <andersca@apple.com>
736
737         Make FrameLoadType a strongly typed enum
738         https://bugs.webkit.org/show_bug.cgi?id=134047
739
740         Reviewed by Andreas Kling.
741
742         * UIProcess/WebPageProxy.cpp:
743         (WebKit::WebPageProxy::didCommitLoadForFrame):
744         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
745         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
746         * WebProcess/WebPage/WebPage.cpp:
747         (WebKit::WebPage::goForward):
748         (WebKit::WebPage::goBack):
749         (WebKit::WebPage::goToBackForwardItem):
750         (WebKit::shouldReuseCommittedSandboxExtension):
751         (WebKit::WebPage::didCommitLoad):
752
753 2014-06-18  Anders Carlsson  <andersca@apple.com>
754
755         Simplify WebSecurityOrigin
756         https://bugs.webkit.org/show_bug.cgi?id=134049
757
758         Reviewed by Andreas Kling.
759
760         * Shared/API/c/WKSecurityOrigin.cpp:
761         (WKSecurityOriginCreateFromString):
762         (WKSecurityOriginCreateFromDatabaseIdentifier):
763         (WKSecurityOriginCopyDatabaseIdentifier):
764         (WKSecurityOriginCopyToString):
765         (WKSecurityOriginCopyProtocol):
766         (WKSecurityOriginCopyHost):
767         (WKSecurityOriginGetPort):
768         * Shared/WebSecurityOrigin.h:
769         (WebKit::WebSecurityOrigin::securityOrigin):
770         (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): Deleted.
771         (WebKit::WebSecurityOrigin::protocol): Deleted.
772         (WebKit::WebSecurityOrigin::host): Deleted.
773         (WebKit::WebSecurityOrigin::port): Deleted.
774         (WebKit::WebSecurityOrigin::databaseIdentifier): Deleted.
775         (WebKit::WebSecurityOrigin::toString): Deleted.
776         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
777         (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
778         (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
779         * UIProcess/Storage/StorageManager.cpp:
780         (WebKit::StorageManager::deleteEntriesForOrigin):
781         * UIProcess/Storage/StorageManager.h:
782         * UIProcess/WebApplicationCacheManagerProxy.cpp:
783         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
784         * UIProcess/WebDatabaseManagerProxy.cpp:
785         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
786         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
787         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
788         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
789         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
790         (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
791         (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
792         * UIProcess/WebKeyValueStorageManager.cpp:
793         (WebKit::didGetStorageDetailsByOrigin):
794         * UIProcess/WebOriginDataManagerProxy.cpp:
795         (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
796         * UIProcess/WebPageProxy.cpp:
797         (WebKit::WebPageProxy::exceededDatabaseQuota):
798         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
799         * UIProcess/WebResourceCacheManagerProxy.cpp:
800         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
801         * UIProcess/ios/WKGeolocationProviderIOS.mm:
802         (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
803         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
804         (WebKit::WebChromeClient::exceededDatabaseQuota):
805
806 2014-06-18  Anders Carlsson  <andersca@apple.com>
807
808         Add back WKPageRunJavaScriptInMainFrame_b for now
809         https://bugs.webkit.org/show_bug.cgi?id=134045
810         <rdar://problem/17368879>
811
812         Reviewed by Tim Horton.
813
814         Reverted changeset:
815
816         "Remove WKPageRunJavaScriptInMainFrame_b"
817         https://bugs.webkit.org/show_bug.cgi?id=133926
818         http://trac.webkit.org/changeset/169991
819
820 2014-06-18  Anders Carlsson  <andersca@apple.com>
821
822         Simplify WebPageProxy::saveRecentSearches and WebPageProxy::loadRecentSearches
823         https://bugs.webkit.org/show_bug.cgi?id=134041
824
825         Reviewed by Andreas Kling.
826
827         * UIProcess/cf/WebPageProxyCF.cpp:
828         (WebKit::WebPageProxy::saveRecentSearches):
829         (WebKit::WebPageProxy::loadRecentSearches):
830
831 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
832
833         Make ScrollingStateNodes refcounted, and other minor cleanup
834         https://bugs.webkit.org/show_bug.cgi?id=134040
835
836         Reviewed by Beth Dakin.
837
838         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
839         (WebKit::encodeNodeAndDescendants):
840
841 2014-06-18  Benjamin Poulain  <benjamin@webkit.org>
842
843         [iOS][WK2] Do not add padding when magnifying replaced elements
844         https://bugs.webkit.org/show_bug.cgi?id=134019
845
846         Reviewed by Tim Horton.
847
848         Having margins for regular blocks make sense to improve readability. For replaced elements,
849         we should follow iOS's UI and display edge to edge.
850
851         * UIProcess/ios/SmartMagnificationController.mm:
852         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
853
854 2014-06-18  Benjamin Poulain  <bpoulain@apple.com>
855
856         [iOS][WK2] Re-sync didCommitLoadForMainFrame with its corresponding tile update
857         https://bugs.webkit.org/show_bug.cgi?id=134009
858
859         Reviewed by Tim Horton.
860
861         WKWebView assumed the first _didCommitLayerTree: after _didCommitLoadForMainFrame
862         had the state of the page being loaded.
863
864         This is not always true. Sometimes, a set of tiles can be rendering asynchronously while the next
865         page is loaded, and does not flush the queue until after didCommitLoadForMainFrame is executed.
866
867         Tim introduced a transactionID with each layer tree update. This patch uses that to synchronize
868         WKWebView with the right set of tiles.
869
870         * UIProcess/API/Cocoa/WKWebView.mm:
871         (-[WKWebView _didCommitLoadForMainFrame]):
872         (-[WKWebView _didCommitLayerTree:WebKit::]):
873         (-[WKWebView _updateVisibleContentRects]):
874         * UIProcess/WebPageProxy.h:
875         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
876         (WebKit::RemoteLayerTreeDrawingAreaProxy::nextLayerTreeTransactionID):
877         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
878         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
879         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
880         (WebKit::RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree):
881         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
882         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
883
884 2014-06-18  Anders Carlsson  <andersca@apple.com>
885
886         Simplify WebCredential
887         https://bugs.webkit.org/show_bug.cgi?id=134036
888
889         Reviewed by Andreas Kling.
890
891         * UIProcess/API/C/WKCredential.cpp:
892         (WKCredentialCreate):
893         (WKCredentialCreateWithCertificateInfo):
894         (WKCredentialCopyUser):
895         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
896         (WebKit::AuthenticationChallengeProxy::useCredential):
897         * UIProcess/Authentication/WebCredential.cpp:
898         (WebKit::WebCredential::credential):
899         (WebKit::WebCredential::core): Deleted.
900         (WebKit::WebCredential::user): Deleted.
901         * UIProcess/Authentication/WebCredential.h:
902         (WebKit::WebCredential::create): Deleted.
903
904 2014-06-18  Anders Carlsson  <andersca@apple.com>
905
906         Adopt modern C++11 loops and fix WebArchive creation functions
907         https://bugs.webkit.org/show_bug.cgi?id=134032
908
909         Reviewed by Andreas Kling.
910
911         * Shared/APIWebArchive.cpp:
912         (API::WebArchive::WebArchive):
913
914 2014-06-18  Anders Carlsson  <andersca@apple.com>
915
916         Give WKWebView on iOS a mobile user agent
917         https://bugs.webkit.org/show_bug.cgi?id=134034
918         <rdar://problem/17346489>
919
920         Reviewed by Enrica Casucci.
921
922         * UIProcess/API/Cocoa/WKWebView.mm:
923         (-[WKWebView initWithFrame:configuration:]):
924
925 2014-06-18  Joseph Pecoraro  <pecoraro@apple.com>
926
927         Remove stale include, header was removed in r170101.
928
929         Unreviewed build fix.
930
931         * Shared/API/Cocoa/WebKitPrivate.h:
932
933 2014-06-18  Anders Carlsson  <andersca@apple.com>
934
935         Add CF type cast function templates and use them in KeyedDecoder in WebKit2
936         https://bugs.webkit.org/show_bug.cgi?id=134033
937
938         Reviewed by Sam Weinig.
939
940         * Shared/cf/KeyedDecoder.cpp:
941         (WebKit::KeyedDecoder::KeyedDecoder):
942         (WebKit::KeyedDecoder::decodeBytes):
943         (WebKit::KeyedDecoder::decodeBool):
944         (WebKit::KeyedDecoder::decodeInt32):
945         (WebKit::KeyedDecoder::decodeInt64):
946         (WebKit::KeyedDecoder::decodeFloat):
947         (WebKit::KeyedDecoder::decodeDouble):
948         (WebKit::KeyedDecoder::decodeString):
949         (WebKit::KeyedDecoder::beginObject):
950         (WebKit::KeyedDecoder::beginArray):
951         (WebKit::KeyedDecoder::beginArrayElement):
952
953 2014-06-18  Dan Bernstein  <mitz@apple.com>
954
955         Remove the unused _WKBackForwardListDidChangeNotification.
956
957         Reviewed by Anders Carlsson.
958
959         * UIProcess/API/Cocoa/WKBackForwardList.mm:
960         * UIProcess/API/Cocoa/WKBackForwardListInternal.h:
961         * UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Removed.
962         * UIProcess/Cocoa/NavigationState.h:
963         * UIProcess/Cocoa/NavigationState.mm:
964         (WebKit::NavigationState::LoaderClient::didChangeBackForwardList): Deleted.
965         * WebKit2.xcodeproj/project.pbxproj:
966
967 2014-06-18  Andreas Kling  <akling@apple.com>
968
969         Set main thread QoS policies after IPC initialization.
970         <https://webkit.org/b/134014>
971
972         Something was flipping the QoS level back to "unspecified" after
973         setting it in the ChildProcess initialization code. Pending a better
974         understanding of what really happens, move the code to a later stage,
975         after IPC channels are up and running. Now the priority sticks.
976
977         Reviewed by Anders Carlsson.
978
979         * NetworkProcess/NetworkProcess.cpp:
980         (WebKit::NetworkProcess::initializeNetworkProcess):
981         * Shared/ChildProcess.cpp:
982         (WebKit::ChildProcess::initialize):
983         * WebProcess/WebProcess.cpp:
984         (WebKit::WebProcess::initializeWebProcess):
985
986 2014-06-17  Dan Bernstein  <mitz@apple.com>
987
988         [Cocoa] WKWebView's _privateBrowsingEnabled property is unused
989         https://bugs.webkit.org/show_bug.cgi?id=134013
990
991         Reviewed by Sam Weinig.
992
993         * UIProcess/API/Cocoa/WKWebView.mm:
994         (-[WKWebView _privateBrowsingEnabled]): Deleted.
995         (-[WKWebView _setPrivateBrowsingEnabled:]): Deleted.
996         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
997
998 2014-06-17  Tim Horton  <timothy_horton@apple.com>
999
1000         [iOS][wk2] Use ImageDocument to display subframe PDFs
1001         https://bugs.webkit.org/show_bug.cgi?id=133944
1002         <rdar://problem/17205983>
1003
1004         Reviewed by Dan Bates.
1005
1006         * WebProcess/WebPage/WebPage.cpp:
1007         (WebKit::WebPage::updatePreferences):
1008         Always use ImageDocument for subframe PDFs in WebKit2 on iOS.
1009
1010 2014-06-17  Anders Carlsson  <andersca@apple.com>
1011
1012         Make it possible to use -[NSBundle classNamed:] to find WebKitLegacy classes
1013         https://bugs.webkit.org/show_bug.cgi?id=134008
1014         <rdar://problem/17037600>
1015
1016         Reviewed by Dan Bernstein.
1017
1018         * UIProcess/API/Cocoa/LegacyBundleForClass.mm: Added.
1019         * WebKit2.xcodeproj/project.pbxproj:
1020
1021 2014-06-17  Anders Carlsson  <andersca@apple.com>
1022
1023         Expose the location of website data
1024         https://bugs.webkit.org/show_bug.cgi?id=134000
1025         <rdar://problem/17350498>
1026
1027         Reviewed by Dan Bernstein.
1028
1029         Also, remove the bundle ID from the website data path for containerized apps.
1030
1031         * Shared/mac/SandboxUtilities.cpp:
1032         (WebKit::processIsAppSandboxed):
1033         * Shared/mac/SandboxUtilities.h:
1034         * UIProcess/API/Cocoa/WKProcessPool.mm:
1035         (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
1036         (websiteDataDirectoryURL):
1037         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1038
1039 2014-06-17  Jeremy Jones  <jeremyj@apple.com>
1040
1041         Improve enter and exit fullscreen transition by using two step transition.
1042         https://bugs.webkit.org/show_bug.cgi?id=133706
1043
1044         Reviewed by Simon Fraser.
1045
1046         Add setupFullscreen()/didSetupFullscreen() and cleanupFullscreen()/didCleanupFullscreen()
1047         to the proxies. And refactor enter/exit fullscreen to do some of the work in setup/cleanup.
1048
1049         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1050         Add four methods mentioned above.
1051         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1052         Add Setup/Cleanup functions.
1053         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1054         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): does what enterFullscreen used to do.
1055         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): forward IPC.
1056         (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen): forward IPC.
1057         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID): changed to enterFullscreen
1058         * WebProcess/ios/WebVideoFullscreenManager.h: Add didSetup/didCleanup
1059         * WebProcess/ios/WebVideoFullscreenManager.messages.in: Add didSetup/didCleanup
1060         * WebProcess/ios/WebVideoFullscreenManager.mm: 
1061         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): refactored,
1062         some implementation moves to didSetupFullscreen.
1063         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
1064         Moves the video layer over to the hosted layer, and initiates fullscreen.
1065         (WebKit::WebVideoFullscreenManager::didExitFullscreen): refactored,
1066         some implementation moves to didCleanupFullscreen, and initiates cleanup.
1067         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
1068         Final cleanup refactored from didExitFullscreen()
1069
1070 2014-06-17  Eric Carlson  <eric.carlson@apple.com>
1071
1072         [iOS] enable background audio in WK2
1073         https://bugs.webkit.org/show_bug.cgi?id=133996
1074
1075         Reviewed by Jer Noble.
1076
1077         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist: Mark as
1078             allowed to play audio when in the background.
1079         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.
1080
1081 2014-06-17  Simon Fraser  <simon.fraser@apple.com>
1082
1083         [UI-side compositing] fix reflections on composited layers
1084         https://bugs.webkit.org/show_bug.cgi?id=133942
1085
1086         Reviewed by Tim Horton.
1087         
1088         Fix reflections on composited layers. There are two main set of changes.
1089         
1090         First, a PlatformCALayerRemote which is a clone has to track the layer
1091         it is a clone of, so it knows where to grab the contents from in the UI process.
1092         This layer may be told that its contents need updating out of order during
1093         recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext
1094         to allow a layer to add itself to the set of layers requiring commit.
1095         
1096         In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree()
1097         to go through clones, and copy their contents from the origin layer.
1098         
1099         The second set of changes makes platformCALayerLayerDidDisplay() work for
1100         UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*.
1101         PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know
1102         what the origin layer is.
1103
1104         * Shared/mac/RemoteLayerBackingStore.mm:
1105         (WebKit::RemoteLayerBackingStore::display): Remove the early return so we can always
1106         call platformCALayerLayerDidDisplay().
1107         * Shared/mac/RemoteLayerTreeTransaction.h:
1108         * Shared/mac/RemoteLayerTreeTransaction.mm:
1109         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1110         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1111         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1112         (WebKit::dumpChangedLayers):
1113         * UIProcess/mac/RemoteLayerTreeHost.mm:
1114         (WebKit::RemoteLayerTreeHost::updateLayerTree):
1115         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1116         (WebKit::PlatformCALayerRemote::clone):
1117         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1118         (WebKit::PlatformCALayerRemote::copyContentsFromLayer):
1119         (WebKit::PlatformCALayerRemote::setClonedLayer):
1120         (WebKit::PlatformCALayerRemote::setContentsChanged): Deleted.
1121         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1122         (WebKit::PlatformCALayerRemote::properties):
1123         (WebKit::PlatformCALayerRemote::context):
1124
1125 2014-06-17  Anders Carlsson  <andersca@apple.com>
1126
1127         Remove session state methods from WKBrowsingContextController
1128         https://bugs.webkit.org/show_bug.cgi?id=133995
1129
1130         Reviewed by Dan Bernstein.
1131
1132         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
1133         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1134         (-[WKBrowsingContextController sessionState]): Deleted.
1135         (-[WKBrowsingContextController restoreFromSessionState:]): Deleted.
1136
1137 2014-06-17  Brady Eidson  <beidson@apple.com>
1138
1139         Only show telephone number highlights if only one number is selected
1140         <rdar://problem/16874568> and https://bugs.webkit.org/show_bug.cgi?id=133989
1141
1142         Reviewed by Tim Horton.
1143
1144         Add a flag to TelephoneNumberData to remember if it was hovered over:
1145         * WebProcess/WebPage/TelephoneNumberOverlayController.h:
1146         (WebKit::TelephoneNumberData::hovered):
1147         (WebKit::TelephoneNumberData::setHovered):
1148         (WebKit::TelephoneNumberData::TelephoneNumberData):
1149
1150         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
1151         (WebKit::TelephoneNumberOverlayController::drawRect): Only draw the highlight if one
1152           phone number is selected.
1153         (WebKit::TelephoneNumberOverlayController::mouseEvent): Update the hover state of the
1154           current phone number, and setNeedsDisplay if the hover state changes.
1155         (WebKit::TelephoneNumberOverlayController::clearHighlights):
1156
1157 2014-06-17  Tim Horton  <timothy_horton@apple.com>
1158
1159         Remove WKContentView _setFindIndicator:fadeOut:animate:
1160         https://bugs.webkit.org/show_bug.cgi?id=133976
1161
1162         Reviewed by Anders Carlsson.
1163
1164         Find indicators are totally internal to FindController on iOS,
1165         we don't need to push them to the content view via PageClient,
1166         so this code was unused.
1167
1168         * UIProcess/ios/PageClientImplIOS.mm:
1169         (WebKit::PageClientImpl::setFindIndicator):
1170         * UIProcess/ios/WKContentView.h:
1171         * UIProcess/ios/WKContentView.mm:
1172         (-[WKContentView _setFindIndicator:WebKit::fadeOut:animate:]): Deleted.
1173
1174 2014-06-17  Andreas Kling  <akling@apple.com>
1175
1176         Web process main thread priority is lower than some network process threads.
1177         <https://webkit.org/b/133987>
1178         <rdar://problem/17330300>
1179
1180         Mark the main thread as "user initiated" in process entry.
1181
1182         Reviewed by Maciej Stachowiak.
1183
1184         * Shared/ChildProcess.cpp:
1185         (WebKit::ChildProcess::initialize):
1186
1187 2014-06-17  Anders Carlsson  <andersca@apple.com>
1188
1189         Add SPI to get the NSURLRequest from a WKNavigationResponse
1190         https://bugs.webkit.org/show_bug.cgi?id=133984
1191         <rdar://problem/17006399>
1192
1193         Reviewed by Dan Bernstein.
1194
1195         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
1196         (-[WKNavigationResponse _request]):
1197         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
1198         * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h:
1199         * UIProcess/Cocoa/NavigationState.mm:
1200         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
1201
1202 2014-06-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1203
1204         [EFL][WK2] Skip failing EFL API tests
1205         https://bugs.webkit.org/show_bug.cgi?id=133981
1206
1207         Reviewed by Csaba Osztrogonác.
1208
1209         UserMessage, WillLoad and test_ewk2_view have been failed since r169784.
1210
1211         * PlatformEfl.cmake:
1212
1213 2014-06-17  Zan Dobersek  <zdobersek@igalia.com>
1214
1215         Unreviewed build fix for the GTK+ port. Removing the *Callback::create() wrappings
1216         for lambda callbacks that aren't required anymore after the changes in r170041.
1217
1218         * UIProcess/API/gtk/WebKitWebView.cpp:
1219         (webkit_web_view_can_execute_editing_command):
1220         (webkit_web_view_run_javascript):
1221         (resourcesStreamReadCallback):
1222         (webkit_web_view_save):
1223         (webkit_web_view_save_to_file):
1224
1225 2014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
1226
1227         Unreviewed build fix when MHTML is enabled after r170041
1228
1229         * UIProcess/API/C/WKPage.cpp:
1230         (WKPageGetContentsAsMHTMLData):
1231
1232 2014-06-16  Dan Bernstein  <mitz@apple.com>
1233
1234         Part 2 of: Change GenericCallback<> function parameters into std::function<>
1235         https://bugs.webkit.org/show_bug.cgi?id=133927
1236
1237         Reviewed by Sam Weinig.
1238
1239         * UIProcess/API/C/WKPage.cpp:
1240         (WKPageRunJavaScriptInMainFrame):
1241         (WKPageRenderTreeExternalRepresentation):
1242         (WKPageGetSourceForFrame):
1243         (WKPageGetContentsAsString):
1244         (WKPageGetBytecodeProfile):
1245         (WKPageGetSelectionAsWebArchiveData):
1246         (WKPageValidateCommand):
1247         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1248         (WKPluginSiteDataManagerClearSiteData):
1249         (WKPluginSiteDataManagerClearAllSiteData):
1250         * UIProcess/API/Cocoa/WKWebView.mm:
1251         (-[WKWebView evaluateJavaScript:completionHandler:]):
1252         * UIProcess/API/mac/WKView.mm:
1253         (-[WKView validateUserInterfaceItem:]):
1254         (-[WKView startSpeaking:]):
1255         (-[WKView selectedRangeWithCompletionHandler:]):
1256         (-[WKView markedRangeWithCompletionHandler:]):
1257         (-[WKView hasMarkedTextWithCompletionHandler:]):
1258         (-[WKView firstRectForCharacterRange:completionHandler:]):
1259         (-[WKView characterIndexForPoint:completionHandler:]):
1260         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1261         (WebKit::WebPluginSiteDataManager::clearSiteData):
1262         * UIProcess/Plugins/WebPluginSiteDataManager.h:
1263         * UIProcess/WebPageProxy.cpp:
1264         (WebKit::WebPageProxy::validateCommand):
1265         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
1266         (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
1267         (WebKit::WebPageProxy::getSourceForFrame):
1268         (WebKit::WebPageProxy::getContentsAsString):
1269         (WebKit::WebPageProxy::getBytecodeProfile):
1270         (WebKit::WebPageProxy::getContentsAsMHTMLData):
1271         (WebKit::WebPageProxy::getSelectionOrContentsAsString):
1272         (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
1273         (WebKit::WebPageProxy::getMarkedRangeAsync):
1274         (WebKit::WebPageProxy::getSelectedRangeAsync):
1275         (WebKit::WebPageProxy::characterIndexForPointAsync):
1276         (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
1277         (WebKit::WebPageProxy::takeSnapshot):
1278         * UIProcess/WebPageProxy.h:
1279         * UIProcess/ios/WKContentViewInteraction.mm:
1280         (-[WKContentView _define:]):
1281         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
1282         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1283         (-[WKContentView requestDictationContext:]):
1284         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1285         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
1286         * UIProcess/ios/WebPageProxyIOS.mm:
1287         (WebKit::WebPageProxy::updateSelectionWithTouches):
1288         (WebKit::WebPageProxy::requestAutocorrectionData):
1289         (WebKit::WebPageProxy::applyAutocorrection):
1290         (WebKit::WebPageProxy::requestDictationContext):
1291         (WebKit::WebPageProxy::requestAutocorrectionContext):
1292
1293 2014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
1294
1295         Unreviewed build fix after r170029
1296
1297         Use String() instead of AtomicString().
1298
1299         * UIProcess/InspectorServer/HTTPRequest.cpp:
1300         (WebKit::HTTPRequest::parseHeaders):
1301
1302 2014-06-16  Brent Fulgham  <bfulgham@apple.com>
1303
1304         [Win] Use TileController on Windows
1305         https://bugs.webkit.org/show_bug.cgi?id=133895
1306
1307         Reviewed by Tim Horton.
1308
1309         * WebProcess/WebPage/mac/PlatformCALayerRemote.h: Remove
1310         unneeded overload.
1311
1312 2014-06-16  Timothy Horton  <timothy_horton@apple.com>
1313
1314         [iOS][wk2] Swipe snapshots are removed too quickly if there is no saved render tree size
1315         https://bugs.webkit.org/show_bug.cgi?id=133891
1316
1317         Reviewed by Simon Fraser.
1318
1319         * UIProcess/ios/ViewGestureControllerIOS.mm:
1320         (WebKit::ViewGestureController::endSwipeGesture):
1321         (WebKit::ViewGestureController::setRenderTreeSize):
1322         If we don't know the target render tree size, wait until the first layer tree commit
1323         that comes in, instead of removing the snapshot when the gesture ends.
1324
1325 2014-06-16  Timothy Horton  <timothy_horton@apple.com>
1326
1327         [iOS][wk2] Swiping back briefly shows the previous page before loading the new one
1328         https://bugs.webkit.org/show_bug.cgi?id=133885
1329
1330         Reviewed by Simon Fraser.
1331
1332         Remove a race between the UI and Web processes when removing the swipe snapshot.
1333         Previously, it was possible to get a commit from the Web process with layer content
1334         (and render tree size) from the previous page *after* sending the navigation request
1335         to the page, because of the asynchronicity of layer tree commits. This could cause
1336         the snapshot to be removed early (if the previous fully-loaded page had a sufficiently
1337         large render tree size), revealing the old tiles underneath the snapshot.
1338
1339         * Shared/mac/RemoteLayerTreeTransaction.h:
1340         (WebKit::RemoteLayerTreeTransaction::transactionID):
1341         (WebKit::RemoteLayerTreeTransaction::setTransactionID):
1342         * Shared/mac/RemoteLayerTreeTransaction.mm:
1343         (WebKit::RemoteLayerTreeTransaction::encode):
1344         (WebKit::RemoteLayerTreeTransaction::decode):
1345         * UIProcess/DrawingAreaProxy.h:
1346         (WebKit::DrawingAreaProxy::lastVisibleTransactionID):
1347         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1348         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1349         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
1350         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1351         (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
1352         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1353         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1354         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1355         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1356         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
1357         Keep track of an ever-increasing transaction ID in RemoteLayerTreeDrawingArea(Proxy).
1358         It increments in the UI process at didUpdate time, because the Web process cannot
1359         have started on a new layer tree commit until didUpdate is sent.
1360         It increments in the Web process at commit time.
1361
1362         * UIProcess/ios/ViewGestureControllerIOS.mm:
1363         (WebKit::ViewGestureController::endSwipeGesture):
1364         (WebKit::ViewGestureController::setRenderTreeSize):
1365         * UIProcess/mac/ViewGestureController.h:
1366         Adopt transaction IDs; don't remove the snapshot until the commit
1367         that includes the navigation arrives.
1368
1369 2014-06-16  Dan Bernstein  <mitz@apple.com>
1370
1371         <rdar://problem/17327707> [Cocoa] Expose WebPreferences::storageBlockingPolicy
1372         https://bugs.webkit.org/show_bug.cgi?id=133958
1373
1374         Reviewed by Anders Carlsson.
1375
1376         * UIProcess/API/Cocoa/WKPreferences.mm:
1377         (toStorageBlockingPolicy): Added this helper conversion function.
1378         (toAPI): Ditto.
1379         (-[WKPreferences _storageBlockingPolicy]): Added this getter.
1380         (-[WKPreferences _setStorageBlockingPolicy:]): Added this setter.
1381         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Declared new _storageBlockingPolicy property
1382         and _WKStorageBlockingPolicy enum. 
1383
1384 2014-06-16  Anders Carlsson  <andersca@apple.com>
1385
1386         Don't use AtomicString in HTTPHeaderMap
1387         https://bugs.webkit.org/show_bug.cgi?id=133957
1388         <rdar://problem/15256572>
1389
1390         Reviewed by Andreas Kling.
1391
1392         Update for WebCore changes.
1393
1394         * Shared/WebCoreArgumentCoders.cpp:
1395         (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
1396
1397 2014-06-15  Anders Carlsson  <andersca@apple.com>
1398
1399         Change ResourceRequestBase::addHTTPHeaderFields to setHTTPHeaderFields instead
1400         https://bugs.webkit.org/show_bug.cgi?id=133925
1401
1402         Reviewed by Sam Weinig.
1403
1404         * PluginProcess/PluginControllerProxy.h:
1405         * Shared/WebCoreArgumentCoders.cpp:
1406         (IPC::ArgumentCoder<ResourceRequest>::decode):
1407         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1408         (WebKit::NPN_PostURL):
1409         * WebProcess/Plugins/PluginView.cpp:
1410         (WebKit::PluginView::loadURL):
1411         * WebProcess/Plugins/PluginView.h:
1412
1413 2014-06-16  Anders Carlsson  <andersca@apple.com>
1414
1415         Add HTTPHeaderName overloads on ResourceResponseBase
1416         https://bugs.webkit.org/show_bug.cgi?id=133946
1417
1418         Reviewed by Andreas Kling.
1419
1420         * WebProcess/Plugins/PluginView.cpp:
1421         (WebKit::buildHTTPHeaders):
1422
1423 2014-06-16  Dan Bernstein  <mitz@apple.com>
1424
1425         Fixed a typo in the last change.
1426
1427         * UIProcess/API/Cocoa/WKPreferences.mm:
1428         (-[WKPreferences init]):
1429
1430 2014-06-16  Dan Bernstein  <mitz@apple.com>
1431
1432         [Cocoa] Remove WKPreferences persistence in user defaults
1433         https://bugs.webkit.org/show_bug.cgi?id=133945
1434
1435         Reviewed by Anders Carlsson.
1436
1437         * UIProcess/API/Cocoa/WKPreferences.h: Removed userDefaultsKeyPrefix property and
1438         initializer with userDefaultsKeyPrefix parameter.
1439         * UIProcess/API/Cocoa/WKPreferences.mm:
1440         (-[WKPreferences init]): Changed to initialize an instance with an empty identifier, which
1441         means that it won’t persist to user defaults.
1442         (-[WKPreferences initWithUserDefaultsKeyPrefix:]): Deleted.
1443         (-[WKPreferences userDefaultsKeyPrefix]): Deleted.
1444
1445 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
1446
1447         Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
1448         https://bugs.webkit.org/show_bug.cgi?id=133677
1449
1450         Reviewed by Anders Carlsson.
1451
1452         * WebProcess/WebPage/FindController.cpp:
1453         (WebKit::FindController::findString): Update the call to Page::findStringMatchingRanges() to pass
1454         in a Vector<RefPtr<Range>> reference instead of a pointer.
1455         (WebKit::FindController::findStringMatches): Ditto.
1456
1457 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
1458
1459         Unreviewed build fixes for the EFL and GTK+ ports after r169994 and 170000.
1460
1461         * UIProcess/API/C/WKPluginSiteDataManager.cpp: Undefine the None macro under X11.
1462         * UIProcess/API/gtk/WebKitCookieManager.cpp:
1463         (webkit_cookie_manager_get_accept_policy): Remove unnecessary ::create() wrappings.
1464         (webkit_cookie_manager_get_domains_with_cookies): Ditto.
1465         * UIProcess/API/gtk/WebKitWebResource.cpp:
1466         (webkit_web_resource_get_data): Ditto.
1467
1468 2014-06-15  Dan Bernstein  <mitz@apple.com>
1469
1470         Part 1 of: Change GenericCallback<> function parameters into std::function<>
1471         https://bugs.webkit.org/show_bug.cgi?id=133927
1472
1473         Reviewed by Sam Weinig.
1474
1475         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1476         (WKApplicationCacheManagerGetApplicationCacheOrigins):
1477         * UIProcess/API/C/WKContext.cpp:
1478         (WKContextGetStatistics):
1479         (WKContextGetStatisticsWithOptions):
1480         * UIProcess/API/C/WKCookieManager.cpp:
1481         (WKCookieManagerGetHostnamesWithCookies):
1482         (WKCookieManagerGetHTTPCookieAcceptPolicy):
1483         * UIProcess/API/C/WKDatabaseManager.cpp:
1484         (WKDatabaseManagerGetDatabasesByOrigin):
1485         (WKDatabaseManagerGetDatabaseOrigins):
1486         * UIProcess/API/C/WKFrame.cpp:
1487         (WKFrameGetMainResourceData):
1488         (WKFrameGetResourceData):
1489         (WKFrameGetWebArchive):
1490         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1491         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
1492         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
1493         * UIProcess/API/C/WKMediaCacheManager.cpp:
1494         (WKMediaCacheManagerGetHostnamesWithMediaCache):
1495         * UIProcess/API/C/WKOriginDataManager.cpp:
1496         (WKOriginDataManagerGetOrigins):
1497         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1498         (WKPluginSiteDataManagerGetSitesWithData):
1499         * UIProcess/API/C/WKResourceCacheManager.cpp:
1500         (WKResourceCacheManagerGetCacheOrigins):
1501         * UIProcess/API/Cocoa/WKWebView.mm:
1502         (-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
1503         * UIProcess/API/mac/WKView.mm:
1504         (-[WKView attributedSubstringForProposedRange:completionHandler:]):
1505         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1506         (WebKit::WebPluginSiteDataManager::getSitesWithData):
1507         * UIProcess/Plugins/WebPluginSiteDataManager.h:
1508         * UIProcess/WebApplicationCacheManagerProxy.cpp:
1509         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
1510         * UIProcess/WebApplicationCacheManagerProxy.h:
1511         * UIProcess/WebContext.cpp:
1512         (WebKit::WebContext::getStatistics):
1513         * UIProcess/WebContext.h:
1514         * UIProcess/WebCookieManagerProxy.cpp:
1515         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
1516         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
1517         * UIProcess/WebCookieManagerProxy.h:
1518         * UIProcess/WebDatabaseManagerProxy.cpp:
1519         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
1520         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
1521         * UIProcess/WebDatabaseManagerProxy.h:
1522         * UIProcess/WebFrameProxy.cpp:
1523         (WebKit::WebFrameProxy::getWebArchive):
1524         (WebKit::WebFrameProxy::getMainResourceData):
1525         (WebKit::WebFrameProxy::getResourceData):
1526         * UIProcess/WebFrameProxy.h:
1527         * UIProcess/WebKeyValueStorageManager.cpp:
1528         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1529         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1530         * UIProcess/WebKeyValueStorageManager.h:
1531         * UIProcess/WebMediaCacheManagerProxy.cpp:
1532         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
1533         * UIProcess/WebMediaCacheManagerProxy.h:
1534         * UIProcess/WebOriginDataManagerProxy.cpp:
1535         (WebKit::WebOriginDataManagerProxy::getOrigins):
1536         * UIProcess/WebOriginDataManagerProxy.h:
1537         * UIProcess/WebPageProxy.cpp:
1538         (WebKit::WebPageProxy::getMainResourceDataOfFrame):
1539         (WebKit::WebPageProxy::getResourceDataFromFrame):
1540         (WebKit::WebPageProxy::getWebArchiveOfFrame):
1541         * UIProcess/WebPageProxy.h:
1542         * UIProcess/WebResourceCacheManagerProxy.cpp:
1543         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
1544         * UIProcess/WebResourceCacheManagerProxy.h:
1545         * UIProcess/ios/WKContentViewInteraction.mm:
1546         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
1547         (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
1548         * UIProcess/ios/WebPageProxyIOS.mm:
1549         (WebKit::WebPageProxy::selectWithGesture):
1550         (WebKit::WebPageProxy::selectWithTwoTouches):
1551         * UIProcess/mac/WebPageProxyMac.mm:
1552         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
1553
1554 2014-06-15  Dan Bernstein  <mitz@apple.com>
1555
1556         <rdar://problem/17291697> [Cocoa] Can’t tell at policy decision time whether WebKit can handle the request
1557         https://bugs.webkit.org/show_bug.cgi?id=133930
1558
1559         Reviewed by Sam Weinig.
1560
1561         * Shared/NavigationActionData.cpp:
1562         (WebKit::NavigationActionData::NavigationActionData): Initialize new member canHandleRequest
1563         to false.
1564         (WebKit::NavigationActionData::encode): Encode canHandleRequest.
1565         (WebKit::NavigationActionData::decode): Decode it.
1566         * Shared/NavigationActionData.h: Declared new boolean member canHandleRequest.
1567
1568         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1569         (-[WKNavigationAction _initWithNavigationActionData:]): Set new ivar _canHandleRequest from
1570         the action data.
1571         (-[WKNavigationAction _canHandleRequest]): Added this getter.
1572         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new property _canHandleRequest.
1573
1574         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1575         (WebKit::WebChromeClient::createWindow): Set canHandleRequest in the NavigationActionData.
1576
1577         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1578         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
1579         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
1580
1581 2014-06-15  Ryuan Choi  <ryuan.choi@samsung.com>
1582
1583         [EFL][WK2] Change ewk_view_settings_get to ewk_page_group_settings_get
1584         https://bugs.webkit.org/show_bug.cgi?id=133841
1585
1586         Reviewed by Gyuyoung Kim.
1587
1588         Ewk_Settings object is a member of Ewk_Page_Group.
1589         So, Ewk_Page_Group is better place for the getter of Ewk_Settings.
1590
1591         * UIProcess/API/efl/ewk_page_group.cpp:
1592         (ewk_page_group_settings_get): Added instead of ewk_view_settings_get.
1593         * UIProcess/API/efl/ewk_page_group.h:
1594         * UIProcess/API/efl/ewk_view.cpp:
1595         (ewk_view_settings_get): Deleted.
1596         * UIProcess/API/efl/ewk_view.h:
1597         * UIProcess/API/efl/tests/test_ewk2_page_group.cpp:
1598         (TEST_F):
1599         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
1600         (TEST_F):
1601         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1602         (TEST_F): Deleted.
1603
1604 2014-06-15  Anders Carlsson  <andersca@apple.com>
1605
1606         Add an autorelease() member function to RetainPtr
1607         https://bugs.webkit.org/show_bug.cgi?id=133929
1608
1609         Reviewed by Dan Bernstein.
1610
1611         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1612         (-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
1613         * UIProcess/API/Cocoa/WKWebView.mm:
1614         (-[WKWebView navigationDelegate]):
1615         (-[WKWebView UIDelegate]):
1616         (-[WKWebView loadRequest:]):
1617         (-[WKWebView loadHTMLString:baseURL:]):
1618         (-[WKWebView goToBackForwardListItem:]):
1619         (-[WKWebView goBack]):
1620         (-[WKWebView goForward]):
1621         (-[WKWebView reload]):
1622         (-[WKWebView reloadFromOrigin]):
1623         (-[WKWebView _historyDelegate]):
1624         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1625         (WebKit::animationValueFromKeyframeValue):
1626
1627 2014-06-15  Dan Bernstein  <mitz@apple.com>
1628
1629         Get rid of VoidAPICallback
1630         https://bugs.webkit.org/show_bug.cgi?id=133928
1631
1632         Reviewed by Sam Weinig.
1633
1634         * UIProcess/API/C/WKPage.cpp:
1635         (WKPageForceRepaint): Wrap the API callback in a generic callback here.
1636
1637         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1638         (WKPluginSiteDataManagerClearSiteData): Ditto.
1639         (WKPluginSiteDataManagerClearAllSiteData): Ditto.
1640
1641         * UIProcess/GenericCallback.h:
1642         (WebKit::GenericCallback::performCallback): Added this helper for 0-argument callbacks.
1643         (WebKit::VoidCallback::create): Deleted.
1644         (WebKit::VoidCallback::~VoidCallback): Deleted.
1645         (WebKit::VoidCallback::performCallback): Deleted.
1646         (WebKit::VoidCallback::invalidate): Deleted.
1647         (WebKit::VoidCallback::VoidCallback): Deleted.
1648         (WebKit::VoidAPICallback::create): Deleted.
1649
1650         * UIProcess/mac/WKFullScreenWindowController.h:
1651
1652 2014-06-15  Zan Dobersek  <zdobersek@igalia.com>
1653
1654         Unreviewed build fix for the GTK+ port after r169990.
1655
1656         * UIProcess/WebPageProxy.cpp:
1657         (WebKit::WebPageProxy::resetState): Pass the error value to
1658         the rest of invalidateCallbackMap calls.
1659
1660 2014-06-15  Anders Carlsson  <andersca@apple.com>
1661
1662         Remove WKPageRunJavaScriptInMainFrame_b
1663         https://bugs.webkit.org/show_bug.cgi?id=133926
1664
1665         Reviewed by Dan Bernstein.
1666
1667         * UIProcess/API/C/WKPage.cpp:
1668         (callRunJavaScriptBlockAndRelease): Deleted.
1669         (WKPageRunJavaScriptInMainFrame_b): Deleted.
1670         * UIProcess/API/C/WKPage.h:
1671
1672 2014-06-15  Anders Carlsson  <andersca@apple.com>
1673
1674         invalidateCallbackMap doesn’t pass the error parameter on to invalidate(), so script completion handler is passed the wrong error
1675         https://bugs.webkit.org/show_bug.cgi?id=133921
1676         <rdar://problem/17316653>
1677
1678         Reviewed by Dan Bernstein.
1679
1680         * UIProcess/GenericCallback.h:
1681         (WebKit::VoidCallback::performCallback):
1682         (WebKit::VoidCallback::invalidate):
1683         (WebKit::VoidAPICallback::create):
1684         (WebKit::invalidateCallbackMap):
1685         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1686         (WebKit::WebPluginSiteDataManager::invalidate):
1687         (WebKit::WebPluginSiteDataManager::clearSiteData):
1688         * UIProcess/WebApplicationCacheManagerProxy.cpp:
1689         (WebKit::WebApplicationCacheManagerProxy::contextDestroyed):
1690         (WebKit::WebApplicationCacheManagerProxy::processDidClose):
1691         * UIProcess/WebContext.cpp:
1692         (WebKit::WebContext::~WebContext):
1693         * UIProcess/WebCookieManagerProxy.cpp:
1694         (WebKit::WebCookieManagerProxy::contextDestroyed):
1695         (WebKit::WebCookieManagerProxy::processDidClose):
1696         * UIProcess/WebDatabaseManagerProxy.cpp:
1697         (WebKit::WebDatabaseManagerProxy::contextDestroyed):
1698         (WebKit::WebDatabaseManagerProxy::processDidClose):
1699         * UIProcess/WebMediaCacheManagerProxy.cpp:
1700         (WebKit::WebMediaCacheManagerProxy::contextDestroyed):
1701         (WebKit::WebMediaCacheManagerProxy::processDidClose):
1702         * UIProcess/WebOriginDataManagerProxy.cpp:
1703         (WebKit::WebOriginDataManagerProxy::contextDestroyed):
1704         (WebKit::WebOriginDataManagerProxy::processDidClose):
1705         * UIProcess/WebPageProxy.cpp:
1706         (WebKit::WebPageProxy::forceRepaint):
1707         (WebKit::WebPageProxy::resetState):
1708         * UIProcess/WebResourceCacheManagerProxy.cpp:
1709         (WebKit::WebResourceCacheManagerProxy::contextDestroyed):
1710         (WebKit::WebResourceCacheManagerProxy::processDidClose):
1711         * UIProcess/mac/WKFullScreenWindowController.mm:
1712         (-[WKFullScreenWindowController dealloc]):
1713         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
1714
1715 2014-06-15  Zan Dobersek  <zdobersek@igalia.com>
1716
1717         Unreviewed build fix for the GTK+ port after r169987.
1718
1719         * UIProcess/API/gtk/WebKitWebView.cpp:
1720         (webkit_web_view_can_execute_editing_command): The first passed-in parameter
1721         is now a reference to a const String object.
1722
1723 2014-06-14  Dan Bernstein  <mitz@apple.com>
1724
1725         Replace StringImpl* callback parameters with const String&
1726         https://bugs.webkit.org/show_bug.cgi?id=133922
1727
1728         Reviewed by Sam Weinig.
1729
1730         * UIProcess/API/C/WKPage.cpp:
1731         (toGenericCallbackFunction): Added this helper function to wrap a WKStringRef-returning
1732         API callback in a generic const String&-returning callback.
1733         (WKPageRenderTreeExternalRepresentation):
1734         (WKPageGetSourceForFrame):
1735         (WKPageGetContentsAsString):
1736         (WKPageGetBytecodeProfile):
1737         (WKPageValidateCommand):
1738         * UIProcess/API/mac/WKView.mm:
1739         (-[WKView validateUserInterfaceItem:]):
1740         (-[WKView startSpeaking:]):
1741         * UIProcess/WebPageProxy.h:
1742         * UIProcess/ios/WKContentViewInteraction.mm:
1743         (-[WKContentView _define:]):
1744         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1745
1746 2014-06-14  Dan Bernstein  <mitz@apple.com>
1747
1748         Additional iOS build fix.
1749
1750         * UIProcess/ios/WKContentViewInteraction.mm:
1751         (-[WKContentView _define:]):
1752         (selectionChangedWithGesture):
1753         (selectionChangedWithTouch):
1754         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
1755         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
1756         (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
1757         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1758
1759 2014-06-14  Dan Bernstein  <mitz@apple.com>
1760
1761         iOS build fix.
1762
1763         * UIProcess/API/Cocoa/WKWebView.mm:
1764         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1765
1766 2014-06-14  Dan Bernstein  <mitz@apple.com>
1767
1768         Get rid of GenericAPICallback
1769         https://bugs.webkit.org/show_bug.cgi?id=133909
1770
1771         Reviewed by Sam Weinig.
1772
1773         In preparation for passing callbacks as functions, replace GenericAPICallback::create, which
1774         returned a GenericCallback, with a function template that returns an appropriate callback
1775         function.
1776
1777         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1778         (WKApplicationCacheManagerGetApplicationCacheOrigins):
1779         * UIProcess/API/C/WKContext.cpp:
1780         (WKContextGetStatistics):
1781         (WKContextGetStatisticsWithOptions):
1782         * UIProcess/API/C/WKCookieManager.cpp:
1783         (WKCookieManagerGetHostnamesWithCookies):
1784         (WKCookieManagerGetHTTPCookieAcceptPolicy):
1785         * UIProcess/API/C/WKDatabaseManager.cpp:
1786         (WKDatabaseManagerGetDatabasesByOrigin):
1787         (WKDatabaseManagerGetDatabaseOrigins):
1788         * UIProcess/API/C/WKFrame.cpp:
1789         (WKFrameGetMainResourceData):
1790         (WKFrameGetResourceData):
1791         (WKFrameGetWebArchive):
1792         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1793         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
1794         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
1795         * UIProcess/API/C/WKMediaCacheManager.cpp:
1796         (WKMediaCacheManagerGetHostnamesWithMediaCache):
1797         * UIProcess/API/C/WKOriginDataManager.cpp:
1798         (WKOriginDataManagerGetOrigins):
1799         * UIProcess/API/C/WKPage.cpp:
1800         (WKPageRunJavaScriptInMainFrame):
1801         (WKPageRenderTreeExternalRepresentation):
1802         (WKPageGetSourceForFrame):
1803         (WKPageGetContentsAsString):
1804         (WKPageGetBytecodeProfile):
1805         (WKPageGetSelectionAsWebArchiveData):
1806         (WKPageGetContentsAsMHTMLData):
1807         (WKPageDrawPagesToPDF):
1808         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1809         (WKPluginSiteDataManagerGetSitesWithData):
1810         * UIProcess/API/C/WKResourceCacheManager.cpp:
1811         (WKResourceCacheManagerGetCacheOrigins):
1812
1813         * UIProcess/GenericCallback.h:
1814         (WebKit::toGenericCallbackFunction): Added. Given a C SPI callback function, returns a generic
1815         callback function that wraps it.
1816
1817 2014-06-14  Dan Bernstein  <mitz@apple.com>
1818
1819         Reverted the last change, which broken the Mac build.
1820
1821         * UIProcess/GenericCallback.h:
1822         (WebKit::invalidateCallbackMap):
1823
1824 2014-06-14  Dan Bernstein  <mitz@apple.com>
1825
1826         Tried to fix the GTK build.
1827
1828         * UIProcess/GenericCallback.h:
1829         (WebKit::invalidateCallbackMap):
1830
1831 2014-06-14  Anders Carlsson  <andersca@apple.com>
1832
1833         Fix build.
1834
1835         * UIProcess/API/mac/WKView.mm:
1836         (-[WKView selectedRangeWithCompletionHandler:]):
1837         (-[WKView markedRangeWithCompletionHandler:]):
1838         (-[WKView hasMarkedTextWithCompletionHandler:]):
1839         (-[WKView attributedSubstringForProposedRange:completionHandler:]):
1840         (-[WKView firstRectForCharacterRange:completionHandler:]):
1841         (-[WKView characterIndexForPoint:completionHandler:]):
1842
1843 2014-06-14  Zan Dobersek  <zdobersek@igalia.com>
1844
1845         Unreviewed build fix for the GTK+ port.
1846         Fixing the callback lambda parameters after r169962.
1847
1848         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
1849         (webkitPrintOperationPrintPagesForFrame):
1850         * UIProcess/API/gtk/WebKitWebResource.cpp:
1851         (webkit_web_resource_get_data):
1852         * UIProcess/API/gtk/WebKitWebView.cpp:
1853         (webkit_web_view_can_execute_editing_command):
1854         (webkit_web_view_run_javascript):
1855         (resourcesStreamReadCallback):
1856         (webkit_web_view_save):
1857         (webkit_web_view_save_to_file):
1858
1859 2014-06-14  Csaba Osztrogonác  <ossy@webkit.org>
1860
1861         URTBF after r169943 and r169946, use the format of set/get.
1862
1863         * UIProcess/InspectorServer/WebInspectorServer.cpp:
1864         (WebKit::WebInspectorServer::didReceiveUnrecognizedHTTPRequest):
1865         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
1866         (WebKit::WebSocketServerConnection::readHTTPMessage):
1867         (WebKit::WebSocketServerConnection::upgradeToWebSocketServerConnection):
1868
1869 2014-06-13  Andreas Kling  <akling@apple.com>
1870
1871         REGRESSION (r167635): Reference leak in NetworkResourceLoader while loads are being deferred.
1872         <https://webkit.org/b/133894>
1873         <rdar://problem/17312299>
1874
1875         Don't self-ref() in start() until we actually start; if page loads are being
1876         deferred, start() will be called again once deferral stops.
1877
1878         This was causing us to leak the entire NetworkResourceLoader object graph.
1879
1880         Reviewed by Brady Eidson.
1881
1882         * NetworkProcess/NetworkResourceLoader.cpp:
1883         (WebKit::NetworkResourceLoader::start):
1884
1885 2014-06-13  Dan Bernstein  <mitz@apple.com>
1886
1887         Make GenericCallback variadic
1888         https://bugs.webkit.org/show_bug.cgi?id=133897
1889
1890         Reviewed by Sam Weinig.
1891
1892         Also eliminated legacy callback functions and all CallbackBase derived classes outside of
1893         GenericCallback.h.
1894
1895         * UIProcess/API/C/WKPage.cpp:
1896         (WKPageValidateCommand): Changed legacy callback (with leading bool parameter) into modern
1897         callback (with trailing error parameter).
1898         (WKPageComputePagesForPrinting): Ditto.
1899
1900         * UIProcess/API/Cocoa/WKWebView.mm:
1901         (-[WKWebView _getWebArchiveDataWithCompletionHandler:]): Ditto.
1902         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Ditto.
1903
1904         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1905         (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
1906
1907         * UIProcess/API/mac/WKView.mm:
1908         (-[WKView validateUserInterfaceItem:]): Ditto.
1909         (-[WKView startSpeaking:]): Ditto.
1910
1911         * UIProcess/AutoCorrectionCallback.h: Replaced CallbackBase derived classes with
1912         GenericCallback specializations.
1913
1914         * UIProcess/GenericCallback.h:
1915         - Made GenericCallback variadic:
1916         (WebKit::GenericCallback::performCallbackWithReturnValue):
1917         (WebKit::GenericCallback::invalidate):
1918         (WebKit::GenericAPICallback::create):
1919
1920         - Replaced CallbackBase derived classes with GenericCallback specializations:
1921         (WebKit::GenericCallback::create): Deleted.
1922         (WebKit::ComputedPagesCallback::create): Deleted.
1923         (WebKit::ComputedPagesCallback::~ComputedPagesCallback): Deleted.
1924         (WebKit::ComputedPagesCallback::performCallbackWithReturnValue): Deleted.
1925         (WebKit::ComputedPagesCallback::invalidate): Deleted.
1926         (WebKit::ComputedPagesCallback::ComputedPagesCallback): Deleted.
1927         (WebKit::ImageCallback::create): Deleted.
1928         (WebKit::ImageCallback::~ImageCallback): Deleted.
1929         (WebKit::ImageCallback::performCallbackWithReturnValue): Deleted.
1930         (WebKit::ImageCallback::invalidate): Deleted.
1931         (WebKit::ImageCallback::ImageCallback): Deleted.
1932
1933         * UIProcess/WebPageProxy.h: Replaced CallbackBase derived classes with GenericCallback
1934         specializations.
1935
1936         * UIProcess/ios/WKContentViewInteraction.mm:
1937         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): Changed
1938         legacy callback (with leading bool parameter) into modern callback (with trailing error
1939         parameter).
1940         (-[WKContentView requestDictationContext:]): Ditto.
1941         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): Ditto.
1942
1943         * UIProcess/mac/WKPrintingView.mm:
1944         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
1945         (-[WKPrintingView _askPageToComputePageRects]): Ditto.
1946         (-[WKPrintingView _drawPreview:]): Ditto.
1947
1948 2014-06-13  Tim Horton  <timothy_horton@apple.com>
1949
1950         Unreviewed; fix the build.
1951
1952         * Shared/mac/RemoteLayerBackingStore.mm:
1953         (WebKit::RemoteLayerBackingStore::drawInContext):
1954
1955 2014-06-13  Martin Hock  <mhock@apple.com>
1956
1957         Clean up layers in RemoteLayerTreeHost::clearLayers().
1958         https://bugs.webkit.org/show_bug.cgi?id=133888
1959
1960         Reviewed by Tim Horton.
1961
1962         * UIProcess/mac/RemoteLayerTreeHost.mm:
1963         (WebKit::RemoteLayerTreeHost::clearLayers):
1964
1965 2014-06-13  Anders Carlsson  <andersca@apple.com>
1966
1967         Add a HTTPHeaderMap::get overload that takes an HTTPHeaderName
1968         https://bugs.webkit.org/show_bug.cgi?id=133877
1969
1970         Reviewed by Andreas Kling.
1971
1972         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1973         (WebKit::parsePostBuffer):
1974
1975 2014-06-13  Dan Bernstein  <mitz@apple.com>
1976
1977         [iOS] Networking process always decodes keys
1978         https://bugs.webkit.org/show_bug.cgi?id=133863
1979
1980         Reviewed by Anders Carlsson.
1981
1982         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
1983         (WebKit::XPCServiceInitializer): Call checkEntitlements on iOS, too.
1984         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
1985         (WebKit::XPCServiceInitializerDelegate::checkEntitlements): On iOS, allow decoding keys
1986         if the application has the appropriate keychain access group.
1987
1988         * Shared/cf/ArgumentCodersCF.cpp:
1989         (IPC::setAllowsDecodingSecKeyRef): Added. Sets static bool.
1990         (IPC::decode): Check the secKeyRefDecodingAllowed bool before decoding a key.
1991         * Shared/cf/ArgumentCodersCF.h:
1992
1993 2014-06-12  Anders Carlsson  <andersca@apple.com>
1994
1995         Add overloads of HTTPHeaderMap::find and remove that take enums
1996         https://bugs.webkit.org/show_bug.cgi?id=133823
1997
1998         Reviewed by Sam Weinig.
1999
2000         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2001         (WebKit::parsePostBuffer):
2002         Update for WebCore changes.
2003
2004 2014-06-12  Benjamin Poulain  <bpoulain@apple.com>
2005
2006         [iOS][WK2] Do not update the viewport configuration on load until the first viewport arguments is received
2007         https://bugs.webkit.org/show_bug.cgi?id=133719
2008         <rdar://problem/17008149>
2009
2010         Reviewed by Simon Fraser.
2011
2012         When pages are loaded from the page cache, we were updating the viewport to the initial values
2013         in WebPage::dynamicViewportSizeUpdate(), then update the viewport again when the page's viewport argument
2014         are received.
2015
2016         The problem is that was messing up with text autosizing. The page would relayout with the default viewport
2017         configuration, adopt the text autosizing parameters from that size, then remain in that state when
2018         the actual viewport configuration would be set.
2019
2020         With this patch, the viewport configuration is updated from the values in WebCore instead of with default values.
2021         For new documents, this is strictly equivalent. For documents coming from the page cache, the values are from
2022         the previous state of the page, which ensure we do not restart negotiating a viewport configuration from scratch.
2023
2024         * WebProcess/WebPage/WebPage.cpp:
2025         (WebKit::WebPage::didCommitLoad):
2026
2027 2014-06-12  Gavin Barraclough  <barraclough@apple.com>
2028
2029         Add support for thread/WorkQueue QoS
2030         https://bugs.webkit.org/show_bug.cgi?id=130688
2031
2032         Reviewed by Anders Carlson & Simon Fraser.
2033
2034         The EventDispatcher's WorkQueue should be UserInteractive.
2035
2036         * Platform/WorkQueue.cpp:
2037         (WorkQueue::create):
2038             - pass QOS to constructor.
2039         (WorkQueue::WorkQueue):
2040             - pass QOS to platformInitialize.
2041         * Platform/WorkQueue.h:
2042             - added enum, arguments.
2043         * Platform/efl/WorkQueueEfl.cpp:
2044         (WorkQueue::platformInitialize):
2045             - has extra argument.
2046         * Platform/gtk/WorkQueueGtk.cpp:
2047         (WorkQueue::platformInitialize):
2048             - has extra argument.
2049         * Platform/mac/WorkQueueMac.cpp:
2050         (platformQOS):
2051             - map from enum to platform type.
2052         (WorkQueue::platformInitialize):
2053             - set the QoS of the dispatch queue.
2054         * WebProcess/WebPage/EventDispatcher.cpp:
2055         (WebKit::EventDispatcher::EventDispatcher):
2056             - EventDispatcher's WorkQueue should be UserInteractive.
2057         * config.h:
2058             - added HAVE_QOS_CLASSES
2059
2060 2014-06-12  Simon Fraser  <simon.fraser@apple.com>
2061
2062         [iOS] Tiny hack to fix WebKitTestRunner view visibility
2063         https://bugs.webkit.org/show_bug.cgi?id=133833
2064
2065         Reviewed by Tim Horton.
2066         
2067         PageClientImplIOS in WebKitTestRunner has a null m_webView, so isViewInWindow
2068         was returning false, which confused things.
2069         
2070         Fix by falling back to a check on the content view if the m_webView is nil.
2071
2072         * UIProcess/ios/PageClientImplIOS.mm:
2073         (WebKit::PageClientImpl::isViewVisible):
2074         (WebKit::PageClientImpl::isViewInWindow):
2075
2076 2014-06-12  Brady Eidson  <beidson@apple.com>
2077
2078         Add SPI for image controls and service controls preferences.
2079         <rdar://problem/17292209> and https://bugs.webkit.org/show_bug.cgi?id=133820
2080
2081         Reviewed by Anders Carlsson.
2082
2083         * UIProcess/API/C/WKPreferences.cpp:
2084         (WKPreferencesSetServiceControlsEnabled):
2085         (WKPreferencesGetServiceControlsEnabled):
2086         (WKPreferencesSetImageControlsEnabled):
2087         (WKPreferencesGetImageControlsEnabled):
2088         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2089
2090 2014-06-12  Alexey Proskuryakov  <ap@apple.com>
2091
2092         [Mac] Allow reading com.apple.universalaccess preferences
2093         https://bugs.webkit.org/show_bug.cgi?id=133817
2094         <rdar://problem/17028261>
2095
2096         Reviewed by Anders Carlsson.
2097
2098         * WebProcess/com.apple.WebProcess.sb.in:
2099
2100 2014-06-12  Anders Carlsson  <andersca@apple.com>
2101
2102         Fix build.
2103
2104         * Shared/WebCoreArgumentCoders.cpp:
2105         (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
2106         (CoreIPC::ArgumentCoder<ResourceRequest>::decode):
2107
2108 2014-06-12  Dan Bernstein  <mitz@apple.com>
2109
2110         Fixed a harmless error message when rewrite-availability-macros.sh is run in a clean build.
2111
2112         Rubber-stamped by Anders Carlsson.
2113
2114         * mac/rewrite-availability-macros.sh:
2115
2116 2014-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2117
2118         [GTK] Remove view mode API
2119         https://bugs.webkit.org/show_bug.cgi?id=133725
2120
2121         Reviewed by Martin Robinson.
2122
2123         It currently does nothing because support for view source mode was
2124         removed from WebCore.
2125
2126         * UIProcess/API/gtk/WebKitWebView.cpp:
2127         (webkitWebViewSetProperty):
2128         (webkitWebViewGetProperty):
2129         (webkit_web_view_class_init):
2130         (webkit_web_view_set_view_mode): Deleted.
2131         (webkit_web_view_get_view_mode): Deleted.
2132         * UIProcess/API/gtk/WebKitWebView.h:
2133         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2134
2135 2014-06-12  Pratik Solanki  <psolanki@apple.com>
2136
2137         Avoid creating a CFData when checking if a resource is file backed
2138         https://bugs.webkit.org/show_bug.cgi?id=133783
2139
2140         Reviewed by Andreas Kling.
2141
2142         When a resource is file backed, we have it as a single CFDataRef in SharedBuffer. Add an
2143         early return in tryGetShareableHandleFromSharedBuffer() so we don't end up creating a new
2144         CFDataRef if we don't already have one in SharedBuffer. If we had to create a CFDataRef, the
2145         it can't have been a file backed resource.
2146
2147         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2148         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2149
2150 2014-06-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2151
2152         Fix build break on EFL and GTK ports since r169820
2153         https://bugs.webkit.org/show_bug.cgi?id=133786
2154
2155         Reviewed by Philippe Normand.
2156
2157         ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC macro are missing in PluginView::pluginSnapshotTimerFired().
2158
2159         * WebProcess/Plugins/PluginView.cpp:
2160         (WebKit::PluginView::pluginSnapshotTimerFired):
2161
2162 2014-06-11  Csaba Osztrogonác  <ossy@webkit.org>
2163
2164         [EFL][GTK] Ultimate fix not to have build failures
2165         in the future because of "#if TARGET_OS_IPHONE" guards.
2166
2167         Unreviewed buildfix.
2168
2169         Revert the previous wrong fix attempt r169879.
2170
2171         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2172         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2173
2174 2014-06-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2175
2176         Fix build break on EFL port since r169869
2177         https://bugs.webkit.org/show_bug.cgi?id=133785
2178
2179         Unreviewed, fix a build break on EFL port.
2180
2181         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Use defined(TARGET_OS_IPHONE).
2182         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: ditto.
2183
2184 2014-06-11  Simon Fraser  <simon.fraser@apple.com>
2185
2186         [iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1 for testing
2187         https://bugs.webkit.org/show_bug.cgi?id=133779
2188
2189         Reviewed by Benjamin Poulain.
2190         
2191         Support a custom viewport configuration for testing, on iOS.
2192
2193         * UIProcess/API/ios/WKViewIOS.mm:
2194         (-[WKView _frameOrBoundsChanged]): Call setViewportConfigurationMinimumLayoutSize()
2195         just as WKWebView does.
2196         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2197         (WKBundlePageSetUseTestingViewportConfiguration): New SPI to set a viewport config for testing.
2198         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Ditto.
2199         * WebProcess/WebPage/WebPage.cpp:
2200         (WebKit::WebPage::WebPage):
2201         * WebProcess/WebPage/WebPage.h:
2202         (WebKit::WebPage::setUseTestingViewportConfiguration):
2203         (WebKit::WebPage::isUsingTestingViewportConfiguration):
2204         * WebProcess/WebPage/ios/WebPageIOS.mm:
2205         (WebKit::WebPage::resetViewportDefaultConfiguration):
2206
2207 2014-06-11  Timothy Horton  <timothy_horton@apple.com>
2208
2209         Remove unused VisibleContentRectUpdateInfo update ID
2210         https://bugs.webkit.org/show_bug.cgi?id=133777
2211
2212         Reviewed by Benjamin Poulain.
2213
2214         Remove some unused code.
2215
2216         * Shared/VisibleContentRectUpdateInfo.cpp:
2217         (WebKit::VisibleContentRectUpdateInfo::encode):
2218         (WebKit::VisibleContentRectUpdateInfo::decode):
2219         * Shared/VisibleContentRectUpdateInfo.h:
2220         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2221         (WebKit::operator==):
2222         (WebKit::VisibleContentRectUpdateInfo::updateID): Deleted.
2223         * Shared/mac/RemoteLayerTreeTransaction.h:
2224         (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID): Deleted.
2225         (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID): Deleted.
2226         * Shared/mac/RemoteLayerTreeTransaction.mm:
2227         (WebKit::RemoteLayerTreeTransaction::encode):
2228         (WebKit::RemoteLayerTreeTransaction::decode):
2229         * UIProcess/WebPageProxy.h:
2230         (WebKit::WebPageProxy::nextVisibleContentRectUpdateID): Deleted.
2231         (WebKit::WebPageProxy::lastVisibleContentRectUpdateID): Deleted.
2232         * UIProcess/ios/WKContentView.mm:
2233         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
2234         * WebProcess/WebPage/WebPage.cpp:
2235         (WebKit::WebPage::WebPage):
2236         (WebKit::WebPage::willCommitLayerTree):
2237         * WebProcess/WebPage/WebPage.h:
2238         * WebProcess/WebPage/ios/WebPageIOS.mm:
2239         (WebKit::WebPage::updateVisibleContentRects):
2240
2241 2014-06-11  Dan Bernstein  <mitz@apple.com>
2242
2243         [Cocoa] Move CompletionHandlerCallChecker into a separate file
2244         https://bugs.webkit.org/show_bug.cgi?id=133774
2245
2246         Reviewed by Anders Carlsson.
2247
2248         * Shared/Cocoa/CompletionHandlerCallChecker.h: Added.
2249         * Shared/Cocoa/CompletionHandlerCallChecker.mm: Added.
2250         (WebKit::CompletionHandlerCallChecker::create):
2251         (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
2252         (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
2253         (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
2254         (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
2255
2256         * UIProcess/Cocoa/UIDelegate.mm:
2257         (WebKit::CompletionHandlerCallChecker::create): Deleted.
2258         (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker): Deleted.
2259         (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler): Deleted.
2260         (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker): Deleted.
2261         (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod): Deleted.
2262         * WebKit2.xcodeproj/project.pbxproj:
2263
2264 2014-06-11  Martin Hock  <mhock@apple.com>
2265
2266         [iOS] Clear UIProcess visual state after WebProcess crash
2267         https://bugs.webkit.org/show_bug.cgi?id=133664
2268         <rdar://problem/16952742>
2269
2270         Reviewed by Benjamin Poulain.
2271
2272         * UIProcess/API/Cocoa/WKWebView.mm:
2273         (-[WKWebView _didRelaunchProcess]):
2274         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2275         * UIProcess/ios/PageClientImplIOS.mm:
2276         (WebKit::PageClientImpl::didRelaunchProcess):
2277         * UIProcess/mac/RemoteLayerTreeHost.h:
2278         * UIProcess/mac/RemoteLayerTreeHost.mm:
2279         (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
2280         (WebKit::RemoteLayerTreeHost::clearLayers):
2281
2282 2014-06-11  Tim Horton  <timothy_horton@apple.com>
2283
2284         Implement swipeWithEvent for non-fluid swipes
2285         https://bugs.webkit.org/show_bug.cgi?id=133766
2286         <rdar://problem/17126889>
2287
2288         Reviewed by Anders Carlsson.
2289
2290         * UIProcess/API/mac/WKView.mm:
2291         (-[WKView swipeWithEvent:]):
2292         On non-fluid swipes, go back or forward depending on the swipe direction.
2293
2294 2014-06-11  Dan Bernstein  <mitz@apple.com>
2295
2296         [Cocoa] Xcode cannot infer that the WebKit target implicitly depends on WebCore.framework
2297         https://bugs.webkit.org/show_bug.cgi?id=133765
2298
2299         Reviewed by Anders Carlsson.
2300
2301         * Configurations/WebKit.xcconfig: Move linking against WebCore from OTHER_LDFLAGS here...
2302         * WebKit2.xcodeproj/project.pbxproj: ...to the Link Binary With Libraries build phase here.
2303
2304 2014-06-11  Timothy Horton  <timothy_horton@apple.com>
2305
2306         [wk2] Don't dispatch view state changes immediately
2307         https://bugs.webkit.org/show_bug.cgi?id=133713
2308
2309         Reviewed by Simon Fraser.
2310
2311         * UIProcess/WebPageProxy.cpp:
2312         (WebKit::WebPageProxy::WebPageProxy):
2313         (WebKit::WebPageProxy::viewStateDidChange):
2314         (WebKit::WebPageProxy::dispatchViewStateChange):
2315         (WebKit::WebPageProxy::updateViewState): Deleted.
2316         * UIProcess/WebPageProxy.h:
2317         On PLATFORM(COCOA), wait until just before CA is going to commit the UI process layer
2318         tree to dispatch view state changes to the Web process. This avoids sending multiple
2319         view state change messages to the Web process within one run-loop cycle, for example
2320         when a view is moved around in the view hierarchy but the view state otherwise remains the same.
2321
2322 2014-06-11  Timothy Horton  <timothy_horton@apple.com>
2323
2324         Make it possible for waitForAndDispatchImmediately to bail if a sync message comes in from the other direction
2325         https://bugs.webkit.org/show_bug.cgi?id=133708
2326
2327         Reviewed by Anders Carlsson.
2328
2329         * Platform/IPC/Connection.cpp:
2330         (IPC::WaitForMessageState):
2331         (IPC::Connection::Connection):
2332         (IPC::Connection::waitForMessage):
2333         (IPC::Connection::processIncomingMessage):
2334         (IPC::Connection::connectionDidClose):
2335         * Platform/IPC/Connection.h:
2336         (IPC::Connection::waitForAndDispatchImmediately):
2337         Remove the waitForMessageMap, and assert that we're only ever waiting for one message at a time.
2338         This simplifies this code a bit, and we never wait on more than one message at a time, so it was unnecessary.
2339
2340         Add a flag to waitForAndDispatchImmediately, InterruptWaitingIfSyncMessageArrives, which will cause
2341         waitForAndDispatchImmediately to bail if a sync message arrives, to avoid pointlessly blocking both processes
2342         for the entire timeout.
2343
2344 2014-06-11  Oliver Hunt  <oliver@apple.com>
2345
2346         Restrict database process profile
2347         https://bugs.webkit.org/show_bug.cgi?id=133750
2348
2349         Reviewed by Alexey Proskuryakov.
2350
2351         Make the sandbox profile much more restrictive.
2352
2353         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
2354
2355 2014-06-11  Roger Fong  <roger_fong@apple.com>
2356
2357         Don't snapshot offscreen plugins that would normally be considered primary plugins after they are moved in view.
2358         https://bugs.webkit.org/show_bug.cgi?id=133667.
2359         <rdar://problem/16743250>
2360
2361         Reviewed by Tim Horton.
2362
2363         * WebProcess/Plugins/PluginView.cpp:
2364         (WebKit::PluginView::PluginView):
2365         (WebKit::PluginView::pluginSnapshotTimerFired):
2366         Set the display state to Playing if the following is true:
2367         The plugin in question is large enough to be considered the primary snapshot and either:
2368         a) The maximum number of snapshot retries has been reached and no good snapshot has been found.
2369         b) The plugin is moved to be on-screen while the snapshot attempts are in progress.
2370         * WebProcess/Plugins/PluginView.h:
2371         * WebProcess/WebPage/WebPage.cpp:
2372         (WebKit::WebPage::plugInIntersectsSearchRect): Re-factor out intersection logic.
2373         (WebKit::WebPage::plugInIsPrimarySize): Re-factor out primary plugin size logic.
2374         (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Use the above two methods here.
2375         * WebProcess/WebPage/WebPage.h:
2376
2377 2014-06-11  Anders Carlsson  <andersca@apple.com>
2378
2379         Move more WKPreferences to WKWebViewConfiguration
2380         https://bugs.webkit.org/show_bug.cgi?id=133756
2381         <rdar://problem/17271468>
2382
2383         Reviewed by Tim Horton.
2384
2385         * UIProcess/API/Cocoa/WKPreferences.h:
2386         * UIProcess/API/Cocoa/WKPreferences.mm:
2387         (-[WKPreferences setMinimumFontSize:]):
2388         (-[WKPreferences suppressesIncrementalRendering]): Deleted.
2389         (-[WKPreferences setSuppressesIncrementalRendering:]): Deleted.
2390         (-[WKPreferences allowsInlineMediaPlayback]): Deleted.
2391         (-[WKPreferences setAllowsInlineMediaPlayback:]): Deleted.
2392         (-[WKPreferences mediaPlaybackRequiresUserAction]): Deleted.
2393         (-[WKPreferences setMediaPlaybackRequiresUserAction:]): Deleted.
2394         (-[WKPreferences mediaPlaybackAllowsAirPlay]): Deleted.
2395         (-[WKPreferences setMediaPlaybackAllowsAirPlay:]): Deleted.
2396         * UIProcess/API/Cocoa/WKWebView.mm:
2397         (-[WKWebView initWithFrame:configuration:]):
2398         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2399         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2400         (-[WKWebViewConfiguration copyWithZone:]):
2401         * WebKit2.xcodeproj/project.pbxproj:
2402
2403 2014-06-11  Enrica Casucci  <enrica@apple.com>
2404
2405         WebKit2 iOS: Unable to open UI menu for "open in new tab" for links on yahoo.com.
2406         https://bugs.webkit.org/show_bug.cgi?id=133749
2407         <rdar://problem/17165992>
2408
2409         Reviewed by Brady Eidson.
2410
2411         The URL returned to the UIProcess as string needs to be encoded.
2412
2413         * WebProcess/WebPage/ios/WebPageIOS.mm:
2414         (WebKit::WebPage::getPositionInformation):
2415
2416 2014-06-10  Anders Carlsson  <andersca@apple.com>
2417
2418         Move suppressesIncrementalRendering to WKWebViewConfiguration
2419         https://bugs.webkit.org/show_bug.cgi?id=133707
2420         <rdar://problem/17271468>
2421
2422         Reviewed by Sam Weinig.
2423
2424         * UIProcess/API/Cocoa/WKPreferences.h:
2425         Get rid of suppressesIncrementalRendering.
2426
2427         * UIProcess/API/Cocoa/WKWebView.mm:
2428         (-[WKWebView initWithFrame:configuration:]):
2429         Set the suppressesIncrementalRenderingKey key in webPageConfiguration.preferenceValues.
2430
2431         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2432         Add suppressesIncrementalRendering.
2433
2434         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2435         (-[WKWebViewConfiguration copyWithZone:]):
2436         Assign suppressesIncrementalRendering.
2437
2438         * UIProcess/WebPageProxy.cpp:
2439         (WebKit::WebPageProxy::WebPageProxy):
2440         Copy webPageConfiguration.preferenceValues to m_configurationPreferenceValues.
2441
2442         (WebKit::WebPageProxy::preferencesStore):
2443         If m_configurationPreferenceValues is empty, just return m_preferences->store(). Otherwise,
2444         copy the store and apply the configuration preference values.
2445
2446         (WebKit::WebPageProxy::preferencesDidChange):
2447         Call preferencesStore() so we'll get the configuration preference values as well.
2448
2449         (WebKit::WebPageProxy::creationParameters):
2450         Ditto.
2451
2452         * UIProcess/WebPageProxy.h:
2453
2454 2014-06-11  Antti Koivisto  <antti@apple.com>
2455
2456         Wrap NSURLRequest in bundle API
2457         https://bugs.webkit.org/show_bug.cgi?id=133732
2458         <rdar://problem/17267217>
2459
2460         Reviewed by Andreas Kling.
2461         
2462         Patch by Dan Bernstein.
2463
2464         We don't want to construct actual NSURLRequests in the web process side unless really needed as it is slow.
2465
2466         * Shared/Cocoa/APIObject.mm:
2467         (API::Object::newObject):
2468         * Shared/Cocoa/WKNSURLRequest.h: Added.
2469         (WebKit::wrapper):
2470         * Shared/Cocoa/WKNSURLRequest.mm: Added.
2471         
2472             Add a wrapper object that initializes the underlying NSURLRequest on-demand.
2473
2474         (-[WKNSURLRequest _web_createTarget]):
2475         (-[WKNSURLRequest URL]):
2476         (-[WKNSURLRequest copyWithZone:]):
2477         * WebKit2.xcodeproj/project.pbxproj:
2478         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2479         (willSendRequestForFrame):
2480         (didInitiateLoadForResource):
2481
2482 2014-06-11  Dan Bernstein  <mitz@apple.com>
2483
2484         <rdar://problem/17218629> [Cocoa] WKWebView’s canGoBack and canGoForward properties are not KVO-compliant
2485         https://bugs.webkit.org/show_bug.cgi?id=133722
2486
2487         Reviewed by Anders Carlsson.
2488
2489         * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
2490         PageLoadStateObserver member functions.
2491
2492         * UIProcess/API/Cocoa/WKWebView.h: Documented the canGoBack and canGoForward properties as
2493         being KVO-compliant.
2494         * UIProcess/API/Cocoa/WKWebView.mm:
2495         (-[WKWebView canGoBack]): Changed to get the return value from the page load state.
2496         (-[WKWebView canGoForward]): Ditto.
2497
2498         * UIProcess/Cocoa/NavigationState.h:
2499         * UIProcess/Cocoa/NavigationState.mm:
2500         (WebKit::NavigationState::willChangeCanGoBack): Override this new PageLoadStateObserver
2501         member function by sending the appropriate KVO change message to the WKWebView.
2502         (WebKit::NavigationState::didChangeCanGoBack): Ditto.
2503         (WebKit::NavigationState::willChangeCanGoForward): Ditto.
2504         (WebKit::NavigationState::didChangeCanGoForward): Ditto.
2505
2506         * UIProcess/PageLoadState.cpp:
2507         (WebKit::PageLoadState::commitChanges): Check for changes to canGoBack and canGoForward
2508         and call the observers if needed.
2509         (WebKit::PageLoadState::canGoBack): Added. Returns the value from the committed state.
2510         (WebKit::PageLoadState::setCanGoBack): Added. Sets the value in the uncommitted state.
2511         (WebKit::PageLoadState::canGoForward): Added. Returns the value from the committed state.
2512         (WebKit::PageLoadState::setCanGoForward): Added. Sets the value in the uncommitted state.
2513         * UIProcess/PageLoadState.h:
2514         (WebKit::PageLoadState::Data::Data): Added canGoBack and canGoForward boolean members.
2515
2516         * UIProcess/WebPageProxy.cpp:
2517         (WebKit::WebPageProxy::didChangeBackForwardList): Update the page load state with the new
2518         state of canGoBack and canGoForward.
2519         * UIProcess/WebPageProxy.h: Removed unused member variables m_canGoBack and m_canGoForward.
2520
2521 2014-06-11  Zan Dobersek  <zdobersek@igalia.com>
2522
2523         Avoid Vector copies in WebNotificationManagerProxy::providerDidCloseNotifications(), FindController::findStringMatches()
2524         https://bugs.webkit.org/show_bug.cgi?id=133676
2525
2526         Reviewed by Andreas Kling.
2527
2528         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2529         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Move the newly-created
2530         Vector object into the HashMap<>::add() call.
2531         * WebProcess/WebPage/FindController.cpp:
2532         (WebKit::FindController::findStringMatches): Movethe newly-create Vector object into the
2533         Vector<>::append() call.
2534
2535 2014-06-11  Shivakumar JM  <shiva.jm@samsung.com>
2536
2537         [EFL][WK2] Add missing test cases for EWK2ViewTest.
2538         https://bugs.webkit.org/show_bug.cgi?id=133715
2539
2540         Reviewed by Gyuyoung Kim.
2541
2542         Add missing test cases for ewk_view.h APIs, ewk_view_stop(), ewk_view_html_string_load(), ewk_view_theme_get(), 
2543         ewk_view_feed_touch_event(), ewk_view_text_find_highlight_clear(), ewk_view_text_find(), ewk_view_text_matches_count(),
2544         ewk_view_page_contents_get(), ewk_view_script_execute().
2545
2546         * PlatformEfl.cmake:
2547         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2548         (TEST_F):
2549
2550 2014-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2551
2552         [GTK] Use a different user agent string depending on the site
2553         https://bugs.webkit.org/show_bug.cgi?id=132681
2554
2555         Reviewed by Anders Carlsson.
2556
2557         * UIProcess/API/gtk/WebKitSettings.cpp:
2558         (webkit_settings_class_init): Enable site specific quirks setting
2559         by default.
2560         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2561         (WebKit::WebFrameLoaderClient::userAgent): Pass the given URL to WebPage.
2562         * WebProcess/WebPage/WebPage.cpp:
2563         (WebKit::WebPage::userAgent): Try to get the user agent for the
2564         URL received falling back to the current one otherwise.
2565         * WebProcess/WebPage/WebPage.h:
2566         (WebKit::WebPage::platformUserAgent): Added.
2567         * WebProcess/WebPage/efl/WebPageEfl.cpp:
2568         (WebKit::WebPage::platformUserAgent): Return null String.
2569         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2570         (WebKit::WebPage::platformUserAgent): Use WebCore::standardUserAgentForURL() when site specific quirks
2571         setting is enabled.
2572         * WebProcess/WebPage/ios/WebPageIOS.mm:
2573         (WebKit::WebPage::platformUserAgent): Return null String.
2574         * WebProcess/WebPage/mac/WebPageMac.mm:
2575         (WebKit::WebPage::platformUserAgent): Return null String.
2576
2577 2014-06-10  Benjamin Poulain  <benjamin@webkit.org>
2578
2579         [iOS][WK2] ScrollingTreeOverflowScrollingNode does not use asynchronous touch dispatch
2580         https://bugs.webkit.org/show_bug.cgi?id=133702
2581         <rdar://problem/17259261>
2582
2583         Reviewed by Simon Fraser.
2584
2585         Notify the WKWebView and the TouchGestureRecognizer when on of the internal UIScrollView
2586         starts scrolling in response to a gesture.
2587
2588         * UIProcess/PageClient.h:
2589         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2590         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2591         (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartPanGesture):
2592         * UIProcess/Scrolling/RemoteScrollingTree.h:
2593         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2594         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2595         (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
2596         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewWillStartPanGesture):
2597         * UIProcess/WebPageProxy.h:
2598         * UIProcess/ios/PageClientImplIOS.h:
2599         * UIProcess/ios/PageClientImplIOS.mm:
2600         (WebKit::PageClientImpl::scrollViewWillStartPanGesture):
2601         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2602         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture):
2603         * UIProcess/ios/WebPageProxyIOS.mm:
2604         (WebKit::WebPageProxy::scrollViewWillStartPanGesture):
2605
2606 2014-06-10  Dan Bernstein  <mitz@apple.com>
2607
2608         WebKit2 part of [Cocoa] Handling authentication challenges should not require multiple delegate methods
2609         https://bugs.webkit.org/show_bug.cgi?id=133697
2610
2611         Reviewed by Anders Carlsson.
2612
2613         * Shared/Authentication/AuthenticationManager.cpp:
2614         (WebKit::AuthenticationManager::performDefaultHandling): Added. Calls the new
2615         AuthenticationClient function receivedRequestToPerformDefaultHandling.
2616         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue): Added. Calls the new
2617         AuthenticationClient function receivedChallengeRejection.
2618         * Shared/Authentication/AuthenticationManager.h:
2619         * Shared/Authentication/AuthenticationManager.messages.in: Added new messages
2620         PerformDefaultHandling and RejectProtectionSpaceAndContinue.
2621
2622         * Shared/Downloads/DownloadAuthenticationClient.h: Override new AuthenticationClient member
2623         functions.
2624
2625         * Shared/Downloads/ios/DownloadIOS.mm:
2626         (WebKit::Download::receivedRequestToPerformDefaultHandling): Added empty implementation.
2627         (WebKit::Download::receivedChallengeRejection): Ditto.
2628
2629         * Shared/Downloads/mac/DownloadMac.mm:
2630         (WebKit::Download::receivedRequestToPerformDefaultHandling): Added. Forwards to the sender.
2631         (WebKit::Download::receivedChallengeRejection): Ditto.
2632
2633         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
2634         (checkChallenge): Factored out a bit of code into this helper function.
2635         (-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]): Use new helper.
2636         (-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
2637         Ditto.
2638         (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Ditto.
2639         (-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
2640         Implemented this optional NSURLAuthenticationChallengeSender protocol method by forwarding
2641         to the decision listener.
2642         (-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
2643         Ditto.
2644
2645         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
2646
2647         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2648         (WebKit::AuthenticationChallengeProxy::performDefaultHandling): Added. Sends a message to
2649         the authentication manager.
2650         (WebKit::AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue): Ditto.
2651         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2652
2653         * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
2654         (WebKit::AuthenticationDecisionListener::performDefaultHandling): Added. Forwards to the
2655         authentication challenge proxy.
2656         (WebKit::AuthenticationDecisionListener::rejectProtectionSpaceAndContinue): Ditto.
2657         * UIProcess/Authentication/AuthenticationDecisionListener.h:
2658
2659         * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
2660         * UIProcess/Cocoa/NavigationState.mm:
2661         (WebKit::NavigationState::setNavigationDelegate): Initialize
2662         webViewWillSendRequestForAuthenticationChallenge flag in the delegate methods struct.
2663         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
2664         the delegate implements -_webView:willSendRequestForAuthenticationChallenge:, return true
2665         here; the delegate will respond with -rejectProtectionSpaceAndContinueWithChallenge: if
2666         it cannot authenticate.
2667         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
2668         delegate implements -_webView:willSendRequestForAuthenticationChallenge:, send that message.
2669
2670 2014-06-10  Timothy Horton  <timothy_horton@apple.com>
2671
2672         Factor repeated CFRunLoopObserver code out
2673         https://bugs.webkit.org/show_bug.cgi?id=133690
2674
2675         Reviewed by Simon Fraser.
2676
2677         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2678         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2679         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
2680         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
2681         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2682         (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
2683         (WebKit::coreAnimationDidCommitLayersCallback): Deleted.
2684         (WebKit::RemoteLayerTreeDrawingAreaProxy::scheduleCoreAnimationLayerCommitObserver): Deleted.
2685         (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
2686         Make use of WebCore::RunLoopObserver.
2687
2688 2014-06-10  Anders Carlsson  <andersca@apple.com>
2689
2690         Fix availability declaration.
2691
2692         * UIProcess/API/Cocoa/WKError.h:
2693
2694 2014-06-10  Anders Carlsson  <andersca@apple.com>
2695
2696         Address a comment about a comment.
2697
2698         * UIProcess/API/Cocoa/WKWebView.mm:
2699         (-[WKWebView evaluateJavaScript:completionHandler:]):
2700
2701 2014-06-10  Anders Carlsson  <andersca@apple.com>
2702
2703         Add -[WKWebView evaluateJavaScript:completionHandler:]
2704         https://bugs.webkit.org/show_bug.cgi?id=133689
2705         <rdar://problem/17152685>
2706
2707         Reviewed by Geoffrey Garen.
2708
2709         * Shared/API/c/WKErrorRef.h:
2710         Remove WKErrorCode typedef from here.
2711
2712         * UIProcess/API/C/WKPageLoaderClient.h:
2713         Use uint32_t instead of WKErrorCode.
2714
2715         * UIProcess/API/Cocoa/WKError.h:
2716         (NS_ENUM):
2717         Add a WKErrorDomain and a WKErrorCode enum.
2718
2719         * UIProcess/API/Cocoa/WKError.mm:
2720         (localizedDescriptionForErrorCode):
2721         Helper that returns the localized description given an error code.
2722
2723         (createNSError):
2724         Helper that creates an NSError with the correct localized description given an error code.
2725
2726         * UIProcess/API/Cocoa/WKErrorInternal.h:
2727         Add helpers.
2728
2729         * UIProcess/API/Cocoa/WKWebView.h:
2730         Add evaluateJavaScript:completionHandler: method.
2731
2732         * UIProcess/API/Cocoa/WKWebView.mm:
2733         (callbackErrorCode):
2734         Helper that returns a WKErrorCode from a WebKit::CallbackBase::Error enum.
2735
2736         (-[WKWebView evaluateJavaScript:completionHandler:]):
2737         Run the JavaScript code and handle all the error cases.
2738
2739         (-[WKWebView _runJavaScriptInMainFrame:]):
2740         Reimplement this using the API method.
2741
2742         * WebKit2.xcodeproj/project.pbxproj:
2743         Add new files.
2744
2745 2014-06-10  Anders Carlsson  <andersca@apple.com>
2746
2747         Don't call Connection::terminateSoon if the connection is null
2748         https://bugs.webkit.org/show_bug.cgi?id=133695
2749         <rdar://problem/17069024>
2750
2751         Reviewed by Tim Horton.
2752
2753         * UIProcess/WebProcessProxy.cpp:
2754         (WebKit::WebProcessProxy::removeWebPage):
2755
2756 2014-06-10  Oliver Hunt  <oliver@apple.com>
2757
2758         Add process entitlements
2759         https://bugs.webkit.org/show_bug.cgi?id=133693
2760
2761         Reviewed by Alexey Proskuryakov.
2762
2763         Add entitlements description for Database process, and
2764         ensure that we reference the correct seatbelt profiles.
2765
2766         * Configurations/DatabaseService.Development.xcconfig:
2767         * Configurations/DatabaseService.xcconfig:
2768         * Configurations/Databases-iOS.entitlements:
2769         * Configurations/Network-iOS.entitlements:
2770         * Configurations/WebContent-iOS.entitlements:
2771         * WebKit2.xcodeproj/project.pbxproj:
2772
2773 2014-06-10  Alexey Proskuryakov  <ap@apple.com>
2774
2775         Fix crashes on some plug-in tests.
2776         https://bugs.webkit.org/show_bug.cgi?id=133691
2777         <rdar://problem/17255836>
2778
2779         Reviewed by Anders Carlsson.
2780
2781         * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize):
2782         Cannot use TemporaryChange here, because the object may go away before stack unwinds.
2783
2784 2014-06-10  Antti Koivisto  <antti@apple.com>
2785
2786         Serialize ResourceRequests without platform request
2787         https://bugs.webkit.org/show_bug.cgi?id=133679
2788
2789         Reviewed by Alexey Proskuryakov.
2790
2791         * Shared/WebCoreArgumentCoders.cpp:
2792         (IPC::ArgumentCoder<ResourceRequest>::encode):
2793         (IPC::ArgumentCoder<ResourceRequest>::decode):
2794         
2795             Encode ResourceRequest directly if possible.
2796
2797 2014-06-09  Anders Carlsson  <andersca@apple.com>
2798
2799         Fix build.
2800
2801         * UIProcess/WebPageProxy.cpp:
2802         (WebKit::WebPageProxy::resetState):
2803
2804 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
2805
2806         Work towards having frames in the scrolling tree
2807         https://bugs.webkit.org/show_bug.cgi?id=133665
2808
2809         Reviewed by Tim Horton.
2810         
2811         Override coordinatesScrollingForFrameView() to always return true for composited
2812         frames, for iOS WK2 (eventually this class will have to be specialized for iOS and OS X).
2813
2814         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
2815         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
2816         (WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):
2817
2818 2014-06-09  Anders Carlsson  <andersca@apple.com>
2819
2820         Give callbacks real status codes
2821         https://bugs.webkit.org/show_bug.cgi?id=133668
2822
2823         Reviewed by Dan Bernstein.
2824
2825         This makes it possible to know whether a callback was invalidated due to the webpage being closed,
2826         or whether it was due the a web process crash.
2827
2828         * UIProcess/GenericCallback.h:
2829         (WebKit::GenericCallback::create):
2830         (WebKit::GenericCallback::performCallbackWithReturnValue):
2831         (WebKit::GenericCallback::invalidate):
2832         (WebKit::invalidateCallbackMap):
2833         * UIProcess/WebPageProxy.cpp:
2834         (WebKit::WebPageProxy::close):
2835         (WebKit::WebPageProxy::resetState):
2836         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2837         * UIProcess/WebPageProxy.h:
2838
2839 2014-06-09  Enrica Casucci  <enrica@apple.com>
2840
2841         iOS WebKit: Crash in charactersAroundPosition.
2842         https://bugs.webkit.org/show_bug.cgi?id=133659
2843         <rdar://problem/17220870>
2844
2845         Reviewed by Benjamin Poulain.
2846
2847         We only need to compute charactersAroundPosition when we are in
2848         editable content.
2849
2850         * WebProcess/WebPage/WebPage.cpp:
2851         (WebKit::WebPage::editorState):
2852
2853 2014-06-06  Andy Estes  <aestes@apple.com>
2854
2855         [iOS] Expose _WKWebViewPrintFormatter and -_webView:printFrame: as SPI
2856         https://bugs.webkit.org/show_bug.cgi?id=133600
2857
2858         Reviewed by David Kilzer.
2859
2860         Expose -_webView:printFrame: in WKUIDelegatePrivate so that clients can implement support for window.print().
2861         Since window.print() can be called from a subframe, expose _WKWebViewPrintFormatter (renamed from
2862         WKWebViewPrintFormatter to reflect its new SPI status) as SPI and add a frameToPrint property.
2863
2864         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Forward-declared _WKFrameHandle and declared -_webView:printFrame:.
2865         * UIProcess/API/Cocoa/WKWebView.mm:
2866         (-[WKWebView _webViewPrintFormatter]): Added to get a _WKWebViewPrintFormatter.
2867         (-[WKWebView _printFormatterClass]): Updated the class name to _WKWebViewPrintFormatter.
2868         (-[WKWebView _computePageCountAndStartDrawingToPDFForFrame:printInfo:WebKit::firstPage:computedTotalScaleFactor:]):
2869         Added a frame argument. If frame is nil, print the main frame.
2870         (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]): Deleted.
2871         * UIProcess/API/Cocoa/WKWebViewInternal.h: Forward-declared _WKFrameHandle; removed an unneccessary
2872         forward-declaration of WKWebViewPrintFormatter.
2873         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Added a _webViewPrintFormatter property.
2874         * UIProcess/Cocoa/UIDelegate.h:
2875         * UIProcess/Cocoa/UIDelegate.mm:
2876         (WebKit::UIDelegate::setDelegate):
2877         (WebKit::UIDelegate::UIClient::printFrame): Called -_webView:printFrame:.
2878         * UIProcess/_WKWebViewPrintFormatter.h: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.h.
2879         * UIProcess/_WKWebViewPrintFormatter.mm: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.mm.
2880         * WebKit2.xcodeproj/project.pbxproj:
2881
2882 2014-06-09  Beth Dakin  <bdakin@apple.com>
2883
2884         Flash video controls hit-test incorrectly after changing topContentInset
2885         https://bugs.webkit.org/show_bug.cgi?id=133658
2886         -and corresponding-
2887         <rdar://problem/16978590>
2888
2889         Reviewed by Anders Carlsson.
2890
2891         When the topContent changes, the PluginView needs to be informed.
2892
2893         New function PluginView::topContentInsetDidChange() calls viewGeometryDidChange().
2894         * WebProcess/Plugins/PluginView.cpp:
2895         (WebKit::PluginView::topContentInsetDidChange):
2896         * WebProcess/Plugins/PluginView.h:
2897
2898         Call topContentInsetDidChange() after setting an inset only if it is a new inset.
2899         * WebProcess/WebPage/WebPage.cpp:
2900         (WebKit::WebPage::setTopContentInset):
2901
2902 2014-06-09  Daniel Bates  <dabates@apple.com>
2903
2904         Another attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
2905         (https://bugs.webkit.org/show_bug.cgi?id=133657)
2906
2907         Substitute WKErrorRef.h for WKError.h.
2908
2909         * UIProcess/API/efl/ewk_error.cpp:
2910         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
2911         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
2912
2913 2014-06-09  Daniel Bates  <dabates@apple.com>
2914
2915         Attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
2916         (https://bugs.webkit.org/show_bug.cgi?id=133657)
2917
2918         Rename Shared/API/c/WKError.cpp to Shared/API/c/WKErrorRef.cpp.
2919
2920         * CMakeLists.txt:
2921
2922 2014-06-09  Anders Carlsson  <andersca@apple.com>
2923
2924         Address review feedback.
2925
2926         * UIProcess/API/Cocoa/WKWebView.h:
2927
2928 2014-06-09  Anders Carlsson  <andersca@apple.com>
2929
2930         Add a WKError.h header and rename the existing WKError.h to WKErrorRef.h
2931         https://bugs.webkit.org/show_bug.cgi?id=133657
2932
2933         Reviewed by Dan Bernstein.
2934
2935         * Shared/API/Cocoa/WebKit.h:
2936         * Shared/API/c/WKErrorRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKError.cpp.
2937         (WKErrorGetTypeID):
2938         (WKErrorCopyWKErrorDomain):
2939         (WKErrorCopyDomain):
2940         (WKErrorGetErrorCode):
2941         (WKErrorCopyFailingURL):
2942         (WKErrorCopyLocalizedDescription):
2943         * Shared/API/c/WKErrorRef.h: Renamed from Source/WebKit2/Shared/API/c/WKError.h.
2944         * UIProcess/API/C/WKPage.h:
2945         * UIProcess/API/C/WKPageLoaderClient.h:
2946         * UIProcess/API/C/WebKit2_C.h:
2947         * UIProcess/API/Cocoa/WKError.h: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
2948         * UIProcess/API/Cocoa/WKError.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
2949         * WebKit2.xcodeproj/project.pbxproj:
2950         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2951
2952 2014-06-09  Brady Eidson  <beidson@apple.com>
2953
2954         Use different AppKit API for all services menus
2955         <rdar://problem/16874403> and https://bugs.webkit.org/show_bug.cgi?id=133649
2956
2957         Reviewed by Tim Horton.
2958
2959         * UIProcess/mac/WebContextMenuProxyMac.mm:
2960         (WebKit::WebContextMenuProxyMac::showContextMenu):
2961
2962 2014-06-09  Anders Carlsson  <andersca@apple.com>
2963
2964         Add WKWindowFeatures.h to the umbrella header.
2965
2966         Reviewed by Dan Bernstein.
2967
2968         * Shared/API/Cocoa/WebKit.h:
2969
2970 2014-06-09  Anders Carlsson  <andersca@apple.com>
2971
2972         Add -[WKWebView loadHTMLString:baseURL:]
2973         https://bugs.webkit.org/show_bug.cgi?id=133645
2974         <rdar://problem/17170649>
2975
2976         Reviewed by Sam Weinig.
2977
2978         * UIProcess/API/Cocoa/WKWebView.h:
2979         * UIProcess/API/Cocoa/WKWebView.mm:
2980         (-[WKWebView loadHTMLString:baseURL:]):
2981         * UIProcess/Cocoa/NavigationState.h:
2982         * UIProcess/Cocoa/NavigationState.mm:
2983         (WebKit::NavigationState::createLoadDataNavigation):
2984         * UIProcess/WebPageProxy.cpp:
2985         (WebKit::WebPageProxy::loadHTMLString):
2986         * UIProcess/WebPageProxy.h:
2987         * WebProcess/WebPage/WebPage.cpp:
2988         (WebKit::WebPage::loadDataImpl):
2989         (WebKit::WebPage::loadString):
2990         (WebKit::WebPage::loadData):
2991         (WebKit::WebPage::loadHTMLString):
2992         (WebKit::WebPage::loadAlternateHTMLString):
2993         (WebKit::WebPage::loadPlainTextString):
2994         (WebKit::WebPage::loadWebArchiveData):
2995         * WebProcess/WebPage/WebPage.h:
2996         * WebProcess/WebPage/WebPage.messages.in:
2997
2998 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
2999
3000         Fix more latched scrolling test flakiness and slowness
3001         https://bugs.webkit.org/show_bug.cgi?id=133601
3002
3003         Reviewed by Brent Fulgham.
3004
3005         Latched scrolling tests were flakey for two reasons. First, the EventSender
3006         wheel events were async from the web to the UI process, and the resulting
3007         synthetic events also async from the UI to the web process. Make them sync
3008         for testing.
3009         
3010         Secondly, the timer-based scrolling tree commit could result in the scrolling
3011         tree (specifically the frame node's notion of the scrollable area and content
3012         size) not being updated before the scrolling thread starts getting wheel events.
3013         Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
3014         
3015         Finally remove all the now-unnecessary timeouts from the tests.
3016
3017         * WebProcess/WebPage/WebPage.cpp:
3018         (WebKit::WebPage::wheelEventSyncForTesting):
3019
3020 2014-06-09  Andrzej Badowski  <a.badowski@samsung.com>
3021
3022         [EFL] Add parameter to MiniBrowser to disable web security
3023         https://bugs.webkit.org/show_bug.cgi?id=121095
3024
3025         Reviewed by Gyuyoung Kim.
3026
3027         -w (--web-security) commandline allows to disable/enable web security (enabled by default).
3028         The reason for this is to test and debug (using, for example, MiniBrowser) scripts accessing
3029         resources from other domains (cross-domain requests) such as access map location on another server.
3030         Another possibility is to launch in a webkit browser local file tests that will refer to the links
3031         in the http website loaded in an iframe. It will not be possible without deactivation of web security.
3032
3033         * UIProcess/API/efl/ewk_settings.cpp:
3034         (ewk_settings_web_security_enabled_set):
3035         (ewk_settings_web_security_enabled_get):
3036         * UIProcess/API/efl/ewk_settings.h:
3037         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
3038         (TEST_F):
3039
3040 2014-06-08  Sam Weinig  <sam@webkit.org>
3041
3042         [Cocoa] WKScriptMessage should include the frame the message is from
3043         <rdar://problem/17210226>
3044         https://bugs.webkit.org/show_bug.cgi?id=133623
3045
3046         Reviewed by Dan Bernstein.
3047
3048         * UIProcess/API/Cocoa/WKScriptMessage.h:
3049         Add WKFrameInfo property.
3050
3051         * UIProcess/API/Cocoa/WKScriptMessage.mm:
3052         (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
3053         Add WKFrameInfo to the initializer.
3054
3055         (-[WKScriptMessage frameInfo]):
3056         Implement frameInfo accessor.
3057
3058         * UIProcess/API/Cocoa/WKScriptMessageInternal.h:
3059         Add WKFrameInfo to the initializer.
3060
3061         * UIProcess/API/Cocoa/WKUserContentController.mm:
3062         Pass the WKFrameInfo to the WKScriptMessage initializer.
3063
3064 2014-06-08  Dan Bernstein  <mitz@apple.com>
3065
3066         [Cococa] WKWindowFeatures.h is missing from WebKit.framework
3067         https://bugs.webkit.org/show_bug.cgi?id=133622
3068
3069         Reviewed by Sam Weinig.
3070
3071         * WebKit2.xcodeproj/project.pbxproj: Promoted WKWindowFeatures.h to Public.
3072
3073 2014-06-08  Dan Bernstein  <mitz@apple.com>
3074
3075         <rdar://problem/17208234> [Mac] Client-certificate authentication isn’t working when using the modern API
3076         https://bugs.webkit.org/show_bug.cgi?id=133617
3077
3078         Reviewed by Sam Weinig.
3079
3080         * Shared/WebCoreArgumentCoders.cpp:
3081         (IPC::ArgumentCoder<Credential>::encode): Encode certificate credentials on Mac as well.
3082         (IPC::ArgumentCoder<Credential>::decode): Decode certificate credentials on Mac as well.
3083
3084         * Shared/cf/ArgumentCodersCF.cpp:
3085         (IPC::encode): Use OS X API for getting a persistent reference to a key.
3086         (IPC::decode): Use OS X API for getting a key from a persistent reference.
3087
3088         * Shared/cf/ArgumentCodersCF.h: Make identity coding available on Mac as well.
3089
3090 2014-06-07  Anders Carlsson  <andersca@apple.com>
3091
3092         Get rid of _WKScriptWorld
3093         https://bugs.webkit.org/show_bug.cgi?id=133610
3094
3095         Reviewed by Dan Bernstein.
3096
3097         * Shared/API/Cocoa/WebKitPrivate.h:
3098         * UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
3099         * UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
3100         * WebKit2.xcodeproj/project.pbxproj:
3101
3102 2014-05-29  Anders Carlsson  <andersca@apple.com>
3103
3104         HTTPHeaderMap should not derive from HashMap
3105         https://bugs.webkit.org/show_bug.cgi?id=133392
3106
3107         Reviewed by Darin Adler.
3108
3109         * Shared/WebCoreArgumentCoders.cpp:
3110         (IPC::ArgumentCoder<HTTPHeaderMap>::encode):
3111         (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
3112
3113 2014-06-07  Alexey Proskuryakov  <ap@apple.com>
3114
3115         [iOS] Fix a path used for sandbox profiles
3116         https://bugs.webkit.org/show_bug.cgi?id=133602
3117         <rdar://problem/17212011>
3118
3119         Reviewed by David Kilzer.
3120
3121         * WebKit2.xcodeproj/project.pbxproj:
3122
3123 2014-06-06  Enrica Casucci  <enrica@apple.com>
3124
3125         REGRESSION (iOS WebKit2): backspace key does not repeat beyond a single word.
3126         https://bugs.webkit.org/show_bug.cgi?id=133593
3127         <rdar://problem/16352228>
3128
3129         Reviewed by Benjamin Poulain.
3130
3131         We need to provide a way for the keyboard layer to select from
3132         the current position to the beginning of the word moving backwards
3133         and implement the method to know when we have reached the beginning of the document.
3134
3135         * UIProcess/WebPageProxy.h:
3136         * UIProcess/ios/WKContentViewInteraction.mm:
3137         (-[WKContentView selectWordBackward]):
3138         (-[WKContentView _selectionAtDocumentStart]):
3139         * UIProcess/ios/WebPageProxyIOS.mm:
3140         (WebKit::WebPageProxy::selectWordBackward):
3141         * WebProcess/WebPage/WebPage.h:
3142         * WebProcess/WebPage/WebPage.messages.in:
3143         * WebProcess/WebPage/ios/WebPageIOS.mm:
3144         (WebKit::WebPage::selectWordBackward):
3145
3146 2014-06-06  Enrica Casucci  <enrica@apple.com>
3147
3148         Adopt the new UIAlertController API to replace UIActionSheet.
3149         https://bugs.webkit.org/show_bug.cgi?id=133582
3150         <rdar://problem/16845223>
3151
3152         Reviewed by Joseph Pecoraro.
3153
3154         UIActionSheet is deprecated. We need to move out action sheets
3155         implementation to UIAlertView.
3156
3157         * UIProcess/API/Cocoa/_WKElementAction.h:
3158         * UIProcess/API/Cocoa/_WKElementAction.mm:
3159         * UIProcess/ios/WKActionSheet.h:
3160         * UIProcess/ios/WKActionSheet.mm:
3161         (-[WKActionSheet presentSheetFromRect:]):
3162         (-[WKActionSheet doneWithSheet]):
3163         (-[WKActionSheet willRotate]):
3164         (-[WKActionSheet updateSheetPosition]):
3165         (-[WKActionSheet _didRotateAndLayout]):
3166         (-[WKActionSheet didRotate]):
3167         * UIProcess/ios/WKActionSheetAssistant.h:
3168         * UIProcess/ios/WKActionSheetAssistant.mm:
3169         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
3170         (-[WKActionSheetAssistant showImageSheet]):
3171         (-[WKActionSheetAssistant showLinkSheet]):
3172         (-[WKActionSheetAssistant showDataDetectorsSheet]):
3173         (-[WKActionSheetAssistant cleanupSheet]):
3174         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Deleted.
3175         * UIProcess/ios/WKContentViewInteraction.mm:
3176         (-[WKContentView _longPressRecognized:]):
3177
3178 2014-06-06  Gavin Barraclough  <baraclough@apple.com>
3179
3180         Should boost ChildProcesses on iOS
3181         https://bugs.webkit.org/show_bug.cgi?id=133583
3182
3183         Reviewed by Sam Weinig.
3184
3185         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3186         (WebKit::connectToService):
3187             - boost all child processes on iOS.
3188
3189 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
3190
3191         Build fix after <http://trac.webkit.org/changeset/169655>.
3192
3193         The SPIs used do not exist on Mac, limit the code to iOS.
3194
3195         * Shared/Authentication/mac/AuthenticationManager.mac.mm:
3196         * Shared/WebCoreArgumentCoders.cpp:
3197         (IPC::ArgumentCoder<Credential>::encode):
3198         (IPC::ArgumentCoder<Credential>::decode):
3199         * Shared/cf/ArgumentCodersCF.cpp:
3200         (IPC::typeFromCFTypeRef):
3201         (IPC::encode):
3202         (IPC::decode):
3203         * Shared/cf/ArgumentCodersCF.h:
3204
3205 2014-06-06  Dan Bernstein  <mitz@apple.com>
3206
3207         <rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
3208         https://bugs.webkit.org/show_bug.cgi?id=133527
3209
3210         Reviewed by Darin Adler.
3211
3212         * Configurations/Network-iOS.entitlements: Enabled the Network process to access the keys
3213         needed to create identities to authenticate with.
3214
3215         * Shared/WebCoreArgumentCoders.cpp:
3216         (IPC::ArgumentCoder<Credential>::encode): Encode the credential type, and if it is a client
3217         certificate, encode the identity and the certificates.
3218         (IPC::ArgumentCoder<Credential>::decode): Decode the credential type. If it is a client
3219         certificate, decode the identity and the certificates and use the proper Credential
3220         constructor.
3221
3222         * Shared/cf/ArgumentCodersCF.cpp:
3223         (IPC::typeFromCFTypeRef): Handle SecIdentityRef.
3224         (IPC::encode): Encode an identity by encoding its certificate and a persistent reference to
3225         its key.
3226         (IPC::decode): Decode a certificate and a persistent reference to a key, find the key, and
3227         create an identity.
3228         * Shared/cf/ArgumentCodersCF.h:
3229
3230 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
3231
3232         [iOS][WK2] WebPage sometimes forces two resize events on animated resize
3233         https://bugs.webkit.org/show_bug.cgi?id=133534
3234
3235         Reviewed by Enrica Casucci.
3236
3237         When I updated the patch for resize events (r168556) to use the unobscured rect in scrollview coordinates,
3238         I forgot to update a snippet of code in dynamicViewportSizeUpdate(). Since that code was still using
3239         the scaled unobscured rect, there was sometimes a difference of 1 pixel between the size set by that
3240         call site and the others.
3241
3242         This path nukes the bad code and use the unobscured rect in scrollview coordinates given by the UIProcess.
3243
3244         * WebProcess/WebPage/ios/WebPageIOS.mm:
3245         (WebKit::WebPage::dynamicViewportSizeUpdate):
3246
3247 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
3248
3249         [iOS][WK2] Add device orientation
3250         https://bugs.webkit.org/show_bug.cgi?id=133530
3251         <rdar://problem/16680041>
3252
3253         Reviewed by Tim Horton.
3254
3255         Add device orientation for WebKit2.
3256
3257         For the public API, WKWebView get the updates through the notification UIWindowDidRotateNotification.
3258         We do not have any control over how the API is used, but we can expect the size will be updated before
3259         the end of rotation in most cases and the events should be sent in the right order.
3260
3261         For Safari, we use an override to support animated resize (and some tabs corner cases).
3262
3263         On the WebProcess side, we just get the new orientation directly or on DynamicViewportSizeUpdate.
3264
3265         * UIProcess/API/Cocoa/WKWebView.mm:
3266         (deviceOrientationForUIInterfaceOrientation):
3267         (deviceOrientation):
3268         (-[WKWebView initWithFrame:configuration:]):
3269         (-[WKWebView _windowDidRotate:]):
3270         (-[WKWebView _setInterfaceOrientationOverride:]):
3271         (-[WKWebView _interfaceOrientationOverride]):
3272         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3273         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3274         * UIProcess/WebPageProxy.cpp:
3275         (WebKit::WebPageProxy::WebPageProxy):
3276         * UIProcess/WebPageProxy.h:
3277         (WebKit::WebPageProxy::deviceOrientation):
3278         * UIProcess/ios/WebPageProxyIOS.mm:
3279         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3280         (WebKit::WebPageProxy::setDeviceOrientation):
3281         * WebProcess/WebCoreSupport/WebChromeClient.h:
3282         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3283         (WebKit::WebChromeClient::deviceOrientation):
3284         * WebProcess/WebPage/WebPage.cpp:
3285         (WebKit::WebPage::WebPage):
3286         * WebProcess/WebPage/WebPage.h:
3287         (WebKit::WebPage::deviceOrientation):
3288         * WebProcess/WebPage/WebPage.messages.in:
3289         * WebProcess/WebPage/ios/WebPageIOS.mm:
3290         (WebKit::WebPage::setDeviceOrientation):
3291         (WebKit::WebPage::dynamicViewportSizeUpdate):
3292
3293 2014-06-05  Oliver Hunt  <oliver@apple.com>
3294
3295         Enable SANDBOX_EXTENSIONS build flag universally on cocoa
3296         https://bugs.webkit.org/show_bug.cgi?id=133556
3297
3298         Reviewed by Alexey Proskuryakov.
3299
3300         Remove unnecessary iOS exception.
3301
3302         * WebKit2Prefix.h:
3303
3304 2014-06-05  Alexey Proskuryakov  <ap@apple.com>
3305
3306         [Mac] Tweak plug-in sandbox profiles
3307         https://bugs.webkit.org/show_bug.cgi?id=133549
3308
3309         Fix <rdar://problem/17068055> and <rdar://problem/17148837>.
3310
3311         Reviewed by Sam Weinig and Simon Cooper.
3312
3313         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
3314         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
3315
3316 2014-06-05  Tanay C  <tanay.c@samsung.com>
3317
3318         Resolve compiler error (call of overloaded 'schedule' function is ambiguous) 
3319         https://bugs.webkit.org/show_bug.cgi?id=133467
3320
3321         Reviewed by Carlos Garcia Campos.
3322
3323         * Shared/Downloads/soup/DownloadSoup.cpp:
3324         (WebKit::DownloadClient::handleResponseLater): Explicitly casting second parameter to std::function<void()>
3325
3326 2014-06-04  Benjamin Poulain  <bpoulain@apple.com>
3327
3328         [iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
3329         https://bugs.webkit.org/show_bug.cgi?id=133490
3330
3331         Reviewed by Tim Horton.
3332
3333         Instead of restoring the scroll position, restore the visual position. This makes pages appear at the same position
3334         on screen ignoring changes in the obscured top inset.
3335
3336         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3337         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
3338         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
3339         (WebKit::WebFrameLoaderClient::restoreViewState):
3340         Save and restore userHasChangedPageScaleFactor to handle rescaling correctly.
3341         Limit the scale into valid viewport limits in case the viewport meta tag has changed or the device has rotated.
3342
3343         * WebProcess/WebPage/WebPage.cpp:
3344         (WebKit::WebPage::WebPage):
3345         * WebProcess/WebPage/WebPage.h:
3346         (WebKit::WebPage::userHasChangedPageScaleFactor):
3347         * WebProcess/WebPage/ios/WebPageIOS.mm:
3348         (WebKit::WebPage::restorePageState):
3349         (WebKit::WebPage::updateVisibleContentRects):
3350         In updateVisibleContentRects, we keep track or the current difference between the exposed rect and the unobscured rect.
3351         When restoring the page position, we use the current top inset and the saved exposed rect to restore the visual
3352         scroll position.
3353
3354         It is not very robust as it does not resolve races between the two processes, but that is not worse than what we is there now.
3355
3356 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
3357
3358         WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
3359         https://bugs.webkit.org/show_bug.cgi?id=133472
3360         <rdar://problem/15686848>
3361
3362         Reviewed by Simon Fraser.
3363
3364         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3365         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3366         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3367         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
3368         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
3369         Use prepopulateRect() when zooming out to ensure that we have tiles for the current exposed area.
3370
3371         Factor applyTransientZoomToLayers out of adjustTransientZoom, so that
3372         flushLayers can call applyTransientZoomToLayers without ending up calling prepopulateRect()
3373         during layer flushing, which causes trouble.
3374
3375         It is OK to populate layers at the current scale even when zooming out, because the overdraw
3376         already covers most of the zoomed out area, and we're only adding a few more tiles at worst.
3377
3378 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
3379
3380         [iOS][WK2] Align the highlight rects with device pixels
3381         https://bugs.webkit.org/show_bug.cgi?id=133464
3382         <rdar://problem/16708861>
3383
3384         Reviewed by Enrica Casucci.
3385
3386         * UIProcess/ios/WKContentViewInteraction.mm:
3387         (-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
3388
3389 2014-06-02  Enrica Casucci  <enrica@apple.com>
3390
3391         REGRESSION (iOS WebKit2): Single tap in pages with focus on load will clear the selection after the keyboard appears.
3392         https://bugs.webkit.org/show_bug.cgi?id=133465
3393         <rdar://problem/17059189>
3394
3395         Reviewed by Benjamin Poulain.
3396
3397         If a page focuses an input field on load we don't bring the keyboard on screen
3398         since the keyboard is only shown when the user interacts with the page with gestures.
3399         Still the WebProcess sets the focus and the selection according to the rules.
3400         We need to make sure the UI process doesn't accidentally clear this selection
3401         when the user starts the interaction with the page.
3402         This patch also improves the function that retrieves the autocorrection data
3403         to be returned to the keyboard, making sure that we always send back a reply
3404         even when we don't have a valid selection.
3405
3406         * UIProcess/ios/WKContentViewInteraction.mm:
3407         (-[WKContentView _singleTapCommited:]):
3408         * WebProcess/WebPage/ios/WebPageIOS.mm:
3409         (WebKit::WebPage::requestAutocorrectionData):
3410
3411 2014-05-31  Anders Carlsson  <andersca@apple.com>
3412
3413         Change DeferrableOneShotTimer to use std::function instead of being a class template
3414         https://bugs.webkit.org/show_bug.cgi?id=133423
3415
3416         Reviewed by Antti Koivisto.
3417
3418         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3419         (WebKit::NetworkProcess::platformSetCacheModel):
3420         * Shared/CacheModel.cpp:
3421         (WebKit::calculateCacheSizes):
3422         * Shared/CacheModel.h:
3423         * WebProcess/Plugins/PluginView.cpp:
3424         (WebKit::PluginView::pluginSnapshotTimerFired):
3425         * WebProcess/Plugins/PluginView.h:
3426         * WebProcess/cocoa/WebProcessCocoa.mm:
3427         (WebKit::WebProcess::platformSetCacheModel):
3428
3429 2014-06-02  Benjamin Poulain  <bpoulain@apple.com>
3430
3431         [iOS][WK2] Round the UIScrollView content size to device pixel
3432         https://bugs.webkit.org/show_bug.cgi?id=133417
3433         <rdar://problem/15922440>
3434
3435         Reviewed by Simon Fraser.
3436
3437         We should really have the scaled content size floored to device pixels, but that will be for another
3438         time.
3439         This patch ensure the content size as seen by the API is rounded to device pixels. The value is floored
3440         to avoid showing partial pixels when the content is stable.
3441
3442         * UIProcess/API/Cocoa/WKWebView.mm:
3443         (floorFloatToPixels):
3444         (roundScrollViewCountentSize):
3445         (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
3446         (-[WKWebView _didCommitLayerTree:WebKit::]):
3447         (-[WKWebView scrollView:contentSizeForZoomScale:withProposedSize:]):
3448         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3449         (-[WKWebView _endAnimatedResize]):
3450
3451 2014-06-02  Oliver Hunt  <oliver@apple.com>
3452
3453         Move ifdef to the right place.
3454
3455         RS=Enrica
3456
3457         * WebProcess/cocoa/WebProcessCocoa.mm:
3458         (WebKit::WebProcess::initializeSandbox):
3459
3460 2014-06-02  Gavin Barraclough  <barraclough@apple.com>
3461
3462         Set default voucher for XPC client processes
3463         https://bugs.webkit.org/show_bug.cgi?id=133458
3464
3465         Reviewed by Geoff Garen.
3466
3467         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3468         (WebKit::XPCServiceInitializer):
3469             - add voucher_replace_default_voucher.
3470         * config.h:
3471             - add HAVE_VOUCHERS.
3472
3473 2014-06-02  Jeremy Jones  <jeremyj@apple.com>
3474
3475         Send external playback properties to fullscreen.
3476         https://bugs.webkit.org/show_bug.cgi?id=133366
3477
3478         Reviewed by Simon Fraser.
3479
3480         Forward setExternalPlayback.
3481
3482         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: add setExternalPlaybackProperties
3483         * WebProcess/ios/WebVideoFullscreenManager.h: add setExternalPlaybackProperties
3484         * WebProcess/ios/WebVideoFullscreenManager.mm: add setExternalPlaybackProperties
3485         (WebKit::WebVideoFullscreenManager::setExternalPlaybackProperties): added
3486
3487 2014-06-02  Enrica Casucci  <enrica@apple.com>
3488
3489         Remove unintentional changes to WKContentViewInteraction.mm
3490         introduced in r169500.
3491
3492         Unreviewed.
3493
3494         * UIProcess/ios/WKContentViewInteraction.mm:
3495         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
3496
3497 2014-06-02  Geoffrey Garen  <ggaren@apple.com>
3498
3499         Address some review comments on bug 133408
3500         https://bugs.webkit.org/show_bug.cgi?id=133410
3501
3502         Reviewed by Anders Carlsson.
3503
3504         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
3505         * UIProcess/API/Cocoa/WKUIDelegate.h:
3506
3507 2014-06-02  Dan Bernstein  <mitz@apple.com>
3508
3509         [Cocoa] -[WKWebView activeURL] is unused
3510         https://bugs.webkit.org/show_bug.cgi?id=133440
3511
3512         Reviewed by Mark Rowe.
3513
3514         * UIProcess/API/Cocoa/WKWebView.mm:
3515         (-[WKWebView activeURL]): Deleted.
3516         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed the property declaration.
3517
3518 2014-05-31  Oliver Hunt  <oliver@apple.com>