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