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