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