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