Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split mpadded-002.html first paragraph #24603

Merged
merged 1 commit into from Jul 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions mathml/presentation-markup/mpadded/mpadded-002.html
Expand Up @@ -50,7 +50,7 @@
for (var i = 0; i <= 2; i++) {
var mpadded = getBox("depth" + i);
assert_equals(mpadded.width, contentWidth, "width" + i);
assert_approx_equals(getBox("baseline").bottom - mpadded.top, contentHeight, epsilon, "height" + i);
assert_approx_equals(getBox("baseline2").bottom - mpadded.top, contentHeight, epsilon, "height" + i);
assert_approx_equals(mpadded.bottom - getBox("baseline").bottom, 25*(i+1), epsilon, "depth" + i);
}
}, "Different depths");
Expand All @@ -59,7 +59,7 @@
for (var i = 0; i <= 2; i++) {
var mpadded = getBox("mpadded" + i);
assert_approx_equals(mpadded.width, 25*(1+i%3), epsilon, "width" + i);
assert_approx_equals(getBox("baseline").bottom - mpadded.top, 25*(1+(i+1)%3), epsilon, "height" + i);
assert_approx_equals(getBox("baseline2").bottom - mpadded.top, 25*(1+(i+1)%3), epsilon, "height" + i);
assert_approx_equals(mpadded.bottom - getBox("baseline").bottom, 25*(1+(i+2)%3), epsilon, "depth" + i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmh this one is still baseline? (I didn't read the test again, but please check carefully)

}
}, "Various combinations of height, depth and width.");
Expand All @@ -79,7 +79,7 @@
document.getElementById("dynamic-attach").setAttribute(name, length);
document.getElementById("dynamic-modify").setAttribute(name, length);
});
let baseline = getBox("baseline2").bottom;
let baseline = getBox("baseline3").bottom;

test(function() {
let remove = getBox("dynamic-remove");
Expand Down Expand Up @@ -126,6 +126,11 @@
<mpadded id="height0" height="25px"><mspace width="100px" depth="125px" height="150px" style="background: black; opacity: .5"/></mpadded>
<mpadded id="height1" height="50px"><mspace width="100px" depth="125px" height="150px" style="background: black; opacity: .5"/></mpadded>
<mpadded id="height2" height="75px"><mspace width="100px" depth="125px" height="150px" style="background: black; opacity: .5"/></mpadded>
</math>
</p>
<p>
<span id="baseline2" style="display: inline-block; width: 30px; height: 5px; background: blue"></span>
<math>
<mpadded id="depth0" depth="25px"><mspace width="100px" depth="125px" height="150px" style="background: black; opacity: .5"/></mpadded>
<mpadded id="depth1" depth="50px"><mspace width="100px" depth="125px" height="150px" style="background: black; opacity: .5"/></mpadded>
<mpadded id="depth2" depth="75px"><mspace width="100px" depth="125px" height="150px" style="background: black; opacity: .5"/></mpadded>
Expand All @@ -140,7 +145,7 @@
</div>
</div>
<p>
<span id="baseline2" style="display: inline-block; width: 30px; height: 5px; background: blue"></span>
<span id="baseline3" style="display: inline-block; width: 30px; height: 5px; background: blue"></span>
<math>
<mpadded id="dynamic-attach" style="background: lightgreen"><mspace width="100px" depth="125px" height="150px" style="background: black; opacity: .5"/></mpadded>
<mpadded id="dynamic-remove" width="10px" height="20px" depth="30px" style="background: lightyellow"><mspace width="100px" depth="125px" height="150px" style="background: black; opacity: .5"/></mpadded>
Expand Down