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

Issue 1774012: Support for clipped experimental popup repositioning (Closed)

Created:
10 years, 8 months ago by Jeff Timanus
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, pam+watch_chromium.org, ben+cc_chromium.org
Base URL:
svn://chrome-svn.corp.google.com/chrome/trunk/src/
Visibility:
Public.

Description

Simple change that re-positions the arrow location on displayed extension popup views. This change allows popups to re-orient themselves if they are partially clipped by the working monitor. Note that this only applies to popups created via the experimental extension popup API. BUG=42779 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=47760

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 11

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 1

Patch Set 9 : '' #

Total comments: 2

Patch Set 10 : '' #

Total comments: 2

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -29 lines) Patch
M chrome/browser/extensions/extension_popup_api.cc View 1 5 6 7 8 9 10 4 chunks +70 lines, -0 lines 0 comments Download
M chrome/browser/views/extensions/extension_popup.h View 1 2 3 4 5 6 7 8 3 chunks +17 lines, -6 lines 0 comments Download
M chrome/browser/views/extensions/extension_popup.cc View 1 2 3 4 5 6 7 8 9 6 chunks +41 lines, -23 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Jeff Timanus
10 years, 8 months ago (2010-04-28 21:24:11 UTC) #1
Jeff Timanus
+ Reviewers Erik & Aaron, Please review this change, if you have a moment. Jeff
10 years, 7 months ago (2010-04-29 18:57:15 UTC) #2
rafaelw1
Taking a step back here, this is a really big change to the layout & ...
10 years, 7 months ago (2010-05-10 18:19:04 UTC) #3
jeff.timanus
I uploaded a new revision that makes use of a delegate interface to reposition only ...
10 years, 7 months ago (2010-05-14 19:49:40 UTC) #4
rafaelw
The logic here to change the position of the anchor seems brittle, and also likely ...
10 years, 7 months ago (2010-05-17 19:11:34 UTC) #5
Jeff Timanus
Thanks for your review, Rafael. I made all of the changes you suggested. As for ...
10 years, 7 months ago (2010-05-17 21:00:55 UTC) #6
rafaelw1
What I'm suggesting is that you shouldn't need to *try* repositioning the anchor and then ...
10 years, 7 months ago (2010-05-18 00:24:02 UTC) #7
Jeff Timanus
On 2010/05/18 00:24:02, rafaelw1 wrote: > What I'm suggesting is that you shouldn't need to ...
10 years, 7 months ago (2010-05-18 19:56:35 UTC) #8
rafaelw
Now that we're agreed that the extension_popup_api is tblf-specific, I'm going to ask that you ...
10 years, 7 months ago (2010-05-19 13:46:53 UTC) #9
Jeff Timanus
Reverted to the patch indicated by Rafael. Please review at your leisure.
10 years, 7 months ago (2010-05-19 19:09:04 UTC) #10
rafaelw
lgtm w/ nit on extension_popup.h/cc http://codereview.chromium.org/1774012/diff/45001/24003 File chrome/browser/views/extensions/extension_popup.cc (right): http://codereview.chromium.org/1774012/diff/45001/24003#newcode331 chrome/browser/views/extensions/extension_popup.cc:331: if (BubbleBorder::is_arrow_on_top(anchor_position_)) { nit: ...
10 years, 7 months ago (2010-05-19 19:47:54 UTC) #11
twiz
http://codereview.chromium.org/1774012/diff/18001/19001 File chrome/browser/extensions/extension_popup_api.cc (right): http://codereview.chromium.org/1774012/diff/18001/19001#newcode159 chrome/browser/extensions/extension_popup_api.cc:159: if (popup_rect.IsEmpty()) On 2010/05/17 19:11:34, rafaelw wrote: > please ...
10 years, 7 months ago (2010-05-19 19:54:31 UTC) #12
Jói
LGTM w/comment nit http://codereview.chromium.org/1774012/diff/34002/47002 File chrome/browser/extensions/extension_popup_api.cc (right): http://codereview.chromium.org/1774012/diff/34002/47002#newcode182 chrome/browser/extensions/extension_popup_api.cc:182: popup->SetArrowPosition(flipped_location); Setting a position here and ...
10 years, 7 months ago (2010-05-19 20:59:05 UTC) #13
twiz
http://codereview.chromium.org/1774012/diff/34002/47002 File chrome/browser/extensions/extension_popup_api.cc (right): http://codereview.chromium.org/1774012/diff/34002/47002#newcode182 chrome/browser/extensions/extension_popup_api.cc:182: popup->SetArrowPosition(flipped_location); On 2010/05/19 20:59:06, Jói wrote: > Setting a ...
10 years, 7 months ago (2010-05-19 22:09:27 UTC) #14
Jói
10 years, 7 months ago (2010-05-19 22:43:04 UTC) #15
LGTM
thanks

On Wed, May 19, 2010 at 6:09 PM,  <twiz@google.com> wrote:
>
> http://codereview.chromium.org/1774012/diff/34002/47002
> File chrome/browser/extensions/extension_popup_api.cc (right):
>
> http://codereview.chromium.org/1774012/diff/34002/47002#newcode182
> chrome/browser/extensions/extension_popup_api.cc:182:
> popup->SetArrowPosition(flipped_location);
> On 2010/05/19 20:59:06, Jói wrote:
>>
>> Setting a position here and then resetting it a few lines below seems
>> potentially error prone; as an informed guess I suppose as long as you
>
> do both
>>
>> before returning execution back to the message loop it's fine -
>
> perhaps add a
>>
>> comment explaining this to help avoid breakage in the future.
>
> You're correct.  Rafael and I discussed this previously in the review
> thread.  The problem before was that there is no way to query the
> potentially new bounds of the popup/bubble border without assigning the
> arrow.  The change I reverted had exposed 'compute bounds for a given
> arrow location' functionality, but I had to modify the browser-bubble
> code to do so.
>
> I added a comment remarking that assignment of the arrow location does
> not produce a draw-request.
>
> http://codereview.chromium.org/1774012/show
>

Powered by Google App Engine
This is Rietveld 408576698