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