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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements.cc

Issue 2710593008: [VR Shell] Fix hidden elements being hit-testable. (Closed)
Patch Set: Ooops Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/vr_shell/ui_elements.h" 5 #include "chrome/browser/android/vr_shell/ui_elements.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/android/vr_shell/animation.h" 10 #include "chrome/browser/android/vr_shell/animation.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 ++it; 189 ++it;
190 } 190 }
191 } 191 }
192 } 192 }
193 193
194 bool ContentRectangle::IsVisible() const { 194 bool ContentRectangle::IsVisible() const {
195 return visible && computed_opacity > 0.0f; 195 return visible && computed_opacity > 0.0f;
196 } 196 }
197 197
198 bool ContentRectangle::IsHitTestable() const { 198 bool ContentRectangle::IsHitTestable() const {
199 return hit_testable; 199 return IsVisible() && hit_testable;
200 } 200 }
201 201
202 } // namespace vr_shell 202 } // namespace vr_shell
203 203
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/vr_shell/vr_shell_ui.js » ('j') | chrome/browser/resources/vr_shell/vr_shell_ui.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698