Fixed regressions in displaying controls for expanded diff fragments.
Review Request #9137 — Created Aug. 14, 2017 and submitted — Latest diff uploaded
The recent work on expanded diff fragments regressed the visibility of
the controls when expanded. Controls should always appear when expanded
(even on mouseleave), and should default to being hidden again when
collapsing. However, the recent changes resulted in the controls
immediately collapsing after expansion, and sometimes showing after
collapsing.We now store some state as to whether the fragment has expanded, and we
use this to determine whether controls can be hidden. The rendering
order has also changed to better ensure that state is correctly set
before/after expanding and collapsing diffs.
Expanded diffs and saw that the controls remained on-screen. Collapsed
and saw that they properly disappeared.