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

Issue 2491113002: Fix form validation bubble positioning at hidpi. (Closed)

Created:
4 years, 1 month ago by Bret
Modified:
4 years, 1 month ago
Reviewers:
msw, sadrul
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix form validation bubble positioning at hidpi. Since use-zoom-for-dsf launched, when Blink converts to screen coordinates it needs to take the device scale factor into account. Normally it would do this by calling viewportToScreen or a similar function. However, because the validation bubble anchor is in viewport coordinates instead of screen coordinates, the positioning code needs to use device scale factor explicitly. The reason we can't just convert the anchor to screen coordinates in Blink is because the same anchor is used for cocoa. It needs to y-flip the anchor for OSX and converting to screen coordinates too early messes up that calculation. BUG=660840 Committed: https://crrev.com/5debc705a0b892bd2dcf82ec7672147268083957 Cr-Commit-Position: refs/heads/master@{#433349}

Patch Set 1 #

Patch Set 2 : resolve deps issue #

Patch Set 3 : override and comment in rwhv_base #

Total comments: 8

Patch Set 4 : change rwhv to render_widget_host_view #

Total comments: 1

Patch Set 5 : change dsf plumbing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -8 lines) Patch
M chrome/browser/ui/views/validation_message_bubble_view.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/validation_message_bubble_view.cc View 1 2 3 4 4 chunks +20 lines, -8 lines 0 comments Download

Messages

Total messages: 37 (20 generated)
Bret
msw: chrome/browser/ui/views/ sadrul: content/ (aura) (small change)
4 years, 1 month ago (2016-11-09 23:10:52 UTC) #3
msw
c/b/ui lgtm with nit/q https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc File chrome/browser/ui/views/validation_message_bubble_view.cc (right): https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc#newcode86 chrome/browser/ui/views/validation_message_bubble_view.cc:86: return gfx::ScaleToEnclosingRect(rect_in_root_view, 1 / scale) ...
4 years, 1 month ago (2016-11-10 18:59:14 UTC) #14
sadrul
https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc File chrome/browser/ui/views/validation_message_bubble_view.cc (right): https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc#newcode87 chrome/browser/ui/views/validation_message_bubble_view.cc:87: rwhv->GetViewBounds().origin().OffsetFromOrigin(); Can you use aura::client::ScreenPositionClient instead? That should work, ...
4 years, 1 month ago (2016-11-10 20:44:41 UTC) #15
Bret
https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc File chrome/browser/ui/views/validation_message_bubble_view.cc (right): https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc#newcode86 chrome/browser/ui/views/validation_message_bubble_view.cc:86: return gfx::ScaleToEnclosingRect(rect_in_root_view, 1 / scale) + On 2016/11/10 18:59:14, ...
4 years, 1 month ago (2016-11-11 23:51:28 UTC) #16
sadrul
https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc File chrome/browser/ui/views/validation_message_bubble_view.cc (right): https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc#newcode87 chrome/browser/ui/views/validation_message_bubble_view.cc:87: rwhv->GetViewBounds().origin().OffsetFromOrigin(); On 2016/11/11 23:51:27, Bret Sepulveda wrote: > On ...
4 years, 1 month ago (2016-11-12 02:30:44 UTC) #17
Bret
https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc File chrome/browser/ui/views/validation_message_bubble_view.cc (right): https://codereview.chromium.org/2491113002/diff/40001/chrome/browser/ui/views/validation_message_bubble_view.cc#newcode87 chrome/browser/ui/views/validation_message_bubble_view.cc:87: rwhv->GetViewBounds().origin().OffsetFromOrigin(); On 2016/11/12 02:30:44, sadrul wrote: > On 2016/11/11 ...
4 years, 1 month ago (2016-11-12 22:04:36 UTC) #18
sadrul
> Okay that plumbing does work. But as far as I can tell this whole ...
4 years, 1 month ago (2016-11-14 16:58:03 UTC) #19
Bret
On 2016/11/14 16:58:03, sadrul wrote: > > Okay that plumbing does work. But as far ...
4 years, 1 month ago (2016-11-15 23:28:41 UTC) #20
sadrul
On 2016/11/15 23:28:41, Bret Sepulveda wrote: > On 2016/11/14 16:58:03, sadrul wrote: > > > ...
4 years, 1 month ago (2016-11-16 18:11:49 UTC) #21
Bret
> > From what I can tell there are two ways popups get created: > ...
4 years, 1 month ago (2016-11-16 20:43:28 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2491113002/80001
4 years, 1 month ago (2016-11-16 20:44:03 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/274047)
4 years, 1 month ago (2016-11-17 01:09:26 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2491113002/80001
4 years, 1 month ago (2016-11-17 21:15:28 UTC) #29
commit-bot: I haz the power
Failed to apply the patch.
4 years, 1 month ago (2016-11-17 23:44:33 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2491113002/80001
4 years, 1 month ago (2016-11-18 21:17:46 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-19 00:28:16 UTC) #35
commit-bot: I haz the power
4 years, 1 month ago (2016-11-19 00:33:27 UTC) #37
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/5debc705a0b892bd2dcf82ec7672147268083957
Cr-Commit-Position: refs/heads/master@{#433349}

Powered by Google App Engine
This is Rietveld 408576698