1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/bugs/323656-3.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,84 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + <head> 1.7 + <title>Test inheritance through various anonymous boxes: {ib} 1.8 + situations, buttons, overflow, columns, listboxes, first-line</title> 1.9 + <style> 1.10 + /** 1.11 + * The idea is that "color" inherits by default while "border-color" does 1.12 + * not. So if the former is red and the latter is green on a parent, and 1.13 + * the child's border-color is set to "inherit", it'll be green only if 1.14 + * the child is inheriting from the parent. If not, it'll either be 1.15 + * whatever the border-color is on what it's inheriting from, which will 1.16 + * be red if what it's inheriting from has the default (currentColor) 1.17 + * border-color). 1.18 + */ 1.19 + 1.20 + /* 't' for "test" */ 1.21 + * { color: red; border: 0px hidden red; background: transparent } 1.22 + .t { border-color: green } 1.23 + .t:not(.d2) > :first-child 1.24 + { border-color: inherit; border-style: solid; border-width: 10px } 1.25 + .d2 > span { border-style: solid; border-width: 10px } 1.26 + .f::first-line { border-color: green } 1.27 + </style> 1.28 + <script> 1.29 + function make(str) { 1.30 + return document.createElement(str); 1.31 + } 1.32 + 1.33 + function makeDiv() { 1.34 + return make("div"); 1.35 + } 1.36 + 1.37 + window.onload = function() { 1.38 + var lst = document.getElementsByClassName("d"); 1.39 + for (var i = 0; i < lst.length; ++i) { 1.40 + if (lst[i].nodeName != "select") { 1.41 + lst[i].appendChild(makeDiv()); 1.42 + } else { 1.43 + lst[i].appendChild(make("option")); 1.44 + } 1.45 + } 1.46 + 1.47 + lst = document.getElementsByClassName("d2"); 1.48 + for (i = 0; i < lst.length; ++i) { 1.49 + var span = lst[i].getElementsByTagName("span")[0]; 1.50 + span.style.cssText = 1.51 + "border-color: inherit; border-style: solid; border-width: 10px"; 1.52 + } 1.53 + 1.54 + var x = document.getElementsByClassName("f d")[0]; 1.55 + x.appendChild(make("span")); 1.56 + x.appendChild(make("br")); 1.57 + x.appendChild(make("span")); 1.58 + } 1.59 + </script> 1.60 + </head> 1.61 + <body> 1.62 + <div class="t"><div></div></div> 1.63 + <span class="t"><div></div></span> 1.64 + <span style="position: relative" class="t"><div></div></span> 1.65 + <div class="f"><span></span><br><span></span></div> 1.66 + <button class="t"><div></div></button> 1.67 + <div style="overflow: auto" class="t"><div></div></div> 1.68 + <div style="-moz-column-count: 2" class="t"><div></div></div> 1.69 + <select size="2" class="t"> 1.70 + <option></option> 1.71 + </select> 1.72 + 1.73 + <div class="t d"></div> 1.74 + <span class="t d"></span> 1.75 + <span style="position: relative" class="t d"></span> 1.76 + <div class="f d"></div> 1.77 + <button class="t d"></button> 1.78 + <div style="overflow: auto" class="t d"></div> 1.79 + <div style="-moz-column-count: 2" class="t d"></div> 1.80 + <select size="2" class="t d"> 1.81 + <option></option> 1.82 + </select> 1.83 + 1.84 + <span class="t d2"><div></div><span></span></span> 1.85 + <span style="position: relative" class="t d2"><div></div><span></span></span> 1.86 + </body> 1.87 +</html>