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

Issue 2870059: [Mac] Adjust omnibox decoration dragging to keep image under mouse. (Closed)

Created:
10 years, 5 months ago by Scott Hess - ex-Googler
Modified:
9 years, 6 months ago
Reviewers:
vtl, viettrungluu
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org
Base URL:
git://codf21.jail/chromium.git
Visibility:
Public.

Description

[Mac] Adjust omnibox decoration dragging to keep image under mouse. LocationBarDecoration::GetDragImageFrame() added to let decorations specify where their GetDragImage() image is in the decoration. The mouse-down code ensures that the mouse drags from the expected point within that area, or centeres the image under the mouse if the drag is from somewhere else in the decoration. Additionally tracked down why -isFlipped affected the drag point and rewrote the code to be -isFlipped agnostic. BUG=49102, 40771 TEST=Goto https://www.thawte.com/. Drag from ev text, lock icon should be under cursor. TEST=drag from location or lock icon should drag from point in icon mouse click was in. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52959

Patch Set 1 #

Total comments: 8

Patch Set 2 : Comment-tweaking for Trung. #

Total comments: 2

Patch Set 3 : Move method per Trung. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -16 lines) Patch
M chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm View 1 2 1 chunk +29 lines, -16 lines 0 comments Download
M chrome/browser/cocoa/location_bar/bubble_decoration.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/bubble_decoration.mm View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/ev_bubble_decoration.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/location_bar_decoration.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/location_icon_decoration.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Scott Hess - ex-Googler
Trung, figure out need another reason to dislike flipped views ...
10 years, 5 months ago (2010-07-18 17:13:27 UTC) #1
vtl
Crap, wrong account. Oh well. http://codereview.chromium.org/2870059/diff/1/2 File chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm (right): http://codereview.chromium.org/2870059/diff/1/2#newcode538 chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm:538: // center the image ...
10 years, 5 months ago (2010-07-18 17:50:47 UTC) #2
Scott Hess - ex-Googler
http://codereview.chromium.org/2870059/diff/1/2 File chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm (right): http://codereview.chromium.org/2870059/diff/1/2#newcode538 chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm:538: // center the image under the mouse. Otherwise, will ...
10 years, 5 months ago (2010-07-19 13:45:12 UTC) #3
viettrungluu
LGTM apart from pet peeve resolution. http://codereview.chromium.org/2870059/diff/5002/7003 File chrome/browser/cocoa/location_bar/bubble_decoration.mm (right): http://codereview.chromium.org/2870059/diff/5002/7003#newcode115 chrome/browser/cocoa/location_bar/bubble_decoration.mm:115: NSRect BubbleDecoration::GetImageRectInFrame(NSRect frame) ...
10 years, 5 months ago (2010-07-19 17:19:14 UTC) #4
Scott Hess - ex-Googler
10 years, 5 months ago (2010-07-19 20:24:36 UTC) #5
thanks!

http://codereview.chromium.org/2870059/diff/5002/7003
File chrome/browser/cocoa/location_bar/bubble_decoration.mm (right):

http://codereview.chromium.org/2870059/diff/5002/7003#newcode115
chrome/browser/cocoa/location_bar/bubble_decoration.mm:115: NSRect
BubbleDecoration::GetImageRectInFrame(NSRect frame) {
On 2010/07/19 17:19:15, viettrungluu wrote:
> Pet peeve: appending method implementations, ignoring the order in which
methods
> are declared.
> 
> Please put this immediately after
> |BubbleDecoration::GetWidthForImageAndLabel()|.

Done.

Powered by Google App Engine
This is Rietveld 408576698