Commit 12010682 authored by Thomas Lukaszewicz's avatar Thomas Lukaszewicz Committed by Chromium LUCI CQ

Views: Add rounded corners support to NativeViewHostMac

This change will enable WebUI bubbles used in top chrome to conform
to the secondary UI spec on Mac platforms.

Before:
https://drive.google.com/file/d/12gCfewhEQrzLAPL2IkCYZy7P_NJNp_jp/view?usp=sharing

After:
https://drive.google.com/file/d/1mkz37-Vmpy6a8HGfvg_JMMiJXdirWtEn/view?usp=sharing

Bug: 1156290
Change-Id: I06b3ef9090cfb8f08c0e9ba095bdeb9807ba107d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577939Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834824}
parent 061b1e59
...@@ -155,8 +155,11 @@ void NativeViewHostMac::RemovedFromWidget() { ...@@ -155,8 +155,11 @@ void NativeViewHostMac::RemovedFromWidget() {
bool NativeViewHostMac::SetCornerRadii( bool NativeViewHostMac::SetCornerRadii(
const gfx::RoundedCornersF& corner_radii) { const gfx::RoundedCornersF& corner_radii) {
NOTIMPLEMENTED(); ui::Layer* layer = GetUiLayer();
return false; DCHECK(layer);
layer->SetRoundedCornerRadius(corner_radii);
layer->SetIsFastRoundedCorner(true);
return true;
} }
bool NativeViewHostMac::SetCustomMask(std::unique_ptr<ui::LayerOwner> mask) { bool NativeViewHostMac::SetCustomMask(std::unique_ptr<ui::LayerOwner> mask) {
......
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