Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: sky/engine/core/rendering/RenderRemote.cpp

Issue 682413006: Add a separate call to initialize the bounds for a sky <iframe> element. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..8dc37e536da3d5f64bdcd7303934aaf9652869f8 100644
--- a/sky/engine/core/rendering/RenderRemote.cpp
+++ b/sky/engine/core/rendering/RenderRemote.cpp
@@ -7,14 +7,16 @@
#include "core/rendering/RenderRemote.h"
#include "core/editing/FrameSelection.h"
+#include "core/frame/LocalFrame.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 +24,18 @@ RenderRemote::~RenderRemote()
{
}
+void RenderRemote::layout()
+{
+ RenderReplaced::layout();
+
+ HTMLIFrameElement* frame = static_cast<HTMLIFrameElement*>(node());
esprehn 2014/11/07 21:22:15 toHTMLIframeElement(), use the macros to define th
Matt Perry 2014/11/10 23:00:56 Done.
+ frame->document().frame()->loaderClient()->initializeChildFrame(
+ frame->frame_id(), pixelSnappedIntRect(frameRect()));
abarth-chromium 2014/11/07 21:25:50 "initialize" isn't quite the right term here. It'
Matt Perry 2014/11/10 23:00:56 Done.
+}
+
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.

Powered by Google App Engine
This is Rietveld 408576698