Skip to content

Commit

Permalink
[mathml] Implement the <mspace> element
Browse files Browse the repository at this point in the history
Implement the <mspace> element [1] by adding support for it
on the DOM and adding a layout algorithm for it. Also map attribute width
to the width property and map height and depth to the height property
using calc().

Bug: 6606

[1] https://mathml-refresh.github.io/mathml-core/#space-mspace

Change-Id: Ic52832edd6a73d896c2d42041756ded5d50fcb95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1936251
Commit-Queue: Rob Buis <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Reviewed-by: Frédéric Wang <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Reviewed-by: Rune Lillesveen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#734439}
  • Loading branch information
rwlbuis authored and chromium-wpt-export-bot committed Jan 23, 2020
1 parent fb09ccb commit 62aa659
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>space and vertical-align (reference)</title>
</head>
<body>
<p>Test passes if you see a green square.</p>
<div style="position: relative;">
<div style="position: absolute; top: 0px; left: 0px;
background: green; width: 100px; height: 100px;">
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>space and vertical-align</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#space-mspace">
<link rel="match" href="space-vertical-align.tentative-ref.html"/>
<meta name="assert" content="Verify that vertical-align property has no effect on mspace">
</head>
<body>
<p>Test passes if you see a green square.</p>
<div style="position: relative;">
<div style="position: absolute; top: 0px; left: 0px;
width: 200px; height: 200px;">
<math style="position: absolute; top: 0px; left: 0px">
<mspace width="50px" height="100px" style="background: green;vertical-align:50px"/>
<mspace width="50px" height="100px" style="background: green;vertical-align:50%"/>
</math>
</div>
</div>
</body>
</html>

0 comments on commit 62aa659

Please sign in to comment.