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