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

Issue 140323005: Truncate the Javascript alert message if the length is too long on Mac port (Closed)

Created:
6 years, 11 months ago by yi
Modified:
6 years, 11 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Set the maximum lines number to 32 for Javascript alert message on Mac port. BUG=331219 R=jeremy@chromium.org TEST=Manual test please: Launch chrome and load the popup-bug.html in BUG331219 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246457 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247093

Patch Set 1 #

Total comments: 3

Patch Set 2 : updated patch #

Total comments: 1

Patch Set 3 : removed unnecessary code #

Patch Set 4 : update description #

Total comments: 1

Patch Set 5 : Truncate the alert message #

Total comments: 6

Patch Set 6 : updated patch #

Total comments: 1

Patch Set 7 : Use TruncateString #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -0 lines) Patch
M AUTHORS View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm View 1 2 3 4 5 6 2 chunks +22 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
yi
Jeremy, could you please review this for me. On linux port, the maximum lines number ...
6 years, 11 months ago (2014-01-20 22:55:07 UTC) #1
jeremy
https://codereview.chromium.org/140323005/diff/1/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm File chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm (right): https://codereview.chromium.org/140323005/diff/1/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm#newcode20 chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm:20: const int kMessageTextMaxRows = 32; This is a cross-platform ...
6 years, 11 months ago (2014-01-21 21:24:39 UTC) #2
yi
Thanks for review! Please check the comments below and I will provide a new patch ...
6 years, 11 months ago (2014-01-21 21:57:39 UTC) #3
yi
6 years, 11 months ago (2014-01-22 01:28:37 UTC) #4
jeremy
https://codereview.chromium.org/140323005/diff/60001/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm File chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm (right): https://codereview.chromium.org/140323005/diff/60001/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm#newcode159 chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm:159: info_array = [info_array valueForKey:@"description"]; What is this meant to ...
6 years, 11 months ago (2014-01-22 20:16:02 UTC) #5
yi
You are right. The valueForKey:@"description" is no need here. Removed from the patch.
6 years, 11 months ago (2014-01-22 22:00:26 UTC) #6
jeremy
LGTM
6 years, 11 months ago (2014-01-22 22:18:44 UTC) #7
yi
On 2014/01/22 22:18:44, jeremy wrote: > LGTM Many thanks, Jeremy. Could you please commit this ...
6 years, 11 months ago (2014-01-22 22:28:59 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yi.shen@samsung.com/140323005/140001
6 years, 11 months ago (2014-01-22 22:34:59 UTC) #9
commit-bot: I haz the power
Change committed as 246457
6 years, 11 months ago (2014-01-23 00:39:13 UTC) #10
Avi (use Gerrit)
I don't see this as usefully addressing the problem. Fire an alert with a meg ...
6 years, 11 months ago (2014-01-23 02:58:30 UTC) #11
Avi (use Gerrit)
Oh. Not LGTM.
6 years, 11 months ago (2014-01-23 03:00:04 UTC) #12
jeremy
A revert of this CL has been created in https://codereview.chromium.org/145023010/ by jeremy@chromium.org. The reason for ...
6 years, 11 months ago (2014-01-23 03:04:53 UTC) #13
yi
Avi is right - the previous patch doesn't handle the case when a long string ...
6 years, 11 months ago (2014-01-24 01:36:07 UTC) #14
Avi (use Gerrit)
I re-opened this CL for you. https://codereview.chromium.org/140323005/diff/420001/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm File chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm (right): https://codereview.chromium.org/140323005/diff/420001/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm#newcode157 chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm:157: informative_text = [[NSString ...
6 years, 11 months ago (2014-01-24 01:53:23 UTC) #15
yi
On 2014/01/24 01:53:23, Avi wrote: > I re-opened this CL for you. > Thank you ...
6 years, 11 months ago (2014-01-24 02:12:42 UTC) #16
yi
Simplified the truncation algorithm for the long JS alert message. The gfx::TruncateString is not proper ...
6 years, 11 months ago (2014-01-24 19:59:25 UTC) #17
Avi (use Gerrit)
https://codereview.chromium.org/140323005/diff/460001/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm File chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm (right): https://codereview.chromium.org/140323005/diff/460001/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm#newcode163 chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm:163: informative_text = [informative_text substringToIndex:index - 1]; > The gfx::TruncateString ...
6 years, 11 months ago (2014-01-24 20:08:01 UTC) #18
yi
You are right Avi. I just updated the patch which is using TruncateString to truncate ...
6 years, 11 months ago (2014-01-24 20:41:48 UTC) #19
Avi (use Gerrit)
LGTM
6 years, 11 months ago (2014-01-24 21:08:30 UTC) #20
yi
On 2014/01/24 21:08:30, Avi wrote: > LGTM Thanks Avi! Could you please help me commit ...
6 years, 11 months ago (2014-01-24 21:14:15 UTC) #21
Avi (use Gerrit)
On 2014/01/24 21:14:15, yi wrote: > On 2014/01/24 21:08:30, Avi wrote: > > LGTM > ...
6 years, 11 months ago (2014-01-24 21:18:29 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yi.shen@samsung.com/140323005/490001
6 years, 11 months ago (2014-01-24 21:21:00 UTC) #23
yi
On 2014/01/24 21:18:29, Avi wrote: > On 2014/01/24 21:14:15, yi wrote: > > On 2014/01/24 ...
6 years, 11 months ago (2014-01-24 21:32:08 UTC) #24
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) telemetry_perf_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=251598
6 years, 11 months ago (2014-01-24 22:26:41 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yi.shen@samsung.com/140323005/490001
6 years, 11 months ago (2014-01-25 02:16:37 UTC) #26
commit-bot: I haz the power
6 years, 11 months ago (2014-01-25 07:43:19 UTC) #27
Message was sent while issue was closed.
Change committed as 247093

Powered by Google App Engine
This is Rietveld 408576698