[OS X][WK2] Expand sandbox for new mach endpoints
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-05-19  Brent Fulgham  <bfulgham@apple.com>
2
3         [OS X][WK2] Expand sandbox for new mach endpoints
4         https://bugs.webkit.org/show_bug.cgi?id=157919
5         <rdar://problem/25238336>
6
7         Reviewed by Alexey Proskuryakov.
8
9         Grant the WebContent and Networking processes the mach lookup capability for
10         various Security-related mach endpoints..
11
12         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
13         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
14
15 2016-05-19  Brian Burg  <bburg@apple.com>
16
17         Web Inspector: CRASH when closing a page while element selection mode is enabled via Develop menu
18         https://bugs.webkit.org/show_bug.cgi?id=157925
19         <rdar://problem/26259618>
20
21         Reviewed by Joseph Pecoraro.
22
23         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
24         (WebKit::WebInspectorClient::elementSelectionChanged):
25         Null-check m_page->inspector() since it will return nullptr if the page
26         is closed but not yet destructed. This is triggered by teardown code
27         in InspectorDOMAgent::willDestroyFrontendAndBackend.
28
29 2016-05-19  Enrica Casucci  <enrica@apple.com>
30
31         Drag cannot start if no drag data is available in the Pasteboard.
32         https://bugs.webkit.org/show_bug.cgi?id=157911
33         rdar://problem/24577706
34
35         Reviewed by Tim Horton.
36
37         Setting dummy data to allow drag to start.
38
39         * Shared/mac/PasteboardTypes.h:
40         * Shared/mac/PasteboardTypes.mm:
41         * UIProcess/Cocoa/WebViewImpl.mm:
42         (WebKit::WebViewImpl::registerDraggedTypes):
43         (WebKit::WebViewImpl::dragImageForView):
44
45 2016-05-19  Jer Noble  <jer.noble@apple.com>
46
47         [IOS] Add setting to allow playback to continue inline after exiting fullscreen.
48         https://bugs.webkit.org/show_bug.cgi?id=157912
49
50         Reviewed by Eric Carlson.
51
52         Add a preference and configuration property to control whether media should be allowed to continue
53         playing inline when exiting fullscreen.
54
55         * Shared/WebPreferencesDefinitions.h:
56         * UIProcess/API/Cocoa/WKWebView.mm:
57         (-[WKWebView _initializeWithConfiguration:]):
58         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
59         (-[WKWebViewConfiguration init]):
60         (-[WKWebViewConfiguration encodeWithCoder:]):
61         (-[WKWebViewConfiguration initWithCoder:]):
62         (-[WKWebViewConfiguration copyWithZone:]):
63         (-[WKWebViewConfiguration _allowsInlineMediaPlaybackAfterFullscreen]):
64         (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackAfterFullscreen:]):
65         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
66         * UIProcess/mac/WKFullScreenWindowController.mm:
67         (disableScreenUpdates):
68         (enableScreenUpdates):
69         (-[WKFullScreenWindowController enterFullScreen:]):
70         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
71         (-[WKFullScreenWindowController exitFullScreen]):
72         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
73         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
74         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
75         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
76         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
77         * WebProcess/WebPage/WebPage.cpp:
78         (WebKit::WebPage::updatePreferences):
79
80 2016-05-19  Brian Burg  <bburg@apple.com>
81
82         Web Inspector: timelines should not update via requestAnimationFrame unless Web Inspector is visible
83         https://bugs.webkit.org/show_bug.cgi?id=157897
84         <rdar://problem/26330802>
85
86         Reviewed by Timothy Hatcher.
87
88         The UIProcess needs to notify the Inspector frontend when it is truly visible.
89         The frontend can't use document.visibilityState because it doesn't seem to work
90         if the inspector frontend's WKWebView is created but not attached to a window.
91
92         * UIProcess/WebInspectorProxy.cpp:
93         (WebKit::WebInspectorProxy::open):
94         (WebKit::WebInspectorProxy::didClose):
95         Send visibility updates to the inspector process when the inspector becomes
96         "visible" or "not visible". It becomes visible if it is attached to the
97         inspected page's window, or gets its own native window.
98
99         * WebProcess/WebPage/WebInspectorUI.cpp:
100         (WebKit::WebInspectorUI::frontendLoaded):
101         (WebKit::WebInspectorUI::setDockingUnavailable):
102         (WebKit::WebInspectorUI::setIsVisible):
103         Call InspectorFrontendAPI.updateVisibilityState to let the frontend know.
104
105         * WebProcess/WebPage/WebInspectorUI.h:
106         * WebProcess/WebPage/WebInspectorUI.messages.in:
107         Add new message.
108
109 2016-05-19  Brian Burg  <bburg@apple.com>
110
111         Web Inspector: use a consistent prefix for injected scripts
112         https://bugs.webkit.org/show_bug.cgi?id=157715
113         <rdar://problem/26287188>
114
115         Reviewed by Timothy Hatcher.
116
117         * CMakeLists.txt:
118         * DerivedSources.make:
119         * WebProcess/Automation/WebAutomationSessionProxy.js:
120
121 2016-05-18  Anders Carlsson  <andersca@apple.com>
122
123         Add WKPreferencesRef getter/setter pair to set RTL mode
124         https://bugs.webkit.org/show_bug.cgi?id=157873
125         rdar://problem/26329970
126
127         Reviewed by Tim Horton.
128
129         * UIProcess/API/C/WKPreferences.cpp:
130         (WKPreferencesSetUserInterfaceDirectionPolicy):
131         (WKPreferencesGetUserInterfaceDirectionPolicy):
132         * UIProcess/API/C/WKPreferencesRef.h:
133
134 2016-05-18  Alex Christensen  <achristensen@webkit.org>
135
136         Clean up CSS code
137         https://bugs.webkit.org/show_bug.cgi?id=157808
138
139         Reviewed by Chris Dumez.
140
141         * UIProcess/Cocoa/WebViewImpl.mm:
142
143 2016-05-18  Jer Noble  <jer.noble@apple.com>
144
145         Disable default user gesture requirement for audio playback on Mac
146         https://bugs.webkit.org/show_bug.cgi?id=157820
147
148         Reviewed by Sam Weinig.
149
150         Disable the WebPreferences and matching WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback
151         settings on Mac (and other non-iOS ports).
152
153         * Shared/WebPreferencesDefinitions.h:
154         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
155         (-[WKWebViewConfiguration init]):
156
157 2016-05-18  Alex Christensen  <achristensen@webkit.org>
158
159         Build fix when not using CredentialStorage with NetworkSession.
160
161         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
162         (WebKit::NetworkSession::clearCredentials):
163
164 2016-05-18  Brady Eidson  <beidson@apple.com>
165
166         Fix null-deref crash sporadically seen after http://trac.webkit.org/changeset/201098
167
168         No review.
169
170         * DatabaseProcess/DatabaseProcess.cpp:
171         (WebKit::DatabaseProcess::deleteWebsiteData): Don't access m_idbServer directly, as calling
172           the idbServer() accessor is how you actually get your IDBServer created for you.
173
174 2016-05-18  Brian Burg  <bburg@apple.com>
175
176         Web Inspector: InspectorFrontendAPI.setTimelineProfilingEnabled should not implicitly show Timelines tab
177         https://bugs.webkit.org/show_bug.cgi?id=157846
178
179         Reviewed by Timothy Hatcher.
180
181         Add a separate ShowTimelines message to WebInspector and WebInspectorUI. Have the
182         start/stop profiling methods in public APIs explicitly call showTimelines() rather than
183         relying on InspectorFrontendAPI to do it.
184
185         * UIProcess/API/C/WKInspector.cpp:
186         (WKInspectorTogglePageProfiling):
187         * UIProcess/WebInspectorProxy.cpp:
188         (WebKit::WebInspectorProxy::showTimelines):
189         * UIProcess/WebInspectorProxy.h:
190         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
191         (WKBundleInspectorSetPageProfilingEnabled):
192         * WebProcess/WebPage/WebInspector.cpp:
193         (WebKit::WebInspector::showTimelines):
194         * WebProcess/WebPage/WebInspector.h:
195         * WebProcess/WebPage/WebInspector.messages.in:
196         * WebProcess/WebPage/WebInspectorUI.cpp:
197         (WebKit::WebInspectorUI::showTimelines):
198         * WebProcess/WebPage/WebInspectorUI.h:
199         * WebProcess/WebPage/WebInspectorUI.messages.in:
200
201 2016-05-18  Brady Eidson  <beidson@apple.com>
202
203         Modern IDB: Add support for server side closing of open database connections.
204         https://bugs.webkit.org/show_bug.cgi?id=157843
205
206         Reviewed by Alex Christensen.
207
208         - Implement the required IDB delegate code.
209         - Make DatabaseProcess::deleteWebsiteData call the right method in IDB server.
210
211         * DatabaseProcess/DatabaseProcess.cpp:
212         (WebKit::DatabaseProcess::deleteWebsiteData):
213
214         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
215         (WebKit::WebIDBConnectionToClient::didGetRecord):
216         (WebKit::WebIDBConnectionToClient::didCloseFromServer):
217         (WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
218         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
219         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
220
221         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
222         (WebKit::WebIDBConnectionToServer::confirmDidCloseFromServer):
223         (WebKit::WebIDBConnectionToServer::didStartTransaction):
224         (WebKit::WebIDBConnectionToServer::didCloseFromServer):
225         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
226         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
227
228 2016-05-18  Brady Eidson  <beidson@apple.com>
229
230         Modern IDB: Make TestRunner.clearAllDatabases also delete IndexedDB databases (once doing so is supported).
231         https://bugs.webkit.org/show_bug.cgi?id=157823
232
233         Reviewed by Alex Christensen.
234
235         * CMakeLists.txt:
236         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
237         (WKWebsiteDataStoreRemoveAllIndexedDatabases):
238         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
239
240 2016-05-18  Brian Burg  <bburg@apple.com>
241
242         REGRESSION(r200959): "Start Timeline Recording" menu item doesn't start recording
243         https://bugs.webkit.org/show_bug.cgi?id=157821
244         <rdar://problem/26335429>
245
246         Reviewed by Timothy Hatcher.
247
248         In r200959, WebInspectorProxy started sending start/stop profiling
249         messages directly to the frontend process to avoid the inspected page
250         process from implicitly showing the frontend. To compensate, the WebKit
251         API layer was changed to call show() in togglePageProfiling().
252
253         Unfortunately, this fix was not quite right, because the ordering of
254         the Show and StartPageProfiling messages is undefined. The latter has to bounce
255         from UI to inspected to inspector processes, so the frontend may try
256         to start profiling before the frontend is shown, causing it to be ignored.
257
258         This patch takes a different approach: just remove all implicit show()
259         calls in the inspected page processes, and bounce both the Show and
260         StartPageProfiling messages through the inspected page process to ensure
261         they are handled in order by the frontend process.
262
263         * UIProcess/WebInspectorProxy.cpp:
264         (WebKit::WebInspectorProxy::togglePageProfiling):
265         Revert to sending to the inspected page process.
266
267         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
268         (WKBundleInspectorSetPageProfilingEnabled):
269         Add a call to show() now that the implementation doesn't do it implicitly.
270
271         * WebProcess/WebPage/WebInspector.cpp:
272         (WebKit::WebInspector::startPageProfiling):
273         (WebKit::WebInspector::stopPageProfiling):
274         Don't implicitly show the inspector. These methods are only called
275         through the WKBundleInspector API and via IPC from WebInspectorProxy.
276
277 2016-05-17  Beth Dakin  <bdakin@apple.com>
278
279         Make handleAcceptedCandidate a public function
280         https://bugs.webkit.org/show_bug.cgi?id=157763
281         -and corresponding-
282         rdar://problem/26206397
283
284         Reviewed by Tim Horton.
285
286         This patch makes handleAcceptedCandidate a public member of WebViewImpl 
287         instead of a private member. 
288         * UIProcess/Cocoa/WebViewImpl.h:
289         (WebKit::WebViewImpl::createWeakPtr):
290
291 2016-05-17  Dean Jackson  <dino@apple.com>
292
293         Remove ES6_GENERATORS flag
294         https://bugs.webkit.org/show_bug.cgi?id=157815
295         <rdar://problem/26332894>
296
297         Reviewed by Geoffrey Garen.
298
299         This flag isn't needed. Generators are enabled everywhere and
300         part of a stable specification.
301
302         * Configurations/FeatureDefines.xcconfig:
303
304 2016-05-17  Dean Jackson  <dino@apple.com>
305
306         Temporarily enable Experimental Features
307         https://bugs.webkit.org/show_bug.cgi?id=157810
308         <rdar://problem/26330804>
309
310         Reviewed by Anders Carlsson.
311
312         We currently don't have good UI for enabling these features,
313         which would mean Safari Technology Preview users would
314         never be able to turn them on… unless we enable them by
315         default temporarily.
316
317         * Shared/WebPreferencesDefinitions.h:
318
319 2016-05-17  Filip Pizlo  <fpizlo@apple.com>
320
321         WTF should know about Language
322         https://bugs.webkit.org/show_bug.cgi?id=157756
323
324         Reviewed by Geoffrey Garen and Alexey Proskuryakov.
325
326         Rewires a bunch of includes/imports.
327
328         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
329         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
330         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
331         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
332
333 2016-05-17  Jer Noble  <jer.noble@apple.com>
334
335         Unreviewed GTK+ and EFL bulid fix; make the audio playback user gesture requirement
336         Cocoa-only.
337
338         * Shared/WebPreferencesDefinitions.h:
339
340 2016-05-16  Anders Carlsson  <andersca@apple.com>
341
342         Add a WKA extension point for WKPreferences SPI
343         https://bugs.webkit.org/show_bug.cgi?id=157762
344         rdar://problem/24529203
345
346         Reviewed by Sam Weinig.
347
348         * UIProcess/API/Cocoa/WKPreferences.mm:
349
350 2016-05-16  David Kilzer  <ddkilzer@apple.com>
351
352         Action sheets don’t work in presented view controllers
353         <https://webkit.org/b/157754>
354         <rdar://problem/26304845>
355
356         Reviewed by Anders Carlsson.
357
358         * UIProcess/ios/WKActionSheet.mm:
359         (-[WKActionSheet presentSheetFromRect:]):
360         (-[WKActionSheet willRotate]):
361         - Call SPI to get the presenting view controller, since it may
362           not always be the root view controller.
363
364 2016-05-13  Enrica Casucci  <enrica@apple.com>
365
366         Text selection is basically impossible on plain text pages.
367         https://bugs.webkit.org/show_bug.cgi?id=157681
368         rdar://problem/26065660
369
370         Reviewed by Darin Adler.
371
372         When dealing with a plain text file, the rules for deciding whether
373         a position is selectable should be different and we should never
374         switch to block selection.
375
376         * WebProcess/WebPage/ios/WebPageIOS.mm:
377         (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
378         (WebKit::rectIsTooBigForSelection): Added helper function.
379         (WebKit::WebPage::selectTextWithGranularityAtPoint):
380         (WebKit::WebPage::getPositionInformation):
381
382 2016-05-16  Chelsea Pugh  <cpugh@apple.com>
383
384         [iOS] Remove dispatch_after in -[WKFormInputSession setSuggestions:]
385         https://bugs.webkit.org/show_bug.cgi?id=157745
386
387         Reviewed by Dan Bernstein.
388
389         * UIProcess/ios/WKContentViewInteraction.mm:
390         (-[WKFormInputSession setSuggestions:]): Remove the dispatch_after since
391         there is no longer a chance of keyboard suggestions replacing the
392         suggestions set here.
393
394 2016-05-16  Brian Burg  <bburg@apple.com>
395
396         Crash simulating keystrokes at WebKit::WebAutomationSession::platformSimulateKeyStroke
397         https://bugs.webkit.org/show_bug.cgi?id=157737
398         <rdar://problem/26292946>
399
400         Reviewed by Timothy Hatcher.
401
402         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
403         (WebKit::WebAutomationSession::platformSimulateKeyStroke):
404         AppKit expects characters passed to [NSEvent keyEventWithType:...]
405         to be non-nil even if there are no characters. Initialize characters
406         to the empty string @"". It will be overwritten if the keystroke should
407         produce any unicode characters.
408
409 2016-05-16  Brian Burg  <bburg@apple.com>
410
411         Web Automation: Automation.inspectBrowsingContext should automatically start page profiling
412         https://bugs.webkit.org/show_bug.cgi?id=157739
413
414         Reviewed by Timothy Hatcher.
415
416         * UIProcess/API/C/WKInspector.cpp:
417         (WKInspectorTogglePageProfiling):
418         Implicitly show the Web Inspector in the C API command to preserve existing behavior.
419
420         * UIProcess/Automation/WebAutomationSession.cpp:
421         (WebKit::WebAutomationSession::inspectorFrontendLoaded):
422         If the frontend loaded, it was either because the user opened Web Inspector (and
423         turning on page profiling is harmless), or it was loaded but not shown by the
424         inspectBrowsingContext command. For the latter, we want to start page profiling
425         before processing any additional commands so subsequent execution is captured.
426
427         * UIProcess/WebInspectorProxy.cpp:
428         (WebKit::WebInspectorProxy::togglePageProfiling):
429         Send the start/stop profiling messages directly to the WebInspectorUI process instead of
430         bouncing through the inspected page's process, which does an implicit show() we don't want.
431
432         * UIProcess/WebPageProxy.cpp:
433         (WebKit::WebPageProxy::inspector): Make it const.
434         * UIProcess/WebPageProxy.h:
435
436 2016-05-16  Conrad Shultz  <conrad_shultz@apple.com>
437
438         Fix some deprecation warnings.
439
440         * UIProcess/mac/WKPrintingView.mm:
441         (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
442         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
443         (WebKit::PDFPlugin::setActiveAnnotation):
444         (WebKit::PDFPlugin::lookupTextAtLocation):
445         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
446         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
447         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
448         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
449         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
450         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
451         * WebProcess/WebPage/mac/WebPageMac.mm:
452         (WebKit::drawPDFPage):
453
454 2016-04-06  Jer Noble  <jer.noble@apple.com>
455
456         [WK2] Add API to WKWebViewConfiguration to control autoplay policy.
457         https://bugs.webkit.org/show_bug.cgi?id=156312
458
459         Reviewed by Dan Bernstein.
460
461         Add a new API to WKWebViewConfiguration to allow fine-grained control over when media is allowed
462         to play without a user gesture, and simultaneously deprecate the existing, all-or-nothing API,
463         and deprecated the equivalent SPIs.
464
465         * UIProcess/API/Cocoa/WKWebView.mm:
466         (-[WKWebView _initializeWithConfiguration:]):
467         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
468         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
469         (-[WKWebViewConfiguration init]):
470         (-[WKWebViewConfiguration encodeWithCoder:]):
471         (-[WKWebViewConfiguration initWithCoder:]):
472         (-[WKWebViewConfiguration copyWithZone:]):
473         (-[WKWebViewConfiguration _requiresUserActionForVideoPlayback]):
474         (-[WKWebViewConfiguration _setRequiresUserActionForVideoPlayback:]):
475         (-[WKWebViewConfiguration _requiresUserActionForAudioPlayback]):
476         (-[WKWebViewConfiguration _setRequiresUserActionForAudioPlayback:]):
477         (-[WKWebViewConfiguration requiresUserActionForMediaPlayback]):
478         (-[WKWebViewConfiguration setRequiresUserActionForMediaPlayback:]):
479         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
480
481 2016-05-16  Brian Burg  <bburg@apple.com>
482
483         Web Automation: WebAutomationSessionProxy.js gets injected more than once sometimes
484         https://bugs.webkit.org/show_bug.cgi?id=157716
485         <rdar://problem/26287306>
486
487         Reviewed by Timothy Hatcher.
488
489         Whenever a script was injected into a non-normal world by a WebKit client,
490         the WebProcess's WebAutomationSessionProxy singleton would get a
491         notification that the window was cleared from the relevant frame.
492         This notification happens when creating the world's window shell for
493         the first time.
494
495         This code should ignore such notifications that originate from non-main world
496         contexts. Web Inspector's instrumentation already ignored this, but
497         the automation session notification comes in via a different WebKit2 layer.
498
499         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
500         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
501
502 2016-05-13  Dean Jackson  <dino@apple.com>
503
504         Fix iOS Build.
505
506         * Shared/AssistedNodeInformation.h:
507         (WebKit::OptionItem::OptionItem):
508
509 2016-05-13  Sam Weinig  <sam@webkit.org>
510
511         REGRESSION (r200463): Autofill Credit Card expected but got Autofill Contact
512         <rdar://problem/26251538>
513         https://bugs.webkit.org/show_bug.cgi?id=157701
514
515         Reviewed by Dan Bernstein.
516
517         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
518         (-[WKWebProcessPlugInFrame _certificateChain]):
519         We need to do a retain-autorelease here now because the CertificateInfo's that contain the
520         cached certificate chain, are being destroyed, and therefore destroying the chain, before this
521         function returns. This used to work when the chain wasn't just a cache, because there was still
522         a strong reference to it being held by the ResourceResponse's CertificateInfo copy, but now
523         there is none.
524
525 2016-05-13  Dean Jackson  <dino@apple.com>
526
527         [iOS] <select> elements popover should render right-aligned when in RTL mode
528         https://bugs.webkit.org/show_bug.cgi?id=157699
529         <rdar://problem/26282319>
530
531         Reviewed by Simon Fraser.
532
533         Some follow-up changes as suggested by Darin in review.
534
535         * Shared/AssistedNodeInformation.h: Use initializers so we can
536         remove the constructors.
537         (WebKit::OptionItem::OptionItem): Deleted.
538         (WebKit::AssistedNodeInformation::AssistedNodeInformation): Deleted.
539         * UIProcess/ios/forms/WKFormSelectPopover.mm: Add a comment to explain
540         why we are explicitly setting the language.
541         (-[WKSelectTableViewController initWithView:hasGroups:]):
542
543 2016-05-13  Chris Dumez  <cdumez@apple.com>
544
545         [NetworkCache] Avoid having to re-parse URLs after deserializing them
546         https://bugs.webkit.org/show_bug.cgi?id=157660
547
548         Reviewed by Darin Adler.
549
550         * NetworkProcess/cache/NetworkCacheCoders.cpp:
551         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
552         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.
553         * NetworkProcess/cache/NetworkCacheCoders.h:
554         Drop template specializations used by our network cache for encoding
555         / decoding URLs as Strings. This causes us to now rely on
556         URL::encode() / URL::decode() instead.
557
558         * Shared/WebCoreArgumentCoders.cpp:
559         (IPC::ArgumentCoder<BlobPart>::decode):
560         Fix bug in BlobPart encoding / decoding. It was encoding the url member
561         as a URL but decoding it as a String.
562
563 2016-05-13  Dan Bernstein  <mitz@apple.com>
564
565         Try to fix some non-iOS builds.
566
567         * mac/postprocess-framework-headers.sh:
568
569 2016-05-13  Ryan Haddad  <ryanhaddad@apple.com>
570
571         Attempt to fix the iOS build after r200874
572
573         Unreviewed build fix.
574
575         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
576
577 2016-05-13  Sam Weinig  <sam@webkit.org>
578
579         Rename WKDataDetectorTypeSpotlightSuggestion to WKDataDetectorTypeLookupSuggestion
580         <rdar://problem/26269611>
581
582         Reviewed by Dan Bernstein and Enrica Casucci. 
583
584         * Shared/API/Cocoa/WKFoundation.h:
585         * Shared/API/c/WKDeclarationSpecifiers.h:
586         * UIProcess/API/Cocoa/WKWebView.mm:
587         (fromWKDataDetectorTypes):
588         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
589         * mac/postprocess-framework-headers.sh:
590
591 2016-05-13  Beth Dakin  <bdakin@apple.com>
592
593         Add dyldSPI.h for linked on or after checks, and add one for link preview
594         https://bugs.webkit.org/show_bug.cgi?id=157401
595
596         Reviewed by Darin Adler.
597
598         Set _allowsLinkPreview to YES for programs linked on or after 
599         firstSDKVersionWithLinkPreviewEnabledByDefault.
600         * UIProcess/API/Cocoa/WKWebView.h:
601         * UIProcess/API/Cocoa/WKWebView.mm:
602         (-[WKWebView _initializeWithConfiguration:]):
603
604 2016-05-13  Jer Noble  <jer.noble@apple.com>
605
606         Fullscreen view attempts to resize when in 2-up mode
607         https://bugs.webkit.org/show_bug.cgi?id=157558
608
609         Reviewed by Darin Adler.
610
611         No need to react to NSApplicationDidChangeScreenParametersNotification to resize the
612         fullscreen window when the screen parameters change; the NSWindow fullscreen machinery
613         will do that on our behalf.
614
615         * UIProcess/mac/WKFullScreenWindowController.mm:
616         (-[WKFullScreenWindowController windowDidLoad]): Deleted.
617         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Deleted.
618
619 2016-05-13  Antoine Quint  <graouts@apple.com>
620
621         [iOS] <select> elements popover should render right-aligned when in RTL mode
622         https://bugs.webkit.org/show_bug.cgi?id=157672
623         <rdar://problem/26193442>
624
625         Reviewed by Darin Adler.
626
627         Add a new isRTL field to the AssistedNodeInformation as specified by the assisted
628         node's render style and account for it when displaying the table view shown in the
629         popover attached to the assisted node using the UIView semanticContentAttribute
630         property.
631
632         * Shared/AssistedNodeInformation.cpp:
633         (WebKit::AssistedNodeInformation::encode):
634         (WebKit::AssistedNodeInformation::decode):
635         * Shared/AssistedNodeInformation.h:
636         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
637         * UIProcess/ios/forms/WKFormSelectPopover.mm:
638         (-[WKSelectTableViewController initWithView:hasGroups:]):
639         (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
640         * WebProcess/WebPage/ios/WebPageIOS.mm:
641         (WebKit::WebPage::getAssistedNodeInformation):
642
643 2016-05-13  Tina Liu  <iting_liu@apple.com>
644
645         Revert r199691.
646         https://bugs.webkit.org/show_bug.cgi?id=157645
647         <rdar://problem/26235373>
648
649         Reviewed by Darin Adler.
650
651         * Shared/WebProcessCreationParameters.cpp:
652         (WebKit::WebProcessCreationParameters::encode): Deleted.
653         (WebKit::WebProcessCreationParameters::decode): Deleted.
654         * Shared/WebProcessCreationParameters.h:
655         * UIProcess/API/C/mac/WKContextPrivateMac.h:
656         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
657         (WKContextSetPrivateBrowsingPluginLoadClientPolicy): Deleted.
658         * UIProcess/WebProcessPool.cpp:
659         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
660         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
661         (WebKit::WebProcessPool::setPluginLoadClientPolicyForPrivateBrowsing): Deleted.
662         (WebKit::WebProcessPool::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
663         (WebKit::WebProcessPool::clearPluginClientPolicies): Deleted.
664         * UIProcess/WebProcessPool.h:
665         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
666         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
667         (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
668         (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
669         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
670         (WebKit::WebPlatformStrategies::populatePluginCache):
671         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicyForPrivateBrowsing): Deleted.
672         (WebKit::WebPlatformStrategies::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
673         (WebKit::WebPlatformStrategies::clearPluginClientPolicies): Deleted.
674         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHostForPrivateBrowsing): Deleted.
675         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
676         * WebProcess/WebProcess.cpp:
677         (WebKit::WebProcess::initializeWebProcess):
678         (WebKit::WebProcess::setPluginLoadClientPolicies): Deleted.
679         (WebKit::WebProcess::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
680         * WebProcess/WebProcess.h:
681         * WebProcess/WebProcess.messages.in:
682
683 2016-05-12  Daniel Bates  <dabates@apple.com>
684
685         Use SecTask SPI to retrieve code signing identifier for user directory suffix
686         https://bugs.webkit.org/show_bug.cgi?id=157570
687         <rdar://problem/25706517>
688
689         Reviewed by Darin Adler.
690
691         It is sufficient to make use of the SecTask SPI to retrieve the code signing
692         identifier of the embedding client for use in the user directory suffix. This
693         avoids the need to allow Code Signing Services to have access to the bundle
694         of the embedding client.
695
696         * Shared/mac/ChildProcessMac.mm:
697         (WebKit::ChildProcess::initializeSandbox): Use the code signing identifier of the
698         embedding client as part of the user directory suffix if available.
699         * Shared/mac/CodeSigning.h: Update comment and include header wtf/spi/darwin/XPCSPI.h
700         for the definition of xpc_connection_t. Renamed codeSigningIdentifier() to codeSigningIdentifierForCurrentProcess()
701         to convey that it returns the code signing identifier for the current process. Repurposed
702         the name codeSigningIdentifier for the variant of this function that takes a xpc_connection_t.
703         * Shared/mac/CodeSigning.mm:
704         (WebKit::codeSigningIdentifier): Added. Uses the audit token associated with the specified
705         XPC connection to get the code signing identifier for the embedding client.
706         (WebKit::codeSigningIdentifierForCurrentProcess): Renamed; formerly named codeSigningIdentifier.
707         Implemented in terms of the SecTask API.
708         (WebKit::secCodeForCurrentProcess): Deleted.
709         (WebKit::secCodeForProcess): Deleted.
710         (WebKit::secCodeSigningInformation): Deleted.
711         (WebKit::appleSignedOrMacAppStoreSignedOrAppleDeveloperSignedRequirement): Deleted.
712         (WebKit::secCodeSigningIdentifier): Deleted.
713         (WebKit::codeSigningIdentifierForProcess): Deleted.
714         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
715         (WebKit::connectToService): Update code due to renaming.
716
717 2016-05-12  Konstantin Tokarev  <annulen@yandex.ru>
718
719         Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem.
720         https://bugs.webkit.org/show_bug.cgi?id=157624
721
722         Reviewed by Darin Adler.
723
724         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
725         (WebKit::WebFrameLoaderClient::saveViewStateToItem):
726         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
727
728 2016-05-12  Csaba Osztrogonác  <ossy@webkit.org>
729
730         Remove ENABLE(ES6_ARROWFUNCTION_SYNTAX) guards
731         https://bugs.webkit.org/show_bug.cgi?id=157564
732
733         Reviewed by Darin Adler.
734
735         * Configurations/FeatureDefines.xcconfig:
736
737 2016-05-11  Anders Carlsson  <andersca@apple.com>
738
739         We have two different types of contextual menus in iBooks
740         https://bugs.webkit.org/show_bug.cgi?id=157587
741         rdar://problem/25904169
742
743         Reviewed by Darin Adler.
744
745         Give clients the option to bypass the WebKit context menu machinery.
746
747         * UIProcess/mac/WebContextMenuProxyMac.mm:
748         (WebKit::WebContextMenuProxyMac::showContextMenu):
749
750 2016-05-10  Brian Burg  <bburg@apple.com>
751
752         Web Automation: add command to asynchronously load the Web Inspector frontend in the background
753         https://bugs.webkit.org/show_bug.cgi?id=157509
754
755         Reviewed by Timothy Hatcher and Joseph Pecoraro.
756
757         In order to make it easier to debug code that executes as a result of an automation
758         command, this patch adds a new Automation command to asynchronously load the debugger
759         and Inspector frontend. It is designed for use by automation clients to implement an
760         auto-inspection feature to aid in debugging automation scripts.
761
762         * UIProcess/Automation/Automation.json: Add new command.
763         * UIProcess/Automation/WebAutomationSession.cpp:
764         (WebKit::WebAutomationSession::inspectBrowsingContext): Added.
765         (WebKit::WebAutomationSession::inspectorFrontendLoaded): Added.
766         This message is forwarded by WebInspectorProxy to the inspected page's session.
767
768         * UIProcess/Automation/WebAutomationSession.h:
769         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
770         (WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
771         Force the active automation window to become key and bring to front prior to
772         sending each NSEvent. This way, if the Inspector pauses while a command executes,
773         the automation window will get back focus when the Inspector unpauses just before
774         the next synthesized mouse or keyboard NSEvent is sent to its NSWindow.
775
776         * UIProcess/WebInspectorProxy.cpp:
777         (WebKit::WebInspectorProxy::frontendLoaded):
778         Forward to the inspected page's session.
779
780         * UIProcess/WebInspectorProxy.h:
781         * UIProcess/WebInspectorProxy.messages.in: Add notification of the frontend's load.
782
783         * WebProcess/WebPage/WebInspectorUI.cpp:
784         (WebKit::WebInspectorUI::frontendLoaded):
785         Kick off notifying the automation session in UIProcess that the inspector loaded.
786
787         (WebKit::WebInspectorUI::closeWindow):
788         In some circumstances, the Web Inspector can be loaded without showing
789         the window. If this hidden page closes, make sure the frontend host gets
790         a chance to disconnect its InspectorFrontendClient. Normally this happens
791         when the window closes, but unshown Inspectors do not get window instances.
792
793 2016-05-11  Chris Dumez  <cdumez@apple.com>
794
795         Update Node::appendChild() / replaceChild() / removeChild() / insertBefore() to take references instead of pointers
796         https://bugs.webkit.org/show_bug.cgi?id=157556
797
798         Reviewed by Darin Adler.
799
800         * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
801         (-[WKDOMNode insertNode:before:]):
802         (-[WKDOMNode appendChild:]):
803         (-[WKDOMNode removeChild:]):
804         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
805         (WebKit::PDFPlugin::PDFPlugin):
806         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
807         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
808
809 2016-05-11  Brady Eidson  <beidson@apple.com>
810
811         Modern IDB: IDBOpenDBRequests that are stop()'ed don't notify the IDBServer of that fact.
812         https://bugs.webkit.org/show_bug.cgi?id=157448
813
814         Reviewed by Alex Christensen.
815
816         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
817         (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
818         (WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
819         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
820         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
821
822         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
823         (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
824         (WebKit::WebIDBConnectionToServer::openDBRequestCancelled):
825         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
826
827 2016-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
828
829         Fix a typo in r200330
830
831         Unreviewed.
832
833         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
834
835 2016-05-10  Sam Weinig  <sam@webkit.org>
836
837         Only expose WKDataDetectorTypes and -[WKWebViewConfiguration dataDetectorTypes] on iOS
838         for now, since we don't have it fully implemented on Mac.
839
840         Reviewed by Tim Horton.
841
842         * UIProcess/API/Cocoa/WKWebView.mm:
843         (fromWKDataDetectorTypes):
844         (-[WKWebView _initializeWithConfiguration:]):
845         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
846         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
847         (-[WKWebViewConfiguration encodeWithCoder:]):
848         (-[WKWebViewConfiguration initWithCoder:]):
849         (-[WKWebViewConfiguration copyWithZone:]):
850
851 2016-05-10  Sam Weinig  <sam@webkit.org>
852
853         Add SPI for Data Detectors to get ranges of text around an existing range.
854         <rdar://problem/26009749>
855
856         Reviewed by Enrica Casucci.
857
858         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
859         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
860         (-[WKDOMRange rangeByExpandingToWordBoundaryByCharacters:inDirection:]):
861
862 2016-05-10  Enrica Casucci  <enrica@apple.com>
863
864         Numerous block selection issues on iOS.
865         https://bugs.webkit.org/show_bug.cgi?id=157490
866         rdar://problem/25717977
867         rdar://problem/23042215
868
869         Reviewed by Tim Horton.
870
871         This patch fixes a number of issues with block selection on iOS.
872         We no longer eagerly choose block selection vs text selection and we
873         make sure we are capable of switching back to text selection from block
874         under every circumstance. The patch also fixes the logic used to decide
875         when to switch to block selection. It now computes the rectangle for the
876         paragraph containing the initial text selection to decide when we are
877         actually dragging outside the boundaries of the paragraph block.
878
879         * UIProcess/WebPageProxy.h:
880         * UIProcess/WebPageProxy.messages.in:
881         * UIProcess/ios/WKContentViewInteraction.mm:
882         (selectionChangedWithGesture):
883         (selectionChangedWithTouch):
884         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
885         * UIProcess/ios/WebPageProxyIOS.mm:
886         (WebKit::WebPageProxy::gestureCallback):
887         (WebKit::WebPageProxy::touchesCallback):
888         (WebKit::WebPageProxy::autocorrectionDataCallback):
889         (WebKit::WebPageProxy::selectWithGesture):
890         (WebKit::WebPageProxy::updateSelectionWithTouches):
891         * WebProcess/WebPage/WebPage.h:
892         * WebProcess/WebPage/ios/WebPageIOS.mm:
893         (WebKit::selectionBoxForRange):
894         (WebKit::canShrinkToTextSelection):
895         (WebKit::hasCustomLineHeight):
896         (WebKit::WebPage::rangeForWebSelectionAtPosition):
897         (WebKit::WebPage::contractedRangeFromHandle):
898         (WebKit::WebPage::updateBlockSelectionWithTouch):
899         (WebKit::WebPage::clearSelection):
900         (WebKit::WebPage::switchToBlockSelectionAtPoint):
901         (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
902         (WebKit::WebPage::updateSelectionWithTouches):
903         (WebKit::WebPage::selectWithTwoTouches):
904
905 2016-05-10  Alex Christensen  <achristensen@webkit.org>
906
907         Handle _schemeUpgraded delegate callbacks in NSURLSessionDataDelegate
908         https://bugs.webkit.org/show_bug.cgi?id=157354
909         rdar://problem/25842107
910
911         Reviewed by Darin Adler.
912
913         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
914         (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
915         When we make a request to a http url and CFNetwork determines that that url would have redirected to an HSTS site
916         and it is going to change the request to an https request, this delegate callback is called.  We need to call the
917         redirection code to have the same behavior as the NSURLConnection-based loader.
918
919 2016-05-10  Csaba Osztrogonác  <ossy@webkit.org>
920
921         Fix the !ENABLE(VIDEO) build
922         https://bugs.webkit.org/show_bug.cgi?id=157518
923
924         Reviewed by Alex Christensen.
925
926         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
927         (WebKit::WebsiteDataStore::fetchData):
928         (WebKit::WebsiteDataStore::removeData):
929         * WebProcess/WebProcess.cpp:
930         (WebKit::WebProcess::initializeWebProcess):
931
932 2016-05-10  Anders Carlsson  <andersca@apple.com>
933
934         Fix more deprecation warnings.
935
936         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
937         (NetworkServiceInitializer):
938         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
939         (PluginServiceInitializer):
940         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
941         (WebContentServiceInitializer):
942
943 2016-05-10  Chris Dumez  <cdumez@apple.com>
944
945         [SpeculativeValidation] Do not start a preload if there is already one pending
946         https://bugs.webkit.org/show_bug.cgi?id=157522
947         <rdar://problem/26156083>
948
949         Reviewed by Alex Christensen.
950
951         Do not start a preload if there is already one pending. We failed to check in
952         SpeculativeLoadManager::preloadEntry() if there was already a pending preload.
953         As a result, we would sometimes cancel an already pending preload and start
954         one from scratch which is inefficient. It would also sometimes lead to hitting
955         an assertion in the SpeculativeLoad destructor because we could destroy the
956         SpeculativeLoad without finishing or cancelling the load.
957
958         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
959         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
960
961 2016-05-10  Anders Carlsson  <andersca@apple.com>
962
963         Fix a deprecation warning.
964
965         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
966         (DatabaseServiceInitializer):
967
968 2016-05-10  Tim Horton  <timothy_horton@apple.com>
969
970         Clicks do not work in Safari after pressing the Track package button in Gmail
971         https://bugs.webkit.org/show_bug.cgi?id=157508
972         <rdar://problem/22646404>
973
974         Reviewed by Anders Carlsson.
975
976         * UIProcess/Cocoa/WebViewImpl.mm:
977         (WebKit::WebViewImpl::viewDidMoveToWindow):
978         Explicitly cancel the force-click animation when we're removing the gesture
979         recognizer due to the WK*View being unparented. This works around a bug
980         where we don't get the cancellation callback in this situation, causing
981         Safari to be left in an inconsistent and unexpected state.
982
983 2016-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
984
985         [Linux] Remove seccomp filters support
986         https://bugs.webkit.org/show_bug.cgi?id=157380
987
988         Reviewed by Darin Adler.
989
990         * NetworkProcess/NetworkProcessCreationParameters.cpp:
991         (WebKit::NetworkProcessCreationParameters::encode): Deleted.
992         (WebKit::NetworkProcessCreationParameters::decode): Deleted.
993         * NetworkProcess/NetworkProcessCreationParameters.h:
994         * PlatformEfl.cmake:
995         * PlatformGTK.cmake:
996         * Shared/WebProcessCreationParameters.cpp:
997         (WebKit::WebProcessCreationParameters::encode): Deleted.
998         (WebKit::WebProcessCreationParameters::decode): Deleted.
999         * Shared/WebProcessCreationParameters.h:
1000         * Shared/linux/SeccompFilters/OpenSyscall.cpp: Removed.
1001         * Shared/linux/SeccompFilters/OpenSyscall.h: Removed.
1002         * Shared/linux/SeccompFilters/SeccompBroker.cpp: Removed.
1003         * Shared/linux/SeccompFilters/SeccompBroker.h: Removed.
1004         * Shared/linux/SeccompFilters/SeccompFilters.cpp: Removed.
1005         * Shared/linux/SeccompFilters/SeccompFilters.h: Removed.
1006         * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Removed.
1007         * Shared/linux/SeccompFilters/SigactionSyscall.h: Removed.
1008         * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Removed.
1009         * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Removed.
1010         * Shared/linux/SeccompFilters/Syscall.cpp: Removed.
1011         * Shared/linux/SeccompFilters/Syscall.h: Removed.
1012         * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Removed.
1013         * Shared/linux/SeccompFilters/SyscallPolicy.h: Removed.
1014         * Shared/linux/SeccompFilters/XDGBaseDirectory.h: Removed.
1015         * Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Removed.
1016         * UIProcess/WebProcessPool.cpp:
1017         (WebKit::WebProcessPool::ensureNetworkProcess): Deleted.
1018         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
1019         (WebKit::WebProcessPool::cookieStorageDirectory): Deleted.
1020         * UIProcess/WebProcessPool.h:
1021         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Removed.
1022         * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Removed.
1023         * WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Removed.
1024         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Removed.
1025         * WebProcess/soup/WebProcessSoup.cpp:
1026         (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
1027
1028 2016-05-09  Tim Horton  <timothy_horton@apple.com>
1029
1030         REGRESSION (r191922): Zoom in/Zoom Out is not working for PDFs
1031         https://bugs.webkit.org/show_bug.cgi?id=157503
1032         <rdar://problem/23736297>
1033
1034         Reviewed by Anders Carlsson.
1035
1036         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
1037         Restore a requiresUnifiedScaleFactor that was lost in r191922.
1038
1039         * UIProcess/WebPageProxy.cpp:
1040         (WebKit::WebPageProxy::didCommitLoadForFrame):
1041         (WebKit::WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange):
1042         * UIProcess/WebPageProxy.h:
1043         * UIProcess/WebPageProxy.messages.in:        
1044         * WebProcess/Plugins/PluginView.cpp:
1045         (WebKit::PluginView::didInitializePlugin):
1046         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1047         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1048         Separate mainFramePluginHandlesPageScaleGesture changes out from didCommitLoadForFrame,
1049         because the PluginView doesn't exist at this point, so it can't answer
1050         the handlesPageScaleGesture question correctly (or at all).
1051         Instead, we'll send the message when the main-frame PluginView is initialized.
1052
1053 2016-05-09  Simon Fraser  <simon.fraser@apple.com>
1054
1055         [iOS] visibility:hidden -webkit-overflow-scrolling: touch divs can interfere with page scrolling
1056         https://bugs.webkit.org/show_bug.cgi?id=157496
1057         rdar://problem/22963278
1058
1059         Reviewed by Tim Horton.
1060
1061         UIScrollViews are constructed in the UI process for visibility:hidden scrollable elements
1062         with -webkit-overflow-scrolling: touch, and these intercept user events when they should not.
1063
1064         Fix by propagating a "contentsHidden" flag from the web process which is used to turn off
1065         user interaction on these views.
1066
1067         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1068         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
1069         * Shared/mac/RemoteLayerTreeTransaction.h:
1070         * Shared/mac/RemoteLayerTreeTransaction.mm:
1071         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1072         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1073         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1074         (WebKit::dumpChangedLayers):
1075         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1076         (-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]): Our custom hit
1077         test needs to take view.isUserInteractionEnabled into account.
1078         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1079         (WebKit::PlatformCALayerRemote::setHidden):
1080         (WebKit::PlatformCALayerRemote::contentsHidden):
1081         (WebKit::PlatformCALayerRemote::setContentsHidden):
1082         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1083
1084 2016-05-09  Ada Chan  <adachan@apple.com>
1085
1086         Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
1087         https://bugs.webkit.org/show_bug.cgi?id=157493
1088
1089         Reviewed by Dan Bernstein.
1090
1091         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1092         (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
1093
1094 2016-05-06  Ada Chan  <adachan@apple.com>
1095
1096         Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
1097         https://bugs.webkit.org/show_bug.cgi?id=157434
1098
1099         Reviewed by Darin Adler.
1100
1101         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1102         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1103         (WKPageIsPlayingVideoInEnhancedFullscreen):
1104         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
1105         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1106         (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
1107         * UIProcess/WebPageProxy.cpp:
1108         (WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen):
1109         * UIProcess/WebPageProxy.h:
1110
1111 2016-05-09  Anders Carlsson  <andersca@apple.com>
1112
1113         Add injected bundle SPI for getting favicon and touch icon URLs
1114         https://bugs.webkit.org/show_bug.cgi?id=157435
1115
1116         Reviewed by Darin Adler.
1117
1118         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
1119         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1120         (collectIcons):
1121         New helper function that calls into the WebCore LinkCollector.
1122
1123         (-[WKWebProcessPlugInFrame appleTouchIconURLs]):
1124         Call collectIcons.
1125
1126         (-[WKWebProcessPlugInFrame faviconURLs]):
1127         Ditto.
1128
1129 2016-05-06  Simon Fraser  <simon.fraser@apple.com>
1130
1131         [iOS WK2] Font size increases on some pages after navigating then going back
1132         https://bugs.webkit.org/show_bug.cgi?id=157441
1133         rdar://problem/22873240
1134
1135         Reviewed by Darin Adler.
1136
1137         There's an ordering dependency between setting the viewport configuration and doing
1138         layouts when going back to a page from the page cache that is incorrectly handled.
1139
1140         In FrameLoader::commitProvisionalLoad(), CachedPage::restore() triggers a layout under
1141         updateContentsSize(), but this happens before dispatchDidCommitLoad() which updates
1142         the viewport arguments via ViewportConfiguration::setViewportArguments().
1143
1144         This issue is not addressed by the current commit. But a second problem is:
1145         if the inputs to text autosizing change, we need to invalidate the autosizing state.
1146         The relevant input here is the fixed layout width (which is determined from the viewport
1147         configuration).
1148
1149         The current code invalidated text autosizing when m_viewportConfiguration.minimumLayoutSize()
1150         changed, but the correct behavior is to invalidate based on fixed layout size changing.
1151
1152         * WebProcess/WebPage/WebPage.cpp:
1153         (WebKit::WebPage::sendViewportAttributesChanged):
1154         (WebKit::WebPage::setFixedLayoutSize):
1155         * WebProcess/WebPage/WebPage.h:
1156         * WebProcess/WebPage/ios/WebPageIOS.mm:
1157         (WebKit::WebPage::resetTextAutosizing):
1158         (WebKit::WebPage::dynamicViewportSizeUpdate):
1159         (WebKit::WebPage::viewportConfigurationChanged):
1160         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize): Deleted.
1161         (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded): Deleted.
1162
1163 2016-05-09  Alex Christensen  <achristensen@webkit.org>
1164
1165         Don't use DiskCache for media resource loads
1166         https://bugs.webkit.org/show_bug.cgi?id=157405
1167
1168         Reviewed by Darin Adler.
1169
1170         * NetworkProcess/cache/NetworkCache.cpp:
1171         (WebKit::NetworkCache::makeRetrieveDecision):
1172         (WebKit::NetworkCache::makeStoreDecision):
1173         * NetworkProcess/cache/NetworkCache.h:
1174         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1175         (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
1176
1177 2016-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
1178
1179         [OS X] Migrate our Font classes entirely off of NSFont
1180         https://bugs.webkit.org/show_bug.cgi?id=157464
1181
1182         Reviewed by Darin Adler.
1183
1184         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
1185         (WebKit::WebPopupMenu::setUpPlatformData):
1186         * WebProcess/WebPage/mac/WebPageMac.mm:
1187         (WebKit::WebPage::fontAtSelection):
1188
1189 2016-05-06  Joseph Pecoraro  <pecoraro@apple.com>
1190
1191         Rename HitTestRequest DisallowShadowContent to DisallowUserAgentShadowContent
1192         https://bugs.webkit.org/show_bug.cgi?id=157447
1193
1194         Reviewed by Ryosuke Niwa.
1195
1196         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
1197         (WebKit::WebPage::findZoomableAreaForPoint):
1198         * WebProcess/WebPage/WebFrame.cpp:
1199         (WebKit::WebFrame::hitTest):
1200         * WebProcess/WebPage/WebPage.cpp:
1201         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1202         * WebProcess/WebPage/ios/WebPageIOS.mm:
1203         (WebKit::WebPage::rangeForWebSelectionAtPosition):
1204         (WebKit::WebPage::rangeForBlockAtPoint):
1205         (WebKit::WebPage::getPositionInformation):
1206
1207 2016-05-06  Simon Fraser  <simon.fraser@apple.com>
1208
1209         Enable IOS_TEXT_AUTOSIZING on Mac and make it testable
1210         https://bugs.webkit.org/show_bug.cgi?id=157432
1211         rdar://problem/16406720
1212
1213         Reviewed by Dean Jackson.
1214
1215         Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested.
1216         
1217         Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2
1218         preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests.
1219         These two settings are shared with TEXT_AUTOSIZING.
1220
1221         Add a TextAutosizing log channel, which is useful for generated -expected.html results.
1222
1223         Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement
1224         without changes.
1225
1226         An implication of this set of changes is that the way clients enable text autosizing
1227         has changed. Previously, they set the "MinimumZoomFontSize" preference to 0.
1228         Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing
1229         on iPhone only, not iPad.
1230
1231         Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled()
1232         instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone.
1233
1234         UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size,
1235         which will now always return 15, but had no other code that toggled this. So it's safe to just rely
1236         on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad.
1237
1238         * Configurations/FeatureDefines.xcconfig:
1239         * Shared/WebPreferencesDefinitions.h:
1240         * UIProcess/API/Cocoa/WKPreferences.mm:
1241         (-[WKPreferences _textAutosizingEnabled]):
1242         (-[WKPreferences _setTextAutosizingEnabled:]):
1243         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1244         * WebProcess/WebPage/WebPage.cpp:
1245         (WebKit::WebPage::updatePreferences):
1246
1247 2016-05-06  Dean Jackson  <dino@apple.com>
1248
1249         Regions, Shapes and Tracks don't need runtime features
1250         https://bugs.webkit.org/show_bug.cgi?id=157426
1251         <rdar://problem/26146262>
1252
1253         Reviewed by Simon Fraser.
1254
1255         The following RuntimeEnabledFeatures can be removed since
1256         we have no need to disable them (they are stable and have
1257         shipped for a while):
1258         - CSS Regions
1259         - CSS Shapes
1260         - Media tracks
1261
1262         * Shared/WebPreferencesDefinitions.h:
1263         * UIProcess/API/C/WKPreferences.cpp:
1264         (WKPreferencesSetCSSRegionsEnabled): Deleted.
1265         (WKPreferencesGetCSSRegionsEnabled): Deleted.
1266         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1267         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1268         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Deleted.
1269         (WebKit::InjectedBundle::setCSSRegionsEnabled): Deleted.
1270         (WebKit::InjectedBundle::setCSSCompositingEnabled): Deleted.
1271         * WebProcess/InjectedBundle/InjectedBundle.h:
1272         * WebProcess/WebPage/WebPage.cpp:
1273         (WebKit::WebPage::updatePreferences): Deleted.
1274
1275 2016-05-05  Ada Chan  <adachan@apple.com>
1276
1277         Create a fence in WebVideoFullscreenManagerProxy::setVideoLayerFrame() to pass to the web process
1278         https://bugs.webkit.org/show_bug.cgi?id=157409
1279
1280         Reviewed by Tim Horton.
1281
1282         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1283         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
1284         Create a fence by calling DrawingAreaProxy::createFence() and pass it when sending the
1285         WebVideoFullscreenManager::SetVideoLayerFrameFenced message.
1286
1287         * UIProcess/DrawingAreaProxy.cpp:
1288         (WebKit::DrawingAreaProxy::createFence):
1289         Stub implementation. Assert not to be reached here since it's only implemented on Mac so far.
1290         * UIProcess/DrawingAreaProxy.h:
1291
1292         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1293         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1294         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
1295         Renamed from createFenceForGeometryUpdate() since we are using it for more than just updating geometry.
1296         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
1297         Update due to method rename.
1298
1299 2016-05-05  Brady Eidson  <beidson@apple.com>
1300
1301         Modern IDB (Workers): Get everything to the right threads.
1302         https://bugs.webkit.org/show_bug.cgi?id=157398
1303
1304         Reviewed by Alex Christensen.
1305
1306         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1307         (WebKit::WebIDBConnectionToServer::putOrAdd):
1308         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1309
1310 2016-05-05  Manuel Rego Casasnovas  <rego@igalia.com>
1311
1312         [GTK] Remove "region based columns" runtime feature remainings
1313         https://bugs.webkit.org/show_bug.cgi?id=157393
1314
1315         The runtime feature was removed in r168978,
1316         and the usage in WebKitSettings.cpp in r168988.
1317         However it was still around in ExperimentalFeatures class.
1318
1319         Reviewed by Michael Catanzaro.
1320
1321         * UIProcess/gtk/ExperimentalFeatures.cpp: Remove runtime feature.
1322         * UIProcess/gtk/ExperimentalFeatures.h: Ditto.
1323
1324 2016-05-05  Manuel Rego Casasnovas  <rego@igalia.com>
1325
1326         [GTK] Add CSS Grid Layout as experimental feature
1327         https://bugs.webkit.org/show_bug.cgi?id=157391
1328
1329         Reviewed by Michael Catanzaro.
1330
1331         Now that we've a runtime feature again for CSS Grid Layout (r200215),
1332         we can recover the old patch (r162215) that allows to enable/disable
1333         CSS Grid Layout through the environment variable
1334         WEBKITGTK_EXPERIMENTAL_FEATURES.
1335
1336         Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"
1337
1338         * UIProcess/API/gtk/WebKitSettings.cpp:
1339         (webKitSettingsConstructed): Use new experimental feature to enable
1340         or disable CSS Grid Layout.
1341         * UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
1342         * UIProcess/gtk/ExperimentalFeatures.h: Ditto.
1343
1344 2016-05-05  Jer Noble  <jer.noble@apple.com>
1345
1346         [WK2] Media controls don't update if controller is created after the interface is created
1347         https://bugs.webkit.org/show_bug.cgi?id=157376
1348
1349         Reviewed by Beth Dakin.
1350
1351         Implement the new getter methods on WebPlaybackSessionModelContext by caching the values
1352         passed through WebPlaybackSessionManagerProxy.
1353
1354         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
1355         * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
1356         (WebKit::WebPlaybackSessionManagerProxy::setCurrentTime):
1357         (WebKit::WebPlaybackSessionManagerProxy::setBufferedTime):
1358         (WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector):
1359         (WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse):
1360         (WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions):
1361         (WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions):
1362         (WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties):
1363         (WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled):
1364         (WebKit::WebPlaybackSessionManagerProxy::setDuration):
1365         (WebKit::WebPlaybackSessionManagerProxy::setRate):
1366         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
1367         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
1368         (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode): Deleted.
1369         (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted.
1370         (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted.
1371         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Deleted.
1372         (WebKit::WebVideoFullscreenModelContext::isVisible): Deleted.
1373         (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen): Deleted.
1374         (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen): Deleted.
1375         (WebKit::WebVideoFullscreenModelContext::didExitFullscreen): Deleted.
1376         (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen): Deleted.
1377         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): Deleted.
1378         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy): Deleted.
1379
1380 2016-05-05  Dean Jackson  <dino@apple.com>
1381
1382         Shadow DOM should not be experimental
1383         https://bugs.webkit.org/show_bug.cgi?id=157384
1384         <rdar://problem/26123254>
1385
1386         Reviewed by Anders Carlsson.
1387
1388         Shadow DOM is not an experimental feature. We want
1389         it enabled by default.
1390
1391         This fixes the timeout in:
1392         WebKit2.InjectedBundleMakeAllShadowRootOpenTest
1393
1394         * Shared/WebPreferencesDefinitions.h: Move the Shadow
1395         DOM preference out of Experimental.
1396         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1397         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1398         * WebProcess/WebPage/WebPage.cpp:
1399         (WebKit::WebPage::updatePreferences):
1400
1401 2016-05-05  Simon Fraser  <simon.fraser@apple.com>
1402
1403         Revert r200390, thus putting r199259 and r200161 and back.
1404
1405         * Shared/VisibleContentRectUpdateInfo.cpp:
1406         (WebKit::VisibleContentRectUpdateInfo::encode):
1407         (WebKit::VisibleContentRectUpdateInfo::decode):
1408         * Shared/VisibleContentRectUpdateInfo.h:
1409         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1410         (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView):
1411         (WebKit::operator==):
1412         * UIProcess/API/Cocoa/WKWebView.mm:
1413         (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
1414         (-[WKWebView _didFinishScrolling]):
1415         (-[WKWebView scrollViewDidScroll:]):
1416         (-[WKWebView scrollViewDidZoom:]):
1417         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
1418         (-[WKWebView _scrollViewDidInterruptDecelerating:]):
1419         (-[WKWebView _visibleRectInEnclosingScrollView:]):
1420         (-[WKWebView _visibleContentRect]):
1421         (-[WKWebView _didScroll]):
1422         (-[WKWebView _enclosingScrollerScrollingEnded:]):
1423         (-[WKWebView _frameOrBoundsChanged]):
1424         (-[WKWebView _updateVisibleContentRects]):
1425         (-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
1426         (scrollViewCanScroll):
1427         (-[WKWebView _updateContentRectsWithState:]):
1428         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1429         * UIProcess/WebPageProxy.h:
1430         * UIProcess/ios/WKContentView.h:
1431         * UIProcess/ios/WKContentView.mm:
1432         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
1433         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
1434         * UIProcess/ios/WebPageProxyIOS.mm:
1435         (WebKit::WebPageProxy::updateVisibleContentRects):
1436         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1437         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
1438         * WebProcess/WebPage/ios/WebPageIOS.mm:
1439         (WebKit::WebPage::updateVisibleContentRects):
1440
1441 2016-05-02  Sam Weinig  <sam@webkit.org>
1442
1443         On platforms that support it, use a SecTrustRef as the basis of CertificateInfo instead of a chain of SecCertificateRefs.
1444         https://bugs.webkit.org/show_bug.cgi?id=157220
1445
1446         Reviewed by Darin Adler.
1447
1448         * Shared/Authentication/mac/AuthenticationManager.mac.mm:
1449         (WebKit::leafCertificate):
1450         (WebKit::chain):
1451         (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
1452         When supported, get the SecCertificateRef from the SecTrustRef rather than the
1453         stored certificate chain.
1454
1455         * Shared/cf/ArgumentCodersCF.cpp:
1456         (IPC::typeFromCFTypeRef):
1457         (IPC::encode):
1458         (IPC::decode):
1459         * Shared/cf/ArgumentCodersCF.h:
1460         Add support for encoding/decoding SecTrustRef objects.
1461
1462         * Shared/mac/WebCoreArgumentCodersMac.mm:
1463         (IPC::ArgumentCoder<CertificateInfo>::encode):
1464         (IPC::ArgumentCoder<CertificateInfo>::decode):
1465         Add support for encoding/decoding CertificateInfo's that contain SecTrustRef objects.
1466
1467         (IPC::encodeNSError):
1468         (IPC::decodeNSError):
1469         Simplify error encoding/decoding by not using an addition CertificateInfo object for encoding
1470         the peerCertificateChain. Also, add the peerTrust to the userInfo that get's encoded/decoded.
1471
1472         * UIProcess/API/Cocoa/WKWebView.h:
1473         * UIProcess/API/Cocoa/WKWebView.mm:
1474         (-[WKWebView serverTrust]):
1475         (-[WKWebView certificateChain]):
1476         Add new serverTrust API and deprecate certificateChain.
1477
1478         * UIProcess/Cocoa/NavigationState.mm:
1479         (WebKit::NavigationState::willChangeCertificateInfo):
1480         (WebKit::NavigationState::didChangeCertificateInfo):
1481         Add support for KVO of -[WKWebView serverTrust].
1482
1483 2016-05-05  Daniel Bates  <dabates@apple.com>
1484
1485         Remove workaround added in r200391 (rdar://problem/25992976)
1486         https://bugs.webkit.org/show_bug.cgi?id=157378
1487         <rdar://problem/26118503>
1488
1489         Reviewed by Anders Carlsson.
1490
1491         Following the fix for <rdar://problem/26075714> we can remove the workaround added in r200391 (rdar://problem/25992976).
1492
1493         * Shared/mac/CodeSigning.mm:
1494         (WebKit::secCodeSigningIdentifier):
1495
1496 2016-05-04  Dean Jackson  <dino@apple.com>
1497
1498         Experimental Features don't need an "Experimental" prefix
1499         https://bugs.webkit.org/show_bug.cgi?id=157363
1500         <rdar://problem/26100630>
1501
1502         Reviewed by Anders Carlsson.
1503
1504         Since we're not persisting the value of the experimental
1505         features, it's unlikely there will ever be the case
1506         where we move a Preference from experimental to normal
1507         and use a stored value.
1508
1509         * Shared/WebPreferencesDefinitions.h:
1510         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1511         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1512         * WebProcess/WebPage/WebPage.cpp:
1513         (WebKit::WebPage::updatePreferences):
1514
1515 2016-05-04  Dean Jackson  <dino@apple.com>
1516
1517         Experimental features should toggle runtime flags
1518         https://bugs.webkit.org/show_bug.cgi?id=157353
1519         <rdar://problem/23621603>
1520
1521         Reviewed by Anders Carlsson.
1522
1523         Hook up the experimental WebPreferences to RuntimeEnabledFeatures.
1524         In the process I removed the general preference for WebGL 2 (we
1525         already had an experimental feature for it) and moved Custom
1526         Elements and Shadow DOM to experimental.
1527
1528         I also removed the C versions of the preferences, since experimental
1529         features only need the ObjC API (which is generated automatically).
1530
1531         * Shared/WebPreferencesDefinitions.h: Move/remove some features and
1532         make the experimental section more clear.
1533         * UIProcess/API/C/WKPreferences.cpp:
1534         (WKPreferencesSetWebGL2Enabled): Deleted.
1535         (WKPreferencesGetWebGL2Enabled): Deleted.
1536         (WKPreferencesSetShadowDOMEnabled): Deleted.
1537         (WKPreferencesGetShadowDOMEnabled): Deleted.
1538         (WKPreferencesSetCustomElementsEnabled): Deleted.
1539         (WKPreferencesGetCustomElementsEnabled): Deleted.
1540         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1541         * UIProcess/WebPreferences.cpp:
1542         (WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey): A
1543         version of updateBoolValueForKey that doesn't call the platform
1544         function (e.g. doesn't save to NSUserDefaults).
1545         * UIProcess/WebPreferences.h:
1546         * UIProcess/mac/WebPreferencesMac.mm:
1547         (WebKit::WebPreferences::platformInitializeStore): Deleted.
1548         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1549         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1550         * WebProcess/WebPage/WebPage.cpp:
1551         (WebKit::WebPage::updatePreferences):
1552
1553 2016-05-04  Dean Jackson  <dino@apple.com>
1554
1555         TestRunner should always enable all the experimental features
1556         https://bugs.webkit.org/show_bug.cgi?id=157360
1557         <rdar://problem/26099748>
1558
1559         Reviewed by Anders Carlsson.
1560
1561         Experimental features are disabled by default, but it is
1562         a pain to enable them in every test. Instead, have the
1563         test runner turn them all on.
1564
1565         * UIProcess/API/C/WKPreferences.cpp:
1566         (WKPreferencesEnableAllExperimentalFeatures):
1567         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1568         * UIProcess/WebPreferences.cpp:
1569         (WebKit::WebPreferences::enableAllExperimentalFeatures):
1570         * UIProcess/WebPreferences.h:
1571
1572 2016-05-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1573
1574         Add WKPreference for SelectionPaintingWithoutSelectionGaps
1575         https://bugs.webkit.org/show_bug.cgi?id=156900
1576
1577         Reviewed by Michael Catanzaro.
1578
1579         Unlike other browsers WebKit has been drawing selection gaps
1580         between render blocks during the text selection. This often
1581         cause text selection screen looks messy.
1582
1583         This patch adds a setting method to disable the functionality,
1584         and EFL port disables it by default.
1585
1586         * Shared/WebPreferencesDefinitions.h:
1587         * UIProcess/API/C/WKPreferences.cpp:
1588         (WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled):
1589         (WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled):
1590         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1591         * WebProcess/WebPage/WebPage.cpp:
1592         (WebKit::WebPage::updatePreferences):
1593
1594 2016-05-04  Zan Dobersek  <zdobersek@igalia.com>
1595
1596         [CoordGraphics] CompositingCoordinator should hande root compositing and view overlay layers separately
1597         https://bugs.webkit.org/show_bug.cgi?id=157305
1598
1599         Reviewed by Carlos Garcia Campos.
1600
1601         Update CoordinatedLayerTreeHost and ThreadCoordinatedLayerTreeHost to
1602         correctly use setRootCompositingLayer() and setViewOverlayRootLayer()
1603         methods on the CompositingCoordinator object.
1604
1605         CoordinatedLayerTreeHost doesn't have to keep a pointer to the root
1606         compositing layer anymore. updateRootLayers() can be removed.
1607
1608         ThreadCoordinatedLayerTreeHost doen't have to keep a pointer to both
1609         the root compositing and the view overlay layers anymore. Similarly,
1610         updateRootLayers() can be removed.
1611
1612         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1613         (WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
1614         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
1615         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): Deleted.
1616         (WebKit::CoordinatedLayerTreeHost::updateRootLayers): Deleted.
1617         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1618         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
1619         (WebKit::ThreadedCoordinatedLayerTreeHost::setRootCompositingLayer):
1620         (WebKit::ThreadedCoordinatedLayerTreeHost::setViewOverlayRootLayer):
1621         (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Deleted.
1622         (WebKit::ThreadedCoordinatedLayerTreeHost::updateRootLayers): Deleted.
1623         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1624
1625 2016-05-03  Beth Dakin  <bdakin@apple.com>
1626
1627         Add VideoControlsManager tests
1628         https://bugs.webkit.org/show_bug.cgi?id=157332
1629         -and corresponding-
1630         rdar://problem/24358431
1631
1632         Reviewed by Sam Weinig.
1633
1634         Expose _hasActiveVideoForControlsManager on WKWebViewPrivate for the sake of 
1635         testing. 
1636         * UIProcess/API/Cocoa/WKWebView.mm:
1637         (-[WKWebView _hasActiveVideoForControlsManager]):
1638         (-[WKWebView _doAfterNextPresentationUpdate:]):
1639         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1640
1641 2016-05-03  Jer Noble  <jer.noble@apple.com>
1642
1643         [iOS][WK2] Allow WKWebView to play local filesystem media when created with -loadFileURL:allowingReadAccessToURL:
1644         https://bugs.webkit.org/show_bug.cgi?id=156875
1645         <rdar://problem/24281444>
1646
1647         Reviewed by Alexey Proskuryakov.
1648
1649         Grant AVFoundation the right to issue file read sandbox extensions from the WebContent process to the mediaserverd
1650         process, so that it can play back local media files.
1651
1652         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1653
1654 2016-05-03  Jiewen Tan  <jiewen_tan@apple.com>
1655
1656         File Upload: Photo upload name is always generic (image.jpg)
1657         https://bugs.webkit.org/show_bug.cgi?id=157291
1658         <rdar://problem/12353008>
1659
1660         Reviewed by Darin Adler.
1661
1662         Use the original filename as the name of an uploaded image instead of
1663         a generic name, i.e. image.jpg.
1664
1665         * Platform/spi/ios/PhotosSPI.h: Added.
1666         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1667         (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
1668         * WebKit2.xcodeproj/project.pbxproj:
1669
1670 2016-05-03  Chris Dumez  <cdumez@apple.com>
1671
1672         [WK2][DiskCache] Store common HTTP header names as strings
1673         https://bugs.webkit.org/show_bug.cgi?id=157326
1674         <rdar://problem/26073498>
1675
1676         Reviewed by Antti Koivisto.
1677
1678         Store common HTTP header names as strings in the disk cache instead of
1679         using their value in the HTTPHeaderName enumeration. Having the disk
1680         cache rely in the HTTPHeaderName enumeration is risky becomes it means
1681         the cached data would become invalid every time someone updates
1682         HTTPHeaderNames.in in WebCore. If someone were to update
1683         HTTPHeaderNames.in without bumping the disk cache version, we would end
1684         up with wrongly recognized HTTP header names after loading responses
1685         from the cache.
1686
1687         * NetworkProcess/cache/NetworkCacheCoders.cpp:
1688         (WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode):
1689         (WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode):
1690         * NetworkProcess/cache/NetworkCacheCoders.h:
1691         * NetworkProcess/cache/NetworkCacheStorage.h:
1692
1693 2016-05-03  Daniel Bates  <dabates@apple.com>
1694
1695         Temporary workaround for Apple Internal builds
1696         <rdar://problem/25992976>
1697
1698         For Apple Internal builds treat error code errSecCSGuestInvalid as if it were error code errSecCSUnsigned.
1699         We will look to remove this workaround in the fix for <rdar://problem/26075714>.
1700
1701         * Shared/mac/CodeSigning.mm:
1702         (WebKit::secCodeSigningIdentifier):
1703
1704 2016-05-03  Chris Dumez  <cdumez@apple.com>
1705
1706         Unreviewed, rolling out r199259 and r200161.
1707
1708         Seems to have caused a ~1.2% PLT regression on iOS
1709
1710         Reverted changesets:
1711
1712         "[iOS WK2] WKWebViews should consult ancestor UIScrollViews to
1713         determine tiling area"
1714         https://bugs.webkit.org/show_bug.cgi?id=156429
1715         http://trac.webkit.org/changeset/199259
1716
1717         "[iOS WK2] When determining tile size, check whether ancestor
1718         UIScrollViews are actually scrollable"
1719         https://bugs.webkit.org/show_bug.cgi?id=157107
1720         http://trac.webkit.org/changeset/200161
1721
1722 2016-05-03  Dean Jackson  <dino@apple.com>
1723
1724         CSS Grid should be an experimental feature flag
1725         https://bugs.webkit.org/show_bug.cgi?id=157327
1726         <rdar://problem/26075147>
1727
1728         Reviewed by Anders Carlsson.
1729
1730         The CSS Grid Layout runtime flag was exposed by
1731         a WebKit preference. It was in the experimental
1732         section but was missing the "Experimental" prefix.
1733
1734         It was also missing the human readable description.
1735
1736         Lastly, there is no need for the C API for experimental
1737         features.
1738
1739         * Shared/WebPreferencesDefinitions.h:
1740         * UIProcess/API/C/WKPreferences.cpp:
1741         (WKPreferencesSetCSSGridLayoutEnabled): Deleted.
1742         (WKPreferencesGetCSSGridLayoutEnabled): Deleted.
1743         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1744         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1745         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1746         * WebProcess/WebPage/WebPage.cpp:
1747         (WebKit::WebPage::updatePreferences):
1748
1749 2016-05-03  Alex Christensen  <achristensen@webkit.org>
1750
1751         Remove firing assertion when redirecting
1752         https://bugs.webkit.org/show_bug.cgi?id=155800
1753         rdar://25299194
1754
1755         Reviewed by Sam Weinig.
1756
1757         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1758         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1759         (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
1760         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1761         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
1762         With NSURLConnection, we stopped getting delegate callbacks once the delegate is destroyed, and everything was cancelled.
1763         With NSURLSession we continue getting delegate callbacks because the session's delegate is not destroyed after each load.
1764         As documented in NSURLSession.h: "In some cases, the task may signal other work before it acknowledges the cancelation."
1765         In the cases where we cancel a load, delete the NetworkLoad and corresponding NetworkDataTask, we want to call all
1766         completion handlers indicating that we really want to cancel instead of asserting.
1767
1768 2016-05-02  Darin Adler  <darin@apple.com>
1769
1770         Change IDL enumerations to be nested in their C++ class instead of at WebCore namespace level
1771         https://bugs.webkit.org/show_bug.cgi?id=157257
1772
1773         Reviewed by Chris Dumez.
1774
1775         * WebProcess/Network/WebLoaderStrategy.cpp:
1776         (WebKit::WebLoaderStrategy::loadResource): Updated since we changed
1777         ReferrerHeaderPolicy back to ReferrerPolicy.
1778         (WebKit::WebLoaderStrategy::schedulePluginStreamLoad): Ditto.
1779
1780 2016-05-02  Brady Eidson  <beidson@apple.com>
1781
1782         Const-ify some IDB code.
1783         https://bugs.webkit.org/show_bug.cgi?id=157287
1784
1785         Reviewed by Alex Christensen.
1786
1787         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1788         (WebKit::WebIDBConnectionToServer::deleteDatabase):
1789         (WebKit::WebIDBConnectionToServer::openDatabase):
1790         (WebKit::WebIDBConnectionToServer::abortTransaction):
1791         (WebKit::WebIDBConnectionToServer::commitTransaction):
1792         (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
1793         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1794
1795 2016-05-02  Simon Fraser  <simon.fraser@apple.com>
1796
1797         Sort the project file.
1798
1799         * WebKit2.xcodeproj/project.pbxproj:
1800
1801 2016-05-02  Simon Fraser  <simon.fraser@apple.com>
1802
1803         Fix shouldUpdateScrollLayerPositionSynchronously() for non-main frames. Remove updatesScrollLayerPositionOnMainThread()
1804         https://bugs.webkit.org/show_bug.cgi?id=157277
1805
1806         Reviewed by Dean Jackson, Tim Horton.
1807
1808         Remove updatesScrollLayerPositionOnMainThread() which is unused by all ports.
1809
1810         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
1811
1812 2016-05-02  Alex Christensen  <achristensen@webkit.org>
1813
1814         Crash if a certificate chain has null certificates
1815         https://bugs.webkit.org/show_bug.cgi?id=157206
1816
1817         Reviewed by Alexey Proskuryakov.
1818
1819         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1820         (WebKit::certificatesMatch):
1821         SecTrustGetCertificateAtIndex can return null.
1822         If this ever happens, something has gone horribly wrong in the security code and we should crash.
1823         See rdar://problem/21723172
1824
1825 2016-05-02  Myles C. Maxfield  <mmaxfield@apple.com>
1826
1827         Addressing post-review comments after r200116
1828         https://bugs.webkit.org/show_bug.cgi?id=157228
1829
1830         Reviewed by Anders Carlsson.
1831
1832         * Shared/WebPreferencesDefinitions.h:
1833         * UIProcess/API/Cocoa/WKWebView.mm:
1834         (-[WKWebView _initializeWithConfiguration:]):
1835         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1836         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1837         (-[WKWebViewConfiguration encodeWithCoder:]):
1838         (-[WKWebViewConfiguration initWithCoder:]):
1839         (-[WKWebViewConfiguration copyWithZone:]):
1840         * UIProcess/WebPageProxy.cpp:
1841         * WebProcess/WebPage/WebPage.cpp:
1842         (WebKit::WebPage::updatePreferences):
1843
1844 2016-05-02  Daniel Bates  <dabates@apple.com>
1845
1846         DatabaseTracker::closeAllDatabases calls Database::close from the wrong thread
1847         https://bugs.webkit.org/show_bug.cgi?id=147672
1848         <rdar://problem/22357464>
1849
1850         Reviewed by Brady Eidson.
1851
1852         Call DatabaseTracker::closeAllDatabases() with CurrentQueryBehavior::Interrupt so that we abort
1853         a long running query and close the database immediately to avoid holding a locked file when the
1854         process is suspended.
1855
1856         * WebProcess/WebProcess.cpp:
1857         (WebKit::WebProcess::processWillSuspendImminently):
1858
1859 2016-05-01  Darin Adler  <darin@apple.com>
1860
1861         Update Fetch to use enum class instead of string for enumerations
1862         https://bugs.webkit.org/show_bug.cgi?id=157241
1863
1864         Reviewed by Chris Dumez.
1865
1866         * WebProcess/Network/WebLoaderStrategy.cpp:
1867         (WebKit::WebLoaderStrategy::loadResource): Updated for the change where I
1868         renamed ReferrerPolicy to ReferrerHeaderPolicy, at least for now.
1869         (WebKit::WebLoaderStrategy::schedulePluginStreamLoad): Ditto.
1870
1871 2016-05-01  Konstantin Tokarev  <annulen@yandex.ru>
1872
1873         Fixed build with !ENABLED(DATABASE_PROCESS).
1874
1875         Unreviewed build fix.
1876
1877         * UIProcess/Network/NetworkProcessProxy.cpp:
1878         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
1879
1880 2016-04-29  Chris Dumez  <cdumez@apple.com>
1881
1882         Drop useless check in SpeculativeLoadManager::registerLoad()
1883         https://bugs.webkit.org/show_bug.cgi?id=157204
1884
1885         Reviewed by Antti Koivisto.
1886
1887         Drop useless check in SpeculativeLoadManager::registerLoad(). There is
1888         no way to end up this code path with a non-HTTP family request.
1889
1890         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1891         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
1892
1893 2016-04-29  Brian Burg  <bburg@apple.com>
1894
1895         Web Automation: add SPI to mark an existing NSEvent as synthesized for automation
1896         https://bugs.webkit.org/show_bug.cgi?id=157221
1897         <rdar://problem/26019356>
1898
1899         Reviewed by Timothy Hatcher.
1900
1901         In cases where an NSEvent is duplicated, clients need to re-mark an NSEvent
1902         as synthesized for automation if the original NSEvent was marked as such.
1903
1904         * UIProcess/API/Cocoa/_WKAutomationSession.h:
1905         * UIProcess/API/Cocoa/_WKAutomationSession.mm:
1906         (-[_WKAutomationSession markEventAsSynthesizedForAutomation:]):
1907         * UIProcess/Automation/WebAutomationSession.h:
1908         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
1909         (WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
1910         (WebKit::WebAutomationSession::markEventAsSynthesizedForAutomation):
1911
1912 2016-04-29  Brian Burg  <bburg@apple.com>
1913
1914         Web Automation: use a magic eventNumber as a fallback for detecting NSEvents synthesized for automation
1915         https://bugs.webkit.org/show_bug.cgi?id=157222
1916
1917         Reviewed by Timothy Hatcher.
1918
1919         Sometimes events are copied and redelivered in a way that can't be reliably intercepted,
1920         so use eventNumber as an alternate means of detecting synthesized mouse NSEvents.
1921
1922         * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
1923         (WebKit::WebAutomationSession::wasEventSynthesizedForAutomation):
1924         If it's a mouse-related event, check the eventNumber if the associated object was missing.
1925
1926         (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
1927         Most real events from input devices fill in eventNumber with a non-zero value.
1928         In my testing, using zero did not seem to adversely affect event delivery.
1929
1930 2016-04-29  Joseph Pecoraro  <pecoraro@apple.com>
1931
1932         Web Inspector: Issues inspecting the inspector, pausing on breakpoints causes content to not load
1933         https://bugs.webkit.org/show_bug.cgi?id=157198
1934         <rdar://problem/26011049>
1935
1936         Reviewed by Timothy Hatcher.
1937
1938         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h:
1939         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp:
1940         (WebKit::WebInspectorFrontendAPIDispatcher::reset):
1941         (WebKit::WebInspectorFrontendAPIDispatcher::frontendLoaded):
1942         (WebKit::WebInspectorFrontendAPIDispatcher::suspend):
1943         (WebKit::WebInspectorFrontendAPIDispatcher::unsuspend):
1944         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
1945         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchMessageAsync):
1946         (WebKit::WebInspectorFrontendAPIDispatcher::evaluateOrQueueExpression):
1947         (WebKit::WebInspectorFrontendAPIDispatcher::evaluateQueuedExpressions):
1948         Avoid evaluating expressions when the page is paused. Generalize the
1949         message queueing and dispatching for pause/suspend that we already
1950         had for waiting for the frontend page to be loaded.
1951
1952         * WebProcess/WebPage/WebInspectorUI.h:
1953         * WebProcess/WebPage/WebInspectorUI.cpp:
1954         (WebKit::WebInspectorUI::pagePaused):
1955         (WebKit::WebInspectorUI::pageUnpaused):
1956         When the frontend page pauses/unpauses, suspend/resume the dispatcher.
1957
1958 2016-04-29  Chris Dumez  <cdumez@apple.com>
1959
1960         Remove unnecessary isolated String copying from one of NetworkCache::Key's constructor
1961         https://bugs.webkit.org/show_bug.cgi?id=157207
1962
1963         Reviewed by Antti Koivisto.
1964
1965         Remove unnecessary isolated String copying from one of NetworkCache::Key's
1966         constructor. We are anyway going to create isolated copies if the Key ends
1967         up getting copied.
1968
1969         * NetworkProcess/cache/NetworkCacheKey.cpp:
1970         (WebKit::NetworkCache::Key::Key):
1971
1972 2016-04-29  Brian Burg  <bburg@apple.com>
1973
1974         Web Automation: performMouseInteraction command computes mouse event coordinates incorrectly
1975         https://bugs.webkit.org/show_bug.cgi?id=157218
1976         <rdar://problem/26018230>
1977
1978         Reviewed by Timothy Hatcher.
1979
1980         This patch fixes two issues: the min/max clamp was in the wrong order,
1981         and the y-value did not account for the window's top content inset.
1982
1983         * UIProcess/Automation/WebAutomationSession.cpp:
1984         (WebKit::WebAutomationSession::performMouseInteraction):
1985
1986 2016-04-29  Dean Jackson  <dino@apple.com>
1987
1988         RTL <select> popup menu is in the wrong location
1989         https://bugs.webkit.org/show_bug.cgi?id=157159
1990         <rdar://problem/25894451>
1991
1992         Reapply http://trac.webkit.org/changeset/200217
1993         but with changes that will allow it to build on Yosemite.
1994
1995         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1996         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
1997
1998 2016-04-28  Ada Chan  <adachan@apple.com>
1999
2000         Indicate we are processing user gesture when handling messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager
2001         https://bugs.webkit.org/show_bug.cgi?id=157151
2002
2003         Reviewed by Jer Noble.
2004
2005         Messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager are triggered by
2006         user actions, so add a UserGestureIndicator in the methods that handle those messages.
2007
2008         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
2009         (WebKit::WebPlaybackSessionManager::play):
2010         (WebKit::WebPlaybackSessionManager::pause):
2011         (WebKit::WebPlaybackSessionManager::togglePlayState):
2012         (WebKit::WebPlaybackSessionManager::beginScrubbing):
2013         (WebKit::WebPlaybackSessionManager::endScrubbing):
2014         (WebKit::WebPlaybackSessionManager::seekToTime):
2015         (WebKit::WebPlaybackSessionManager::fastSeek):
2016         (WebKit::WebPlaybackSessionManager::beginScanningForward):
2017         (WebKit::WebPlaybackSessionManager::beginScanningBackward):
2018         (WebKit::WebPlaybackSessionManager::endScanning):
2019         (WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
2020         (WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):
2021
2022 2016-04-29  Brady Eidson  <beidson@apple.com>
2023
2024         Add a default ".isolatedCopy()" specialization to CrossThreadCopier, and other small cleanup.
2025         https://bugs.webkit.org/show_bug.cgi?id=157185
2026
2027         Reviewed by Anders Carlsson.
2028
2029         * Shared/WebCrossThreadCopier.cpp:
2030         (WebCore::Vector<char>>::copy): reserveInitialCapacity() before creating the copy.
2031         (WebCore::Vector<int64_t>>::copy): Ditto.
2032         (WebCore::Vector<uint8_t>>::copy): Ditto.
2033         (WebCore::Vector<Vector<IDBKeyData>>>::copy): Deleted dead code.
2034         * Shared/WebCrossThreadCopier.h:
2035
2036 2016-04-29  Commit Queue  <commit-queue@webkit.org>
2037
2038         Unreviewed, rolling out r200217.
2039         https://bugs.webkit.org/show_bug.cgi?id=157183
2040
2041         This change broke the Yosemite build. (Requested by ryanhaddad
2042         on #webkit).
2043
2044         Reverted changeset:
2045
2046         "RTL <select> popup menu is in the wrong location"
2047         https://bugs.webkit.org/show_bug.cgi?id=157159
2048         http://trac.webkit.org/changeset/200217
2049
2050 2016-04-29  Claudio Saavedra  <csaavedra@igalia.com>
2051
2052         [GTK] Move WK2 shareable code out from gtk directories
2053         https://bugs.webkit.org/show_bug.cgi?id=157135
2054
2055         Reviewed by Darin Adler.
2056
2057         Both NetworkProcessMain and InjectedBundle can go out from their respective gtk directories.
2058
2059         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
2060         (WebKit::NetworkProcessMainUnix): Deleted.
2061         * NetworkProcess/soup/NetworkProcessMainSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp.
2062         (WebKit::NetworkProcessMainUnix):
2063         * PlatformGTK.cmake: Update.
2064         * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
2065         (WebKit::InjectedBundle::initialize):
2066         (WebKit::InjectedBundle::setBundleParameter):
2067         (WebKit::InjectedBundle::setBundleParameters):
2068         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2069         (WebKit::InjectedBundle::initialize): Deleted.
2070         (WebKit::InjectedBundle::setBundleParameter): Deleted.
2071         (WebKit::InjectedBundle::setBundleParameters): Deleted.
2072
2073 2016-04-28  Dean Jackson  <dino@apple.com>
2074
2075         RTL <select> popup menu is in the wrong location
2076         https://bugs.webkit.org/show_bug.cgi?id=157159
2077         <rdar://problem/25894451>
2078
2079         Reviewed by Simon Fraser.
2080
2081         Make sure the NSPopupMenu takes the text direction
2082         into account, and offset the position
2083         of the menu slightly if we're in RTL mode.
2084
2085         Unfortunately our test infrastructure is unable to exercise
2086         this because it runs without a window, and the popup menu
2087         is not captured in the screenshot.
2088
2089         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2090         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2091
2092 2016-04-28  Manuel Rego Casasnovas  <rego@igalia.com>
2093
2094         [css-grid] Add CSS Grid Layout runtime flag
2095         https://bugs.webkit.org/show_bug.cgi?id=157134
2096
2097         Reviewed by Simon Fraser.
2098
2099         Add CSS Grid Layout runtime flag based on preferences,
2100         enabled by default.
2101
2102         * Shared/WebPreferencesDefinitions.h:
2103         * UIProcess/API/C/WKPreferences.cpp:
2104         (WKPreferencesSetCSSGridLayoutEnabled):
2105         (WKPreferencesGetCSSGridLayoutEnabled):
2106         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2107         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2108         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2109         * WebProcess/WebPage/WebPage.cpp:
2110         (WebKit::WebPage::updatePreferences):
2111
2112 2016-04-28  Daniel Bates  <dabates@apple.com>
2113
2114         Fix the Apple Internal OS X build
2115
2116         * UIProcess/mac/WKPrintingView.mm:
2117         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Ignore deprecation warning for -[PDFPage drawWithBox:].
2118         * WebProcess/WebPage/mac/WebPageMac.mm:
2119         (WebKit::drawPDFPage): Ditto.
2120
2121 2016-04-28  Manuel Rego Casasnovas  <rego@igalia.com>
2122
2123         Fix mistake in custom elements runtime flag
2124         https://bugs.webkit.org/show_bug.cgi?id=157130
2125
2126         Reviewed by Chris Dumez.
2127
2128         The methods for the custom elements runtime flag were using
2129         the Shadow DOM flag instead.
2130         These methods were introduced in r197921,
2131         it seems it was just a copy&paste mistake.
2132
2133         * UIProcess/API/C/WKPreferences.cpp:
2134         (WKPreferencesSetCustomElementsEnabled):
2135         (WKPreferencesGetCustomElementsEnabled):
2136
2137 2016-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2138
2139         Unreviewed. Add missing files to the compilation of GTK+ inspector.
2140
2141         * PlatformGTK.cmake:
2142
2143 2016-04-27  Dan Bernstein  <mitz@apple.com>
2144
2145         <rdar://problem/25915253> REGRESSION (r199628): Netflix playback fails in Safari Technology Preview with error code S7363-1260-FFFF58D8
2146
2147         Rubber-stamped by Tim Horton.
2148
2149         Reverted r199628.
2150
2151         * Configurations/WebContentService.xcconfig:
2152
2153 2016-04-27  Brady Eidson  <beidson@apple.com>
2154
2155         Modern IDB: Implement native IDBFactory.getAllDatabaseNames for WebInspector.
2156         https://bugs.webkit.org/show_bug.cgi?id=157072
2157
2158         Reviewed by Alex Christensen.
2159
2160         Handle the process hop for the new getAllDatabaseNames call.
2161         
2162         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2163         (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames):
2164         (WebKit::WebIDBConnectionToClient::getAllDatabaseNames):
2165         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
2166         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
2167
2168         * Shared/WebCrossThreadCopier.cpp:
2169         (WebCore::SecurityOriginData>::copy): Deleted, as its in WebCore now.
2170         * Shared/WebCrossThreadCopier.h:
2171
2172         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2173         (WebKit::WebIDBConnectionToServer::getAllDatabaseNames):
2174         (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNames):
2175         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2176         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
2177
2178 2016-04-27  Simon Fraser  <simon.fraser@apple.com>
2179
2180         [iOS WK2] When determining tile size, check whether ancestor UIScrollViews are actually scrollable
2181         https://bugs.webkit.org/show_bug.cgi?id=157107
2182         rdar://problem/25943577
2183
2184         Reviewed by Tim Horton.
2185         
2186         We should only fall back to 512x512 tiles if the WKWebView has a UIScrollView ancestor,
2187         and that UIScrollView actually scrolls. This avoids falling back to small tiles in
2188         MobileSafari.
2189
2190         Rename "enclosedInScrollView" to "enclosedInScrollableAncestorView" everywhere.
2191
2192         * Shared/VisibleContentRectUpdateInfo.cpp:
2193         (WebKit::VisibleContentRectUpdateInfo::encode):
2194         (WebKit::VisibleContentRectUpdateInfo::decode):
2195         * Shared/VisibleContentRectUpdateInfo.h:
2196         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2197         (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView):
2198         (WebKit::operator==):
2199         (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollView): Deleted.
2200         * UIProcess/API/Cocoa/WKWebView.mm:
2201         (scrollViewCanScroll):
2202         (-[WKWebView _updateContentRectsWithState:]):
2203         * UIProcess/ios/WKContentView.h:
2204         * UIProcess/ios/WKContentView.mm:
2205         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
2206         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollView:]): Deleted.
2207         * WebProcess/WebPage/ios/WebPageIOS.mm:
2208         (WebKit::WebPage::updateVisibleContentRects):
2209
2210 2016-04-26  Ada Chan  <adachan@apple.com>
2211
2212         Set WebVideoFullscreenInterfaceMac up as a client of WebPlaybackSessionInterfaceMac to listen for playback state changes
2213         https://bugs.webkit.org/show_bug.cgi?id=157008
2214
2215         Reviewed by Jer Noble.
2216
2217         Since WebVideoFullscreenInterfaceMac holds onto WebPlaybackSessionInterfaceMac, we can't let
2218         WebPlaybackSessionManagerProxy unregister the context for that media element while
2219         WebVideoFullscreenInterfaceMac is still using it. WebVideoFullscreenInterfaceMac should add
2220         to the client count for that WebPlaybackSession context.
2221
2222         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
2223         (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
2224         When the context for the media element is created with the WebVideoFullscreenManagerProxy, it should
2225         add one to the client count for the media element context in WebPlaybackSessionManagerProxy.
2226         (WebKit::WebVideoFullscreenManagerProxy::removeClientForContext):
2227         When WebVideoFullscreenManagerProxy unregisters the context for this media element, it should
2228         subtract one from the client count for the media element context in WebPlaybackSessionManagerProxy.
2229
2230         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
2231         (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):
2232         Bail early if m_controlsManagerContextId is zero. Otherwise, we'd end up sending a
2233         ClearPlaybackControlsManager message to the UI process inadvertently.
2234         (WebKit::WebPlaybackSessionManager::contextIdForMediaElement):
2235         Make sure the model element for the context ID is set to the media element.
2236
2237         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
2238         (WebKit::WebVideoFullscreenManager::createModelAndInterface):
2239         When the context for the media element is created with the WebVideoFullscreenManager, it should
2240         add one to the client count for the media element context in WebPlaybackSessionManager.
2241         (WebKit::WebVideoFullscreenManager::removeContext):
2242         When WebVideoFullscreenManager unregisters the context for this media element, it should
2243         subtract one from the client count for the media element context in WebPlaybackSessionManager.
2244
2245 2016-04-27  Alex Christensen  <achristensen@webkit.org>
2246
2247         Remove download message receiver when NetworkProcess crashes
2248         https://bugs.webkit.org/show_bug.cgi?id=157102
2249         <rdar://problem/25550106>
2250
2251         Reviewed by Anders Carlsson.
2252
2253         * UIProcess/Downloads/DownloadProxyMap.cpp:
2254         (WebKit::DownloadProxyMap::processDidClose):
2255         When the NetworkProcess crashes during a download, we want to remove the message receiver from the map
2256         so we don't get an assertion in ~MessageReceiver in the UIProcess so we do not have a freed
2257         message receiver in the map.
2258
2259 2016-04-27  Alex Christensen  <achristensen@webkit.org>
2260
2261         Fix client certificate authentication with NSURLSession on iOS
2262         https://bugs.webkit.org/show_bug.cgi?id=157094
2263         <rdar://problem/25946859>
2264
2265         Reviewed by Darin Adler.
2266
2267         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2268         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2269         We only want to create a non-persistent credential with the given user and password 
2270         and store the user and password in the CredentialStorage if there is a user and password.
2271         We previously only skipped this if we were doing server trust evaluation, in which case 
2272         we will have a credential from serverTrustCredential which has no user or password.
2273         When doing client certificate authentication on iOS, this completion handler is called with
2274         a credential with session persistence and also no user or password, so we need to do the same thing.
2275         The reason this was never hit on Mac was because the credential came from tryUseCertificateInfoForChallenge,
2276         which always had persistence none.
2277
2278 2016-04-27  Claudio Saavedra  <csaavedra@igalia.com>
2279
2280         [GTK][EFL] Move WK2 platform code to a common place
2281         https://bugs.webkit.org/show_bug.cgi?id=157069
2282
2283         Reviewed by Carlos Garcia Campos.
2284
2285         Logging implementation can be shared between EFL and GTK, so move it to unix.
2286         The GTK Module implementation doesn't depend on GTK anyhow so move it to glib.
2287
2288         * Platform/efl/LoggingEfl.cpp: Removed.
2289         (WebKit::logLevelString): Deleted.
2290         * Platform/glib/ModuleGlib.cpp: Renamed from Source/WebKit2/Platform/gtk/ModuleGtk.cpp.
2291         (WebKit::Module::load):
2292         (WebKit::Module::unload):
2293         (WebKit::Module::platformFunctionPointer):
2294         * Platform/gtk/LoggingGtk.cpp:
2295         (WebKit::logLevelString): Deleted.
2296         * Platform/gtk/ModuleGtk.cpp:
2297         (WebKit::Module::load): Deleted.
2298         (WebKit::Module::unload): Deleted.
2299         (WebKit::Module::platformFunctionPointer): Deleted.
2300         * Platform/unix/LoggingUnix.cpp: Renamed from Source/WebKit2/Platform/gtk/LoggingGtk.cpp.
2301         (WebKit::logLevelString):
2302         * PlatformEfl.cmake: Update.
2303         * PlatformGTK.cmake: Update
2304
2305 2016-04-27  Alex Christensen  <achristensen@webkit.org>
2306
2307         Fix assertion when downloading with NSURLSession after r198955
2308         https://bugs.webkit.org/show_bug.cgi?id=157051
2309
2310         Reviewed by Brady Eidson.
2311
2312         * NetworkProcess/NetworkProcess.cpp:
2313         (WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
2314
2315 2016-04-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2316
2317         REGRESSION(r200094): [FreeType] Vertical text is broken after r200094
2318         https://bugs.webkit.org/show_bug.cgi?id=157066
2319
2320         Reviewed by Martin Robinson.
2321
2322         Add Source/WebCore/platform/graphics/freetype to the list of include dirs, because now FontPlatformData.h
2323         includes FcUniquePtr.h.
2324
2325         * PlatformEfl.cmake:
2326         * PlatformGTK.cmake:
2327
2328 2016-04-26  Joseph Pecoraro  <pecoraro@apple.com>
2329
2330         Uncaught Exception: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
2331         https://bugs.webkit.org/show_bug.cgi?id=156991
2332         <rdar://problem/25913475>
2333
2334         Reviewed by Timothy Hatcher.
2335
2336         * UIProcess/mac/WebInspectorProxyMac.mm:
2337         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2338         Explicitly always allow access to storage for Web Inspector content just
2339         in case, as we already allow universal file access.
2340
2341 2016-04-26  Myles C. Maxfield  <mmaxfield@apple.com>
2342
2343         [WK2] [OS X] Create API for switching RTL scrollbar policy
2344         https://bugs.webkit.org/show_bug.cgi?id=156948
2345         <rdar://problem/25707757>
2346
2347         Reviewed by Darin Adler.
2348
2349         Add the new API.
2350
2351         * Shared/WebPreferencesDefinitions.h:
2352         * UIProcess/API/Cocoa/WKWebView.mm:
2353         (-[WKWebView _initializeWithConfiguration:]):
2354         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2355         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2356         (-[WKWebViewConfiguration init]):
2357         (-[WKWebViewConfiguration encodeWithCoder:]):
2358         (-[WKWebViewConfiguration initWithCoder:]):
2359         (-[WKWebViewConfiguration copyWithZone:]):
2360         * UIProcess/WebPageProxy.cpp:
2361         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
2362         * WebProcess/WebPage/WebPage.cpp:
2363         (WebKit::WebPage::updatePreferences):
2364
2365 2016-04-26  Beth Dakin  <bdakin@apple.com>
2366
2367         Check to make sure shouldRequestCandidates() before requesting candidates
2368         https://bugs.webkit.org/show_bug.cgi?id=157038
2369         -and corresponding-
2370         rdar://problem/25910418
2371
2372         Reviewed by Tim Horton.
2373
2374         This patch limits requesting and showing candidates to cases where 
2375         shouldRequestCandidates() is true. This patch also caches the sequence number 
2376         returned by [NSSpellChecker requestCandidatesForSelectedRange:] to make sure 
2377         it is equal to the sequence number sent to the callback handler so that we do 
2378         not show candidates for old requests.
2379
2380         * UIProcess/Cocoa/WebViewImpl.h:
2381         * UIProcess/Cocoa/WebViewImpl.mm:
2382         (WebKit::WebViewImpl::updateWebViewImplAdditions):
2383         (WebKit::WebViewImpl::shouldRequestCandidates):
2384         (WebKit::WebViewImpl::showCandidates):
2385         (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
2386         (WebKit::WebViewImpl::handleRequestedCandidates):
2387
2388 2016-04-26  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2389
2390         [EFL] Update expectation result in ewk_context_preferred_languages API test
2391         https://bugs.webkit.org/show_bug.cgi?id=157027
2392
2393         Reviewed by Carlos Garcia Campos.
2394
2395         platformLanguage() has been returning lower case value since r199815. Thus existing expected result
2396         needs to be updated together.
2397
2398         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Change en-US with en-us.
2399         (TEST_F):
2400
2401 2016-04-26  Zan Dobersek  <zdobersek@igalia.com>
2402
2403         Mark two methods in the CoordinatedGraphicsScene and the
2404         ThreadedCoordinatedLayerTreeHost classes as overrides, fixing
2405         the compiler warnings.
2406
2407         Rubber-stamped by Carlos Garcia Campos.
2408
2409         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2410         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2411
2412 2016-04-25  Ryosuke Niwa  <rniwa@webkit.org>
2413
2414         Remove the build flag for template elements
2415         https://bugs.webkit.org/show_bug.cgi?id=157022
2416
2417         Reviewed by Daniel Bates.
2418
2419         * Configurations/FeatureDefines.xcconfig:
2420
2421 2016-04-25  Chris Dumez  <cdumez@apple.com>
2422
2423         Crash under -[WKWebView _mayAutomaticallyShowVideoPictureInPicture] + 32 (WKWebView.mm:309)
2424         https://bugs.webkit.org/show_bug.cgi?id=156990
2425         <rdar://problem/25904376>
2426
2427         Reviewed by Jer Noble.
2428
2429         In case of WebProcess crash, WebPageProxy::processDidCrash() will call resetState() which
2430         will nullify WebPageProxy::m_videoFullscreenManager. In WebPageProxy::reattachToWebProcess(),
2431         we then call updateViewState() before re-initializing m_videoFullscreenManager, and
2432         updateViewState() ends up calling [WKWebView _mayAutomaticallyShowVideoPictureInPicture]
2433         which dereferences WebPageProxy::m_videoFullscreenManager without null check. This patch
2434         adds a null check for m_videoFullscreenManager in _mayAutomaticallyShowVideoPictureInPicture.
2435
2436         * UIProcess/API/Cocoa/WKWebView.mm:
2437         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
2438
2439 2016-04-25  Dan Bernstein  <mitz@apple.com>
2440
2441         Fix a couple of mistakes from r199700.
2442
2443         Rubber-stamped by Anders Carlsson.
2444
2445         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added availability attributes to new properties.
2446         * WebKit2.xcodeproj/project.pbxproj: Demoted _WKExperimentalFeatureInternal.h from Private to Project.
2447
2448 2016-04-24  Hunseop Jeong  <hs85.jeong@samsung.com>
2449
2450         [EFL] Update the ewk_settings_offline_web_application_cache_enabled_get() expected value after r199854.
2451         https://bugs.webkit.org/show_bug.cgi?id=156968
2452
2453         Reviewed by Gyuyoung Kim.
2454
2455         * UIProcess/API/C/WKPreferencesRef.h: Update the comment.
2456         * UIProcess/API/efl/tests/test_ewk2_settings.cpp: 
2457         (TEST_F):
2458
2459 2016-04-23  Andy Estes  <aestes@apple.com>
2460
2461         Fix issues found by the clang static analyzer
2462         https://bugs.webkit.org/show_bug.cgi?id=156956
2463
2464         Reviewed by Alexey Proskuryakov.
2465
2466         * UIProcess/API/Cocoa/WKPreviewActionItem.mm:
2467         (-[WKPreviewAction dealloc]): Added to release _identifier.
2468         * UIProcess/_WKWebViewPrintFormatter.mm:
2469         (-[_WKWebViewPrintFormatter dealloc]): Released _frameToPrint.
2470         * UIProcess/ios/WKContentViewInteraction.mm:
2471         (-[WKContentView inputView]): -createPeripheralWithView: returned a retained object, but the method name did not
2472         match Cocoa conventions. Called -initWithView: instead.
2473         (-[WKContentView _showAttachmentSheet]): Stored the _WKActivatedElementInfo in a RetainPtr.
2474         (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
2475         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
2476         The properties contextBeforeSelection, selectedText, markedText, and contextAfterSelection have the 'copy'
2477         annotation in UIWKAutocorrectionContext, so the additional copy made here would be leaked. Removed the extra copy.
2478         (-[WKAutocorrectionContext dealloc]): Deleted.
2479         * UIProcess/ios/forms/WKFormInputControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
2480         * UIProcess/ios/forms/WKFormInputControl.mm:
2481         (-[WKFormInputControl initWithView:]): Changed to return instancetype.
2482         (+[WKFormInputControl createPeripheralWithView:]): Deleted.
2483         * UIProcess/ios/forms/WKFormSelectControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
2484         * UIProcess/ios/forms/WKFormSelectControl.mm:
2485         (+[WKFormSelectControl createPeripheralWithView:]): Deleted.
2486         * UIProcess/mac/LegacySessionStateCoding.cpp:
2487         (WebKit::decodeLegacySessionState): If dynamic_cf_cast returned nullptr, the result of
2488         CFPropertyListCreateWithData would leak. Stored the CFPropertyListRef in a RetainPtr before calling dynamic_cf_cast.
2489         * UIProcess/mac/ServicesController.mm:
2490         (WebKit::ServicesController::refreshExistingServices): Used a RetainPtr for attachment and cell.
2491         * UIProcess/mac/WebContextMenuProxyMac.mm:
2492         (WebKit::WebContextMenuProxyMac::setupServicesMenu): Used a RetainPtr for groupEntry.
2493
2494 2016-04-23  Chris Dumez  <cdumez@apple.com>
2495
2496         Tie the DiagnosticLoggingClient's lifetime to the Page
2497         https://bugs.webkit.org/show_bug.cgi?id=156938
2498         <rdar://problem/25851499>
2499
2500         Reviewed by Antti Koivisto.
2501
2502         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2503         (WebKit::WebDiagnosticLoggingClient::pageDestroyed):
2504         (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed): Deleted.
2505         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
2506         * WebProcess/WebPage/ios/WebPageIOS.mm:
2507         (WebKit::WebPage::willStartUserTriggeredZooming):
2508
2509 2016-04-23  Dan Bernstein  <mitz@apple.com>
2510
2511         <rdar://problem/25893246> WebKit2 has failed to build: error: use of undeclared identifier 'm_playbackSessionManager'
2512
2513         Fixed the non-AVKit build.
2514
2515         * UIProcess/API/Cocoa/WKWebView.mm:
2516         (-[WKWebView _isShowingVideoPictureInPicture]):
2517         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
2518         * UIProcess/WebPageProxy.cpp:
2519         (WebKit::WebPageProxy::fullScreenManager):
2520         (WebKit::WebPageProxy::playbackSessionManager):
2521         * UIProcess/WebPageProxy.h:
2522         * UIProcess/ios/WebPageProxyIOS.mm:
2523         (WebKit::WebPageProxy::applicationDidBecomeActive):
2524         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2525         (WebKit::WebChromeClient::createScrollingCoordinator):
2526         (WebKit::WebChromeClient::supportsVideoFullscreen):
2527         * WebProcess/WebCoreSupport/WebChromeClient.h:
2528         * WebProcess/WebPage/WebPage.cpp:
2529         (WebKit::WebPage::inspectorUI):
2530         (WebKit::WebPage::playbackSessionManager):
2531         * WebProcess/WebPage/WebPage.h:
2532         * WebProcess/cocoa/WebVideoFullscreenManager.h:
2533         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
2534
2535 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
2536
2537         Fixing a typo in my last commit.
2538
2539         Unreviewed build fix.
2540
2541         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
2542         * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
2543
2544 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
2545
2546         Missed some macros to fix builds that do not support AVKit.
2547
2548         Unreviewed build fix.
2549
2550         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
2551         * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
2552
2553 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
2554
2555         Fix builds that do not support AVKit
2556
2557         Unreviewed build fix.
2558
2559         * UIProcess/WebPageProxy.h:
2560
2561 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
2562
2563         Take 2 for fixing builds that do not support AVKit
2564
2565         Unreviewed build fix.
2566
2567         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
2568         * UIProcess/WebPageProxy.cpp:
2569         (WebKit::WebPageProxy::resetState):
2570
2571 2016-04-22  Anders Carlsson  <andersca@apple.com>
2572
2573         WKWebView WebSQL is not enabled
2574         https://bugs.webkit.org/show_bug.cgi?id=156928
2575         rdar://problem/19029603
2576
2577         Reviewed by Beth Dakin.
2578
2579         Give databases a default quota of 50 MB, matching what we have in UIWebView.
2580
2581         * UIProcess/Cocoa/UIDelegate.mm:
2582         (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
2583
2584 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
2585
2586         Fix builds that do not support AVKit
2587
2588         Unreviewed build fix.
2589
2590         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
2591         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
2592         * UIProcess/WebPageProxy.cpp:
2593         (WebKit::WebPageProxy::WebPageProxy):
2594         (WebKit::WebPageProxy::reattachToWebProcess):
2595         (WebKit::WebPageProxy::viewDidLeaveWindow):
2596         * UIProcess/ios/WebPageProxyIOS.mm:
2597
2598 2016-04-22  Brady Eidson  <beidson@apple.com>
2599
2600         Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy.
2601         https://bugs.webkit.org/show_bug.cgi?id=156916
2602
2603         Reviewed by Tim Horton.
2604
2605         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2606         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
2607
2608 2016-04-22  Zan Dobersek  <zdobersek@igalia.com>
2609
2610         NetworkCacheIOChannelSoup: detach the newly-created IOChannel::readSync thread
2611         https://bugs.webkit.org/show_bug.cgi?id=156907
2612
2613         Reviewed by Carlos Garcia Campos.
2614
2615         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2616         (WebKit::NetworkCache::IOChannel::readSyncInThread): Detach the new thread,
2617         ensuring the resources are released after the thread exits. Next step is
2618         to set up a thread pool and use that, avoiding thread re-creation.
2619
2620 2016-04-21  Dean Jackson  <dino@apple.com>
2621
2622         Backdrop Filter should not be visible if element has visibility:hidden
2623         https://bugs.webkit.org/show_bug.cgi?id=149318
2624         <rdar://problem/22749780>
2625
2626         Reviewed by Simon Fraser.
2627
2628         Add the isHidden method to PlatformCALayerRemote.
2629
2630         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2631         (WebKit::PlatformCALayerRemote::isHidden):
2632         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2633
2634 2016-04-21  Anders Carlsson  <andersca@apple.com>
2635
2636         WKWebView HTML5 AppCache not working
2637         https://bugs.webkit.org/show_bug.cgi?id=156887
2638         rdar://problem/17944162
2639
2640         Reviewed by Tim Horton.
2641
2642         * Shared/WebPreferencesDefinitions.h:
2643         Set the offlineWebApplicationCacheEnabled property to true by default.
2644
2645         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2646         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2647         Set the default applicationCacheFlatFileSubdirectoryName to "Files".
2648
2649 2016-04-21  Anders Carlsson  <andersca@apple.com>
2650
2651         Get rid of the last uses of ApplicationCacheStorage::singleton() from WebKit2
2652         https://bugs.webkit.org/show_bug.cgi?id=156876
2653
2654         Reviewed by Tim Horton.
2655
2656         * Shared/WebProcessCreationParameters.cpp:
2657         (WebKit::WebProcessCreationParameters::encode):
2658         (WebKit::WebProcessCreationParameters::decode):
2659         * Shared/WebProcessCreationParameters.h:
2660         Add and encode and decode a applicationCacheFlatFileSubdirectoryName.
2661
2662         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2663         (API::ProcessPoolConfiguration::createWithLegacyOptions):
2664         Set m_applicationCacheFlatFileSubdirectoryName to "ApplicationCache".
2665
2666         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
2667         Set m_applicationCacheFlatFileSubdirectoryName to "Files".
2668
2669         (API::ProcessPoolConfiguration::copy):
2670         Copy m_applicationCacheFlatFileSubdirectoryName.
2671
2672         * UIProcess/API/APIProcessPoolConfiguration.h:
2673         Add getter for applicationCacheFlatFileSubdirectoryName.
2674
2675         * UIProcess/WebProcessPool.cpp:
2676         (WebKit::legacyWebsiteDataStoreConfiguration):
2677         Initialize applicationCacheFlatFileSubdirectoryName from the process pool configuration.
2678
2679         (WebKit::WebProcessPool::createNewWebProcess):
2680         Initialize parameters.applicationCacheFlatFileSubdirectoryName. Remove a call to 
2681         ApplicationCacheStorage::singleton().setDefaultOriginQuota since it had no effect (it was called in the UI process).
2682
2683         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2684         (WebKit::WebsiteDataStore::WebsiteDataStore):
2685         Initialize m_applicationCacheFlatFileSubdirectoryName.
2686
2687         (WebKit::WebsiteDataStore::fetchData):
2688         (WebKit::WebsiteDataStore::removeData):
2689         Pass m_applicationCacheFlatFileSubdirectoryName when creating the application cache storage.
2690
2691         * UIProcess/WebsiteData/WebsiteDataStore.h:
2692         Add new members.
2693
2694         * WebProcess/WebPage/WebPage.cpp:
2695         (WebKit::WebPage::WebPage):
2696         Set the application cache storage.
2697
2698         * WebProcess/WebProcess.cpp:
2699         (WebKit::WebProcess::initializeWebProcess):
2700         Initialize the application cache storage.
2701
2702         * WebProcess/WebProcess.h:
2703         (WebKit::WebProcess::applicationCacheStorage):
2704         Add new getter.
2705
2706 2016-04-21  Anders Carlsson  <andersca@apple.com>
2707
2708         Remove two uses of ApplicationCacheStorage::singleton() from WebKit2
2709         https://bugs.webkit.org/show_bug.cgi?id=156873
2710
2711         Reviewed by Beth Dakin.
2712
2713         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2714         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
2715         * WebProcess/WebProcess.cpp:
2716         (WebKit::WebProcess::clearApplicationCache): Deleted.
2717         * WebProcess/WebProcess.h:
2718
2719 2016-04-21  Beth Dakin  <bdakin@apple.com>
2720
2721         showCandidates() should take a range and the string should be the whole 
2722         paragraph
2723         https://bugs.webkit.org/show_bug.cgi?id=156813
2724         -and corresponding-
2725         rdar://problem/25760533
2726
2727         Reviewed by Tim Horton.
2728
2729         * UIProcess/Cocoa/WebViewImpl.h:
2730         * UIProcess/Cocoa/WebViewImpl.mm:
2731         (WebKit::WebViewImpl::updateWebViewImplAdditions):
2732         (WebKit::WebViewImpl::showCandidates):
2733         (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
2734         (WebKit::WebViewImpl::handleRequestedCandidates):
2735
2736 2016-04-21  Chelsea Pugh  <cpugh@apple.com>
2737
2738         [iOS] Allow clients to hide the accessory view on a form input session
2739         https://bugs.webkit.org/show_bug.cgi?id=155574
2740
2741         Reviewed by Dan Bernstein.
2742
2743         * UIProcess/API/Cocoa/_WKFormInputSession.h:
2744         * UIProcess/ios/WKContentViewInteraction.mm:
2745         (-[WKFormInputSession accessoryViewShouldNotShow]): Getter for accessoryViewShouldNotShow.
2746         (-[WKFormInputSession setAccessoryViewShouldNotShow:]): Set accessoryViewShouldNotShow and reload input views.
2747         (-[WKContentView requiresAccessoryView]): If the accessory view should be not be shown, do not require
2748         the accessory view.
2749
2750 2016-04-21  Chris Dumez  <cdumez@apple.com>
2751
2752         Drop [UsePointersEvenForNonNullableObjectArguments] from Range
2753         https://bugs.webkit.org/show_bug.cgi?id=156805
2754
2755         Reviewed by Youenn Fablet.
2756
2757         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
2758         (-[WKDOMRange setStart:offset:]):
2759         (-[WKDOMRange setEnd:offset:]):
2760         (-[WKDOMRange selectNode:]):
2761         (-[WKDOMRange selectNodeContents:]):
2762         * WebProcess/WebPage/WebFrame.cpp:
2763         (WebKit::WebFrame::contentsAsString):
2764
2765 2016-04-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2766
2767         [GTK] WebKitWebView should claim the contents size as its natural size
2768         https://bugs.webkit.org/show_bug.cgi?id=156835
2769
2770         Reviewed by Žan Doberšek.
2771
2772         And keep claiming 0 as its minimum size since it's scrollable.
2773
2774         * UIProcess/API/gtk/PageClientImpl.cpp:
2775         (WebKit::PageClientImpl::didChangeContentSize): Call webkitWebViewBaseSetContentsSize().
2776         * UIProcess/API/gtk/PageClientImpl.h:
2777         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2778         (webkitWebViewBaseGetPreferredWidth): Return the contents width as natural width.
2779         (webkitWebViewBaseGetPreferredHeight): Return the contents height as natural height.
2780         (webkit_web_view_base_class_init): Add implementations of get_preferred_width/height.
2781         (webkitWebViewBaseSetContentsSize): Save the contents size.
2782         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2783
2784 2016-04-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2785
2786         [GTK] WebKitWebView should propagate wheel events not handled by the web process
2787         https://bugs.webkit.org/show_bug.cgi?id=156834
2788
2789         Reviewed by Žan Doberšek.
2790
2791         We are currently swallowing all wheel events unconditionally, not allowing applications to handle wheel events
2792         when not handled by us. Since the GTK+ event propagation system is synchronous, and our events are handled
2793         asynchronously, we need to do something similar to what we do for key events, not propagate the event the first
2794         time and if not handled by the web process, re-inject it in the event loop and then just propagate it.
2795
2796         * Shared/NativeWebWheelEvent.h:
2797         (WebKit::NativeWebWheelEvent::nativeEvent): Remove useless const.
2798         * UIProcess/API/gtk/PageClientImpl.cpp:
2799         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Tell the web view to propagate the next wheel event,
2800         and re-inject the event not handled by the web process in the event loop.
2801         * UIProcess/API/gtk/PageClientImpl.h:
2802         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2803         (webkitWebViewBaseScrollEvent): Propagate the event if shouldForwardNextWheelEvent is true.
2804         (webkitWebViewBaseForwardNextWheelEvent): Set shouldForwardNextWheelEvent to true.
2805         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2806         * UIProcess/PageClient.h:
2807         * UIProcess/WebPageProxy.cpp:
2808         (WebKit::WebPageProxy::didReceiveEvent): Remove ifdef.
2809         * UIProcess/efl/WebView.h:
2810
2811 2016-04-20  Dustin Falgout  <dustin@falgout.us>
2812
2813         [GTK] Expose AllowUniversalAccessFromFileURLs preference now that calling localStorage.getItem() results in SecurityError: DOM Exception 18
2814         
2815         Reviewed by Michael Catanzaro.
2816                 
2817         As of r197858 JavaScript loaded in the context of a file scheme url cannot access local storage. That is a major 
2818         breaking change as many applications that serve files locally rely on having access to local storage. The point  
2819         of that security fix is to avoid cases of downloaded HTML content (such as e-mail attachments or JS injected
2820         into local contexts) from having access to your local file system and arbitrary local storage. If you are serving 
2821         local files in your applications, you can use the WebKitAllowUniversalAccessFromFileURLs preference key to tell 
2822         Webkit that you are approve of these kinds of interactions.
2823                                               
2824         https://bugs.webkit.org/show_bug.cgi?id=156651
2825
2826         * UIProcess/API/gtk/WebKitSettings.cpp:
2827         (webKitSettingsSetProperty):
2828         (webKitSettingsGetProperty):
2829         (webkit_settings_class_init):
2830         (webkit_settings_get_allow_universal_access_from_file_urls):
2831         (webkit_settings_set_allow_universal_access_from_file_urls):
2832         * UIProcess/API/gtk/WebKitSettings.h:
2833         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2834
2835 2016-04-20  Brady Eidson  <beidson@apple.com>
2836
2837         Modern IDB (Workers): Enable INDEXED_DATABASE_IN_WORKERS compile time flag, but disabled in RuntimeEnabledFeatures.
2838         https://bugs.webkit.org/show_bug.cgi?id=156782
2839
2840         Reviewed by Alex Christensen.
2841
2842         * Configurations/FeatureDefines.xcconfig:
2843
2844 2016-04-20  Brent Fulgham  <bfulgham@apple.com>
2845
2846         [WK2][Mac][iOS] WebContent crash when using special file:// URI scheme @ WebKit::resolveSymlinksInPath(WTF::CString const&) + 159
2847         https://bugs.webkit.org/show_bug.cgi?id=156747
2848         <rdar://problem/24648176>
2849
2850         Reviewed by Alexey Proskuryakov.
2851
2852         FileSystemCF::fileSystemRepresentation return a null string when presented with a file URL that contains embedded nulls. When
2853         this happens, SandboxExtension::createHandle attempts to pass a null string to 'resolveSymlinksInPath', which attemps to call
2854         'strrchr' on the null pointer, causing a crash.
2855
2856         Test: fast/url/file-uri-with-embedded-null-no-crash.html
2857
2858         * Shared/mac/SandboxExtensionMac.mm:
2859         (WebKit::SandboxExtension::createHandle): If 'fileSystemRepresentation' is null, return early with an error.
2860
2861 2016-04-19  Alex Christensen  <achristensen@webkit.org>
2862
2863         Fix CMake build.
2864
2865         * CMakeLists.txt:
2866         Don't compile a file that doesn't exist.
2867         * PlatformMac.cmake:
2868         Put the XPCServices in the right place.
2869
2870 2016-04-19  Chris Dumez  <cdumez@apple.com>
2871
2872         Crash under WebKit::PluginView::pluginSnapshotTimerFired
2873         https://bugs.webkit.org/show_bug.cgi?id=156754
2874         <rdar://problem/22566764>
2875
2876         Reviewed by Beth Dakin.
2877
2878         Add null check for frame() before trying to access the frame settings,
2879         similarly to what is done earlier in this function. This fixes a top
2880         crasher.
2881
2882         * WebProcess/Plugins/PluginView.cpp:
2883         (WebKit::PluginView::pluginSnapshotTimerFired):
2884
2885 2016-04-19  Dean Jackson  <dino@apple.com>
2886
2887         New SPI to export a dictionary of runtime features
2888         https://bugs.webkit.org/show_bug.cgi?id=156645
2889         <rdar://problem/23621666>
2890
2891         Reviewed by Anders Carlsson.
2892
2893         Mark the new SPI as WK_MAC_TBA, WK_IOS_TBA.
2894
2895         * UIProcess/API/Cocoa/_WKExperimentalFeature.h:
2896
2897 2016-04-19  Dean Jackson  <dino@apple.com>
2898
2899         New SPI to export a dictionary of runtime features
2900         https://bugs.webkit.org/show_bug.cgi?id=156645
2901         <rdar://problem/23621666>
2902
2903         Post commit follow-up. Darin gave review comments that
2904         I didn't address in my original commit - I was waiting
2905         on some advice.
2906
2907         * UIProcess/WebPreferences.cpp:
2908         (WebKit::WebPreferences::isEnabledForFeature): Change the macro
2909         to generate a static list of function pointers, rather than
2910         a lot of conditional statements.
2911         (WebKit::WebPreferences::setEnabledForFeature): Ditto.
2912
2913 2016-04-19  Chris Dumez  <cdumez@apple.com>
2914
2915         Mark more classes as WTF_MAKE_FAST_ALLOCATED
2916         https://bugs.webkit.org/show_bug.cgi?id=156732
2917
2918         Reviewed by Darin Adler.
2919
2920         * NetworkProcess/Downloads/Download.h:
2921         * NetworkProcess/Downloads/PendingDownload.h:
2922         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
2923         * Shared/API/Cocoa/RemoteObjectInvocation.h:
2924
2925 2016-04-19  Alex Christensen  <achristensen@webkit.org>
2926
2927         Build fix.
2928
2929         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2930         (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob):
2931         result is unused.
2932
2933 2016-04-19  Brady Eidson  <beidson@apple.com>
2934
2935         Modern IDB: ObjectStore Blob Support.
2936         https://bugs.webkit.org/show_bug.cgi?id=143193
2937
2938         Reviewed by Alex Christensen.
2939
2940         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2941         (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob): Don't ASSERT that
2942           this is the first we've heard of this path - The Connection now remembers all extensions.
2943         (WebKit::NetworkConnectionToWebProcess::getBlobDataFileReferenceForPath): Don't take - Just get.
2944
2945 2016-04-19  Antti Koivisto  <antti@apple.com>
2946
2947         Try to fix iOS build.
2948
2949         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2950
2951 2016-04-19  Commit Queue  <commit-queue@webkit.org>
2952
2953         Unreviewed, rolling out r199658.
2954         https://bugs.webkit.org/show_bug.cgi?id=156736
2955
2956         It broke all EFL layout tests (Requested by KaL on #webkit).
2957
2958         Reverted changeset:
2959
2960         "[UNIX] Initialize WebKit before the platform initializations"
2961         https://bugs.webkit.org/show_bug.cgi?id=156622
2962         http://trac.webkit.org/changeset/199658
2963
2964 2016-04-18  Alex Christensen  <achristensen@webkit.org>
2965
2966         Build fix after r199700
2967
2968         * PlatformMac.cmake:
2969
2970 2016-04-18  Brady Eidson  <beidson@apple.com>
2971
2972         Modern IDB (Blob support): When reading Blobs from the database, grant the Networking process sandbox access to the files.
2973         https://bugs.webkit.org/show_bug.cgi?id=156640
2974
2975         Reviewed by Alex Christensen.
2976
2977         * DatabaseProcess/DatabaseProcess.cpp:
2978         (WebKit::DatabaseProcess::getSandboxExtensionsForBlobFiles): Utility function to ask the UI process for
2979           SandboxExtensions for a list of files.
2980         (WebKit::DatabaseProcess::didGetSandboxExtensionsForBlobFiles): Take the SandboxExtensions from the UI process
2981           and pass them along to the completion handler.
2982         * DatabaseProcess/DatabaseProcess.h:
2983         * DatabaseProcess/DatabaseProcess.messages.in:
2984
2985         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2986         (WebKit::WebIDBConnectionToClient::didGetRecord): If the value returned from the database doesn't have Blob files,
2987           pass the result directly on to WebCore. If it does, ask the UI process for SandboxExtensions first.
2988
2989         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2990         (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked): Grab the BlobDataFileReference from the 
2991           NetworkConnectionToWebProcess to pass along to the BlobRegistry.
2992
2993         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2994         (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob): Add this message
2995           so the WebProcess can preflight the creation of some blob URLs by passing along the SandboxExtensions for their files.
2996         (WebKit::NetworkConnectionToWebProcess::takeBlobDataFileReferenceForPath):
2997         * NetworkProcess/NetworkConnectionToWebProcess.h:
2998         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2999
3000         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3001         (WebKit::DatabaseProcessProxy::getSandboxExtensionsForBlobFiles): Create SandboxExtensions for the passed in files and
3002           return them to the DatabaseProcess.
3003         * UIProcess/Databases/DatabaseProcessProxy.h:
3004         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
3005
3006         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3007         (WebKit::WebIDBConnectionToServer::didGetRecordWithSandboxExtensions): New form of "didGetRecord" that handles passing
3008           the SandboxExtensions to the Networking process before they are needed.
3009         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3010         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
3011
3012         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
3013         (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
3014         * WebProcess/FileAPI/BlobRegistryProxy.h:
3015
3016 2016-04-18  Dean Jackson  <dino@apple.com>
3017
3018         New SPI to export a dictionary of runtime features
3019         https://bugs.webkit.org/show_bug.cgi?id=156645
3020         <rdar://problem/23621666>
3021
3022         Trying to fix GTK and EFL builds. I forgot to add files
3023         to CMake.
3024
3025         * CMakeLists.txt:
3026         * PlatformMac.cmake:
3027
3028 2016-04-18  Dean Jackson  <dino@apple.com>
3029
3030         New SPI to export a dictionary of runtime features
3031         https://bugs.webkit.org/show_bug.cgi?id=156645
3032         <rdar://problem/23621666>
3033
3034         Reviewed by Darin Adler.
3035
3036         Add a new type of Preference for experimental features so that we
3037         can dynamically toggle them from a WebKit2 host. These are special
3038         keys that are tied to runtime flags. The host process can ask WebKit
3039         for the list of keys, each with a small description, in order to
3040         display UI.
3041
3042         - Add HumanReadableName and HumanReadableDescription parameters to our
3043           macros, which are used when building a ExperimentalFeature.
3044           These are both empty strings for the existing preferences. At some
3045           point we should probably move all this to code generation rather
3046           than macros, so that we don't have to carry around unused parameters.
3047
3048         - I've included two sample experimental features: WebGL2 and ShadowDOM.
3049           They are not actually hooked up to the runtime settings yet, but its
3050           pretty clear how that will happen. Note that these are new preferences
3051           that have an "Experimental" prefix. This is so toggling an experimental
3052           feature to off won't cause the feature to not work once it becomes
3053           stable enough to enable by default. In other words, when it moves
3054           out of the experimental stage, the experimental feature flag will be
3055           removed, and you'll no longer check for values with that key.
3056
3057         - The ExperimentalFeature object is what the host process
3058           will read in order to show some UI. It contains the human readable info,
3059           as well as the actual key that can be used to query and toggle the
3060           experimental feature.
3061
3062         * Shared/API/APIObject.h: Add the ExperimentalFeature.
3063
3064         * Shared/Cocoa/APIObject.mm:
3065         (API::Object::newObject): Exposes a wrapper around a _WKExperimentalFeature ObjC type.
3066
3067         * Shared/WebPreferencesDefinitions.h: Change all the existing macros to take the new
3068         parameters, and add the initial experimental keys.
3069
3070         * Shared/WebPreferencesKeys.cpp: Add new parameters to existing macros.
3071         * Shared/WebPreferencesKeys.h: Ditto.
3072         * Shared/WebPreferencesStore.cpp: Ditto.
3073         (WebKit::defaults):
3074
3075         * UIProcess/API/APIExperimentalFeature.cpp: The API side of the ExperimentalFeature.
3076         (API::ExperimentalFeature::create):
3077         (API::ExperimentalFeature::ExperimentalFeature):
3078         (API::ExperimentalFeature::~ExperimentalFeature):
3079         * UIProcess/API/APIExperimentalFeature.h:
3080
3081         * UIProcess/API/Cocoa/WKPreferences.mm: The actual implementation of the SPI.
3082         (+[WKPreferences _experimentalFeatures]): Create and return a list of feature descriptors.
3083         (-[WKPreferences _isEnabledForFeature:]): Get the value.
3084         (-[WKPreferences _setEnabled:forFeature:]): Set the value.
3085         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3086
3087         * UIProcess/API/Cocoa/_WKExperimentalFeature.h: The ObjC version.
3088         * UIProcess/API/Cocoa/_WKExperimentalFeature.mm:
3089         (-[_WKExperimentalFeature dealloc]):
3090         (-[_WKExperimentalFeature description]):
3091         (-[_WKExperimentalFeature name]):
3092         (-[_WKExperimentalFeature key]):
3093         (-[_WKExperimentalFeature details]):
3094         (-[_WKExperimentalFeature _apiObject]):
3095         * UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h: Implementation of the wrapper.
3096         (WebKit::wrapper):
3097
3098         * UIProcess/WebPreferences.cpp: The C++ implementation that provides the data for the ObjC API.
3099         (WebKit::globalExperimentalFeatures):
3100         (WebKit::WebPreferences::ExperimentalFeatures):
3101         (WebKit::WebPreferences::isEnabledForFeature):
3102         (WebKit::WebPreferences::setEnabledForFeature):
3103         * UIProcess/WebPreferences.h:
3104
3105         * UIProcess/mac/WebPreferencesMac.mm: Update some macros.
3106         (WebKit::WebPreferences::platformInitializeStore):
3107         * WebProcess/WebPage/WebPage.cpp: Ditto
3108         (WebKit::WebPage::updatePreferences):
3109
3110         * WebKit2.xcodeproj/project.pbxproj: Add the new files.
3111
3112 2016-04-18  Tim Horton  <timothy_horton@apple.com>
3113
3114         Swipe view gesture should be reversed in right-to-left contexts
3115         https://bugs.webkit.org/show_bug.cgi?id=156714
3116
3117         Reviewed by Anders Carlsson.
3118
3119         * UIProcess/API/gtk/PageClientImpl.h:
3120         * UIProcess/PageClient.h:
3121         * UIProcess/UserInterfaceLayoutDirection.h: Added.
3122         * UIProcess/WebPageProxy.cpp:
3123         (WebKit::WebPageProxy::userInterfaceLayoutDirection):
3124         * UIProcess/WebPageProxy.h:
3125         * UIProcess/ios/PageClientImplIOS.h:
3126         * UIProcess/ios/PageClientImplIOS.mm:
3127         (WebKit::PageClientImpl::userInterfaceLayoutDirection):
3128         * UIProcess/mac/PageClientImpl.h:
3129         * UIProcess/mac/PageClientImpl.mm:
3130         (WebKit::PageClientImpl::userInterfaceLayoutDirection):
3131         Plumb RTL-ness through to WebPageProxy.
3132         We look at the WK(Web)View's UI layout direction.
3133         For other platforms, we just assume LTR.
3134
3135         * UIProcess/mac/ViewGestureController.h:
3136         * UIProcess/mac/ViewGestureControllerMac.mm:
3137         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
3138         Decide which way to swipe (and which way to look for back-forward items)
3139         based on the WebPageProxy's reported RTLness.
3140
3141         (WebKit::ViewGestureController::isPhysicallySwipingLeft):
3142         "Back" means "swiping left" in LTR and "swiping right" in RTL.
3143
3144         (WebKit::ViewGestureController::trackSwipeGesture):
3145         (WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
3146         (WebKit::ViewGestureController::beginSwipeGesture):
3147         (WebKit::ViewGestureController::handleSwipeGesture):
3148         Make things that were equating "back" with "left" instead check isPhysicallySwipingLeft.
3149
3150 2016-04-18  Anders Carlsson  <andersca@apple.com>
3151
3152         Fix build with newer versions of clang.
3153         rdar://problem/25749769
3154
3155         * UIProcess/Cocoa/WebViewImpl.mm:
3156         * UIProcess/mac/WebPageProxyMac.mm:
3157         Forward declare some AppKit IPI.
3158
3159 2016-04-18  Tina Liu  <iting_liu@apple.com>
3160
3161         Implement functions to set plug-in load policies for private browsing mode
3162         https://bugs.webkit.org/show_bug.cgi?id=156540
3163
3164         Reviewed by Anders Carlsson.
3165
3166         This patch implements API and wrappers for clients to set policies to use when using
3167         private browsing. WebPlatformStrategies would return which policies to use depending
3168         on whether the page is in private browsing mode.
3169
3170         * Shared/WebProcessCreationParameters.h:
3171         Add a hash map for plug-in load policies for private browsing.
3172         * Shared/WebProcessCreationParameters.cpp:
3173         (WebKit::WebProcessCreationParameters::encode):
3174         (WebKit::WebProcessCreationParameters::decode):
3175
3176         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3177         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3178         (WKContextSetPrivateBrowsingPluginLoadClientPolicy):
3179         Add a wrapper.
3180
3181         * UIProcess/WebProcessPool.h:
3182         * UIProcess/WebProcessPool.cpp:
3183         (WebKit::WebProcessPool::createNewWebProcess):
3184         Set the WebProcessCreationParameters's pluginLoadClientPoliciesForPrivateBrowsing.
3185         (WebKit::WebProcessPool::setPluginLoadClientPolicyForBrowsingMode):
3186         A helper function that sets plug-in policies to the corresponding instance variable:
3187         m_pluginLoadClientPolicies for general browsing and m_pluginLoadClientPoliciesForPrivateBrowsing
3188         for private browsing. The logic is extracted from the original setPluginLoadClientPolicy.
3189         While we are here, get rid of the .contains() lookup as .get() will just return a
3190         constructed object if the key is not found.
3191         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
3192         Switch to use the helper function to set policies.
3193         (WebKit::WebProcessPool::setPrivateBrowsingPluginLoadClientPolicy):
3194         Ditto. Also send a message to the WebProcess for setting policies for private browsing.
3195         (WebKit::WebProcessPool::clearPluginClientPolicies):
3196         Clear plug-ins' private browsing policies.
3197
3198         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3199         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3200         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicyForBrowsingMode):
3201         Ditto as WebProcessPool::setPluginLoadClientPolicyForBrowsingMode.
3202         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
3203         Switch to use setPluginLoadClientPolicyForBrowsingMode to set policies.
3204         (WebKit::WebPlatformStrategies::setPrivateBrowsingPluginLoadClientPolicy):
3205         Use setPluginLoadClientPolicyForBrowsingMode to set policies for private browsing.
3206         (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
3207         Clear plug-ins' private browsing policies.
3208         (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
3209         Add an argument for private browsing. Read from the corresponding ivar.
3210         (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
3211         Ditto.
3212         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost): Deleted.
3213         Renamed this function as pluginLoadClientPolicyForHostForBrowsingMode.
3214         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHostForBrowsingMode):
3215         Ditto.
3216         (WebKit::WebPlatformStrategies::populatePluginCache):
3217         Get the plug-in load policies for a specific host based on the page's session status. If the page
3218         is using ephemeral session, use the private browsing policies.
3219
3220         * WebProcess/WebProcess.h:
3221         * WebProcess/WebProcess.cpp:
3222         (WebKit::WebProcess::initializeWebProcess):
3223         Switch to call the helper function setPluginLoadClientPolicyFromCreationParameters.
3224         (WebKit::WebProcess::setPluginLoadClientPolicies):
3225         Logic moved from initializeWebProcess. Call PluginStrategy::setPluginLoadClientPolicy or
3226         PluginStrategy::setPrivateBrowsingPluginLoadClientPolicy depending on the input argument.
3227         (WebKit::WebProcess::setPrivateBrowsingPluginLoadClientPolicy):
3228         Add a wrapper to call PluginStrategy::setPrivateBrowsingPluginLoadClientPolicy.
3229
3230         * WebProcess/WebProcess.messages.in:
3231         Declare an entry for setPrivateBrowsingPluginLoadClientPolicy.
3232
3233 2016-04-18  Chris Dumez  <cdumez@apple.com>
3234
3235         [WK2][iOS] Only adjust network responses' MIME type for QuickLook in the context of a main resource load
3236         https://bugs.webkit.org/show_bug.cgi?id=156639
3237         <rdar://problem/25765848>
3238
3239         Reviewed by Alex Christensen.
3240
3241         * NetworkProcess/NetworkDataTask.h:
3242         (WebKit::NetworkDataTask::firstRequest):
3243         Add getter to return the first request.
3244
3245         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3246         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
3247         Pass flag to adjustMIMETypeIfNecessary() indicated if this is a main resource load.
3248
3249 2016-04-18  Brian Burg  <bburg@apple.com>
3250
3251         Web Automation: provide detailed error messages when an automation command fails
3252         https://bugs.webkit.org/show_bug.cgi?id=156635
3253         <rdar://problem/25754051>
3254
3255         Reviewed by Darin Adler and Timothy Hatcher.
3256
3257         Fill in lots of missing error message details now that the remote end knows
3258         how to parse error strings with predefined error names and details.
3259
3260         * UIProcess/Automation/WebAutomationSession.cpp:
3261         Rearrange the error message macros. Make it possible to pass a ErrorMessage
3262         variable or just the enum value name and get out an encoded error message
3263         that optionally includes a free-form details string. The predefined error
3264         name and the details string are joined together with a semicolon.
3265
3266         (WebKit::WebAutomationSession::getBrowsingContext):
3267         (WebKit::WebAutomationSession::createBrowsingContext):
3268         (WebKit::WebAutomationSession::closeBrowsingContext):
3269         (WebKit::WebAutomationSession::switchToBrowsingContext):
3270         (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
3271         (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
3272         (WebKit::WebAutomationSession::navigateBrowsingContext):
3273         (WebKit::WebAutomationSession::goBackInBrowsingContext):
3274         (WebKit::WebAutomationSession::goForwardInBrowsingContext):
3275         (WebKit::WebAutomationSession::reloadBrowsingContext):
3276         (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
3277         (WebKit::WebAutomationSession::didEvaluateJavaScriptFunction):
3278         (WebKit::WebAutomationSession::resolveChildFrameHandle):
3279         (WebKit::WebAutomationSession::didResolveChildFrame):
3280         (WebKit::WebAutomationSession::resolveParentFrameHandle):
3281         (WebKit::WebAutomationSession::didResolveParentFrame):
3282         (WebKit::WebAutomationSession::computeElementLayout):
3283         (WebKit::WebAutomationSession::didComputeElementLayout):
3284         (WebKit::WebAutomationSession::isShowingJavaScriptDialog):
3285         (WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog):
3286         (WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog):
3287         (WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog):
3288         (WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt):
3289         (WebKit::WebAutomationSession::getAllCookies):
3290         (WebKit::WebAutomationSession::didGetCookiesForFrame):
3291         (WebKit::WebAutomationSession::deleteSingleCookie):
3292         (WebKit::WebAutomationSession::didDeleteCookie):
3293         (WebKit::WebAutomationSession::addSingleCookie):
3294         (WebKit::WebAutomationSession::deleteAllCookies):
3295         (WebKit::WebAutomationSession::performMouseInteraction):
3296         (WebKit::WebAutomationSession::performKeyboardInteractions):
3297         (WebKit::WebAutomationSession::takeScreenshot):
3298         (WebKit::WebAutomationSession::didTakeScreenshot):
3299         Audit almost all early exits and provide a relevant error details message
3300         if the error itself is ambiguous. Make sure to format asynchronous errors.
3301
3302 2016-04-18  Brent Fulgham  <bfulgham@apple.com>
3303
3304         CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
3305         https://bugs.webkit.org/show_bug.cgi?id=153151
3306         <rdar://problem/24383176>
3307
3308         Reviewed by Darin Adler.
3309
3310         Remove the unused dynamic favicon code and tests.
3311
3312         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3313         (WebKit::WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.
3314         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3315
3316 2016-04-18  Jer Noble  <jer.noble@apple.com>
3317
3318         REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext
3319         https://bugs.webkit.org/show_bug.cgi?id=156648
3320
3321         Reviewed by Darin Adler.
3322
3323         Follow up patch to r199615; avoid a double hash lookup by using a .find() pattern instead of
3324         .contains() & .get().
3325
3326         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
3327         (WebKit::WebPlaybackSessionManager::setUpPlaybackControlsManager):
3328         (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):
3329
3330 2016-04-18  Chris Dumez  <cdumez@apple.com>
3331
3332         Unreviewed, rolling out r199644.
3333
3334         Seems to have caused a 1-2% regression on warm PLT
3335
3336         Reverted changeset:
3337
3338         "[WK2][iOS] Do not dlopen() QuickLook in the NetworkProcess"
3339         https://bugs.webkit.org/show_bug.cgi?id=156639
3340         http://trac.webkit.org/changeset/199644
3341
3342 2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3343
3344         Pending API Request URL is wrong after reloading
3345         https://bugs.webkit.org/show_bug.cgi?id=139342
3346
3347         Reviewed by Darin Adler.
3348
3349         It happens when reloading a web view loaded with anything but a
3350         URL, because the bf list is not updated for those cases and
3351         WebPageProxy::reload() is setting the current bf list item URL as
3352         pending API request URL. This also causes that progress is
3353         reported wrongly, because
3354         WebPageProxy::decidePolicyForNavigationAction() resets the pending
3355         API request URL when it's different than the requested URL. The
3356         page load transaction causes the progress to be changed, reporting
3357         1.0 (the previous one), but later something < 1.0 is reported
3358         again by the progress tracker.
3359
3360         * UIProcess/WebPageProxy.cpp:
3361         (WebKit::WebPageProxy::reload): Use the current active URL as
3362         pending API request URL, falling back to the current bf list item
3363         URL when empty.
3364
3365 2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3366
3367         Pending API request URL no set when loading Data, Alternate HTML or plain text
3368         https://bugs.webkit.org/show_bug.cgi?id=136916
3369
3370         Reviewed by Darin Adler.
3371
3372         Set pending API request URL for all load methods in
3373         WebPageProxy. This ensures that right after calling those methods,
3374         the active URL is the requested one and that
3375         PageLoadState::isLoading() returns true.
3376
3377         * UIProcess/WebPageProxy.cpp:
3378         (WebKit::WebPageProxy::loadAlternateHTMLString):
3379         (WebKit::WebPageProxy::loadPlainTextString):
3380         (WebKit::WebPageProxy::loadWebArchiveData):
3381
3382 2016-04-18  Commit Queue  <commit-queue@webkit.org>
3383
3384         Unreviewed, rolling out r199660.
3385         https://bugs.webkit.org/show_bug.cgi?id=156691
3386
3387         It broke the iOS build (Requested by KaL on #webkit).
3388
3389         Reverted changeset:
3390
3391         "Pending API request URL no set when loading Data, Alternate
3392         HTML or plain text"
3393         https://bugs.webkit.org/show_bug.cgi?id=136916
3394         http://trac.webkit.org/changeset/199660
3395
3396 2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3397
3398         Pending API request URL no set when loading Data, Alternate HTML or plain text
3399         https://bugs.webkit.org/show_bug.cgi?id=136916
3400
3401         Reviewed by Darin Adler.
3402
3403         Set pending API request URL for all load methods in
3404         WebPageProxy. This ensures that right after calling those methods,
3405         the active URL is the requested one and that
3406         PageLoadState::isLoading() returns true.
3407
3408         * UIProcess/WebPageProxy.cpp:
3409         (WebKit::WebPageProxy::loadAlternateHTMLString):
3410         (WebKit::WebPageProxy::loadPlainTextString):
3411         (WebKit::WebPageProxy::loadWebArchiveData):
3412
3413 2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3414
3415         [UNIX] Initialize WebKit before the platform initializations
3416         https://bugs.webkit.org/show_bug.cgi?id=156622
3417
3418         Reviewed by Michael Catanzaro.
3419
3420         The platform specific initialization might use something that would require WebKit2 to be initialized. For
3421         example, in debug mode, the GTK+ port uses WTF::sleep that requires the threading to be initialized.
3422
3423         * Shared/unix/ChildProcessMain.h:
3424         (WebKit::ChildProcessMain): Move InitializeWebKit2() before platformInitialize().
3425
3426 2016-04-18  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>
3427
3428         Fix incorrect assumption that APPLE implies Mac.
3429         https://bugs.webkit.org/show_bug.cgi?id=156679
3430
3431         Addresses build failure introduced in r198947
3432
3433         Reviewed by Alex Christensen.
3434
3435         * CMakeLists.txt:
3436
3437 2016-04-17  Yoav Weiss  <yoav@yoav.ws>
3438
3439         Initial Link preload support
3440         https://bugs.webkit.org/show_bug.cgi?id=156334
3441
3442         Reviewed by Darin Adler.
3443
3444         * WebProcess/Network/WebLoaderStrategy.cpp:
3445         (WebKit::maximumBufferingTime): Added LinkPreload as a possible CachedResource::type.
3446
3447 2016-04-17  Chris Dumez  <cdumez@apple.com>
3448
3449         [WK2][iOS] Do not dlopen() QuickLook in the NetworkProcess
3450         https://bugs.webkit.org/show_bug.cgi?id=156639
3451
3452         Reviewed by Darin Adler.
3453
3454         * WebProcess/Network/WebResourceLoader.cpp:
3455         (WebKit::WebResourceLoader::didReceiveResponse):
3456         Move checks for main resource load and for MIME type inside of
3457         QuickLookHandle::createIfNecessary(), for consistency with the
3458         other QuickLookHandle factory functions.
3459
3460 2016-04-16  Dan Bernstein  <mitz@apple.com>
3461
3462         [Mac] Web Content service with a restricted entitlement may load arbitrary dylibs
3463         https://bugs.webkit.org/show_bug.cgi?id=156668
3464         <rdar://problem/25429784>
3465
3466         Reviewed by Anders Carlsson.
3467
3468         * Configurations/WebContentService.xcconfig: Enable library validation when the Web Content
3469           service is given the XPC domain extension entitlement.
3470
3471 2016-04-15  Dan Bernstein  <mitz@apple.com>
3472
3473         [Mac] WebContent, Networking and Databases services have i386 slices that are never used
3474         https://bugs.webkit.org/show_bug.cgi?id=156654