• Peter Boström's avatar
    Fix BubbleDialogModelHost checkbox activation · 002e0366
    Peter Boström authored
    Because BubbleDialogModelHost needs to support links a StyledLabel is
    occasionally used. This isn't supported in Checkbox because it
    subclasses LabelButton which uses a plain Label.
    
    Before this change, a BoxLayoutView was used to fake the Checkbox layout
    but using a separate view for the Label/StyledLabel. This has the
    downside of reducing the size of the Checkbox controller (which does not
    contain the label), which also reduces the clickable area.
    
    This change replaces the BoxLayoutView with a subclass of Checkbox and
    installs the BoxLayout using the prior configuration. This puts the
    label inside the Checkbox control which enlargens the Checkbox clickable
    area.
    
    Clicking links does not trigger the Checkbox control as the child Links
    handle events internally and they don't propagate to the parent control.
    
    Bug: 1138505, 1138770
    Change-Id: Ic01e538cf5f0dd16611d08c307bb8df689c07d78
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532860Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
    Commit-Queue: Peter Boström <pbos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#826924}
    002e0366
bubble_dialog_model_host.cc 23.8 KB