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

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

Issue 723143003: Rename RenderRemote to RenderIFrame. (Closed) Base URL: git@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
« no previous file with comments | « sky/engine/core/rendering/RenderRemote.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderRemote.cpp
diff --git a/sky/engine/core/rendering/RenderRemote.cpp b/sky/engine/core/rendering/RenderRemote.cpp
deleted file mode 100644
index 6f22d4462782a0130fca372b5bc5e2e14a6ebe5d..0000000000000000000000000000000000000000
--- a/sky/engine/core/rendering/RenderRemote.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-
-#include "core/rendering/RenderRemote.h"
-
-#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* iframe)
- : RenderReplaced(iframe)
-{
-}
-
-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)
-{
- // Draw a gray background. This should be painted over by the actual
- // content.
- // TODO(mpcomplete): figure out what we should actually do here.
- GraphicsContext* context = paintInfo.context;
-
- IntRect paintRect = pixelSnappedIntRect(LayoutRect(
- paintOffset.x(), paintOffset.y(), contentWidth(), contentHeight()));
- context->setStrokeStyle(SolidStroke);
- context->setStrokeColor(Color::lightGray);
- context->setFillColor(Color::darkGray);
- context->drawRect(paintRect);
-}
-
-} // namespace blink
« no previous file with comments | « sky/engine/core/rendering/RenderRemote.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698