|
|
Chromium Code Reviews
DescriptionFix Aura can't provide accurate cursor hotspot info.
On Linux, device scale factor is not set.
On Win, there is no API to offer hotspot of a cursor.
This cl addresses the above two problems.
BUG=676687
Review-Url: https://codereview.chromium.org/2605773002
Cr-Commit-Position: refs/heads/master@{#441790}
Committed: https://chromium.googlesource.com/chromium/src/+/2f1d5f56541d4200134418bff40902734d4fe7ce
Patch Set 1 #
Total comments: 6
Patch Set 2 : address comments #Patch Set 3 : restore logic in SearchTable() #
Messages
Total messages: 27 (17 generated)
The CQ bit was checked by braveyao@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
braveyao@chromium.org changed reviewers: + sadrul@chromium.org
Hi sadrul@, this is the cl I mentioned in the email, which solved the cursor hotspot issue in Aura. Please take a look.
sadrul@chromium.org changed reviewers: + ananta@chromium.org
+ananta@ for windows related change. https://codereview.chromium.org/2605773002/diff/1/ui/base/cursor/cursors_aura.cc File ui/base/cursor/cursors_aura.cc (right): https://codereview.chromium.org/2605773002/diff/1/ui/base/cursor/cursors_aura... ui/base/cursor/cursors_aura.cc:180: : gfx::Point(table[i].hot_2x.x, table[i].hot_2x.y); Why change this? https://codereview.chromium.org/2605773002/diff/1/ui/gfx/icon_util.cc File ui/gfx/icon_util.cc (right): https://codereview.chromium.org/2605773002/diff/1/ui/gfx/icon_util.cc#newcode375 ui/gfx/icon_util.cc:375: if (::GetIconInfo(icon, &icon_info)) { Don't need {}
The CQ bit was checked by braveyao@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
comments addressed and replied. PTAL. https://codereview.chromium.org/2605773002/diff/1/ui/base/cursor/cursors_aura.cc File ui/base/cursor/cursors_aura.cc (right): https://codereview.chromium.org/2605773002/diff/1/ui/base/cursor/cursors_aura... ui/base/cursor/cursors_aura.cc:180: : gfx::Point(table[i].hot_2x.x, table[i].hot_2x.y); On 2017/01/03 17:18:09, sadrul wrote: > Why change this? To make the 1x as the default, which I suppose could cover the most cases(especially for the scale factor missing). This may not be needed after this fix. But still good to have. WDYT? https://codereview.chromium.org/2605773002/diff/1/ui/gfx/icon_util.cc File ui/gfx/icon_util.cc (right): https://codereview.chromium.org/2605773002/diff/1/ui/gfx/icon_util.cc#newcode375 ui/gfx/icon_util.cc:375: if (::GetIconInfo(icon, &icon_info)) { On 2017/01/03 17:18:09, sadrul wrote: > Don't need {} Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2605773002/diff/1/ui/base/cursor/cursors_aura.cc File ui/base/cursor/cursors_aura.cc (right): https://codereview.chromium.org/2605773002/diff/1/ui/base/cursor/cursors_aura... ui/base/cursor/cursors_aura.cc:180: : gfx::Point(table[i].hot_2x.x, table[i].hot_2x.y); On 2017/01/03 17:30:51, braveyao wrote: > On 2017/01/03 17:18:09, sadrul wrote: > > Why change this? > > To make the 1x as the default, which I suppose could cover the most > cases(especially for the scale factor missing). This may not be needed after > this fix. But still good to have. WDYT? I think we prefer the 2x versions for other image resources when scale factor != 1, at least on ChromeOS (and > 1.25 on windows, looks like) [*]. Is there a reason for cursors to be different? *: https://cs.chromium.org/chromium/src/ui/base/resource/resource_bundle.cc?sq=p...
The CQ bit was checked by braveyao@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Hi sadrul@, thanks for the clarification. That modification is restored. PTAL. https://codereview.chromium.org/2605773002/diff/1/ui/base/cursor/cursors_aura.cc File ui/base/cursor/cursors_aura.cc (right): https://codereview.chromium.org/2605773002/diff/1/ui/base/cursor/cursors_aura... ui/base/cursor/cursors_aura.cc:180: : gfx::Point(table[i].hot_2x.x, table[i].hot_2x.y); On 2017/01/04 16:16:24, sadrul wrote: > On 2017/01/03 17:30:51, braveyao wrote: > > On 2017/01/03 17:18:09, sadrul wrote: > > > Why change this? > > > > To make the 1x as the default, which I suppose could cover the most > > cases(especially for the scale factor missing). This may not be needed after > > this fix. But still good to have. WDYT? > > I think we prefer the 2x versions for other image resources when scale factor != > 1, at least on ChromeOS (and > 1.25 on windows, looks like) [*]. Is there a > reason for cursors to be different? > > *: > https://cs.chromium.org/chromium/src/ui/base/resource/resource_bundle.cc?sq=p... Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Hi ananta@, please help to take a look at the Window related changes in ui/gfx/icon_util.h/cc.
ui/base/ lgtm Please wait for approval from ananta@ (or maybe sky@?) for the ui/gfx/ change
lgtm
The CQ bit was checked by braveyao@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1483652829959620,
"parent_rev": "9d13a9813130450975149a1a05a1e4094ed407a0", "commit_rev":
"2f1d5f56541d4200134418bff40902734d4fe7ce"}
Message was sent while issue was closed.
Description was changed from ========== Fix Aura can't provide accurate cursor hotspot info. On Linux, device scale factor is not set. On Win, there is no API to offer hotspot of a cursor. This cl addresses the above two problems. BUG=676687 ========== to ========== Fix Aura can't provide accurate cursor hotspot info. On Linux, device scale factor is not set. On Win, there is no API to offer hotspot of a cursor. This cl addresses the above two problems. BUG=676687 Review-Url: https://codereview.chromium.org/2605773002 Cr-Commit-Position: refs/heads/master@{#441790} Committed: https://chromium.googlesource.com/chromium/src/+/2f1d5f56541d4200134418bff409... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/2f1d5f56541d4200134418bff409... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
