зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1471894) for wpt failures on non-replaced-elements/flow-content-0/dialog.html CLOSED TREE
Backed out changeset bce3c6ca2e19 (bug 1471894) Backed out changeset 6ab2fb716899 (bug 1471894)
This commit is contained in:
Родитель
e16af06073
Коммит
02908b5c58
|
@ -1237,20 +1237,16 @@ ReflowInput::CalculateBorderPaddingMargin(
|
|||
nscoord start, end;
|
||||
// We have to compute the start and end values
|
||||
if (eStyleUnit_Auto == mStyleMargin->mMargin.GetUnit(startSide)) {
|
||||
// We set this to 0 for now, and fix it up later in
|
||||
// InitAbsoluteConstraints (which is caller of this function, via
|
||||
// CalculateHypotheticalPosition).
|
||||
start = 0;
|
||||
// XXX FIXME (or does CalculateBlockSideMargins do this?)
|
||||
start = 0; // just ignore
|
||||
} else {
|
||||
start = nsLayoutUtils::
|
||||
ComputeCBDependentValue(aContainingBlockSize,
|
||||
mStyleMargin->mMargin.Get(startSide));
|
||||
}
|
||||
if (eStyleUnit_Auto == mStyleMargin->mMargin.GetUnit(endSide)) {
|
||||
// We set this to 0 for now, and fix it up later in
|
||||
// InitAbsoluteConstraints (which is caller of this function, via
|
||||
// CalculateHypotheticalPosition).
|
||||
end = 0;
|
||||
// XXX FIXME (or does CalculateBlockSideMargins do this?)
|
||||
end = 0; // just ignore
|
||||
} else {
|
||||
end = nsLayoutUtils::
|
||||
ComputeCBDependentValue(aContainingBlockSize,
|
||||
|
@ -1769,10 +1765,6 @@ ReflowInput::InitAbsoluteConstraints(nsPresContext* aPresContext,
|
|||
ComputedLogicalBorderPadding().ConvertTo(cbwm, wm);
|
||||
|
||||
bool iSizeIsAuto = eStyleUnit_Auto == mStylePosition->ISize(cbwm).GetUnit();
|
||||
bool marginIStartIsAuto = false;
|
||||
bool marginIEndIsAuto = false;
|
||||
bool marginBStartIsAuto = false;
|
||||
bool marginBEndIsAuto = false;
|
||||
if (iStartIsAuto) {
|
||||
// We know 'right' is not 'auto' anymore thanks to the hypothetical
|
||||
// box code above.
|
||||
|
@ -1843,9 +1835,9 @@ ReflowInput::InitAbsoluteConstraints(nsPresContext* aPresContext,
|
|||
nscoord availMarginSpace =
|
||||
aCBSize.ISize(cbwm) - offsets.IStartEnd(cbwm) - margin.IStartEnd(cbwm) -
|
||||
borderPadding.IStartEnd(cbwm) - computedSize.ISize(cbwm);
|
||||
marginIStartIsAuto =
|
||||
bool marginIStartIsAuto =
|
||||
eStyleUnit_Auto == mStyleMargin->mMargin.GetIStartUnit(cbwm);
|
||||
marginIEndIsAuto =
|
||||
bool marginIEndIsAuto =
|
||||
eStyleUnit_Auto == mStyleMargin->mMargin.GetIEndUnit(cbwm);
|
||||
|
||||
if (marginIStartIsAuto) {
|
||||
|
@ -1931,9 +1923,9 @@ ReflowInput::InitAbsoluteConstraints(nsPresContext* aPresContext,
|
|||
// * we're dealing with a replaced element
|
||||
// * bsize was constrained by min- or max-bsize.
|
||||
nscoord availMarginSpace = autoBSize - computedSize.BSize(cbwm);
|
||||
marginBStartIsAuto =
|
||||
bool marginBStartIsAuto =
|
||||
eStyleUnit_Auto == mStyleMargin->mMargin.GetBStartUnit(cbwm);
|
||||
marginBEndIsAuto =
|
||||
bool marginBEndIsAuto =
|
||||
eStyleUnit_Auto == mStyleMargin->mMargin.GetBEndUnit(cbwm);
|
||||
|
||||
if (marginBStartIsAuto) {
|
||||
|
@ -1962,19 +1954,7 @@ ReflowInput::InitAbsoluteConstraints(nsPresContext* aPresContext,
|
|||
ComputedISize() = computedSize.ConvertTo(wm, cbwm).ISize(wm);
|
||||
|
||||
SetComputedLogicalOffsets(offsets.ConvertTo(wm, cbwm));
|
||||
|
||||
LogicalMargin marginInOurWM = margin.ConvertTo(wm, cbwm);
|
||||
SetComputedLogicalMargin(marginInOurWM);
|
||||
|
||||
// If we have auto margins, update our UsedMarginProperty. The property
|
||||
// will have already been created by InitOffsets if it is needed.
|
||||
if (marginIStartIsAuto || marginIEndIsAuto ||
|
||||
marginBStartIsAuto || marginBEndIsAuto) {
|
||||
nsMargin* propValue = mFrame->GetProperty(nsIFrame::UsedMarginProperty());
|
||||
MOZ_ASSERT(propValue, "UsedMarginProperty should have been created "
|
||||
"by InitOffsets.");
|
||||
*propValue = marginInOurWM.GetPhysicalMargin(wm);
|
||||
}
|
||||
SetComputedLogicalMargin(margin.ConvertTo(wm, cbwm));
|
||||
}
|
||||
|
||||
// This will not be converted to abstract coordinates because it's only
|
||||
|
|
|
@ -184511,18 +184511,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"svg/linking/reftests/use-descendant-combinator-003.html": [
|
||||
[
|
||||
"/svg/linking/reftests/use-descendant-combinator-003.html",
|
||||
[
|
||||
[
|
||||
"/svg/linking/reftests/use-descendant-combinator-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"svg/painting/currentColor-override-pserver-fallback.svg": [
|
||||
[
|
||||
"/svg/painting/currentColor-override-pserver-fallback.svg",
|
||||
|
@ -184559,6 +184547,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"svg/linking/reftests/use-descendant-combinator-003.html": [
|
||||
[
|
||||
"/svg/linking/reftests/use-descendant-combinator-003.html",
|
||||
[
|
||||
[
|
||||
"/svg/linking/reftests/use-descendant-combinator-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"svg/painting/reftests/paint-context-001.svg": [
|
||||
[
|
||||
"/svg/painting/reftests/paint-context-001.svg",
|
||||
|
@ -325276,12 +325276,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/cssom/computed-style-005.html": [
|
||||
[
|
||||
"/css/cssom/computed-style-005.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/cssom/computed-style-set-property.html": [
|
||||
[
|
||||
"/css/cssom/computed-style-set-property.html",
|
||||
|
@ -439014,7 +439008,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"content-security-policy/securitypolicyviolation/img-src-redirect-upgrade-reporting.https.html": [
|
||||
"f6623c80b2b4be3fd9dd0f5dc0a6417652f1b797",
|
||||
"e338e94ea726419db64ed5b98c95b862c394409e",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/securitypolicyviolation/img-src-redirect-upgrade-reporting.https.html.headers": [
|
||||
|
@ -439066,7 +439060,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"content-security-policy/securitypolicyviolation/support/inside-worker.sub.js": [
|
||||
"d94662579190653a3b3e9d076b79d7b0f01f2dc7",
|
||||
"f425a7ae6c167bfe9857f08f460897e16bf6ca95",
|
||||
"support"
|
||||
],
|
||||
"content-security-policy/securitypolicyviolation/support/inside-worker.sub.js.headers": [
|
||||
|
@ -552057,10 +552051,6 @@
|
|||
"55010cf90dc7fc2ef8ec6cbd13d1ec947a823aed",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/computed-style-005.html": [
|
||||
"690ce1465de338f19b1e7282b4a221e7fe374a12",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/computed-style-set-property.html": [
|
||||
"cb05ff525eb659d43bf234d932fd860795959c9e",
|
||||
"testharness"
|
||||
|
@ -619093,10 +619083,6 @@
|
|||
"3d51ca0fc007d52147e7ea03493cac7ee1bb7903",
|
||||
"reftest"
|
||||
],
|
||||
"svg/linking/reftests/use-descendant-combinator-003.html": [
|
||||
"d9155d3b92ecf0735f82ed9a0f2a8fd3fc380d55",
|
||||
"reftest"
|
||||
],
|
||||
"svg/linking/reftests/use-descendant-combinator-ref.html": [
|
||||
"fb8aec792684b97151d2964b85d1e70829e141ad",
|
||||
"support"
|
||||
|
@ -622202,7 +622188,7 @@
|
|||
"support"
|
||||
],
|
||||
"webaudio/historical.html": [
|
||||
"c6e3c7d6751731c708edfb0f4e32df8a6a3b80b0",
|
||||
"93068df297042344669093ce899f0230c87ebf54",
|
||||
"testharness"
|
||||
],
|
||||
"webaudio/idlharness.https.html": [
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Test: getComputedStyle on blocks with auto margins</title>
|
||||
<link rel="author" title="Brad Werth" href="mailto:bwerth@mozilla.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle" />
|
||||
<meta name="assert" content="getComputedStyle produces pixel values for margin: auto blocks">
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
<style>
|
||||
x {
|
||||
display: block;
|
||||
position: relative;
|
||||
background: grey;
|
||||
width: 60px;
|
||||
height: 10px;
|
||||
}
|
||||
y {
|
||||
display: block;
|
||||
background: blue;
|
||||
width: 40px;
|
||||
height: 10px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#absolute {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
#relative {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<x><y id="absolute"></y></x>
|
||||
<x><y id="relative"></y></x>
|
||||
<script type="text/javascript">
|
||||
let idsToTest = [
|
||||
"absolute",
|
||||
"relative",
|
||||
];
|
||||
|
||||
for (let id of idsToTest) {
|
||||
let elem = document.getElementById(id);
|
||||
let elemStyle = window.getComputedStyle(elem);
|
||||
|
||||
test(function() {
|
||||
assert_equals(elemStyle.getPropertyValue("margin-left"), "10px");
|
||||
assert_equals(elemStyle.getPropertyValue("margin-right"), "10px");
|
||||
}, id + "_computed_margins", {
|
||||
assert: id + "-positioned element's auto margins should be resolved to 10px."
|
||||
});
|
||||
|
||||
test(function() {
|
||||
assert_equals(elemStyle.getPropertyValue("left"), "0px");
|
||||
assert_equals(elemStyle.getPropertyValue("right"), "0px");
|
||||
}, id + "_computed_left_and_right", {
|
||||
assert: id + "-positioned element should have a left and right of 0px (as authored)."
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче