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