[go: nahoru, domu]

[ios] Remove SnapshotOverlay

This CL improves snapshotting overlays in the following ways:

1) BVC does not need to provide a separate yOffset for each overlay
view. The overlays are in the same window as the base view, so their
relative offsets can be computed. This allows for deleting the
SnapshotOverlay class, which simply held the view and yOffset.

2) Documentation is improved with regards to the coordinate space of
frames and calculations required to place overlays correctly in
relation to the base view in the constructed snapshot.

3) This CL reduces usage of the coordinators in BVC corresponding to
the overlay views, and therefore reduces entanglements in BVC.
This is a step forward to migrating these coordinators to
BrowserCoordinator where they belong.

4) A tiny benefit of this new approach is that overlays of any size
and position will now work properly. Previously, we relied on the
fact that all overlays are exactly the width of the BVC, and we only
accounted for their yOffset from the top.

Bug: 918032
Change-Id: If654a1a4a7d1f642c8e83deef13dbbfc386fa912
Reviewed-on: https://chromium-review.googlesource.com/c/1435681
Commit-Queue: edchin <edchin@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628001}
7 files changed