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