Bug 186076
| Summary: | -[WKFullscreenStackView updateConstraints] doesn't handle secondaryMaterialOverlayView or secondaryMaterialOverlayViewConstraints consistently | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | eric.carlson, jeremyj-wk, jer.noble, jonlee, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=185887 | ||
David Kilzer (:ddkilzer)
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/40635638>