• Leonard Grey's avatar
    Track bookmark bar buttons independently of the parent's hierarchy · c749d1a7
    Leonard Grey authored
    Currently, the bookmark bar uses the view hierarchy as its "model":
    bookmark buttons are force ordered to the child view index that
    matches their order in the model node (so that child_at(i) is the
    ith button), and GetBookmarkButtonCount() is implemented as:
    
    `return child_count() - 6;`
    
    This is fragile, and less than ideal for keyboard traversal.
    
    This change tracks the buttons separately in a vector, and maintains
    proper focus traversal.
    
    This is setup for Cocoa-style button dragging (as well as a fix
    for issue 841785).
    
    Bug: 712248, 841785
    Change-Id: I236e34503d021ff0f27974f731f6abcb4d62f829
    Reviewed-on: https://chromium-review.googlesource.com/1177908
    Commit-Queue: Leonard Grey <lgrey@chromium.org>
    Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#584117}
    c749d1a7
bookmark_bar_view.cc 77.6 KB