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

Issue 126075: Fix http://crbug.com/13971: OSX: Text copied from Omnibox is styled (Closed)

Created:
11 years, 6 months ago by jeremy
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski
Visibility:
Public.

Description

Fix http://crbug.com/13971: OSX: Text copied from Omnibox is styled Provide a custom field editor for the location bar that overrides cut/copy to only write plain text to the clipboard. BUG=13971 TEST=Type a URL in the Omnibox, select all and copy url, open Textedit and paste the url into it. Expected results: url should be unstyled previous behavior: styled text (as it appeared in the Omnibox was pasted) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=18425

Patch Set 1 #

Total comments: 14

Patch Set 2 : address scott's comments + unit tests goodness :) #

Total comments: 11

Patch Set 3 : Fix-ed #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -4 lines) Patch
M chrome/browser/cocoa/browser_window_controller.mm View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/location_bar_fieldeditor_unittest.mm View 2 1 chunk +88 lines, -0 lines 1 comment Download
M chrome/browser/cocoa/toolbar_controller.h View 1 2 4 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller.mm View 1 2 3 chunks +41 lines, -4 lines 0 comments Download
M chrome/chrome.gyp View 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
jeremy
Sending to shess for a preliminary look. Unit test will (hopefully) be included in final ...
11 years, 6 months ago (2009-06-12 22:37:18 UTC) #1
Scott Hess - ex-Googler
Overall, I think I'm +1 on your approach, with nits. http://codereview.chromium.org/126075/diff/1/3 File chrome/browser/cocoa/toolbar_controller.h (right): http://codereview.chromium.org/126075/diff/1/3#newcode15 ...
11 years, 6 months ago (2009-06-12 23:04:27 UTC) #2
Scott Hess - ex-Googler
Just a note for the ages: -[NSTextFieldCell setUpFieldEditorAttributes:] may also be able to manage this. ...
11 years, 6 months ago (2009-06-12 23:07:29 UTC) #3
jeremy
Now with unit tests. All comments addressed. http://codereview.chromium.org/126075/diff/1/3 File chrome/browser/cocoa/toolbar_controller.h (right): http://codereview.chromium.org/126075/diff/1/3#newcode15 Line 15: @class ...
11 years, 6 months ago (2009-06-13 00:02:59 UTC) #4
Scott Hess - ex-Googler
http://codereview.chromium.org/126075/diff/1/3 File chrome/browser/cocoa/toolbar_controller.h (right): http://codereview.chromium.org/126075/diff/1/3#newcode41 Line 41: LocationBarFieldEditor* locationBarFieldEditor_; // strong On 2009/06/13 00:03:00, jeremy ...
11 years, 6 months ago (2009-06-13 01:10:24 UTC) #5
Scott Hess - ex-Googler
http://codereview.chromium.org/126075/diff/1007/8 File chrome/browser/cocoa/location_bar_fieldeditor_unittest.mm (right): http://codereview.chromium.org/126075/diff/1007/8#newcode22 Line 22: return [NSPasteboard pasteboardWithName:pasteboard_name]; Just wondering if you could ...
11 years, 6 months ago (2009-06-13 01:20:59 UTC) #6
jeremy
http://codereview.chromium.org/126075/diff/1007/7 File chrome/browser/cocoa/browser_window_controller.mm (right): http://codereview.chromium.org/126075/diff/1007/7#newcode743 Line 743: // for the specific object. On 2009/06/13 01:10:24, ...
11 years, 6 months ago (2009-06-15 16:43:33 UTC) #7
Scott Hess - ex-Googler
11 years, 6 months ago (2009-06-15 18:22:29 UTC) #8
LGTM, with style nit.

http://codereview.chromium.org/126075/diff/1012/1014
File chrome/browser/cocoa/location_bar_fieldeditor_unittest.mm (right):

http://codereview.chromium.org/126075/diff/1012/1014#newcode87
Line 87: ASSERT_EQ([[field_editor.get() textStorage] length], (NSUInteger)0);
I assume the cast is because of a type mismatch?  I don't want to be the bearer
of this news, but ... static_cast<NSUInteger>(...).  Sigh.  I hates it.

Alternate, try 0U.  [At least in my browser, that sucks - 'U' after the zero
character, so that it's an unsigned constant in the first place.]

Powered by Google App Engine
This is Rietveld 408576698