|
|
Created:
4 years, 10 months ago by Avi (use Gerrit) Modified:
4 years, 10 months ago CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionRestrict JavaScript dialogs to 100 characters.
BUG=587962
TEST=none; welcome to the new reality
Patch Set 1 #Patch Set 2 : unload too #
Total comments: 1
Patch Set 3 : palmer #
Total comments: 2
Patch Set 4 : better approach #Messages
Total messages: 27 (9 generated)
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711863004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711863004/1
avi@chromium.org changed reviewers: + palmer@chromium.org
The new reality LGTM.
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711863004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711863004/20001
https://codereview.chromium.org/1711863004/diff/20001/components/app_modal/ja... File components/app_modal/javascript_dialog_manager.cc (right): https://codereview.chromium.org/1711863004/diff/20001/components/app_modal/ja... components/app_modal/javascript_dialog_manager.cc:193: gfx::TruncateString(message_text, 100, gfx::CHARACTER_BREAK) + Rather than repeat the code and comment, abstract it into its own little function? Also, calling a truncated string |full_message| looks a bit odd.
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Chris, ptal.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711863004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711863004/40001
esprehn@chromium.org changed reviewers: + esprehn@chromium.org
Not lgtm, this is not the right layer for this. The truncation should be inside blink and should warn in the console.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
|TruncateMessage| LGTM. > Not lgtm, this is not the right layer for this. The truncation should be inside > blink and should warn in the console. I disagree about the layering: This is a UX policy choice. Other Blink and content/ embedders should be allowed to set their own policies. Logging on the console is a reasonable idea, of course.
On 2016/02/18 22:57:11, palmer wrote: > |TruncateMessage| LGTM. > > > Not lgtm, this is not the right layer for this. The truncation should be > inside > > blink and should warn in the console. > > I disagree about the layering: This is a UX policy choice. Other Blink and > content/ embedders should be allowed to set their own policies. > > Logging on the console is a reasonable idea, of course. As suggested by Dmitri, I am going to turn this into an intent-to-ship. Coming soon to blink-dev.
On 2016/02/18 at 23:00:24, avi wrote: > On 2016/02/18 22:57:11, palmer wrote: > > |TruncateMessage| LGTM. > > > > > Not lgtm, this is not the right layer for this. The truncation should be > > inside > > > blink and should warn in the console. > > > > I disagree about the layering: This is a UX policy choice. Other Blink and > > content/ embedders should be allowed to set their own policies. > > > > Logging on the console is a reasonable idea, of course. > > As suggested by Dmitri, I am going to turn this into an intent-to-ship. Coming soon to blink-dev. There are no other embedders of Blink except Chrome, it's not a generic rendering engine, it's Chrome's rendering engine. :) This is also web facing, and will impact content all over the web. Authors will need to know, potentially billions of pages will need to change. Did you use count how often the string is longer than 100 characters? Do you know how often this triggers? How does an author find out what happened and what the limit is without the console warning? This should be in blink.
On 2016/02/18 23:00:24, Avi wrote: > On 2016/02/18 22:57:11, palmer wrote: > > |TruncateMessage| LGTM. > > > > > Not lgtm, this is not the right layer for this. The truncation should be > > inside > > > blink and should warn in the console. > > > > I disagree about the layering: This is a UX policy choice. Other Blink and > > content/ embedders should be allowed to set their own policies. > > > > Logging on the console is a reasonable idea, of course. > > As suggested by Dmitri, I am going to turn this into an intent-to-ship. Coming > soon to blink-dev. https://groups.google.com/a/chromium.org/d/msg/blink-dev/cFtsKXKd4F0/BOH61FjX...
pkasting@chromium.org changed reviewers: + pkasting@chromium.org
https://codereview.chromium.org/1711863004/diff/40001/components/app_modal/ja... File components/app_modal/javascript_dialog_manager.cc (right): https://codereview.chromium.org/1711863004/diff/40001/components/app_modal/ja... components/app_modal/javascript_dialog_manager.cc:64: return gfx::TruncateString(message, 100, gfx::CHARACTER_BREAK); Please use an eliding method rather than a truncation method so that at least the message looks like we've elided it instead of just looking like a bug.
The CQ bit was checked by avi@chromium.org to run a CQ dry run
https://codereview.chromium.org/1711863004/diff/40001/components/app_modal/ja... File components/app_modal/javascript_dialog_manager.cc (right): https://codereview.chromium.org/1711863004/diff/40001/components/app_modal/ja... components/app_modal/javascript_dialog_manager.cc:64: return gfx::TruncateString(message, 100, gfx::CHARACTER_BREAK); On 2016/02/19 02:18:34, Peter Kasting wrote: > Please use an eliding method rather than a truncation method so that at least > the message looks like we've elided it instead of just looking like a bug. This was a bad implementation; doing it in a new way in the new patchset.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711863004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711863004/60001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/02/19 03:28:36, commit-bot: I haz the power wrote: > Dry run: This issue passed the CQ dry run. I'm going to close this out for now; I have metrics coming to help us make this decision. |