Commit 72599b86 authored by Stefan Zager's avatar Stefan Zager Committed by Commit Bot

Don't overflow EmbeddedContentView frame rect.

This extends to the other EmbeddedContentView subclasses the same fix
as was made to LocalFrameView in:

https://chromium-review.googlesource.com/1055675

BUG=855950
R=skobes@chromium.org

Change-Id: I4c9f29fc1e04213ff22e5debd9630ebb81eb1812
Reviewed-on: https://chromium-review.googlesource.com/1114071
Commit-Queue: Stefan Zager <szager@chromium.org>
Reviewed-by: default avatarSteve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570180}
parent f98b0db3
...@@ -153,8 +153,10 @@ IntRect WebPluginContainerImpl::FrameRect() const { ...@@ -153,8 +153,10 @@ IntRect WebPluginContainerImpl::FrameRect() const {
if (owner) { if (owner) {
LayoutView* owner_layout_view = owner->View(); LayoutView* owner_layout_view = owner->View();
DCHECK(owner_layout_view); DCHECK(owner_layout_view);
if (owner_layout_view->HasOverflowClip()) if (owner_layout_view->HasOverflowClip()) {
location.Move(-owner_layout_view->ScrolledContentOffset()); IntSize scroll_offset(owner_layout_view->ScrolledContentOffset());
location.SaturatedMove(-scroll_offset.Width(), -scroll_offset.Height());
}
} }
return IntRect(location, frame_rect_.Size()); return IntRect(location, frame_rect_.Size());
......
...@@ -206,8 +206,10 @@ IntRect RemoteFrameView::FrameRect() const { ...@@ -206,8 +206,10 @@ IntRect RemoteFrameView::FrameRect() const {
if (owner) { if (owner) {
LayoutView* owner_layout_view = owner->View(); LayoutView* owner_layout_view = owner->View();
DCHECK(owner_layout_view); DCHECK(owner_layout_view);
if (owner_layout_view->HasOverflowClip()) if (owner_layout_view->HasOverflowClip()) {
location.Move(-owner_layout_view->ScrolledContentOffset()); IntSize scroll_offset(owner_layout_view->ScrolledContentOffset());
location.SaturatedMove(-scroll_offset.Width(), -scroll_offset.Height());
}
} }
return IntRect(location, frame_rect_.Size()); return IntRect(location, frame_rect_.Size());
......
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