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