diff options
author | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-25 19:14:17 +0000 |
---|---|---|
committer | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-25 19:14:17 +0000 |
commit | a9f2b293243afb1b3508ffe9936d0cbd7bcbb243 (patch) | |
tree | 2188abe54675e491befdef685355ba6cf068cce0 | |
parent | 39422e3082cc5b3633183b53ff21f93a5c17e5f0 (diff) | |
download | chromium_src-a9f2b293243afb1b3508ffe9936d0cbd7bcbb243.zip chromium_src-a9f2b293243afb1b3508ffe9936d0cbd7bcbb243.tar.gz chromium_src-a9f2b293243afb1b3508ffe9936d0cbd7bcbb243.tar.bz2 |
Basic change correcting the coordinate space of the reference anchor point for the extension popup API when using borderStyle=rectangle.
I will submit a follow-up CL containing tests that will catch future regressions on the positioning of the pop-up.
BUG=39235
TEST=None
Review URL: http://codereview.chromium.org/1217009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42650 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/extensions/extension_popup.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/views/extensions/extension_popup.cc b/chrome/browser/views/extensions/extension_popup.cc index 5ff8126..ab0032a 100644 --- a/chrome/browser/views/extensions/extension_popup.cc +++ b/chrome/browser/views/extensions/extension_popup.cc @@ -88,6 +88,12 @@ ExtensionPopup::ExtensionPopup(ExtensionHost* host, // TODO(erikkay) Some of this border code is derived from InfoBubble. // We should see if we can unify these classes. + // Keep relative_to_ in frame-relative coordinates to aid in drag + // positioning. + gfx::Point origin = relative_to_.origin(); + views::View::ConvertPointToView(NULL, frame_->GetRootView(), &origin); + relative_to_.set_origin(origin); + // The bubble chrome requires a separate window, so construct it here. if (BUBBLE_CHROME == popup_chrome_) { gfx::NativeView native_window = frame->GetNativeView(); @@ -107,13 +113,6 @@ ExtensionPopup::ExtensionPopup(ExtensionHost* host, chromeos::WmIpc::WINDOW_TYPE_CHROME_INFO_BUBBLE, NULL); #endif - - // Keep relative_to_ in frame-relative coordinates to aid in drag - // positioning. - gfx::Point origin = relative_to_.origin(); - views::View::ConvertPointToView(NULL, frame_->GetRootView(), &origin); - relative_to_.set_origin(origin); - border_ = new BubbleBorder; border_->set_arrow_location(arrow_location); |