Backed out 4 changesets (bug 1102175) for Android reftest failures at font-inflation-1a.html

Backed out changeset 33914610f60f (bug 1102175)
Backed out changeset 004a0cb8af9f (bug 1102175)
Backed out changeset 2ac28b335c3c (bug 1102175)
Backed out changeset 50b041e06f23 (bug 1102175)
This commit is contained in:
Gurzau Raul 2019-10-10 07:40:38 +03:00
parent 416e3d85d4
commit 5542cedd05
50 changed files with 109 additions and 675 deletions

View File

@ -2314,33 +2314,6 @@ nsIFrame* nsCSSFrameConstructor::ConstructDocElementFrame(
return nullptr;
}
if (aDocElement->IsHTMLElement() &&
mDocElementContainingBlock->IsCanvasFrame()) {
// This implements "The Principal Writing Mode".
// https://drafts.csswg.org/css-writing-modes-3/#principal-flow
//
// If there's a <body> element, its writing-mode, direction, and
// text-orientation override the root element's used value.
//
// We need to copy <body>'s WritingMode to mDocElementContainingBlock before
// construct mRootElementFrame so that anonymous internal frames such as
// <html> with table style can copy their parent frame's mWritingMode in
// nsFrame::Init().
MOZ_ASSERT(!mRootElementFrame,
"We need to copy <body>'s principal writing-mode before "
"constructing mRootElementFrame.");
Element* body = mDocument->GetBodyElement();
if (body) {
RefPtr<ComputedStyle> bodyStyle = ResolveComputedStyle(body);
mDocElementContainingBlock->PropagateWritingModeToSelfAndAncestors(
WritingMode(bodyStyle));
} else {
mDocElementContainingBlock->PropagateWritingModeToSelfAndAncestors(
mDocElementContainingBlock->GetWritingMode());
}
}
nsFrameConstructorSaveState docElementContainingBlockAbsoluteSaveState;
if (mHasRootAbsPosContainingBlock) {
// Push the absolute containing block now so we can absolutely position
@ -6840,7 +6813,7 @@ void nsCSSFrameConstructor::ContentAppended(nsIContent* aFirstNewContent,
}
LAYOUT_PHASE_TEMP_EXIT();
if (WipeInsertionParent(parentFrame, aFirstNewContent, nullptr)) {
if (WipeInsertionParent(parentFrame)) {
LAYOUT_PHASE_TEMP_REENTER();
return;
}
@ -7241,7 +7214,7 @@ void nsCSSFrameConstructor::ContentRangeInserted(
}
LAYOUT_PHASE_TEMP_EXIT();
if (WipeInsertionParent(insertion.mParentFrame, aStartChild, aEndChild)) {
if (WipeInsertionParent(insertion.mParentFrame)) {
LAYOUT_PHASE_TEMP_REENTER();
return;
}
@ -8441,17 +8414,6 @@ bool nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(
"placeholder for primary frame has previous continuations?");
nsIFrame* parent = inFlowFrame->GetParent();
if (aFrame->GetContent() == mDocument->GetBodyElement()) {
// If the frame of the canonical body element is removed (either because of
// removing of the element, or removing for frame construction like
// writing-mode changed), we need to reframe the root element so that the
// root element's frames has the correct writing-mode propagated from body
// element. (See nsCSSFrameConstructor::ConstructDocElementFrame.)
TRACE("Root");
RecreateFramesForContent(mDocument->GetRootElement(), InsertionKind::Async);
return true;
}
if (inFlowFrame->HasAnyStateBits(NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR)) {
nsIFrame* grandparent = parent->GetParent();
MOZ_ASSERT(grandparent);
@ -11382,34 +11344,13 @@ static bool IsSafeToAppendToIBSplitInline(nsIFrame* aParentFrame,
return true;
}
bool nsCSSFrameConstructor::WipeInsertionParent(nsContainerFrame* aFrame,
nsIContent* aStartChild,
nsIContent* aEndChild) {
bool nsCSSFrameConstructor::WipeInsertionParent(nsContainerFrame* aFrame) {
#define TRACE(reason) \
PROFILER_TRACING("Layout", "WipeInsertionParent: " reason, LAYOUT, \
TRACING_EVENT)
MOZ_ASSERT(aStartChild, "Must always pass aStartChild!");
const LayoutFrameType frameType = aFrame->Type();
if (aFrame->GetContent() == mDocument->GetRootElement()) {
// If we insert a content that becomes the canonical body element, we need
// to reframe the root element so that the root element's frames has the
// correct writing-mode propagated from body element. (See
// nsCSSFrameConstructor::ConstructDocElementFrame.)
nsIContent* bodyElement = mDocument->GetBodyElement();
for (nsIContent* child = aStartChild; child != aEndChild;
child = child->GetNextSibling()) {
if (child == bodyElement) {
TRACE("Root");
RecreateFramesForContent(mDocument->GetRootElement(),
InsertionKind::Async);
return true;
}
}
}
// FIXME(emilio): This looks terribly inefficient if you insert elements deep
// in a MathML subtree.
if (aFrame->IsFrameOfType(nsIFrame::eMathML)) {

View File

@ -1906,19 +1906,14 @@ class nsCSSFrameConstructor final : public nsFrameManager {
// rebuild the entire subtree when we insert or append new content under
// aFrame.
//
// [aStartChild, aEndChild) is the range of the children to be inserted.
// aStartChild must be non-null; aEndChild may be null to indicate that we are
// appending the range includes all kids after aStartChild.
//
// This is similar to WipeContainingBlock(), but is called before constructing
// any frame construction items. Any container frames which need reframing by
// checking only the content inserted or appended, not the style of the
// content, can add a check in this method.
// any frame construction items. Any container frames which need reframing
// regardless of the content inserted or appended can add a check in this
// method.
//
// @return true if we reconstructed the insertion parent frame; false
// otherwise
bool WipeInsertionParent(nsContainerFrame* aFrame, nsIContent* aStartChild,
nsIContent* aEndChild);
bool WipeInsertionParent(nsContainerFrame* aFrame);
// Determine whether we need to wipe out what we just did and start over
// because we're doing something like adding block kids to an inline frame

View File

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS-Writing Modes Test: propagation of the writing-mode property from body to root</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel=help href="https://drafts.csswg.org/css-writing-modes-3/#principal-flow">
<link rel="match" href="wm-propagation-body-dynamic-change-002-ref.html">
<meta name=assert content="The writing mode of the newly inserted body must be propagated to the root.">
<script>
function runTest() {
document.body.offsetHeight;
var newBody = document.createElement("body");
newBody.id = "new-body";
var oldBody = document.getElementById("old-body");
/* Insert a new <body> before the old one, which should become the primary <body>. */
document.documentElement.insertBefore(newBody, oldBody);
}
</script>
<style>
#new-body {
/* This writing-mode should propagate to the root element. */
writing-mode: vertical-rl;
margin: 0;
}
#old-body {
writing-mode: horizontal-tb;
inline-size: 100px;
}
div {
background-color: blue;
height: 100px;
width: 100px;
}
</style>
<body id="old-body" onload="runTest();">
<div></div>
<p>Test passes if you see a blue square in the upper-right corner of the page</p>
</body>
</html>

View File

@ -593,7 +593,6 @@ load 1042489.html
load 1054010-1.html
load 1058954-1.html
skip-if(verify&&isDebugBuild&&(gtkWidget||OSX)) load 1059138-1.html
load 1102175-2.html
load 1134531.html
load 1134667.html
load 1137723-1.html

View File

@ -7110,23 +7110,19 @@ void nsBlockFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
}
// A display:flow-root box establishes a block formatting context.
//
// If a box has a different writing-mode value than its containing block:
// If a box has a different block flow direction than its containing block:
// ...
// If the box is a block container, then it establishes a new block
// formatting context.
// (https://drafts.csswg.org/css-writing-modes/#block-flow)
// (http://dev.w3.org/csswg/css-writing-modes/#block-flow)
//
// If the box has contain: paint or contain:layout (or contain:strict),
// then it should also establish a formatting context.
//
// Per spec, a column-span always establishes a new block formatting context.
if (StyleDisplay()->mDisplay == mozilla::StyleDisplay::FlowRoot ||
(GetParent() &&
(GetWritingMode().GetBlockDir() !=
GetParent()->GetWritingMode().GetBlockDir() ||
GetWritingMode().IsVerticalSideways() !=
GetParent()->GetWritingMode().IsVerticalSideways())) ||
(GetParent() && StyleVisibility()->mWritingMode !=
GetParent()->StyleVisibility()->mWritingMode) ||
StyleDisplay()->IsContainPaint() || StyleDisplay()->IsContainLayout() ||
(StaticPrefs::layout_css_column_span_enabled() && IsColumnSpan())) {
AddStateBits(NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS);

View File

@ -247,6 +247,7 @@ void nsCanvasFrame::SetInitialChildList(ChildListID aListID,
aChildList.OnlyChild(),
"Primary child list can have at most one frame in it");
nsContainerFrame::SetInitialChildList(aListID, aChildList);
MaybePropagateRootElementWritingMode();
}
void nsCanvasFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) {
@ -263,6 +264,7 @@ void nsCanvasFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) {
nsFrame::VerifyDirtyBitSet(aFrameList);
#endif
nsContainerFrame::AppendFrames(aListID, aFrameList);
MaybePropagateRootElementWritingMode();
}
void nsCanvasFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
@ -272,6 +274,7 @@ void nsCanvasFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
// as appending
MOZ_ASSERT(!aPrevFrame, "unexpected previous sibling frame");
AppendFrames(aListID, aFrameList);
MaybePropagateRootElementWritingMode();
}
#ifdef DEBUG
@ -829,6 +832,15 @@ nsresult nsCanvasFrame::GetContentForEvent(WidgetEvent* aEvent,
return rv;
}
void nsCanvasFrame::MaybePropagateRootElementWritingMode() {
nsIFrame* child = PrincipalChildList().FirstChild();
if (child && child->GetContent() &&
child->GetContent() == PresContext()->Document()->GetRootElement()) {
nsIFrame* childPrimary = child->GetContent()->GetPrimaryFrame();
PropagateRootElementWritingMode(childPrimary->GetWritingMode());
}
}
#ifdef DEBUG_FRAME_DUMP
nsresult nsCanvasFrame::GetFrameName(nsAString& aResult) const {
return MakeFrameName(NS_LITERAL_STRING("Canvas"), aResult);

View File

@ -118,6 +118,10 @@ class nsCanvasFrame final : public nsContainerFrame,
nsRect CanvasArea() const;
protected:
// Utility function to propagate the WritingMode from our first child to
// 'this' and all its ancestors.
void MaybePropagateRootElementWritingMode();
// Data members
bool mDoPaintFocus;
bool mAddedScrollPositionListener;

View File

@ -638,15 +638,6 @@ void nsFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
PresContext()->ConstructedFrame();
}
if (GetParent()) {
if (MOZ_UNLIKELY(mContent == PresContext()->Document()->GetRootElement() &&
mContent == GetParent()->GetContent())) {
// Our content is the root element and we have the same content as our
// parent. That is, we are the internal anonymous frame of the root
// element. Copy the used mWritingMode from our parent because
// mDocElementContainingBlock gets its mWritingMode from <body>.
mWritingMode = GetParent()->GetWritingMode();
}
// Copy some state bits from our parent (the bits that should apply
// recursively throughout a subtree). The bits are sorted according to their
// order in nsFrameStateBits.h.

View File

@ -894,12 +894,8 @@ class nsIFrame : public nsQueryFrame {
* It's usually the 'writing-mode' computed value, but there are exceptions:
* * inner table frames copy the value from the table frame
* (@see nsTableRowGroupFrame::Init, nsTableRowFrame::Init etc)
* * the root element frame propagates its value to its ancestors.
* The value may obtain from the principal <body> element.
* (@see nsCSSFrameConstructor::ConstructDocElementFrame)
* * the internal anonymous frames of the root element copy their value
* from the parent.
* (@see nsFrame::Init)
* * the root element frame propagates its value to its ancestors
* (@see nsCanvasFrame::MaybePropagateRootElementWritingMode)
* * a scrolled frame propagates its value to its ancestor scroll frame
* (@see nsHTMLScrollFrame::ReloadChildFrames)
*/
@ -4259,11 +4255,6 @@ class nsIFrame : public nsQueryFrame {
mozilla::gfx::CompositorHitTestInfo GetCompositorHitTestInfo(
nsDisplayListBuilder* aBuilder);
/**
* Copies aWM to mWritingMode on 'this' and all its ancestors.
*/
inline void PropagateWritingModeToSelfAndAncestors(mozilla::WritingMode aWM);
protected:
static void DestroyAnonymousContent(nsPresContext* aPresContext,
already_AddRefed<nsIContent>&& aContent);
@ -4318,6 +4309,11 @@ class nsIFrame : public nsQueryFrame {
}
protected:
/**
* Copies aRootElemWM to mWritingMode on 'this' and all its ancestors.
*/
inline void PropagateRootElementWritingMode(mozilla::WritingMode aRootElemWM);
void MarkInReflow() {
#ifdef DEBUG_dbaron_off
// bug 81268

View File

@ -144,11 +144,11 @@ nscoord nsIFrame::BaselineBOffset(mozilla::WritingMode aWM,
return SynthesizeBaselineBOffsetFromBorderBox(aWM, aBaselineGroup);
}
void nsIFrame::PropagateWritingModeToSelfAndAncestors(
mozilla::WritingMode aWM) {
void nsIFrame::PropagateRootElementWritingMode(
mozilla::WritingMode aRootElemWM) {
MOZ_ASSERT(IsCanvasFrame());
for (auto f = this; f; f = f->GetParent()) {
f->mWritingMode = aWM;
f->mWritingMode = aRootElemWM;
}
}

View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html style="width: 50%;">
<body style="">
<div style="background: green; height: 10em;"></div>
</body>
</html>

View File

@ -141,7 +141,7 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 712600-3.html 712600-3-r
== 817406-1.html 817406-1-ref.html
== 817406-2.html 817406-2-ref.html
== 817406-3.html 817406-1-ref.html
== 817406-4.html 817406-1-ref.html
== 817406-4.html 817406-4-ref.html
== 847242-1.html 847242-1-ref.html
pref(layout.css.xul-tree-pseudos.content.enabled,true) fuzzy-if(xulRuntime.widgetToolkit=="gtk",0-1,0-11) == chrome://reftest/content/bidi/869833-1.xul chrome://reftest/content/bidi/869833-1-ref.xul
== 922530-1.html 922530-1-ref.html

View File

@ -168,11 +168,10 @@ fails css-writing-modes/vertical-alignment-vlr-025.xht
fails css-writing-modes/vertical-alignment-vrl-022.xht
fails css-writing-modes/vertical-alignment-vrl-024.xht
css-writing-modes/text-combine-upright-layout-rules-001.html
# Bug 1102175
fails css-writing-modes/wm-propagation-body-*.xht
# Bug 1580385 - Fix failing writing-mode tests because of propagating WritingMode from <body>
fails css-writing-modes/normal-flow-overconstrained-vlr-005.xht
fails css-writing-modes/normal-flow-overconstrained-vrl-004.xht
css-writing-modes/text-combine-upright-layout-rules-001.html
#### CSS Multi-column 1 ##############################################

View File

@ -876,9 +876,9 @@ fuzzy-if(OSX||winWidget,0-213,0-1540) random-if(/^Windows\x20NT\x206\.1/.test(ht
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/margin-vlr-003.xht css-writing-modes/margin-vrl-002-ref.xht
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/margin-vrl-002.xht css-writing-modes/margin-vrl-002-ref.xht
== css-writing-modes/normal-flow-overconstrained-vlr-003.xht css-writing-modes/abs-pos-non-replaced-vlr-007-ref.xht
fails == css-writing-modes/normal-flow-overconstrained-vlr-005.xht css-writing-modes/abs-pos-non-replaced-vlr-013-ref.xht
== css-writing-modes/normal-flow-overconstrained-vlr-005.xht css-writing-modes/abs-pos-non-replaced-vlr-013-ref.xht
== css-writing-modes/normal-flow-overconstrained-vrl-002.xht css-writing-modes/abs-pos-non-replaced-vrl-006-ref.xht
fails == css-writing-modes/normal-flow-overconstrained-vrl-004.xht css-writing-modes/abs-pos-non-replaced-vrl-012-ref.xht
== css-writing-modes/normal-flow-overconstrained-vrl-004.xht css-writing-modes/abs-pos-non-replaced-vrl-012-ref.xht
== css-writing-modes/ortho-htb-alongside-vrl-floats-002.xht css-writing-modes/ortho-htb-alongside-vrl-floats-002-ref.xht
== css-writing-modes/ortho-htb-alongside-vrl-floats-006.xht css-writing-modes/ortho-htb-alongside-vrl-floats-006-ref.xht
== css-writing-modes/ortho-htb-alongside-vrl-floats-010.xht css-writing-modes/ortho-htb-alongside-vrl-floats-010-ref.xht
@ -1156,11 +1156,11 @@ fuzzy-if(winWidget,0-223,0-720) fuzzy-if(!webrender&&OSX,255-255,120-200) random
fails == css-writing-modes/vertical-alignment-vrl-022.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht
fails == css-writing-modes/vertical-alignment-vrl-024.xht css-writing-modes/vertical-alignment-vrl-022-ref.xht
fuzzy-if(winWidget,0-223,0-720) fuzzy-if(!webrender&&OSX,255-255,120-200) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/vertical-alignment-vrl-026.xht css-writing-modes/vertical-alignment-vrl-026-ref.xht
== css-writing-modes/wm-propagation-body-006.xht css-writing-modes/block-flow-direction-025-ref.xht
== css-writing-modes/wm-propagation-body-008.xht css-writing-modes/block-flow-direction-025-ref.xht
== css-writing-modes/wm-propagation-body-010.xht css-writing-modes/wm-propagation-body-003-ref.xht
== css-writing-modes/wm-propagation-body-011.xht css-writing-modes/wm-propagation-body-003-ref.xht
== css-writing-modes/wm-propagation-body-015.xht css-writing-modes/block-flow-direction-025-ref.xht
fails == css-writing-modes/wm-propagation-body-006.xht css-writing-modes/block-flow-direction-025-ref.xht
fails == css-writing-modes/wm-propagation-body-008.xht css-writing-modes/block-flow-direction-025-ref.xht
fails == css-writing-modes/wm-propagation-body-010.xht css-writing-modes/wm-propagation-body-003-ref.xht
fails == css-writing-modes/wm-propagation-body-011.xht css-writing-modes/wm-propagation-body-003-ref.xht
fails == css-writing-modes/wm-propagation-body-015.xht css-writing-modes/block-flow-direction-025-ref.xht
== css-writing-modes/writing-mode-horizontal-001l.html css-writing-modes/reference/writing-mode-horizontal-001l-ref.html
== css-writing-modes/writing-mode-horizontal-001r.html css-writing-modes/reference/writing-mode-horizontal-001r-ref.html
fuzzy-if(winWidget,0-158,0-624) fuzzy-if(!webrender&&OSX,255-255,480-520) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == css-writing-modes/writing-mode-vertical-lr-002.xht css-writing-modes/reftest/writing-mode-vertical-lr-002-ref.xht

View File

@ -24,7 +24,7 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1091058-1.html 1091058-1
== 1094914-1b.html 1094914-1-ref.html
== 1096224-1a.html 1096224-1-ref.html
== 1096224-1b.html 1096224-1-ref.html
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1102175-1a.html 1102175-1-ref.html # Bug 1392106
fails random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1102175-1a.html 1102175-1-ref.html # Bug 1392106
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1102175-1b.html 1102175-1-ref.html # Bug 1392106
== 1103613-1.html 1103613-1-ref.html
== 1105268-1-min-max-dimensions.html 1105268-1-min-max-dimensions-ref.html

View File

@ -1,3 +0,0 @@
[normal-flow-overconstrained-vlr-005.xht]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1580385

View File

@ -1,3 +0,0 @@
[normal-flow-overconstrained-vrl-004.xht]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1580385

View File

@ -0,0 +1,2 @@
[wm-propagation-002.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-032.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-033.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-034.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-035.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-036.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-037.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-038.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-039.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-040.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-041.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-043.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-045.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-046.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-048.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-050.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-051.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-052.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-053.html]
expected: FAIL

View File

@ -0,0 +1,2 @@
[wm-propagation-body-055.html]
expected: FAIL

View File

@ -0,0 +1,7 @@
[wm-propagation-body-scroll-offset-vertical-lr.html]
[Scroll to scrollLeft = -1000 should not be possible.]
expected: FAIL
[Scroll to scrollLeft = 1000 should be possible.]
expected: FAIL

View File

@ -0,0 +1,7 @@
[wm-propagation-body-scroll-offset-vertical-rl.html]
[Scroll to scrollLeft = -1000 should be possible.]
expected: FAIL
[Scroll to scrollLeft = 1000 should not be possible.]
expected: FAIL

View File

@ -1,50 +0,0 @@
<!DOCTYPE html>
<html>
<title>CSS Writing Modes Test Reference: positioning of a sideways-lr block alongside vertical-lr floats</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<meta content="image" name="flags">
<style>
html {
writing-mode: vertical-lr;
}
div {
block-size: 100px;
}
div#first-olive-float {
background-color: olive;
float: left;
inline-size: 50%;
}
div#second-blue-float-with-clear {
background-color: blue;
clear: left;
float: left;
inline-size: 25%;
}
div#orange-bfc {
background-color: orange;
inline-size: 75%;
display: flow-root; /* Establishes a block formatting context */
}
</style>
<body>
<p><img src="support/ortho-htb-alongside-vrl-floats-002-exp-res.png" width="300" height="36" alt="Image download support must be enabled"></p>
<!--
The image says:
Test passes if the orange rectangle
is below the blue rectangle.
-->
<div id="first-olive-float">&nbsp;</div>
<div id="second-blue-float-with-clear">&nbsp;</div>
<div id="orange-bfc">&nbsp;</div>
</body>
</html>

View File

@ -1,56 +0,0 @@
<!DOCTYPE html>
<html>
<title>CSS Writing Modes Test: positioning of a sideways-lr block alongside vertical-lr floats</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-writing-modes/#block-flow" title="3.2. Block Flow Direction: the writing-mode property">
<link rel="match" href="slr-alongside-vlr-floats-ref.html">
<!-- This test is adapted from Gérard Talbot's "ortho-htb-alongside-vrl-floats-014.xht" -->
<meta content="image" name="flags">
<meta content="This test verifies that the orange block box, which creates a new block formatting context, should flow next to the earliest float that offers sufficient space in the inline-direction." name="assert">
<style>
html {
writing-mode: vertical-lr;
}
div {
block-size: 100px;
}
div#first-olive-float {
background-color: olive;
float: left;
inline-size: 50%;
}
div#second-blue-float-with-clear {
background-color: blue;
clear: left;
float: left;
inline-size: 25%;
}
div#orange-bfc {
background-color: orange;
inline-size: 75%;
writing-mode: sideways-lr; /* Same block direction as <html> */
}
</style>
<body>
<p><img src="support/ortho-htb-alongside-vrl-floats-002-exp-res.png" width="300" height="36" alt="Image download support must be enabled"></p>
<!--
The image says:
Test passes if the orange rectangle
is below the blue rectangle.
-->
<div id="first-olive-float">&nbsp;</div>
<div id="second-blue-float-with-clear">&nbsp;</div>
<div id="orange-bfc">&nbsp;</div>
</body>
</html>

View File

@ -1,50 +0,0 @@
<!DOCTYPE html>
<html>
<title>CSS Writing Modes Test Reference: positioning of a sideways-rl block alongside vertical-rl floats</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<meta content="image" name="flags">
<style>
html {
writing-mode: vertical-rl;
}
div {
block-size: 100px;
}
div#first-olive-float {
background-color: olive;
float: left;
inline-size: 50%;
}
div#second-blue-float-with-clear {
background-color: blue;
clear: left;
float: left;
inline-size: 25%;
}
div#orange-bfc {
background-color: orange;
inline-size: 75%;
display: flow-root; /* Establishes a block formatting context */
}
</style>
<body>
<p><img src="support/ortho-htb-alongside-vrl-floats-002-exp-res.png" width="300" height="36" alt="Image download support must be enabled"></p>
<!--
The image says:
Test passes if the orange rectangle
is below the blue rectangle.
-->
<div id="first-olive-float">&nbsp;</div>
<div id="second-blue-float-with-clear">&nbsp;</div>
<div id="orange-bfc">&nbsp;</div>
</body>
</html>

View File

@ -1,56 +0,0 @@
<!DOCTYPE html>
<html>
<title>CSS Writing Modes Test: positioning of a sideways-rl block alongside vertical-rl floats</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-writing-modes/#block-flow" title="3.2. Block Flow Direction: the writing-mode property">
<link rel="match" href="srl-alongside-vrl-floats-ref.html">
<!-- This test is adapted from Gérard Talbot's "ortho-htb-alongside-vrl-floats-014.xht" -->
<meta content="image" name="flags">
<meta content="This test verifies that the orange block box, which creates a new block formatting context, should flow next to the earliest float that offers sufficient space in the inline-direction." name="assert">
<style>
html {
writing-mode: vertical-rl;
}
div {
block-size: 100px;
}
div#first-olive-float {
background-color: olive;
float: left;
inline-size: 50%;
}
div#second-blue-float-with-clear {
background-color: blue;
clear: left;
float: left;
inline-size: 25%;
}
div#orange-bfc {
background-color: orange;
inline-size: 75%;
writing-mode: sideways-rl; /* Same block direction as <html> */
}
</style>
<body>
<p><img src="support/ortho-htb-alongside-vrl-floats-002-exp-res.png" width="300" height="36" alt="Image download support must be enabled"></p>
<!--
The image says:
Test passes if the orange rectangle
is below the blue rectangle.
-->
<div id="first-olive-float">&nbsp;</div>
<div id="second-blue-float-with-clear">&nbsp;</div>
<div id="orange-bfc">&nbsp;</div>
</body>
</html>

View File

@ -1,42 +0,0 @@
<!DOCTYPE html>
<html>
<title>CSS Writing Modes Test Reference: positioning of a text-orientation:sideways block alongside vertical-lr floats</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<style>
html {
writing-mode: vertical-lr;
}
div {
block-size: 100px;
}
div#first-olive-float {
background-color: olive;
float: left;
inline-size: 50%;
}
div#second-blue-float-with-clear {
background-color: blue;
clear: left;
float: left;
inline-size: 25%;
}
div#orange-bfc {
background-color: orange;
inline-size: 75%;
writing-mode: vertical-lr;
}
</style>
<body>
<div id="first-olive-float">&nbsp;</div>
<div id="second-blue-float-with-clear">&nbsp;</div>
<div id="orange-bfc">&nbsp;</div>
</body>
</html>

View File

@ -1,49 +0,0 @@
<!DOCTYPE html>
<html>
<title>CSS Writing Modes Test: positioning of a text-orientation:sideways block alongside vertical-lr floats</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-writing-modes/#block-flow" title="3.2. Block Flow Direction: the writing-mode property">
<link rel="match" href="vlr-text-orientation-sideways-alongside-vlr-floats-ref.html">
<!-- This test is adapted from Gérard Talbot's "ortho-htb-alongside-vrl-floats-014.xht" -->
<meta content="This test verifies that the orange block box, which should not create a new block formatting context, should flow next to the first float." name="assert">
<style>
html {
writing-mode: vertical-lr;
}
div {
block-size: 100px;
}
div#first-olive-float {
background-color: olive;
float: left;
inline-size: 50%;
}
div#second-blue-float-with-clear {
background-color: blue;
clear: left;
float: left;
inline-size: 25%;
}
div#orange-bfc {
background-color: orange;
inline-size: 75%;
writing-mode: vertical-lr;
text-orientation: sideways; /* Should not create block formatting context */
}
</style>
<body>
<div id="first-olive-float">&nbsp;</div>
<div id="second-blue-float-with-clear">&nbsp;</div>
<div id="orange-bfc">&nbsp;</div>
</body>
</html>

View File

@ -1,42 +0,0 @@
<!DOCTYPE html>
<html>
<title>CSS Writing Modes Test Reference: positioning of a text-orientation:sideways block alongside vertical-rl floats</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<style>
html {
writing-mode: vertical-rl;
}
div {
block-size: 100px;
}
div#first-olive-float {
background-color: olive;
float: left;
inline-size: 50%;
}
div#second-blue-float-with-clear {
background-color: blue;
clear: left;
float: left;
inline-size: 25%;
}
div#orange-bfc {
background-color: orange;
inline-size: 75%;
writing-mode: vertical-rl;
}
</style>
<body>
<div id="first-olive-float">&nbsp;</div>
<div id="second-blue-float-with-clear">&nbsp;</div>
<div id="orange-bfc">&nbsp;</div>
</body>
</html>

View File

@ -1,49 +0,0 @@
<!DOCTYPE html>
<html>
<title>CSS Writing Modes Test: positioning of a text-orientation:sideways block alongside vertical-rl floats</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-writing-modes/#block-flow" title="3.2. Block Flow Direction: the writing-mode property">
<link rel="match" href="vrl-text-orientation-sideways-alongside-vrl-floats-ref.html">
<!-- This test is adapted from Gérard Talbot's "ortho-htb-alongside-vrl-floats-014.xht" -->
<meta content="This test verifies that the orange block box, which should not create a new block formatting context, should flow next to the first float." name="assert">
<style>
html {
writing-mode: vertical-rl;
}
div {
block-size: 100px;
}
div#first-olive-float {
background-color: olive;
float: left;
inline-size: 50%;
}
div#second-blue-float-with-clear {
background-color: blue;
clear: left;
float: left;
inline-size: 25%;
}
div#orange-bfc {
background-color: orange;
inline-size: 75%;
writing-mode: vertical-rl;
text-orientation: sideways; /* Should not create block formatting context */
}
</style>
<body>
<div id="first-olive-float">&nbsp;</div>
<div id="second-blue-float-with-clear">&nbsp;</div>
<div id="orange-bfc">&nbsp;</div>
</body>
</html>

View File

@ -1,36 +0,0 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS-Writing Modes Test: propagation of the writing-mode property from body to root</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel=help href="https://drafts.csswg.org/css-writing-modes-3/#principal-flow">
<link rel="match" href="block-flow-direction-025-ref.xht">
<meta name=assert content="The writing mode of the body must be propagated to the root with the dynamic change.">
<script>
function runTest() {
document.body.offsetHeight;
document.body.style.writingMode = "vertical-rl";
}
</script>
<style>
div {
background-color: blue;
height: 100px;
width: 100px;
}
</style>
<body onload="runTest();">
<div></div>
<p><img src="support/block-flow-direction-025-exp-res.png" width="359" height="36" alt="Image download support must be enabled"></p>
<!--
The image says:
Test passes if there is a blue square in the
<strong>upper-right corner</strong> of the page.
-->
</body>
</html>

View File

@ -1,29 +0,0 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS-Writing Modes Test: propagation of the writing-mode property from body to root</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
html {
writing-mode: vertical-rl;
}
main {
writing-mode: horizontal-tb;
inline-size: 100px;
}
div {
background-color: blue;
height: 100px;
width: 100px;
}
</style>
<main>
<div></div>
<p>Test passes if you see a blue square in the upper-right corner of the page</p>
</main>
</html>

View File

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS-Writing Modes Test: propagation of the writing-mode property from body to root</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel=help href="https://drafts.csswg.org/css-writing-modes-3/#principal-flow">
<link rel="match" href="wm-propagation-body-dynamic-change-002-ref.html">
<meta name=assert content="The writing mode of the newly inserted body must be propagated to the root.">
<script>
function runTest() {
document.body.offsetHeight;
var newBody = document.createElement("body");
newBody.id = "new-body";
var oldBody = document.getElementById("old-body");
/* Insert a new <body> before the old one, which should become the primary <body>. */
document.documentElement.insertBefore(newBody, oldBody);
}
</script>
<style>
#new-body {
/* This writing-mode should propagate to the root element. */
writing-mode: vertical-rl;
margin: 0;
}
#old-body {
writing-mode: horizontal-tb;
inline-size: 100px;
}
div {
background-color: blue;
height: 100px;
width: 100px;
}
</style>
<body id="old-body" onload="runTest();">
<div></div>
<p>Test passes if you see a blue square in the upper-right corner of the page</p>
</body>
</html>