• Evan Stade's avatar
    WebLayer: adjust browser controls visibility code · 53cfb65b
    Evan Stade authored
    Since WebLayer was sending old_state for the constraint, a switch from
    SHOWN to HIDDEN, as when entering fullscreen, could hit a DCHECK in
    browser_controls_offset_manager.cc
    
    I think some confusion arises from the re-use of a single enum for both
    the _constraint_ and the _current state_. Code used the terms old_state
    and new_state, when really the RenderFrameHost method expected a new
    constraint and new desired state. The BOTH value in the context of a
    constraint means unconstrained, and in the context of a state means
    "don't change unless you have to to conform to the constraint".
    
    Test: requestFullscreen on an element in weblayer shell doesn't cause
          the renderer to crash in debug
    
    Bug: 1107647
    Change-Id: I4f72e1144a9fc9a0cf0934b9640c660867c0d971
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310652
    Commit-Queue: Evan Stade <estade@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#790603}
    53cfb65b
tab_impl.h 15.2 KB