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