• Vladislav Kaznacheev's avatar
    Clip metalayer selection to screen bounds · 549c7f97
    Vladislav Kaznacheev authored
    Although metalayer selection is constructed from stylus
    input points, it can sometimes cross the screen bounds.
    
    For example, when a horizontal stroke is recognized, its
    bounding rectangle is inflated to guarantee minimal
    height and generally be closer to the visual image of
    the stroke.
    
    This patch introduces necessary clipping to make sure
    that clients do not have to do that.
    
    Bug: b:67021526
    Test: ash_unittests HighlighterControllerTest.SelectionInsideScreen
    Change-Id: I09d67c8b9f1176ea083a40f581b8a46536152296
    Reviewed-on: https://chromium-review.googlesource.com/691278
    Commit-Queue: Vladislav Kaznacheev <kaznacheev@chromium.org>
    Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
    Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#505401}
    549c7f97
highlighter_controller.cc 8.11 KB