• rohitrao's avatar
    Reland performance fixes for StatusBubbleMac. · da19048a
    rohitrao authored
    This reverts commit 7a15c817, bringing
    back the following changes:
    
    [Mac] Always sets the status bubble to 1pt wide when hidden.
    
    When the status bubble is in state kBubbleHidden, its width is now always 1pt.
    This prevents us from wasting time resizing and redrawing a hidden bubble.
    
    [Mac] Cleans up the StatusBubbleMac code.
    
    This CL reduces unnecessary work in StatusBubbleMac and replaces it with some
    logging to track down when invariants are violated.  (The presumed invariant
    here is that we set kWindowSizeDeterminedLater once, when state is set to
    kBubbleHidden, and the size stays that way until the bubble transitions to a
    different state.  If that invariant held, then we wouldn't need to constantly
    re-set the size for a hidden bubble.  This invariant is being violated on the
    GPU bots, so the logging is in place to try to find and fix the cause.)
    
    BUG=454502
    BUG=467998
    TEST=No visible impact.  Status bubble should continue to show when hovering over links and resize properly when the window size is changed.
    TEST=No visible impact.  Status bubble should continue to show, expand, and hide properly.
    
    Review URL: https://codereview.chromium.org/1103323002
    
    Cr-Commit-Position: refs/heads/master@{#327191}
    da19048a
status_bubble_mac.mm 29.1 KB