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