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