Commit 85348a7e authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Move IntrinsicSizingInfoChanged into base.

We can move this implementation into base and DCHECK that it is only
called for subframes.

BUG=1097816

Change-Id: I0b89c52f1574507d5aea0b04ba4bcb4fb95bc8fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536509
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827844}
parent 72e83cc7
......@@ -1911,6 +1911,13 @@ float WebFrameWidgetBase::GetEmulatorScale() {
return 1.0f;
}
void WebFrameWidgetBase::IntrinsicSizingInfoChanged(
mojom::blink::IntrinsicSizingInfoPtr sizing_info) {
DCHECK(ForSubframe());
GetAssociatedFrameWidgetHost()->IntrinsicSizingInfoChanged(
std::move(sizing_info));
}
void WebFrameWidgetBase::AutoscrollStart(const gfx::PointF& position) {
GetAssociatedFrameWidgetHost()->AutoscrollStart(std::move(position));
}
......
......@@ -109,8 +109,9 @@ class CORE_EXPORT WebFrameWidgetBase
// Opposite of |ForSubframe|. If this widget is for the local main frame.
bool ForMainFrame() const { return !ForSubframe(); }
virtual void IntrinsicSizingInfoChanged(
mojom::blink::IntrinsicSizingInfoPtr) {}
// Called when the intrinsic size of the owning container is changing its
// size. This should only be called when `ForSubframe` is true.
void IntrinsicSizingInfoChanged(mojom::blink::IntrinsicSizingInfoPtr);
void AutoscrollStart(const gfx::PointF& position);
void AutoscrollFling(const gfx::Vector2dF& position);
......
......@@ -344,12 +344,6 @@ bool WebFrameWidgetImpl::ScrollFocusedEditableElementIntoView() {
return true;
}
void WebFrameWidgetImpl::IntrinsicSizingInfoChanged(
mojom::blink::IntrinsicSizingInfoPtr sizing_info) {
GetAssociatedFrameWidgetHost()->IntrinsicSizingInfoChanged(
std::move(sizing_info));
}
void WebFrameWidgetImpl::MouseCaptureLost() {
TRACE_EVENT_NESTABLE_ASYNC_END0("input", "capturing mouse",
TRACE_ID_LOCAL(this));
......
......@@ -108,8 +108,6 @@ class WebFrameWidgetImpl final : public WebFrameWidgetBase {
// WebFrameWidgetBase overrides:
bool ForSubframe() const override { return true; }
bool ForTopLevelFrame() const override { return false; }
void IntrinsicSizingInfoChanged(
mojom::blink::IntrinsicSizingInfoPtr) override;
void DidCreateLocalRootView() override;
void ZoomToFindInPageRect(const WebRect& rect_in_root_frame) override;
void SetAutoResizeMode(bool auto_resize,
......
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