Commit 5a5c7c60 authored by Jay Harris's avatar Jay Harris Committed by Commit Bot

Implements a workaround for wrapping page info dialogs.

The previous fix caused problems (crbug.com/920556, crbug.com/919457).

Note: This change should also be better for security UI, as now the
page info dialog will be displayed over the top of the CCT instead
of entirely inside the content area.

Bug: 902615
Change-Id: Iada8224fff11ef5886106262298d723a3097a19e
Reviewed-on: https://chromium-review.googlesource.com/c/1405119
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625837}
parent e886fdba
......@@ -23,6 +23,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/strings/grit/ui_strings.h"
#include "ui/views/background.h"
......@@ -188,6 +189,11 @@ CustomTabBarView::CustomTabBarView(BrowserView* browser_view,
CustomTabBarView::~CustomTabBarView() {}
gfx::Rect CustomTabBarView::GetAnchorBoundsInScreen() const {
return gfx::UnionRects(location_icon_view_->GetAnchorBoundsInScreen(),
title_origin_view_->GetAnchorBoundsInScreen());
}
void CustomTabBarView::TabChangedAt(content::WebContents* contents,
int index,
TabChangeType change_type) {
......
......@@ -12,6 +12,10 @@
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
#include "ui/views/controls/button/button.h"
namespace gfx {
class Rect;
}
class CustomTabBarTitleOriginView;
class BrowserView;
......@@ -32,6 +36,9 @@ class CustomTabBarView : public views::View,
LocationIconView* location_icon_view() { return location_icon_view_; }
// views::View:
gfx::Rect GetAnchorBoundsInScreen() const override;
// TabstripModelObserver:
void TabChangedAt(content::WebContents* contents,
int index,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment