Update to Chromium version 81.0.4044.0 (#737173)

This commit is contained in:
Marshall Greenblatt
2020-03-03 19:29:39 -05:00
parent a22b670a00
commit 9d9ee8b45f
135 changed files with 2602 additions and 1329 deletions

View File

@ -9,7 +9,7 @@
#include "include/cef_base.h"
#include "third_party/blink/public/platform/web_touch_event.h"
#include "third_party/blink/public/common/input/web_touch_event.h"
#include "ui/events/gesture_detection/motion_event_generic.h"
// Implementation of MotionEvent which takes a stream of CefTouchEvents.

View File

@ -103,7 +103,7 @@ struct PopulateAxNodeAttributes {
case ax::mojom::IntAttribute::kActivedescendantId:
case ax::mojom::IntAttribute::kInPageLinkTargetId:
case ax::mojom::IntAttribute::kErrormessageId:
case ax::mojom::IntAttribute::kDetailsId:
case ax::mojom::IntAttribute::kDOMNodeId:
case ax::mojom::IntAttribute::kDropeffect:
case ax::mojom::IntAttribute::kMemberOfId:
case ax::mojom::IntAttribute::kNextFocusId:

View File

@ -64,7 +64,7 @@ const size_t kMaxDamageRects = 10;
const float kDefaultScaleFactor = 1.0;
static content::ScreenInfo ScreenInfoFrom(const CefScreenInfo& src) {
content::ScreenInfo ScreenInfoFrom(const CefScreenInfo& src) {
content::ScreenInfo screenInfo;
screenInfo.device_scale_factor = src.device_scale_factor;
screenInfo.depth = src.depth;
@ -104,12 +104,6 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient {
return *view_->GetBackgroundColor();
}
void OnBeginFrame(base::TimeTicks frame_time) override {
// TODO(cef): Maybe we can use this method in combination with
// OnSetNeedsBeginFrames() instead of using CefBeginFrameTimer.
// See https://codereview.chromium.org/1841083007.
}
void OnFrameTokenChanged(uint32_t frame_token) override {
view_->render_widget_host()->DidProcessFrame(frame_token);
}
@ -179,6 +173,23 @@ float GetDeviceScaleFactor(CefBrowserHostImpl* browser) {
return screen_info.device_scale_factor;
}
ui::ImeTextSpan::UnderlineStyle GetImeUnderlineStyle(
cef_composition_underline_style_t style) {
switch (style) {
case CEF_CUS_SOLID:
return ui::ImeTextSpan::UnderlineStyle::kSolid;
case CEF_CUS_DOT:
return ui::ImeTextSpan::UnderlineStyle::kDot;
case CEF_CUS_DASH:
return ui::ImeTextSpan::UnderlineStyle::kDash;
case CEF_CUS_NONE:
return ui::ImeTextSpan::UnderlineStyle::kNone;
}
NOTREACHED();
return ui::ImeTextSpan::UnderlineStyle::kSolid;
}
} // namespace
CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
@ -450,11 +461,6 @@ void CefRenderWidgetHostViewOSR::TakeFallbackContentFrom(
host()->GetContentRenderingTimeoutFrom(view_cef->host());
}
void CefRenderWidgetHostViewOSR::DidCreateNewRendererCompositorFrameSink(
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) {
NOTREACHED();
}
void CefRenderWidgetHostViewOSR::OnPresentCompositorFrame() {}
void CefRenderWidgetHostViewOSR::OnDidUpdateVisualPropertiesComplete(
@ -526,13 +532,6 @@ void CefRenderWidgetHostViewOSR::AddDamageRect(uint32_t sequence,
damage_rects_[sequence] = rect;
}
void CefRenderWidgetHostViewOSR::SubmitCompositorFrame(
const viz::LocalSurfaceId& local_surface_id,
viz::CompositorFrame frame,
base::Optional<viz::HitTestRegionList> hit_test_region_list) {
NOTREACHED();
}
void CefRenderWidgetHostViewOSR::ResetFallbackToFirstNavigationSurface() {
delegated_frame_host_->ResetFallbackToFirstNavigationSurface();
}
@ -795,7 +794,8 @@ void CefRenderWidgetHostViewOSR::ImeSetComposition(
ui::ImeTextSpan::Type::kComposition, line.range.from, line.range.to,
line.thick ? ui::ImeTextSpan::Thickness::kThick
: ui::ImeTextSpan::Thickness::kThin,
line.background_color, line.color, std::vector<std::string>()));
GetImeUnderlineStyle(line.style), line.background_color, line.color,
std::vector<std::string>()));
}
gfx::Range range(replacement_range.from, replacement_range.to);
@ -898,20 +898,6 @@ CefRenderWidgetHostViewOSR::CreateSyntheticGestureTarget() {
return std::make_unique<CefSyntheticGestureTargetOSR>(host());
}
void CefRenderWidgetHostViewOSR::SetNeedsBeginFrames(bool enabled) {
SetFrameRate();
if (host_display_client_) {
host_display_client_->SetActive(enabled);
}
}
void CefRenderWidgetHostViewOSR::SetWantsAnimateOnlyBeginFrames() {
if (delegated_frame_host_) {
delegated_frame_host_->SetWantsAnimateOnlyBeginFrames();
}
}
bool CefRenderWidgetHostViewOSR::TransformPointToCoordSpaceForView(
const gfx::PointF& point,
RenderWidgetHostViewBase* target_view,
@ -1108,13 +1094,15 @@ void CefRenderWidgetHostViewOSR::SendMouseEvent(
if (popup_host_view_) {
if (popup_host_view_->popup_position_.Contains(
event.PositionInWidget().x, event.PositionInWidget().y)) {
event.PositionInWidget().x(), event.PositionInWidget().y())) {
blink::WebMouseEvent popup_event(event);
popup_event.SetPositionInWidget(
event.PositionInWidget().x - popup_host_view_->popup_position_.x(),
event.PositionInWidget().y - popup_host_view_->popup_position_.y());
popup_event.SetPositionInScreen(popup_event.PositionInWidget().x,
popup_event.PositionInWidget().y);
event.PositionInWidget().x() -
popup_host_view_->popup_position_.x(),
event.PositionInWidget().y() -
popup_host_view_->popup_position_.y());
popup_event.SetPositionInScreen(popup_event.PositionInWidget().x(),
popup_event.PositionInWidget().y());
popup_host_view_->SendMouseEvent(popup_event);
return;
@ -1127,14 +1115,14 @@ void CefRenderWidgetHostViewOSR::SendMouseEvent(
}
const gfx::Rect& guest_bounds =
guest_host_view->render_widget_host_->GetView()->GetViewBounds();
if (guest_bounds.Contains(event.PositionInWidget().x,
event.PositionInWidget().y)) {
if (guest_bounds.Contains(event.PositionInWidget().x(),
event.PositionInWidget().y())) {
blink::WebMouseEvent guest_event(event);
guest_event.SetPositionInWidget(
event.PositionInWidget().x - guest_bounds.x(),
event.PositionInWidget().y - guest_bounds.y());
guest_event.SetPositionInScreen(guest_event.PositionInWidget().x,
guest_event.PositionInWidget().y);
event.PositionInWidget().x() - guest_bounds.x(),
event.PositionInWidget().y() - guest_bounds.y());
guest_event.SetPositionInScreen(guest_event.PositionInWidget().x(),
guest_event.PositionInWidget().y());
guest_host_view->SendMouseEvent(guest_event);
return;
@ -1168,14 +1156,16 @@ void CefRenderWidgetHostViewOSR::SendMouseWheelEvent(
if (popup_host_view_) {
if (popup_host_view_->popup_position_.Contains(
event.PositionInWidget().x, event.PositionInWidget().y)) {
event.PositionInWidget().x(), event.PositionInWidget().y())) {
blink::WebMouseWheelEvent popup_mouse_wheel_event(event);
popup_mouse_wheel_event.SetPositionInWidget(
event.PositionInWidget().x - popup_host_view_->popup_position_.x(),
event.PositionInWidget().y - popup_host_view_->popup_position_.y());
event.PositionInWidget().x() -
popup_host_view_->popup_position_.x(),
event.PositionInWidget().y() -
popup_host_view_->popup_position_.y());
popup_mouse_wheel_event.SetPositionInScreen(
popup_mouse_wheel_event.PositionInWidget().x,
popup_mouse_wheel_event.PositionInWidget().y);
popup_mouse_wheel_event.PositionInWidget().x(),
popup_mouse_wheel_event.PositionInWidget().y());
popup_host_view_->SendMouseWheelEvent(popup_mouse_wheel_event);
return;
@ -1196,15 +1186,15 @@ void CefRenderWidgetHostViewOSR::SendMouseWheelEvent(
}
const gfx::Rect& guest_bounds =
guest_host_view->render_widget_host_->GetView()->GetViewBounds();
if (guest_bounds.Contains(event.PositionInWidget().x,
event.PositionInWidget().y)) {
if (guest_bounds.Contains(event.PositionInWidget().x(),
event.PositionInWidget().y())) {
blink::WebMouseWheelEvent guest_mouse_wheel_event(event);
guest_mouse_wheel_event.SetPositionInWidget(
event.PositionInWidget().x - guest_bounds.x(),
event.PositionInWidget().y - guest_bounds.y());
event.PositionInWidget().x() - guest_bounds.x(),
event.PositionInWidget().y() - guest_bounds.y());
guest_mouse_wheel_event.SetPositionInScreen(
guest_mouse_wheel_event.PositionInWidget().x,
guest_mouse_wheel_event.PositionInWidget().y);
guest_mouse_wheel_event.PositionInWidget().x(),
guest_mouse_wheel_event.PositionInWidget().y());
guest_host_view->SendMouseWheelEvent(guest_mouse_wheel_event);
return;

View File

@ -135,13 +135,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
#endif // defined(OS_MACOSX)
// RenderWidgetHostViewBase implementation.
void DidCreateNewRendererCompositorFrameSink(
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink)
override;
void SubmitCompositorFrame(
const viz::LocalSurfaceId& local_surface_id,
viz::CompositorFrame frame,
base::Optional<viz::HitTestRegionList> hit_test_region_list) override;
void ResetFallbackToFirstNavigationSurface() override;
void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos) override;
@ -176,8 +169,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
const std::vector<gfx::Rect>& character_bounds) override;
std::unique_ptr<content::SyntheticGestureTarget>
CreateSyntheticGestureTarget() override;
void SetNeedsBeginFrames(bool enabled) override;
void SetWantsAnimateOnlyBeginFrames() override;
bool TransformPointToCoordSpaceForView(
const gfx::PointF& point,
RenderWidgetHostViewBase* target_view,
@ -400,9 +391,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
content::MouseWheelPhaseHandler mouse_wheel_phase_handler_;
std::unique_ptr<viz::mojom::CompositorFrameSinkClient>
renderer_compositor_frame_sink_;
// Latest capture sequence number which is incremented when the caller
// requests surfaces be synchronized via
// EnsureSurfaceSynchronizedForLayoutTest().