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