• Patti's avatar
    ImageView: Fix CENTER alignment on ImageViews with borders. · 4b311994
    Patti authored
    When positioning its internal ImageSkia for painting, CENTER-aligned ImageViews
    currently assume that any insets it may have are symmetrical (i.e. the
    left and right or top and bottom insets are the same value). This causes the
    image to be drawn in the incorrect position (e.g. it may cross the boundaries
    set by the ImageView insets) when the insets are not symmetrical. Fix by
    accounting for the inset width and height during positioning.
    
    Bug: 801583
    Change-Id: I65766fbea4c088ca45781a6a69cbae7b52178625
    Reviewed-on: https://chromium-review.googlesource.com/917843
    Commit-Queue: Patti <patricialor@chromium.org>
    Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#536962}
    4b311994
image_view.cc 6.84 KB