<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[202907] trunk/LayoutTests</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/202907">202907</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2016-07-07 07:29:25 -0700 (Thu, 07 Jul 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Replace reftest scripts-height.html with script tests
https://bugs.webkit.org/show_bug.cgi?id=159423
We import a test from the MathML in HTML5 test suite to replace the test scripts-height.html
and make results more reliable, explicit and accurate. This avoids the failure on iOS.
Patch by Frederic Wang <fwang@igalia.com> on 2016-07-07
Reviewed by Martin Robinson.
* imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4-expected.txt: Added.
* imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4.html: Added.
* mathml/presentation/scripts-height.html: Removed.
* platform/ios-simulator/TestExpectations: Remove failure expectation.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedmathmlinhtml5mathmlpresentationmarkupscriptssubsup4expectedtxt">trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedmathmlinhtml5mathmlpresentationmarkupscriptssubsup4html">trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsmathmlpresentationscriptsheighthtml">trunk/LayoutTests/mathml/presentation/scripts-height.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202906 => 202907)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-07 14:26:08 UTC (rev 202906)
+++ trunk/LayoutTests/ChangeLog        2016-07-07 14:29:25 UTC (rev 202907)
</span><span class="lines">@@ -1,5 +1,20 @@
</span><span class="cx"> 2016-07-07 Frederic Wang <fwang@igalia.com>
</span><span class="cx">
</span><ins>+ Replace reftest scripts-height.html with script tests
+ https://bugs.webkit.org/show_bug.cgi?id=159423
+
+ We import a test from the MathML in HTML5 test suite to replace the test scripts-height.html
+ and make results more reliable, explicit and accurate. This avoids the failure on iOS.
+
+ Reviewed by Martin Robinson.
+
+ * imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4-expected.txt: Added.
+ * imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4.html: Added.
+ * mathml/presentation/scripts-height.html: Removed.
+ * platform/ios-simulator/TestExpectations: Remove failure expectation.
+
+2016-07-07 Frederic Wang <fwang@igalia.com>
+
</ins><span class="cx"> Replace multiscripts-positions.html reftest with script tests
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=159418
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedmathmlinhtml5mathmlpresentationmarkupscriptssubsup4expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4-expected.txt (0 => 202907)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4-expected.txt         (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4-expected.txt        2016-07-07 14:29:25 UTC (rev 202907)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Alignment on the baseline for bases of different heights
+PASS Vertical position of the scripts for bases of different heights
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsimportedmathmlinhtml5mathmlpresentationmarkupscriptssubsup4html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4.html (0 => 202907)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4.html         (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4.html        2016-07-07 14:29:25 UTC (rev 202907)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Subscripts and Superscripts metrics</title>
+<link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S3.html#SS4">
+<meta name="assert" content="Verify metrics of scripted elements for bases of different heights.">
+<script src="../../../../../resources/testharness.js"></script>
+<script src="../../../../../resources/testharnessreport.js"></script>
+<style>
+ math, mspace {
+ font-size: 10px;
+ }
+</style>
+<script>
+ /* This test does not use any specific fonts and so the exact rules are not
+ specified precisely. We assume reasonable values for script shifts and
+ spacing. */
+
+ function getBox(aId) {
+ var box = document.getElementById(aId).getBoundingClientRect();
+ box.middle = (box.bottom + box.top) / 2;
+ return box;
+ }
+
+ setup({ explicit_done: true });
+ window.addEventListener("load", runTests);
+
+ var sizeArray = [50, 75, 100];
+
+ function runTests() {
+ test(function() {
+ var e = 1;
+ sizeArray.forEach(function(size) {
+ assert_approx_equals(getBox("msub" + size + "base").middle, getBox("baseline").bottom, e, "msub base " + size + "is placed on the baseline");
+ assert_approx_equals(getBox("msup" + size + "base").middle, getBox("baseline").bottom, e, "msup base " + size + "is placed on the baseline");
+ assert_approx_equals(getBox("msubsup" + size + "base").middle, getBox("baseline").bottom, e, "msubsup base " + size + "is placed on the baseline");
+ assert_approx_equals(getBox("multi" + size + "base").middle, getBox("baseline").bottom, e, "mmultiscripts base " + size + "is placed on the baseline");
+ });
+ }, "Alignment on the baseline for bases of different heights");
+
+ test(function() {
+ var e = 5;
+ sizeArray.forEach(function(size) {
+ assert_approx_equals(getBox("msub" + size + "sub").middle, getBox("msub" + size + "base").bottom, e, "msub script " + size + "is placed at the top of of the base");
+ });
+ }, "Vertical position of the scripts for bases of different heights");
+
+ done();
+ }
+</script>
+</head>
+<body>
+ <p>
+ <math>
+ <mspace id="baseline" width="30px" height="2px" depth="0px" mathbackground="blue"/>
+ <msub id="msub50">
+ <mspace id="msub50base" width="30px" height="50px" depth="50px" mathbackground="black"/>
+ <mspace id="msub50sub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msub>
+ <msup id="msup50">
+ <mspace id="msup50base" width="30px" height="50px" depth="50px" mathbackground="black"/>
+ <mspace id="msup50sup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msup>
+ <msubsup id="msubsup50">
+ <mspace id="msubsup50base" width="30px" height="50px" depth="50px" mathbackground="black"/>
+ <mspace id="msubsup50sub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="msubsup50sup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msubsup>
+ <mmultiscripts id="multi50">
+ <mspace id="multi50base" width="30px" height="50px" depth="50px" mathbackground="black"/>
+ <mspace id="multi50postsub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="multi50postsup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mprescripts/>
+ <mspace id="multi50presub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="multi50presub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </mmultiscripts>
+ <msub id="msub75">
+ <mspace id="msub75base" width="30px" height="75px" depth="75px" mathbackground="black"/>
+ <mspace id="msub75sub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msub>
+ <msup id="msup75">
+ <mspace id="msup75base" width="30px" height="75px" depth="75px" mathbackground="black"/>
+ <mspace id="msup75sup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msup>
+ <msubsup id="msubsup75">
+ <mspace id="msubsup75base" width="30px" height="75px" depth="75px" mathbackground="black"/>
+ <mspace id="msubsup75sub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="msubsup75sup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msubsup>
+ <mmultiscripts id="multi75">
+ <mspace id="multi75base" width="30px" height="75px" depth="75px" mathbackground="black"/>
+ <mspace id="multi75postsub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="multi75postsup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mprescripts/>
+ <mspace id="multi75presub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="multi75presub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </mmultiscripts>
+ <msub id="msub100">
+ <mspace id="msub100base" width="30px" height="100px" depth="100px" mathbackground="black"/>
+ <mspace id="msub100sub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msub>
+ <msup id="msup100">
+ <mspace id="msup100base" width="30px" height="100px" depth="100px" mathbackground="black"/>
+ <mspace id="msup100sup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msup>
+ <msubsup id="msubsup100">
+ <mspace id="msubsup100base" width="30px" height="100px" depth="100px" mathbackground="black"/>
+ <mspace id="msubsup100sub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="msubsup100sup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </msubsup>
+ <mmultiscripts id="multi100">
+ <mspace id="multi100base" width="30px" height="100px" depth="100px" mathbackground="black"/>
+ <mspace id="multi100postsub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="multi100postsup" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mprescripts/>
+ <mspace id="multi100presub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ <mspace id="multi100presub" width="10px" height="5px" depth="5px" mathbackground="black"/>
+ </mmultiscripts>
+ </math>
+ </p>
+ <hr/>
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-4.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsmathmlpresentationscriptsheighthtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/mathml/presentation/scripts-height.html (202906 => 202907)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/scripts-height.html        2016-07-07 14:26:08 UTC (rev 202906)
+++ trunk/LayoutTests/mathml/presentation/scripts-height.html        2016-07-07 14:29:25 UTC (rev 202907)
</span><span class="lines">@@ -1,96 +0,0 @@
</span><del>-<!doctype html>
-<html>
- <head>
- <title>scripts-height</title>
- <meta charset="utf-8"/>
- <style>
- math {
- padding: 0;
- border: 0;
- }
- td {
- border: 1px solid black;
- text-align: center; width: 100px; height: 100px;
- vertical-align: middle;
- }
- span {
- display: inline-block;
- background: black;
- border: 0;
- margin: 0;
- padding: 0;
- }
- </style>
- </head>
- <body>
-
- <!-- base with large height: the script are shifted to the top/bottom
- of the cell and should be hidden by the black rectangles -->
- <div style="position: absolute; top: 10px; left: 10px;">
- <table>
- <tr>
- <td>
- <math>
- <msubsup>
- <mspace height="40px" depth="40px"/>
- <mspace width="10px" height="5px" depth="5px"
- mathbackground="red"/>
- <mspace width="10px" height="5px" depth="5px"
- mathbackground="blue"/>
- </msubsup>
- </math>
- </td>
- </tr>
- </table>
- </div>
- <div style="position: absolute; top: 10px; left: 10px;">
- <table>
- <tr>
- <td style="vertical-align: top">
- <span style="width: 20px; height: 20px;"></span>
- </td>
- </tr>
- </table>
- </div>
- <div style="position: absolute; top: 10px; left: 10px;">
- <table>
- <tr>
- <td style="vertical-align: bottom">
- <span style="width: 20px; height: 20px;"></span>
- </td>
- </tr>
- </table>
- </div>
-
- <!-- scripts of different heights: they should all be aligned in the
- middle of the cell -->
- <div style="position: absolute; top: 10px; left: 120px;">
- <table>
- <tr>
- <td style="width: 14em; height: 14em;">
- <math>
- <mspace height="7em" depth="7em"/>
- <mspace width="10px" height="1em" depth="1em" mathbackground="red"/>
- <msubsup>
- <mspace width="10px" height="1em" depth="1em" mathbackground="green"/>
- <mspace height="4em"/>
- <mspace height="1em"/>
- </msubsup>
- <msubsup>
- <mspace width="10px" height="1em" depth="1em" mathbackground="blue"/>
- <mspace height="1em"/>
- <mspace height="4em"/>
- </msubsup>
- <msubsup>
- <mspace width="10px" height="1em" depth="1em" mathbackground="yellow"/>
- <mspace height="4em"/>
- <mspace height="4em"/>
- </msubsup>
- </math>
- </td>
- </tr>
- </table>
- </div>
-
- </body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (202906 => 202907)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-07-07 14:26:08 UTC (rev 202906)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-07-07 14:29:25 UTC (rev 202907)
</span><span class="lines">@@ -675,9 +675,6 @@
</span><span class="cx"> mathml/presentation/attributes-mathvariant.html [ Skip ]
</span><span class="cx"> mathml/presentation/tokenElements-mathvariant.html [ Skip ]
</span><span class="cx">
</span><del>-# MathML tests that fail:
-mathml/presentation/scripts-height.html [ ImageOnlyFailure ]
-
</del><span class="cx"> # <rdar://problem/19215305> ASSERT(m_cgFont.get()) fails in FontPlatformData::ctFont()
</span><span class="cx"> svg/text/svg-fallback-font-crash.html
</span><span class="cx"> svg/css/font-face-variant-crash.html
</span></span></pre>
</div>
</div>
</body>
</html>