View::GetContentsBounds() is not consistent with View::GetInsets() |
||
Issue descriptionView::GetInsets() looks at a view's border by default, but is overridable. View::GetContentsBounds() looks at a view's border only, and is NOT overridable. View::GetContentsBounds() should instead call GetInsets(), because if a derived class changes how insets are calculated that should affect the contents bounds as well.
,
Dec 4
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6cdfa8d71ae521c8e55ee8259db174f15ed849f2 commit 6cdfa8d71ae521c8e55ee8259db174f15ed849f2 Author: Dana Fried <dfried@chromium.org> Date: Tue Dec 04 18:16:42 2018 Make View::GetContentsBounds() consistent with View::GetInsets() This only affects two classes, Link and BubbleFrameView, both of which were overriding GetInsets() and using them in nonstandard ways. This CL both makes the functions in View consistent, and also rectifies the logic in Link and in BubbleFrameView. Bug: 910724 Change-Id: Ib7b28406cefdd216ceb946fd083f2916605243eb Reviewed-on: https://chromium-review.googlesource.com/c/1357516 Reviewed-by: Michael Wasserman <msw@chromium.org> Commit-Queue: Dana Fried <dfried@chromium.org> Cr-Commit-Position: refs/heads/master@{#613603} [modify] https://crrev.com/6cdfa8d71ae521c8e55ee8259db174f15ed849f2/ui/views/bubble/bubble_frame_view.cc [modify] https://crrev.com/6cdfa8d71ae521c8e55ee8259db174f15ed849f2/ui/views/bubble/bubble_frame_view.h [modify] https://crrev.com/6cdfa8d71ae521c8e55ee8259db174f15ed849f2/ui/views/bubble/bubble_frame_view_unittest.cc [modify] https://crrev.com/6cdfa8d71ae521c8e55ee8259db174f15ed849f2/ui/views/controls/label.cc [modify] https://crrev.com/6cdfa8d71ae521c8e55ee8259db174f15ed849f2/ui/views/controls/label.h [modify] https://crrev.com/6cdfa8d71ae521c8e55ee8259db174f15ed849f2/ui/views/controls/label_unittest.cc [modify] https://crrev.com/6cdfa8d71ae521c8e55ee8259db174f15ed849f2/ui/views/controls/link.cc [modify] https://crrev.com/6cdfa8d71ae521c8e55ee8259db174f15ed849f2/ui/views/view.cc
,
Dec 4
|
||
►
Sign in to add a comment |
||
Comment 1 by dfried@chromium.org
, Dec 1