Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Issue 456943004: Fix SetShape (SetAlphaShape) to allow Null regions (+ tests). (Closed)

Created:
6 years, 4 months ago by garykac
Modified:
6 years, 4 months ago
Reviewers:
sky, Zachary Kuznia
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, ben+views_chromium.org, tdanderson+views_chromium.org, tfarina, extensions-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Fix SetShape (SetAlphaShape) to allow Null regions (+ tests). SetAlphaShape uses a filter to enforce min/max transparency on the window shape specified by the user. This transparency clamping is required by security to ship the SetShape feature. We added the call to SetAlphaShape earlier, but we needed to temporarily remove it because of bugs with HiDPI devices and NULL shapes. The issue with HiDPI devices has been fixed in crrev.com/394193003. This cl fixes Null shape and re-adds the call to SetAlphaShape so that we can enable this feature on Stable. BUG=324071 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288889

Patch Set 1 #

Patch Set 2 : #

Total comments: 5

Patch Set 3 : Remove unnecessary if(region) #

Patch Set 4 : Move SetAlphaShape into native_widget's SetShape #

Total comments: 4

Patch Set 5 : Add missing delete; Remove unnecessary layer check" #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -6 lines) Patch
M chrome/browser/extensions/api/app_window/app_window_apitest.cc View 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/windows_api_shape/background.js View 1 chunk +42 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/windows_api_shape/index.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/windows_api_shape/manifest.json View 1 1 chunk +3 lines, -2 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 chunk +8 lines, -3 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_aura.cc View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
garykac
6 years, 4 months ago (2014-08-09 01:26:49 UTC) #1
sky
https://codereview.chromium.org/456943004/diff/20001/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc File chrome/browser/ui/views/apps/chrome_native_app_window_views.cc (right): https://codereview.chromium.org/456943004/diff/20001/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc#newcode664 chrome/browser/ui/views/apps/chrome_native_app_window_views.cc:664: native_window->layer()->SetAlphaShape( Why don't we implement this in the NativeWidget ...
6 years, 4 months ago (2014-08-11 15:26:38 UTC) #2
garykac
https://codereview.chromium.org/456943004/diff/20001/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc File chrome/browser/ui/views/apps/chrome_native_app_window_views.cc (right): https://codereview.chromium.org/456943004/diff/20001/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc#newcode664 chrome/browser/ui/views/apps/chrome_native_app_window_views.cc:664: native_window->layer()->SetAlphaShape( On 2014/08/11 15:26:37, sky wrote: > Why don't ...
6 years, 4 months ago (2014-08-11 18:19:09 UTC) #3
Zachary Kuznia
https://codereview.chromium.org/456943004/diff/20001/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc File chrome/browser/ui/views/apps/chrome_native_app_window_views.cc (right): https://codereview.chromium.org/456943004/diff/20001/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc#newcode664 chrome/browser/ui/views/apps/chrome_native_app_window_views.cc:664: native_window->layer()->SetAlphaShape( On 2014/08/11 18:19:09, garykac wrote: > On 2014/08/11 ...
6 years, 4 months ago (2014-08-11 20:05:14 UTC) #4
garykac
On 2014/08/11 20:05:14, Zachary Kuznia wrote: > https://codereview.chromium.org/456943004/diff/20001/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc > File chrome/browser/ui/views/apps/chrome_native_app_window_views.cc (right): > > https://codereview.chromium.org/456943004/diff/20001/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc#newcode664 ...
6 years, 4 months ago (2014-08-11 21:27:54 UTC) #5
sky
https://codereview.chromium.org/456943004/diff/60001/ui/views/widget/native_widget_aura.cc File ui/views/widget/native_widget_aura.cc (right): https://codereview.chromium.org/456943004/diff/60001/ui/views/widget/native_widget_aura.cc#newcode441 ui/views/widget/native_widget_aura.cc:441: if (window_ && window_->layer()) no need for the window_->layer() ...
6 years, 4 months ago (2014-08-11 23:06:18 UTC) #6
garykac
https://codereview.chromium.org/456943004/diff/60001/ui/views/widget/native_widget_aura.cc File ui/views/widget/native_widget_aura.cc (right): https://codereview.chromium.org/456943004/diff/60001/ui/views/widget/native_widget_aura.cc#newcode441 ui/views/widget/native_widget_aura.cc:441: if (window_ && window_->layer()) On 2014/08/11 23:06:18, sky wrote: ...
6 years, 4 months ago (2014-08-11 23:20:56 UTC) #7
sky
LGTM
6 years, 4 months ago (2014-08-11 23:23:30 UTC) #8
garykac
The CQ bit was checked by garykac@chromium.org
6 years, 4 months ago (2014-08-11 23:25:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/garykac@chromium.org/456943004/80001
6 years, 4 months ago (2014-08-11 23:27:00 UTC) #10
commit-bot: I haz the power
6 years, 4 months ago (2014-08-12 03:11:43 UTC) #11
Message was sent while issue was closed.
Change committed as 288889

Powered by Google App Engine
This is Rietveld 408576698