OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "core/layout/LayoutFramelet.h" |
| 6 |
| 7 #include "core/HTMLNames.h" |
| 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/html/HTMLIFrameElement.h" |
| 11 #include "core/layout/LayoutAnalyzer.h" |
| 12 #include "core/layout/LayoutView.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 using namespace HTMLNames; |
| 17 |
| 18 LayoutFramelet::LayoutFramelet(Element* element) |
| 19 : LayoutPart(element) |
| 20 { |
| 21 } |
| 22 |
| 23 bool LayoutFramelet::shouldComputeSizeAsReplaced() const |
| 24 { |
| 25 return true; |
| 26 } |
| 27 |
| 28 bool LayoutFramelet::isInlineBlockOrInlineTable() const |
| 29 { |
| 30 return isInline(); |
| 31 } |
| 32 |
| 33 PaintLayerType LayoutFramelet::layerTypeRequired() const |
| 34 { |
| 35 if (style()->resize() != RESIZE_NONE) |
| 36 return NormalPaintLayer; |
| 37 return LayoutPart::layerTypeRequired(); |
| 38 } |
| 39 |
| 40 void LayoutFramelet::layout() |
| 41 { |
| 42 ASSERT(needsLayout()); |
| 43 LayoutAnalyzer::Scope analyzer(*this); |
| 44 |
| 45 updateLogicalWidth(); |
| 46 // No kids to layout as a replaced element. |
| 47 updateLogicalHeight(); |
| 48 |
| 49 m_overflow.clear(); |
| 50 addVisualEffectOverflow(); |
| 51 updateLayerTransformAfterLayout(); |
| 52 |
| 53 clearNeedsLayout(); |
| 54 } |
| 55 } |
OLD | NEW |