Unreviewed. Add missing sections to documentation.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         Unreviewed. Add missing sections to documentation.
4
5         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
6         WebKitUserContent and WebKitUserContentManager sections to the
7         documentation.
8
9 2014-08-01  Ryuan Choi  <ryuan.choi@samsung.com>
10
11         [EFL] Unable to do make install since r171901
12         https://bugs.webkit.org/show_bug.cgi?id=135497
13
14         Reviewed by Gyuyoung Kim.
15
16         * PlatformEfl.cmake: Removed ewk_defins.h from the installation list.
17
18 2014-07-31  Ryuan Choi  <ryuan.choi@samsung.com>
19
20         [EFL][WK2] MiniBrower comes to crash when combo box is pressed
21         https://bugs.webkit.org/show_bug.cgi?id=135378
22
23         Reviewed by Gyuyoung Kim.
24
25         Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.
26
27         * UIProcess/API/efl/ewk_view.h:
28
29 2014-07-31  Ryuan Choi  <ryuan.choi@samsung.com>
30
31         [EFL] remove ewk_defines.h
32         https://bugs.webkit.org/show_bug.cgi?id=135456
33
34         Reviewed by Gyuyoung Kim.
35
36         * UIProcess/API/efl/ewk_context_menu.h:
37         * UIProcess/API/efl/ewk_context_menu_item.h: Moved the declaration from ewk_defines.h
38         * UIProcess/API/efl/ewk_defines.h: Removed.
39
40 2014-07-31  Brent Fulgham  <bfulgham@apple.com>
41
42         Unreviewed typo correction.
43         https://bugs.webkit.org/show_bug.cgi?id=135482
44
45         Rename '_fullScreenIsEnabled' -> '_fullScreenEnabled'
46
47         * UIProcess/API/Cocoa/WKPreferences.mm:
48         (-[WKPreferences _fullScreenEnabled]): Added
49         (-[WKPreferences _fullScreenIsEnabled]): Deleted.
50         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
51
52 2014-07-31  Brent Fulgham  <bfulgham@apple.com>
53
54         MiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
55         https://bugs.webkit.org/show_bug.cgi?id=135482
56
57         Reviewed by Simon Fraser.
58         
59         Add accessors for the missing Fullscreen API so that MiniBrowser
60         can use them.
61
62         * UIProcess/API/Cocoa/WKPreferences.mm:
63         (-[WKPreferences _fullScreenIsEnabled]): Added.
64         (-[WKPreferences _setFullScreenEnabled:]): Added.
65         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Add accessor for
66         Fullscreen mode.
67
68 2014-07-31  Beth Dakin  <bdakin@apple.com>
69
70         Hit-testing broken in WebKit 1 views with AppKit's contentInsets
71         https://bugs.webkit.org/show_bug.cgi?id=135434
72         -and corresponding-
73         <rdar://problem/17850323>
74
75         Reviewed by Benjamin Poulain.
76
77         Re-named functions.
78         * WebProcess/Plugins/PDF/PDFPlugin.mm:
79         (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
80         (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
81
82 2014-07-31  Oliver Hunt  <oliver@apple.com>
83
84         Various SSO services need the networking process to be able to spoof its bundle id
85         https://bugs.webkit.org/show_bug.cgi?id=135468
86         <rdar://problem/17864139>
87
88         Reviewed by Alexey Proskuryakov.
89
90         Just add the entitlement required to allow the sandbox to let this happen.
91
92         * Configurations/Network-iOS.entitlements:
93
94 2014-07-31  Przemyslaw Kuczynski  <p.kuczynski@samsung.com>
95
96         Fix uninitialized scalar variable
97         https://bugs.webkit.org/show_bug.cgi?id=135461
98
99         Reviewed by Alexey Proskuryakov.
100
101         If fopen fails, returned ApplicationMemoryStats structure will be uninitialized
102
103         * Shared/linux/WebMemorySamplerLinux.cpp:
104         (WebKit::sampleMemoryAllocatedForApplication): Initialized applicationStats.
105
106 2014-07-31  Rohit Kumar  <kumar.rohit@samsung.com>
107
108         Clean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
109         https://bugs.webkit.org/show_bug.cgi?id=135413
110
111         Reviewed by Darin Adler.
112
113         * WebProcess/OriginData/WebOriginDataManager.cpp:
114         (WebKit::WebOriginDataManager::getOrigins):
115         (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
116         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
117         (WebKit::WebOriginDataManager::deleteAllEntries):
118
119 2014-07-31  Chris Fleizach  <cfleizach@apple.com>
120
121         AX: iOS: Crash accessing m_page in WKAccessibilityPageObject
122         https://bugs.webkit.org/show_bug.cgi?id=134617
123
124         Reviewed by Darin Adler.
125
126         Provide a way to detach a WK2 WebPage object so that it can uninitialize other pointers, like the accessibility object.
127
128         * WebProcess/WebPage/WebPage.cpp:
129         (WebKit::WebPage::~WebPage):
130         * WebProcess/WebPage/WebPage.h:
131         * WebProcess/WebPage/efl/WebPageEfl.cpp:
132         (WebKit::WebPage::platformDetach):
133         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
134         (WebKit::WebPage::platformDetach):
135         * WebProcess/WebPage/ios/WebPageIOS.mm:
136         (WebKit::WebPage::platformDetach):
137         * WebProcess/WebPage/mac/WebPageMac.mm:
138         (WebKit::WebPage::platformDetach):
139
140 2014-07-31  Dan Bernstein  <mitz@apple.com>
141
142         WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
143         https://bugs.webkit.org/show_bug.cgi?id=135327
144
145         Reviewed by Alexey Proskuryakov.
146
147         * UIProcess/Cocoa/NavigationState.mm:
148         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
149         Return true for server trust protection spaces if the delegate implements
150         -webView:didReceiveAuthenticationChallenge:completionHandler:.
151         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
152         an assertion that is no longer true due to the above.
153
154 2014-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
155
156         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
157
158         * gtk/NEWS: Add release notes for 2.5.1.
159
160 2014-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
161
162         Unreviewed. Fix GTK+ make distcheck.
163
164         * Shared/InteractionInformationAtPosition.h: Only include
165         WebCore/SelectionRect.h for IOS.
166
167 2014-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
168
169         [GTK] Bump binary version for 2.6
170         https://bugs.webkit.org/show_bug.cgi?id=133724
171
172         Reviewed by Philippe Normand.
173
174         * PlatformGTK.cmake: Fix JavaScriptCore dependency on
175         instrospection commands and make them depend on GTK+-3.0.
176
177 2014-07-30  Enrica Casucci  <enrica@apple.com>
178
179         REGRESSION (WK2 iOS): Inline editing for Chinese and Japanese keyboards does not work in Safari.
180         https://bugs.webkit.org/show_bug.cgi?id=135449
181         <rdar://problem/17824833>
182
183         Reviewed by Benjamin Poulain.
184
185         The WebProcess sends the notification that the gesture modified the phrase boundary,
186         but the flag was not being converted properly, therefore we failed to notify
187         the text input system that a change had occurred.
188
189         * UIProcess/ios/WKContentViewInteraction.mm:
190         (toUIWKSelectionFlags):
191
192 2014-07-30  Andy Estes  <aestes@apple.com>
193
194         USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
195         https://bugs.webkit.org/show_bug.cgi?id=135439
196
197         Reviewed by Tim Horton.
198
199         We now support two different platform content filters, and will soon support a mock content filter (as part of
200         webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
201         library. ENABLE() is the correct macro to use for such a feature.
202
203         * Configurations/FeatureDefines.xcconfig:
204         * Shared/WebCoreArgumentCoders.h:
205         * UIProcess/WebFrameProxy.cpp:
206         (WebKit::WebFrameProxy::didStartProvisionalLoad):
207         * UIProcess/WebFrameProxy.h:
208         * UIProcess/WebPageProxy.cpp:
209         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
210         * UIProcess/WebPageProxy.h:
211         * UIProcess/WebPageProxy.messages.in:
212         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
213         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
214
215 2014-07-30  Andreas Kling  <akling@apple.com>
216
217         Static hash tables no longer need to be coupled with a VM.
218         <https://webkit.org/b/135421>
219
220         Reviewed by Geoffrey Garen.
221
222         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
223         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
224
225 2014-07-30  Dan Bernstein  <mitz@apple.com>
226
227         Get rid of the WKNSURLProtectionSpace wrapper
228         https://bugs.webkit.org/show_bug.cgi?id=135425
229
230         Reviewed by Sam Weinig.
231
232         * Shared/Cocoa/APIObject.mm:
233         (API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.
234
235         * Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
236         * Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.
237
238         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
239         (canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
240         WebCore::ProtectionSpace in the WebProtectionSpace.
241
242         * UIProcess/Cocoa/NavigationState.mm:
243         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.
244
245         * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.
246
247 2014-07-30  Dan Bernstein  <mitz@apple.com>
248
249         Updated for changes to the WebCore::Credential API.
250         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
251
252         Reviewed by Alexey Proskuryakov.
253
254         * Shared/Downloads/mac/DownloadMac.mm:
255         (WebKit::Download::receivedCredential):Use new Credential::nsCredential getter.
256
257         * Shared/WebCoreArgumentCoders.cpp:
258         (IPC::ArgumentCoder<Credential>::encode):  If encoding the credential requires encoding the
259         platform data, do that.
260         (IPC::ArgumentCoder<Credential>::decode): If platform data was encoded, decode it.
261         * Shared/WebCoreArgumentCoders.h:
262
263         * Shared/mac/WebCoreArgumentCodersMac.mm:
264         (IPC::ArgumentCoder<Credential>::encodePlatformData): Archive the NSURLCredential.
265         (IPC::ArgumentCoder<Credential>::decodePlatformData): Unarchive it.
266
267         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
268         (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Use
269         Credential constructor that takes an NSURLCredential.
270
271         * UIProcess/Cocoa/NavigationState.mm:
272         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Ditto.
273
274
275 2014-07-30  Carlos Garcia Campos  <cgarcia@igalia.com>
276
277         [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
278         https://bugs.webkit.org/show_bug.cgi?id=135412
279
280         Reviewed by Philippe Normand.
281
282         The problem is that WebPageProxy::setUIClient() calls
283         setCanRunModal() with the value of m_uiClient->canRunModal() which
284         is always true for us. We override that manually by calling
285         setCanRunModal() depending on the WebKitSettings. In r171742,
286         webkitWebViewUpdateSettings(), the method that overrides
287         setCanRunModal(), was moved before attachUIClientToView(), so the
288         value set by WebPageProxy::setUIClient() is the last one and takes
289         precedence. We need to make sure webkitWebViewUpdateSettings() is
290         always called after attachUIClientToView().
291
292         * UIProcess/API/gtk/WebKitWebView.cpp:
293         (webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
294         call after attachUIClientToView() and add a comment to not forget
295         about it again.
296
297 2014-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
298
299         [GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
300         https://bugs.webkit.org/show_bug.cgi?id=134830
301
302         Reviewed by Gustavo Noronha Silva.
303
304         It was added to make the API more convenient but it has ended up
305         making it more complicated. WebKitWebView::load-failed-with-tls-errors
306         now receives a GTlsCertificate + GTlsCertificateFlags and
307         webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
308         since the errors are not actually needed. This makes the API more
309         consistent with the existing method webkit_web_view_get_tls_info().
310
311         * PlatformGTK.cmake: Remove files from compilation.
312         * UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
313         * UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
314         * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
315         * UIProcess/API/gtk/WebKitWebContext.cpp:
316         (webkit_web_context_allow_tls_certificate_for_host):
317         * UIProcess/API/gtk/WebKitWebContext.h:
318         * UIProcess/API/gtk/WebKitWebView.cpp:
319         (webkit_web_view_class_init):
320         (webkitWebViewLoadFailedWithTLSErrors):
321         * UIProcess/API/gtk/WebKitWebView.h:
322         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
323         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
324         * UIProcess/API/gtk/webkit2.h:
325
326 2014-07-29  Jinwoo Song  <jinwoo7.song@samsung.com>
327
328         [EFL] Do not initialize g_type system explicitly in the ewk_init()
329         https://bugs.webkit.org/show_bug.cgi?id=135407
330
331         Reviewed by Gyuyoung Kim.
332
333         EFL build requires glib version 2.38 but g_type_init() has been deprecated
334         since version 2.36. As the type system is initialized automatically since
335         version 2.36, we do not need to call g_type_init() in the ewk_init().
336
337         https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init
338
339         * UIProcess/API/efl/ewk_main.cpp:
340         (ewk_init):
341
342 2014-07-29  Enrica Casucci  <enrica@apple.com>
343
344         REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
345         https://bugs.webkit.org/show_bug.cgi?id=135392
346         <rdar://problem/17760073>
347
348         Reviewed by Benjamin Poulain.
349
350         Adding a shortcut to the user dictionary needs to be available in non editable content too.
351
352         * UIProcess/ios/WKContentViewInteraction.mm:
353         (-[WKContentView _addShortcut:]):
354
355 2014-07-29  Tim Horton  <timothy_horton@apple.com>
356
357         WKPDFView paints rotated pages squished
358         https://bugs.webkit.org/show_bug.cgi?id=135401
359         <rdar://problem/17173916>
360
361         Reviewed by Simon Fraser.
362
363         * UIProcess/ios/WKPDFView.mm:
364         (-[WKPDFView _computePageAndDocumentFrames]):
365         [page size] returns the crop box's size, ignoring rotation.
366         [page cropBoxAccountForRotation] respects rotation, but otherwise returns the same size.
367         UIPDFPageView will respect rotation when painting, so we
368         should make sure that it is given an aspect ratio that also
369         respects rotation, so that the page isn't squished.
370
371 2014-07-29  Csaba Osztrogonác  <ossy@webkit.org>
372
373         URTBF for !ENABLE(DATABASE_PROCESS) platforms.
374
375         * WebProcess/OriginData/WebOriginDataManager.cpp:
376         (WebKit::WebOriginDataManager::getOrigins):
377         (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
378         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
379         (WebKit::WebOriginDataManager::deleteAllEntries):
380
381 2014-07-29  Brady Eidson  <beidson@apple.com>
382
383         Make WKOriginDataManager actually operate on IndexedDatabases.
384         https://bugs.webkit.org/show_bug.cgi?id=135346
385
386         Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
387
388         * DatabaseProcess/DatabaseProcess.cpp:
389         (WebKit::DatabaseProcess::DatabaseProcess):
390         (WebKit::DatabaseProcess::getIndexedDatabaseOrigins): 
391         (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins):
392         (WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path
393             that have been modified between the given dates.
394         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
395         (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin):
396         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
397         (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates):
398         (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
399         (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries):
400         * DatabaseProcess/DatabaseProcess.h:
401
402         * Shared/WebCrossThreadCopier.cpp:
403         (WebCore::SecurityOriginData>::copy):
404         * Shared/WebCrossThreadCopier.h:
405
406         * UIProcess/WebOriginDataManagerProxy.cpp:
407         (WebKit::WebOriginDataManagerProxy::getOrigins):
408         (WebKit::WebOriginDataManagerProxy::didGetOrigins):
409         (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
410         (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
411         (WebKit::WebOriginDataManagerProxy::deleteAllEntries):
412
413         * WebProcess/OriginData/WebOriginDataManager.cpp:
414         (WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess.
415         (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto.
416         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto.
417         (WebKit::WebOriginDataManager::deleteAllEntries): Ditto.
418
419 2014-07-29  Commit Queue  <commit-queue@webkit.org>
420
421         Unreviewed, rolling out r171704.
422         https://bugs.webkit.org/show_bug.cgi?id=135389
423
424         Broke two IndexedDB tests (Requested by ap on #webkit).
425
426         Reverted changeset:
427
428         "IDB transactions never reset if the Web Process ends before
429         cleaning up"
430         https://bugs.webkit.org/show_bug.cgi?id=135218
431         http://trac.webkit.org/changeset/171704
432
433 2014-07-29  Daniel Bates  <dabates@apple.com>
434
435         Use WTF::move() instead of std::move() to help ensure move semantics
436         https://bugs.webkit.org/show_bug.cgi?id=135351
437
438         Reviewed by Alexey Proskuryakov.
439
440         * UIProcess/API/Cocoa/_WKSessionState.mm:
441         (-[_WKSessionState _initWithSessionState:]):
442         * UIProcess/API/gtk/WebKitUserContent.cpp:
443         (toStringVector): Remove use of std::move(). It's unnecessary to call std::move() on an rvalue.
444         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
445         (WebKit::ServicesOverlayController::mouseEvent):
446
447 2014-07-28  Pratik Solanki  <psolanki@apple.com>
448
449         Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
450         https://bugs.webkit.org/show_bug.cgi?id=131782
451
452         Original patch by Tim Horton.
453         Reviewed by Darin Adler.
454
455         * NetworkProcess/NetworkResourceLoader.cpp:
456         * WebProcess/Network/NetworkProcessConnection.cpp:
457         Include SharedBuffer.h in implementation files.
458
459         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
460         Un-indent namespace and remove SharedBuffer forward-declaration.
461
462 2014-07-29  Adrian Perez de Castro  <aperez@igalia.com>
463
464         [GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
465         https://bugs.webkit.org/show_bug.cgi?id=133729
466
467         Reviewed by Carlos Garcia Campos.
468
469         Removes WebKitWebViewGroup, effectively reverting the changes
470         introduced by r149117. The motivation for WebKitWebViewGroup
471         was using the user style sheet injection API, which has been
472         moved into WebKitUserContentManager, rendering it unneeded.
473
474         * PlatformGTK.cmake: Remove WebKitWebViewGroup source files
475         from the build.
476         * UIProcess/API/C/gtk/WKView.cpp:
477         (WKViewCreate): Accomodate for changes in the signature of
478         webkitWebViewBaseCreate().
479         * UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
480         * UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
481         view group from WebKitWebContext.
482         (webkitWebContextCreatePageForWebView): Allow passing a
483         WebPreferences object at construction.
484         (webkitWebContextGetDefaultWebViewGroup): Deleted.
485         * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
486         * UIProcess/API/gtk/WebKitWebView.cpp:
487         (webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
488         directly. Handle the case when webkit_web_view_set_settings()
489         is called on construction by doing an early-return.
490         (webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
491         after creating the internal WebPageProxy object.
492         (webkitWebViewSetProperty): Removed "group" property, added
493         "settings" property.
494         (webkitWebViewGetProperty): Ditto.
495         (webkitWebViewDispose): Do not disconnect signal handler for
496         the (now unexistant) WebKitWebViewGroup.
497         (webkit_web_view_class_init): Removed "group" property, added
498         "settings" property.
499         (webkitWebViewHandleAuthenticationChallenge): Access the
500         WebKitWebSettings directly.
501         (webkit_web_view_new_with_related_view): Make new views share
502         settings with their related view.
503         (webkit_web_view_new_with_settings): Added.
504         (webkit_web_view_set_settings): Access the settings directly in
505         the WebKitWebView.
506         (webkit_web_view_get_settings): Ditto.
507         (webkit_web_view_set_zoom_level): Ditto.
508         (webkit_web_view_get_zoom_level): Ditto.
509         (webkitWebViewSettingsChanged): Deleted.
510         (webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
511         (webkit_web_view_new_with_group): Deleted.
512         (webkit_web_view_get_group): Deleted.
513         * UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
514         to WebKitWebViewGroup.
515         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
516         (webkitWebViewBaseCreate): Allow passing a WebPreferences object
517         for constructing the WebPageProxy.
518         (webkitWebViewBaseUpdatePreferences): Instead of going through
519         the page group, use WebPageProxy::preferences() directly.
520         (webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
521         object for constructing the WebPageProxy.
522         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
523         prototypes of the internal functions.
524         * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
525         * UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
526         * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
527         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
528         bits in the documentation.
529         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
530         * UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
531         * UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
532         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
533         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
534         Accomodate for changes in the signature of
535         webkitWebViewBaseCreate().
536
537 2014-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
538
539         Implement webkit_web_view_load_string() in WebKit2
540         https://bugs.webkit.org/show_bug.cgi?id=134735
541
542         Reviewed by Sergio Villar Senin.
543
544         Add webkit_web_view_load_bytes() that receives a GBytes to load
545         random data in the web view using the given MIME-Type, encoding
546         and base URL.
547
548         * UIProcess/API/gtk/WebKitWebView.cpp:
549         (releaseGBytes):
550         (webkit_web_view_load_bytes):
551         * UIProcess/API/gtk/WebKitWebView.h:
552         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
553         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
554
555 2014-07-29  Ryuan Choi  <ryuan.choi@samsung.com>
556
557         [EFL] Alpha value of ewk_view_bg_color_set is not working
558         https://bugs.webkit.org/show_bug.cgi?id=135333
559
560         Reviewed by Gyuyoung Kim.
561
562         evas_object_image_alpha_set should be called for the transparent evas object.
563
564         * UIProcess/API/efl/EwkView.cpp:
565         (EwkView::handleEvasObjectColorSet):
566         (EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.
567         * UIProcess/API/efl/EwkView.h:
568         * UIProcess/API/efl/ewk_view.cpp:
569         (ewk_view_bg_color_set): Moved the logic to EwkView.
570
571 2014-07-28  Mark Rowe  <mrowe@apple.com>
572
573         Web process crash causes UI process to die with an assertion failure in Connection::exceptionSourceEventHandler
574         https://bugs.webkit.org/show_bug.cgi?id=135366
575
576         Reviewed by Dan Bernstein.
577
578         * Platform/IPC/mac/ConnectionMac.mm:
579         (IPC::Connection::exceptionSourceEventHandler): Remove the assertion since it frequently fires during
580         normal development with debug builds.
581
582 2014-07-28  Benjamin Poulain  <bpoulain@apple.com>
583
584         [iOS WK2] WKWebView sometime tries to change the size of a null DrawingAreaProxy
585         https://bugs.webkit.org/show_bug.cgi?id=135368
586         <rdar://problem/16988887>
587
588         Reviewed by Simon Fraser.
589
590         We should never assume DrawingAreaProxy exists in the API invoked by the clients
591         of WKWebView. There are at least two cases where the DrawingAreaProxy is null:
592         -In some path on initialization.
593         -After a crash.
594
595         * UIProcess/API/Cocoa/WKWebView.mm:
596         (-[WKWebView _frameOrBoundsChanged]):
597         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
598         We can safely null check and skip setting the size. If the call was skipped,
599         the size is set on DrawingAreaProxy initialization by querying the current
600         size through the page client.
601
602 2014-07-28  Roger Fong  <roger_fong@apple.com>
603
604         Disable tagged strings for the plugin process.
605         https://bugs.webkit.org/show_bug.cgi?id=135354
606         <rdar://problem/17295639>.
607
608         Patch by Alexey Proskuryakov and Roger Fong.
609
610         Reviewed by Anders Carlsson.
611
612         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
613         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
614         (WebKit::connectToReExecService):
615
616 2014-07-25  Jeffrey Pfau  <jpfau@apple.com>
617
618         IDB transactions never reset if the Web Process ends before cleaning up
619         https://bugs.webkit.org/show_bug.cgi?id=135218
620
621         Reviewed by Darin Adler.
622
623         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
624         (WebKit::DatabaseToWebProcessConnection::didClose):
625         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
626         (WebKit::UniqueIDBDatabase::unregisterConnection):
627         (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
628         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
629         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
630         (WebKit::UniqueIDBDatabase::didEstablishTransaction):
631         (WebKit::UniqueIDBDatabase::didResetTransaction):
632         (WebKit::UniqueIDBDatabase::resetAllTransactions):
633         (WebKit::UniqueIDBDatabase::finalizeRollback):
634         (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
635         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
636         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
637         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
638
639 2014-07-27  Yusuke Suzuki  <utatane.tea@gmail.com>
640
641         [GTK] Keep non-DATABASE_PROCESS build
642         https://bugs.webkit.org/show_bug.cgi?id=135321
643
644         Reviewed by Gyuyoung Kim.
645
646         This is the patch for r171622 in non-DATABASE_PROCESS builds.
647         Change sendToDatabaseProcessRelaunchingIfNecessary to support non-DATABASE_PROCESS implementation.
648
649         * CMakeLists.txt:
650         * UIProcess/WebContext.h:
651         (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
652
653 2014-07-27  Gavin Barraclough  <baraclough@apple.com>
654
655         Don't rely on reading applicationState from within DidEnterBackground/WillEnterForeground
656         https://bugs.webkit.org/show_bug.cgi?id=135329
657         rdar://problem/17818308
658
659         Reviewed by Sam Weinig.
660
661         API may not be stable.
662
663         * UIProcess/ios/PageClientImplIOS.mm:
664         (WebKit::PageClientImpl::isViewVisible):
665             - changed to use -[WKContentView isBackground]
666         * UIProcess/ios/ProcessAssertionIOS.mm:
667         (-[WKProcessAssertionBackgroundTaskManager init]):
668             - split notification handlers
669         (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]):
670         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]):
671         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]): Deleted.
672             - Assume application is background is after DidEnterBackground, and not after WillEnterForeground
673         * UIProcess/ios/WKContentView.h:
674             - added isBackground.
675         * UIProcess/ios/WKContentView.mm:
676         (-[WKContentView initWithFrame:context:configuration:webView:]):
677             - check applicationState at init.
678         (-[WKContentView isBackground]):
679             - accessor
680         (-[WKContentView _applicationDidEnterBackground:]):
681         (-[WKContentView _applicationWillEnterForeground:]):
682             - update isBackground
683
684 2014-07-26  Enrica Casucci  <enrica@apple.com>
685
686         [WebKit2 iOS]Add support for caret movement for the 3rd party keyboard protocol.
687         https://bugs.webkit.org/show_bug.cgi?id=135325
688         <rdar://problem/17682120>
689
690         Reviewed by Sam Weinig.
691
692         WKContentView now implements moveByOffset to support the
693         protocol for 3rd party keyboards.
694
695         * UIProcess/WebPageProxy.h:
696         * UIProcess/ios/WKContentViewInteraction.mm:
697         (-[WKContentView moveByOffset:]):
698         * UIProcess/ios/WebPageProxyIOS.mm:
699         (WebKit::WebPageProxy::moveSelectionByOffset):
700         * WebProcess/WebPage/WebPage.h:
701         * WebProcess/WebPage/WebPage.messages.in:
702         * WebProcess/WebPage/ios/WebPageIOS.mm:
703         (WebKit::WebPage::moveSelectionByOffset):
704
705 2014-07-26  Timothy Horton  <timothy_horton@apple.com>
706
707         Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
708         https://bugs.webkit.org/show_bug.cgi?id=135319
709         <rdar://problem/17315168>
710
711         Reviewed by Darin Adler and Antti Koivisto.
712
713         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
714         (WebKit::WebFrameLoaderClient::committedLoad):
715         Allow data through to WebCore for frames with custom content providers;
716         the only custom content provider currently implemented is main frame PDF
717         on iOS, which will end up creating a PDFDocument in WebCore, which drops all
718         data on the floor immediately, so this won't result in WebCore doing anything
719         with the data, but makes sure that more of the normal document lifecycle is maintained.
720
721         In the future, we might want to consider ensuring that all custom content providers
722         end up creating a SinkDocument or something similarly generic to ensure that
723         WebCore doesn't try to do anything with their data, but for now, the only client is covered.
724
725 2014-07-25  Jeremy Jones  <jeremyj@apple.com>
726
727         Parent fullscreen from window instead of view
728         https://bugs.webkit.org/show_bug.cgi?id=135310
729
730         Reviewed by Jer Noble.
731
732         Parenting in the view causes an incorrect animation to fullscreen, and can cause 
733         fullscreen to only expand to the size of the view instead of the whole window.
734
735         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
736         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass view's window.
737         * WebProcess/ios/WebVideoFullscreenManager.mm: screenRect instead of clientRect
738         (WebKit::screenRectForNode): was clientRectForNode
739         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): use screenRectForNode
740         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
741         (WebKit::clientRectForNode): Deleted.
742
743 2014-07-25  Oliver Hunt  <oliver@apple.com>
744
745         Creating incorrect sandbox extension for hsts plist due to missing /
746         https://bugs.webkit.org/show_bug.cgi?id=135309
747
748         Reviewed by Sam Weinig.
749
750         So it turns out that you do actually need /'s in paths...
751         Now we actually create the correct extension.
752
753         * UIProcess/mac/WebContextMac.mm:
754         (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
755
756 2014-07-24  Anders Carlsson  <andersca@apple.com>
757
758         WKNavigation's properties are either always nil or don't behave as documented
759         https://bugs.webkit.org/show_bug.cgi?id=135267
760         <rdar://problem/17730536>
761
762         Reviewed by Andreas Kling.
763
764         Remove the properties from WKNavigation and introduce -[WKNavigation _request] as SPI for now.
765
766         * Shared/API/Cocoa/WebKitPrivate.h:
767         * UIProcess/API/Cocoa/WKNavigation.h:
768         * UIProcess/API/Cocoa/WKNavigation.mm:
769         (-[WKNavigation _request]):
770         (-[WKNavigation initialRequest]): Deleted.
771         (-[WKNavigation request]): Deleted.
772         (-[WKNavigation setRequest:]): Deleted.
773         (-[WKNavigation response]): Deleted.
774         (-[WKNavigation error]): Deleted.
775         * UIProcess/API/Cocoa/WKNavigationInternal.h:
776         * UIProcess/API/Cocoa/WKNavigationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationInternal.h.
777         * UIProcess/Cocoa/NavigationState.mm:
778         (WebKit::NavigationState::createLoadRequestNavigation):
779         * WebKit2.xcodeproj/project.pbxproj:
780
781 2014-07-25  Brady Eidson  <beidson@apple.com>
782
783         Clean up WKOriginDataManager and get it messaging to the DatabaseProcess
784         https://bugs.webkit.org/show_bug.cgi?id=135035
785
786         Reviewed by Sam Weinig.
787
788         * DatabaseProcess/DatabaseProcess.cpp:
789         (WebKit::DatabaseProcess::DatabaseProcess): Instantiate the WebOriginDataManager, installing its message handler.
790         (WebKit::DatabaseProcess::didReceiveMessage): Try the message receiver map, which will try the WebOriginDataManager.
791         * DatabaseProcess/DatabaseProcess.h:
792         * DatabaseProcess/DatabaseProcess.messages.in:
793
794         * UIProcess/API/C/WKOriginDataManager.cpp:
795         (WKOriginDataManagerDeleteEntriesForOrigin): Updated to also take a callback.
796         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Added.
797         (WKOriginDataManagerDeleteAllEntries): Updated to also take a callback.
798         (WKOriginDataManagerStartObservingChanges): Deleted.
799         (WKOriginDataManagerStopObservingChanges): Deleted.
800         (WKOriginDataManagerSetChangeClient): Deleted.
801         * UIProcess/API/C/WKOriginDataManager.h:
802
803         * UIProcess/Databases/DatabaseProcessProxy.cpp:
804         (WebKit::DatabaseProcessProxy::didReceiveMessage): Send messages to the WebOriginDataManagerProxy supplement if appropriate.
805         * UIProcess/Databases/DatabaseProcessProxy.h:
806         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
807
808         * UIProcess/WebContext.cpp:
809         (WebKit::WebContext::WebContext): Instantiate the WebOriginDataManagerProxy supplement.
810         * UIProcess/WebContext.h:
811         (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
812
813         * UIProcess/WebOriginDataManagerProxy.cpp:
814         (WebKit::WebOriginDataManagerProxy::contextDestroyed):
815         (WebKit::WebOriginDataManagerProxy::processDidClose):
816         (WebKit::WebOriginDataManagerProxy::getOrigins):
817         (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Setup a callback with the message.
818         (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Added
819         (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Call the callback.
820         (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Setup a callback with the message.
821         (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Call the callback.
822         (WebKit::WebOriginDataManagerProxy::startObservingChanges): Deleted.
823         (WebKit::WebOriginDataManagerProxy::stopObservingChanges): Deleted.
824         (WebKit::WebOriginDataManagerProxy::setChangeClient): Deleted.
825         (WebKit::WebOriginDataManagerProxy::didChange): Deleted.
826         * UIProcess/WebOriginDataManagerProxy.h:
827         * UIProcess/WebOriginDataManagerProxy.messages.in:
828
829         * UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Removed.
830         * UIProcess/WebOriginDataManagerProxyChangeClient.h: Removed.
831
832         * WebKit2.xcodeproj/project.pbxproj:
833
834         * WebProcess/OriginData/WebOriginDataManager.cpp:
835         (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Send the callback reply.
836         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Added.
837         (WebKit::WebOriginDataManager::deleteAllEntries): Send the callback reply.
838         (WebKit::WebOriginDataManager::startObservingChanges): Deleted.
839         (WebKit::WebOriginDataManager::stopObservingChanges): Deleted.
840         * WebProcess/OriginData/WebOriginDataManager.h:
841         * WebProcess/OriginData/WebOriginDataManager.messages.in:
842
843 2014-07-25  Gavin Barraclough  <baraclough@apple.com>
844
845         Yosemite version number is 101000
846         https://bugs.webkit.org/show_bug.cgi?id=135301
847
848         Reviewed by Sam Weinig.
849
850         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
851         (WebKit::connectToService):
852         * WebProcess/com.apple.WebProcess.sb.in:
853
854 2014-07-24  Benjamin Poulain  <bpoulain@apple.com>
855
856         [iOS][WK2] Do not try to hit test a null mainFrameRenderView on dynamicViewportSizeUpdate()
857         https://bugs.webkit.org/show_bug.cgi?id=135277
858         <rdar://problem/17804891>
859
860         Reviewed by Tim Horton.
861
862         * WebProcess/WebPage/ios/WebPageIOS.mm:
863         (WebKit::WebPage::dynamicViewportSizeUpdate):
864         There is no guarantee that the main frame have its root view when performing a dynamicViewportSizeUpdate(),
865         we should not attempt to use the layer without null checking it first.
866
867         The odd part for me is <rdar://problem/17804891> is a little too frequent. In the vast majority of cases,
868         there is a RenderView, it seems actually pretty hard not to have one on dynamicViewportSizeUpdate().
869
870         Skipping hit testing is safe because it is a completely optional part of this algorithm.
871         When the hit test is not done, the new position is computed based on the relative position prior to
872         the size change.
873
874 2014-07-24  Dan Bernstein  <mitz@apple.com>
875
876         WebKit2 part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
877         https://bugs.webkit.org/show_bug.cgi?id=135129
878
879         Reviewed by Darin Adler.
880
881         * Shared/WebBackForwardListItem.cpp:
882         (WebKit::childItemWithDocumentSequenceNumber): New helper function based on
883         WebCore::HistoryItem::childItemWithDocumentSequenceNumber.
884         (WebKit::documentTreesAreEqual): New helper function based on
885         WebCore::HistoryItem::hasSameDocumentTree.
886         (WebKit::WebBackForwardListItem::itemIsInSameDocument): Added. Based on
887         WebCore::HistoryItem::shouldDoSameDocumentNavigationTo.
888         * Shared/WebBackForwardListItem.h:
889
890         * UIProcess/WebPageProxy.cpp:
891         (WebKit::WebPageProxy::goForward): Don’t assign a new navigation ID if the back-forward
892         navigation is a same-document navigation.
893         (WebKit::WebPageProxy::goBack): Ditto.
894         (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
895
896 2014-07-24  Tim Horton  <timothy_horton@apple.com>
897
898         Sometimes WKWebView is blank after resuming the app, until you scroll
899         https://bugs.webkit.org/show_bug.cgi?id=135275
900         <rdar://problem/17803170>
901
902         Reviewed by Benjamin Poulain.
903
904         * UIProcess/WebPageProxy.cpp:
905         (WebKit::WebPageProxy::dispatchViewStateChange):
906         If the UI process is waiting for a didUpdateViewState, we need to *always*
907         get a reply from the Web Process, so dispatchViewStateChange should *always*
908         send SetViewState even if nothing changed (so that we get the reply).
909
910 2014-07-24  Simon Fraser  <simon.fraser@apple.com>
911
912         [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
913         https://bugs.webkit.org/show_bug.cgi?id=135221
914         <rdar://problem/17542454>
915
916         Reviewed by Benjamin Poulain.
917         
918         The call to didCommitLayerTree() can cause one or two visible rect updates,
919         via changes to the UIScrollView contentSize and contentOffset. As a result, we
920         would notify the scrolling tree about a viewport change, but using the old
921         scrolling tree rather than the new one, so we could move layers around for
922         nodes which are about to be removed from the tree.
923         
924         However, we also have to ensure that programmatic scrolls are applied after
925         didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
926         store data about programmatic scrolls and return them to the caller, which
927         can apply them after didCommitLayerTree().
928
929         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
930         for the duration of the tree update, so that we can store requested scroll info in it.
931         (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
932         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
933         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
934         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
935         * UIProcess/WebPageProxy.cpp:
936         (WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
937         * UIProcess/WebPageProxy.h: Group some editing-related functions together.
938         (WebKit::WebPageProxy::editorState):
939         (WebKit::WebPageProxy::canDelete):
940         (WebKit::WebPageProxy::hasSelectedRange):
941         (WebKit::WebPageProxy::isContentEditable):
942         (WebKit::WebPageProxy::maintainsInactiveSelection):
943         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
944         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
945         the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
946         by any programmatic scroll.
947
948 2014-07-24  Peyton Randolph  <prandolph@apple.com>
949
950         Rename feature flag for long-press gesture on Mac.                                                                   
951         https://bugs.webkit.org/show_bug.cgi?id=135259                                                                  
952
953         Reviewed by Beth Dakin.
954
955         * Configurations/FeatureDefines.xcconfig:
956         Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
957
958 2014-07-24  Dan Bernstein  <mitz@apple.com>
959
960         WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
961         https://bugs.webkit.org/show_bug.cgi?id=135229
962
963         Reviewed by Alexey Proskuryakov.
964
965         * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
966
967         * Shared/WebCoreArgumentCoders.cpp:
968         (IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
969         platform data, do that.
970         (IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
971         * Shared/WebCoreArgumentCoders.h:
972
973         * Shared/mac/WebCoreArgumentCodersMac.mm:
974         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
975         (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
976
977         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
978         (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
979         (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
980
981 2014-07-24  Benjamin Poulain  <benjamin@webkit.org>
982
983         [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
984         https://bugs.webkit.org/show_bug.cgi?id=135227
985         <rdar://problem/17279500>
986
987         Reviewed by Simon Fraser.
988
989         In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
990         instead of sticking the to real viewport in the UIProcess.
991
992         The sequence of event is:
993         1) A layer becomes fixed in some ScrollingTree transaction.
994         2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
995            ScrollingTree update is made.
996         3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
997            But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
998            and the position is not corrected.
999         -> The layer is now at the wrong position until the next VisibleContentRectUpdate.
1000
1001         Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
1002         in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
1003
1004         Since this complexity seems risky at this point, I went for something simpler but with more overhead:
1005         any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
1006         is called to "fix" the position.
1007
1008         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1009         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
1010         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1011         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1012         (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
1013         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1014         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1015         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1016         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1017
1018 2014-07-24  Oliver Hunt  <oliver@apple.com>
1019
1020         Need to explicitly support location services in webcontent profile
1021         https://bugs.webkit.org/show_bug.cgi?id=135251
1022         <rdar://17798346>
1023
1024         Reviewed by Dan Bernstein.
1025
1026         Switching to uikit-app means that we remove the implicit support
1027         for location services. This makes us explicitly opt-in.
1028
1029         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1030
1031 2014-07-24  Tim Horton  <timothy_horton@apple.com>
1032
1033         Crash at [WKContentView _applicationWillEnterForeground:] + 28
1034         <rdar://problem/17797103>
1035
1036         Reviewed by Sam Weinig.
1037
1038         * UIProcess/ios/WKContentView.mm:
1039         (-[WKContentView _applicationWillEnterForeground:]):
1040         Drawing area can be null; null check it!
1041         It's ok if we don't hide the content in this case, because if the drawing area is null,
1042         it doesn't have any layers in the tree anyway.
1043
1044 2014-07-23  Simon Fraser  <simon.fraser@apple.com>
1045
1046         [iOS WK2] Some help.apple.com pages not scrollable
1047         https://bugs.webkit.org/show_bug.cgi?id=135228
1048         <rdar://problem/17790792>
1049
1050         Reviewed by Benjamin Poulain.
1051         
1052         On pages which size their document to the device size, the WKContentView size
1053         never changes after it's created. In this situation, we never set a bounds
1054         on the _rootContentView, so it remains zero-sized which breaks hit testing
1055         on all enclosed UIScrollViews for overflow:scroll.
1056         
1057         Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
1058         so they are always the size of their parent view, and remove the explicit setting
1059         of their bounds.
1060
1061         * UIProcess/ios/WKContentView.mm:
1062         (-[WKContentView initWithFrame:context:configuration:webView:]):
1063         (-[WKContentView setShowingInspectorIndication:]):
1064         (-[WKContentView _didCommitLayerTree:]):
1065
1066 2014-07-23  Benjamin Poulain  <bpoulain@apple.com>
1067
1068         [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
1069         https://bugs.webkit.org/show_bug.cgi?id=135187
1070
1071         Reviewed by Simon Fraser.
1072
1073         Unfortunately, restricting the input into the document rect does not work.
1074         When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
1075         the valid range should account for that.
1076
1077         Instead of playing with the keyboard rect, we can limit the scroll position
1078         inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
1079         range as needed to give access to the content. Using that range is a bit more permissive
1080         because the page could scroll to reveal content in the content inset defined by the client
1081         of the API (this could actually be quite useful for hybrid apps).
1082
1083         There was already a function to change the content offset in the valid scrollview
1084         range: changeContentOffsetBoundedInValidRange(), I extracted the range check
1085         to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
1086
1087         So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
1088         system. The scroll position we get from the WebProcess is in document coordinates, while
1089         contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
1090         To fix that, we scale the input position to get to the same scale as UIScrollView, then
1091         apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
1092
1093         * UIProcess/API/Cocoa/WKWebView.mm:
1094         (contentOffsetBoundedInValidRange):
1095         (changeContentOffsetBoundedInValidRange):
1096         (-[WKWebView _scrollToContentOffset:]):
1097
1098 2014-07-23  Commit Queue  <commit-queue@webkit.org>
1099
1100         Unreviewed, rolling out r171498.
1101         https://bugs.webkit.org/show_bug.cgi?id=135223
1102
1103         It will regress some scroll position restoration on navigation
1104         (r167916). (Requested by smfr on #webkit).
1105
1106         Reverted changeset:
1107
1108         "[iOS WK2] Header bar on nytimes articles lands in the wrong
1109         place after rubberbanding"
1110         https://bugs.webkit.org/show_bug.cgi?id=135221
1111         http://trac.webkit.org/changeset/171498
1112
1113 2014-07-23  Simon Fraser  <simon.fraser@apple.com>
1114
1115         [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
1116         https://bugs.webkit.org/show_bug.cgi?id=135221
1117
1118         Reviewed by Tim Horton.
1119         
1120         The call to didCommitLayerTree() can cause one or two visible rect updates,
1121         via changes to the UIScrollView contentSize and contentOffset. As a result, we
1122         would notify the scrolling tree about a viewport change, but using the old
1123         scrolling tree rather than the new one, so we could move layers around for
1124         nodes which are about to be removed from the tree.
1125         
1126         Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
1127         committed.
1128
1129         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1130         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1131
1132 2014-07-23  Oliver Hunt  <oliver@apple.com>
1133
1134         Add a pseudo target to create sandbox override roots
1135         https://bugs.webkit.org/show_bug.cgi?id=135216
1136         <rdar://17785560>
1137
1138         Reviewed by Alexey Proskuryakov.
1139
1140         Just a duplicate of the standard ios sandbox target, targetting
1141         the profile overrides directory.  This means we can make roots
1142         that "Just Work".
1143
1144         * WebKit2.xcodeproj/project.pbxproj:
1145
1146 2014-07-23  Oliver Hunt  <oliver@apple.com>
1147
1148         Incorrect commit for sandbox profile
1149         https://bugs.webkit.org/show_bug.cgi?id=135214
1150         <rdar://17739108>
1151
1152         Reviewed by Anders Carlsson.
1153
1154         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1155
1156 2014-07-23  Dan Bernstein  <mitz@apple.com>
1157
1158         <rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
1159         https://bugs.webkit.org/show_bug.cgi?id=135206
1160
1161         Reviewed by Anders Carlsson.
1162
1163         * Shared/cf/ArgumentCodersCF.cpp:
1164         (IPC::copyPersistentRef): Added this helper function. It differs from
1165         SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
1166         ensures that we get a reference to the copy that is in the keychain access group that the
1167         Networking process can use.
1168         (IPC::encode): Use copyPersistentRef.
1169
1170 2014-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
1171
1172         Remove CSS_EXCLUSIONS compile flag and leftover code
1173         https://bugs.webkit.org/show_bug.cgi?id=135175
1174
1175         Reviewed by Zoltan Horvath.
1176
1177         At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
1178         stubs. This removes the flag and the useless code.
1179
1180         * Configurations/FeatureDefines.xcconfig:
1181
1182 2014-07-23  Timothy Horton  <timothy_horton@apple.com>
1183
1184         REGRESSION (r171239): Much more time spent taking snapshots during the PLT
1185         https://bugs.webkit.org/show_bug.cgi?id=135177
1186         <rdar://problem/17764847>
1187
1188         Reviewed by Dan Bernstein.
1189
1190         * UIProcess/WebPageProxy.cpp:
1191         (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
1192         (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
1193         * UIProcess/WebPageProxy.h:
1194         * UIProcess/WebPageProxy.messages.in:
1195         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1196         (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
1197         * WebProcess/WebPage/WebPage.cpp:
1198         (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
1199         (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
1200         * WebProcess/WebPage/WebPage.h:
1201         Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
1202         Only send it when the current history item for the main frame changes.
1203
1204 2014-07-23  Ryuan Choi  <ryuan.choi@samsung.com>
1205
1206         [EFL] EWebKit2.h should contain version information
1207         https://bugs.webkit.org/show_bug.cgi?id=135189
1208
1209         Reviewed by Gyuyoung Kim.
1210
1211         Generate EWebKit2.h to contain the version information.
1212
1213         * PlatformEfl.cmake:
1214         * UIProcess/API/efl/EWebKit2.h.in: Renamed from Source/WebKit2/UIProcess/API/efl/EWebKit2.h.
1215
1216 2014-07-23  Ryuan Choi  <ryuan.choi@samsung.com>
1217
1218         [EFL] Do not generate forwarding header for ewk headers
1219         https://bugs.webkit.org/show_bug.cgi?id=135147
1220
1221         Reviewed by Gyuyoung Kim.
1222
1223         Only EWebKit2.h and ewk_text_checker.h are generated as forwarding header.
1224         This is unnecessary.
1225
1226         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1227         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
1228         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
1229         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
1230         * UIProcess/efl/TextCheckerClientEfl.h:
1231
1232 2014-07-22  Commit Queue  <commit-queue@webkit.org>
1233
1234         Unreviewed, rolling out r171366.
1235         https://bugs.webkit.org/show_bug.cgi?id=135190
1236
1237         Broke three API tests (Requested by ap on #webkit).
1238
1239         Reverted changeset:
1240
1241         "REGRESSION (r171239): Much more time spent taking snapshots
1242         during the PLT"
1243         https://bugs.webkit.org/show_bug.cgi?id=135177
1244         http://trac.webkit.org/changeset/171366
1245
1246 2014-07-22  Oliver Hunt  <oliver@apple.com>
1247
1248         Reduce the size of the root WebContent sandbox profile
1249         https://bugs.webkit.org/show_bug.cgi?id=135182
1250         <rdar://problem/17739108>
1251
1252         Reviewed by Alexey Proskuryakov.
1253
1254         Switch from apple-ui-app to uikit-app as the root of the webcontent
1255         profile.
1256
1257         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1258
1259 2014-07-22  Jinwoo Song  <jinwoo7.song@samsung.com>
1260
1261         Unreviewed build fix on EFL port after r171356.
1262
1263         Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
1264
1265         * UIProcess/efl/WebContextEfl.cpp:
1266         (WebKit::WebContext::platformMediaCacheDirectory):
1267
1268 2014-07-22  Enrica Casucci  <enrica@apple.com>
1269
1270         REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
1271         https://bugs.webkit.org/show_bug.cgi?id=135180
1272         <rdar://problem/16721055>
1273
1274         Reviewed by Simon Fraser.
1275
1276         Adds notifications to the WKContentView to know when scrolling starts and ends
1277         in an overflow scroll. When scrolling starts, we hide the selection and we restore
1278         it when scrolling ends, though not before the selection information in the editor
1279         state has been updated.
1280         It also adds a new method to the EditorClient class to force the
1281         selection update when scrolling is completed.
1282         
1283         * UIProcess/PageClient.h:
1284         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1285         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1286         (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
1287         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
1288         * UIProcess/Scrolling/RemoteScrollingTree.h:
1289         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1290         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1291         (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
1292         (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
1293         (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
1294         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
1295         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
1296         * UIProcess/WebPageProxy.h:
1297         * UIProcess/ios/PageClientImplIOS.h:
1298         * UIProcess/ios/PageClientImplIOS.mm:
1299         (WebKit::PageClientImpl::overflowScrollWillStartScroll):
1300         (WebKit::PageClientImpl::overflowScrollDidEndScroll):
1301         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1302         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
1303         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
1304         * UIProcess/ios/WKContentViewInteraction.h:
1305         * UIProcess/ios/WKContentViewInteraction.mm:
1306         (-[WKContentView _overflowScrollingWillBegin]):
1307         (-[WKContentView _overflowScrollingDidEnd]):
1308         (-[WKContentView _updateChangedSelection]):
1309         * UIProcess/ios/WebPageProxyIOS.mm:
1310         (WebKit::WebPageProxy::overflowScrollWillStartScroll):
1311         (WebKit::WebPageProxy::overflowScrollDidEndScroll):
1312         * WebProcess/WebCoreSupport/WebEditorClient.h:
1313         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1314         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1315         (WebKit::WebEditorClient::updateSelection):
1316
1317 2014-07-22  Benjamin Poulain  <bpoulain@apple.com>
1318
1319         [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
1320         https://bugs.webkit.org/show_bug.cgi?id=135169
1321         <rdar://problem/17740149>
1322
1323         Reviewed by Tim Horton.
1324
1325         * UIProcess/ios/WebPageProxyIOS.mm:
1326         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
1327         Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
1328         be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
1329
1330         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
1331         We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
1332         update.
1333
1334 2014-07-22  Timothy Horton  <timothy_horton@apple.com>
1335
1336         REGRESSION (r171239): Much more time spent taking snapshots during the PLT
1337         https://bugs.webkit.org/show_bug.cgi?id=135177
1338         <rdar://problem/17764847>
1339
1340         Reviewed by Dan Bernstein.
1341
1342         * UIProcess/WebPageProxy.cpp:
1343         (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
1344         (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
1345         * UIProcess/WebPageProxy.h:
1346         * UIProcess/WebPageProxy.messages.in:
1347         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1348         (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
1349         * WebProcess/WebPage/WebPage.cpp:
1350         (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
1351         (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
1352         * WebProcess/WebPage/WebPage.h:
1353         Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
1354         Only send it when the current history item for the main frame changes.
1355
1356 2014-07-22  Oliver Hunt  <oliver@apple.com>
1357
1358         Add accountsd access to network sandbox profile
1359         https://bugs.webkit.org/show_bug.cgi?id=135176
1360         <rdar://17656487>
1361
1362         Reviewed by Anders Carlsson.
1363
1364         This is available to the webcontent process already, but is also
1365         needed for the networking process.
1366
1367         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1368
1369 2014-07-22  Oliver Hunt  <oliver@apple.com>
1370
1371         Remove unused com.apple.webkit.* rules from profiles
1372         https://bugs.webkit.org/show_bug.cgi?id=135174
1373         <rdar://17755931>
1374
1375         Reviewed by Anders Carlsson.
1376
1377         We never send these rules so we should just remove use of them
1378         from the profiles.
1379
1380         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1381         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1382
1383 2014-07-22  Oliver Hunt  <oliver@apple.com>
1384
1385         Provide networking process with access to its HSTS db
1386         https://bugs.webkit.org/show_bug.cgi?id=135121
1387         <rdar://17654369>
1388
1389         Reviewed by Alexey Proskuryakov.
1390
1391         Add an extension parameter to pass the hsts database file.
1392         This requires us to create the Caches/com.apple.WebKit.Networking
1393         directory in the UI process, as the network sandbox
1394         does not allow it to create the containing directory.
1395
1396         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1397         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1398         * Shared/Network/NetworkProcessCreationParameters.cpp:
1399         (WebKit::NetworkProcessCreationParameters::encode):
1400         (WebKit::NetworkProcessCreationParameters::decode):
1401         * Shared/Network/NetworkProcessCreationParameters.h:
1402         * UIProcess/WebContext.cpp:
1403         (WebKit::WebContext::ensureNetworkProcess):
1404         (WebKit::WebContext::networkingHSTSDatabasePath):
1405         * UIProcess/WebContext.h:
1406         * UIProcess/mac/WebContextMac.mm:
1407         (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
1408
1409 2014-07-22  Benjamin Poulain  <bpoulain@apple.com>
1410
1411         [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
1412         https://bugs.webkit.org/show_bug.cgi?id=135140
1413         <rdar://problem/17754921>
1414
1415         Reviewed by Tim Horton.
1416
1417         UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
1418         everything is set up on the LayerTransaction.
1419
1420         For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
1421         should be the actual min/max for the current page state.
1422
1423         This patch split the two explicitely.
1424         For layer transactions, the values are taken from the viewport configuration directly.
1425         For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
1426         have been updated to take into account allowsUserScaling.
1427
1428         * WebProcess/WebPage/WebPage.cpp:
1429         (WebKit::WebPage::willCommitLayerTree):
1430         * WebProcess/WebPage/ios/WebPageIOS.mm:
1431         (WebKit::WebPage::minimumPageScaleFactor):
1432         (WebKit::WebPage::maximumPageScaleFactor):
1433         (WebKit::WebPage::getAssistedNodeInformation):
1434
1435 2014-07-22  Shivakumar JM  <shiva.jm@samsung.com>
1436
1437         Web Inspector: Fix unused parameter build warning
1438         https://bugs.webkit.org/show_bug.cgi?id=135151
1439
1440         Reviewed by Joseph Pecoraro.
1441
1442         Fix unused parameter build warning by removing the parameter name 
1443
1444         * WebProcess/WebPage/WebInspector.cpp:
1445         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
1446
1447 2014-07-22  Shivakumar JM  <shiva.jm@samsung.com>
1448
1449         Fix unused parameter build warning in UIProcess module
1450         https://bugs.webkit.org/show_bug.cgi?id=135154
1451
1452         Reviewed by Alexey Proskuryakov.
1453
1454         Fix unused parameter build warning in UIProcess module by using UNUSED_PARAM macro.
1455
1456         * UIProcess/WebPageProxy.cpp:
1457         (WebKit::WebPageProxy::viewStateDidChange):
1458
1459 2014-07-22  Jeremy Jones  <jeremyj@apple.com>
1460
1461         Don't create new UIWindow for video fullscreen.
1462         https://bugs.webkit.org/show_bug.cgi?id=135038
1463
1464         Reviewed by Darin Adler.
1465
1466         Use root UIView to parent fullscreen interface.
1467
1468         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1469         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
1470         * WebProcess/ios/WebVideoFullscreenManager.mm:
1471         (WebKit::screenRectForNode): Use client rect instead of screen rect.
1472
1473 2014-07-21  Ryuan Choi  <ryuan.choi@samsung.com>
1474
1475         [EFL] Add Ewk prefix to enums of ewk_navigation_policy
1476         https://bugs.webkit.org/show_bug.cgi?id=135144
1477
1478         Reviewed by Gyuyoung Kim.
1479
1480         All public enums of ewebkit should start with Ewk prefix.
1481         This patch added Ewk prefix to Ewk_Event_Mouse_Button and Ewk_Event_Modifiers.
1482         In addition, added missing description and default value for Ewk_Event_Modifier.
1483
1484         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
1485         (toEwkEventMouseButton):
1486         (toEwkEventModifiers):
1487         (EwkNavigationPolicyDecision::mouseButton):
1488         (EwkNavigationPolicyDecision::modifiers):
1489         (ewk_navigation_policy_mouse_button_get):
1490         (ewk_navigation_policy_modifiers_get):
1491         (toEventMouseButton): Deleted.
1492         (toEventModifierKeys): Deleted.
1493         * UIProcess/API/efl/ewk_navigation_policy_decision.h:
1494         * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
1495
1496 2014-07-21  Benjamin Poulain  <bpoulain@apple.com>
1497
1498         [iOS][WK2] Improve event throttling for Scroll Events
1499         https://bugs.webkit.org/show_bug.cgi?id=135082
1500         <rdar://problem/17445266>
1501
1502         Reviewed by Simon Fraser.
1503
1504         In the WebKit layer, we want a measure that is representative of the responsiveness.
1505
1506         In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
1507         by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
1508
1509         The value used for eventThrottlingDelay() is computed by averaging the new value with
1510         the old values with a 80/20 split, favoring the old data. Favoring historical data
1511         over the last timing avoid excessively throttling for a single slow frame.
1512
1513         The computation of m_estimatedMainThreadLatency can be improved in the future, this is
1514         a first cut keeping things simple.
1515
1516         With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
1517         If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
1518         and nothing is throttled.
1519
1520         If is it more than a frame, we throttle such that we can at least render two frames
1521         per event dispatch based on the historical data.
1522
1523         The exact values will need some tweaking, but this set ensures well written pages get
1524         60 events per seconds, while slow pages do not waste too much time on events.
1525
1526         * WebProcess/WebCoreSupport/WebChromeClient.h:
1527         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1528         (WebKit::WebChromeClient::eventThrottlingDelay):
1529         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1530         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
1531         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
1532         * WebProcess/WebPage/ViewUpdateDispatcher.h:
1533         * WebProcess/WebPage/WebPage.cpp:
1534         (WebKit::WebPage::WebPage):
1535         (WebKit::WebPage::didFlushLayerTreeAtTime):
1536         (WebKit::WebPage::didCommitLoad):
1537         * WebProcess/WebPage/WebPage.h:
1538         * WebProcess/WebPage/ios/WebPageIOS.mm:
1539         (WebKit::WebPage::eventThrottlingDelay):
1540         (WebKit::WebPage::updateVisibleContentRects):
1541         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1542         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1543
1544 2014-07-21  Simon Fraser  <simon.fraser@apple.com>
1545
1546         REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
1547         https://bugs.webkit.org/show_bug.cgi?id=135141
1548         <rdar://problem/17627525>
1549
1550         Reviewed by Benjamin Poulain.
1551         
1552         We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
1553         in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
1554         To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
1555         contentInset).
1556         
1557         So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the 
1558         content insets.
1559
1560         * UIProcess/API/Cocoa/WKWebView.mm:
1561         (-[WKWebView _computedContentInset]):
1562         (-[WKWebView _setObscuredInsets:]):
1563
1564 2014-07-21  Oliver Hunt  <oliver@apple.com>
1565
1566         Remove global cookie workaround from sandbox profiles
1567         https://bugs.webkit.org/show_bug.cgi?id=135138
1568         <rdar://17513375>
1569
1570         Reviewed by Alexey Proskuryakov.
1571
1572         Remove the workaround needed for global cookie access, and silencing
1573         of the associated sandbox violation.
1574
1575         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1576         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1577         * UIProcess/mac/WebContextMac.mm:
1578         (WebKit::WebContext::platformDefaultCookieStorageDirectory):
1579
1580 2014-07-21  Oliver Hunt  <oliver@apple.com>
1581
1582         Correct sandbox profiles to fix some excess privileges
1583         https://bugs.webkit.org/show_bug.cgi?id=135134
1584         <rdar://problem/17741886>
1585         <rdar://problem/17739080>
1586
1587         Reviewed by Alexey Proskuryakov.
1588
1589         This cleans up our sandbox profiles to fix a few issues - the profiles
1590         no longer allow us to issue file extension we have the ability to consume,
1591         and tightens some of the other file access rules.
1592
1593         This means we have to addd some rules to allow us to access things
1594         that we previously had access to due to lax file system restrictions.
1595
1596         Some of the features were fixable simply by using entitlements on the
1597         process rather than custom rules.
1598
1599         * Configurations/WebContent-iOS.entitlements:
1600         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
1601         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1602         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1603
1604 2014-07-21  Simon Fraser  <simon.fraser@apple.com>
1605
1606         [iOS WK2] Turn off position:fixed behavior when the keyboard is up
1607         https://bugs.webkit.org/show_bug.cgi?id=132537
1608
1609         Reviewed by Benjamin Poulain.
1610         
1611         Make interaction with form elements inside position:fixed less terrible by re-laying out
1612         fixed elements relative to the document while we have an assisted node. This ensures
1613         that all parts of a position:fixed are accessible (e.g. inputs on the right side
1614         of a fixed-width top bar).
1615         
1616         * Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
1617         and encode/decode it.
1618         (WebKit::AssistedNodeInformation::encode):
1619         (WebKit::AssistedNodeInformation::decode):
1620         * Shared/AssistedNodeInformation.h:
1621         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
1622         * UIProcess/PageClient.h: Add isAssistingNode().
1623         * UIProcess/ios/PageClientImplIOS.h:
1624         * UIProcess/ios/PageClientImplIOS.mm:
1625         (WebKit::PageClientImpl::isAssistingNode):
1626         * UIProcess/ios/WebPageProxyIOS.mm:
1627         (WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
1628         node, just use the document rect as the custom fixed position rect.
1629         * WebProcess/WebPage/ios/WebPageIOS.mm:
1630         (WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
1631         since we have to fix it up for position:fixed. If the element is inside fixed
1632         position in the main frame, re-set the fixed position rect to the document rect
1633         (which forces a layout), re-fetch elementRect, then set it back. This ensures
1634         that the UI process gets an elementRect which it can zoom to correctly.
1635
1636 2014-07-21  Timothy Horton  <timothy_horton@apple.com>
1637
1638         Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
1639         https://bugs.webkit.org/show_bug.cgi?id=135132
1640         <rdar://problem/17719832>
1641
1642         Reviewed by Simon Fraser.
1643
1644         * UIProcess/ProcessThrottler.cpp:
1645         (WebKit::ProcessThrottler::ProcessThrottler):
1646         (WebKit::ProcessThrottler::suspendTimerFired):
1647         * UIProcess/ProcessThrottler.h:
1648         * UIProcess/ios/ViewGestureControllerIOS.mm:
1649         (WebKit::ViewGestureController::ViewGestureController):
1650         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
1651         * UIProcess/mac/ViewGestureController.h:
1652         * UIProcess/mac/ViewGestureControllerMac.mm:
1653         (WebKit::ViewGestureController::ViewGestureController):
1654         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
1655         We can't use WebCore timers in the UI process because of coexistence concerns
1656         (they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
1657
1658 2014-07-21  Andy Estes  <aestes@apple.com>
1659
1660         [iOS] Handle QuickLook ResourceLoaders in the web process
1661         https://bugs.webkit.org/show_bug.cgi?id=135113
1662
1663         Reviewed by David Kilzer.
1664
1665         The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
1666         generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
1667         generated the main resource.
1668
1669         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1670         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1671
1672 2014-07-21  Brady Eidson  <beidson@apple.com>
1673
1674         DatabaseProcess doesn't relaunch after crashing.
1675         <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
1676
1677         Reviewed by Alexey Proskuryakov.
1678
1679         * UIProcess/Databases/DatabaseProcessProxy.cpp:
1680         (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
1681
1682         * UIProcess/WebContext.cpp:
1683         (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
1684         * UIProcess/WebContext.h:
1685
1686         * UIProcess/WebContextSupplement.h:
1687         (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
1688
1689 2014-07-20  KwangHyuk Kim  <hyuki.kim@samsung.com>
1690
1691         Fix warnings caused by unused parameter.
1692         https://bugs.webkit.org/show_bug.cgi?id=134975
1693
1694         Reviewed by Gyuyoung Kim.
1695
1696         Fix warnings on EwkView.cpp and LegacySessionStateCodingNone.cpp that are caused by unused parameter data.
1697
1698         * UIProcess/API/efl/EwkView.cpp:
1699         (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
1700         * UIProcess/LegacySessionStateCodingNone.cpp:
1701         (WebKit::decodeLegacySessionState):
1702
1703 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
1704
1705         Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
1706         https://bugs.webkit.org/show_bug.cgi?id=134894
1707
1708         Reviewed by Darin Adler.
1709
1710         Add setCanPlayFastReverse
1711
1712         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
1713         * WebProcess/ios/WebVideoFullscreenManager.h: ditto
1714         * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
1715         (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
1716
1717 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
1718
1719         Decrease flicker when enter and exit fullscreen.
1720         https://bugs.webkit.org/show_bug.cgi?id=134919
1721
1722         Reviewed by Simon Fraser.
1723
1724         Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
1725
1726         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
1727         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
1728         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
1729         * WebProcess/ios/WebVideoFullscreenManager.mm:
1730         (WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
1731
1732 2014-07-20  Dan Bernstein  <mitz@apple.com>
1733
1734         <rdar://problem/17739526> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
1735         https://bugs.webkit.org/show_bug.cgi?id=135099
1736
1737         Reviewed by David Kilzer.
1738
1739         * WebProcess/WebPage/ios/WebPageIOS.mm:
1740         (WebKit::WebPage::getPositionInformation): Added a null check.
1741
1742 2014-07-19  Zan Dobersek  <zdobersek@igalia.com>
1743
1744         Consistently use uint64_t as the handle parameter type for the SetAcceleratedCompositingWindowId message
1745         https://bugs.webkit.org/show_bug.cgi?id=135047
1746
1747         Reviewed by Darin Adler.
1748
1749         UIProcess' WebPageProxy is handling this parameter as an uint64_t, it should be handled as such
1750         in WebProcess as well.
1751
1752         * WebProcess/WebPage/WebPage.h:
1753         * WebProcess/WebPage/WebPage.messages.in: Also changed the parameter name to match other places.
1754         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1755         (WebKit::WebPage::setAcceleratedCompositingWindowId):
1756
1757 2014-07-18  Oliver Hunt  <oliver@apple.com>
1758
1759         We don't provide an extension to the temp file used for uploads
1760         https://bugs.webkit.org/show_bug.cgi?id=135079
1761
1762         Reviewed by Sam Weinig.
1763
1764         Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
1765         extensions for the files passed to the content process.
1766
1767         * UIProcess/WebPageProxy.cpp:
1768         (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
1769
1770 2014-07-18  Tim Horton  <timothy_horton@apple.com>
1771
1772         ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
1773         https://bugs.webkit.org/show_bug.cgi?id=135080
1774         <rdar://problem/17734714>
1775
1776         Reviewed by Sam Weinig.
1777
1778         * UIProcess/ios/ViewGestureControllerIOS.mm:
1779         (WebKit::ViewGestureController::beginSwipeGesture):
1780         (WebKit::ViewGestureController::canSwipeInDirection):
1781
1782 2014-07-18  Yongjun Zhang  <yongjun_zhang@apple.com>
1783
1784         _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
1785         https://bugs.webkit.org/show_bug.cgi?id=135077
1786
1787         When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
1788         doesn't have title attribute.
1789
1790         Reviewed by Dan Bernstein.
1791
1792         * WebProcess/WebPage/ios/WebPageIOS.mm:
1793         (WebKit::WebPage::getPositionInformation):
1794
1795 2014-07-18  Andy Estes  <aestes@apple.com>
1796
1797         [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
1798         https://bugs.webkit.org/show_bug.cgi?id=135072
1799         <rdar://problem/17528188>
1800
1801         Reviewed by David Kilzer.
1802
1803         * Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
1804         * Shared/mac/WebCoreArgumentCodersMac.mm:
1805         (IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
1806         (IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
1807         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1808         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
1809         * UIProcess/WebFrameProxy.cpp:
1810         (WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
1811         (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
1812         If the unblock is successful, reload the WebPageProxy.
1813         * UIProcess/WebFrameProxy.h:
1814         (WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
1815         * UIProcess/WebPageProxy.cpp:
1816         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
1817         request and ignore if so.
1818         * UIProcess/WebPageProxy.h:
1819         * UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
1820         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1821         (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
1822         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1823
1824 2014-07-18  Simon Fraser  <simon.fraser@apple.com>
1825
1826         [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
1827         https://bugs.webkit.org/show_bug.cgi?id=135078
1828         <rdar://problem/17401823>
1829
1830         Reviewed by Tim Horton.
1831         
1832         Fix the logging of requested scroll position and frame scale factor.
1833
1834         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1835         (WebKit::RemoteScrollingTreeTextStream::dump):
1836
1837 2014-07-18  Joseph Pecoraro  <pecoraro@apple.com>
1838
1839         [Cocoa] Use RetainPtr in _WKRemoteObjectInterface
1840         https://bugs.webkit.org/show_bug.cgi?id=135062
1841
1842         Reviewed by Anders Carlsson.
1843
1844         Switch to RetainPtr instead of manual memory management of ivars.
1845
1846         * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
1847         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1848         (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
1849         (-[_WKRemoteObjectInterface identifier]):
1850         (-[_WKRemoteObjectInterface description]):
1851         (-[_WKRemoteObjectInterface dealloc]): Deleted.
1852
1853 2014-07-18  Tim Horton  <timothy_horton@apple.com>
1854
1855         Take navigation snapshots whenever the current back-forward item is going to change
1856         https://bugs.webkit.org/show_bug.cgi?id=135058
1857         <rdar://problem/17464515>
1858
1859         Reviewed by Dan Bernstein.
1860
1861         Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
1862         snapshot whenever the Web process says that the current back-forward item is going to change.
1863         This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
1864         just two places instead of 5.
1865
1866         * UIProcess/WebPageProxy.cpp:
1867         (WebKit::WebPageProxy::goForward):
1868         (WebKit::WebPageProxy::goBack):
1869         (WebKit::WebPageProxy::goToBackForwardItem):
1870         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1871         We no longer need to special-case taking navigation snapshots
1872         when the UI process changes the back forward item or upon
1873         didStartProvisionalLoadForFrame, because we'll always snapshot
1874         in willChangeCurrentHistoryItem in all of these cases.
1875
1876         * UIProcess/WebPageProxy.cpp:
1877         (WebKit::WebPageProxy::willChangeCurrentHistoryItem):
1878         * UIProcess/WebPageProxy.h:
1879         * UIProcess/WebPageProxy.messages.in:
1880         Add willChangeCurrentHistoryItem message, which comes from the Web process.
1881         When it arrives, take a navigation snapshot.
1882
1883         * UIProcess/ios/ViewGestureControllerIOS.mm:
1884         (WebKit::ViewGestureController::beginSwipeGesture):
1885         Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
1886         so that it doesn't bail from taking the snapshot because we have a snapshot up.
1887
1888         (WebKit::ViewGestureController::endSwipeGesture):
1889         We no longer need to explicitly disable snapshotting while navigating, because
1890         we will avoid taking the snapshot if there's a snapshot being displayed.
1891
1892         * UIProcess/mac/ViewGestureControllerMac.mm:
1893         (WebKit::ViewGestureController::~ViewGestureController):
1894         Remove the snapshot if it's still up when ViewGestureController is destroyed.
1895         The Mac version of ViewGestureController is destroyed on Web process crashes
1896         because it is a message receiver, so it is not guaranteed to have the same
1897         lifetime as the WebPageProxy and friends.
1898
1899         (WebKit::ViewGestureController::trackSwipeGesture):
1900         Make use of recordNavigationSnapshot.
1901
1902         (WebKit::ViewGestureController::endSwipeGesture):
1903         Ditto from the Mac version.
1904
1905         * UIProcess/mac/ViewSnapshotStore.h:
1906         (WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
1907         (WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
1908         * UIProcess/mac/ViewSnapshotStore.mm:
1909         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
1910         (WebKit::ViewSnapshotStore::recordSnapshot):
1911         Remove the snapshot disabling mechanism and bail from snapshotting if we're
1912         showing a snapshot, as mentioned above.
1913
1914         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1915         (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
1916         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1917         * WebProcess/WebPage/WebPage.cpp:
1918         (WebKit::WebPage::willChangeCurrentHistoryItem):
1919         * WebProcess/WebPage/WebPage.h:
1920         Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
1921
1922 2014-07-18  Jon Honeycutt  <jhoneycutt@apple.com>
1923
1924         REGRESSION: Crash when typing into text field that clears itself on iOS
1925
1926         <https://bugs.webkit.org/show_bug.cgi?id=135044>
1927         <rdar://problem/17640443>
1928
1929         Reviewed by Darin Adler.
1930
1931         * WebProcess/WebPage/ios/WebPageIOS.mm:
1932         (WebKit::WebPage::requestAutocorrectionData):
1933         wordRangeFromPosition() returns null in some cases; null check range
1934         before dereferencing it. Moved some variable declarations around to
1935         better match our style.
1936
1937 2014-07-18  Tim Horton  <timothy_horton@apple.com>
1938
1939         [WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
1940         https://bugs.webkit.org/show_bug.cgi?id=134999
1941         <rdar://problem/17238025>
1942
1943         Reviewed by Sam Weinig.
1944
1945         In some cases, clients may need to throw a WKWebView with no back-forward list over
1946         another WKWebView, and want to participate in gesture swipe as if they were actually
1947         the page being overlaid.
1948
1949         * UIProcess/API/Cocoa/WKWebView.mm:
1950         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
1951         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1952         (-[WKWebViewConfiguration copyWithZone:]):
1953         (-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
1954         (-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
1955         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1956         Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
1957         will use as the real source of back-forward items, and the destination of the swipe navigation.
1958         All swipe delegate callbacks will also fire from the alternate view, because it owns the items
1959         and will be doing the navigation.
1960
1961         * UIProcess/ios/ViewGestureControllerIOS.mm:
1962         (WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
1963         (WebKit::ViewGestureController::beginSwipeGesture):
1964         Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
1965         Record a new snapshot on the current page, but copy it to the alternate view if necessary,
1966         so that when swiping forward from the alternate view, it will have the "right" snapshot.
1967         Get the target back forward item from the alternate view.
1968         Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
1969
1970         (WebKit::ViewGestureController::canSwipeInDirection):
1971         Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
1972
1973         (WebKit::ViewGestureController::endSwipeGesture):
1974         Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
1975         Perform the navigation on the alternate view if necessary.
1976
1977         (WebKit::ViewGestureController::removeSwipeSnapshot):
1978         Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
1979
1980         * UIProcess/mac/ViewGestureController.h:
1981
1982 2014-07-17  David Kilzer  <ddkilzer@apple.com>
1983
1984         SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
1985         <http://webkit.org/b/135006>
1986
1987         Reviewed by Darin Adler.
1988
1989         * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
1990         WebKit.xcconfig.
1991         * Configurations/DebugRelease.xcconfig: Remove empty
1992         SECTORDER_FLAGS definition.
1993         * Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
1994         SECTORDER_FLAGS is only set on Production builds.
1995
1996 2014-07-17  Alexey Proskuryakov  <ap@apple.com>
1997
1998         REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
1999         https://bugs.webkit.org/show_bug.cgi?id=135032
2000         <rdar://problem/17716602>
2001
2002         Reviewed by Dan Bernstein.
2003
2004         * UIProcess/WebPageProxy.cpp:
2005         (WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
2006         transaction in resetStateAfterProcessExited() wouldn't be committed.
2007         (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
2008         the most important fact that this is a stack object that can't be simply moved to
2009         a different function.
2010
2011 2014-07-17  Benjamin Poulain  <bpoulain@apple.com>
2012
2013         [iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
2014         https://bugs.webkit.org/show_bug.cgi?id=135036
2015
2016         Reviewed by Dan Bernstein.
2017
2018         * WebProcess/WebPage/ios/WebPageIOS.mm:
2019         (WebKit::WebPage::updateVisibleContentRects):
2020         I forgot to update one of the condition after changing from lastTransaction to next transaction
2021         in r171154.
2022
2023 2014-07-17  Enrica Casucci  <enrica@apple.com>
2024
2025         [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
2026         https://bugs.webkit.org/show_bug.cgi?id=135023
2027         <rdar://problem/17617282>
2028
2029         Reviewed by Benjamin Poulain and Ryosuke Niwa.
2030
2031         WKContentView needs to implement hasContent to correctly show
2032         the appropriate menu bar content. The patch adds this information
2033         to the EditorState.
2034
2035         * Shared/EditorState.cpp:
2036         (WebKit::EditorState::encode):
2037         (WebKit::EditorState::decode):
2038         * Shared/EditorState.h:
2039         (WebKit::EditorState::EditorState):
2040         * UIProcess/ios/WKContentViewInteraction.mm:
2041         (-[WKContentView hasContent]):
2042         * WebProcess/WebPage/WebPage.cpp:
2043         (WebKit::WebPage::editorState):
2044
2045 2014-07-17  Benjamin Poulain  <benjamin@webkit.org>
2046
2047         [iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
2048         https://bugs.webkit.org/show_bug.cgi?id=135010
2049
2050         Reviewed by Darin Adler.
2051
2052         This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
2053         of a dynamic viewport size update, but instead of animating the old content, it is hidden.
2054
2055         The patch is built on top of the animated resize mechanism. Instead of having an animation driving
2056         the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
2057         the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
2058
2059         The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
2060         hiding content.
2061
2062         The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
2063         [WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
2064         is initialized, and doing an animated resize would trash the WebProcess state.
2065         I wish I had a better solution, this is not great.
2066
2067         * UIProcess/API/Cocoa/WKWebView.mm:
2068         (-[WKWebView _processDidExit]):
2069         (-[WKWebView _didCommitLoadForMainFrame]):
2070         (-[WKWebView _didCommitLayerTree:]):
2071         This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
2072         exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
2073         _resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
2074         view state.
2075
2076         Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
2077         the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
2078
2079         After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
2080         executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
2081         everything we need and does not use any synchronous messages.
2082
2083         (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
2084         (-[WKWebView _restorePageStateToExposedRect:scale:]):
2085         (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
2086         (-[WKWebView _scrollToContentOffset:]):
2087         (-[WKWebView _frameOrBoundsChanged]):
2088         (-[WKWebView _updateVisibleContentRects]):
2089         (-[WKWebView _setMinimumLayoutSizeOverride:]):
2090         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2091         (-[WKWebView _setInterfaceOrientationOverride:]):
2092         (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
2093         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2094         (-[WKWebView _endAnimatedResize]):
2095         (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
2096         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2097
2098 2014-07-17  Brent Fulgham  <bfulgham@apple.com>
2099
2100         [Mac] Full screen video not always animating in the correct Space
2101         https://bugs.webkit.org/show_bug.cgi?id=135020
2102         <rdar://problem/17542310>
2103
2104         Reviewed by Dean Jackson.
2105
2106        The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
2107        mode. Subsequent fullscreen transitions will always start from this Space, even if you move
2108        the WebKit-hosted application to a different Space.
2109
2110        We can help the display system know when we've moved to a new Space by calling NSWindow's
2111        'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
2112        This method call hooks the window into the current Space so everything works properly.
2113
2114         * UIProcess/mac/WKFullScreenWindowController.mm:
2115         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
2116         new fullscreen window to the current Space before starting transition to fullscreen.
2117
2118 2014-07-17  Timothy Hatcher  <timothy@apple.com>
2119
2120         Make console.profile record to the Timeline.
2121
2122         https://bugs.webkit.org/show_bug.cgi?id=134643
2123
2124         Reviewed by Joseph Pecoraro.
2125
2126         * WebProcess/WebPage/WebInspector.cpp:
2127         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2128         (WebKit::WebInspector::startJavaScriptProfiling):
2129         (WebKit::WebInspector::stopJavaScriptProfiling):
2130
2131 2014-07-17  Brady Eidson  <beidson@apple.com>
2132
2133         Crash in ServicesOverlayController::~ServicesOverlayController.
2134         <rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022
2135
2136         Reviewed by Tim Horton.
2137
2138         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2139         (WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
2140             PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.
2141
2142 2014-07-17  Tim Horton  <timothy_horton@apple.com>
2143
2144         Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
2145         https://bugs.webkit.org/show_bug.cgi?id=135018
2146         <rdar://problem/17615038>
2147
2148         Reviewed by Simon Fraser.
2149
2150         * UIProcess/DrawingAreaProxy.h:
2151         (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
2152         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2153         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2154         (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
2155         * UIProcess/mac/RemoteLayerTreeHost.h:
2156         * UIProcess/mac/RemoteLayerTreeHost.mm:
2157         (WebKit::RemoteLayerTreeHost::detachRootLayer):
2158         Add a mechanism to "hide" drawing area content until the next commit,
2159         by detaching the root layer. RemoteLayerTreeHost will automatically reattach
2160         it at the next commit.
2161
2162         * UIProcess/WebPageProxy.cpp:
2163         (WebKit::WebPageProxy::viewStateDidChange):
2164         * UIProcess/WebPageProxy.h:
2165         Add a parameter to viewStateDidChange specifying whether dispatching the change
2166         to the Web process is deferrable or not. We will also automatically use "Immediate" if
2167         the view is coming in-window, like we did before.
2168
2169         * UIProcess/ios/WKContentView.mm:
2170         (-[WKContentView _applicationWillEnterForeground:]):
2171         Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
2172         view state changes when coming into the foreground, and will have removed the root layer
2173         if a commit didn't come in while waitForDidUpdateViewState blocks.
2174         
2175 2014-07-17  Sanghyup Lee  <sh53.lee@samsung.com>
2176
2177         [EFL][WK2] Add a "focus,notfound" signal.
2178         https://bugs.webkit.org/show_bug.cgi?id=134674
2179
2180         Reviewed by Gyuyoung Kim.
2181
2182         Add a "focus,notfound" signal to handover focus control to application
2183         because there are no elements of webview to focus on the given direction.
2184
2185         Application can decide to move the focus to next widget of ewk_view or something else
2186         by using this signal.
2187
2188         * UIProcess/API/efl/EwkViewCallbacks.h:
2189         * UIProcess/API/efl/ewk_view.h:
2190         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added keyDown and keyUp function.
2191         (EWK2UnitTest::EWK2UnitTestBase::waitUntilDirectionChanged):
2192         (EWK2UnitTest::EWK2UnitTestBase::keyDown):
2193         (EWK2UnitTest::EWK2UnitTestBase::keyUp):
2194         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2195         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2196         (EWK2ViewTest::FocusNotFoundCallback):
2197         (TEST_F):
2198         * UIProcess/efl/PageUIClientEfl.cpp: Removed unnecessary calls to evas_object_focus_set().
2199         (WebKit::PageUIClientEfl::takeFocus):
2200
2201 2014-07-16  Brady Eidson  <beidson@apple.com>
2202
2203         Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
2204         https://bugs.webkit.org/show_bug.cgi?id=134984
2205
2206         Reviewed by David Kilzer.
2207
2208         * UIProcess/API/Cocoa/WKProcessPool.mm:
2209         (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
2210         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2211
2212 2014-07-16  Alexey Proskuryakov  <ap@apple.com>
2213
2214         A test that hangs at cleanup stage confuses webkitpy hugely
2215         https://bugs.webkit.org/show_bug.cgi?id=122475
2216         <rdar://problem/17184354>
2217
2218         Reviewed by Anders Carlsson.
2219
2220         Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
2221         new process for the same WebPageProxy would hit assertions.
2222
2223         * UIProcess/WebPageProxy.cpp:
2224         (WebKit::WebPageProxy::processDidCrash):
2225         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2226
2227 2014-07-16  David Kilzer  <ddkilzer@apple.com>
2228
2229         [iOS] Update order file paths for WebKit and WebKit2
2230         <http://webkit.org/b/134993>
2231         <rdar://problem/17557776>
2232
2233         Reviewed by Darin Adler.
2234
2235         * Configurations/Base.xcconfig: Add order file for iOS
2236         named WebKit.order.
2237
2238 2014-07-16  Brady Eidson  <beidson@apple.com>
2239
2240         Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
2241         <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
2242
2243         Reviewed by Dan Bernstein.
2244
2245         Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
2246         * UIProcess/API/Cocoa/WKProcessPool.mm:
2247         (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
2248         (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
2249         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2250
2251         Add a big shiny comment in a few key places:
2252         * DatabaseProcess/DatabaseProcess.cpp:
2253         (WebKit::DatabaseProcess::initializeDatabaseProcess):
2254         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2255         (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
2256         * UIProcess/WebContext.cpp:
2257         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
2258         (WebKit::WebContext::ensureDatabaseProcess):
2259
2260 2014-07-16  Enrica Casucci  <enrica@apple.com>
2261
2262         REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
2263         https://bugs.webkit.org/show_bug.cgi?id=134992
2264         <rdar://problem/17528020>
2265
2266         Reviewed by Benjamin Poulain.
2267
2268         This patch exposes the scroller and the visible content rect so that
2269         UIKit can implement autoscroll when dragging the selections.
2270         It also changes that way we do hit testing to allow hit test outside
2271         the clipping region and fixes the way we compute the selection rectangle
2272         for the block selection, ensuring that we consider also non text elements
2273         like images.
2274
2275         * UIProcess/ios/WKContentViewInteraction.mm:
2276         (-[WKContentView scroller]):
2277         (-[WKContentView visibleRect]):
2278         * WebProcess/WebPage/ios/WebPageIOS.mm:
2279         (WebKit::selectionBoxForRange):
2280         (WebKit::WebPage::rangeForWebSelectionAtPosition):
2281         (WebKit::WebPage::rangeForBlockAtPoint):
2282         (WebKit::WebPage::expandedRangeFromHandle):
2283         (WebKit::WebPage::contractedRangeFromHandle):
2284         (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
2285         (WebKit::WebPage::changeBlockSelection):
2286
2287 2014-07-16  Alexey Proskuryakov  <ap@apple.com>
2288
2289         <rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
2290         CFNetwork cache path in WebContent process
2291
2292         Rubber-stamped by Sam Weinig.
2293
2294         Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
2295         false at this point in initialization sequence. But we did the right thing, as we
2296         always need to set the cache path, even when network process is used for most loading.
2297
2298         * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
2299
2300 2014-07-16  Timothy Horton  <timothy_horton@apple.com>
2301
2302         Dispatch top content inset changes immediately if synchronously waiting for view state changes
2303         ​https://bugs.webkit.org/show_bug.cgi?id=134942
2304         <rdar://problem/17666800>
2305
2306         Reviewed by Simon Fraser.
2307
2308         * UIProcess/API/mac/WKView.mm:
2309         (-[WKView _dispatchSetTopContentInset]):
2310         (-[WKView _setTopContentInset:]):
2311         Move the check from _setTopContentInset: to _dispatchSetTopContentInset
2312         that ensures that we only send the message if the top content inset changed.
2313
2314 2014-07-16  Benjamin Poulain  <bpoulain@apple.com>
2315
2316         [iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
2317         https://bugs.webkit.org/show_bug.cgi?id=134965
2318         Related to <rdar://problem/17082607>
2319
2320         Reviewed by Tim Horton.
2321
2322         Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
2323         to the page at the new size during the transition.
2324
2325         Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
2326         can be applied to the wrong set of tiles.
2327         This is mostly a problem for unresponsive WebProcess or when the synchronization is done
2328         immediately.
2329
2330         There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
2331         completely fails to get the new page, the UIProcess is in a somewhat messy state.
2332         I will look into that separately than the layer tree synchronization.
2333
2334         * UIProcess/API/Cocoa/WKWebView.mm:
2335         (-[WKWebView _didCommitLayerTree:]):
2336         (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
2337         (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
2338         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2339         * UIProcess/PageClient.h:
2340         * UIProcess/WebPageProxy.cpp:
2341         (WebKit::WebPageProxy::WebPageProxy):
2342         (WebKit::WebPageProxy::resetState):
2343         * UIProcess/WebPageProxy.h:
2344         * UIProcess/ios/PageClientImplIOS.h:
2345         * UIProcess/ios/PageClientImplIOS.mm:
2346         (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
2347         * UIProcess/ios/WebPageProxyIOS.mm:
2348         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2349         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2350         (WebKit::WebPageProxy::didCommitLayerTree):
2351         (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
2352         * WebProcess/WebPage/WebPage.cpp:
2353         (WebKit::WebPage::WebPage):
2354         (WebKit::WebPage::didCommitLoad):
2355         * WebProcess/WebPage/WebPage.h:
2356         * WebProcess/WebPage/WebPage.messages.in:
2357         * WebProcess/WebPage/ios/WebPageIOS.mm:
2358         (WebKit::WebPage::synchronizeDynamicViewportUpdate):
2359         (WebKit::WebPage::updateVisibleContentRects):
2360         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2361         (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
2362         (WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.
2363
2364 2014-07-16  Dan Bernstein  <mitz@apple.com>
2365
2366         REGRESSION (r170653): Web Content service’s Info.plist has wrong format
2367         https://bugs.webkit.org/show_bug.cgi?id=134973
2368
2369         Reviewed by Alexey Proskuryakov.
2370
2371         * WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
2372         script build phases to convert Info.plist back to binary format if the
2373         PLIST_FILE_OUTPUT_FORMAT build setting requires it.
2374
2375 2014-07-15  Benjamin Poulain  <bpoulain@apple.com>
2376
2377         Fix r171124
2378
2379         * UIProcess/API/Cocoa/WKWebView.mm:
2380         (-[WKWebView _scrollToContentOffset:]):
2381         On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
2382         of those was ignored.
2383
2384 2014-07-15  Dan Bernstein  <mitz@apple.com>
2385
2386         WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
2387         https://bugs.webkit.org/show_bug.cgi?id=134951
2388
2389         Reviewed by Tim Horton.
2390
2391         * UIProcess/API/Cocoa/WKWebView.mm:
2392         (-[WKWebView _setFormDelegate:]):
2393
2394 2014-07-15  Benjamin Poulain  <benjamin@webkit.org>
2395
2396         [iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
2397         https://bugs.webkit.org/show_bug.cgi?id=134952
2398         <rdar://problem/17647116>
2399
2400         Reviewed by Enrica Casucci.
2401
2402         When we received a scroll request, we were taking that offset directly to set the UIScrollView
2403         scroll position. This is a problem if a page request scrolling to an invalid position, we were
2404         still doing it.
2405
2406         This patch limits the position to be inside the document.
2407
2408         -- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --
2409
2410         Some pages rely on the page scale factor changing instantly, because that is how it worked
2411         on WebKit1.
2412
2413         On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
2414         dynamically, and the page scale factor can change in response to WebProcess events (the focus
2415         changing for example). To make the page works, the WebProcess does not restrict the scroll position.
2416
2417         In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.
2418
2419         -- Why not use changeContentOffsetBoundedInValidRange()?
2420
2421         The scroll offset as seen by the page is relative to the unobscured rect. While the position used
2422         for history item is a visual position. All we need in this case is a position in the view.
2423
2424         * UIProcess/API/Cocoa/WKWebView.mm:
2425         (-[WKWebView _scrollToContentOffset:]):
2426         * UIProcess/WebPageProxy.h:
2427         * UIProcess/ios/WebPageProxyIOS.mm:
2428         (WebKit::WebPageProxy::resendLastVisibleContentRects):
2429
2430 2014-07-15  Timothy Horton  <timothy_horton@apple.com>
2431
2432         Dispatch top content inset changes immediately if synchronously waiting for view state changes
2433         https://bugs.webkit.org/show_bug.cgi?id=134942
2434         <rdar://problem/17666800>
2435
2436         Reviewed by Simon Fraser.
2437
2438         * UIProcess/API/mac/WKView.mm:
2439         (-[WKView endDeferringViewInWindowChanges]):
2440         (-[WKView endDeferringViewInWindowChangesSync]):
2441         (-[WKView _dispatchSetTopContentInset]):
2442         (-[WKView _setTopContentInset:]):
2443         Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
2444         This will ensure that the incoming contents have the right top content inset, and we don't
2445         flash between the wrong inset and the right one.
2446
2447 2014-07-15  Enrica Casucci  <enrica@apple.com>
2448
2449         REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
2450         https://bugs.webkit.org/show_bug.cgi?id=134934
2451         <rdar://problem/17224638>
2452
2453         Reviewed by Tim Horton.
2454
2455         * UIProcess/ios/WKContentViewInteraction.mm:
2456         
2457         Tab and back tab should be handled as special keys that have
2458         a command associated. The command specifies for each key the relevant
2459         action. This patch implements the commands property to create the association
2460         between key and command and the relevant actions that will execute the same
2461         code executed when the used taps on the < > buttons in the accessory bar.
2462         
2463         (-[WKContentView keyCommands]):
2464         (-[WKContentView _nextAccessoryTab:]):
2465         (-[WKContentView _prevAccessoryTab:]):
2466
2467 2014-07-15  Oliver Hunt  <oliver@apple.com>
2468
2469         More tidying of the webcontent sandbox profile
2470         https://bugs.webkit.org/show_bug.cgi?id=134938
2471
2472         Reviewed by Alexey Proskuryakov.
2473
2474         Remove some excessive abilities from the profile and make
2475         the required ones explicit.
2476
2477         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2478
2479 2014-07-14  Andreas Kling  <akling@apple.com>
2480
2481         [iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
2482         <https://webkit.org/b/134915>
2483
2484         When we're under memory pressure, the last thing we want to be doing is
2485         creating gratuitous new IOSurfaces. Just wait for the gesture to end before
2486         rendering at the new scale.
2487
2488         Reviewed by Tim Horton.
2489
2490         * WebProcess/WebPage/ios/WebPageIOS.mm:
2491         (WebKit::WebPage::updateVisibleContentRects):
2492
2493 2014-07-14  Joseph Pecoraro  <pecoraro@apple.com>
2494
2495         [Cocoa] _WKRemoteObjectInterface leaks NSString ivar
2496         https://bugs.webkit.org/show_bug.cgi?id=134914
2497
2498         Reviewed by Simon Fraser.
2499
2500         Release our copied NSString in dealloc.
2501
2502         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
2503         (-[_WKRemoteObjectInterface dealloc]):
2504
2505 2014-07-14  Dean Jackson  <dino@apple.com>
2506
2507         [PlugIns] Check for a non-null snapshot image before trying to decode it
2508         https://bugs.webkit.org/show_bug.cgi?id=134913
2509         <rdar://problem/17606033>
2510
2511         Reviewed by Tim Horton.
2512
2513         Changeset r169820 introduced a bug where we could examine the pixels of
2514         an image (looking for solid colors) before checking if the image actually
2515         existed.
2516
2517         I added a null check, and moved the code around a bit to avoid checking
2518         for existence three times.
2519
2520         * WebProcess/Plugins/PluginView.cpp:
2521         (WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
2522         before trying to look at it.
2523
2524 2014-07-14  Anders Carlsson  <andersca@apple.com>
2525
2526         Fix 32-bit build.
2527
2528         * UIProcess/Cocoa/SessionStateCoding.mm:
2529         (WebKit::encodeSessionState):
2530
2531 2014-07-14  Anders Carlsson  <andersca@apple.com>
2532
2533         Use the legacy session coder for encoding/decoding session state
2534         https://bugs.webkit.org/show_bug.cgi?id=134910
2535
2536         Reviewed by Beth Dakin.
2537
2538         * UIProcess/Cocoa/SessionStateCoding.mm:
2539         (WebKit::encodeSessionState):
2540         (WebKit::decodeSessionState):
2541
2542 2014-07-14  Oliver Hunt  <oliver@apple.com>
2543
2544         Restrict network process to remote connections
2545         https://bugs.webkit.org/show_bug.cgi?id=134908
2546
2547         Reviewed by Geoffrey Garen.
2548
2549         Further restrict network client
2550
2551         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2552
2553 2014-07-14  Tim Horton  <timothy_horton@apple.com>
2554
2555         ASSERT(isMainThread()) under OneShotDisplayLinkHandler
2556         https://bugs.webkit.org/show_bug.cgi?id=134900
2557
2558         Reviewed by Simon Fraser.
2559
2560         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2561         (-[OneShotDisplayLinkHandler displayLinkFired:]):
2562         isMainThread means the Web thread sometimes.
2563
2564 2014-07-14  Tim Horton  <timothy_horton@apple.com>
2565
2566         Fix the build.
2567
2568         * UIProcess/API/Cocoa/WKWebView.mm:
2569         (-[WKWebView _frameOrBoundsChanged]):
2570         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2571         * UIProcess/API/ios/WKViewIOS.mm:
2572         (-[WKView _frameOrBoundsChanged]):
2573
2574 2014-07-14  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2575
2576         [UNIX] Log error description when failing to create shared memory file.
2577         https://bugs.webkit.org/show_bug.cgi?id=134892
2578
2579         Reviewed by Darin Adler.
2580
2581         * Platform/unix/SharedMemoryUnix.cpp:
2582         (WebKit::SharedMemory::create): Print the string describing the error number (errno).
2583
2584 2014-07-14  Benjamin Poulain  <benjamin@webkit.org>
2585
2586         [iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
2587         https://bugs.webkit.org/show_bug.cgi?id=134875
2588
2589         Reviewed by Tim Horton.
2590
2591         On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
2592         changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
2593         at the wrong orientation.
2594
2595         This patch fixes the issue by making a special case for animated resize:
2596         -While starting animated resize, _frameOrBoundsChanged can be called several times in response to
2597          the API's client changing the WKWebView. In that case, we do not update the drawing area.
2598         -After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
2599          is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
2600          DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
2601          order, and the updateGeometry() is always done after the viewport configuration has been updated.
2602
2603         * UIProcess/API/Cocoa/WKWebView.mm:
2604         (-[WKWebView _frameOrBoundsChanged]):
2605         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2606         * UIProcess/ios/WKContentView.h:
2607         * UIProcess/ios/WKContentView.mm:
2608         (-[WKContentView setMinimumSize:]): Deleted.
2609
2610 2014-07-14  Benjamin Poulain  <bpoulain@apple.com>
2611
2612         [iOS][WK2] Fix withinEpsilon()
2613         https://bugs.webkit.org/show_bug.cgi?id=134798
2614
2615         Reviewed by Darin Adler.
2616
2617         Move the function back to WKWebView, it is no longer needed in WKContentView.
2618
2619         Use the real types as input to properly verify that the two inputs are within
2620         a small value of the 32bit floating point.
2621
2622         The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
2623         that would not make any difference on float.
2624
2625         The source of those small changes comes from the fact UIProcess does a lot of processing
2626         on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
2627         for scale. When we are getting updates from the WebProcess, we should ignore any small differences
2628         caused by the computations done with less precision.
2629
2630         * UIProcess/API/Cocoa/WKWebView.mm:
2631         (withinEpsilon):
2632         * UIProcess/ios/WKContentViewInteraction.h:
2633         (withinEpsilon): Deleted.
2634
2635 2014-07-14  Bear Travis  <betravis@adobe.com>
2636
2637         [Feature Queries] Enable Feature Queries on Mac
2638         https://bugs.webkit.org/show_bug.cgi?id=134404
2639
2640         Reviewed by Antti Koivisto.
2641
2642         Enable Feature Queries on Mac and resume running the
2643         feature tests.
2644
2645         * Configurations/FeatureDefines.xcconfig: Turn on
2646         ENABLE_CSS3_CONDITIONAL_RULES.
2647
2648 2014-07-14  Anders Carlsson  <andersca@apple.com>
2649
2650         Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
2651         https://bugs.webkit.org/show_bug.cgi?id=134889
2652
2653         Reviewed by Beth Dakin.
2654
2655         * UIProcess/API/C/WKPage.cpp:
2656         * UIProcess/API/C/WKPageLoaderClient.h:
2657
2658 2014-07-14  Dan Bernstein  <mitz@apple.com>
2659
2660         REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
2661         https://bugs.webkit.org/show_bug.cgi?id=134887
2662
2663         Reviewed by Tim Horton.
2664
2665         * UIProcess/mac/PageClientImpl.mm:
2666         (WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
2667         the client is using WKView directly.
2668         (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2669         (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2670         (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
2671
2672 2014-07-14  Eric Carlson  <eric.carlson@apple.com>
2673
2674         [Mac] don't enable low power audio mode on external output devices
2675         https://bugs.webkit.org/show_bug.cgi?id=134877
2676
2677         Reviewed by Sam Weinig.
2678
2679         * PluginProcess/PluginProcess.h: Add an empty implementation of 
2680             AudioHardwareListener::audioOutputDeviceChanged.
2681
2682 2014-07-14  Tim Horton  <timothy_horton@apple.com>
2683
2684         [iOS] Throttle painting using a UI-process-side CADisplayLink
2685         https://bugs.webkit.org/show_bug.cgi?id=134879
2686         <rdar://problem/17641699>
2687
2688         Reviewed by Simon Fraser.
2689
2690         Just waiting for CA to commit is insufficient to actually throttle to 60fps,
2691         because nothing will block the main runloop from spinning.
2692
2693         Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
2694         the first time it fires after we commit. This is not a guarantee that
2695         our content is on the screen, but we don't have any way to make that guarantee yet.
2696
2697         This will throttle painting, rAF, etc. to the display refresh rate.
2698
2699         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2700         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2701         (-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
2702         (-[OneShotDisplayLinkHandler dealloc]):
2703         (-[OneShotDisplayLinkHandler displayLinkFired:]):
2704         (-[OneShotDisplayLinkHandler invalidate]):
2705         (-[OneShotDisplayLinkHandler schedule]):
2706         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
2707         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
2708         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2709         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2710         (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
2711
2712 2014-07-14  Dan Bernstein  <mitz@apple.com>
2713
2714         <rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
2715         https://bugs.webkit.org/show_bug.cgi?id=134878
2716
2717         Reviewed by Sam Weinig.
2718
2719         Route CFNetwork’s calls to Security API through to the UI process.
2720
2721         * NetworkProcess/ios/NetworkProcessIOS.mm:
2722         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim.
2723
2724         * Shared/mac/SecItemShim.cpp:
2725         (WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply
2726         CFNetwork with alternate functions to call.
2727
2728         * Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS).
2729         * UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
2730
2731         * config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well.
2732
2733 2014-07-14  Dan Bernstein  <mitz@apple.com>
2734
2735         <rdar://problem/17398060> NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
2736         https://bugs.webkit.org/show_bug.cgi?id=134666
2737
2738         Reviewed by Tim Horton.
2739
2740         A SecItem may have an attribute whose value is a SecAccessControlRef, which is not supported
2741         by ArgumentCodersCF. In debug builds, trying to encode a CFDictionary containing a value of
2742         unsupprted type causes an assertion to fail, but in release builds encoding succeeds, and
2743         only decoding fails, in this case silently, simply not delivering the
2744         SecItemShim::secItemResponse message.
2745
2746         The fix is to teach ArgumentCodersCF about SecAccessControlRef.
2747
2748         * Shared/cf/ArgumentCodersCF.cpp:
2749         (IPC::typeFromCFTypeRef): Check for the SecAccessControlRef type.
2750         (IPC::encode): Encode the SecAccessControl serialized into CFData.
2751         (IPC::decode): Deserialize a SecAccessControl from the decoded CFData.
2752         * Shared/cf/ArgumentCodersCF.h:
2753         * config.h: Defined HAVE_SEC_ACCESS_CONTROL.
2754
2755 2014-07-13  Dan Bernstein  <mitz@apple.com>
2756
2757         <rdar://problem/17295636> [Cocoa] Include element snapshot in _WKActivatedElementInfo
2758         https://bugs.webkit.org/show_bug.cgi?id=134872
2759
2760         Reviewed by Sam Weinig.
2761
2762         * Shared/InteractionInformationAtPosition.cpp:
2763         (WebKit::InteractionInformationAtPosition::encode): Encode the image if there is one.
2764         (WebKit::InteractionInformationAtPosition::decode): Decode the image if there is one.
2765         * Shared/InteractionInformationAtPosition.h: Added an image member to the struct.
2766
2767         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Exposed the boundingRect property and added
2768         an image property.
2769         * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
2770         (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Added an image
2771         parameter, which is stored in a new ivar.
2772         (-[_WKActivatedElementInfo image]): Added this getter, which converts the ShareableBitmap
2773         into a cached Cocoa image and returns it.
2774         * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added image parameter to the
2775         initializer, removed _boundingRect property declaration from here.
2776
2777         * UIProcess/ios/WKActionSheetAssistant.mm:
2778         (-[WKActionSheetAssistant showImageSheet]): Pass the image from the position information
2779         into the _WKActivatedElementInfo initializer.
2780         (-[WKActionSheetAssistant showLinkSheet]): Ditto.
2781
2782         * WebProcess/WebPage/WebPage.cpp:
2783         (WebKit::WebPage::snapshotNode): Added.
2784         * WebProcess/WebPage/WebPage.h:
2785
2786         * WebProcess/WebPage/ios/WebPageIOS.mm:
2787         (WebKit::WebPage::getPositionInformation): If the element is a link or an image, store a
2788         snapshot of it in the image member of the InteractionInformationAtPosition.
2789
2790 2014-07-13  Dan Bernstein  <mitz@apple.com>
2791
2792         [Cocoa] Clean up session state API a little
2793         https://bugs.webkit.org/show_bug.cgi?id=134871
2794
2795         Reviewed by Darin Adler.
2796
2797         * UIProcess/API/Cocoa/WKWebView.mm:
2798         (-[WKWebView _sessionState]):
2799         (-[WKWebView _restoreFromSessionState:]): Deleted.
2800         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2801
2802 2014-07-13  Javier Fernandez  <jfernandez@igalia.com>
2803
2804         REGRESSION(r171045) [GTK] Build broken.
2805         https://bugs.webkit.org/show_bug.cgi?id=134867
2806
2807         Unreviewed GTK build fix after r171045.
2808
2809         * UIProcess/API/gtk/PageClientImpl.cpp:
2810         (WebKit::PageClientImpl::willRecordNavigationSnapshot):
2811         * UIProcess/API/gtk/PageClientImpl.h:
2812
2813 2014-07-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2814
2815         Unreviewed, EFL build fix since r171045.
2816
2817         * UIProcess/CoordinatedGraphics/WebView.h:
2818
2819 2014-07-12  Dan Bernstein  <mitz@apple.com>
2820
2821         [Cocoa] Notify the client when a navigation snapshot is taken
2822         https://bugs.webkit.org/show_bug.cgi?id=134865
2823
2824         Reviewed by Sam Weinig.
2825
2826         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
2827
2828         * UIProcess/Cocoa/NavigationState.h:
2829         * UIProcess/Cocoa/NavigationState.mm:
2830         (WebKit::NavigationState::setNavigationDelegate): Initialize new flag in
2831         m_navigationDelegateMethods.
2832         (WebKit::NavigationState::willRecordNavigationSnapshot): Added. Calls the new
2833         WKNavigationDelegate method.
2834
2835         * UIProcess/PageClient.h: Declared new client function.
2836
2837         * UIProcess/WebPageProxy.cpp:
2838         (WebKit::WebPageProxy::willRecordNavigationSnapshot): Added. Calls the new client function.
2839         * UIProcess/WebPageProxy.h:
2840
2841         * UIProcess/ios/PageClientImplIOS.h:
2842         * UIProcess/ios/PageClientImplIOS.mm:
2843         (WebKit::PageClientImpl::willRecordNavigationSnapshot): Override that calls
2844         NavigationState::willRecordNavigationSnapshot.
2845
2846         * UIProcess/mac/PageClientImpl.h:
2847         * UIProcess/mac/PageClientImpl.mm:
2848         (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
2849
2850         * UIProcess/mac/ViewSnapshotStore.mm:
2851         (WebKit::ViewSnapshotStore::recordSnapshot): Added a call to
2852         WebPageProxy::willRecordNavigationSnapshot.
2853
2854 2014-07-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2855
2856         Unreviewed, fix EFL build break since r171034.
2857
2858         * UIProcess/CoordinatedGraphics/WebView.h:
2859         * UIProcess/efl/WebContextEfl.cpp:
2860         (WebKit::WebContext::platformMediaCacheDirectory):
2861
2862 2014-07-12  Darin Adler  <darin@apple.com>
2863
2864         Try to fix 32-bit Mac build.
2865
2866         * UIProcess/mac/PageClientImpl.mm:
2867         (WebKit::PageClientImpl::navigationGestureDidBegin): Added WK_API_ENABLED conditional.
2868         (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2869         (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2870
2871 2014-07-12  Javier Fernandez  <jfernandez@igalia.com>
2872
2873         REGRESSION(r171034) [GTK] Build broken.
2874         https://bugs.webkit.org/show_bug.cgi?id=134861
2875
2876         Unreviewed GTK build fix.
2877
2878         * UIProcess/API/gtk/PageClientImpl.cpp:
2879         (WebKit::PageClientImpl::navigationGestureDidBegin):
2880         (WebKit::PageClientImpl::navigationGestureWillEnd):
2881         (WebKit::PageClientImpl::navigationGestureDidEnd):
2882         * UIProcess/API/gtk/PageClientImpl.h:
2883
2884 2014-07-12  Javier Fernandez  <jfernandez@igalia.com>
2885
2886         REGRESSION(r171024) [GTK] Build broken.
2887         https://bugs.webkit.org/show_bug.cgi?id=134859
2888
2889         Unreviewed GTK build fix.
2890
2891         * UIProcess/gtk/WebContextGtk.cpp:
2892         (WebKit::WebContext::platformMediaCacheDirectory):
2893
2894 2014-07-12  Dan Bernstein  <mitz@apple.com>
2895
2896         <rdar://problem/16020380> [Cocoa] Inform the client when back-forward navigation gestures begin and end
2897         https://bugs.webkit.org/show_bug.cgi?id=134853
2898
2899         Reviewed by Sam Weinig.
2900
2901         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new WKNavigationDelegate
2902         methods.
2903
2904         * UIProcess/API/Cocoa/WKWebView.mm:
2905         (-[WKWebView _isShowingNavigationGestureSnapshot]): Added this getter.
2906
2907         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property
2908         _isShowingNavigationGestureSnapshot.
2909
2910         * UIProcess/Cocoa/NavigationState.h:
2911         * UIProcess/Cocoa/NavigationState.mm:
2912         (WebKit::NavigationState::setNavigationDelegate): Initialize new flags in
2913         m_navigationDelegateMethods.
2914         (WebKit::NavigationState::navigationGestureDidBegin): Added. Calls the new
2915         WKNavigationDelegate method.
2916         (WebKit::NavigationState::navigationGestureWillEnd): Ditto.
2917         (WebKit::NavigationState::navigationGestureDidEnd): Ditto.
2918
2919         * UIProcess/PageClient.h: Declared new client functions.
2920
2921         * UIProcess/WebPageProxy.cpp:
2922         (WebKit::WebPageProxy::WebPageProxy): Initialize new member variable.
2923         (WebKit::WebPageProxy::navigationGestureDidBegin): Set m_isShowingNavigationGestureSnapshot
2924         and call the new client function.
2925         (WebKit::WebPageProxy::navigationGestureWillEnd): Call the new client function.
2926         (WebKit::WebPageProxy::navigationGestureDidEnd): Ditto.
2927         (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved): Clear
2928         m_isShowingNavigationGestureSnapshot.
2929         * UIProcess/WebPageProxy.h:
2930         (WebKit::WebPageProxy::isShowingNavigationGestureSnapshot): Added this getter.
2931
2932         * UIProcess/ios/PageClientImplIOS.h: Declared overrides of new client functions.
2933         * UIProcess/ios/PageClientImplIOS.mm:
2934         (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
2935         NavigationState function.
2936         (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2937         (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2938
2939         * UIProcess/ios/ViewGestureControllerIOS.mm:
2940         (WebKit::ViewGestureController::beginSwipeGesture): Added calls to
2941         WebPageProxy::navigationGestureDidBegin and WebPageProxy::navigationGestureWillEnd.
2942         (WebKit::ViewGestureController::endSwipeGesture): Added calls to
2943         WebPageProxy::navigationGestureDidEnd.
2944         (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
2945         WebPageProxy::navigationGestureSnapshotWasRemoved.
2946
2947         * UIProcess/mac/PageClientImpl.h: Declared overrides of new client functions.
2948         * UIProcess/mac/PageClientImpl.mm:
2949         (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
2950         NavigationState function.
2951         (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
2952         (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2953
2954         * UIProcess/mac/ViewGestureControllerMac.mm:
2955         (WebKit::ViewGestureController::beginSwipeGesture): Added call to
2956         WebPageProxy::navigationGestureDidBegin.
2957         (WebKit::ViewGestureController::endSwipeGesture): Added calls to
2958         WebPageProxy::navigationGestureDidEnd.
2959         (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
2960         WebPageProxy::navigationGestureSnapshotWasRemoved.
2961
2962 2014-07-12  Oliver Hunt  <oliver@apple.com>
2963
2964         Fix typo in prior patch
2965         https://bugs.webkit.org/show_bug.cgi?id=134858
2966
2967         Reviewed by Sam Weinig.
2968
2969         Fix typo
2970
2971         * UIProcess/mac/WebContextMac.mm:
2972         (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2973
2974 2014-07-12  Dan Bernstein  <mitz@apple.com>
2975
2976         [Cocoa] Client is not notified of same-document navigations
2977         https://bugs.webkit.org/show_bug.cgi?id=134855
2978
2979         Reviewed by Sam Weinig.
2980
2981         * UIProcess/API/APILoaderClient.h:
2982         (API::LoaderClient::didSameDocumentNavigationForFrame): Added navigationID parameter.
2983
2984         * UIProcess/API/C/WKPage.cpp:
2985         (WKPageSetPageLoaderClient): Ditto.
2986
2987         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added new enum and delegate method.
2988
2989         * UIProcess/Cocoa/NavigationState.h: Declare override of
2990         API::LoaderClient::didSameDocumentNavigationForFrame. Added flag in
2991         m_navigationDelegateMethods struct.
2992         * UIProcess/Cocoa/NavigationState.mm:
2993         (WebKit::NavigationState::setNavigationDelegate): Initialize new m_navigationDelegateMethods
2994         flag.
2995         (WebKit::toWKSameDocumentNavigationType): Added this helper to convert from internal to API
2996         values.
2997         (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame): Override to call
2998         the delegate method, if implemented.
2999
3000         * UIProcess/WebPageProxy.cpp:
3001         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Added navigationID parameter,
3002         which is forwarded to the client.
3003         * UIProcess/WebPageProxy.h: Added navigationID parameter.
3004         * UIProcess/WebPageProxy.messages.in: Ditto.
3005
3006         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3007         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Send the navigation ID.
3008         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
3009         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
3010         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
3011
3012 2014-07-12  Oliver Hunt  <oliver@apple.com>
3013
3014         Extend WebContent sandbox to allow some extra access for frameworks
3015         https://bugs.webkit.org/show_bug.cgi?id=134844
3016
3017         Reviewed by Sam Weinig.
3018
3019         Open up the webcontent sandbox a bit so that some external frameworks
3020         can work correctly.
3021
3022         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3023         * Shared/WebProcessCreationParameters.cpp:
3024         (WebKit::WebProcessCreationParameters::encode):
3025         (WebKit::WebProcessCreationParameters::decode):
3026         * Shared/WebProcessCreationParameters.h:
3027         * UIProcess/WebContext.cpp:
3028         (WebKit::WebContext::createNewWebProcess):
3029         (WebKit::WebContext::mediaCacheDirectory):
3030         * UIProcess/WebContext.h:
3031         * UIProcess/mac/WebContextMac.mm:
3032         (WebKit::WebContext::platformMediaCacheDirectory):
3033         * WebProcess/cocoa/WebProcessCocoa.mm:
3034         (WebKit::WebProcess::platformInitializeWebProcess):
3035
3036 2014-07-12  Oliver Hunt  <oliver@apple.com>
3037
3038         Temporary work around for <rdar://<rdar://problem/17513375>
3039         https://bugs.webkit.org/show_bug.cgi?id=134848
3040
3041         Reviewed by Sam Weinig.
3042
3043         Temporarily work around <rdar://<rdar://problem/17513375> by
3044         dropping the explicit cookie storage if it points out of the
3045         container.
3046
3047         * UIProcess/mac/WebContextMac.mm:
3048         (WebKit::WebContext::platformDefaultCookieStorageDirectory):
3049
3050 2014-07-11  Enrica Casucci  <enrica@apple.com>
3051
3052         Implement textStylingAtPosition in WK2.
3053         https://bugs.webkit.org/show_bug.cgi?id=134843
3054         <rdar://problem/17614981>
3055
3056         Reviewed by Benjamin Poulain.
3057
3058         Adding information about typing attributes to EditorState so
3059         that we can implement textStylingAtPosition.
3060
3061         * Shared/EditorState.cpp:
3062         (WebKit::EditorState::encode):
3063         (WebKit::EditorState::decode):
3064         * Shared/EditorState.h:
3065         (WebKit::EditorState::EditorState):
3066         * UIProcess/ios/WKContentViewInteraction.mm:
3067         (-[WKContentView textStylingAtPosition:inDirection:]):
3068         (-[WKContentView canPerformAction:withSender:]):
3069         (-[WKContentView toggleBoldface:]):
3070         (-[WKContentView toggleItalics:]):
3071         (-[WKContentView toggleUnderline:]):
3072         * WebProcess/WebPage/WebPage.cpp:
3073         (WebKit::WebPage::editorState):
3074
3075 2014-07-11  Oliver Hunt  <oliver@apple.com>
3076
3077         Tighten WebContent sandbox
3078         https://bugs.webkit.org/show_bug.cgi?id=134834
3079
3080         Reviewed by Sam Weinig.
3081
3082         Define a much tighter sandbox profile for the WebContent process
3083
3084         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3085
3086 2014-07-11  Antti Koivisto  <antti@apple.com>
3087
3088         REGRESSION (r170163?): Web content shifts revealing space equivalent to the find bar when clicking a link while a phrase is targeted via Cmd+F
3089         https://bugs.webkit.org/show_bug.cgi?id=134833
3090         <rdar://problem/17580021>
3091
3092         Reviewed by Zalan Bujtas.
3093         
3094         Some versions of OS X Safari can't handle the new unfreeze timing. Revert back to DidFirstLayout on Mac.
3095
3096         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3097         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
3098
3099 2014-07-11  Zalan Bujtas  <zalan@apple.com>
3100
3101         Subpixel layout: return integral results for offset*, client*, scroll* by default.
3102         https://bugs.webkit.org/show_bug.cgi?id=134651
3103
3104         Reviewed by Simon Fraser.
3105
3106         Revert to returning integral values for Element.offset* client* scroll* by default.
3107         Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
3108
3109         Since snapped dimension depends on both the original point and the width/height of the box,
3110         we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
3111
3112         Covered by existing tests
3113
3114         * Shared/WebPreferencesDefinitions.h:
3115         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3116
3117 2014-07-10  Jinwoo Song  <jinwoo7.song@samsung.com>
3118
3119         Unreviewed EFL build fix after r170970.
3120
3121         * UIProcess/efl/WebContextEfl.cpp:
3122         (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
3123
3124 2014-07-10  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3125
3126         REGRESSION(r170970) REGRESSION(r170974): [GTK] Build broken.
3127         https://bugs.webkit.org/show_bug.cgi?id=134825
3128
3129         Unreviewed GTK build fix.
3130
3131         * Shared/SessionState.h: Put ifdefs for ViewSnapshot on Mac port.
3132         * Shared/WebBackForwardListItem.h: Idem.
3133         * UIProcess/gtk/WebContextGtk.cpp:
3134         (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Implement skeleton.
3135
3136 2014-07-10  Benjamin Poulain  <bpoulain@apple.com>
3137
3138         [iOS][WK2] It should be safe to call WKContentViewInteraction's cleanupInteraction multiple times
3139         https://bugs.webkit.org/show_bug.cgi?id=134820
3140
3141         Reviewed by Andreas Kling.
3142
3143         If a view is destroyed just after a crash, "cleanupInteraction" is called twice: once on crash,
3144         once on dealloc.
3145
3146         The code handling _interactionViewsContainerView is using KVO to monitor transform changes. It is not safe
3147         to remove the observer if we are not already observing on that view.
3148
3149         To solve the problem, this patch makes the cleanup actually remove the view so that setup and cleanup
3150         are completely symmetrical. If cleanup is called twice, the second time would not enter the branch because
3151         the view is already nil.
3152
3153         * UIProcess/ios/WKContentViewInteraction.mm:
3154         (-[WKContentView setupInteraction]):
3155         (-[WKContentView cleanupInteraction]):
3156
3157 2014-07-10  Simon Fraser  <simon.fraser@apple.com>
3158
3159         [iOS WK2] Move WKInspectorHighlightView to its own file
3160         https://bugs.webkit.org/show_bug.cgi?id=134819
3161
3162         Reviewed by Joseph Pecoraro.
3163         
3164         WKInspectorHighlightView brought a lot of path/quad-related code into WKContentView.mm,
3165         so move it into its own file.
3166
3167         * UIProcess/WKInspectorHighlightView.h: Added.
3168         * UIProcess/WKInspectorHighlightView.mm: Added.
3169         (-[WKInspectorHighlightView dealloc]):
3170         (-[WKInspectorHighlightView _removeAllLayers]):
3171         (-[WKInspectorHighlightView _createLayers:]):
3172         (findIntersectionOnLineBetweenPoints):
3173         (quadIntersection):
3174         (layerPathWithHole):
3175         (layerPath):
3176         (-[WKInspectorHighlightView _layoutForNodeHighlight:]):
3177         (-[WKInspectorHighlightView _layoutForRectsHighlight:]):
3178         (-[WKInspectorHighlightView update:]):
3179         * UIProcess/ios/WKContentView.mm:
3180         (-[WKInspectorHighlightView initWithFrame:]): Deleted.
3181         (-[WKInspectorHighlightView dealloc]): Deleted.
3182         (-[WKInspectorHighlightView _removeAllLayers]): Deleted.
3183         (-[WKInspectorHighlightView _createLayers:]): Deleted.
3184         (findIntersectionOnLineBetweenPoints): Deleted.
3185         (quadIntersection): Deleted.
3186         (layerPathWithHole): Deleted.
3187         (layerPath): Deleted.
3188         (-[WKInspectorHighlightView _layoutForNodeHighlight:]): Deleted.
3189         (-[WKInspectorHighlightView _layoutForRectsHighlight:]): Deleted.
3190         (-[WKInspectorHighlightView update:]): Deleted.
3191         * WebKit2.xcodeproj/project.pbxproj:
3192
3193 2014-07-10  Tim Horton  <timothy_horton@apple.com>
3194
3195         REGRESSION (r170935): WKWebView is always transparent until the first layer tree commit
3196         https://bugs.webkit.org/show_bug.cgi?id=134818
3197         <rdar://problem/17632468>
3198
3199         Reviewed by Anders Carlsson.
3200
3201         * UIProcess/API/Cocoa/WKWebView.mm:
3202         (scrollViewBackgroundColor):
3203         r170935 made it so that we would initialize the scroll view background color to an
3204         invalid color until the first layer tree commit. We should go with white instead.
3205
3206 2014-07-10  Enrica Casucci  <enrica@apple.com>
3207
3208         Add a mechanism to notify the UIProcess when an editing command is done executing.
3209         https://bugs.webkit.org/show_bug.cgi?id=134807
3210
3211         Reviewed by Tim Horton.
3212
3213         Some editing commands have an effect on some parts of the system that
3214         run inside the UIProcess. A good example are the cursor movement commands
3215         that require an update of the autocorrection/autosuggestion machinery.
3216         This patch adds a way to reliably know when the command has been executed
3217         in the WebProcess. A previous attempt at solving this problem was added in
3218         r170858 and was partially reverted in r170948.
3219         The change also removes the selectionWillChange notification added in r170858.
3220
3221         * UIProcess/PageClient.h:
3222         * UIProcess/WebPageProxy.cpp:
3223         (WebKit::WebPageProxy::editorStateChanged):
3224         * UIProcess/WebPageProxy.h:
3225         * UIProcess/ios/PageClientImplIOS.h:
3226         * UIProcess/ios/PageClientImplIOS.mm:
3227         (WebKit::PageClientImpl::selectionWillChange): Deleted.
3228         * UIProcess/ios/WKContentViewInteraction.h:
3229         * UIProcess/ios/WKContentViewInteraction.mm:
3230         (-[WKContentView executeEditCommandWithCallback:]):
3231         (-[WKContentView _moveUp:withHistory:]):
3232         (-[WKContentView _moveDown:withHistory:]):
3233         (-[WKContentView _moveLeft:withHistory:]):
3234         (-[WKContentView _moveRight:withHistory:]):
3235         (-[WKContentView _moveToStartOfWord:withHistory:]):
3236         (-[WKContentView _moveToStartOfParagraph:withHistory:]):
3237         (-[WKContentView _moveToStartOfLine:withHistory:]):
3238         (-[WKContentView _moveToStartOfDocument:withHistory:]):
3239         (-[WKContentView _moveToEndOfWord:withHistory:]):
3240         (-[WKContentView _moveToEndOfParagraph:withHistory:]):
3241         (-[WKContentView _moveToEndOfLine:withHistory:]):
3242         (-[WKContentView _moveToEndOfDocument:withHistory:]):
3243         (-[WKContentView _selectionWillChange]): Deleted.
3244         * UIProcess/ios/WebPageProxyIOS.mm:
3245         (WebKit::WebPageProxy::executeEditCommand):
3246         (WebKit::WebPageProxy::notifySelectionWillChange): Deleted.
3247         * WebProcess/WebPage/WebPage.h:
3248         * WebProcess/WebPage/WebPage.messages.in:
3249         * WebProcess/WebPage/ios/WebPageIOS.mm:
3250         (WebKit::WebPage::executeEditCommandWithCallback):
3251
3252 2014-07-10  Joseph Pecoraro  <pecoraro@apple.com>
3253
3254         [Mac] NSWindow warning: adding an unknown subview opening detached Inspector
3255         https://bugs.webkit.org/show_bug.cgi?id=134813
3256
3257         Reviewed by Timothy Hatcher.
3258
3259         * UIProcess/mac/WebInspectorProxyMac.mm:
3260         (WebKit::WebInspectorProxy::createInspectorWindow):
3261         Use a selector that will avoid the warning message.
3262
3263 2014-07-10  Oliver Hunt  <oliver@apple.com>
3264
3265         Remove use of container relative restrictions in the network process sandbox
3266         https://bugs.webkit.org/show_bug.cgi?id=134816
3267
3268         Reviewed by Anders Carlsson.
3269
3270         As i'm tidying up the various sandboxes and that's meaning we
3271         need to reduce some file restrictions in the network process.
3272
3273         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3274
3275 2014-07-10  Pratik Solanki  <psolanki@apple.com>
3276
3277         Unreviewed iOS build fix after r170974. Define id if building a non ObjC file.
3278
3279         * UIProcess/mac/ViewSnapshotStore.h:
3280
3281 2014-07-10  Tim Horton  <timothy_horton@apple.com>
3282
3283         Store ViewSnapshots directly on the WebBackForwardListItem
3284         https://bugs.webkit.org/show_bug.cgi?id=134667
3285         <rdar://problem/17082639>
3286
3287         Reviewed by Dan Bernstein.
3288
3289         Make ViewSnapshot a refcounted class. Store it directly on the back-forward item
3290         instead of in a side map referenced by UUID. Switch to a very simple LRU eviction model for now.
3291         This fixes a ton of snapshot management bugs; for example, we would start throwing out snapshots
3292         in the page that was actively being interacted with *first* when evicting snapshots, instead of
3293         preferring older snapshots. Additionally, we would not throw away snapshots when back forward items
3294         became unreachable.
3295
3296         There is definitely room for improvement of the eviction mechanism, but this is closer to a time-tested implementation.
3297
3298         * Shared/SessionState.h:
3299         Keep a ViewSnapshot instead of a UUID on the BackForwardListItemState.
3300
3301         * Shared/WebBackForwardListItem.h:
3302         Fix some indented namespace contents.
3303
3304         (WebKit::WebBackForwardListItem::snapshot):
3305         (WebKit::WebBackForwardListItem::setSnapshot):
3306         (WebKit::WebBackForwardListItem::setSnapshotUUID): Deleted.
3307         (WebKit::WebBackForwardListItem::snapshotUUID): Deleted.
3308         Switch the snapshot getter/setter to operate on ViewSnapshots instead of UUIDs.
3309
3310         * UIProcess/API/Cocoa/WKWebView.mm:
3311         (-[WKWebView _takeViewSnapshot]):
3312         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3313         * UIProcess/API/mac/WKView.mm:
3314         (-[WKView _takeViewSnapshot]):
3315         * UIProcess/API/mac/WKViewInternal.h:
3316         * UIProcess/PageClient.h:
3317         * UIProcess/WebPageProxy.cpp:
3318         (WebKit::WebPageProxy::takeViewSnapshot):
3319         * UIProcess/WebPageProxy.h:
3320         * UIProcess/ios/PageClientImplIOS.h:
3321         * UIProcess/ios/PageClientImplIOS.mm:
3322         (WebKit::PageClientImpl::takeViewSnapshot):
3323         * UIProcess/mac/PageClientImpl.h:
3324         * UIProcess/mac/PageClientImpl.mm:
3325         (WebKit::PageClientImpl::takeViewSnapshot):
3326         Adopt ViewSnapshot::create, return a PassRefPtr, and class-ify ViewSnapshot.
3327
3328         * UIProcess/ios/ViewGestureControllerIOS.mm:
3329         (WebKit::ViewGestureController::beginSwipeGesture):
3330         (WebKit::ViewGestureController::endSwipeGesture):
3331         * UIProcess/mac/ViewGestureController.h:
3332         * UIProcess/mac/ViewGestureControllerMac.mm:
3333         (WebKit::ViewGestureController::shouldUseSnapshotForSize):
3334         (WebKit::ViewGestureController::beginSwipeGesture):
3335         (WebKit::ViewGestureController::endSwipeGesture):
3336         Grab the ViewSnapshot directly from the WebBackForwardListItem, and adopt the new functions.
3337
3338         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
3339         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
3340         Rename discardSnapshots to discardSnapshotImages, because we're really only discarding
3341         the images; the render tree size/background color "snapshot" remains and is useful.
3342
3343         * UIProcess/mac/ViewSnapshotStore.h:
3344         (WebKit::ViewSnapshot::setRenderTreeSize):
3345         (WebKit::ViewSnapshot::renderTreeSize):
3346         (WebKit::ViewSnapshot::setBackgroundColor):
3347         (WebKit::ViewSnapshot::backgroundColor):
3348         (WebKit::ViewSnapshot::setDeviceScaleFactor):
3349         (WebKit::ViewSnapshot::deviceScaleFactor):
3350         (WebKit::ViewSnapshot::imageSizeInBytes):
3351         (WebKit::ViewSnapshot::surface):
3352         (WebKit::ViewSnapshot::size):
3353         (WebKit::ViewSnapshot::creationTime):
3354         Make ViewSnapshot a refcounted class.
3355         Add create functions which take an image (or slot ID), and relevant sizes.
3356         It is expected that a ViewSnapshot is created with an image, and it is only possible
3357         to remove that image, never to replace it. A new ViewSnapshot is required in that case.
3358         Add setters for things that ViewSnapshotStore sets on the snapshot after the PageClient
3359         retrieves it from the view. Add getters for things that the ViewGestureControllers need.
3360
3361         Remove removeSnapshotImage, getSnapshot, and the snapshot map.
3362
3363         * UIProcess/mac/ViewSnapshotStore.mm:
3364         (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
3365         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
3366         (WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
3367         Manage m_snapshotCacheSize and m_snapshotsWithImages via didAddImageToSnapshot and willRemoveImageFromSnapshot.
3368         willRemoveImageFromSnapshot will -always- be called before the ViewSnapshot is destroyed.
3369
3370         (WebKit::ViewSnapshotStore::pruneSnapshots):
3371         Switch to a simple LRU eviction model. As previously mentioned, it's possible to do better, but
3372         this is much less broken than the previous implementation.
3373
3374         (WebKit::ViewSnapshotStore::recordSnapshot):
3375         (WebKit::ViewSnapshotStore::discardSnapshotImages):
3376         (WebKit::ViewSnapshot::create):
3377         (WebKit::ViewSnapshot::ViewSnapshot):
3378         (WebKit::ViewSnapshot::~ViewSnapshot):
3379         (WebKit::ViewSnapshot::hasImage):
3380         (WebKit::ViewSnapshot::clearImage):
3381         (WebKit::ViewSnapshot::asLayerContents):
3382         If a surface is Empty when it comes back from being volatile, throw away the surface
3383         and notify the Store to remove it from m_snapshotCacheSize (via clearImage()).
3384
3385         (WebKit::ViewSnapshotStore::removeSnapshotImage): Deleted.
3386         (WebKit::ViewSnapshotStore::getSnapshot): Deleted.
3387         (WebKit::ViewSnapshotStore::discardSnapshots): Deleted.
3388
3389 2014-07-10  Beth Dakin  <bdakin@apple.com>
3390
3391         Need Setting/WKPreference that allows clients to prevent scrollbars from drawing 
3392         on a secondary thread
3393         https://bugs.webkit.org/show_bug.cgi?id=134778
3394         -and corresponding-
3395         <rdar://problem/17595333>
3396
3397         Reviewed by Tim Horton.
3398
3399         This is a requirement for some types of performance tests.
3400
3401         New pref.
3402         * Shared/WebPreferencesDefinitions.h:
3403
3404         PDFPlugin has to implement this new ScrollableArea virtual function to indicate 
3405         the Setting’s value.
3406         * WebProcess/Plugins/PDF/PDFPlugin.h:
3407         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3408         (WebKit::PDFPlugin::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
3409
3410         New pref.
3411         * WebProcess/WebPage/WebPage.cpp:
3412         (WebKit::WebPage::updatePreferences):
3413
3414 2014-07-10  Tim Horton  <timothy_horton@apple.com>
3415
3416         [iOS] Frequent assertion failures when swiping back
3417
3418         Reviewed by Dan Bernstein.
3419
3420         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3421         (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
3422         Don't create an unused VoidCallback. It will assert when destroyed without being called.
3423
3424 2014-07-10  Oliver Hunt  <oliver@apple.com>
3425
3426         Pass sandbox extension for GL cache over to webprocess
3427         https://bugs.webkit.org/show_bug.cgi?id=134806
3428
3429         Reviewed by Anders Carlsson.
3430
3431         Add additional WebProcess parameters to pass an extension
3432         that allows access to the opengl cache directory in the
3433         host application's container.
3434
3435         * Shared/WebProcessCreationParameters.cpp:
3436         (WebKit::WebProcessCreationParameters::encode):
3437         (WebKit::WebProcessCreationParameters::decode):
3438         * Shared/WebProcessCreationParameters.h:
3439         * UIProcess/WebContext.cpp:
3440         (WebKit::WebContext::createNewWebProcess):
3441         (WebKit::WebContext::openGLCacheDirectory):
3442         * UIProcess/WebContext.h:
3443         * UIProcess/mac/WebContextMac.mm:
3444         (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
3445         * WebProcess/cocoa/WebProcessCocoa.mm:
3446         (WebKit::WebProcess::platformInitializeWebProcess):
3447
3448 2014-07-10  Dan Bernstein  <mitz@apple.com>
3449
3450         iOS build fix.
3451
3452         * WebProcess/WebPage/ServicesOverlayController.h:
3453
3454 2014-07-09  Brady Eidson  <beidson@apple.com>
3455
3456         Phone number highlights should always be visible if the mouse hovers over.
3457         <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
3458