/
ChangeLog
10597 lines (8149 loc) · 506 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
2021-04-27 Chris Dumez <cdumez@apple.com>
Ask LocalStorage database to free as much memory as possible on memory pressure
https://bugs.webkit.org/show_bug.cgi?id=225109
Reviewed by Geoffrey Garen.
Ask LocalStorage database to free as much memory as possible on memory pressure.
Some of the strings in the database can be large and we don't want SQLite to be
holding on to those for performance reason when we are under memory pressure.
This seems to be a ~1.75% improvement on PLUM/nytimes-home and a ~1% improvement
on PLUM/wikipedia, sadly not enough to show an impact on the overal PLUM score.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::lowMemoryHandler):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::handleLowMemoryWarning):
* NetworkProcess/WebStorage/LocalStorageDatabase.h:
* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::StorageArea::handleLowMemoryWarning):
* NetworkProcess/WebStorage/StorageArea.h:
* NetworkProcess/WebStorage/StorageManagerSet.cpp:
(WebKit::StorageManagerSet::handleLowMemoryWarning):
* NetworkProcess/WebStorage/StorageManagerSet.h:
2021-04-27 Don Olmstead <don.olmstead@sony.com>
[CMake] Don't use FORWARDING_HEADERS_DIR for GTK WebKit headers
https://bugs.webkit.org/show_bug.cgi?id=225006
Reviewed by Michael Catanzaro.
Use WebKit2Gtk_FRAMEWORK_HEADERS_DIR and WebKit2Gtk_DERIVED_SOURCES_DIR for WebKit2 GTK
headers instead of FORWARDING_HEADERS_DIR and DERIVED_SOURCES_DIR.
* PlatformGTK.cmake:
2021-04-27 Brent Fulgham <bfulgham@apple.com>
[iOS] [GPU] The UI process should issue the mach sandbox extension to 'com.apple.AGXCompilerService'
https://bugs.webkit.org/show_bug.cgi?id=225004
<rdar://problem/68362930>
Reviewed by Darin Adler.
In Bug 203915 and Bug 210616 we did work to only extend access to AGX-related graphics facilities on relevant hardware. This was
lost in the transition to the GPU Process and should be added back.
This change does the following:
1. Adds sandbox extension handles for the AGX-related compiler services and IOKit classes to the GPUProcess creation parameters.
2. Updates the GPUProcessProxy to extend AGX features when warranted and add them to the creation parameter structure.
3. Updates the GPUProcess to consume the extensions (when granted).
4. Updates the WebProcessPool to use the WebCore version of the 'agxCompilerClasses' and 'agxCompilerServices' functions.
5. Moves the 'agxCompilerClasses' and 'agxCompilerServices' functions to WebCore, alongside the other AGX functions.
It also corrects the sandbox rule for the AGXCompilerService in the GPU Process sandbox, which incorrectly called it a 'global-name',
when it is an xpc-service.
Tested by existing graphics tests.
* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
* GPUProcess/GPUProcessCreationParameters.cpp:
(WebKit::GPUProcessCreationParameters::encode const):
(WebKit::GPUProcessCreationParameters::decode):
* GPUProcess/GPUProcessCreationParameters.h:
* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb: Correct AGX compiler service type.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::nonBrowserServices):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::agxCompilerClasses): Deleted.
(WebKit::agxCompilerServices): Deleted.
* UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::GPUProcessProxy):
2021-04-27 Chris Fleizach <cfleizach@apple.com>
AX: Smart invert>Safari>images & other colors improperly invert
https://bugs.webkit.org/show_bug.cgi?id=225077
<rdar://problem/77176061>
Reviewed by Alan Bujtas.
The invert colors property is gathered during the screen data collection phase.
So properly update the value in WebCore, we need to resend these properties when
accessibility settings change.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::accessibilitySettingsDidChange):
2021-04-27 Philippe Normand <pnormand@igalia.com>
[Flatpak SDK] Direct AVIF loading does not work.
https://bugs.webkit.org/show_bug.cgi?id=222867
Reviewed by Michael Catanzaro.
* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::didGetFileInfo): Use mime-type reported for local files by gio
only as a last resort. Our MIMETypeRegistry is more reliable in these cases.
2021-04-27 Youenn Fablet <youenn@apple.com>
Add memory allocation checks in more realtime audio capture/rendering places
https://bugs.webkit.org/show_bug.cgi?id=224750
Reviewed by Eric Carlson.
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
* WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:
(WebKit::AudioMediaStreamTrackRenderer::pushSamples):
(WebKit::AudioMediaStreamTrackRenderer::storageChanged):
2021-04-26 Tim Nguyen <ntim@apple.com>
Add more eager OOB checks when creating DisplayListReaderHandle & DisplayListWriterHandle.
https://bugs.webkit.org/show_bug.cgi?id=225055
<rdar://71896663>
Reviewed by Wenson Hsieh.
There were already some OOB checks for both classes, this revision adds checks at creation-time.
Also add a comment on top of SharedDisplayListHandle.h to mention that only subclasses use it.
* GPUProcess/graphics/DisplayListReaderHandle.h:
(WebKit::DisplayListReaderHandle::create):
* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::didCreateSharedDisplayListHandle):
* Shared/SharedDisplayListHandle.h:
(WebKit::SharedDisplayListHandle::SharedDisplayListHandle):
* WebProcess/GPU/graphics/DisplayListWriterHandle.h:
(WebKit::DisplayListWriterHandle::create):
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::createItemBuffer):
2021-04-26 Alex Christensen <achristensen@webkit.org>
Consistently include headers with <Framework/Header.h>
https://bugs.webkit.org/show_bug.cgi?id=225067
Reviewed by Alexey Proskuryakov.
* Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h:
* Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h:
* UIProcess/API/Cocoa/NSAttributedString.mm:
* UIProcess/API/Cocoa/WKBrowsingContextGroupInternal.h:
* UIProcess/API/Cocoa/WKConnectionInternal.h:
* UIProcess/API/Cocoa/WKNavigationDataInternal.h:
* UIProcess/API/Cocoa/WKScriptMessage.mm:
* UIProcess/API/Cocoa/WKSecurityOriginInternal.h:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
* UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebpagePreferences.mm:
* UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h:
* UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
* UIProcess/API/Cocoa/_WKAttachment.mm:
* UIProcess/API/Cocoa/_WKAttachmentInternal.h:
* UIProcess/API/Cocoa/_WKAuthenticatorResponseInternal.h:
* UIProcess/API/Cocoa/_WKInspectorConfiguration.mm:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
* UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
* UIProcess/API/Cocoa/_WKWebAuthenticationPanelForTesting.h:
* UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h:
* UIProcess/API/mac/WKWebViewMac.h:
* UIProcess/API/mac/WKWebViewMac.mm:
* UIProcess/Cocoa/MediaUtilities.h:
* UIProcess/Cocoa/PageClientImplCocoa.mm:
* UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.mm:
* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
* UIProcess/Cocoa/UIDelegate.mm:
* UIProcess/Cocoa/WKContactPicker.mm:
* UIProcess/Cocoa/WKShareSheet.mm:
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/Inspector/mac/RemoteWebInspectorUIProxyMac.mm:
* UIProcess/Inspector/mac/WKInspectorViewController.mm:
* UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/mac/HighPerformanceGPUManager.mm:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrameInternal.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandleInternal.h:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h:
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
2021-04-26 Kate Cheney <katherine_cheney@apple.com>
ResourceLoadStatisticsDatabaseStore::aggregatedThirdPartyData() hangs for a long time
https://bugs.webkit.org/show_bug.cgi?id=225063
<rdar://problem/76248557>
Reviewed by Brent Fulgham.
Unique index values speed up sqlite database queries, and prevent
repeated entries in tables without primary keys. Its possible to
get into a state where some tables in the ITP database do not have index
values. We should check on open if the database has index values, and
create them if not. This may require migrating existing data and
removing repeated entries.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
Remove semi-colons in CREATE UNIQUE INDEX queries. They aren't needed
and if we remove them we can use these constexpr values to check for
the correct stored index later on.
(WebKit::stripIndexQueryToMatchStoredValue):
We use CREATE UNIQUE INDEX IF NOT EXISTS to avoid an error if the
unique index already exists, but the value is stored in the database
without the "IF NOT EXISTS" portion. In order to check for correct
values we need to strip this out.
(WebKit::expectedTableAndIndexQueries):
(WebKit::ResourceLoadStatisticsDatabaseStore::checkForMissingTablesInSchema):
(WebKit::ResourceLoadStatisticsDatabaseStore::currentTableAndIndexQueries):
Return the schema and index for a given table. If the index is empty
that means SQLite created an automatic index and we should return
WTF::nullopt.
(WebKit::ResourceLoadStatisticsDatabaseStore::needsUpdatedPrivateClickMeasurementSchema):
(WebKit::ResourceLoadStatisticsDatabaseStore::missingUniqueIndices):
(WebKit::ResourceLoadStatisticsDatabaseStore::missingReferenceToObservedDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::needsUpdatedSchema):
(WebKit::insertDistinctValuesInTableQuery):
Since unique indices prevent repeat entries, tables without them might
have repeated entries. We need to select only one of each entry to
migrate to the new tables. This picks the one with the most recent
lastUpdated time.
(WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToNewTablesIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::addMissingTablesIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::createUniqueIndices):
This fix revealed an index that is never created. I added it here.
(WebKit::ResourceLoadStatisticsDatabaseStore::isCorrectSubStatisticsCount):
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _isRelationshipOnlyInDatabaseOnce:thirdParty:completionHandler:]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
Convert SPI previously only used for layout tests to be used for an
API test where we can load a database with repeated values to ensure
the migration is correct after my change.
2021-04-26 Ben Nham <nham@apple.com>
Reduce memory footprint for background tabs
https://bugs.webkit.org/show_bug.cgi?id=225007
Reviewed by Chris Dumez.
When a WebContent process contains only non-visible pages (e.g. if it is a background tab),
we should attempt to reduce our memory footprint after some time interval to help relieve
system-wide memory pressure. This is enabled only on Mac because iOS already does something
similar just before WebContent suspends.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::pageDidEnterWindow):
(WebKit::WebProcess::pageWillLeaveWindow):
(WebKit::WebProcess::nonVisibleProcessGraphicsCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessMemoryCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired): Deleted.
* WebProcess/WebProcess.h:
2021-04-26 Ben Nham <nham@apple.com>
Handle warning-level memory notifications more aggressively
https://bugs.webkit.org/show_bug.cgi?id=225008
Reviewed by Chris Dumez.
We've found that in some workloads, the critical-level memory pressure handler releases
significantly more memory than the warning-level memory pressure handler. On Macs, it is
likely that the memory pressure coincides with swapping. So when we get even a warning-level
notification from the OS, we should err on the side of releasing more memory to help relieve
the swapping state. To do this, treat warning level notifications the same as critical level
notifications on Mac if the WebProcess is in the background.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2021-04-26 Alex Christensen <achristensen@webkit.org>
Update Mac-specific CMake files
https://bugs.webkit.org/show_bug.cgi?id=225064
Rubber-stamped by Tim Horton.
* PlatformMac.cmake:
2021-04-26 Aditya Keerthi <akeerthi@apple.com>
REGRESSION (r271861): [iOS] Accessory bar navigation to elements outside the viewport fails
https://bugs.webkit.org/show_bug.cgi?id=224980
<rdar://problem/77042311>
Reviewed by Wenson Hsieh.
r271861 introduced logic to prevent obscured elements from being
focusable using the accessory bar, using hit testing. However, it also
prevented elements outside the viewport from participating in accessory
bar navigation.
To fix, include HitTestRequest::IgnoreClipping in the hit test request
options. This ensures that hit test requests are not clipped to the
viewport.
Note that this behavior is covered by an existing test, but the test
only failed on smaller devices.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::isObscuredElement):
2021-04-26 Don Olmstead <don.olmstead@sony.com>
Fix includes for some GTK/GLib headers
https://bugs.webkit.org/show_bug.cgi?id=225020
Reviewed by Adrian Perez de Castro.
An include was assuming Source/WebKit as its root.
* UIProcess/API/glib/WebKitInitialize.cpp:
2021-04-26 Alexey Shvayka <shvaikalesh@gmail.com>
[JSC] OrdinarySet should invoke custom [[Set]] methods
https://bugs.webkit.org/show_bug.cgi?id=217916
Reviewed by Yusuke Suzuki.
* WebProcess/Plugins/Netscape/JSNPObject.h:
2021-04-26 Per Arne Vollan <pvollan@apple.com>
[iOS] Update sandbox message filter syntax
https://bugs.webkit.org/show_bug.cgi?id=223384
Reviewed by Brent Fulgham.
Update sandbox message filter syntax on iOS. The previous syntax should also still be supported.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2021-04-25 Devin Rousso <drousso@apple.com>
Add `ALWAYS_LOG_WITH_STREAM` macro for easier development/debugging
https://bugs.webkit.org/show_bug.cgi?id=224959
Reviewed by Darin Adler.
It's often very helpful to use existing `operator<<` defined on objects, but annoying to
have to copypaste the boilerplate code that creates a `WTF::TextStream` and uses it in a
`WTFLogAlways` or wait for a debug build to enable existing `LOG_WITH_STREAM`.
* Platform/Logging.h:
Move contents of `pal/LogMacros.h` to `wtf/Assertions.h`.
2021-04-25 Jer Noble <jer.noble@apple.com>
[GPUP] REGRESSION: Selecting play/pause on Spotify.com causes page to reload
https://bugs.webkit.org/show_bug.cgi?id=225023
<rdar://76985997>
Reviewed by Darin Adler.
A zero ObjectIdentifier is apparently invalid, which causes a debug ASSERT on the sending
side and a SIGKILL on the receiving side. Replace the zero ObjectIdentifier message when
clearing a LegacyCDMSession with an Optional<ObjectIdentifier>, and send an explicit
WTF::nullopt when clearing.
* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::mediaPlayerCachedKeyForKeyId const):
(WebKit::RemoteMediaPlayerProxy::setLegacyCDMSession):
* GPUProcess/media/RemoteMediaPlayerProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::setCDMSession):
2021-04-25 Jer Noble <jer.noble@apple.com>
[GPUP][iOS] Silent video playback can interrupt system audio
https://bugs.webkit.org/show_bug.cgi?id=225031
<rdar://76652073>
Reviewed by Eric Carlson.
When the WebContent process asks the GPU Process to set the AVAudioSession audio session
category, the GPU Process as an optimization returns early if the session category being
requested is the same as has already been set. However, the default value of the category
is "None" (which translates to AVAudioSessionCategoryAmbient), and setting the category
to "None" becomes a no-op due to this default. As such, the GPUP never sets the underlying
AVAudioSession's category away from the default, which is AVAudioSessionCategorySoloAmbient,
and thus will interrupt other audio during playback.
Additionally, there's a subtle logic error where the audio session category is not changed
when a given WebContent process (and it's RemoteAudioSession & Proxy) goes away.
The fix for both of these issues is to re-calculate the correct audio session category
when a RemoteAudioSessionProxy is added or removed from RemoteAudioSessionProxyManager.
Since "None" is the default value for a RemoteAudioSessionProxy, the mere act of adding
a new RemoteAudioSessionProxy (which is created when a WebContent process is created)
will cause the audio session category to be set to AVAudioSessionCategoryAmbient.
* GPUProcess/media/RemoteAudioSessionProxy.cpp:
(WebKit::RemoteAudioSessionProxy::setCategory):
* GPUProcess/media/RemoteAudioSessionProxy.h:
* GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
(WebKit::RemoteAudioSessionProxyManager::addProxy):
(WebKit::RemoteAudioSessionProxyManager::removeProxy):
(WebKit::RemoteAudioSessionProxyManager::updateCategory):
(WebKit::RemoteAudioSessionProxyManager::setCategoryForProcess): Deleted.
* GPUProcess/media/RemoteAudioSessionProxyManager.h:
2021-04-25 Dean Jackson <dino@apple.com>
[WebXR] Should be enabled when WEBXR_INTERNALS is true
https://bugs.webkit.org/show_bug.cgi?id=225026
<rdar://problem/77111380>
Reviewed by Sam Weinig.
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultWebXREnabled): Return true when HAVE(WEBXR_INTERNALS).
2021-04-24 Tim Horton <timothy_horton@apple.com>
Changing the source of a model element with clipping applied does not update the model
https://bugs.webkit.org/show_bug.cgi?id=224917
Reviewed by Simon Fraser.
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.h:
* WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.mm:
(WebKit::PlatformCALayerRemoteModelHosting::dumpAdditionalProperties):
Add a bit to platformLayerTreeAsText() that makes PlatformCALayerRemoteModelHosting
dump the size of the model that it is hosting, which is used in the test for this bug.
2021-04-23 Kate Cheney <katherine_cheney@apple.com>
PCM: debug mode should send the second report on a 10 second delay after the first
https://bugs.webkit.org/show_bug.cgi?id=225010
<rdar://problem/77092303>
Reviewed by John Wilander.
Fix a bug in PCM debug mode where we don't set the timer for 10_s
after sending the first report for an attribution.
No new tests, this is debug mode only. Non-debug mode behavior is
covered by existing tests, and I tested debug mode manually.
* NetworkProcess/PrivateClickMeasurementManager.cpp:
(WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
If the attribution has been sent to only one endpoint, indicated by
a non-null laterTimeToSend value, we should set the timer to be 10
seconds if debug mode is enabled.
Also, change the interval time from 1 minute to 10 seconds, because
there was no good reason that it was 1 minute and we should be
consistent. Also 1 minute is a long time to wait during a test.
2021-04-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r275562.
https://bugs.webkit.org/show_bug.cgi?id=225002
Causes issues in iOS contextmenu animations and interactions
with other popovers
Reverted changeset:
"[iOS] contextmenu hints can be clipped by the WKWebView"
https://bugs.webkit.org/show_bug.cgi?id=224204
https://trac.webkit.org/changeset/275562
2021-04-23 Aditya Keerthi <akeerthi@apple.com>
REGRESSION (r273154): fast/forms/ios/repeatedly-focus-offscreen-select.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=224985
<rdar://problem/77042177>
Reviewed by Wenson Hsieh.
The test is failing after r273154, which made <select> elements present
a UIMenu rather than a popover. The old logic ensured popovers were not
presented when the <select> element was offscreen (see r265117 for more
information on why that behavior was necessary), but the new
presentation omitted that logic.
To achieve the correct behavior, and fix the failing test, <select>
menus should not be presented when the element is offscreen.
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKSelectPicker controlBeginEditing]):
2021-04-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r276451.
https://bugs.webkit.org/show_bug.cgi?id=224999
Broke perf testing
Reverted changeset:
"[iOS] Update sandbox message filter syntax"
https://bugs.webkit.org/show_bug.cgi?id=223384
https://trac.webkit.org/changeset/276451
2021-04-23 Brent Fulgham <bfulgham@apple.com>
[iOS] GPU Process sandbox lacks IOMobileFramebufferUserClient method filter
https://bugs.webkit.org/show_bug.cgi?id=224956
<rdar://problem/68227590>
Reviewed by Per Arne Vollan.
This patch updates the GPU process sandbox to match the method filter used in the WebContent process
so that we will retain consistent protections when activating the GPU Process. These are the same rules
governing access to this resource when the GPU process is disabled, so should not create a change in behavior.
We also remove unneeded telemetry to reduce messaging burden and avoid performance issues.
* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2021-04-23 BJ Burg <bburg@apple.com>
Web Inspector: [Cocoa] WKInspectorResourceURLSchemeHandler needs to serialize cleanup actions
https://bugs.webkit.org/show_bug.cgi?id=224986
<rdar://76768454>
Reviewed by Devin Rousso.
* UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm:
(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]):
Do cleanup on the main queue so that it can be serialized with reads.
(-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]):
Ensure that all removals from the map are processed before doing a lookup.
2021-04-23 Darin Adler <darin@apple.com>
Remove decoder memory allocations based on untrusted data (sizes) in the stream; related changes
https://bugs.webkit.org/show_bug.cgi?id=224984
Reviewed by Sam Weinig.
* Platform/IPC/ArgumentCoders.h: Remove the calls to
HashMap::reserveInitialCapacity and HashSet::reserveInitialCapacity, based
on number read in from the decoder. This means there will be more wasted
memory in these HashMap and HashSet objects, so we have to test to make
sure this does not create a performance problem. But without this check,
we are trying to allocate memory based on an unstrusted size.
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<RefPtr<ApplePayError>>::encode): Removed the coder
for a Vector of these RefPtr, replaced it with a coder for an individual one,
allowing the Vector ArgumentCoder template to handle vector size and construction.
One benefit is that this adds in a shrinkToFit and prevents us from making any
separate mistake about pre-sizing the Vector here since we use shared code.
(IPC::ArgumentCoder<RefPtr<ApplePayError>>::decode): Ditto.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<RefPtr<SecurityOrigin>>::encode): Ditto.
(IPC::ArgumentCoder<RefPtr<SecurityOrigin>>::decode): Ditto.
(IPC::ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector>::encode):
(IPC::ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector>::decode):
Removed unnecessary specialization for the KeyStatusVector. There is already
an ArgumentCoder for Vector, for std::pair, for Ref<SharedBuffer>, and for
enumerations like CDMKeyStatus, so there's no need to have a specialized
coder for this. This function that we are removing had a call to
reserveInitialCapacity, but the Vector ArgumentCoder template does not.
* Shared/WebCoreArgumentCoders.h: Replaced the
ArgumentCoder<Vector<RefPtr<WebCore::ApplePayError>>> specialization with
ArgumentCoder<RefPtr<WebCore::ApplePayError>>. Removed the
ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector> specialization.
2021-04-23 Kate Cheney <katherine_cheney@apple.com>
Set proper network logging level for full web browsers
https://bugs.webkit.org/show_bug.cgi?id=224982
<rdar://problem/76903650>
Reviewed by Brent Fulgham.
Full web browsers have different low-level network logging requirements
for ephemeral sessions.
No new tests. There's no automated way to test if network level logs
show up. I tested that logging is correct for web browser and non web
browser apps manually.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::configurationForSessionID):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
2021-04-23 Chris Dumez <cdumez@apple.com>
Disable GPUProcess on shipping iOS
https://bugs.webkit.org/show_bug.cgi?id=224897
Reviewed by Eric Carlson.
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultUseGPUProcessForCanvasRenderingEnabled):
(WebKit::defaultUseGPUProcessForDOMRenderingEnabled):
(WebKit::defaultUseGPUProcessForMediaEnabled):
(WebKit::defaultUseGPUProcessForWebGLEnabled):
(WebKit::defaultCaptureAudioInGPUProcessEnabled):
(WebKit::defaultCaptureVideoInGPUProcessEnabled):
(WebKit::defaultWebRTCCodecsInGPUProcess):
2021-04-23 Youenn Fablet <youenn@apple.com>
Fix KVO for camera/microphone capture state WKWebView API
https://bugs.webkit.org/show_bug.cgi?id=224922
<rdar://problem/77008199>
Reviewed by Eric Carlson.
Add missing willChange observer call and migrate keys to API keys.
Covered by API test.
* UIProcess/Cocoa/PageClientImplCocoa.h:
* UIProcess/Cocoa/PageClientImplCocoa.mm:
(WebKit::PageClientImplCocoa::microphoneCaptureWillChange):
(WebKit::PageClientImplCocoa::cameraCaptureWillChange):
(WebKit::PageClientImplCocoa::microphoneCaptureChanged):
(WebKit::PageClientImplCocoa::cameraCaptureChanged):
* UIProcess/PageClient.h:
(WebKit::PageClient::microphoneCaptureWillChange):
(WebKit::PageClient::cameraCaptureWillChange):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateReportedMediaCaptureState):
2021-04-23 Chris Dumez <cdumez@apple.com>
Improve our constructDeletedValue() template specializations
https://bugs.webkit.org/show_bug.cgi?id=224889
Reviewed by Darin Adler.
Improve our constructDeletedValue() template specializations and make them more consistent:
- Use placement-new instead of object assignment since we don't want/need to destroy the
existing object (since it is uninitialized).
- Do as little initialization as possible for performance reasons.
* NetworkProcess/cache/NetworkCache.h:
(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::constructDeletedValue):
(WTF::HashTraits<WebKit::NetworkCache::GlobalFrameID>::isDeletedValue):
* Platform/IPC/StringReference.h:
(WTF::HashTraits<IPC::StringReference>::constructDeletedValue):
* Shared/CallbackID.h:
(WTF::HashTraits<WebKit::CallbackID>::constructDeletedValue):
(WTF::HashTraits<WebKit::CallbackID>::isDeletedValue):
2021-04-23 Youenn Fablet <youenn@apple.com>
Handle rotation correctly in WebRTC GPUProcess rendering pipeline
https://bugs.webkit.org/show_bug.cgi?id=224927
<rdar://76915991>
Reviewed by Eric Carlson.
Instead of updating the inner layer, update the root layer.
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
(WebKit::RemoteSampleBufferDisplayLayer::updateAffineTransform):
2021-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement PageClient::makeViewBlank()
https://bugs.webkit.org/show_bug.cgi?id=224236
Reviewed by Chris Dumez.
Make most of the changes in r275485 cross platform and implement PageClient::makeViewBlank() for the GTK port.
* UIProcess/API/glib/WebKitUIClient.cpp:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::makeViewBlank):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSnapshot):
(webkitWebViewBaseDraw):
(webkitWebViewBaseMakeBlank):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad):
(WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate):
(WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::didUpdateRenderingAfterCommittingLoad): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::flushPendingLayerChanges):
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState):
(WebKit::DrawingAreaCoordinatedGraphics::display):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didUpdateRendering):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::didUpdateRendering): Deleted.
2021-04-22 Jer Noble <jer.noble@apple.com>
[Mac] CMBaseClass object pointers can become unaligned on x86
https://bugs.webkit.org/show_bug.cgi?id=224950
<rdar://77020922>
Reviewed by Eric Carlson.
CMBaseClass has a 4-byte version member before its 8-byte pointers on x86. Deal with this
the same way we do with other pointer-bearing, static, CM-type objects: enforce a 4-byte
packing, and prepend the struct with another 4-byte object in order to force the pointers
into 8-byte alignment.
* Shared/mac/MediaFormatReader/CoreMediaWrapped.h:
(WebKit::CoreMediaWrapped<Wrapped>::vTable):
2021-04-22 Wenson Hsieh <wenson_hsieh@apple.com>
Followup to r276397
https://bugs.webkit.org/show_bug.cgi?id=224883
Reviewed by Darin Adler.
Use a range-based for loop when mapping FloatQuads in `sendTapHighlightForNodeIfNecessary`.
No change in behavior.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
2021-04-22 Brent Fulgham <bfulgham@apple.com>
[iOS] Remove useless 'network-outbound' rule from non-networking file rule
https://bugs.webkit.org/show_bug.cgi?id=224940
<rdar://problem/66583476>
Reviewed by Per Arne Vollan.
No new tests. No effect on behavior.
* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
2021-04-22 BJ Burg <bburg@apple.com>
[Cocoa] re-enable test case WKInspectorDelegate.InspectorConfiguration
https://bugs.webkit.org/show_bug.cgi?id=224577
<rdar://70505272>
Reviewed by Devin Rousso.
For the purposes of testing, we want to be able to issue a fetch() that will
hit a custom URL scheme handler registered with _WKInspectorConfiguration.
This is not allowed by the existing <meta> tag CSP directive list because 'connect-src *'
does not allow connecting to arbitrary schemes, just arbitrary domains.
To fix this, relax the 'connect-src' directive in Main.html and apply
a dynamically-computed CSP directive using the 'Content-Security-Policy' HTTP
response header. This is only sent for main resources (Main.html and Test.html)
using the newly added inspector-resource: URL scheme handler.
The dynamically computed directive explicitly allows 'self' and any other registered
custom URL scheme handlers. WebKit ports which have not migrated away from file:///
will only apply the weaker 'connect-src' directive from the <meta> tag after this change.
Progresses an existing API test: WKInspectorDelegate.InspectorConfiguration.
* UIProcess/API/Cocoa/_WKInspectorDelegate.h:
* UIProcess/API/APIInspectorClient.h:
(API::InspectorClient::frontendLoaded):
* UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h:
* UIProcess/API/Cocoa/_WKInspector.mm:
* UIProcess/API/Cocoa/_WKInspectorTesting.mm:
(JavaScriptSnippetToFetchURL):
(-[_WKInspector _fetchURLForTesting:]):
* UIProcess/Inspector/WebInspectorUIProxy.cpp:
(WebKit::WebInspectorUIProxy::frontendLoaded): Notify the _WKInspectorDelegate
adapter that the frontend has finished loading.
* UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.h:
* UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm:
(-[WKInspectorResourceURLSchemeHandler allowedURLSchemesForCSP]):
(-[WKInspectorResourceURLSchemeHandler setAllowedURLSchemesForCSP:]):
(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]):
Added. Keep track of allowed custom schemes and allowed main resources.
Apply the CSP directive for main resource requests only.
* UIProcess/Inspector/mac/WKInspectorViewController.mm:
(-[WKInspectorViewController webViewConfiguration]):
Set the allowed URL schemes property so the URL scheme handler can include
the schemes in the dynamically computed 'connect-src' directive.
2021-04-22 Simon Fraser <simon.fraser@apple.com>
Add trace points for WKWebView snapshotting
https://bugs.webkit.org/show_bug.cgi?id=224943
Reviewed by Tim Horton.
Add new trace points to make snapshotting-related issues easier to diagnose. In the UI
process we start/end a trace scope when requested to snapshot, and before calling the
client's completion handler.
Trace CARenderServer snapshots which happen in the UI process, and in the web process, trace
the start and end of the snapshot painting.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView requestSnapshot]):
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::paintSnapshotAtSize):
2021-04-22 Lauro Moura <lmoura@igalia.com>
Unreviewed. Guard doesPageNeedTCCD in platform COCOA after r274213
https://bugs.webkit.org/show_bug.cgi?id=224951
Silence -Wunused-function in non-cocoa platforms.
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2021-04-22 Patrick Griffis <pgriffis@igalia.com>
[SOUP] Show more connection information in the inspector
https://bugs.webkit.org/show_bug.cgi?id=224873
Show the h2 protocol as well as the connection identifier
in the inspector.
Reviewed by Adrian Perez de Castro.
* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::gotHeadersCallback):
(WebKit::soupHTTPVersionToString):
(WebKit::NetworkDataTaskSoup::didGetHeaders):
2021-04-22 Chris Dumez <cdumez@apple.com>
NowPlayingInfoForGPUManager::clearNowPlayingInfoPrivate() sometimes launches the GPUProcess on page close
https://bugs.webkit.org/show_bug.cgi?id=224939
Reviewed by Simon Fraser.
Make sure NowPlayingInfoForGPUManager::clearNowPlayingInfoPrivate() never launches the GPUProcess. The GPU
process already takes care of clearing now playing info on exit.
* WebProcess/GPU/media/WebMediaStrategy.cpp:
(WebKit::WebMediaStrategy::createNowPlayingManager const):
2021-04-22 Chris Dumez <cdumez@apple.com>
Call RemoteMediaEngineConfigurationFactory::registerFactory() in WebProcess::setUseGPUProcessForMedia()
https://bugs.webkit.org/show_bug.cgi?id=224937
Reviewed by Eric Carlson.
Call RemoteMediaEngineConfigurationFactory::registerFactory() in WebProcess::setUseGPUProcessForMedia(),
like we used to do, instead of doing it in the GPUProcessConnection constructor. It is safer to
register the factory before we have a GPUProcessConnection and we wouldn't want things to behave
differently depending on whether or not the GPUProcess is already launched. I made sure that this does
not eagerly launch the GPUProcess.
* WebProcess/GPU/GPUProcessConnection.cpp:
(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::mediaEngineConfigurationFactory): Deleted.
* WebProcess/GPU/GPUProcessConnection.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setUseGPUProcessForMedia):
(WebKit::WebProcess::mediaEngineConfigurationFactory):
* WebProcess/WebProcess.h:
2021-04-22 Alex Christensen <achristensen@webkit.org>
Fix ENABLE macro around NetworkProcessConnection::connectToRTCDataChannelRemoteSource declaration
https://bugs.webkit.org/show_bug.cgi?id=224938
Reviewed by Chris Dumez.
This matches the macro around the definition.
* WebProcess/Network/NetworkProcessConnection.h:
2021-04-22 BJ Burg <bburg@apple.com>
v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak
https://bugs.webkit.org/show_bug.cgi?id=223899
<rdar://problem/75249282>
Reviewed by Devin Rousso.
Address post-review feedback.
* UIProcess/API/Cocoa/_WKInspectorTesting.mm:
(-[_WKInspector _openURLExternallyForTesting:useFrontendAPI:]):
2021-04-22 Alex Christensen <achristensen@webkit.org>
Add some new messages.in files to the Mac CMake build
* PlatformMac.cmake:
2021-04-22 Per Arne <pvollan@apple.com>
[iOS] Update sandbox message filter syntax
https://bugs.webkit.org/show_bug.cgi?id=223384
<rdar://problem/75531614>
Reviewed by Brent Fulgham.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2021-04-22 Martin Robinson <mrobinson@webkit.org>
[GTK] Turn on editable <input type=date> and <input type=time> fields
https://bugs.webkit.org/show_bug.cgi?id=224921
Reviewed by Carlos Garcia Campos.
Turn on editable date and time inputs for GTK.
* SourcesGTK.txt: Add source file.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDateTimePicker): Added.
* UIProcess/API/gtk/PageClientImpl.h: Added method declaration.
* UIProcess/gtk/WebDateTimePickerGtk.cpp: Added. Stub for date/time picker which
doesn't have any user interface. This will allow clients to use the editable shadow
DOM date/time input editable fields.
(WebKit::WebDateTimePickerGtk::create):
(WebKit::WebDateTimePickerGtk::~WebDateTimePickerGtk):
(WebKit::WebDateTimePickerGtk::WebDateTimePickerGtk):
(WebKit::WebDateTimePickerGtk::endPicker):
(WebKit::WebDateTimePickerGtk::showDateTimePicker):
* UIProcess/gtk/WebDateTimePickerGtk.h: Added.
2021-04-22 Aditya Keerthi <akeerthi@apple.com>
Fix the tvOS build after r276325
https://bugs.webkit.org/show_bug.cgi?id=224929
<rdar://problem/77003408>
Reviewed by Wenson Hsieh.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/forms/WKDateTimeInputControl.mm:
[UIColor systemBackgroundColor] is SPI on tvOS.
(-[WKDateTimePickerViewController viewDidLoad]):
UIBlurEffectStyleSystemMaterial is not available on tvOS. Instead, use
a UIView with a system background color as the background view.
2021-04-20 BJ Burg <bburg@apple.com>
v2: Web Inspector: exempt API::SharedJSContext from remote inspection and automatic inspection
https://bugs.webkit.org/show_bug.cgi?id=224841
<rdar://69386559>
Reviewed by Devin Rousso.
Use the RemoteInspector C SPI to temporarily turn off "allow remote inspection by default".
* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
(API::SharedJSContext::ensureContext):
2021-04-21 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] The Look Up text service popover should avoid covering selected text
https://bugs.webkit.org/show_bug.cgi?id=224915
rdar://75891746
Reviewed by Megan Gardner.
Adjust the presentation rect when showing the Look Up text service popup using the callout bar on iOS so that
we use the entire bounds of the selection. Currently, we only use the first selection rect (top to bottom) as
the presentation rect, which may cause the popup to obscure selected text.
This seems to have been derived from iOS legacy web view behavior that dating back to rdar://7475904; while the
exact reasoning for this is effectively lost to time, it's likely due to how there used to only be a single
block selection rect in non-editable content in iOS 5 anyways, so taking only the first selection rect would not
be incorrect. However, we now use character granularity selection everywhere in WebKit2, so this logic is no
longer sensible.