Source/WebCore/ChangeLog

 12012-05-16 Eric Seidel <eric@webkit.org>
 2
 3 Add seamless layout code (and pass all the remaining seamless tests)
 4 https://bugs.webkit.org/show_bug.cgi?id=86608
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 This patch contains all the layout changes needed for seamless iframes.
 9 Seamless iframes piggy-back a bit on the existing frame-flattening
 10 logic, however seamless is different from frame-flattening in a few ways:
 11 - Frame flattening can only ever make an iframe larger (seamless just behaves like a normal div).
 12 - Frame flattening disables scrollbars (seamless frames behave like normal overflow: auto divs).
 13 - Seamless only has to work with iframes (flattening works with frame/frameset as well).
 14 - Seamless support shrink-wrap negotation when the iframe is inline.
 15
 16 This is a somewhat complicated patch and I wouldn't be surprised to go several rounds here.
 17 I'm most interested in feedback regarding the tests, to make sure that I've covered all
 18 the interesting cases.
 19
 20 Test: fast/frames/seamless/seamless-percent-height.html
 21
 22 * css/StyleResolver.cpp:
 23 (WebCore::StyleResolver::adjustRenderStyle): map inline -> inline-block for seamless iframes.
 24 * dom/Document.cpp:
 25 (WebCore::Document::scheduleStyleRecalc):
 26 - Seamless iframes don't manage their own style recalc.
 27 (WebCore::Document::recalcStyle):
 28 - Similarly, recalcStyle lets the parent manage style resolves.
 29 * html/HTMLIFrameElement.idl:
 30 - Expose the seamless attribute now that our implementation is complete.
 31 * page/FrameView.cpp:
 32 (WebCore::FrameView::scheduleRelayout): Do the cheaper check first.
 33 (WebCore::FrameView::isInChildFrameWithFrameFlattening): Make frameview layout abort child layouts like how frame flattening does.
 34 * rendering/RenderBox.h:
 35 (WebCore::RenderBox::stretchesToViewport): Disable the stretch-to-viewport quirk for seamless iframes (it makes no sense and breaks the layout code).
 36 * rendering/RenderIFrame.cpp:
 37 (WebCore::RenderIFrame::computeLogicalHeight):
 38 - This function is needed for the child document to participate in the normal block shrink-wrap algorithm.
 39 Thankfully all the shrink-wrap logic is in RenderBox instead of RenderBlock. In the future we may make
 40 RenderIframe a RenderBlock for the seamless case. We may just split RenderIframe into two renderers.
 41 (WebCore::RenderIFrame::computeLogicalWidth):
 42 (WebCore::RenderIFrame::shouldComputeSizeAsReplaced):
 43 - seamless iframes behave like blocks, not inline replaced elements.
 44 (WebCore):
 45 (WebCore::RenderIFrame::isInlineBlockOrInlineTable):
 46 - Behave like an inline-block when marked inline.
 47 (WebCore::RenderIFrame::minPreferredLogicalWidth):
 48 - When asked for our pref widths, return those of our child document.
 49 (WebCore::RenderIFrame::maxPreferredLogicalWidth):
 50 (WebCore::RenderIFrame::isSeamless): helper function
 51 (WebCore::RenderIFrame::contentRootRenderer): helper function
 52 (WebCore::RenderIFrame::flattenFrame): seamless iframes never use the frame-flattening feature.
 53 (WebCore::RenderIFrame::layout):
 54 * rendering/RenderIFrame.h:
 55 (WebCore):
 56 (RenderIFrame):
 57
1582012-05-16 MORITA Hajime <morrita@google.com>
259
360 HasCustomWillOrDidRecalcStyleFlag and family should live in a bit.

Source/WebCore/css/StyleResolver.cpp

@@void StyleResolver::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
21302130 || style->hasFilter()))
21312131 style->setTransformStyle3D(TransformStyle3DFlat);
21322132
 2133 // Seamless iframes behave like blocks. Map their display to inline-block when marked inline.
 2134 if (e && e->hasTagName(iframeTag) && style->display() == INLINE && static_cast<HTMLIFrameElement*>(e)->shouldDisplaySeamlessly())
 2135 style->setDisplay(INLINE_BLOCK);
 2136
21332137#if ENABLE(SVG)
21342138 if (e && e->isSVGElement()) {
21352139 // Spec: http://www.w3.org/TR/SVG/masking.html#OverflowProperty

Source/WebCore/dom/Document.cpp

@@void Document::scheduleForcedStyleRecalc()
16581658
16591659void Document::scheduleStyleRecalc()
16601660{
1661  // FIXME: In the seamless case, we should likely schedule a style recalc
1662  // on our parent and instead return early here.
 1661 if (shouldDisplaySeamlesslyWithParent()) {
 1662 // When we're seamless, our parent document manages our style recalcs.
 1663 ownerElement()->setNeedsStyleRecalc();
 1664 ownerElement()->document()->scheduleStyleRecalc();
 1665 return;
 1666 }
16631667
16641668 if (m_styleRecalcTimer.isActive() || inPageCache())
16651669 return;

@@void Document::recalcStyle(StyleChange change)
17151719 if (m_inStyleRecalc)
17161720 return; // Guard against re-entrancy. -dwh
17171721
1718  // FIXME: In the seamless case, we may wish to exit early in the child after recalcing our parent chain.
1719  // I have not yet found a test which requires such.
 1722 // Make sure our ancestor chain is up-to-date before we resolve style
 1723 // on ourselves (in case our owning iframe is now display: none for instance).
 1724 if (Document* parentDoc = parentDocument())
 1725 parentDoc->recalcStyle(NoChange);
 1726
 1727 // FIXME: In the seamless case, our parent should have recalc'd our style, so we could return early here.
17201728
17211729 if (m_hasDirtyStyleResolver)
17221730 updateActiveStylesheets(RecalcStyleImmediately);

Source/WebCore/html/HTMLIFrameElement.idl

@@module html {
3030 attribute [Reflect] DOMString name;
3131 attribute [Reflect] DOMString sandbox;
3232 attribute [Reflect] DOMString scrolling;
 33 attribute [Reflect] boolean seamless;
3334 attribute [Reflect, URL] DOMString src;
3435 attribute [Reflect] DOMString srcdoc;
3536 attribute [Reflect] DOMString width;

Source/WebCore/page/FrameView.cpp

@@void FrameView::scheduleRelayout()
20492049
20502050 // When frame flattening is enabled, the contents of the frame could affect the layout of the parent frames.
20512051 // Also invalidate parent frame starting from the owner element of this frame.
2052  if (isInChildFrameWithFrameFlattening() && m_frame->ownerRenderer())
 2052 if (m_frame->ownerRenderer() && isInChildFrameWithFrameFlattening())
20532053 m_frame->ownerRenderer()->setNeedsLayout(true, MarkContainingBlockChain);
20542054
20552055 int delay = m_frame->document()->minimumLayoutDelay();

@@FrameView* FrameView::parentFrameView() const
29262926
29272927bool FrameView::isInChildFrameWithFrameFlattening()
29282928{
2929  if (!parent() || !m_frame->ownerElement() || !m_frame->settings() || !m_frame->settings()->frameFlatteningEnabled())
 2929 if (!parent() || !m_frame->ownerElement())
29302930 return false;
29312931
29322932 // Frame flattening applies when the owner element is either in a frameset or
29332933 // an iframe with flattening parameters.
29342934 if (m_frame->ownerElement()->hasTagName(iframeTag)) {
29352935 RenderIFrame* iframeRenderer = toRenderIFrame(m_frame->ownerElement()->renderPart());
2936 
2937  if (iframeRenderer->flattenFrame())
 2936 if (iframeRenderer->flattenFrame() || iframeRenderer->isSeamless())
29382937 return true;
 2938 }
 2939
 2940 if (!m_frame->settings() || !m_frame->settings()->frameFlatteningEnabled())
 2941 return false;
29392942
2940  } else if (m_frame->ownerElement()->hasTagName(frameTag))
 2943 if (m_frame->ownerElement()->hasTagName(frameTag))
29412944 return true;
29422945
29432946 return false;

Source/WebCore/rendering/RenderBox.h

@@public:
327327
328328 bool stretchesToViewport() const
329329 {
330  return document()->inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrPositioned() && (isRoot() || isBody());
 330 return document()->inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrPositioned() && (isRoot() || isBody()) && !document()->shouldDisplaySeamlesslyWithParent();
331331 }
332332
333333 virtual IntSize intrinsicSize() const { return IntSize(); }

Source/WebCore/rendering/RenderIFrame.cpp

@@void RenderIFrame::computeLogicalHeight()
5656 FrameView* view = static_cast<FrameView*>(widget());
5757 if (!view)
5858 return;
59  int border = borderTop() + borderBottom();
 59 LayoutUnit border = borderTop() + borderBottom();
6060 setHeight(max<LayoutUnit>(height(), view->contentsHeight() + border));
6161 }
6262}
6363
6464void RenderIFrame::computeLogicalWidth()
6565{
 66 // When we're seamless, we behave like a block. Thankfully RenderBox has all the right logic for this.
 67 if (isSeamless())
 68 return RenderBox::computeLogicalWidth();
 69
6670 RenderPart::computeLogicalWidth();
6771 if (!flattenFrame())
6872 return;

@@void RenderIFrame::computeLogicalWidth()
7983 }
8084}
8185
82 bool RenderIFrame::flattenFrame()
 86bool RenderIFrame::shouldComputeSizeAsReplaced() const
 87{
 88 // When we're seamless, we use normal block/box sizing code except when inline.
 89 return !isSeamless();
 90}
 91
 92bool RenderIFrame::isInlineBlockOrInlineTable() const
 93{
 94 return isSeamless() && isInline();
 95}
 96
 97LayoutUnit RenderIFrame::minPreferredLogicalWidth() const
 98{
 99 if (!isSeamless())
 100 return RenderFrameBase::minPreferredLogicalWidth();
 101
 102 RenderView* childRoot = contentRootRenderer();
 103 if (!childRoot)
 104 return 0;
 105
 106 return childRoot->minPreferredLogicalWidth();
 107}
 108
 109LayoutUnit RenderIFrame::maxPreferredLogicalWidth() const
 110{
 111 if (!isSeamless())
 112 return RenderFrameBase::maxPreferredLogicalWidth();
 113
 114 RenderView* childRoot = contentRootRenderer();
 115 if (!childRoot)
 116 return 0;
 117
 118 return childRoot->maxPreferredLogicalWidth();
 119}
 120
 121bool RenderIFrame::isSeamless() const
 122{
 123 return node() && node()->hasTagName(iframeTag) && static_cast<HTMLIFrameElement*>(node())->shouldDisplaySeamlessly();
 124}
 125
 126RenderView* RenderIFrame::contentRootRenderer() const
 127{
 128 // FIXME: Is this always a valid cast? What about plugins?
 129 FrameView* childFrameView = static_cast<FrameView*>(widget());
 130 return childFrameView ? static_cast<RenderView*>(childFrameView->frame()->contentRenderer()) : 0;
 131}
 132
 133bool RenderIFrame::flattenFrame() const
83134{
84135 if (!node() || !node()->hasTagName(iframeTag))
85136 return false;

@@bool RenderIFrame::flattenFrame()
87138 HTMLIFrameElement* element = static_cast<HTMLIFrameElement*>(node());
88139 Frame* frame = element->document()->frame();
89140
 141 if (isSeamless())
 142 return false; // Seamless iframes are already "flat", don't try to flatten them.
 143
90144 bool enabled = frame && frame->settings() && frame->settings()->frameFlatteningEnabled();
91145
92146 if (!enabled || !frame->page())

@@bool RenderIFrame::flattenFrame()
105159 return boundingRect.maxX() > 0 && boundingRect.maxY() > 0;
106160}
107161
 162void RenderIFrame::layoutSeamlessly()
 163{
 164 computeLogicalWidth();
 165 // Normally we would set our height to 0 before laying out our kids.
 166 // However RenderView (the root of the child document's rendering tree)
 167 // assumes its container is of a fixed size, not dynamically grown to it.
 168 // So we set our height to min(max-height, UINT_MAX) to avoid generating unecessary
 169 // vertical scrollbars then we'll shrink the height after child layout.
 170 LayoutUnit maxHeight = MAX_LAYOUT_UNIT;
 171 if (!style()->logicalMaxHeight().isUndefined())
 172 maxHeight = std::min<LayoutUnit>(maxHeight, style()->logicalMaxHeight().value());
 173 setLogicalHeight(maxHeight);
 174 updateWidgetPosition(); // Tell the Widget about our new width/height (it will also layout the child document).
 175
 176 // Laying out our kids is normally responsible for adjusting our height, so we set it here.
 177 // Replaced elements do not respect padding, so we just add border to the child's height.
 178 FrameView* childFrameView = static_cast<FrameView*>(widget());
 179 setLogicalHeight(childFrameView->contentsHeight() + borderTop() + borderBottom());
 180 computeLogicalHeight();
 181
 182 updateWidgetPosition(); // Notify the Widget of our final height.
 183
 184 // Assert that the child document did a complete layout.
 185 RenderView* childRoot = childFrameView ? static_cast<RenderView*>(childFrameView->frame()->contentRenderer()) : 0;
 186 ASSERT(!childFrameView->layoutPending());
 187 ASSERT_UNUSED(childRoot, !childRoot->needsLayout());
 188 ASSERT(!childRoot->firstChild() || !childRoot->firstChild()->firstChild() || !childRoot->firstChild()->firstChild()->needsLayout());
 189}
 190
108191void RenderIFrame::layout()
109192{
110193 ASSERT(needsLayout());
111194
112  RenderPart::computeLogicalWidth();
113  RenderPart::computeLogicalHeight();
114 
115195 if (flattenFrame()) {
 196 RenderPart::computeLogicalWidth();
 197 RenderPart::computeLogicalHeight();
116198 layoutWithFlattening(style()->width().isFixed(), style()->height().isFixed());
 199 // FIXME: Is early return really OK here? What about transform/overflow code below?
117200 return;
 201 } else if (isSeamless()) {
 202 layoutSeamlessly();
 203 // Note we do not return so as to share the layer and overflow updates below.
 204 } else {
 205 computeLogicalWidth();
 206 // No kids to layout as a replaced element.
 207 computeLogicalHeight();
118208 }
119209
120  RenderPart::layout();
121 
122210 m_overflow.clear();
123211 addVisualEffectOverflow();
124212 updateLayerTransform();

Source/WebCore/rendering/RenderIFrame.h

3030
3131namespace WebCore {
3232
 33class RenderView;
 34
3335class RenderIFrame : public RenderFrameBase {
3436public:
3537 explicit RenderIFrame(Element*);
3638
37  bool flattenFrame();
 39 bool flattenFrame() const;
 40 bool isSeamless() const;
3841
3942private:
40  virtual void computeLogicalHeight();
41  virtual void computeLogicalWidth();
 43 virtual void computeLogicalHeight() OVERRIDE;
 44 virtual void computeLogicalWidth() OVERRIDE;
 45
 46 virtual LayoutUnit minPreferredLogicalWidth() const OVERRIDE;
 47 virtual LayoutUnit maxPreferredLogicalWidth() const OVERRIDE;
 48
 49 virtual bool shouldComputeSizeAsReplaced() const OVERRIDE;
 50 virtual bool isInlineBlockOrInlineTable() const OVERRIDE;
 51
 52 virtual void layout() OVERRIDE;
4253
43  virtual void layout();
 54 virtual bool isRenderIFrame() const OVERRIDE { return true; }
4455
45  virtual bool isRenderIFrame() const { return true; }
 56 virtual const char* renderName() const OVERRIDE { return "RenderPartObject"; } // Lying for now to avoid breaking tests
4657
47  virtual const char* renderName() const { return "RenderPartObject"; } // Lying for now to avoid breaking tests
 58 void layoutSeamlessly();
4859
 60 RenderView* contentRootRenderer() const;
4961};
5062
5163inline RenderIFrame* toRenderIFrame(RenderObject* object)

LayoutTests/ChangeLog

 12012-05-16 Eric Seidel <eric@webkit.org>
 2
 3 Add seamless layout code (and pass all the remaining seamless tests)
 4 https://bugs.webkit.org/show_bug.cgi?id=86608
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Add a test for percent height in child documents, as well as
 9 disabling the expand-to-fill-viewport quirk of html/body elements
 10 in quirks mode.
 11 Also update all the expectations now that we pass all these tests!
 12
 13 * fast/frames/seamless/resources/percent-square.html: Added.
 14 * fast/frames/seamless/resources/two-inline-blocks.html:
 15 * fast/frames/seamless/seamless-basic-expected.txt:
 16 * fast/frames/seamless/seamless-float-expected.txt:
 17 * fast/frames/seamless/seamless-inherited-origin-expected.txt:
 18 * fast/frames/seamless/seamless-inherited-origin.html:
 19 * fast/frames/seamless/seamless-inline-expected.txt:
 20 * fast/frames/seamless/seamless-nested-expected.txt:
 21 * fast/frames/seamless/seamless-percent-height-expected.txt: Added.
 22 * fast/frames/seamless/seamless-percent-height.html: Added.
 23 * fast/frames/seamless/seamless-quirks-expected.txt:
 24 * fast/frames/seamless/seamless-sandbox-flag-expected.txt:
 25 * fast/frames/seamless/seamless-sandbox-srcdoc-expected.txt:
 26
1272012-05-16 Zoltan Arvai <zarvai@inf.u-szeged.hu>
228
329 [Qt] Unreviewed gardening.

LayoutTests/fast/frames/seamless/resources/percent-square.html

 1<!-- This is intentionally quirks mode. -->
 2<html style="width: 100%; height: 100%"></html>

LayoutTests/fast/frames/seamless/resources/two-inline-blocks.html

11<!DOCTYPE html>
22<html><head><style>
33body { margin: 0px; line-height: 0px; }
 4/* FIXME: This vertical-align should not be needed, but without it the contentHeight()
 5of the document is reported as 4px too large, likely due to implied line decent? */
 6div { vertical-align: top; }
47</style></head>
58<body><div style="background-color: orange; display: inline-block; width: 100px; height: 50px;"></div><div style="background-color: blue; display: inline-block; width: 50px; height: 50px;"></div></body></html>

LayoutTests/fast/frames/seamless/seamless-basic-expected.txt

11Test basic seamless auto-sizing-to-content functionality.
2 FAIL iframe.seamless should be true (of type boolean). Was undefined (of type undefined).
 2PASS iframe.seamless is true
33PASS window.getComputedStyle(iframe).display is "block"
4 FAIL window.getComputedStyle(iframe).width should be 200px. Was 300px.
5 FAIL window.getComputedStyle(iframe).height should be 100px. Was 150px.
6 FAIL window.getComputedStyle(iframe).height should be 200px. Was 150px.
7 FAIL window.getComputedStyle(iframe).width should be 100px. Was 300px.
 4PASS window.getComputedStyle(iframe).width is "200px"
 5PASS window.getComputedStyle(iframe).height is "100px"
 6PASS window.getComputedStyle(iframe).height is "200px"
 7PASS window.getComputedStyle(iframe).width is "100px"
88

LayoutTests/fast/frames/seamless/seamless-float-expected.txt

11Test that floated seamless iframes 'shrink-wrap' their contents, as floated divs would.
2 FAIL window.getComputedStyle(iframe1).width should be 150px. Was 300px.
3 FAIL window.getComputedStyle(iframe1).height should be 50px. Was 150px.
4 FAIL window.getComputedStyle(iframe2).width should be 100px. Was 300px.
5 FAIL window.getComputedStyle(iframe2).height should be 100px. Was 150px.
 2PASS window.getComputedStyle(iframe1).width is "150px"
 3PASS window.getComputedStyle(iframe1).height is "50px"
 4PASS window.getComputedStyle(iframe2).width is "100px"
 5PASS window.getComputedStyle(iframe2).height is "100px"
66
77

LayoutTests/fast/frames/seamless/seamless-inherited-origin-expected.txt

11Test that frames with inherited security origins can still be seamless.
2 FAIL iframe.seamless should be true (of type boolean). Was undefined (of type undefined).
3 FAIL window.getComputedStyle(iframe).width should be 200px. Was 300px.
4 FAIL window.getComputedStyle(iframe).height should be 0px. Was 150px.
5 FAIL window.getComputedStyle(iframe).width should be 200px. Was 300px.
6 FAIL window.getComputedStyle(iframe).height should be 100px. Was 150px.
 2PASS iframe.seamless is true
 3PASS window.getComputedStyle(iframe).width is "200px"
 4PASS window.getComputedStyle(iframe).height is "8px"
 5PASS window.getComputedStyle(iframe).width is "200px"
 6PASS window.getComputedStyle(iframe).height is "100px"
77

LayoutTests/fast/frames/seamless/seamless-inherited-origin.html

@@window.onload = function () {
99 window.iframe = document.getElementById("iframe");
1010 shouldBeTrue("iframe.seamless");
1111
12  // Initially about:blank should have 0 height.
1312 shouldBeEqualToString("window.getComputedStyle(iframe).width", "200px");
14  shouldBeEqualToString("window.getComputedStyle(iframe).height", "0px");
 13 // Initially about:blank has no content, thus no height, except the body
 14 // element defaults to margin: 8px (which gets collapsed to 8px when rendered).
 15 shouldBeEqualToString("window.getComputedStyle(iframe).height", "8px");
1516
1617 // Replace the empty document with a 100x100px square to test if it displays seamlessly.
1718 window.iframe.contentDocument.write("<!DOCTYPE html><html style='width: 100px; height: 100px; background-color: green'></html>");

LayoutTests/fast/frames/seamless/seamless-inline-expected.txt

11Test that inline seamless iframes 'shrink-wrap' their contents like inline-blocks do.
2 FAIL window.getComputedStyle(iframe1).display should be inline-block. Was inline.
3 FAIL window.getComputedStyle(iframe2).display should be inline-block. Was inline.
4 FAIL window.getComputedStyle(iframe1).width should be 150px. Was 300px.
5 FAIL window.getComputedStyle(iframe1).height should be 50px. Was 150px.
6 FAIL window.getComputedStyle(parent1).height should be 50px. Was 200px.
7 FAIL window.getComputedStyle(iframe2).width should be 100px. Was 300px.
8 FAIL window.getComputedStyle(iframe2).height should be 100px. Was 150px.
9 FAIL window.getComputedStyle(parent2).height should be 150px. Was 200px.
 2PASS window.getComputedStyle(iframe1).display is "inline-block"
 3PASS window.getComputedStyle(iframe2).display is "inline-block"
 4PASS window.getComputedStyle(iframe1).width is "150px"
 5PASS window.getComputedStyle(iframe1).height is "50px"
 6PASS window.getComputedStyle(parent1).height is "50px"
 7PASS window.getComputedStyle(iframe2).width is "100px"
 8PASS window.getComputedStyle(iframe2).height is "100px"
 9PASS window.getComputedStyle(parent2).height is "150px"
1010
1111

LayoutTests/fast/frames/seamless/seamless-nested-expected.txt

11Test that nested seamless iframes size correctly.
2 FAIL iframe.seamless should be true (of type boolean). Was undefined (of type undefined).
3 FAIL nestedFrame.seamless should be true (of type boolean). Was undefined (of type undefined).
4 FAIL window.getComputedStyle(iframe).width should be 200px. Was 300px.
5 FAIL window.getComputedStyle(iframe).height should be 100px. Was 150px.
 2PASS iframe.seamless is true
 3PASS nestedFrame.seamless is true
 4PASS window.getComputedStyle(iframe).width is "200px"
 5PASS window.getComputedStyle(iframe).height is "100px"
66

LayoutTests/fast/frames/seamless/seamless-percent-height-expected.txt

 1Test that the 'initial containing block height' is 0 for seamless child documents.
 2PASS window.getComputedStyle(iframe).width is "200px"
 3PASS window.getComputedStyle(iframe).height is "0px"
 4

LayoutTests/fast/frames/seamless/seamless-percent-height.html

 1<!DOCTYPE html>
 2<script src="../../js/resources/js-test-pre.js"></script>
 3<div id="parent" style="width: 200px; height: 200px;">
 4<iframe id="iframe" seamless src="resources/percent-square.html"></iframe>
 5</div>
 6<script>
 7debug("Test that the 'initial containing block height' is 0 for seamless child documents.")
 8window.onload = function () {
 9 window.iframe = document.getElementById("iframe");
 10
 11 // Width 100% still works as expected.
 12 shouldBeEqualToString("window.getComputedStyle(iframe).width", "200px");
 13
 14 // But height: 100% should be 0, per the spec:
 15 // In visual media, in a CSS-supporting user agent: the user agent must force the
 16 // height of the initial containing block of the active document of the nested
 17 // browsing context of the iframe to zero.
 18 shouldBeEqualToString("window.getComputedStyle(iframe).height", "0px");
 19}
 20</script>

LayoutTests/fast/frames/seamless/seamless-quirks-expected.txt

11Test that a quirks-mode document inside a seamless iframe sizes correctly.
2 FAIL iframe.seamless should be true (of type boolean). Was undefined (of type undefined).
 2PASS iframe.seamless is true
33PASS iframe.contentDocument.compatMode is "BackCompat"
4 FAIL window.getComputedStyle(iframe).width should be 200px. Was 300px.
5 FAIL window.getComputedStyle(iframe).height should be 100px. Was 150px.
 4PASS window.getComputedStyle(iframe).width is "200px"
 5PASS window.getComputedStyle(iframe).height is "100px"
66

LayoutTests/fast/frames/seamless/seamless-sandbox-flag-expected.txt

11Test that sandbox disables nested seamless iframes correctly.
2 FAIL iframe.seamless should be true (of type boolean). Was undefined (of type undefined).
3 FAIL nestedFrame.seamless should be true (of type boolean). Was undefined (of type undefined).
 2PASS iframe.seamless is true
 3PASS nestedFrame.seamless is true
44PASS window.getComputedStyle(iframe).display is "block"
55PASS window.getComputedStyle(iframe).borderWidth is "0px"
66PASS window.getComputedStyle(iframe).borderStyle is "none"
7 FAIL window.getComputedStyle(iframe).width should be 200px. Was 300px.
 7PASS window.getComputedStyle(iframe).width is "200px"
88PASS window.getComputedStyle(iframe).height is "150px"
99

LayoutTests/fast/frames/seamless/seamless-sandbox-srcdoc-expected.txt

11Test that iframes with srcdoc contents can still be seamless.
2 FAIL iframe.seamless should be true (of type boolean). Was undefined (of type undefined).
3 FAIL window.getComputedStyle(iframe).width should be 200px. Was 300px.
4 FAIL window.getComputedStyle(iframe).height should be 100px. Was 150px.
 2PASS iframe.seamless is true
 3PASS window.getComputedStyle(iframe).width is "200px"
 4PASS window.getComputedStyle(iframe).height is "100px"
55