| Index: sky/engine/core/rendering/RenderRemote.cpp
|
| diff --git a/sky/engine/core/rendering/RenderRemote.cpp b/sky/engine/core/rendering/RenderRemote.cpp
|
| index 1ee502b0679f68987804bfd42a1aa534b22c72e1..6f22d4462782a0130fca372b5bc5e2e14a6ebe5d 100644
|
| --- a/sky/engine/core/rendering/RenderRemote.cpp
|
| +++ b/sky/engine/core/rendering/RenderRemote.cpp
|
| @@ -8,13 +8,14 @@
|
|
|
| #include "core/editing/FrameSelection.h"
|
| #include "core/html/HTMLIFrameElement.h"
|
| +#include "core/loader/FrameLoaderClient.h"
|
| #include "core/rendering/PaintInfo.h"
|
| #include "platform/geometry/LayoutPoint.h"
|
|
|
| namespace blink {
|
|
|
| -RenderRemote::RenderRemote(HTMLIFrameElement* view)
|
| - : RenderReplaced(view)
|
| +RenderRemote::RenderRemote(HTMLIFrameElement* iframe)
|
| + : RenderReplaced(iframe)
|
| {
|
| }
|
|
|
| @@ -22,8 +23,29 @@ RenderRemote::~RenderRemote()
|
| {
|
| }
|
|
|
| +void RenderRemote::layout()
|
| +{
|
| + RenderReplaced::layout();
|
| +
|
| + // TODO(mpcomplete): This will generate extra SetBounds calls in some cases
|
| + // because some layout modules involve multiple passes (e.g., flexbox).
|
| + // Instead, we'll need to defer the work to later in the pipeline.
|
| + mojo::View* contentView = toHTMLIFrameElement(node())->contentView();
|
| + if (!contentView)
|
| + return;
|
| +
|
| + IntRect bounds = pixelSnappedIntRect(frameRect());
|
| + mojo::Rect mojo_bounds;
|
| + mojo_bounds.x = bounds.x();
|
| + mojo_bounds.y = bounds.y();
|
| + mojo_bounds.width = bounds.width();
|
| + mojo_bounds.height = bounds.height();
|
| + contentView->SetBounds(mojo_bounds);
|
| +}
|
| +
|
| void RenderRemote::paintReplaced(PaintInfo& paintInfo,
|
| - const LayoutPoint& paintOffset) {
|
| + const LayoutPoint& paintOffset)
|
| +{
|
| // Draw a gray background. This should be painted over by the actual
|
| // content.
|
| // TODO(mpcomplete): figure out what we should actually do here.
|
|
|