| Index: third_party/WebKit/Source/core/layout/LayoutFramelet.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutFramelet.cpp b/third_party/WebKit/Source/core/layout/LayoutFramelet.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d405171e9be049082be0e1263eec5cae4aa0c9ad
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutFramelet.cpp
|
| @@ -0,0 +1,55 @@
|
| +// Copyright 2015 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 "core/layout/LayoutFramelet.h"
|
| +
|
| +#include "core/HTMLNames.h"
|
| +#include "core/frame/FrameView.h"
|
| +#include "core/frame/LocalFrame.h"
|
| +#include "core/html/HTMLIFrameElement.h"
|
| +#include "core/layout/LayoutAnalyzer.h"
|
| +#include "core/layout/LayoutView.h"
|
| +
|
| +namespace blink {
|
| +
|
| +using namespace HTMLNames;
|
| +
|
| +LayoutFramelet::LayoutFramelet(Element* element)
|
| + : LayoutPart(element)
|
| +{
|
| +}
|
| +
|
| +bool LayoutFramelet::shouldComputeSizeAsReplaced() const
|
| +{
|
| + return true;
|
| +}
|
| +
|
| +bool LayoutFramelet::isInlineBlockOrInlineTable() const
|
| +{
|
| + return isInline();
|
| +}
|
| +
|
| +PaintLayerType LayoutFramelet::layerTypeRequired() const
|
| +{
|
| + if (style()->resize() != RESIZE_NONE)
|
| + return NormalPaintLayer;
|
| + return LayoutPart::layerTypeRequired();
|
| +}
|
| +
|
| +void LayoutFramelet::layout()
|
| +{
|
| + ASSERT(needsLayout());
|
| + LayoutAnalyzer::Scope analyzer(*this);
|
| +
|
| + updateLogicalWidth();
|
| + // No kids to layout as a replaced element.
|
| + updateLogicalHeight();
|
| +
|
| + m_overflow.clear();
|
| + addVisualEffectOverflow();
|
| + updateLayerTransformAfterLayout();
|
| +
|
| + clearNeedsLayout();
|
| +}
|
| +}
|
|
|