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

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

Issue 1215103007: Remove remaining HTML elements (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months 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/RenderIFrame.h ('k') | sky/engine/core/rendering/RenderImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderIFrame.cpp
diff --git a/sky/engine/core/rendering/RenderIFrame.cpp b/sky/engine/core/rendering/RenderIFrame.cpp
deleted file mode 100644
index dd3288991b52ee32fbbfd467addb2334b7fefca7..0000000000000000000000000000000000000000
--- a/sky/engine/core/rendering/RenderIFrame.cpp
+++ /dev/null
@@ -1,65 +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 "sky/engine/core/rendering/RenderIFrame.h"
-
-#include "sky/engine/core/editing/FrameSelection.h"
-#include "sky/engine/core/html/HTMLIFrameElement.h"
-#include "sky/engine/core/loader/FrameLoaderClient.h"
-#include "sky/engine/core/rendering/PaintInfo.h"
-#include "sky/engine/core/rendering/RenderView.h"
-#include "sky/engine/platform/geometry/LayoutPoint.h"
-
-namespace blink {
-
-RenderIFrame::RenderIFrame(HTMLIFrameElement* iframe)
- : RenderReplaced(iframe)
-{
- view()->addIFrame(this);
-}
-
-RenderIFrame::~RenderIFrame()
-{
- if (view())
- view()->removeIFrame(this);
-}
-
-void RenderIFrame::updateWidgetBounds()
-{
- mojo::View* contentView = toHTMLIFrameElement(node())->contentView();
- if (!contentView)
- return;
-
- // FIXME: Once viewport_metrics are initialized properly on child views,
- // The GetRoot() call should be removed.
- const float devicePixelRatio =
- contentView->GetRoot()->viewport_metrics().device_pixel_ratio;
-
- IntRect bounds = absoluteContentBox();
- mojo::Rect mojoBounds;
- mojoBounds.x = bounds.x() * devicePixelRatio;
- mojoBounds.y = bounds.y() * devicePixelRatio;
- mojoBounds.width = bounds.width() * devicePixelRatio;
- mojoBounds.height = bounds.height() * devicePixelRatio;
- contentView->SetBounds(mojoBounds);
-}
-
-void RenderIFrame::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/RenderIFrame.h ('k') | sky/engine/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698