Commit 010cb7f6 authored by Wei Li's avatar Wei Li Committed by Commit Bot

Remove custom layout from PageInfoHoverButton

PageInfoHoverButton repeats some of its parents' Layout operations such
as those from View and LabelButton. But it also tries to skip
HoverButton and LabelButton's custom layout functions by directly
calling into Button's Layout(). Now, HoverButton no longer has a custom
layout function, LabelButton's custom layout is being removed, so we
should get rid of custom layout here too. Additionally, calling
LabelButton's custom layout will still be correct as the label and image
both are empty.

BUG=1005568

Change-Id: I0bba3bcc1c198b2c0ede90dff3894b8acdca1ba7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888398Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710836}
parent ad7a5060
......@@ -132,15 +132,6 @@ void PageInfoHoverButton::UpdateAccessibleName() {
HoverButton::SetAccessibleName(accessible_name);
}
// The following methods of HoverButton are overridden to bypass the layout
// logic implicit in the HoverButton class hierarchy.
void PageInfoHoverButton::Layout() {
ink_drop_container()->SetBoundsRect(GetLocalBounds());
if (GetLayoutManager())
GetLayoutManager()->Layout(this);
Button::Layout();
}
gfx::Size PageInfoHoverButton::CalculatePreferredSize() const {
return Button::CalculatePreferredSize();
}
......
......@@ -62,7 +62,6 @@ class PageInfoHoverButton : public HoverButton {
views::Label* subtitle() const { return subtitle_; }
views::View* icon_view() const { return icon_view_; }
// HoverButton:
void Layout() override;
void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
gfx::Size CalculatePreferredSize() const override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment