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