<!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>[179203] 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/179203">179203</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2015-01-27 12:45:10 -0800 (Tue, 27 Jan 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Import some extra tests for <a href="http://trac.webkit.org/projects/webkit/changeset/179132">r179132</a>
https://bugs.webkit.org/show_bug.cgi?id=140930
Reviewed by Sam Weinig.
Add some tests that were done from previous attempts at fixing
the bug.
* fast/dom/SelectorAPI/tag-case-insensitive-expected.txt: Added.
* fast/dom/SelectorAPI/tag-case-insensitive.html: Added.
* fast/dom/SelectorAPI/tag-case-sensitive-expected.txt: Added.
* fast/dom/SelectorAPI/tag-case-sensitive.xhtml: Added.
* svg/css/case-sensitive-tags-expected.txt: Added.
* svg/css/case-sensitive-tags.html: Added.
* svg/dom/tag-case-sensitive-svg-in-html-expected.txt: Added.
* svg/dom/tag-case-sensitive-svg-in-html.html: Added.
Those tests were created by Alexandru Chiculita for
https://bugs.webkit.org/show_bug.cgi?id=83438
The patch was rejected at the time due to the perf impact.
That has been solved since then by the CSS JIT.
* svg/css/foreignObject-case-styling-expected.html: Added.
* svg/css/foreignObject-case-styling.html: Added.
This test is from Boris Zbarsky when he reported
https://bugs.webkit.org/show_bug.cgi?id=79444.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomSelectorAPItagcaseinsensitiveexpectedtxt">trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-insensitive-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomSelectorAPItagcaseinsensitivehtml">trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-insensitive.html</a></li>
<li><a href="#trunkLayoutTestsfastdomSelectorAPItagcasesensitiveexpectedtxt">trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-sensitive-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomSelectorAPItagcasesensitivexhtml">trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-sensitive.xhtml</a></li>
<li><a href="#trunkLayoutTestssvgcsscasesensitivetagsexpectedtxt">trunk/LayoutTests/svg/css/case-sensitive-tags-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcsscasesensitivetagshtml">trunk/LayoutTests/svg/css/case-sensitive-tags.html</a></li>
<li><a href="#trunkLayoutTestssvgcssforeignObjectcasestylingexpectedhtml">trunk/LayoutTests/svg/css/foreignObject-case-styling-expected.html</a></li>
<li><a href="#trunkLayoutTestssvgcssforeignObjectcasestylinghtml">trunk/LayoutTests/svg/css/foreignObject-case-styling.html</a></li>
<li><a href="#trunkLayoutTestssvgdomtagcasesensitivesvginhtmlexpectedtxt">trunk/LayoutTests/svg/dom/tag-case-sensitive-svg-in-html-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgdomtagcasesensitivesvginhtmlhtml">trunk/LayoutTests/svg/dom/tag-case-sensitive-svg-in-html.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (179202 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-01-27 20:25:04 UTC (rev 179202)
+++ trunk/LayoutTests/ChangeLog        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-01-27 Benjamin Poulain <benjamin@webkit.org>
+
+ Import some extra tests for r179132
+ https://bugs.webkit.org/show_bug.cgi?id=140930
+
+ Reviewed by Sam Weinig.
+
+ Add some tests that were done from previous attempts at fixing
+ the bug.
+
+ * fast/dom/SelectorAPI/tag-case-insensitive-expected.txt: Added.
+ * fast/dom/SelectorAPI/tag-case-insensitive.html: Added.
+ * fast/dom/SelectorAPI/tag-case-sensitive-expected.txt: Added.
+ * fast/dom/SelectorAPI/tag-case-sensitive.xhtml: Added.
+ * svg/css/case-sensitive-tags-expected.txt: Added.
+ * svg/css/case-sensitive-tags.html: Added.
+ * svg/dom/tag-case-sensitive-svg-in-html-expected.txt: Added.
+ * svg/dom/tag-case-sensitive-svg-in-html.html: Added.
+ Those tests were created by Alexandru Chiculita for
+ https://bugs.webkit.org/show_bug.cgi?id=83438
+
+ The patch was rejected at the time due to the perf impact.
+ That has been solved since then by the CSS JIT.
+
+ * svg/css/foreignObject-case-styling-expected.html: Added.
+ * svg/css/foreignObject-case-styling.html: Added.
+ This test is from Boris Zbarsky when he reported
+ https://bugs.webkit.org/show_bug.cgi?id=79444.
+
</ins><span class="cx"> 2015-01-27 Daniel Bates <dabates@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS] Update test results and test expectations
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomSelectorAPItagcaseinsensitiveexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-insensitive-expected.txt (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-insensitive-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-insensitive-expected.txt        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+PASS document.querySelector('SPAN') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('SPAN') is true
+PASS document.querySelector('SPAN > img') is document.getElementById('img1')
+PASS document.getElementById('img1').webkitMatchesSelector('SPAN > img') is true
+PASS document.querySelector('SPAN img') is document.getElementById('img1')
+PASS document.getElementById('img1').webkitMatchesSelector('SPAN img') is true
+PASS document.querySelector('div ul li SPAN') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('div ul li SPAN') is true
+PASS document.querySelector('div ul li textarea + SPAN') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('div ul li textarea + SPAN') is true
+PASS document.querySelector('div ul li span') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('div ul li span') is true
+PASS document.querySelector('div ul li spAn') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('div ul li spAn') is true
+PASS document.querySelector('DIV ul li span') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('DIV ul li span') is true
+PASS document.querySelector('div UL li span') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('div UL li span') is true
+PASS content.querySelector('span1') is null
+PASS content.querySelector('span#UPPER1') is null
+PASS document.querySelector('unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('unknownTag') is true
+PASS document.querySelector('div unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('div unknownTag') is true
+PASS document.querySelector('ul + unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('ul + unknownTag') is true
+PASS document.querySelector('DIV unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('DIV unknownTag') is true
+PASS document.querySelector('UL + unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('UL + unknownTag') is true
+PASS document.querySelector('unknowntag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('unknowntag') is true
+PASS document.querySelector('Unknowntag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('Unknowntag') is true
+PASS document.querySelector('div unknowntag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('div unknowntag') is true
+PASS document.querySelector('ul') is document.getElementById('ul1')
+PASS document.getElementById('ul1').webkitMatchesSelector('ul') is true
+PASS document.querySelector('UL') is document.getElementById('ul1')
+PASS document.getElementById('ul1').webkitMatchesSelector('UL') is true
+PASS content.querySelector('unknowntag1') is null
+PASS content.querySelector('ol') is null
+PASS content.querySelector('OL') is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomSelectorAPItagcaseinsensitivehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-insensitive.html (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-insensitive.html         (rev 0)
+++ trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-insensitive.html        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+ <!-- Testing that in HTML documents CSS selectors use case-insensitive tag name matching. -->
+ <div id="content">
+ <div style="display: none">
+ <ul id="ul1">
+ <li>
+ <textarea id="textarea1"></textarea>
+ <SPAN id="upper1">
+ <img id="img1" />
+ </SPAN>
+ </li>
+ </ul>
+ <unknownTag id="unknownTag1"></unknownTag>
+ </div>
+ </div>
+ <script>
+ var content = document.getElementById("content");
+ function checkMatchingSelector(selector, elementId) {
+ shouldBe("document.querySelector('" + selector + "')", "document.getElementById('" + elementId + "')");
+ shouldBeTrue("document.getElementById('" + elementId + "').webkitMatchesSelector('" + selector + "')");
+ }
+
+ function checkNonMatchingSelector(selector) {
+ shouldBeNull("content.querySelector('" + selector + "')");
+ }
+
+ checkMatchingSelector("SPAN", "upper1");
+ checkMatchingSelector("SPAN > img", "img1");
+ checkMatchingSelector("SPAN img", "img1");
+ checkMatchingSelector("div ul li SPAN", "upper1");
+ checkMatchingSelector("div ul li textarea + SPAN", "upper1");
+ checkMatchingSelector("div ul li span", "upper1");
+ checkMatchingSelector("div ul li spAn", "upper1");
+ checkMatchingSelector("DIV ul li span", "upper1");
+ checkMatchingSelector("div UL li span", "upper1");
+ checkNonMatchingSelector("span1");
+ checkNonMatchingSelector("span#UPPER1");
+
+ checkMatchingSelector("unknownTag", "unknownTag1");
+ checkMatchingSelector("div unknownTag", "unknownTag1");
+ checkMatchingSelector("ul + unknownTag", "unknownTag1");
+ checkMatchingSelector("DIV unknownTag", "unknownTag1");
+ checkMatchingSelector("UL + unknownTag", "unknownTag1");
+ checkMatchingSelector("unknowntag", "unknownTag1");
+ checkMatchingSelector("Unknowntag", "unknownTag1");
+ checkMatchingSelector("div unknowntag", "unknownTag1");
+ checkMatchingSelector("ul", "ul1");
+ checkMatchingSelector("UL", "ul1");
+ checkNonMatchingSelector("unknowntag1");
+ checkNonMatchingSelector("ol");
+ checkNonMatchingSelector("OL");
+ </script>
+ <script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomSelectorAPItagcasesensitiveexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-sensitive-expected.txt (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-sensitive-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-sensitive-expected.txt        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+PASS content.querySelector('div ul li SPAN') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('div ul li SPAN') is true
+PASS content.querySelector('div ul li textarea + SPAN') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('div ul li textarea + SPAN') is true
+PASS content.querySelector('div ul li span') is null
+PASS content.querySelector('div ul li spAn') is null
+PASS content.querySelector('DIV ul li span') is null
+PASS content.querySelector('div UL li span') is null
+PASS content.querySelector('unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('unknownTag') is true
+PASS content.querySelector('div unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('div unknownTag') is true
+PASS content.querySelector('ul + unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('ul + unknownTag') is true
+PASS content.querySelector('DIV unknownTag') is null
+PASS content.querySelector('UL + unknownTag') is null
+PASS content.querySelector('unknownTag1') is null
+PASS content.querySelector('unknowntag') is null
+PASS content.querySelector('Unknowntag') is null
+PASS content.querySelector('div unknowntag') is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomSelectorAPItagcasesensitivexhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-sensitive.xhtml (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-sensitive.xhtml         (rev 0)
+++ trunk/LayoutTests/fast/dom/SelectorAPI/tag-case-sensitive.xhtml        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<script src="../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+ <!-- Testing that in XHTML documents CSS selectors use case-sensitive tag name matching. -->
+ <div id="content">
+ <div style="display: none">
+ <ul>
+ <li>
+ <textarea id="textarea1"></textarea>
+ <SPAN id="upper1"></SPAN>
+ </li>
+ </ul>
+ <unknownTag id="unknownTag1"></unknownTag>
+ </div>
+ </div>
+ <script>
+ <![CDATA[
+ var content = document.getElementById("content");
+ function checkMatchingSelector(selector, elementId) {
+ shouldBe("content.querySelector('" + selector + "')", "document.getElementById('" + elementId + "')");
+ shouldBeTrue("document.getElementById('" + elementId + "').webkitMatchesSelector('" + selector + "')");
+ }
+
+ function checkNonMatchingSelector(selector) {
+ shouldBeNull("content.querySelector('" + selector + "')");
+ }
+
+ checkMatchingSelector("div ul li SPAN", "upper1");
+ checkMatchingSelector("div ul li textarea + SPAN", "upper1");
+ checkNonMatchingSelector("div ul li span");
+ checkNonMatchingSelector("div ul li spAn");
+ checkNonMatchingSelector("DIV ul li span");
+ checkNonMatchingSelector("div UL li span");
+
+ checkMatchingSelector("unknownTag", "unknownTag1");
+ checkMatchingSelector("div unknownTag", "unknownTag1");
+ checkMatchingSelector("ul + unknownTag", "unknownTag1");
+ checkNonMatchingSelector("DIV unknownTag");
+ checkNonMatchingSelector("UL + unknownTag");
+ checkNonMatchingSelector("unknownTag1");
+ checkNonMatchingSelector("unknowntag");
+ checkNonMatchingSelector("Unknowntag");
+ checkNonMatchingSelector("div unknowntag");
+ ]]>
+ </script>
+ <script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcsscasesensitivetagsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/case-sensitive-tags-expected.txt (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/case-sensitive-tags-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/css/case-sensitive-tags-expected.txt        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+PASS window.getComputedStyle(document.getElementById("div1")).color is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("div2")).color is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("div3")).color is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("fo1")).color is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("fo2")).color is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("fo3")).color is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("fo4")).color is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("circle1")).fill is "#008000"
+PASS window.getComputedStyle(document.getElementById("circle2")).fill is "#008000"
+PASS window.getComputedStyle(document.getElementById("circle3")).fill is "#008000"
+PASS window.getComputedStyle(document.getElementById("stop1")).stopColor is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("stop2")).stopColor is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("stop3")).stopColor is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("stop4")).stopColor is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("stop5")).stopColor is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("stop6")).stopColor is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("stop7")).stopColor is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("stop8")).stopColor is "rgb(0, 128, 0)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcsscasesensitivetagshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/case-sensitive-tags.html (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/case-sensitive-tags.html         (rev 0)
+++ trunk/LayoutTests/svg/css/case-sensitive-tags.html        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,191 @@
</span><ins>+
+<!doctype html>
+<html>
+ <head>
+ <style>
+ @namespace svg "http://www.w3.org/2000/svg";
+
+ .red-color {
+ color: red;
+ }
+
+ .green-color {
+ color: green;
+ }
+
+ .red-fill {
+ fill: red;
+ }
+
+ .green-fill {
+ fill: green;
+ }
+
+ .red-stop-color {
+ stop-color: red;
+ }
+
+ .green-stop-color {
+ stop-color: green;
+ }
+
+ .group0 div:nth-of-type(1),
+ .group0 DIV:nth-of-type(2),
+ .group0 Div:nth-of-type(3),
+ .group1 foreignObject:nth-of-type(3) {
+ color: green;
+ }
+
+ .group1 foreignobject:nth-of-type(1),
+ .group1 FOREIGNOBJECT:nth-of-type(2),
+ .group1 ForeignObject:nth-of-type(4)
+ {
+ color: red;
+ }
+
+ .group2 circle:nth-of-type(1)
+ {
+ fill: green;
+ }
+
+ .group2 CIRCLE:nth-of-type(2),
+ .group2 Circle:nth-of-type(3) {
+ /* Matching any of these selectors is bad as SVG should use case-sensitive matching. */
+ fill: red;
+ }
+
+ .group3 linearGradient:nth-of-type(3) stop {
+ stop-color: green;
+ }
+
+ .group3 lineargradient:nth-of-type(1) stop,
+ .group3 LINEARGRADIENT:nth-of-type(2) stop,
+ .group3 LinearGradient:nth-of-type(4) stop
+ {
+ /* Matching any of these selectors is bad as SVG should use case-sensitive matching. */
+ stop-color: red;
+ }
+
+ .group4 svg|linearGradient:nth-of-type(3) stop {
+ stop-color: green;
+ }
+
+ .group4 svg|lineargradient:nth-of-type(1) stop,
+ .group4 svg|LINEARGRADIENT:nth-of-type(2) stop,
+ .group4 svg|LinearGradient:nth-of-type(4) stop
+ {
+ /* Matching any of these selectors is bad as SVG should use case-sensitive matching. */
+ stop-color: red;
+ }
+ </style>
+ <script src="../../resources/js-test-pre.js"></script>
+ </head>
+ <body>
+ <div id="container">
+ <div class="group0">
+ <div id="div1" class="red-color">HTML element matched using lower case selector.</div>
+ <div id="div2" class="red-color">HTML element matched using upper case selector.</div>
+ <div id="div3" class="red-color">HTML element matched using mixed case selector.</div>
+ </div>
+
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="900" width="800">
+ <g class="group1" transform="translate(0, 10)">
+ <foreignObject id="fo1" class="green-color" y="0" width="100%" height="20">
+ SVG foreign object is NOT matched using lower case selector.
+ </foreignObject>
+ <foreignObject id="fo2" class="green-color" y="40" width="100%" height="20">
+ SVG foreign object is NOT matched using upper case selector.
+ </foreignObject>
+ <foreignObject id="fo3" class="red-color" y="80" width="100%" height="20">
+ SVG foreign object is matched using canonical form selector.
+ </foreignObject>
+ <foreignObject id="fo4" class="green-color" y="120" width="100%" height="20">
+ SVG foreign object is NOT matched using mixed case selector.
+ </foreignObject>
+ </g>
+
+ <g class="group2" transform="translate(25, 190)">
+ <line x1="-25" y1="-30" x2="100%" y2="-30" stroke-width="2" stroke="gray"></line>
+
+ <circle id="circle1" class="red-fill" cy="0" r="20" stroke="black" stroke-width="2" />
+ <text x="50" y="0">Circle SVG element is matched using lower case / canonical form selector</text>
+
+ <circle id="circle2" class="green-fill" cy="60" r="20" stroke="black" stroke-width="2" />
+ <text x="50" y="60">Circle SVG element is NOT matched using upper case selector</text>
+
+ <circle id="circle3" class="green-fill" cy="120" r="20" stroke="black" stroke-width="2" />
+ <text x="50" y="120">Circle SVG element is NOT matched using mixed case selector</text>
+ </g>
+
+ <g class="group3" transform="translate(25, 370)">
+ <line x1="-25" y1="-30" x2="100%" y2="-30" stroke-width="2" stroke="gray"></line>
+
+ <linearGradient id="Gradient1">
+ <stop id="stop1" offset="0%" class="green-stop-color" />
+ </linearGradient>
+ <circle cy="0" r="20" stroke="black" stroke-width="2" fill="url(#Gradient1)" />
+ <text x="50" y="0">SVG LinearGradient fill element is NOT matched using lower case selector</text>
+
+ <linearGradient id="Gradient2">
+ <stop id="stop2" offset="0%" class="green-stop-color" />
+ </linearGradient>
+ <circle cy="60" r="20" stroke="black" stroke-width="2" fill="url(#Gradient2)" />
+ <text x="50" y="60">SVG LinearGradient fill element is NOT matched using upper case selector</text>
+
+ <linearGradient id="Gradient3">
+ <stop id="stop3" offset="0%" class="red-stop-color" />
+ </linearGradient>
+ <circle cy="120" r="20" stroke="black" stroke-width="2" fill="url(#Gradient3)" />
+ <text x="50" y="120">SVG LinearGradient fill element is matched using canonical form selector</text>
+
+ <linearGradient id="Gradient4">
+ <stop id="stop4" offset="0%" class="green-stop-color" />
+ </linearGradient>
+ <circle cy="180" r="20" stroke="black" stroke-width="2" fill="url(#Gradient4)" />
+ <text x="50" y="180">SVG LinearGradient fill element is NOT matched using mixed case selector</text>
+ </g>
+
+ <g class="group4" transform="translate(25, 610)">
+ <line x1="-25" y1="-30" x2="100%" y2="-30" stroke-width="2" stroke="gray"></line>
+
+ <linearGradient id="Gradient5">
+ <stop id="stop5" offset="0%" class="green-stop-color" />
+ </linearGradient>
+ <circle cy="0" r="20" stroke="black" stroke-width="2" fill="url(#Gradient5)" />
+ <text x="50" y="0">SVG LinearGradient fill element is NOT matched using lower case selector + svg namespace</text>
+
+ <linearGradient id="Gradient6">
+ <stop id="stop6" offset="0%" class="green-stop-color" />
+ </linearGradient>
+ <circle cy="60" r="20" stroke="black" stroke-width="2" fill="url(#Gradient6)" />
+ <text x="50" y="60">SVG LinearGradient fill element is NOT matched using upper case selector + svg namespace</text>
+
+ <linearGradient id="Gradient7">
+ <stop id="stop7" offset="0%" class="red-stop-color" />
+ </linearGradient>
+ <circle cy="120" r="20" stroke="black" stroke-width="2" fill="url(#Gradient7)" />
+ <text x="50" y="120">SVG LinearGradient fill element is matched using canonical form selector + svg namespace</text>
+
+ <linearGradient id="Gradient8">
+ <stop id="stop8" offset="0%" class="green-stop-color" />
+ </linearGradient>
+ <circle cy="180" r="20" stroke="black" stroke-width="2" fill="url(#Gradient8)" />
+ <text x="50" y="180">SVG LinearGradient fill element is NOT matched using mixed case selector + svg namespace</text>
+ </g>
+ </svg>
+ </div>
+ <script>
+ function checkStyle(prefix, count, property, value) {
+ for (var i = 1; i <= count; ++i)
+ shouldBe("window.getComputedStyle(document.getElementById(\"" + prefix + i + "\"))." + property, "\"" + value + "\"");
+ }
+ checkStyle("div", 3, "color", "rgb(0, 128, 0)");
+ checkStyle("fo", 4, "color", "rgb(0, 128, 0)");
+ checkStyle("circle", 3, "fill", "#008000");
+ checkStyle("stop", 8, "stopColor", "rgb(0, 128, 0)");
+
+ document.getElementById("container").style.display = "none";
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+ </body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestssvgcssforeignObjectcasestylingexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/foreignObject-case-styling-expected.html (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/foreignObject-case-styling-expected.html         (rev 0)
+++ trunk/LayoutTests/svg/css/foreignObject-case-styling-expected.html        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+<!doctype html>
+<p>This test the styling of elements in foreignObject. WebKit uses to fail this because it was unable to match &lt;foreignObject&gt; due the uppercase 'O'</p>
+<p>If test suceed, both words should be green.</p>
+<svg width="500" height="100">
+ <foreignObject width="500" height="100">
+ <span style="color:green">Green</span>
+ <SPAN style="color:green">Green</SPAN>
+ </foreignObject>
+</svg>
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssforeignObjectcasestylinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/foreignObject-case-styling.html (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/foreignObject-case-styling.html         (rev 0)
+++ trunk/LayoutTests/svg/css/foreignObject-case-styling.html        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+<!doctype html>
+<style>
+ span { color: red; }
+ foreignObject span { color: blue; }
+ foreignObject SPAN { color: green; }
+</style>
+<p>This test the styling of elements in foreignObject. WebKit uses to fail this because it was unable to match &lt;foreignObject&gt; due the uppercase 'O'</p>
+<p>If test suceed, both words should be green.</p>
+<svg width="500" height="100">
+ <foreignObject width="500" height="100">
+ <span>Green</span>
+ <SPAN>Green</SPAN>
+ </foreignObject>
+</svg>
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgdomtagcasesensitivesvginhtmlexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/dom/tag-case-sensitive-svg-in-html-expected.txt (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/tag-case-sensitive-svg-in-html-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/dom/tag-case-sensitive-svg-in-html-expected.txt        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+PASS content.querySelector('SPAN') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('SPAN') is true
+PASS content.querySelector('div ul li SPAN') is document.getElementById('upper1')
+PASS document.getElementById('upper1').webkitMatchesSelector('div ul li SPAN') is true
+PASS content.querySelector('unknownTag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('unknownTag') is true
+PASS content.querySelector('unknowntag') is document.getElementById('unknownTag1')
+PASS document.getElementById('unknownTag1').webkitMatchesSelector('unknowntag') is true
+PASS content.querySelector('g') is document.getElementById('group1')
+PASS document.getElementById('group1').webkitMatchesSelector('g') is true
+PASS content.querySelector('G') is null
+PASS content.querySelector('textPath') is document.getElementById('textPath1')
+PASS document.getElementById('textPath1').webkitMatchesSelector('textPath') is true
+PASS content.querySelector('svg textPath') is document.getElementById('textPath1')
+PASS document.getElementById('textPath1').webkitMatchesSelector('svg textPath') is true
+PASS content.querySelector('textpath') is null
+PASS content.querySelector('TextPath') is null
+PASS content.querySelector('foreignObject') is document.getElementById('foreignObject1')
+PASS document.getElementById('foreignObject1').webkitMatchesSelector('foreignObject') is true
+PASS content.querySelector('svg foreignObject') is document.getElementById('foreignObject1')
+PASS document.getElementById('foreignObject1').webkitMatchesSelector('svg foreignObject') is true
+PASS content.querySelector('foreignobject') is null
+PASS content.querySelector('ForeignObject') is null
+PASS content.querySelector('textPath + foreignObject') is document.getElementById('foreignObject1')
+PASS document.getElementById('foreignObject1').webkitMatchesSelector('textPath + foreignObject') is true
+PASS content.querySelector('svg textPath + foreignObject') is document.getElementById('foreignObject1')
+PASS document.getElementById('foreignObject1').webkitMatchesSelector('svg textPath + foreignObject') is true
+PASS content.querySelector('textPath + foreignobject') is null
+PASS content.querySelector('textPath + ForeignObject') is null
+PASS content.querySelector('textpath + foreignObject') is null
+PASS content.querySelector('TextPath + foreignObject') is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgdomtagcasesensitivesvginhtmlhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/dom/tag-case-sensitive-svg-in-html.html (0 => 179203)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/tag-case-sensitive-svg-in-html.html         (rev 0)
+++ trunk/LayoutTests/svg/dom/tag-case-sensitive-svg-in-html.html        2015-01-27 20:45:10 UTC (rev 179203)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+<!doctype html>
+<html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+ <!-- Testing that in SVG tags inside HTML documents match using case-insensitive mode. -->
+ <div id="content">
+ <div style="display: none">
+ <ul>
+ <li>
+ <SPAN id="upper1"></SPAN>
+ <svg xmlns="http://www.w3.org/2000/svg">
+ <g id="group1"></g>
+ <textPath id="textPath1"></textPath>
+ <foreignObject id="foreignObject1"></foreignObject>
+ </svg>
+ </li>
+ </ul>
+ <unknownTag id="unknownTag1"></unknownTag>
+ </div>
+ </div>
+ <script>
+ var content = document.getElementById("content");
+ function checkMatchingSelector(selector, elementId) {
+ shouldBe("content.querySelector('" + selector + "')", "document.getElementById('" + elementId + "')");
+ shouldBeTrue("document.getElementById('" + elementId + "').webkitMatchesSelector('" + selector + "')");
+ }
+
+ function checkNonMatchingSelector(selector) {
+ shouldBeNull("content.querySelector('" + selector + "')");
+ }
+
+ // Checking that tag name selectors still work on HTML elements when SVG is around.
+ checkMatchingSelector("SPAN", "upper1");
+ checkMatchingSelector("div ul li SPAN", "upper1");
+ checkMatchingSelector("unknownTag", "unknownTag1");
+ checkMatchingSelector("unknowntag", "unknownTag1");
+
+ checkMatchingSelector("g", "group1");
+ checkNonMatchingSelector("G");
+
+ checkMatchingSelector("textPath", "textPath1");
+ checkMatchingSelector("svg textPath", "textPath1");
+ checkNonMatchingSelector("textpath");
+ checkNonMatchingSelector("TextPath");
+
+ checkMatchingSelector("foreignObject", "foreignObject1");
+ checkMatchingSelector("svg foreignObject", "foreignObject1");
+ checkNonMatchingSelector("foreignobject");
+ checkNonMatchingSelector("ForeignObject");
+
+ checkMatchingSelector("textPath + foreignObject", "foreignObject1");
+ checkMatchingSelector("svg textPath + foreignObject", "foreignObject1");
+ checkNonMatchingSelector("textPath + foreignobject");
+ checkNonMatchingSelector("textPath + ForeignObject");
+ checkNonMatchingSelector("textpath + foreignObject");
+ checkNonMatchingSelector("TextPath + foreignObject");
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre>
</div>
</div>
</body>
</html>