Skip to content

Commit

Permalink
REGRESSION (276971@main): [visionOS] Some websites cannot be scrolled
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=272467
rdar://126142996

Reviewed by Tim Horton.

The _spatialTrackingView is interefering with scrolling layers in the WKContentView's view
hierarchy. Both make the view centered and 0w x 0h, as well as disabling the spatial tracking
view's user interaction flag.

* Source/WebKit/UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):

Canonical link: https://commits.webkit.org/277342@main
  • Loading branch information
jernoble committed Apr 11, 2024
1 parent 8aeda88 commit cd75e44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/WebKit/UIProcess/ios/WKContentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ - (instancetype)_commonInitializationWithProcessPool:(WebKit::WebProcessPool&)pr
[_spatialTrackingView layer].separatedState = kCALayerSeparatedStateTracked;
_spatialTrackingLabel = makeString("WKContentView Label: "_s, createVersion4UUIDString());
[[_spatialTrackingView layer] setValue:(NSString *)_spatialTrackingLabel forKeyPath:@"separatedOptions.STSLabel"];
[_spatialTrackingView setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
[_spatialTrackingView setFrame:self.bounds];
[_spatialTrackingView setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin];
[_spatialTrackingView setFrame:CGRectMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds), 0, 0)];
[_spatialTrackingView setUserInteractionEnabled:NO];
[self addSubview:_spatialTrackingView.get()];
#endif

Expand Down

0 comments on commit cd75e44

Please sign in to comment.