<!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>[203104] trunk</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/203104">203104</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2016-07-11 21:28:16 -0700 (Mon, 11 Jul 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add support for @href attribute in MathML
https://bugs.webkit.org/show_bug.cgi?id=85733
Patch by Frederic Wang <fwang@igalia.com> on 2016-07-11
Reviewed by Brent Fulgham.
Source/WebCore:
We add support for the href attribute from MathML 3 but ignore the deprecated XLink version.
We also use the code from HTMLAnchorElement SVGAElement to make MathMLElement with a href
attribute behave as a link.
Finally, we adjust mathml.css based on rules from the html and svg user agent stylesheets.
Tests: mathml/mathml-in-html5/href-click-1.html
mathml/mathml-in-html5/href-click-2.html
mathml/presentation/href-enter.html
mathml/presentation/href-style.html
mathml/presentation/maction-toggle-href.html
mathml/presentation/semantics-href.html
* css/mathml.css:
(:any-link): Set color and mouse cursor of links.
(:any-link:active): Set color of active links.
(:focus): Set outline of focused links.
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::parseAttribute): Parse the href attribute.
(WebCore::MathMLElement::willRespondToMouseClickEvents): Based on HTMLAnchorElement/SVGAElement.
(WebCore::MathMLElement::defaultEventHandler): Based on HTMLAnchorElement/SVGAElement.
(WebCore::MathMLElement::canStartSelection): Based on HTMLAnchorElement/SVGAElement.
(WebCore::MathMLElement::isFocusable): Based on HTMLAnchorElement/SVGAElement.
(WebCore::MathMLElement::isKeyboardFocusable): Based on HTMLAnchorElement/SVGAElement.
(WebCore::MathMLElement::isMouseFocusable): Based on HTMLAnchorElement/SVGAElement.
(WebCore::MathMLElement::isURLAttribute): Based on HTMLAnchorElement/SVGAElement.
(WebCore::MathMLElement::supportsFocus): Based on HTMLAnchorElement/SVGAElement.
(WebCore::MathMLElement::tabIndex): Based on HTMLAnchorElement/SVGAElement.
* mathml/MathMLElement.h: Define new members.
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::willRespondToMouseClickEvents): We also verify whether
the parent class will respond.
* mathml/mathattrs.in: Add href attribute.
LayoutTests:
We import some tests from the MathML in HTML5 test suite to
test clicks on href attributes and write similar tests.
We also test tab/enter keys and user agent style with links.
* mathml/mathml-in-html5/href-click-1.html: Added. Verify mouse click on a MathML link.
* mathml/mathml-in-html5/href-click-1-expected.html: Added.
* mathml/mathml-in-html5/href-click-2.html: Added.
Verify mouse click on a descendant of a MathML link.
* mathml/mathml-in-html5/href-click-2-expected.html: Added.
* mathml/presentation/href-enter.html: Added.
Verify tab navigation and activing link with enter.
* mathml/presentation/href-enter-expected.html: Added.
* mathml/presentation/href-style.html: Added.
Verify default style of links and of focused links.
* mathml/presentation/href-style-expected.html: Added.
* mathml/presentation/maction-toggle-href.html: Added.
Verify conflicts between maction toggle and href link.
* mathml/presentation/maction-toggle-href-expected.html: Added.
* mathml/presentation/semantics-href.html: Added. Verify mouse click on a <semantics> link.
* mathml/presentation/semantics-href-expected.html: Added.
* platform/mac/TestExpectations: Disable MathML link tests that rely on keyboard events.
* platform/ios-simulator/TestExpectations: Ditto.</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>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssmathmlcss">trunk/Source/WebCore/css/mathml.css</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLElementcpp">trunk/Source/WebCore/mathml/MathMLElement.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLElementh">trunk/Source/WebCore/mathml/MathMLElement.h</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLSelectElementcpp">trunk/Source/WebCore/mathml/MathMLSelectElement.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlmathattrsin">trunk/Source/WebCore/mathml/mathattrs.in</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/</li>
<li><a href="#trunkLayoutTestsimportedmathmlinhtml5mathmlrelationshtml5treehrefclick1expectedhtml">trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1-expected.html</a></li>
<li><a href="#trunkLayoutTestsimportedmathmlinhtml5mathmlrelationshtml5treehrefclick1html">trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.html</a></li>
<li><a href="#trunkLayoutTestsimportedmathmlinhtml5mathmlrelationshtml5treehrefclick2expectedhtml">trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2-expected.html</a></li>
<li><a href="#trunkLayoutTestsimportedmathmlinhtml5mathmlrelationshtml5treehrefclick2html">trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationhrefenterexpectedhtml">trunk/LayoutTests/mathml/presentation/href-enter-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationhrefenterhtml">trunk/LayoutTests/mathml/presentation/href-enter.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationhrefstyleexpectedhtml">trunk/LayoutTests/mathml/presentation/href-style-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationhrefstylehtml">trunk/LayoutTests/mathml/presentation/href-style.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmactiontogglehrefexpectedhtml">trunk/LayoutTests/mathml/presentation/maction-toggle-href-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmactiontogglehrefhtml">trunk/LayoutTests/mathml/presentation/maction-toggle-href.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationsemanticshrefexpectedhtml">trunk/LayoutTests/mathml/presentation/semantics-href-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationsemanticshrefhtml">trunk/LayoutTests/mathml/presentation/semantics-href.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/LayoutTests/ChangeLog        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -1,5 +1,35 @@
</span><span class="cx"> 2016-07-11 Frederic Wang <fwang@igalia.com>
</span><span class="cx">
</span><ins>+ Add support for @href attribute in MathML
+ https://bugs.webkit.org/show_bug.cgi?id=85733
+
+ Reviewed by Brent Fulgham.
+
+ We import some tests from the MathML in HTML5 test suite to
+ test clicks on href attributes and write similar tests.
+ We also test tab/enter keys and user agent style with links.
+
+ * mathml/mathml-in-html5/href-click-1.html: Added. Verify mouse click on a MathML link.
+ * mathml/mathml-in-html5/href-click-1-expected.html: Added.
+ * mathml/mathml-in-html5/href-click-2.html: Added.
+ Verify mouse click on a descendant of a MathML link.
+ * mathml/mathml-in-html5/href-click-2-expected.html: Added.
+ * mathml/presentation/href-enter.html: Added.
+ Verify tab navigation and activing link with enter.
+ * mathml/presentation/href-enter-expected.html: Added.
+ * mathml/presentation/href-style.html: Added.
+ Verify default style of links and of focused links.
+ * mathml/presentation/href-style-expected.html: Added.
+ * mathml/presentation/maction-toggle-href.html: Added.
+ Verify conflicts between maction toggle and href link.
+ * mathml/presentation/maction-toggle-href-expected.html: Added.
+ * mathml/presentation/semantics-href.html: Added. Verify mouse click on a <semantics> link.
+ * mathml/presentation/semantics-href-expected.html: Added.
+ * platform/mac/TestExpectations: Disable MathML link tests that rely on keyboard events.
+ * platform/ios-simulator/TestExpectations: Ditto.
+
+2016-07-11 Frederic Wang <fwang@igalia.com>
+
</ins><span class="cx"> Replace reftest mathml/presentation/fractions-positions.html with script tests
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=159558
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedmathmlinhtml5mathmlrelationshtml5treehrefclick1expectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1-expected.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1-expected.html         (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1-expected.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href click (reference)</title>
+</head>
+<body>
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; background: green">
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1-expected.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="trunkLayoutTestsimportedmathmlinhtml5mathmlrelationshtml5treehrefclick1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.html         (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href click</title>
+<link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S2.html#SS2">
+<link rel="match" href="href-click-ref.html"/>
+<meta name="assert" content="Verify that a click on a link moves to the target.">
+<script type="text/javascript">
+ function test()
+ {
+ var event = new MouseEvent('click', {bubbles: true, cancelable: true});
+ document.getElementById('link').dispatchEvent(event);
+ }
+</script>
+</head>
+<body onload="test()">
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; overflow: hidden">
+ <math style="padding: 0">
+ <mrow id="link" href="#target">
+ <mspace id="space" width="150px" height="150px" mathbackground="red"/>
+ </mrow>
+ </math>
+ <div style="height: 500px;"></div>
+ <math id="target" style="padding: 0">
+ <mspace width="150px" height="150px" mathbackground="green"/>
+ </math>
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.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="trunkLayoutTestsimportedmathmlinhtml5mathmlrelationshtml5treehrefclick2expectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2-expected.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2-expected.html         (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2-expected.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href click (reference)</title>
+</head>
+<body>
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; background: green">
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2-expected.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="trunkLayoutTestsimportedmathmlinhtml5mathmlrelationshtml5treehrefclick2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.html         (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href click</title>
+<link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S2.html#SS2">
+<link rel="match" href="href-click-ref.html"/>
+<meta name="assert" content="Test that a click on an element bubbles to an ancestor link.">
+<script type="text/javascript">
+ function test()
+ {
+ var event = new MouseEvent('click', {bubbles: true, cancelable: true});
+ document.getElementById('space').dispatchEvent(event);
+ }
+</script>
+</head>
+<body onload="test()">
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; overflow: hidden">
+ <math style="padding: 0">
+ <mrow href="#target">
+ <mrow>
+ <mrow>
+ <mspace id="space" width="150px" height="150px" mathbackground="red"/>
+ </mrow>
+ </mrow>
+ </mrow>
+ </math>
+ <div style="height: 500px;"></div>
+ <math id="target" style="padding: 0">
+ <mspace width="150px" height="150px" mathbackground="green"/>
+ </math>
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.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="trunkLayoutTestsmathmlpresentationhrefenterexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/href-enter-expected.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/href-enter-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/href-enter-expected.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href enter</title>
+</head>
+<body onload="runTest()">
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; background: green">
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/href-enter-expected.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="trunkLayoutTestsmathmlpresentationhrefenterhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/href-enter.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/href-enter.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/href-enter.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8"/>
+<title>href enter</title>
+<script>
+ function runTest() {
+ if (window.eventSender) {
+ eventSender.keyDown('\t'); // focus the link
+ eventSender.keyDown('\r'); // press enter
+ document.documentElement.removeAttribute("class");
+ }
+ }
+</script>
+</head>
+<body onload="runTest()">
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; overflow: hidden">
+ <math style="padding: 0">
+ <mrow id="link" href="#target">
+ <mspace id="space" width="150px" height="150px" mathbackground="red"/>
+ </mrow>
+ </math>
+ <div style="height: 500px;"></div>
+ <math id="target" style="padding: 0">
+ <mspace width="150px" height="150px" mathbackground="green"/>
+ </math>
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/href-enter.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="trunkLayoutTestsmathmlpresentationhrefstyleexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/href-style-expected.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/href-style-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/href-style-expected.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>href style</title>
+ <meta charset="utf-8"/>
+ <style>
+ #Link {
+ color: -webkit-link;
+ }
+ #FocusedLink {
+ outline: auto 5px -webkit-focus-ring-color;
+ color: -webkit-link;
+ }
+ </style>
+ </head>
+ <body>
+
+ <math>
+ <mrow><mtext>Non-Link</mtext></mrow>
+ <mrow id="Link"><mtext>Link</mtext></mrow>
+ <mrow id="FocusedLink"><mtext>Focused Link</mtext></mrow>
+ </math>
+
+ </body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/href-style-expected.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="trunkLayoutTestsmathmlpresentationhrefstylehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/href-style.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/href-style.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/href-style.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+<!doctype html>
+<html class="reftest-wait">
+ <head>
+ <title>href style</title>
+ <meta charset="utf-8"/>
+ <script>
+ function runTest() {
+ if (window.eventSender) {
+ eventSender.keyDown('\t'); // focus #Link
+ eventSender.keyDown('\t'); // focus #FocusedLink
+ document.documentElement.removeAttribute("class");
+ }
+ }
+ </script>
+ </head>
+ <body onload="runTest()">
+
+ <math>
+ <mrow><mtext>Non-Link</mtext></mrow>
+ <mrow href="#Link"><mtext>Link</mtext></mrow>
+ <mrow href="#FocusedLink"><mtext>Focused Link</mtext></mrow>
+ </math>
+
+ </body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/href-style.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="trunkLayoutTestsmathmlpresentationmactiontogglehrefexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/maction-toggle-href-expected.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/maction-toggle-href-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/maction-toggle-href-expected.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href on a maction toggle</title>
+</head>
+<body>
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; background: green">
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/maction-toggle-href-expected.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="trunkLayoutTestsmathmlpresentationmactiontogglehrefhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/maction-toggle-href.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/maction-toggle-href.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/maction-toggle-href.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href on a maction toggle</title>
+<script type="text/javascript">
+ function test()
+ {
+ var event = new MouseEvent('click', {bubbles: true, cancelable: true});
+ document.getElementById('link').dispatchEvent(event);
+ }
+</script>
+</head>
+<body onload="test()">
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; overflow: hidden">
+ <math style="padding: 0">
+ <!-- Initially, the maction element displays its second child which is a red mspace.
+ After the click, the selection moves to the third child which is a green mspace.
+ We should not follow the link, whose target is a red space.
+ -->
+ <maction id="link" href="#target" actiontype="toggle" selection="2">
+ <mspace width="150px" height="150px" mathbackground="red"/>
+ <mspace width="150px" height="150px" mathbackground="red"/>
+ <mspace width="150px" height="150px" mathbackground="green"/>
+ </semantics>
+ </math>
+ <div style="height: 500px;"></div>
+ <math id="target" style="padding: 0">
+ <mspace id="space" width="150px" height="150px" mathbackground="red"/>
+ </math>
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/maction-toggle-href.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="trunkLayoutTestsmathmlpresentationsemanticshrefexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/semantics-href-expected.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/semantics-href-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/semantics-href-expected.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href on a semantics element (expected)</title>
+</head>
+<body>
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; background: green">
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/semantics-href-expected.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="trunkLayoutTestsmathmlpresentationsemanticshrefhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/semantics-href.html (0 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/semantics-href.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/semantics-href.html        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<title>href on a semantics element</title>
+<script type="text/javascript">
+ function test()
+ {
+ var event = new MouseEvent('click', {bubbles: true, cancelable: true});
+ document.getElementById('link').dispatchEvent(event);
+ }
+</script>
+</head>
+<body onload="test()">
+
+ <p>This test passes if you see a green square.</p>
+
+ <div style="width: 150px; height: 150px; overflow: hidden">
+ <math style="padding: 0">
+ <semantics id="link" href="#target">
+ <mspace id="space" width="150px" height="150px" mathbackground="red"/>
+ <annotation>red square</annotation>
+ </semantics>
+ </math>
+ <div style="height: 500px;"></div>
+ <math id="target" style="padding: 0">
+ <mspace width="150px" height="150px" mathbackground="green"/>
+ </math>
+ </div>
+
+</body>
+</html>
</ins><span class="cx">Property changes on: trunk/LayoutTests/mathml/presentation/semantics-href.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="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -680,6 +680,10 @@
</span><span class="cx"> # The web font loading & relayout seems to be performed too late.
</span><span class="cx"> imported/mathml-in-html5/mathml/relations/css-styling/mathvariant-transforms-1.html [ Pass ImageOnlyFailure ]
</span><span class="cx">
</span><ins>+# These tests use key navigation to test MathML links but do not seem to work on iOS simulator.
+webkit.org/b/159662 mathml/presentation/href-enter.html [ Skip ]
+webkit.org/b/159662 mathml/presentation/href-style.html [ Skip ]
+
</ins><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>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -805,6 +805,10 @@
</span><span class="cx"> mathml/presentation/fractions-linethickness.html [ Skip ]
</span><span class="cx"> mathml/opentype/large-operators-italic-correction.html [ Skip ]
</span><span class="cx">
</span><ins>+# These tests use key navigation to test MathML links but do not seem to work on Mac.
+webkit.org/b/159662 mathml/presentation/href-enter.html [ Skip ]
+webkit.org/b/159662 mathml/presentation/href-style.html [ Skip ]
+
</ins><span class="cx"> webkit.org/b/128255 compositing/columns/composited-lr-paginated-repaint.html [ Pass Failure ]
</span><span class="cx"> webkit.org/b/128255 compositing/columns/composited-rl-paginated-repaint.html [ Pass Failure ]
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/Source/WebCore/ChangeLog        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-07-11 Frederic Wang <fwang@igalia.com>
+
+ Add support for @href attribute in MathML
+ https://bugs.webkit.org/show_bug.cgi?id=85733
+
+ Reviewed by Brent Fulgham.
+
+ We add support for the href attribute from MathML 3 but ignore the deprecated XLink version.
+ We also use the code from HTMLAnchorElement SVGAElement to make MathMLElement with a href
+ attribute behave as a link.
+ Finally, we adjust mathml.css based on rules from the html and svg user agent stylesheets.
+
+ Tests: mathml/mathml-in-html5/href-click-1.html
+ mathml/mathml-in-html5/href-click-2.html
+ mathml/presentation/href-enter.html
+ mathml/presentation/href-style.html
+ mathml/presentation/maction-toggle-href.html
+ mathml/presentation/semantics-href.html
+
+ * css/mathml.css:
+ (:any-link): Set color and mouse cursor of links.
+ (:any-link:active): Set color of active links.
+ (:focus): Set outline of focused links.
+ * mathml/MathMLElement.cpp:
+ (WebCore::MathMLElement::parseAttribute): Parse the href attribute.
+ (WebCore::MathMLElement::willRespondToMouseClickEvents): Based on HTMLAnchorElement/SVGAElement.
+ (WebCore::MathMLElement::defaultEventHandler): Based on HTMLAnchorElement/SVGAElement.
+ (WebCore::MathMLElement::canStartSelection): Based on HTMLAnchorElement/SVGAElement.
+ (WebCore::MathMLElement::isFocusable): Based on HTMLAnchorElement/SVGAElement.
+ (WebCore::MathMLElement::isKeyboardFocusable): Based on HTMLAnchorElement/SVGAElement.
+ (WebCore::MathMLElement::isMouseFocusable): Based on HTMLAnchorElement/SVGAElement.
+ (WebCore::MathMLElement::isURLAttribute): Based on HTMLAnchorElement/SVGAElement.
+ (WebCore::MathMLElement::supportsFocus): Based on HTMLAnchorElement/SVGAElement.
+ (WebCore::MathMLElement::tabIndex): Based on HTMLAnchorElement/SVGAElement.
+ * mathml/MathMLElement.h: Define new members.
+ * mathml/MathMLSelectElement.cpp:
+ (WebCore::MathMLSelectElement::willRespondToMouseClickEvents): We also verify whether
+ the parent class will respond.
+ * mathml/mathattrs.in: Add href attribute.
+
</ins><span class="cx"> 2016-07-11 Sam Weinig <sam@webkit.org>
</span><span class="cx">
</span><span class="cx"> Speech Synthesis: getting list of voices no longer works
</span></span></pre></div>
<a id="trunkSourceWebCorecssmathmlcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/mathml.css (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/mathml.css        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/Source/WebCore/css/mathml.css        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -1,5 +1,18 @@
</span><span class="cx"> @namespace "http://www.w3.org/1998/Math/MathML";
</span><span class="cx">
</span><ins>+:any-link {
+ color: -webkit-link;
+ cursor: auto;
+}
+
+:any-link:active {
+ color: -webkit-activelink;
+}
+
+:focus {
+ outline: auto 5px -webkit-focus-ring-color
+}
+
</ins><span class="cx"> math {
</span><span class="cx"> /*
</span><span class="cx"> We use the exact bounding boxes of glyphs to avoid excessive gaps in mathematical formulas.
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLElement.cpp (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLElement.cpp        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/Source/WebCore/mathml/MathMLElement.cpp        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -32,6 +32,9 @@
</span><span class="cx"> #include "MathMLElement.h"
</span><span class="cx">
</span><span class="cx"> #include "ElementIterator.h"
</span><ins>+#include "Event.h"
+#include "EventHandler.h"
+#include "HTMLAnchorElement.h"
</ins><span class="cx"> #include "HTMLElement.h"
</span><span class="cx"> #include "HTMLHtmlElement.h"
</span><span class="cx"> #include "HTMLMapElement.h"
</span><span class="lines">@@ -40,10 +43,12 @@
</span><span class="cx"> #include "MathMLMathElement.h"
</span><span class="cx"> #include "MathMLNames.h"
</span><span class="cx"> #include "MathMLSelectElement.h"
</span><ins>+#include "MouseEvent.h"
</ins><span class="cx"> #include "RenderTableCell.h"
</span><span class="cx"> #include "SVGElement.h"
</span><span class="cx"> #include "SVGNames.h"
</span><span class="cx"> #include "SVGSVGElement.h"
</span><ins>+#include "XLinkNames.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -216,7 +221,12 @@
</span><span class="cx">
</span><span class="cx"> void MathMLElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
</span><span class="cx"> {
</span><del>- if (name == rowspanAttr) {
</del><ins>+ if (name == hrefAttr) {
+ bool wasLink = isLink();
+ setIsLink(!value.isNull() && !shouldProhibitLinks(this));
+ if (wasLink != isLink())
+ setNeedsStyleRecalc();
+ } else if (name == rowspanAttr) {
</ins><span class="cx"> if (is<RenderTableCell>(renderer()) && hasTagName(mtdTag))
</span><span class="cx"> downcast<RenderTableCell>(*renderer()).colSpanOrRowSpanChanged();
</span><span class="cx"> } else if (name == columnspanAttr) {
</span><span class="lines">@@ -305,6 +315,88 @@
</span><span class="cx"> StyledElement::attributeChanged(name, oldValue, newValue, reason);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool MathMLElement::willRespondToMouseClickEvents()
+{
+ return isLink() || StyledElement::willRespondToMouseClickEvents();
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void MathMLElement::defaultEventHandler(Event* event)
+{
+ if (isLink()) {
+ if (focused() && isEnterKeyKeydownEvent(event)) {
+ event->setDefaultHandled();
+ dispatchSimulatedClick(event);
+ return;
+ }
+ if (MouseEvent::canTriggerActivationBehavior(*event)) {
+ const AtomicString& href = fastGetAttribute(hrefAttr);
+ String url = stripLeadingAndTrailingHTMLSpaces(href);
+ event->setDefaultHandled();
+ if (Frame* frame = document().frame())
+ frame->loader().urlSelected(document().completeURL(url), "_self", event, LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, document().shouldOpenExternalURLsPolicyToPropagate());
+ return;
+ }
+ }
+
+ StyledElement::defaultEventHandler(event);
+}
+
+bool MathMLElement::canStartSelection() const
+{
+ if (!isLink())
+ return StyledElement::canStartSelection();
+
+ return hasEditableStyle();
+}
+
+bool MathMLElement::isFocusable() const
+{
+ if (renderer() && renderer()->absoluteClippedOverflowRect().isEmpty())
+ return false;
+
+ return StyledElement::isFocusable();
+}
+
+bool MathMLElement::isKeyboardFocusable(KeyboardEvent* event) const
+{
+ if (isFocusable() && StyledElement::supportsFocus())
+ return StyledElement::isKeyboardFocusable(event);
+
+ if (isLink())
+ return document().frame()->eventHandler().tabsToLinks(event);
+
+ return StyledElement::isKeyboardFocusable(event);
+}
+
+bool MathMLElement::isMouseFocusable() const
+{
+ // Links are focusable by default, but only allow links with tabindex or contenteditable to be mouse focusable.
+ // https://bugs.webkit.org/show_bug.cgi?id=26856
+ if (isLink())
+ return StyledElement::supportsFocus();
+
+ return StyledElement::isMouseFocusable();
+}
+
+bool MathMLElement::isURLAttribute(const Attribute& attribute) const
+{
+ return attribute.name().localName() == hrefAttr || StyledElement::isURLAttribute(attribute);
+}
+
+bool MathMLElement::supportsFocus() const
+{
+ if (hasEditableStyle())
+ return StyledElement::supportsFocus();
+ // If not a link we should still be able to focus the element if it has tabIndex.
+ return isLink() || StyledElement::supportsFocus();
+}
+
+int MathMLElement::tabIndex() const
+{
+ // Skip the supportsFocus check in StyledElement.
+ return Element::tabIndex();
+}
+
+}
+
</ins><span class="cx"> #endif // ENABLE(MATHML)
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLElement.h (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLElement.h        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/Source/WebCore/mathml/MathMLElement.h        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -69,8 +69,19 @@
</span><span class="cx"> bool isPhrasingContent(const Node&) const;
</span><span class="cx"> bool isFlowContent(const Node&) const;
</span><span class="cx">
</span><ins>+ bool willRespondToMouseClickEvents() override;
+ void defaultEventHandler(Event*) override;
+
</ins><span class="cx"> private:
</span><span class="cx"> virtual void updateSelectedChild() { }
</span><ins>+
+ bool canStartSelection() const final;
+ bool isFocusable() const final;
+ bool isKeyboardFocusable(KeyboardEvent*) const final;
+ bool isMouseFocusable() const final;
+ bool isURLAttribute(const Attribute&) const final;
+ bool supportsFocus() const final;
+ int tabIndex() const final;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline bool Node::hasTagName(const MathMLQualifiedName& name) const
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLSelectElement.cpp (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLSelectElement.cpp        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/Source/WebCore/mathml/MathMLSelectElement.cpp        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx">
</span><span class="cx"> bool MathMLSelectElement::willRespondToMouseClickEvents()
</span><span class="cx"> {
</span><del>- return fastGetAttribute(MathMLNames::actiontypeAttr) == "toggle";
</del><ins>+ return fastGetAttribute(MathMLNames::actiontypeAttr) == "toggle" || MathMLInlineContainerElement::willRespondToMouseClickEvents();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MathMLSelectElement::toggle()
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlmathattrsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/mathattrs.in (203103 => 203104)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/mathattrs.in        2016-07-12 04:03:43 UTC (rev 203103)
+++ trunk/Source/WebCore/mathml/mathattrs.in        2016-07-12 04:28:16 UTC (rev 203104)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> fontweight
</span><span class="cx"> form
</span><span class="cx"> height
</span><ins>+href
</ins><span class="cx"> largeop
</span><span class="cx"> linethickness
</span><span class="cx"> lspace
</span></span></pre>
</div>
</div>
</body>
</html>