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