Commit 3a97998d authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

[VK] Clarify occluded vs visual bounds in NotificationManager.

NotificationManager::SendNotifications takes an argument
|bounds_affect_layout|, but it's unclear from the name what type of
bounds it is. The sole caller of SendNotifications uses occluded bounds,
so we assume that that's the intention.

(occluded) |bounds_affect_layout| is used to determine what the
displaced bounds are. Our naming change exposes a "bug": if the
occluded bounds affect layout, we set the displaced bounds to the
visual bounds. This is not right; we should be using the occluded
bounds. This makes sense, because for future features like fullscreen
handwriting where the visual bounds fill the entire screen, we should
only displace what is actually occluded.

TBR=blakeo@chromium.org

Change-Id: Ie6a9d04294cba5b4bf23009f9300698e2946079f
Reviewed-on: https://chromium-review.googlesource.com/1146526Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577456}
parent 112e1c4a
......@@ -27,7 +27,7 @@ bool ValueNotificationConsolidator<T>::ShouldSendNotification(
NotificationManager::NotificationManager() {}
void NotificationManager::SendNotifications(
bool bounds_affect_layout,
bool does_occluded_bounds_affect_layout,
bool is_locked,
const gfx::Rect& visual_bounds,
const gfx::Rect& occluded_bounds,
......@@ -43,7 +43,7 @@ void NotificationManager::SendNotifications(
ShouldSendOccludedBoundsNotification(occluded_bounds);
const gfx::Rect workspace_layout_offset_region =
bounds_affect_layout ? visual_bounds : gfx::Rect();
does_occluded_bounds_affect_layout ? occluded_bounds : gfx::Rect();
bool send_displaced_bounds_notification =
ShouldSendWorkspaceDisplacementBoundsNotification(
workspace_layout_offset_region);
......
......@@ -38,7 +38,7 @@ class KEYBOARD_EXPORT NotificationManager {
// - layout displacement bounds change
// - general visibility change
void SendNotifications(
bool bounds_affect_layout,
bool does_occluded_bounds_affect_layout,
bool is_locked,
const gfx::Rect& visual_bounds,
const gfx::Rect& occluded_bounds,
......
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