/
ChangeLog
20144 lines (15689 loc) · 918 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2016-04-22 Anders Carlsson <andersca@apple.com>
WKWebView WebSQL is not enabled
https://bugs.webkit.org/show_bug.cgi?id=156928
rdar://problem/19029603
Reviewed by Beth Dakin.
Give databases a default quota of 50 MB, matching what we have in UIWebView.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
2016-04-22 Ryan Haddad <ryanhaddad@apple.com>
Fix builds that do not support AVKit
Unreviewed build fix.
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::viewDidLeaveWindow):
* UIProcess/ios/WebPageProxyIOS.mm:
2016-04-22 Brady Eidson <beidson@apple.com>
Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy.
https://bugs.webkit.org/show_bug.cgi?id=156916
Reviewed by Tim Horton.
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
2016-04-22 Zan Dobersek <zdobersek@igalia.com>
NetworkCacheIOChannelSoup: detach the newly-created IOChannel::readSync thread
https://bugs.webkit.org/show_bug.cgi?id=156907
Reviewed by Carlos Garcia Campos.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::readSyncInThread): Detach the new thread,
ensuring the resources are released after the thread exits. Next step is
to set up a thread pool and use that, avoiding thread re-creation.
2016-04-21 Dean Jackson <dino@apple.com>
Backdrop Filter should not be visible if element has visibility:hidden
https://bugs.webkit.org/show_bug.cgi?id=149318
<rdar://problem/22749780>
Reviewed by Simon Fraser.
Add the isHidden method to PlatformCALayerRemote.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::isHidden):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2016-04-21 Anders Carlsson <andersca@apple.com>
WKWebView HTML5 AppCache not working
https://bugs.webkit.org/show_bug.cgi?id=156887
rdar://problem/17944162
Reviewed by Tim Horton.
* Shared/WebPreferencesDefinitions.h:
Set the offlineWebApplicationCacheEnabled property to true by default.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Set the default applicationCacheFlatFileSubdirectoryName to "Files".
2016-04-21 Anders Carlsson <andersca@apple.com>
Get rid of the last uses of ApplicationCacheStorage::singleton() from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=156876
Reviewed by Tim Horton.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Add and encode and decode a applicationCacheFlatFileSubdirectoryName.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
Set m_applicationCacheFlatFileSubdirectoryName to "ApplicationCache".
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
Set m_applicationCacheFlatFileSubdirectoryName to "Files".
(API::ProcessPoolConfiguration::copy):
Copy m_applicationCacheFlatFileSubdirectoryName.
* UIProcess/API/APIProcessPoolConfiguration.h:
Add getter for applicationCacheFlatFileSubdirectoryName.
* UIProcess/WebProcessPool.cpp:
(WebKit::legacyWebsiteDataStoreConfiguration):
Initialize applicationCacheFlatFileSubdirectoryName from the process pool configuration.
(WebKit::WebProcessPool::createNewWebProcess):
Initialize parameters.applicationCacheFlatFileSubdirectoryName. Remove a call to
ApplicationCacheStorage::singleton().setDefaultOriginQuota since it had no effect (it was called in the UI process).
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
Initialize m_applicationCacheFlatFileSubdirectoryName.
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
Pass m_applicationCacheFlatFileSubdirectoryName when creating the application cache storage.
* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new members.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Set the application cache storage.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Initialize the application cache storage.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::applicationCacheStorage):
Add new getter.
2016-04-21 Anders Carlsson <andersca@apple.com>
Remove two uses of ApplicationCacheStorage::singleton() from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=156873
Reviewed by Beth Dakin.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearApplicationCache): Deleted.
* WebProcess/WebProcess.h:
2016-04-21 Beth Dakin <bdakin@apple.com>
showCandidates() should take a range and the string should be the whole
paragraph
https://bugs.webkit.org/show_bug.cgi?id=156813
-and corresponding-
rdar://problem/25760533
Reviewed by Tim Horton.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateWebViewImplAdditions):
(WebKit::WebViewImpl::showCandidates):
(WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
(WebKit::WebViewImpl::handleRequestedCandidates):
2016-04-21 Chelsea Pugh <cpugh@apple.com>
[iOS] Allow clients to hide the accessory view on a form input session
https://bugs.webkit.org/show_bug.cgi?id=155574
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/_WKFormInputSession.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFormInputSession accessoryViewShouldNotShow]): Getter for accessoryViewShouldNotShow.
(-[WKFormInputSession setAccessoryViewShouldNotShow:]): Set accessoryViewShouldNotShow and reload input views.
(-[WKContentView requiresAccessoryView]): If the accessory view should be not be shown, do not require
the accessory view.
2016-04-21 Chris Dumez <cdumez@apple.com>
Drop [UsePointersEvenForNonNullableObjectArguments] from Range
https://bugs.webkit.org/show_bug.cgi?id=156805
Reviewed by Youenn Fablet.
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange setStart:offset:]):
(-[WKDOMRange setEnd:offset:]):
(-[WKDOMRange selectNode:]):
(-[WKDOMRange selectNodeContents:]):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::contentsAsString):
2016-04-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitWebView should claim the contents size as its natural size
https://bugs.webkit.org/show_bug.cgi?id=156835
Reviewed by Žan Doberšek.
And keep claiming 0 as its minimum size since it's scrollable.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeContentSize): Call webkitWebViewBaseSetContentsSize().
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseGetPreferredWidth): Return the contents width as natural width.
(webkitWebViewBaseGetPreferredHeight): Return the contents height as natural height.
(webkit_web_view_base_class_init): Add implementations of get_preferred_width/height.
(webkitWebViewBaseSetContentsSize): Save the contents size.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2016-04-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitWebView should propagate wheel events not handled by the web process
https://bugs.webkit.org/show_bug.cgi?id=156834
Reviewed by Žan Doberšek.
We are currently swallowing all wheel events unconditionally, not allowing applications to handle wheel events
when not handled by us. Since the GTK+ event propagation system is synchronous, and our events are handled
asynchronously, we need to do something similar to what we do for key events, not propagate the event the first
time and if not handled by the web process, re-inject it in the event loop and then just propagate it.
* Shared/NativeWebWheelEvent.h:
(WebKit::NativeWebWheelEvent::nativeEvent): Remove useless const.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Tell the web view to propagate the next wheel event,
and re-inject the event not handled by the web process in the event loop.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseScrollEvent): Propagate the event if shouldForwardNextWheelEvent is true.
(webkitWebViewBaseForwardNextWheelEvent): Set shouldForwardNextWheelEvent to true.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent): Remove ifdef.
* UIProcess/efl/WebView.h:
2016-04-20 Dustin Falgout <dustin@falgout.us>
[GTK] Expose AllowUniversalAccessFromFileURLs preference now that calling localStorage.getItem() results in SecurityError: DOM Exception 18
Reviewed by Michael Catanzaro.
As of r197858 JavaScript loaded in the context of a file scheme url cannot access local storage. That is a major
breaking change as many applications that serve files locally rely on having access to local storage. The point
of that security fix is to avoid cases of downloaded HTML content (such as e-mail attachments or JS injected
into local contexts) from having access to your local file system and arbitrary local storage. If you are serving
local files in your applications, you can use the WebKitAllowUniversalAccessFromFileURLs preference key to tell
Webkit that you are approve of these kinds of interactions.
https://bugs.webkit.org/show_bug.cgi?id=156651
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_allow_universal_access_from_file_urls):
(webkit_settings_set_allow_universal_access_from_file_urls):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2016-04-20 Brady Eidson <beidson@apple.com>
Modern IDB (Workers): Enable INDEXED_DATABASE_IN_WORKERS compile time flag, but disabled in RuntimeEnabledFeatures.
https://bugs.webkit.org/show_bug.cgi?id=156782
Reviewed by Alex Christensen.
* Configurations/FeatureDefines.xcconfig:
2016-04-20 Brent Fulgham <bfulgham@apple.com>
[WK2][Mac][iOS] WebContent crash when using special file:// URI scheme @ WebKit::resolveSymlinksInPath(WTF::CString const&) + 159
https://bugs.webkit.org/show_bug.cgi?id=156747
<rdar://problem/24648176>
Reviewed by Alexey Proskuryakov.
FileSystemCF::fileSystemRepresentation return a null string when presented with a file URL that contains embedded nulls. When
this happens, SandboxExtension::createHandle attempts to pass a null string to 'resolveSymlinksInPath', which attemps to call
'strrchr' on the null pointer, causing a crash.
Test: fast/url/file-uri-with-embedded-null-no-crash.html
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::createHandle): If 'fileSystemRepresentation' is null, return early with an error.
2016-04-19 Alex Christensen <achristensen@webkit.org>
Fix CMake build.
* CMakeLists.txt:
Don't compile a file that doesn't exist.
* PlatformMac.cmake:
Put the XPCServices in the right place.
2016-04-19 Chris Dumez <cdumez@apple.com>
Crash under WebKit::PluginView::pluginSnapshotTimerFired
https://bugs.webkit.org/show_bug.cgi?id=156754
<rdar://problem/22566764>
Reviewed by Beth Dakin.
Add null check for frame() before trying to access the frame settings,
similarly to what is done earlier in this function. This fixes a top
crasher.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginSnapshotTimerFired):
2016-04-19 Dean Jackson <dino@apple.com>
New SPI to export a dictionary of runtime features
https://bugs.webkit.org/show_bug.cgi?id=156645
<rdar://problem/23621666>
Reviewed by Anders Carlsson.
Mark the new SPI as WK_MAC_TBA, WK_IOS_TBA.
* UIProcess/API/Cocoa/_WKExperimentalFeature.h:
2016-04-19 Dean Jackson <dino@apple.com>
New SPI to export a dictionary of runtime features
https://bugs.webkit.org/show_bug.cgi?id=156645
<rdar://problem/23621666>
Post commit follow-up. Darin gave review comments that
I didn't address in my original commit - I was waiting
on some advice.
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::isEnabledForFeature): Change the macro
to generate a static list of function pointers, rather than
a lot of conditional statements.
(WebKit::WebPreferences::setEnabledForFeature): Ditto.
2016-04-19 Chris Dumez <cdumez@apple.com>
Mark more classes as WTF_MAKE_FAST_ALLOCATED
https://bugs.webkit.org/show_bug.cgi?id=156732
Reviewed by Darin Adler.
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
* Shared/API/Cocoa/RemoteObjectInvocation.h:
2016-04-19 Alex Christensen <achristensen@webkit.org>
Build fix.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob):
result is unused.
2016-04-19 Brady Eidson <beidson@apple.com>
Modern IDB: ObjectStore Blob Support.
https://bugs.webkit.org/show_bug.cgi?id=143193
Reviewed by Alex Christensen.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob): Don't ASSERT that
this is the first we've heard of this path - The Connection now remembers all extensions.
(WebKit::NetworkConnectionToWebProcess::getBlobDataFileReferenceForPath): Don't take - Just get.
2016-04-19 Antti Koivisto <antti@apple.com>
Try to fix iOS build.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2016-04-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r199658.
https://bugs.webkit.org/show_bug.cgi?id=156736
It broke all EFL layout tests (Requested by KaL on #webkit).
Reverted changeset:
"[UNIX] Initialize WebKit before the platform initializations"
https://bugs.webkit.org/show_bug.cgi?id=156622
http://trac.webkit.org/changeset/199658
2016-04-18 Alex Christensen <achristensen@webkit.org>
Build fix after r199700
* PlatformMac.cmake:
2016-04-18 Brady Eidson <beidson@apple.com>
Modern IDB (Blob support): When reading Blobs from the database, grant the Networking process sandbox access to the files.
https://bugs.webkit.org/show_bug.cgi?id=156640
Reviewed by Alex Christensen.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::getSandboxExtensionsForBlobFiles): Utility function to ask the UI process for
SandboxExtensions for a list of files.
(WebKit::DatabaseProcess::didGetSandboxExtensionsForBlobFiles): Take the SandboxExtensions from the UI process
and pass them along to the completion handler.
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseProcess.messages.in:
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::didGetRecord): If the value returned from the database doesn't have Blob files,
pass the result directly on to WebCore. If it does, ask the UI process for SandboxExtensions first.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked): Grab the BlobDataFileReference from the
NetworkConnectionToWebProcess to pass along to the BlobRegistry.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob): Add this message
so the WebProcess can preflight the creation of some blob URLs by passing along the SandboxExtensions for their files.
(WebKit::NetworkConnectionToWebProcess::takeBlobDataFileReferenceForPath):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::getSandboxExtensionsForBlobFiles): Create SandboxExtensions for the passed in files and
return them to the DatabaseProcess.
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.messages.in:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::didGetRecordWithSandboxExtensions): New form of "didGetRecord" that handles passing
the SandboxExtensions to the Networking process before they are needed.
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
* WebProcess/FileAPI/BlobRegistryProxy.h:
2016-04-18 Dean Jackson <dino@apple.com>
New SPI to export a dictionary of runtime features
https://bugs.webkit.org/show_bug.cgi?id=156645
<rdar://problem/23621666>
Trying to fix GTK and EFL builds. I forgot to add files
to CMake.
* CMakeLists.txt:
* PlatformMac.cmake:
2016-04-18 Dean Jackson <dino@apple.com>
New SPI to export a dictionary of runtime features
https://bugs.webkit.org/show_bug.cgi?id=156645
<rdar://problem/23621666>
Reviewed by Darin Adler.
Add a new type of Preference for experimental features so that we
can dynamically toggle them from a WebKit2 host. These are special
keys that are tied to runtime flags. The host process can ask WebKit
for the list of keys, each with a small description, in order to
display UI.
- Add HumanReadableName and HumanReadableDescription parameters to our
macros, which are used when building a ExperimentalFeature.
These are both empty strings for the existing preferences. At some
point we should probably move all this to code generation rather
than macros, so that we don't have to carry around unused parameters.
- I've included two sample experimental features: WebGL2 and ShadowDOM.
They are not actually hooked up to the runtime settings yet, but its
pretty clear how that will happen. Note that these are new preferences
that have an "Experimental" prefix. This is so toggling an experimental
feature to off won't cause the feature to not work once it becomes
stable enough to enable by default. In other words, when it moves
out of the experimental stage, the experimental feature flag will be
removed, and you'll no longer check for values with that key.
- The ExperimentalFeature object is what the host process
will read in order to show some UI. It contains the human readable info,
as well as the actual key that can be used to query and toggle the
experimental feature.
* Shared/API/APIObject.h: Add the ExperimentalFeature.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject): Exposes a wrapper around a _WKExperimentalFeature ObjC type.
* Shared/WebPreferencesDefinitions.h: Change all the existing macros to take the new
parameters, and add the initial experimental keys.
* Shared/WebPreferencesKeys.cpp: Add new parameters to existing macros.
* Shared/WebPreferencesKeys.h: Ditto.
* Shared/WebPreferencesStore.cpp: Ditto.
(WebKit::defaults):
* UIProcess/API/APIExperimentalFeature.cpp: The API side of the ExperimentalFeature.
(API::ExperimentalFeature::create):
(API::ExperimentalFeature::ExperimentalFeature):
(API::ExperimentalFeature::~ExperimentalFeature):
* UIProcess/API/APIExperimentalFeature.h:
* UIProcess/API/Cocoa/WKPreferences.mm: The actual implementation of the SPI.
(+[WKPreferences _experimentalFeatures]): Create and return a list of feature descriptors.
(-[WKPreferences _isEnabledForFeature:]): Get the value.
(-[WKPreferences _setEnabled:forFeature:]): Set the value.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/_WKExperimentalFeature.h: The ObjC version.
* UIProcess/API/Cocoa/_WKExperimentalFeature.mm:
(-[_WKExperimentalFeature dealloc]):
(-[_WKExperimentalFeature description]):
(-[_WKExperimentalFeature name]):
(-[_WKExperimentalFeature key]):
(-[_WKExperimentalFeature details]):
(-[_WKExperimentalFeature _apiObject]):
* UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h: Implementation of the wrapper.
(WebKit::wrapper):
* UIProcess/WebPreferences.cpp: The C++ implementation that provides the data for the ObjC API.
(WebKit::globalExperimentalFeatures):
(WebKit::WebPreferences::ExperimentalFeatures):
(WebKit::WebPreferences::isEnabledForFeature):
(WebKit::WebPreferences::setEnabledForFeature):
* UIProcess/WebPreferences.h:
* UIProcess/mac/WebPreferencesMac.mm: Update some macros.
(WebKit::WebPreferences::platformInitializeStore):
* WebProcess/WebPage/WebPage.cpp: Ditto
(WebKit::WebPage::updatePreferences):
* WebKit2.xcodeproj/project.pbxproj: Add the new files.
2016-04-18 Tim Horton <timothy_horton@apple.com>
Swipe view gesture should be reversed in right-to-left contexts
https://bugs.webkit.org/show_bug.cgi?id=156714
Reviewed by Anders Carlsson.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/PageClient.h:
* UIProcess/UserInterfaceLayoutDirection.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::userInterfaceLayoutDirection):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::userInterfaceLayoutDirection):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::userInterfaceLayoutDirection):
Plumb RTL-ness through to WebPageProxy.
We look at the WK(Web)View's UI layout direction.
For other platforms, we just assume LTR.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
Decide which way to swipe (and which way to look for back-forward items)
based on the WebPageProxy's reported RTLness.
(WebKit::ViewGestureController::isPhysicallySwipingLeft):
"Back" means "swiping left" in LTR and "swiping right" in RTL.
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::handleSwipeGesture):
Make things that were equating "back" with "left" instead check isPhysicallySwipingLeft.
2016-04-18 Anders Carlsson <andersca@apple.com>
Fix build with newer versions of clang.
rdar://problem/25749769
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/mac/WebPageProxyMac.mm:
Forward declare some AppKit IPI.
2016-04-18 Tina Liu <iting_liu@apple.com>
Implement functions to set plug-in load policies for private browsing mode
https://bugs.webkit.org/show_bug.cgi?id=156540
Reviewed by Anders Carlsson.
This patch implements API and wrappers for clients to set policies to use when using
private browsing. WebPlatformStrategies would return which policies to use depending
on whether the page is in private browsing mode.
* Shared/WebProcessCreationParameters.h:
Add a hash map for plug-in load policies for private browsing.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextSetPrivateBrowsingPluginLoadClientPolicy):
Add a wrapper.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
Set the WebProcessCreationParameters's pluginLoadClientPoliciesForPrivateBrowsing.
(WebKit::WebProcessPool::setPluginLoadClientPolicyForBrowsingMode):
A helper function that sets plug-in policies to the corresponding instance variable:
m_pluginLoadClientPolicies for general browsing and m_pluginLoadClientPoliciesForPrivateBrowsing
for private browsing. The logic is extracted from the original setPluginLoadClientPolicy.
While we are here, get rid of the .contains() lookup as .get() will just return a
constructed object if the key is not found.
(WebKit::WebProcessPool::setPluginLoadClientPolicy):
Switch to use the helper function to set policies.
(WebKit::WebProcessPool::setPrivateBrowsingPluginLoadClientPolicy):
Ditto. Also send a message to the WebProcess for setting policies for private browsing.
(WebKit::WebProcessPool::clearPluginClientPolicies):
Clear plug-ins' private browsing policies.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::setPluginLoadClientPolicyForBrowsingMode):
Ditto as WebProcessPool::setPluginLoadClientPolicyForBrowsingMode.
(WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
Switch to use setPluginLoadClientPolicyForBrowsingMode to set policies.
(WebKit::WebPlatformStrategies::setPrivateBrowsingPluginLoadClientPolicy):
Use setPluginLoadClientPolicyForBrowsingMode to set policies for private browsing.
(WebKit::WebPlatformStrategies::clearPluginClientPolicies):
Clear plug-ins' private browsing policies.
(WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
Add an argument for private browsing. Read from the corresponding ivar.
(WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
Ditto.
(WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost): Deleted.
Renamed this function as pluginLoadClientPolicyForHostForBrowsingMode.
(WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHostForBrowsingMode):
Ditto.
(WebKit::WebPlatformStrategies::populatePluginCache):
Get the plug-in load policies for a specific host based on the page's session status. If the page
is using ephemeral session, use the private browsing policies.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Switch to call the helper function setPluginLoadClientPolicyFromCreationParameters.
(WebKit::WebProcess::setPluginLoadClientPolicies):
Logic moved from initializeWebProcess. Call PluginStrategy::setPluginLoadClientPolicy or
PluginStrategy::setPrivateBrowsingPluginLoadClientPolicy depending on the input argument.
(WebKit::WebProcess::setPrivateBrowsingPluginLoadClientPolicy):
Add a wrapper to call PluginStrategy::setPrivateBrowsingPluginLoadClientPolicy.
* WebProcess/WebProcess.messages.in:
Declare an entry for setPrivateBrowsingPluginLoadClientPolicy.
2016-04-18 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Only adjust network responses' MIME type for QuickLook in the context of a main resource load
https://bugs.webkit.org/show_bug.cgi?id=156639
<rdar://problem/25765848>
Reviewed by Alex Christensen.
* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::firstRequest):
Add getter to return the first request.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Pass flag to adjustMIMETypeIfNecessary() indicated if this is a main resource load.
2016-04-18 Brian Burg <bburg@apple.com>
Web Automation: provide detailed error messages when an automation command fails
https://bugs.webkit.org/show_bug.cgi?id=156635
<rdar://problem/25754051>
Reviewed by Darin Adler and Timothy Hatcher.
Fill in lots of missing error message details now that the remote end knows
how to parse error strings with predefined error names and details.
* UIProcess/Automation/WebAutomationSession.cpp:
Rearrange the error message macros. Make it possible to pass a ErrorMessage
variable or just the enum value name and get out an encoded error message
that optionally includes a free-form details string. The predefined error
name and the details string are joined together with a semicolon.
(WebKit::WebAutomationSession::getBrowsingContext):
(WebKit::WebAutomationSession::createBrowsingContext):
(WebKit::WebAutomationSession::closeBrowsingContext):
(WebKit::WebAutomationSession::switchToBrowsingContext):
(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
(WebKit::WebAutomationSession::navigateBrowsingContext):
(WebKit::WebAutomationSession::goBackInBrowsingContext):
(WebKit::WebAutomationSession::goForwardInBrowsingContext):
(WebKit::WebAutomationSession::reloadBrowsingContext):
(WebKit::WebAutomationSession::evaluateJavaScriptFunction):
(WebKit::WebAutomationSession::didEvaluateJavaScriptFunction):
(WebKit::WebAutomationSession::resolveChildFrameHandle):
(WebKit::WebAutomationSession::didResolveChildFrame):
(WebKit::WebAutomationSession::resolveParentFrameHandle):
(WebKit::WebAutomationSession::didResolveParentFrame):
(WebKit::WebAutomationSession::computeElementLayout):
(WebKit::WebAutomationSession::didComputeElementLayout):
(WebKit::WebAutomationSession::isShowingJavaScriptDialog):
(WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog):
(WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog):
(WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog):
(WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt):
(WebKit::WebAutomationSession::getAllCookies):
(WebKit::WebAutomationSession::didGetCookiesForFrame):
(WebKit::WebAutomationSession::deleteSingleCookie):
(WebKit::WebAutomationSession::didDeleteCookie):
(WebKit::WebAutomationSession::addSingleCookie):
(WebKit::WebAutomationSession::deleteAllCookies):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):
(WebKit::WebAutomationSession::takeScreenshot):
(WebKit::WebAutomationSession::didTakeScreenshot):
Audit almost all early exits and provide a relevant error details message
if the error itself is ambiguous. Make sure to format asynchronous errors.
2016-04-18 Brent Fulgham <bfulgham@apple.com>
CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
https://bugs.webkit.org/show_bug.cgi?id=153151
<rdar://problem/24383176>
Reviewed by Darin Adler.
Remove the unused dynamic favicon code and tests.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2016-04-18 Jer Noble <jer.noble@apple.com>
REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext
https://bugs.webkit.org/show_bug.cgi?id=156648
Reviewed by Darin Adler.
Follow up patch to r199615; avoid a double hash lookup by using a .find() pattern instead of
.contains() & .get().
* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionManager::setUpPlaybackControlsManager):
(WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):
2016-04-18 Chris Dumez <cdumez@apple.com>
Unreviewed, rolling out r199644.
Seems to have caused a 1-2% regression on warm PLT
Reverted changeset:
"[WK2][iOS] Do not dlopen() QuickLook in the NetworkProcess"
https://bugs.webkit.org/show_bug.cgi?id=156639
http://trac.webkit.org/changeset/199644
2016-04-18 Carlos Garcia Campos <cgarcia@igalia.com>
Pending API Request URL is wrong after reloading
https://bugs.webkit.org/show_bug.cgi?id=139342
Reviewed by Darin Adler.
It happens when reloading a web view loaded with anything but a
URL, because the bf list is not updated for those cases and
WebPageProxy::reload() is setting the current bf list item URL as
pending API request URL. This also causes that progress is
reported wrongly, because
WebPageProxy::decidePolicyForNavigationAction() resets the pending
API request URL when it's different than the requested URL. The
page load transaction causes the progress to be changed, reporting
1.0 (the previous one), but later something < 1.0 is reported
again by the progress tracker.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reload): Use the current active URL as
pending API request URL, falling back to the current bf list item
URL when empty.
2016-04-18 Carlos Garcia Campos <cgarcia@igalia.com>
Pending API request URL no set when loading Data, Alternate HTML or plain text
https://bugs.webkit.org/show_bug.cgi?id=136916
Reviewed by Darin Adler.
Set pending API request URL for all load methods in
WebPageProxy. This ensures that right after calling those methods,
the active URL is the requested one and that
PageLoadState::isLoading() returns true.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::loadPlainTextString):
(WebKit::WebPageProxy::loadWebArchiveData):
2016-04-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r199660.
https://bugs.webkit.org/show_bug.cgi?id=156691
It broke the iOS build (Requested by KaL on #webkit).
Reverted changeset:
"Pending API request URL no set when loading Data, Alternate
HTML or plain text"
https://bugs.webkit.org/show_bug.cgi?id=136916
http://trac.webkit.org/changeset/199660
2016-04-18 Carlos Garcia Campos <cgarcia@igalia.com>
Pending API request URL no set when loading Data, Alternate HTML or plain text
https://bugs.webkit.org/show_bug.cgi?id=136916
Reviewed by Darin Adler.
Set pending API request URL for all load methods in
WebPageProxy. This ensures that right after calling those methods,
the active URL is the requested one and that
PageLoadState::isLoading() returns true.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::loadPlainTextString):
(WebKit::WebPageProxy::loadWebArchiveData):
2016-04-18 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] Initialize WebKit before the platform initializations
https://bugs.webkit.org/show_bug.cgi?id=156622
Reviewed by Michael Catanzaro.
The platform specific initialization might use something that would require WebKit2 to be initialized. For
example, in debug mode, the GTK+ port uses WTF::sleep that requires the threading to be initialized.
* Shared/unix/ChildProcessMain.h:
(WebKit::ChildProcessMain): Move InitializeWebKit2() before platformInitialize().
2016-04-18 Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Fix incorrect assumption that APPLE implies Mac.
https://bugs.webkit.org/show_bug.cgi?id=156679
Addresses build failure introduced in r198947
Reviewed by Alex Christensen.
* CMakeLists.txt:
2016-04-17 Yoav Weiss <yoav@yoav.ws>
Initial Link preload support
https://bugs.webkit.org/show_bug.cgi?id=156334
Reviewed by Darin Adler.
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::maximumBufferingTime): Added LinkPreload as a possible CachedResource::type.
2016-04-17 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Do not dlopen() QuickLook in the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=156639
Reviewed by Darin Adler.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
Move checks for main resource load and for MIME type inside of
QuickLookHandle::createIfNecessary(), for consistency with the
other QuickLookHandle factory functions.
2016-04-16 Dan Bernstein <mitz@apple.com>
[Mac] Web Content service with a restricted entitlement may load arbitrary dylibs
https://bugs.webkit.org/show_bug.cgi?id=156668
<rdar://problem/25429784>
Reviewed by Anders Carlsson.
* Configurations/WebContentService.xcconfig: Enable library validation when the Web Content
service is given the XPC domain extension entitlement.
2016-04-15 Dan Bernstein <mitz@apple.com>
[Mac] WebContent, Networking and Databases services have i386 slices that are never used
https://bugs.webkit.org/show_bug.cgi?id=156654
Reviewed by Alexey Proskuryakov.
* Configurations/BaseXPCService.xcconfig: Set VALID_ARCHS to ARCHS_STANDARD when not building only
for the active architecture.
* Configurations/PluginService.32.xcconfig: Removed now-redundant definitions.
* Configurations/PluginService.64.xcconfig: Ditto.
2016-04-15 Sam Weinig <sam@webkit.org>
Need a way to specify a script name to show in the inspector for scripts injected via WKUserScript
<rdar://problem/25626662>
https://bugs.webkit.org/show_bug.cgi?id=156653
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
* UIProcess/API/Cocoa/WKUserScriptPrivate.h:
Add a new initializer that takes an associate URL that is used to represent the user script.
2016-04-15 Darin Adler <darin@apple.com>
Reduce use of Deprecated::ScriptXXX classes
https://bugs.webkit.org/show_bug.cgi?id=156632
Reviewed by Alex Christensen.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest): Use JSValue.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::windowObjectCleared): Use references.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame): Use JSValue.
2016-04-15 Jer Noble <jer.noble@apple.com>
REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext
https://bugs.webkit.org/show_bug.cgi?id=156648
<rdar://problem/25758117>
Reviewed by Beth Dakin.
Mistakenly checked in a reversed condition check, which causes a subsequent assert and crash.
* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):
2016-04-15 Chris Dumez <cdumez@apple.com>
Mark NetworkLoad as FastAllocated
https://bugs.webkit.org/show_bug.cgi?id=156628
Reviewed by Alex Christensen.
Mark NetworkLoad as FastAllocated for performance.
* NetworkProcess/NetworkLoad.h:
2016-04-14 Jer Noble <jer.noble@apple.com>
Allow WebVideoFullscreenManager and Proxy to be used by audio elements.
https://bugs.webkit.org/show_bug.cgi?id=156564
Reviewed by Beth Dakin.
Tease apart WebVideoFullscreenManager and …Proxy into WebPlaybackSessionManager and …Proxy
classes dealing exclusively with playback state and commands, leaving fullscreen state and
commands in the WebVideoFullscreenManager… classes.
WebVideoFullscreenManager and …Proxy will now require an associated
WebPlaybackSessionManager and …Proxy class. The WebPlaybackSessionManager classes can be
used separately and without the WebVideoFullscreenManager classes.
* DerivedSources.make:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h: Copied from Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h.
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in: Copied from Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in.
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm: Added.
(WebKit::WebPlaybackSessionModelContext::play):
(WebKit::WebPlaybackSessionModelContext::pause):
(WebKit::WebPlaybackSessionModelContext::togglePlayState):
(WebKit::WebPlaybackSessionModelContext::beginScrubbing):
(WebKit::WebPlaybackSessionModelContext::endScrubbing):
(WebKit::WebPlaybackSessionModelContext::seekToTime):
(WebKit::WebPlaybackSessionModelContext::fastSeek):
(WebKit::WebPlaybackSessionModelContext::beginScanningForward):
(WebKit::WebPlaybackSessionModelContext::beginScanningBackward):
(WebKit::WebPlaybackSessionModelContext::endScanning):
(WebKit::WebPlaybackSessionModelContext::selectAudioMediaOption):
(WebKit::WebPlaybackSessionModelContext::selectLegibleMediaOption):
(WebKit::WebPlaybackSessionManagerProxy::create):
(WebKit::WebPlaybackSessionManagerProxy::WebPlaybackSessionManagerProxy):
(WebKit::WebPlaybackSessionManagerProxy::~WebPlaybackSessionManagerProxy):
(WebKit::WebPlaybackSessionManagerProxy::invalidate):