commit | c8bcca4e25ae2b9046f8cf4c31d94b179d45e4a7 | [log] [tgz] |
---|---|---|
author | Kurt Horimoto <kkhorimoto@chromium.org> | Thu Dec 06 17:44:16 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Dec 06 17:44:16 2018 |
tree | 02940236fef0aba6d8005f5366ea853ba8f42a55 | |
parent | 9b5c0a7e5bf7a73942ba783b6180f83a4d63b1e4 [diff] |
[iOS] Update OpenInToolbar bottom margin constraint for new windows. Previously OpenInToolbar updated its bottom constraint when moved to a new superview. This occurs when the toolbar is added to the tab's view (CRWWebControllerContainerView) when a tab is navigated to an exportable URL. If the foreground tab is changed after this occurs, the tab's view is removed from the hierarchy, which deactivates the bottom margin height constraint since the open in toolbar is removed from the BVC's hierarchy. OpenInToolbar.bottomMarginConstraint is not reset, however, because the OpenInToolbar's superview doesn't change from the tab view. Updating the constraint for window changes rather than superview changes will catch this and reset the constraint to nil when the tab's view is removed from the BVC's hierarchy. The crash in the referenced bug occured because the WKScrollView is being updated while the tab's view is not visible due to delayed JavaScript execution that is used to apply the PageDisplayState. Bug: 907485 Change-Id: Iedd05d5cf6657e26372235d026fd2c34e87f9c95 Reviewed-on: https://chromium-review.googlesource.com/c/1364162 Reviewed-by: Eugene But <eugenebut@chromium.org> Reviewed-by: Gauthier Ambard <gambard@chromium.org> Reviewed-by: Justin Cohen <justincohen@chromium.org> Commit-Queue: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#614405}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .