While investigating Bug 185887, I found some issues in Source/WebKit/UIProcess/ios/fullscreen/WKFullscreenStackView.mm (in no particular order): - The WKFullscreenStackView.secondaryMaterialOverlayViewConstraints instance variable is only ever set, and never read, and the constraints are recomputed every time -[WKFullscreenStackView updateConstraints] is called. If it's never used outside of -updateConstraints, the instance variable can probably be removed. - The WKFullscreenStackView.secondaryMaterialOverlayView instance variable is `assign`, but references a UIVisualEffectView object which can be deallocated. This instance variable is set in -[WKFullscreenStackView updateConstraints], but only appears to be referenced again to remove it from its superview (the WKFullscreenStackView instance), after which the instance variable may point to a deallocated object. (Since it's never used again, this doesn't seem to be a security issue.) It seems like WKFullscreenStackView.secondaryMaterialOverlayView should probably be `retain`. - Also, when WKFullscreenStackView.secondaryMaterialOverlayView is removed from its superview in -[WKFullscreenStackView updateConstraints], I'm not sure how it will ever be used again. - Clean up inconsistent use of legacy/modern setter syntax and ivar/property access.
<rdar://problem/40635638>