• Emily Stark's avatar
    Apply simplified domain elisions when omnibox's bounds change · a3af97f6
    Emily Stark authored
    Textfield::OnBoundsChanged refits the RenderText's display rect to the
    local bounds. This undoes any simplified domain elisions that have
    already been applied. This can happen e.g. when a security chip or
    other omnibox decoration appears. In this CL, we override
    Textfield::OnBoundsChanged() to reapply any simplified domain elisions
    that have previously been applied.
    
    If an animation was in-progress when OnBoundsChanged() runs, we cancel
    the animation and abruptly transition to the end state. This might
    look a little odd, but it should be quite rare.
    
    Bug: 1102944
    Change-Id: Ide5e4a890a5de0e0f092c545dd563106bee9825e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2292456
    Commit-Queue: Emily Stark <estark@chromium.org>
    Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#788908}
    a3af97f6
omnibox_view_views.cc 98.4 KB