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

Split mpadded-002.html first paragraph #24603

merged 1 commit into from Jul 15, 2020

Conversation

rwlbuis
Copy link
Contributor

@rwlbuis rwlbuis commented Jul 15, 2020

Due to lack of line-breaking, on narrow pages the first math
element will be positioned below the baseline reference. A lot
of test frameworks use narrow widths for testing and calculations
will fail, therefore split the first math element in half, giving
a higher chance for the test framework to pass this test.

@wpt-pr-bot wpt-pr-bot had a problem deploying to wpt-preview-24603 July 15, 2020 12:42 Error
</math>
</p>
<p>
<span id="baseline" style="display: inline-block; width: 30px; height: 5px; background: blue"></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems wrong to have two elements with "baseline" id, shouldn't the JS part be updated too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, good catch! Fixed.

Due to lack of line-breaking, on narrow pages the first math
element will be positioned below the baseline reference. A lot
of test frameworks use narrow widths for testing and calculations
will fail, therefore split the first math element in half, giving
a higher chance for the test framework to pass this test.
@@ -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)

@rwlbuis rwlbuis merged commit 2155d26 into master Jul 15, 2020
@rwlbuis rwlbuis deleted the padded02 branch July 15, 2020 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants