Commit 6f31c702 authored by David Black's avatar David Black Committed by Chromium LUCI CQ

Fix ink drop bounds in RTL.

Previously in RTL the ink drop was drawn outside of view bounds.

Bug: 1166271
Change-Id: I454871125239d40b65ee2b2606ae0953562e51c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627438Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#843213}
parent 49fefdb7
......@@ -169,6 +169,13 @@ bool HoldingSpaceItemView::HandleAccessibleAction(
views::InkDropHostView::HandleAccessibleAction(action_data);
}
void HoldingSpaceItemView::Layout() {
views::InkDropHostView::Layout();
// Ink drop bounds should always match the bounds for this view.
ink_drop_container_->SetSize(size());
}
void HoldingSpaceItemView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
// Inset `bounds` to account for stroke.
gfx::Rect bounds = GetLocalBounds();
......
......@@ -50,6 +50,7 @@ class ASH_EXPORT HoldingSpaceItemView : public views::InkDropHostView,
void RemoveLayerBeneathView(ui::Layer* layer) override;
SkColor GetInkDropBaseColor() const override;
bool HandleAccessibleAction(const ui::AXActionData& action_data) override;
void Layout() override;
void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
void OnFocus() override;
void OnBlur() 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