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