Update to Chromium version 76.0.3809.0 (#665002)

OSR tests will be fixed by a follow-up merge of Viz support (see issue #2575).
This commit is contained in:
Petra Öhlin
2019-07-16 13:59:21 -04:00
committed by Marshall Greenblatt
parent 5892ffc382
commit cc0db5f166
124 changed files with 1312 additions and 1416 deletions

View File

@@ -9,25 +9,20 @@
// static
CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
CefRefPtr<CefButtonDelegate> delegate,
const CefString& text,
bool with_frame) {
return CefBasicLabelButtonImpl::Create(delegate, text, with_frame);
const CefString& text) {
return CefBasicLabelButtonImpl::Create(delegate, text);
}
// static
CefRefPtr<CefBasicLabelButtonImpl> CefBasicLabelButtonImpl::Create(
CefRefPtr<CefButtonDelegate> delegate,
const CefString& text,
bool with_frame) {
const CefString& text) {
CEF_REQUIRE_UIT_RETURN(nullptr);
CefRefPtr<CefBasicLabelButtonImpl> label_button =
new CefBasicLabelButtonImpl(delegate);
label_button->Initialize();
if (!text.empty())
label_button->SetText(text);
if (with_frame) {
label_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
}
return label_button;
}

View File

@@ -25,8 +25,7 @@ class CefBasicLabelButtonImpl : public CefLabelButtonImpl<views::LabelButton,
// Create a new CefLabelButton instance. |delegate| may be nullptr.
static CefRefPtr<CefBasicLabelButtonImpl> Create(
CefRefPtr<CefButtonDelegate> delegate,
const CefString& text,
bool with_frame);
const CefString& text);
// CefViewAdapter methods:
std::string GetDebugType() override { return "LabelButton"; }

View File

@@ -12,16 +12,14 @@
// static
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame) {
return CefMenuButtonImpl::Create(delegate, text, with_frame);
const CefString& text) {
return CefMenuButtonImpl::Create(delegate, text);
}
// static
CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame) {
const CefString& text) {
CEF_REQUIRE_UIT_RETURN(nullptr);
DCHECK(delegate);
if (!delegate)
@@ -30,9 +28,6 @@ CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
menu_button->Initialize();
if (!text.empty())
menu_button->SetText(text);
if (with_frame) {
menu_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
}
return menu_button;
}

View File

@@ -26,8 +26,7 @@ class CefMenuButtonImpl : public CefLabelButtonImpl<views::MenuButton,
// Create a new CefMenuButton instance. |delegate| must not be nullptr.
static CefRefPtr<CefMenuButtonImpl> Create(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame);
const CefString& text);
// CefMenuButton methods:
void ShowMenu(CefRefPtr<CefMenuModel> menu_model,

View File

@@ -53,12 +53,12 @@ CEF_PANEL_IMPL_T class CefPanelImpl : public CEF_VIEW_IMPL_D {
bool include_children) override {
ParentClass::GetDebugInfo(info, include_children);
if (include_children) {
const size_t count = ParentClass::content_view()->child_count();
const size_t count = ParentClass::content_view()->children().size();
if (count > 0U) {
std::unique_ptr<base::ListValue> children(new base::ListValue());
for (size_t i = 0U; i < count; ++i) {
views::View* view = ParentClass::content_view()->child_at(i);
views::View* view = ParentClass::content_view()->children()[i];
CefViewAdapter* adapter = CefViewAdapter::GetFor(view);
if (adapter) {
std::unique_ptr<base::DictionaryValue> child_info(
@@ -128,9 +128,11 @@ CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::AddChildViewAt(CefRefPtr<CefView> view,
DCHECK(view->IsValid());
DCHECK(!view->IsAttached());
DCHECK_GE(index, 0);
DCHECK_LE(index, ParentClass::content_view()->child_count());
DCHECK_LE(static_cast<unsigned int>(index),
ParentClass::content_view()->children().size());
if (!view.get() || !view->IsValid() || view->IsAttached() || index < 0 ||
index > ParentClass::content_view()->child_count()) {
(static_cast<unsigned int>(index) >
ParentClass::content_view()->children().size())) {
return;
}
@@ -179,27 +181,29 @@ CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::RemoveChildView(
CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::RemoveAllChildViews() {
CEF_REQUIRE_VALID_RETURN_VOID();
while (!ParentClass::content_view()->children().empty()) {
CefRefPtr<CefView> view =
view_util::GetFor(ParentClass::content_view()->child_at(0), false);
CefRefPtr<CefView> view = view_util::GetFor(
ParentClass::content_view()->children().front(), false);
RemoveChildView(view);
}
}
CEF_PANEL_IMPL_T size_t CEF_PANEL_IMPL_D::GetChildViewCount() {
CEF_REQUIRE_VALID_RETURN(0U);
return ParentClass::content_view()->child_count();
return ParentClass::content_view()->children().size();
}
CEF_PANEL_IMPL_T CefRefPtr<CefView> CEF_PANEL_IMPL_D::GetChildViewAt(
int index) {
CEF_REQUIRE_VALID_RETURN(nullptr);
DCHECK_GE(index, 0);
DCHECK_LT(index, ParentClass::content_view()->child_count());
if (index < 0 || index >= ParentClass::content_view()->child_count())
DCHECK_LT(static_cast<unsigned int>(index),
ParentClass::content_view()->children().size());
if (index < 0 || (static_cast<unsigned int>(index) >=
ParentClass::content_view()->children().size()))
return nullptr;
CefRefPtr<CefView> view =
view_util::GetFor(ParentClass::content_view()->child_at(index), false);
view_util::GetFor(ParentClass::content_view()->children()[index], false);
DCHECK(view);
return view;
}

View File

@@ -44,7 +44,7 @@ CefRect CefScrollViewImpl::GetVisibleContentRect() {
bool CefScrollViewImpl::HasHorizontalScrollbar() {
CEF_REQUIRE_VALID_RETURN(false);
const views::ScrollBar* scrollbar = root_view()->horizontal_scroll_bar();
return scrollbar && scrollbar->visible();
return scrollbar && scrollbar->GetVisible();
}
int CefScrollViewImpl::GetHorizontalScrollbarHeight() {
@@ -55,7 +55,7 @@ int CefScrollViewImpl::GetHorizontalScrollbarHeight() {
bool CefScrollViewImpl::HasVerticalScrollbar() {
CEF_REQUIRE_VALID_RETURN(false);
const views::ScrollBar* scrollbar = root_view()->vertical_scroll_bar();
return scrollbar && scrollbar->visible();
return scrollbar && scrollbar->GetVisible();
}
int CefScrollViewImpl::GetVerticalScrollbarWidth() {

View File

@@ -344,7 +344,7 @@ CEF_VIEW_IMPL_T class CefViewImpl : public CefViewAdapter, public CefViewClass {
void GetDebugInfo(base::DictionaryValue* info,
bool include_children) override {
info->SetString("type", GetDebugType());
info->SetInteger("id", root_view()->id());
info->SetInteger("id", root_view()->GetID());
// Use GetBounds() because some subclasses (like CefWindowImpl) override it.
const CefRect& bounds = GetBounds();
@@ -493,12 +493,12 @@ CEF_VIEW_IMPL_T CefRefPtr<CefWindow> CEF_VIEW_IMPL_D::GetWindow() {
CEF_VIEW_IMPL_T int CEF_VIEW_IMPL_D::GetID() {
CEF_REQUIRE_VALID_RETURN(0);
return root_view()->id();
return root_view()->GetID();
}
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetID(int id) {
CEF_REQUIRE_VALID_RETURN_VOID();
root_view()->set_id(id);
root_view()->SetID(id);
}
CEF_VIEW_IMPL_T int CEF_VIEW_IMPL_D::GetGroupID() {
@@ -611,7 +611,7 @@ CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetVisible(bool visible) {
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsVisible() {
CEF_REQUIRE_VALID_RETURN(false);
return root_view()->visible();
return root_view()->GetVisible();
}
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsDrawn() {
@@ -626,7 +626,7 @@ CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetEnabled(bool enabled) {
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsEnabled() {
CEF_REQUIRE_VALID_RETURN(false);
return root_view()->enabled();
return root_view()->GetEnabled();
}
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetFocusable(bool focusable) {

View File

@@ -14,6 +14,7 @@
#include "ui/base/test/ui_controls.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/menu/menu_runner.h"
#if defined(USE_AURA)
@@ -37,9 +38,8 @@ void InitializeUITesting() {
if (!initialized) {
ui_controls::EnableUIControls();
#if defined(USE_AURA)
#if defined(OS_LINUX) && defined(USE_X11)
#if defined(OS_LINUX) && defined(USE_X11)
ui_controls::InstallUIControlsAura(
views::test::CreateUIControlsDesktopAura());
#else
@@ -437,7 +437,7 @@ void CefWindowImpl::ShowMenu(views::MenuButton* menu_button,
base::Bind(&CefWindowImpl::MenuClosed, this)));
menu_runner_->RunMenuAt(
widget_, menu_button,
widget_, menu_button->button_controller(),
gfx::Rect(gfx::Point(screen_point.x, screen_point.y), gfx::Size()),
static_cast<views::MenuAnchorPosition>(anchor_position),
ui::MENU_SOURCE_NONE);