New issue
Advanced search Search tips

Issue 910724 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 4
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

View::GetContentsBounds() is not consistent with View::GetInsets()

Project Member Reported by dfried@chromium.org, Nov 30

Issue description

View::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.
 
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment