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