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

Issue 8598015: Do not allow multiline input when naming bookmarks/folders on Mac (Closed)

Created:
9 years, 1 month ago by KushalP
Modified:
9 years ago
Reviewers:
mrossetti, Ilya Sherman
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Do not allow multiline input when naming bookmark folders on Mac - the respective nibs now use Single Line Mode for title entry - BookmarkModel has been updated (with test cases) to strip extra whitespace for folder/bookmark titles. BUG=100618 TEST=BookmarkModelTest.AddURLWithWhitespaceTitle, BookmarkModelTest.AddFolderWithWhitespaceTitle, BookmarkModelTest.SetTitleWithWhitespace Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112400

Patch Set 1 #

Total comments: 1

Patch Set 2 : move newline change into BookmarkModel #

Total comments: 3

Patch Set 3 : Single Line Mode nibs; Move header; Bookmarks are now single line #

Total comments: 6

Patch Set 4 : iterate test cases; lowercase comment; remove previous .mm file changes #

Patch Set 5 : rebase to LKGR to see if it fixes mac trybot #

Total comments: 1

Patch Set 6 : rename test_cases to whitespace_test_cases #

Patch Set 7 : nibs no longer use Single Line Mode #

Patch Set 8 : add support for setUsesSingleLineMode #

Patch Set 9 : got setUsesSingleLineMode working for AddFolder BMB window #

Patch Set 10 : NSCell; got all folders to only accept single-line input #

Total comments: 1

Patch Set 11 : pointer placement nit; move category into header file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -4 lines) Patch
M chrome/browser/bookmarks/bookmark_model.cc View 1 2 3 5 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_model_unittest.cc View 1 2 3 4 5 6 4 chunks +74 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/bookmarks/bookmark_cell_single_line.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
KushalP
The code in its current state compiles fine and the tests work locally. However, when ...
9 years, 1 month ago (2011-11-18 16:33:52 UTC) #1
KushalP
After a little thought, I think it may be because I'm only checking for "\n" ...
9 years, 1 month ago (2011-11-18 17:14:31 UTC) #2
mrossetti
Okay, no answer, just a hint: Have you considered making a change in the nib? ...
9 years, 1 month ago (2011-11-18 18:01:34 UTC) #3
sky
I've removed myself as a reviewer. Ilya or mrosetti should be good enough (mrosetti is ...
9 years, 1 month ago (2011-11-18 19:01:18 UTC) #4
Ilya Sherman
http://codereview.chromium.org/8598015/diff/1/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm (right): http://codereview.chromium.org/8598015/diff/1/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm#newcode114 chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm:114: model->SetTitle(node_, base::SysNSStringToUTF16(clean_name)); Since I don't think our other platforms ...
9 years, 1 month ago (2011-11-18 22:51:28 UTC) #5
KushalP
I thought about that, but then if you change it at the nib level it ...
9 years, 1 month ago (2011-11-19 11:24:38 UTC) #6
KushalP
Sure. I've got a working solution now for the cocoa version. The problem was that ...
9 years, 1 month ago (2011-11-19 11:35:13 UTC) #7
KushalP
Also, I didn't receive emails for the two replies from mrossetti and sky. I only ...
9 years, 1 month ago (2011-11-19 11:39:20 UTC) #8
KushalP
Code updated and it's currently running through the trybots. Ready for a review.
9 years, 1 month ago (2011-11-19 18:29:12 UTC) #9
KushalP
Just looked at the Win failure., I'm not entirely sure if that's me. The whitespace ...
9 years, 1 month ago (2011-11-20 00:31:15 UTC) #10
KushalP
Just had a look at the Win failure. I don't think that failure is due ...
9 years, 1 month ago (2011-11-21 16:00:40 UTC) #11
mrossetti
Did you _try_ changing the nib by turning on Uses Single Line Mode for the ...
9 years, 1 month ago (2011-11-21 18:24:20 UTC) #12
mrossetti
One more question: Should we also be stripping CR/LFs from regular bookmarks, too? BTW, with ...
9 years, 1 month ago (2011-11-21 18:30:13 UTC) #13
KushalP
On 2011/11/21 18:30:13, mrossetti wrote: > One more question: Should we also be stripping CR/LFs ...
9 years, 1 month ago (2011-11-21 18:34:27 UTC) #14
KushalP
On 2011/11/21 18:24:20, mrossetti wrote: > Did you _try_ changing the nib by turning on ...
9 years, 1 month ago (2011-11-21 21:11:36 UTC) #15
Ilya Sherman
http://codereview.chromium.org/8598015/diff/7002/chrome/browser/bookmarks/bookmark_model.cc File chrome/browser/bookmarks/bookmark_model.cc (right): http://codereview.chromium.org/8598015/diff/7002/chrome/browser/bookmarks/bookmark_model.cc#newcode310 chrome/browser/bookmarks/bookmark_model.cc:310: // Remove line break whitespace from Folder names. Hmm, ...
9 years, 1 month ago (2011-11-21 21:36:10 UTC) #16
KushalP
http://codereview.chromium.org/8598015/diff/7002/chrome/browser/bookmarks/bookmark_model.cc File chrome/browser/bookmarks/bookmark_model.cc (right): http://codereview.chromium.org/8598015/diff/7002/chrome/browser/bookmarks/bookmark_model.cc#newcode310 chrome/browser/bookmarks/bookmark_model.cc:310: // Remove line break whitespace from Folder names. On ...
9 years, 1 month ago (2011-11-21 22:14:14 UTC) #17
KushalP
@Ilya your previous comments (from Patch Set 2) have been handled in Patch Set 3. ...
9 years, 1 month ago (2011-11-22 00:57:59 UTC) #18
Ilya Sherman
http://codereview.chromium.org/8598015/diff/15002/chrome/browser/bookmarks/bookmark_model.cc File chrome/browser/bookmarks/bookmark_model.cc (right): http://codereview.chromium.org/8598015/diff/15002/chrome/browser/bookmarks/bookmark_model.cc#newcode309 chrome/browser/bookmarks/bookmark_model.cc:309: // Remove extra whitespace from Folder/Bookmark names. nit: No ...
9 years, 1 month ago (2011-11-22 01:18:16 UTC) #19
KushalP
New Patch Set uploaded and it's currently running through the trybots. Ready to review when ...
9 years, 1 month ago (2011-11-22 18:52:15 UTC) #20
KushalP
Just rebased (no real changes to patch sets) to LKGR. Hopefully that will fix the ...
9 years, 1 month ago (2011-11-22 19:27:25 UTC) #21
mrossetti
On 2011/11/22 19:27:25, KushalP wrote: > Just rebased (no real changes to patch sets) to ...
9 years, 1 month ago (2011-11-22 19:33:33 UTC) #22
Ilya Sherman
Bookmarks model changes l g t m (with a nit). For the Xib changes, have ...
9 years, 1 month ago (2011-11-22 21:00:35 UTC) #23
mrossetti
LGTM, one the bots are clear. Note: I'm fine with the nib file platform warning. ...
9 years, 1 month ago (2011-11-22 21:29:18 UTC) #24
KushalP
On 2011/11/22 19:33:33, mrossetti wrote: > FYI, there was a thread on this earlier: > ...
9 years, 1 month ago (2011-11-22 21:43:58 UTC) #25
KushalP
On 2011/11/22 21:00:35, Ilya Sherman wrote: > Bookmarks model changes l g t m (with ...
9 years, 1 month ago (2011-11-22 21:48:22 UTC) #26
Ilya Sherman
On 2011/11/22 21:48:22, KushalP wrote: > On 2011/11/22 21:00:35, Ilya Sherman wrote: > > Bookmarks ...
9 years, 1 month ago (2011-11-22 21:54:02 UTC) #27
Ilya Sherman
Nico (thakis) suggested on IRC setting the single-line flag from code rather than in the ...
9 years, 1 month ago (2011-11-22 22:00:01 UTC) #28
KushalP
From discussions on IRC, this was chosen to be the preferred way to pull off ...
9 years, 1 month ago (2011-11-23 01:02:21 UTC) #29
mrossetti
On 2011/11/23 01:02:21, KushalP wrote: > From discussions on IRC, this was chosen to be ...
9 years, 1 month ago (2011-11-23 04:22:18 UTC) #30
KushalP
On 2011/11/23 04:22:18, mrossetti wrote: > Sigh. There is no way. At this point I'd ...
9 years, 1 month ago (2011-11-23 09:42:15 UTC) #31
Ilya Sherman
On 2011/11/23 01:02:21, KushalP wrote: > From discussions on IRC, this was chosen to be ...
9 years, 1 month ago (2011-11-23 10:21:27 UTC) #32
KushalP
On 2011/11/23 10:21:27, Ilya Sherman wrote: > What if you cast |nameTextField_| to an |id| ...
9 years, 1 month ago (2011-11-23 10:24:09 UTC) #33
KushalP
Just had a quick look through the docs. It appears that NSCell (and children) have ...
9 years, 1 month ago (2011-11-23 10:43:21 UTC) #34
Ilya Sherman
On 2011/11/23 10:43:21, KushalP wrote: > Just had a quick look through the docs. It ...
9 years, 1 month ago (2011-11-23 19:41:22 UTC) #35
KushalP
Things that were tried and haven't worked: // calling against id id nameCell = [nameTextField_ ...
9 years, 1 month ago (2011-11-24 00:58:15 UTC) #36
Ilya Sherman
On 2011/11/24 00:58:15, KushalP wrote: > Things that were tried and haven't worked: > > ...
9 years, 1 month ago (2011-11-24 01:15:50 UTC) #37
KushalP
Tried categories again today. A clobber got it working! :D However, I'm on Snow Leopard ...
9 years, 1 month ago (2011-11-24 18:00:33 UTC) #38
KushalP
Looks like my change in Patch Set 8 is in the wrong place. Running this ...
9 years ago (2011-11-28 16:52:54 UTC) #39
Ilya Sherman
On 2011/11/24 18:00:33, KushalP wrote: > Tried categories again today. A clobber got it working! ...
9 years ago (2011-11-28 23:56:29 UTC) #40
KushalP
On 2011/11/28 23:56:29, Ilya Sherman wrote: > For debugging, I might recommend creating a small ...
9 years ago (2011-11-29 18:37:04 UTC) #41
KushalP
Patch Set 10 now prevents folders from having multiline input in the most obvious ways ...
9 years ago (2011-11-30 00:51:42 UTC) #42
Ilya Sherman
On 2011/11/30 00:51:42, KushalP wrote: > Patch Set 10 now prevents folders from having multiline ...
9 years ago (2011-11-30 06:09:27 UTC) #43
Ilya Sherman
http://codereview.chromium.org/8598015/diff/50004/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm (right): http://codereview.chromium.org/8598015/diff/50004/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm#newcode572 chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm:572: NSCell *folderCell = [folderTreeView_ preparedCellAtColumn:0 row:row]; nit: "NSCell *" ...
9 years ago (2011-11-30 06:09:38 UTC) #44
KushalP
Updated for nits and is currently running through the trybots.
9 years ago (2011-11-30 12:55:21 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kushi.p@gmail.com/8598015/54002
9 years ago (2011-12-01 02:28:33 UTC) #46
commit-bot: I haz the power
9 years ago (2011-12-01 04:34:05 UTC) #47
Change committed as 112400

Powered by Google App Engine
This is Rietveld 408576698