aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--components/layout/block.rs19
-rw-r--r--components/script/dom/navigator.rs4
-rw-r--r--components/script/dom/navigatorinfo.rs8
-rw-r--r--components/script/dom/webidls/Navigator.webidl2
-rw-r--r--components/script/dom/workernavigator.rs4
-rw-r--r--components/style/selector_matching.rs26
-rw-r--r--components/style/selectors.rs55
-rw-r--r--components/util/opts.rs23
-rw-r--r--resources/iso-8859-8.css23
-rw-r--r--resources/presentational-hints.css261
-rw-r--r--resources/quirks-mode.css33
-rw-r--r--resources/quotes.css190
-rw-r--r--resources/servo.css13
-rw-r--r--resources/user-agent.css406
-rw-r--r--tests/ref/attr_selector_case_sensitivity.html17
-rw-r--r--tests/ref/attr_selector_case_sensitivity_ref.html17
-rw-r--r--tests/ref/basic.list2
-rw-r--r--tests/ref/iframe/multiple_external.html1
-rw-r--r--tests/ref/iframe/overflow.html2
-rw-r--r--tests/ref/position_fixed_tile_edge_3.html11
-rw-r--r--tests/ref/table_auto_width.html2
-rw-r--r--tests/ref/table_auto_width_ref.html2
-rw-r--r--tests/ref/table_containing_block_a.html2
-rw-r--r--tests/ref/table_containing_block_ref.html2
-rw-r--r--tests/ref/table_padding_a.html2
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.html.ini9
27 files changed, 958 insertions, 180 deletions
diff --git a/README.md b/README.md
index e418a618d74..c544152555c 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ On Debian-based Linuxes:
sudo apt-get install curl freeglut3-dev \
libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
msttcorefonts gperf g++ cmake python-virtualenv \
- libssl-dev libglfw3-dev
+ libssl-dev libglfw-dev
```
On Fedora:
diff --git a/components/layout/block.rs b/components/layout/block.rs
index 558ed6e28de..d36f4b873e6 100644
--- a/components/layout/block.rs
+++ b/components/layout/block.rs
@@ -1041,8 +1041,7 @@ impl BlockFlow {
let info = PlacementInfo {
size: LogicalSize::new(
self.fragment.style.writing_mode,
- self.base.position.size.inline + self.fragment.margin.inline_start_end() +
- self.fragment.border_padding.inline_start_end(),
+ self.base.position.size.inline,
block_size + self.fragment.margin.block_start_end()),
ceiling: clearance + float_info.float_ceiling,
max_inline_size: float_info.containing_inline_size,
@@ -1620,10 +1619,6 @@ impl Flow for BlockFlow {
let padding_and_borders = self.fragment.border_padding.inline_start_end();
let content_inline_size = self.fragment.border_box.size.inline - padding_and_borders;
- if self.is_float() {
- self.base.position.size.inline = content_inline_size;
- }
-
self.propagate_assigned_inline_size_to_children(inline_start_content_edge, content_inline_size, None);
}
@@ -1956,6 +1951,7 @@ pub trait ISizeAndMarginsComputer {
block: &mut BlockFlow,
solution: ISizeConstraintSolution) {
let inline_size;
+ let extra_inline_size_from_margin;
{
let fragment = block.fragment();
fragment.margin.inline_start = solution.margin_inline_start;
@@ -1966,14 +1962,19 @@ pub trait ISizeAndMarginsComputer {
// The associated fragment has the border box of this flow.
inline_size = solution.inline_size + fragment.border_padding.inline_start_end();
- fragment.border_box.size.inline = inline_size
+ fragment.border_box.size.inline = inline_size;
+
+ // To calculate the total size of this block, we also need to account for any additional
+ // size contribution from positive margins. Negative margins means the block isn't made
+ // larger at all by the margin.
+ extra_inline_size_from_margin = max(Au(0), fragment.margin.inline_start) +
+ max(Au(0), fragment.margin.inline_end);
}
// We also resize the block itself, to ensure that overflow is not calculated
// as the inline-size of our parent. We might be smaller and we might be larger if we
// overflow.
- let flow = flow::mut_base(block);
- flow.position.size.inline = inline_size;
+ flow::mut_base(block).position.size.inline = inline_size + extra_inline_size_from_margin;
}
/// Set the x coordinate of the given flow if it is absolutely positioned.
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs
index 9810c67a877..957abd558ec 100644
--- a/components/script/dom/navigator.rs
+++ b/components/script/dom/navigator.rs
@@ -51,6 +51,10 @@ impl<'a> NavigatorMethods for JSRef<'a, Navigator> {
fn Platform(self) -> DOMString {
NavigatorInfo::Platform()
}
+
+ fn UserAgent(self) -> DOMString {
+ NavigatorInfo::UserAgent()
+ }
}
impl Reflectable for Navigator {
diff --git a/components/script/dom/navigatorinfo.rs b/components/script/dom/navigatorinfo.rs
index 8832aca8697..d8081ef134a 100644
--- a/components/script/dom/navigatorinfo.rs
+++ b/components/script/dom/navigatorinfo.rs
@@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use servo_util::str::DOMString;
+use servo_util::opts;
pub struct NavigatorInfo;
@@ -26,4 +27,11 @@ impl NavigatorInfo {
pub fn Platform() -> DOMString {
"".to_string()
}
+
+ pub fn UserAgent() -> DOMString {
+ match opts::get().user_agent {
+ Some(ref user_agent) => user_agent.clone(),
+ None => "".to_string(),
+ }
+ }
}
diff --git a/components/script/dom/webidls/Navigator.webidl b/components/script/dom/webidls/Navigator.webidl
index 16d96d53470..0ce509f4c04 100644
--- a/components/script/dom/webidls/Navigator.webidl
+++ b/components/script/dom/webidls/Navigator.webidl
@@ -23,5 +23,5 @@ interface NavigatorID {
readonly attribute DOMString platform;
readonly attribute DOMString product; // constant "Gecko"
boolean taintEnabled(); // constant false
- //readonly attribute DOMString userAgent;
+ readonly attribute DOMString userAgent;
};
diff --git a/components/script/dom/workernavigator.rs b/components/script/dom/workernavigator.rs
index 2265b23c6bc..2d3c496048c 100644
--- a/components/script/dom/workernavigator.rs
+++ b/components/script/dom/workernavigator.rs
@@ -51,6 +51,10 @@ impl<'a> WorkerNavigatorMethods for JSRef<'a, WorkerNavigator> {
fn Platform(self) -> DOMString {
NavigatorInfo::Platform()
}
+
+ fn UserAgent(self) -> DOMString {
+ NavigatorInfo::UserAgent()
+ }
}
impl Reflectable for WorkerNavigator {
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs
index 6c5ed1e10f5..39e0fb73e5f 100644
--- a/components/style/selector_matching.rs
+++ b/components/style/selector_matching.rs
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+use std::ascii::AsciiExt;
use std::collections::hashmap::HashMap;
use std::hash::Hash;
use std::num::div_rem;
@@ -279,12 +280,18 @@ impl Stylist {
after_map: PerPseudoElementSelectorMap::new(),
rules_source_order: 0u,
};
- let ua_stylesheet = Stylesheet::from_bytes(
- read_resource_file(["user-agent.css"]).unwrap().as_slice(),
- Url::parse("chrome:///user-agent.css").unwrap(),
- None,
- None);
- stylist.add_stylesheet(ua_stylesheet, UserAgentOrigin);
+ // FIXME: Add quirks-mode.css in quirks mode.
+ // FIXME: Add iso-8859-9.css when the document’s encoding is ISO-8859-8.
+ // FIXME: presentational-hints.css should be at author origin with zero specificity.
+ // (Does it make a difference?)
+ for &filename in ["user-agent.css", "servo.css", "presentational-hints.css"].iter() {
+ let ua_stylesheet = Stylesheet::from_bytes(
+ read_resource_file([filename]).unwrap().as_slice(),
+ Url::parse(format!("chrome:///{}", filename).as_slice()).unwrap(),
+ None,
+ None);
+ stylist.add_stylesheet(ua_stylesheet, UserAgentOrigin);
+ }
stylist
}
@@ -729,14 +736,17 @@ pub fn matches_simple_selector<'a, E:TElement<'a>,
*shareable = false;
element.match_attr(attr, |_| true)
}
- AttrEqual(ref attr, ref value) => {
+ AttrEqual(ref attr, ref value, case_sensitivity) => {
if value.as_slice() != "DIR" {
// FIXME(pcwalton): Remove once we start actually supporting RTL text. This is in
// here because the UA style otherwise disables all style sharing completely.
*shareable = false
}
element.match_attr(attr, |attr_value| {
- attr_value == value.as_slice()
+ match case_sensitivity {
+ CaseSensitive => attr_value == value.as_slice(),
+ CaseInsensitive => attr_value.eq_ignore_ascii_case(value.as_slice()),
+ }
})
}
AttrIncludes(ref attr, ref value) => {
diff --git a/components/style/selectors.rs b/components/style/selectors.rs
index 7a6f8637cda..6c783e70349 100644
--- a/components/style/selectors.rs
+++ b/components/style/selectors.rs
@@ -61,9 +61,9 @@ pub enum SimpleSelector {
// Attribute selectors
AttrExists(AttrSelector), // [foo]
- AttrEqual(AttrSelector, String), // [foo=bar]
+ AttrEqual(AttrSelector, String, CaseSensitivity), // [foo=bar]
AttrIncludes(AttrSelector, String), // [foo~=bar]
- AttrDashMatch(AttrSelector, String, String), // [foo|=bar] Second string is the first + "-"
+ AttrDashMatch(AttrSelector, String, String), // [foo|=bar] Second string is the first + "-"
AttrPrefixMatch(AttrSelector, String), // [foo^=bar]
AttrSubstringMatch(AttrSelector, String), // [foo*=bar]
AttrSuffixMatch(AttrSelector, String), // [foo$=bar]
@@ -90,6 +90,14 @@ pub enum SimpleSelector {
// ...
}
+
+#[deriving(Eq, PartialEq, Clone, Hash)]
+pub enum CaseSensitivity {
+ CaseSensitive, // Selectors spec says language-defined, but HTML says sensitive.
+ CaseInsensitive,
+}
+
+
#[deriving(Eq, PartialEq, Clone, Hash)]
pub struct LocalName {
pub name: Atom,
@@ -446,25 +454,21 @@ fn parse_attribute_selector(content: Vec<ComponentValue>, namespaces: &Namespace
};
skip_whitespace(iter);
// TODO: deal with empty value or value containing whitespace (see spec)
- macro_rules! get_value( () => {{
- skip_whitespace(iter);
- match iter.next() {
- Some(Ident(value)) | Some(QuotedString(value)) => value,
- _ => return Err(())
- }
- }};)
let result = match iter.next() {
None => AttrExists(attr), // [foo]
- Some(Delim('=')) => AttrEqual(attr, (get_value!())), // [foo=bar]
- Some(IncludeMatch) => AttrIncludes(attr, (get_value!())), // [foo~=bar]
+ Some(Delim('=')) => AttrEqual(
+ attr, try!(parse_attribute_value(iter)),
+ try!(parse_attribute_flags(iter))), // [foo=bar]
+ Some(IncludeMatch) => AttrIncludes(attr, try!(parse_attribute_value(iter))), // [foo~=bar]
Some(DashMatch) => {
- let value = get_value!();
+ let value = try!(parse_attribute_value(iter));
let dashing_value = format!("{}-", value);
AttrDashMatch(attr, value, dashing_value) // [foo|=bar]
},
- Some(PrefixMatch) => AttrPrefixMatch(attr, (get_value!())), // [foo^=bar]
- Some(SubstringMatch) => AttrSubstringMatch(attr, (get_value!())), // [foo*=bar]
- Some(SuffixMatch) => AttrSuffixMatch(attr, (get_value!())), // [foo$=bar]
+ Some(PrefixMatch) => AttrPrefixMatch(attr, try!(parse_attribute_value(iter))), // [foo^=bar]
+ // [foo*=bar]
+ Some(SubstringMatch) => AttrSubstringMatch(attr, try!(parse_attribute_value(iter))),
+ Some(SuffixMatch) => AttrSuffixMatch(attr, try!(parse_attribute_value(iter))), // [foo$=bar]
_ => return Err(())
};
skip_whitespace(iter);
@@ -472,6 +476,27 @@ fn parse_attribute_selector(content: Vec<ComponentValue>, namespaces: &Namespace
}
+fn parse_attribute_value<I: Iterator<ComponentValue>>(iter: &mut Iter<I>) -> Result<String, ()> {
+ skip_whitespace(iter);
+ match iter.next() {
+ Some(Ident(value)) | Some(QuotedString(value)) => Ok(value),
+ _ => Err(())
+ }
+}
+
+
+fn parse_attribute_flags<I: Iterator<ComponentValue>>(iter: &mut Iter<I>)
+ -> Result<CaseSensitivity, ()> {
+ skip_whitespace(iter);
+ match iter.next() {
+ None => Ok(CaseSensitive),
+ Some(Ident(ref value)) if value.as_slice().eq_ignore_ascii_case("i")
+ => Ok(CaseInsensitive),
+ _ => Err(())
+ }
+}
+
+
fn parse_simple_pseudo_class(name: &str) -> Result<SimpleSelector, ()> {
match name.to_ascii_lower().as_slice() {
"any-link" => Ok(AnyLink),
diff --git a/components/util/opts.rs b/components/util/opts.rs
index de8b295d1eb..b5970a1f5c1 100644
--- a/components/util/opts.rs
+++ b/components/util/opts.rs
@@ -15,6 +15,7 @@ use layers::geometry::DevicePixel;
use getopts;
use std::cmp;
use std::io;
+use std::mem;
use std::os;
use std::rt;
@@ -230,7 +231,7 @@ pub fn from_cmdline_args(args: &[String]) -> Option<Opts> {
}
};
- Some(Opts {
+ let opts = Opts {
urls: urls,
render_backend: render_backend,
n_render_threads: n_render_threads,
@@ -253,7 +254,14 @@ pub fn from_cmdline_args(args: &[String]) -> Option<Opts> {
initial_window_size: initial_window_size,
user_agent: opt_match.opt_str("u"),
dump_flow_tree: opt_match.opt_present("dump-flow-tree"),
- })
+ };
+
+ unsafe {
+ let box_opts = box opts.clone();
+ OPTIONS = mem::transmute(box_opts);
+ }
+
+ Some(opts)
}
static mut EXPERIMENTAL_ENABLED: bool = false;
@@ -269,3 +277,14 @@ pub fn experimental_enabled() -> bool {
EXPERIMENTAL_ENABLED
}
}
+
+// Make Opts available globally. This saves having to clone and pass
+// opts everywhere it is used, which gets particularly cumbersome
+// when passing through the DOM structures.
+// GWTODO: Change existing code that takes copies of opts to instead
+// make use of the global copy.
+static mut OPTIONS: *mut Opts = 0 as *mut Opts;
+
+pub fn get() -> &'static Opts {
+ unsafe { mem::transmute(OPTIONS) }
+}
diff --git a/resources/iso-8859-8.css b/resources/iso-8859-8.css
new file mode 100644
index 00000000000..fd97ef5807f
--- /dev/null
+++ b/resources/iso-8859-8.css
@@ -0,0 +1,23 @@
+/*
+
+https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering
+
+> When the document's character encoding is ISO-8859-8,
+> the following rules are additionally expected to apply, following [user-agent.css]
+
+*/
+
+@namespace url(http://www.w3.org/1999/xhtml);
+
+
+address, blockquote, center, div, figure, figcaption, footer, form, header, hr,
+legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2,
+h3, h4, h5, h6, hgroup, nav, section, table, caption, colgroup, col, thead,
+tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, [dir=ltr i],
+[dir=rtl i], [dir=auto i], *|* {
+ unicode-bidi: bidi-override;
+}
+input:not([type=submit i]):not([type=reset i]):not([type=button i]),
+textarea, keygen {
+ unicode-bidi: normal;
+}
diff --git a/resources/presentational-hints.css b/resources/presentational-hints.css
new file mode 100644
index 00000000000..dcccbf9a64b
--- /dev/null
+++ b/resources/presentational-hints.css
@@ -0,0 +1,261 @@
+/*
+https://html.spec.whatwg.org/multipage/rendering.html#presentational-hints
+*/
+
+@namespace url(http://www.w3.org/1999/xhtml);
+
+
+pre[wrap] { white-space: pre-wrap; }
+
+/*
+FIXME: also "align descendants"
+https://html.spec.whatwg.org/multipage/rendering.html#align-descendants
+*/
+center, div[align=center i], div[align=middle i] { text-align: center; }
+div[align=left i] { text-align: left; }
+div[align=right i] { text-align: right; }
+div[align=justify i] { text-align: justify; }
+
+
+br[clear=left i] { clear: left; }
+br[clear=right i] { clear: right; }
+br[clear=all i], br[clear=both i] { clear: both; }
+
+
+ol[type=1], li[type=1] { list-style-type: decimal; }
+ol[type=a], li[type=a] { list-style-type: lower-alpha; }
+ol[type=A], li[type=A] { list-style-type: upper-alpha; }
+ol[type=i], li[type=i] { list-style-type: lower-roman; }
+ol[type=I], li[type=I] { list-style-type: upper-roman; }
+ul[type=none i], li[type=none i] { list-style-type: none; }
+ul[type=disc i], li[type=disc i] { list-style-type: disc; }
+ul[type=circle i], li[type=circle i] { list-style-type: circle; }
+ul[type=square i], li[type=square i] { list-style-type: square; }
+
+
+table[align=left i] { float: left; }
+table[align=right i] { float: right; }
+table[align=center i] { margin-left: auto; margin-right: auto; }
+:matches(thead, tbody, tfoot, tr, td, th)[align=absmiddle i] {
+ text-align: center;
+}
+
+caption[align=bottom i] { caption-side: bottom; }
+:matches(p, h1, h2, h3, h4, h5, h6)[align=left i] { text-align: left; }
+:matches(p, h1, h2, h3, h4, h5, h6)[align=right i] { text-align: right; }
+:matches(p, h1, h2, h3, h4, h5, h6)[align=center i] { text-align: center; }
+:matches(p, h1, h2, h3, h4, h5, h6)[align=justify i] { text-align: justify; }
+:matches(thead, tbody, tfoot, tr, td, th)[valign=top i] { vertical-align: top; }
+:matches(thead, tbody, tfoot, tr, td, th)[valign=middle i] { vertical-align: middle; }
+:matches(thead, tbody, tfoot, tr, td, th)[valign=bottom i] { vertical-align: bottom; }
+:matches(thead, tbody, tfoot, tr, td, th)[valign=baseline i] { vertical-align: baseline; }
+
+td[nowrap], th[nowrap] { white-space: nowrap; }
+
+table:matches([rules=none i], [rules=groups i], [rules=rows i], [rules=cols i], [rules=all i]) {
+ border-style: hidden;
+ border-collapse: collapse;
+}
+
+table[border] {
+ border-style: outset;
+ /*
+ FIXME: only if border is not equivalent to zero
+ https://html.spec.whatwg.org/multipage/rendering.html#magic-border-selector
+ */
+}
+table[frame=void i] { border-style: hidden; }
+table[frame=above i] { border-style: outset hidden hidden hidden; }
+table[frame=below i] { border-style: hidden hidden outset hidden; }
+table[frame=hsides i] { border-style: outset hidden outset hidden; }
+table[frame=lhs i] { border-style: hidden hidden hidden outset; }
+table[frame=rhs i] { border-style: hidden outset hidden hidden; }
+table[frame=vsides i] { border-style: hidden outset; }
+table[frame=box i], table[frame=border i] { border-style: outset; }
+
+
+table[border] > tr > :matches(td, th),
+table[border] > :matches(thead, tbody, tfoot) > tr > :matches(td, th) {
+ /*
+ FIXME: only if border is not equivalent to zero
+ https://html.spec.whatwg.org/multipage/rendering.html#magic-border-selector
+ */
+ border-width: 1px;
+ border-style: inset;
+}
+
+table:matches([rules=none i], [rules=groups i], [rules=rows i]) > tr > :matches(td, th),
+table:matches([rules=none i], [rules=groups i], [rules=rows i]) > :matches(thead, tbody, tfoot) > tr > :matches(td, th) {
+ border-width: 1px;
+ border-style: none;
+}
+table[rules=cols i] > tr > :matches(td, th),
+table[rules=cols i] > :matches(thead, tbody, tfoot) > tr > :matches(td, th) {
+ border-width: 1px;
+ border-style: none solid;
+}
+table[rules=all i] > tr > :matches(td, th),
+table[rules=all i] > :matches(thead, tbody, tfoot) > tr > :matches(td, th) {
+ border-width: 1px;
+ border-style: solid;
+}
+
+table[rules=groups i] > colgroup {
+ border-left-width: 1px;
+ border-left-style: solid;
+ border-right-width: 1px;
+ border-right-style: solid;
+}
+table[rules=groups i] > :matches(thead, tbody, tfoot) {
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+table[rules=rows i] > tr,
+table[rules=rows i] > :matches(thead, tbody, tfoot) > tr {
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+
+hr[align=left] { margin-left: 0; margin-right: auto; }
+hr[align=right] { margin-left: auto; margin-right: 0; }
+hr[align=center] { margin-left: auto; margin-right: auto; }
+hr[color], hr[noshade] { border-style: solid; }
+
+
+
+iframe[frameborder=0], iframe[frameborder=no i] { border: none; }
+
+:matches(applet, embed, iframe, img, input[type=image i], object)[align=left i] {
+ float: left;
+}
+:matches(applet, embed, iframe, img, input[type=image i], object)[align=right i] {
+ float: right;
+}
+:matches(applet, embed, iframe, img, input[type=image i], object)[align=top i] {
+ vertical-align: top;
+}
+:matches(applet, embed, iframe, img, input[type=image i], object)[align=baseline i] {
+ vertical-align: baseline;
+}
+:matches(applet, embed, iframe, img, input[type=image i], object)[align=texttop i] {
+ vertical-align: text-top;
+}
+:matches(applet, embed, iframe, img, input[type=image i], object):matches([align=absmiddle i], [align=abscenter i]) {
+ vertical-align: middle;
+}
+:matches(applet, embed, iframe, img, input[type=image i], object)[align=bottom i] {
+ vertical-align: bottom;
+}
+/*
+FIXME:
+:matches(applet, embed, iframe, img, input[type=image i], object):matches([align=center i], [align=middle i]) {
+ vertical-align: "aligns the vertical middle of the element with the parent element's baseline."
+}
+*/
+
+/*
+
+Presentational attributes which can not currently be expressed in CSS.
+FIXME: Deal with them with attr(foo dimension) and the like?
+
+body
+ marginheight
+ marginwidth
+ topmargin
+ rightmargin
+ bottommargin
+ leftmargin
+ background
+ bgcolor
+ text
+ link
+ vlink
+ alink
+
+frame, iframe
+ marginheight
+ marginwidth
+
+font
+ face
+ color
+ size
+
+table
+ cellspacing
+ cellpadding
+ hspace
+ vspace
+ height
+ width
+ bordercolor
+ border
+
+col
+ width
+
+tr
+ height
+
+td, th
+ width
+ height
+
+caption, thead, tbody, tfoot, tr, td, and th
+ align
+
+table, thead, tbody, tfoot, tr, td, or th
+ background
+ bgcolor
+
+(quirks mode) th, td
+ nowrap
+
+hr
+ color
+ noshade
+ size
+ width
+
+legend
+ align
+
+applet, embed, iframe, img, input[type=image i], object
+ hspace
+ vspace
+
+img, input[type=image i], object
+ border
+
+applet, embed, iframe, img, input[type=image i], object, video
+ width
+ height
+
+*/
+
+/*
+
+Extra
+ ol > li
+ https://html.spec.whatwg.org/multipage/semantics.html#ordinal-value
+ col
+ span
+ colgroup (if not col child)
+ span
+ td, th
+ colspan
+ rowspan
+
+ :computed-value(text-align is initial) > th {
+ text-align: center;
+ }
+
+ https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend
+
+*/
+
diff --git a/resources/quirks-mode.css b/resources/quirks-mode.css
new file mode 100644
index 00000000000..4ba71bb6392
--- /dev/null
+++ b/resources/quirks-mode.css
@@ -0,0 +1,33 @@
+/*
+
+https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3
+
+> In quirks mode, the following rules are also expected to apply:
+
+*/
+
+@namespace url(http://www.w3.org/1999/xhtml);
+
+
+form { margin-bottom: 1em; }
+
+
+table {
+ font-weight: initial;
+ font-style: initial;
+ font-variant: initial;
+ font-size: initial;
+ line-height: initial;
+ white-space: initial;
+ text-align: initial;
+}
+
+
+/* FIXME: https://html.spec.whatwg.org/multipage/rendering.html#margin-collapsing-quirks */
+
+
+input:not([type=image]), textarea { box-sizing: border-box; }
+
+
+img[align=left i] { margin-right: 3px; }
+img[align=right i] { margin-left: 3px; }
diff --git a/resources/quotes.css b/resources/quotes.css
new file mode 100644
index 00000000000..2b1b7470b16
--- /dev/null
+++ b/resources/quotes.css
@@ -0,0 +1,190 @@
+/*
+
+https://html.spec.whatwg.org/multipage/rendering.html#quotes
+
+> This block is automatically generated from the Unicode Common Locale Data Repository.
+> http://cldr.unicode.org/
+>
+> User agents are expected to use either the block [from the spec]
+> (which will be regularly updated)
+> or to automatically generate their own copy directly from the source material.
+> The language codes are derived from the CLDR file names.
+> The quotes are derived from the delimiter blocks,
+> with fallback handled as specified in the CLDR documentation.
+
+*/
+
+@namespace url(http://www.w3.org/1999/xhtml);
+
+
+:root { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(af), :not(:lang(af)) > :lang(af) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(agq), :not(:lang(agq)) > :lang(agq) { quotes: '\201e' '\201d' '\201a' '\2019' } /* „ ” ‚ ’ */
+:root:lang(ak), :not(:lang(ak)) > :lang(ak) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(am), :not(:lang(am)) > :lang(am) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(ar), :not(:lang(ar)) > :lang(ar) { quotes: '\201d' '\201c' '\2019' '\2018' } /* ” “ ’ ‘ */
+:root:lang(asa), :not(:lang(asa)) > :lang(asa) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ast), :not(:lang(ast)) > :lang(ast) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(az), :not(:lang(az)) > :lang(az) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(az-Cyrl), :not(:lang(az-Cyrl)) > :lang(az-Cyrl) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(bas), :not(:lang(bas)) > :lang(bas) { quotes: '\00ab' '\00bb' '\201e' '\201c' } /* « » „ “ */
+:root:lang(bem), :not(:lang(bem)) > :lang(bem) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(bez), :not(:lang(bez)) > :lang(bez) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(bg), :not(:lang(bg)) > :lang(bg) { quotes: '\201e' '\201c' '\201e' '\201c' } /* „ “ „ “ */
+:root:lang(bm), :not(:lang(bm)) > :lang(bm) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(bn), :not(:lang(bn)) > :lang(bn) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(br), :not(:lang(br)) > :lang(br) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(brx), :not(:lang(brx)) > :lang(brx) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(bs), :not(:lang(bs)) > :lang(bs) { quotes: '\201e' '\201c' '\2018' '\2019' } /* „ “ ‘ ’ */
+:root:lang(bs-Cyrl), :not(:lang(bs-Cyrl)) > :lang(bs-Cyrl) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(ca), :not(:lang(ca)) > :lang(ca) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(cgg), :not(:lang(cgg)) > :lang(cgg) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(chr), :not(:lang(chr)) > :lang(chr) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(cs), :not(:lang(cs)) > :lang(cs) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(cy), :not(:lang(cy)) > :lang(cy) { quotes: '\2018' '\2019' '\201c' '\201d' } /* ‘ ’ “ ” */
+:root:lang(da), :not(:lang(da)) > :lang(da) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(dav), :not(:lang(dav)) > :lang(dav) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(de), :not(:lang(de)) > :lang(de) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(de-CH), :not(:lang(de-CH)) > :lang(de-CH) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(dje), :not(:lang(dje)) > :lang(dje) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(dsb), :not(:lang(dsb)) > :lang(dsb) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(dua), :not(:lang(dua)) > :lang(dua) { quotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » ‘ ’ */
+:root:lang(dyo), :not(:lang(dyo)) > :lang(dyo) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(dz), :not(:lang(dz)) > :lang(dz) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ebu), :not(:lang(ebu)) > :lang(ebu) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ee), :not(:lang(ee)) > :lang(ee) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(el), :not(:lang(el)) > :lang(el) { quotes: '\00ab' '\00bb' '\0022' '\0022' } /* « » " " */
+:root:lang(en), :not(:lang(en)) > :lang(en) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(es), :not(:lang(es)) > :lang(es) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(et), :not(:lang(et)) > :lang(et) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(eu), :not(:lang(eu)) > :lang(eu) { quotes: '\0022' '\0022' '\0022' '\0022' } /* " " " " */
+:root:lang(ewo), :not(:lang(ewo)) > :lang(ewo) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(fa), :not(:lang(fa)) > :lang(fa) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(ff), :not(:lang(ff)) > :lang(ff) { quotes: '\201e' '\201d' '\201a' '\2019' } /* „ ” ‚ ’ */
+:root:lang(fi), :not(:lang(fi)) > :lang(fi) { quotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” ’ ’ */
+:root:lang(fil), :not(:lang(fil)) > :lang(fil) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(fr), :not(:lang(fr)) > :lang(fr) { quotes: '\00ab' '\00bb' '\00ab' '\00bb' } /* « » « » */
+:root:lang(fr-CA), :not(:lang(fr-CA)) > :lang(fr-CA) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(fr-CH), :not(:lang(fr-CH)) > :lang(fr-CH) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(ga), :not(:lang(ga)) > :lang(ga) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(gd), :not(:lang(gd)) > :lang(gd) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(gl), :not(:lang(gl)) > :lang(gl) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(gsw), :not(:lang(gsw)) > :lang(gsw) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(gu), :not(:lang(gu)) > :lang(gu) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(guz), :not(:lang(guz)) > :lang(guz) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ha), :not(:lang(ha)) > :lang(ha) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(he), :not(:lang(he)) > :lang(he) { quotes: '\05f4' '\05f4' '\05f3' '\05f3' } /* ״ ״ ׳ ׳ */
+:root:lang(hi), :not(:lang(hi)) > :lang(hi) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(hr), :not(:lang(hr)) > :lang(hr) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(hsb), :not(:lang(hsb)) > :lang(hsb) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(hu), :not(:lang(hu)) > :lang(hu) { quotes: '\201e' '\201d' '\00bb' '\00ab' } /* „ ” » « */
+:root:lang(hy), :not(:lang(hy)) > :lang(hy) { quotes: '\00ab' '\00bb' '\00ab' '\00bb' } /* « » « » */
+:root:lang(id), :not(:lang(id)) > :lang(id) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ig), :not(:lang(ig)) > :lang(ig) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(is), :not(:lang(is)) > :lang(is) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(it), :not(:lang(it)) > :lang(it) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(ja), :not(:lang(ja)) > :lang(ja) { quotes: '\300c' '\300d' '\300e' '\300f' } /* 「 」 『 』 */
+:root:lang(jgo), :not(:lang(jgo)) > :lang(jgo) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(jmc), :not(:lang(jmc)) > :lang(jmc) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ka), :not(:lang(ka)) > :lang(ka) { quotes: '\201e' '\201c' '\00ab' '\00bb' } /* „ “ « » */
+:root:lang(kab), :not(:lang(kab)) > :lang(kab) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(kam), :not(:lang(kam)) > :lang(kam) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(kde), :not(:lang(kde)) > :lang(kde) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(kea), :not(:lang(kea)) > :lang(kea) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(khq), :not(:lang(khq)) > :lang(khq) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ki), :not(:lang(ki)) > :lang(ki) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(kk), :not(:lang(kk)) > :lang(kk) { quotes: '\201c' '\0022' '\2018' '\2019' } /* “ " ‘ ’ */
+:root:lang(kkj), :not(:lang(kkj)) > :lang(kkj) { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
+:root:lang(kln), :not(:lang(kln)) > :lang(kln) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(km), :not(:lang(km)) > :lang(km) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(kn), :not(:lang(kn)) > :lang(kn) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ko), :not(:lang(ko)) > :lang(ko) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ksb), :not(:lang(ksb)) > :lang(ksb) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ksf), :not(:lang(ksf)) > :lang(ksf) { quotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » ‘ ’ */
+:root:lang(ky), :not(:lang(ky)) > :lang(ky) { quotes: '\00ab' '\00bb' '\201e' '\201c' } /* « » „ “ */
+:root:lang(lag), :not(:lang(lag)) > :lang(lag) { quotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” ’ ’ */
+:root:lang(lb), :not(:lang(lb)) > :lang(lb) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(lg), :not(:lang(lg)) > :lang(lg) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ln), :not(:lang(ln)) > :lang(ln) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(lo), :not(:lang(lo)) > :lang(lo) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(lt), :not(:lang(lt)) > :lang(lt) { quotes: '\201e' '\201c' '\201e' '\201c' } /* „ “ „ “ */
+:root:lang(lu), :not(:lang(lu)) > :lang(lu) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(luo), :not(:lang(luo)) > :lang(luo) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(luy), :not(:lang(luy)) > :lang(luy) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(lv), :not(:lang(lv)) > :lang(lv) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mas), :not(:lang(mas)) > :lang(mas) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mer), :not(:lang(mer)) > :lang(mer) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mfe), :not(:lang(mfe)) > :lang(mfe) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mg), :not(:lang(mg)) > :lang(mg) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(mgo), :not(:lang(mgo)) > :lang(mgo) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mk), :not(:lang(mk)) > :lang(mk) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(ml), :not(:lang(ml)) > :lang(ml) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mn), :not(:lang(mn)) > :lang(mn) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mr), :not(:lang(mr)) > :lang(mr) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ms), :not(:lang(ms)) > :lang(ms) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mt), :not(:lang(mt)) > :lang(mt) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(mua), :not(:lang(mua)) > :lang(mua) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(my), :not(:lang(my)) > :lang(my) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(naq), :not(:lang(naq)) > :lang(naq) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(nb), :not(:lang(nb)) > :lang(nb) { quotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » ‘ ’ */
+:root:lang(nd), :not(:lang(nd)) > :lang(nd) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ne), :not(:lang(ne)) > :lang(ne) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(nl), :not(:lang(nl)) > :lang(nl) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(nmg), :not(:lang(nmg)) > :lang(nmg) { quotes: '\201e' '\201d' '\00ab' '\00bb' } /* „ ” « » */
+:root:lang(nn), :not(:lang(nn)) > :lang(nn) { quotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » ‘ ’ */
+:root:lang(nnh), :not(:lang(nnh)) > :lang(nnh) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(nus), :not(:lang(nus)) > :lang(nus) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(nyn), :not(:lang(nyn)) > :lang(nyn) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(pa), :not(:lang(pa)) > :lang(pa) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(pl), :not(:lang(pl)) > :lang(pl) { quotes: '\201e' '\201d' '\00ab' '\00bb' } /* „ ” « » */
+:root:lang(pt), :not(:lang(pt)) > :lang(pt) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(pt-PT), :not(:lang(pt-PT)) > :lang(pt-PT) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(rn), :not(:lang(rn)) > :lang(rn) { quotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” ’ ’ */
+:root:lang(ro), :not(:lang(ro)) > :lang(ro) { quotes: '\201c' '\201d' '\00ab' '\00bb' } /* “ ” « » */
+:root:lang(rof), :not(:lang(rof)) > :lang(rof) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ru), :not(:lang(ru)) > :lang(ru) { quotes: '\00ab' '\00bb' '\201e' '\201c' } /* « » „ “ */
+:root:lang(rw), :not(:lang(rw)) > :lang(rw) { quotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » ‘ ’ */
+:root:lang(rwk), :not(:lang(rwk)) > :lang(rwk) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(saq), :not(:lang(saq)) > :lang(saq) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(sbp), :not(:lang(sbp)) > :lang(sbp) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(seh), :not(:lang(seh)) > :lang(seh) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ses), :not(:lang(ses)) > :lang(ses) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(sg), :not(:lang(sg)) > :lang(sg) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(shi), :not(:lang(shi)) > :lang(shi) { quotes: '\00ab' '\00bb' '\201e' '\201d' } /* « » „ ” */
+:root:lang(shi-Latn), :not(:lang(shi-Latn)) > :lang(shi-Latn) { quotes: '\00ab' '\00bb' '\201e' '\201d' } /* « » „ ” */
+:root:lang(si), :not(:lang(si)) > :lang(si) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(sk), :not(:lang(sk)) > :lang(sk) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(sl), :not(:lang(sl)) > :lang(sl) { quotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ ‚ ‘ */
+:root:lang(sn), :not(:lang(sn)) > :lang(sn) { quotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” ’ ’ */
+:root:lang(so), :not(:lang(so)) > :lang(so) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(sq), :not(:lang(sq)) > :lang(sq) { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
+:root:lang(sr), :not(:lang(sr)) > :lang(sr) { quotes: '\201e' '\201c' '\2018' '\2018' } /* „ “ ‘ ‘ */
+:root:lang(sr-Latn), :not(:lang(sr-Latn)) > :lang(sr-Latn) { quotes: '\201e' '\201c' '\2018' '\2018' } /* „ “ ‘ ‘ */
+:root:lang(sv), :not(:lang(sv)) > :lang(sv) { quotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” ’ ’ */
+:root:lang(sw), :not(:lang(sw)) > :lang(sw) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(swc), :not(:lang(swc)) > :lang(swc) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ta), :not(:lang(ta)) > :lang(ta) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(te), :not(:lang(te)) > :lang(te) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(teo), :not(:lang(teo)) > :lang(teo) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(th), :not(:lang(th)) > :lang(th) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(ti-ER), :not(:lang(ti-ER)) > :lang(ti-ER) { quotes: '\2018' '\2019' '\201c' '\201d' } /* ‘ ’ “ ” */
+:root:lang(to), :not(:lang(to)) > :lang(to) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(tr), :not(:lang(tr)) > :lang(tr) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(twq), :not(:lang(twq)) > :lang(twq) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(tzm), :not(:lang(tzm)) > :lang(tzm) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(uk), :not(:lang(uk)) > :lang(uk) { quotes: '\00ab' '\00bb' '\201e' '\201c' } /* « » „ “ */
+:root:lang(ur), :not(:lang(ur)) > :lang(ur) { quotes: '\201d' '\201c' '\2019' '\2018' } /* ” “ ’ ‘ */
+:root:lang(ur-IN), :not(:lang(ur-IN)) > :lang(ur-IN) { quotes: '\0022' '\0022' '\0027' '\0027' } /* " " ' ' */
+:root:lang(uz), :not(:lang(uz)) > :lang(uz) { quotes: '\0022' '\0022' '\0027' '\0027' } /* " " ' ' */
+:root:lang(uz-Cyrl), :not(:lang(uz-Cyrl)) > :lang(uz-Cyrl) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(vai), :not(:lang(vai)) > :lang(vai) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(vai-Latn), :not(:lang(vai-Latn)) > :lang(vai-Latn) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(vi), :not(:lang(vi)) > :lang(vi) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(vun), :not(:lang(vun)) > :lang(vun) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(xog), :not(:lang(xog)) > :lang(xog) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(yav), :not(:lang(yav)) > :lang(yav) { quotes: '\00ab' '\00bb' '\00ab' '\00bb' } /* « » « » */
+:root:lang(yo), :not(:lang(yo)) > :lang(yo) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(zgh), :not(:lang(zgh)) > :lang(zgh) { quotes: '\00ab' '\00bb' '\201e' '\201d' } /* « » „ ” */
+:root:lang(zh), :not(:lang(zh)) > :lang(zh) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
+:root:lang(zh-Hant), :not(:lang(zh-Hant)) > :lang(zh-Hant) { quotes: '\300c' '\300d' '\300e' '\300f' } /* 「 」 『 』 */
+:root:lang(zu), :not(:lang(zu)) > :lang(zu) { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
diff --git a/resources/servo.css b/resources/servo.css
new file mode 100644
index 00000000000..77d05782725
--- /dev/null
+++ b/resources/servo.css
@@ -0,0 +1,13 @@
+input, select { display: inline-block; }
+input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: nowrap; }
+input[type="button"],
+input[type="submit"],
+input[type="reset"] { background: lightgrey; border-top: solid 1px #EEEEEE; border-left: solid 1px #CCCCCC; border-right: solid 1px #999999; border-bottom: solid 1px #999999; text-align: center; vertical-align: middle; color: black; }
+input[type="hidden"] { display: none !important }
+input[type="checkbox"],
+input[type="radio"] { font-family: monospace !important; border: none !important; background: transparent; }
+
+input[type="checkbox"]::before { content: "[ ]"; padding: 0; }
+input[type="checkbox"][checked]::before { content: "[✓]"; }
+input[type="radio"]::before { content: "( )"; padding: 0; }
+input[type="radio"][checked]::before { content: "(●)"; }
diff --git a/resources/user-agent.css b/resources/user-agent.css
index 209bafa4c2e..8ae8f5a5960 100644
--- a/resources/user-agent.css
+++ b/resources/user-agent.css
@@ -1,130 +1,276 @@
-html, address,
-blockquote,
-body, div,
-dt, fieldset, form,
-frame, frameset,
-h1, h2, h3, h4,
-h5, h6, noframes,
-center, dir,
-hr, menu, pre { display: block; unicode-bidi: embed }
- head, noscript { display: none }
- table { display: table }
- tr { display: table-row }
- thead { display: table-header-group }
- tbody { display: table-row-group }
- tfoot { display: table-footer-group }
- col { display: table-column }
- colgroup { display: table-column-group }
- td, th { display: table-cell }
- caption { display: table-caption }
- th { font-weight: bolder; text-align: center }
- caption { text-align: center }
- body { margin: 8px }
- h1 { font-size: 2em; margin: .67em 0 }
- h2 { font-size: 1.5em; margin: .75em 0 }
- h3 { font-size: 1.17em; margin: .83em 0 }
-h4,
-blockquote,
-fieldset, dir,
-menu { margin: 1.12em 0 }
- h5 { font-size: .83em; margin: 1.5em 0 }
- h6 { font-size: .75em; margin: 1.67em 0 }
-h1, h2, h3, h4,
-h5, h6, b,
- strong { font-weight: bolder }
- blockquote { margin-left: 40px; margin-right: 40px }
-i, cite, em,
- var, address { font-style: italic }
-pre, tt, code,
- kbd, samp { font-family: monospace }
- pre { white-space: pre }
-button, textarea,
- input, select { display: inline-block }
- big { font-size: 1.17em }
- small, sub, sup { font-size: .83em }
- sub { vertical-align: sub }
- sup { vertical-align: super }
- table { border-spacing: 2px; }
-thead, tbody,
- tfoot { vertical-align: middle }
- td, th, tr { vertical-align: inherit }
- s, strike, del { text-decoration: line-through }
- hr { border: 1px inset }
-
-/* lists */
-dd { display: block; margin-left: 40px }
-p, dl, multicol { display: block; margin: 1em 0 }
-ul { display: block; list-style-type: disc;
- margin: 1em 0; padding-left: 40px }
-
-ol { display: block; list-style-type: decimal;
- margin: 1em 0; padding-left: 40px }
-
-li { display: list-item }
-
-/* nested lists have no top/bottom margins */
-ul ul, ul ol, ul dl,
-ol ul, ol ol, ol dl,
-dl ul, dl ol, dl dl { margin-top: 0; margin-bottom: 0 }
-
-/* 2 deep unordered lists use a circle */
-ol ul, ul ul { list-style-type: circle; }
-
-/* 3 deep (or more) unordered lists use a square */
-ol ol ul, ol ul ul,
-ul ol ul, ul ul ul { list-style-type: square; }
-
-/* The type attribute on ol and ul elements */
-ul[type="disc"] { list-style-type: disc; }
-ul[type="circle"] { list-style-type: circle; }
-ul[type="square"] { list-style-type: square; }
-ol[type="1"] { list-style-type: decimal; }
-ol[type="a"] { list-style-type: lower-alpha; }
-ol[type="A"] { list-style-type: upper-alpha; }
-ol[type="i"] { list-style-type: lower-roman; }
-ol[type="I"] { list-style-type: upper-roman; }
-
-u, ins { text-decoration: underline }
-br:before { content: "\A"; white-space: pre }
-
-center { text-align: center }
-a:link,
-a:visited,
-area:link,
-area:visited,
-link:link,
-link:visited { text-decoration: underline }
-:focus { outline: thin dotted invert }
-
-/* Begin bidirectionality settings (do not change) */
-BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override }
-BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override }
-
-*[DIR="ltr"] { direction: ltr; unicode-bidi: embed }
-*[DIR="rtl"] { direction: rtl; unicode-bidi: embed }
-
-@media print {
-h1 { page-break-before: always }
-h1, h2, h3,
-h4, h5, h6 { page-break-after: avoid }
-ul, ol, dl { page-break-before: avoid }
-}
-
-/* Servo additions */
-a:link,
-area:link,
-link:link { color: blue }
-script { display: none }
-style { display: none }
-input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: nowrap; }
-input[type="button"],
-input[type="submit"],
-input[type="reset"] { background: lightgrey; border-top: solid 1px #EEEEEE; border-left: solid 1px #CCCCCC; border-right: solid 1px #999999; border-bottom: solid 1px #999999; text-align: center; vertical-align: middle; color: black; }
-input[type="hidden"] { display: none !important }
-input[type="checkbox"],
-input[type="radio"] { font-family: monospace !important; border: none !important; background: transparent; }
-
-input[type="checkbox"]::before { content: "[ ]"; padding: 0; }
-input[type="checkbox"][checked]::before { content: "[✓]"; }
-input[type="radio"]::before { content: "( )"; padding: 0; }
-input[type="radio"][checked]::before { content: "(●)"; }
+/*
+https://html.spec.whatwg.org/multipage/rendering.html#form-controls
+*/
+
+@namespace url(http://www.w3.org/1999/xhtml);
+
+/*
+FIXME: Uncomment this when :lang() is supported, or do something equivalent.
+@import url(quotes.css);
+*/
+
+[hidden], area, base, basefont, datalist, head, link, menu[type=popup i], meta,
+noembed, noframes, param, rp, script, source, style, template, track, title {
+ display: none;
+}
+
+embed[hidden] { display: inline; height: 0; width: 0; }
+
+/* FIXME: only if scripting is enabled */
+noscript { display: none !important; }
+
+input[type=hidden i] { display: none !important; }
+
+
+html, body { display: block; }
+
+body { margin: 8px; }
+
+
+address, blockquote, center, div, figure, figcaption, footer, form, header, hr,
+legend, listing, main, p, plaintext, pre, summary, xmp {
+ display: block;
+}
+
+blockquote, figure, listing, p, plaintext, pre, xmp {
+ margin-top: 1em; margin-bottom: 1em;
+}
+
+blockquote, figure { margin-left: 40px; margin-right: 40px; }
+
+address { font-style: italic; }
+listing, plaintext, pre, xmp {
+ font-family: monospace; white-space: pre;
+}
+
+dialog:not([open]) { display: none; }
+dialog {
+ position: absolute;
+ left: 0; right: 0;
+ /* FIXME: support fit-content */
+ width: fit-content;
+ height: fit-content;
+ margin: auto;
+ border: solid;
+ padding: 1em;
+ background: white;
+ color: black;
+}
+/* FIXME: support ::backdrop */
+dialog::backdrop {
+ position: fixed;
+ top: 0; right: 0; bottom: 0; left: 0;
+ background: rgba(0,0,0,0.1);
+}
+
+/* for small devices, modal dialogs go full-screen */
+@media screen and (max-width: 540px) {
+ /* FIXME: support :modal */
+ dialog:modal {
+ top: 0;
+ width: auto;
+ margin: 1em;
+ }
+}
+
+
+cite, dfn, em, i, var { font-style: italic; }
+b, strong { font-weight: bolder; }
+code, kbd, samp, tt { font-family: monospace; }
+big { font-size: larger; }
+small { font-size: smaller; }
+
+sub { vertical-align: sub; }
+sup { vertical-align: super; }
+sub, sup { line-height: normal; font-size: smaller; }
+
+ruby { display: ruby; }
+rt { display: ruby-text; }
+
+:link { color: #0000EE; }
+:visited { color: #551A8B; }
+:link, :visited { text-decoration: underline; }
+a:link[rel~=help], a:visited[rel~=help],
+area:link[rel~=help], area:visited[rel~=help] { cursor: help; }
+
+:focus { outline: thin dotted; } /* FIXME: 'outline: auto' ? */
+
+mark { background: yellow; color: black; }
+
+abbr[title], acronym[title] { text-decoration: dotted underline; }
+ins, u { text-decoration: underline; }
+del, s, strike { text-decoration: line-through; }
+blink { text-decoration: blink; }
+
+q::before { content: open-quote; }
+q::after { content: close-quote; }
+
+/*br { display-outside: newline; } /* this also has bidi implications */
+br::before { content: "\A"; white-space: pre }
+
+nobr { white-space: nowrap; }
+wbr { display-outside: break-opportunity; } /* this also has bidi implications */
+nobr wbr { white-space: normal; }
+
+
+[dir]:dir(ltr), bdi:dir(ltr), input[type=tel]:dir(ltr) { direction: ltr; }
+[dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }
+
+address, blockquote, center, div, figure, figcaption, footer, form, header, hr,
+legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2,
+h3, h4, h5, h6, hgroup, nav, section, table, caption, colgroup, col, thead,
+tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, bdi, output,
+[dir=ltr i], [dir=rtl i], [dir=auto i] {
+ unicode-bidi: isolate;
+}
+
+bdo, bdo[dir] { unicode-bidi: isolate-override; }
+
+textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }
+
+
+article, aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section {
+ display: block;
+}
+
+h1 { margin-top: 0.67em; margin-bottom: 0.67em; font-size: 2.00em; font-weight: bold; }
+h2 { margin-top: 0.83em; margin-bottom: 0.83em; font-size: 1.50em; font-weight: bold; }
+h3 { margin-top: 1.00em; margin-bottom: 1.00em; font-size: 1.17em; font-weight: bold; }
+h4 { margin-top: 1.33em; margin-bottom: 1.33em; font-size: 1.00em; font-weight: bold; }
+h5 { margin-top: 1.67em; margin-bottom: 1.67em; font-size: 0.83em; font-weight: bold; }
+h6 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; font-weight: bold; }
+
+:matches(article, aside, nav, section) h1 { margin-top: 0.83em; margin-bottom: 0.83em; font-size: 1.50em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) h1 { margin-top: 1.00em; margin-bottom: 1.00em; font-size: 1.17em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1 { margin-top: 1.33em; margin-bottom: 1.33em; font-size: 1.00em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1 { margin-top: 1.67em; margin-bottom: 1.67em; font-size: 0.83em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; }
+
+:matches(article, aside, nav, section) hgroup > h1 ~ h2 { margin-top: 1.00em; margin-bottom: 1.00em; font-size: 1.17em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) hgroup > h1 ~ h2 { margin-top: 1.33em; margin-bottom: 1.33em; font-size: 1.00em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) hgroup > h1 ~ h2 { margin-top: 1.67em; margin-bottom: 1.67em; font-size: 0.83em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) hgroup > h1 ~ h2 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; }
+
+:matches(article, aside, nav, section) hgroup > h1 ~ h3 { margin-top: 1.33em; margin-bottom: 1.33em; font-size: 1.00em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) hgroup > h1 ~ h3 { margin-top: 1.67em; margin-bottom: 1.67em; font-size: 0.83em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) hgroup > h1 ~ h3 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; }
+
+:matches(article, aside, nav, section) hgroup > h1 ~ h4 { margin-top: 1.67em; margin-bottom: 1.67em; font-size: 0.83em; }
+:matches(article, aside, nav, section) :matches(article, aside, nav, section) hgroup > h1 ~ h4 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; }
+
+:matches(article, aside, nav, section) hgroup > h1 ~ h5 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; }
+
+
+dir, dd, dl, dt, menu, ol, ul { display: block; }
+li { display: list-item; }
+
+dir, dl, menu, ol, ul { margin-top: 1em; margin-bottom: 1em; }
+
+:matches(dir, dl, menu, ol, ul) :matches(dir, dl, menu, ol, ul) {
+ margin-top: 0; margin-bottom: 0;
+}
+
+dd { margin-left: 40px; } /* FIXME: use margin-inline-start when supported */
+dir, menu, ol, ul { padding-left: 40px; } /* FIXME: use padding-inline-start when supported */
+
+ol { list-style-type: decimal; }
+
+dir, menu, ul { list-style-type: disc; }
+
+:matches(dir, menu, ol, ul) :matches(dir, menu, ul) {
+ list-style-type: circle;
+}
+
+:matches(dir, menu, ol, ul) :matches(dir, menu, ol, ul) :matches(dir, menu, ul) {
+ list-style-type: square;
+}
+
+
+table { display: table; }
+caption { display: table-caption; }
+colgroup, colgroup[hidden] { display: table-column-group; }
+col, col[hidden] { display: table-column; }
+thead, thead[hidden] { display: table-header-group; }
+tbody, tbody[hidden] { display: table-row-group; }
+tfoot, tfoot[hidden] { display: table-footer-group; }
+tr, tr[hidden] { display: table-row; }
+td, th, td[hidden], th[hidden] { display: table-cell; }
+
+colgroup[hidden], col[hidden], thead[hidden], tbody[hidden],
+tfoot[hidden], tr[hidden], td[hidden], th[hidden] {
+ visibility: collapse;
+}
+
+table {
+ box-sizing: border-box;
+ border-spacing: 2px;
+ border-collapse: separate;
+ text-indent: initial;
+}
+td, th { padding: 1px; }
+th { font-weight: bold; }
+
+thead, tbody, tfoot, table > tr { vertical-align: middle; }
+tr, td, th { vertical-align: inherit; }
+
+
+table, td, th { border-color: gray; }
+thead, tbody, tfoot, tr { border-color: inherit; }
+table:matches(
+ [rules=none i], [rules=groups i], [rules=rows i],
+ [rules=cols i], [rules=all i],
+ [frame=void i], [frame=above i], [frame=below i],
+ [frame=hsides i], [frame=lhs i], [frame=rhs i],
+ [frame=vsides i], [frame=box i], [frame=border i]
+),
+table:matches(
+ [rules=none i], [rules=groups i], [rules=rows i],
+ [rules=cols i], [rules=all i]
+) > tr > :matches(td, th),
+table:matches(
+ [rules=none i], [rules=groups i], [rules=rows i],
+ [rules=cols i], [rules=all i]
+) > :matches(thead, tbody, tfoot) > tr > :matches(td, th) {
+ border-color: black;
+}
+
+
+:matches(table, thead, tbody, tfoot, tr) > form {
+ display: none !important;
+}
+
+
+input, select, option, optgroup, button, textarea, keygen {
+ text-indent: initial;
+}
+
+textarea { white-space: pre-wrap; }
+
+input[type="radio"], input[type="checkbox"], input[type="reset"], input[type="button"],
+input[type="submit"], select, button {
+ box-sizing: border-box;
+}
+
+
+hr { color: gray; border-style: inset; border-width: 1px; margin: 0.5em auto; }
+
+
+fieldset {
+ display: block; /* https://www.w3.org/Bugs/Public/show_bug.cgi?id=27018 */
+ margin-left: 2px; margin-right: 2px;
+ border: groove 2px;
+ border-color: ThreeDFace; /* FIXME: system color */
+ padding: 0.35em 0.625em 0.75em;
+ min-width: min-content;
+}
+
+legend {
+ padding-left: 2px; padding-right: 2px;
+}
+
+iframe:not([seamless]) { border: 2px inset; }
+iframe[seamless] { display: block; }
+video { object-fit: contain; }
+
+
+textarea { white-space: pre-wrap; }
diff --git a/tests/ref/attr_selector_case_sensitivity.html b/tests/ref/attr_selector_case_sensitivity.html
new file mode 100644
index 00000000000..c4d36db7918
--- /dev/null
+++ b/tests/ref/attr_selector_case_sensitivity.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Attribute selector case-sensitivity: [foo=bar] and [foo=bar i]</title>
+ <style>
+ p[data-foo=Bar] { color: green }
+ p[data-foo=bar] { color: red }
+ p[data-foo=baz i] { color: green }
+ p[data-foo=baz] { color: red }
+ </style>
+ </head>
+ <body>
+ <p data-foo="Bar">This text should be green.</p>
+ <p data-foo="Baz">This text should be green.</p>
+ <p>This text should be black.</p>
+ </body>
+</html>
diff --git a/tests/ref/attr_selector_case_sensitivity_ref.html b/tests/ref/attr_selector_case_sensitivity_ref.html
new file mode 100644
index 00000000000..9e9be12d13e
--- /dev/null
+++ b/tests/ref/attr_selector_case_sensitivity_ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Attribute selector case-sensitivity: [foo=bar] and [foo=bar i]</title>
+ <style>
+ p[data-foo=Bar] { color: green }
+ p[data-foo=bar] { color: red }
+ p[data-foo=baz i] { color: green }
+ p[data-foo=baz] { color: red }
+ </style>
+ </head>
+ <body>
+ <p style="color: green">This text should be green.</p>
+ <p style="color: green">This text should be green.</p>
+ <p>This text should be black.</p>
+ </body>
+</html>
diff --git a/tests/ref/basic.list b/tests/ref/basic.list
index 2da73aac7c9..18b09f45bfe 100644
--- a/tests/ref/basic.list
+++ b/tests/ref/basic.list
@@ -30,6 +30,7 @@
# inline_border_a.html inline_border_b.html
== anon_block_inherit_a.html anon_block_inherit_b.html
== attr_exists_selector.html attr_exists_selector_ref.html
+== attr_selector_case_sensitivity.html attr_selector_case_sensitivity_ref.html
!= noteq_attr_exists_selector.html attr_exists_selector_ref.html
== data_img_a.html data_img_b.html
== background_style_attr.html background_ref.html
@@ -62,6 +63,7 @@
== position_fixed_overflow_a.html position_fixed_overflow_b.html
== position_fixed_tile_edge.html position_fixed_tile_edge_ref.html
== position_fixed_tile_edge_2.html position_fixed_tile_edge_ref.html
+== position_fixed_tile_edge_3.html position_fixed_tile_edge_ref.html
== position_relative_a.html position_relative_b.html
== position_relative_top_percentage_a.html position_relative_top_percentage_b.html
== background_none_a.html background_none_b.html
diff --git a/tests/ref/iframe/multiple_external.html b/tests/ref/iframe/multiple_external.html
index 870bef5ba2d..7daac996435 100644
--- a/tests/ref/iframe/multiple_external.html
+++ b/tests/ref/iframe/multiple_external.html
@@ -7,6 +7,7 @@
float: left;
width: 300px;
height: 300px;
+ border: none;
}
</style>
</head>
diff --git a/tests/ref/iframe/overflow.html b/tests/ref/iframe/overflow.html
index 64456f1b418..405ee9fa8e6 100644
--- a/tests/ref/iframe/overflow.html
+++ b/tests/ref/iframe/overflow.html
@@ -1,7 +1,7 @@
<html>
<body>
<iframe src="data:text/html,%3Cdiv%20style%3D%22background%3Agreen%3B%20width%3A%20200px%3B%20height%3A%20200px%3B%22%3E%3C%2Fdiv%3E"
- style="display: block; width: 108px; height: 108px;">
+ style="display: block; width: 108px; height: 108px; border: none">
</iframe>
</div>
</body>
diff --git a/tests/ref/position_fixed_tile_edge_3.html b/tests/ref/position_fixed_tile_edge_3.html
new file mode 100644
index 00000000000..dcf2341c170
--- /dev/null
+++ b/tests/ref/position_fixed_tile_edge_3.html
@@ -0,0 +1,11 @@
+<html>
+ <body>
+ <div style="position: absolute; top: 0px; left: 0px;">
+ <div style="position: absolute; background: green; margin-left: 512px; width: 20px; height: 20px;"></div>
+
+ <!-- This position:fixed sibling should force its sibling to be layerized. -->
+ <div style="position: fixed;"></div>
+ </div>
+ </body>
+</html>
+
diff --git a/tests/ref/table_auto_width.html b/tests/ref/table_auto_width.html
index 39396bbb799..62f0def0086 100644
--- a/tests/ref/table_auto_width.html
+++ b/tests/ref/table_auto_width.html
@@ -6,7 +6,7 @@
<table>
<tbody>
<tr>
- <td>
+ <td style="padding: 0">
<span>12345<span>67890</span></span>
</td>
</tr>
diff --git a/tests/ref/table_auto_width_ref.html b/tests/ref/table_auto_width_ref.html
index 1a90aab518e..0cb28c3ef1e 100644
--- a/tests/ref/table_auto_width_ref.html
+++ b/tests/ref/table_auto_width_ref.html
@@ -6,7 +6,7 @@
<table>
<tbody>
<tr>
- <td>
+ <td style="padding: 0">
<span>1234567890</span>
</td>
</tr>
diff --git a/tests/ref/table_containing_block_a.html b/tests/ref/table_containing_block_a.html
index 1b33586f70c..6c3a4e02a4a 100644
--- a/tests/ref/table_containing_block_a.html
+++ b/tests/ref/table_containing_block_a.html
@@ -14,7 +14,7 @@
<table class="rel">
<tbody>
<tr class="abs">
- <td>Don't crash!</td>
+ <td style="padding: 0">Don't crash!</td>
</tr>
</tbody>
</table>
diff --git a/tests/ref/table_containing_block_ref.html b/tests/ref/table_containing_block_ref.html
index b4377f5e761..d59322ab8ec 100644
--- a/tests/ref/table_containing_block_ref.html
+++ b/tests/ref/table_containing_block_ref.html
@@ -6,7 +6,7 @@
<table>
<tbody>
<tr>
- <td>Don't crash!</td>
+ <td style="padding: 0">Don't crash!</td>
</tr>
</tbody>
</table>
diff --git a/tests/ref/table_padding_a.html b/tests/ref/table_padding_a.html
index a95ac820bff..5170b6d12b2 100644
--- a/tests/ref/table_padding_a.html
+++ b/tests/ref/table_padding_a.html
@@ -15,9 +15,11 @@
table {
background:green;
padding: 150px;
+ box-sizing: content-box;
}
th {
color: yellow;
+ padding: 0;
}
</style>
</head>
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index 2c8e63fc1b0..2b46a216624 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -8802,9 +8802,6 @@
[Navigator interface: attribute appVersion]
expected: FAIL
- [Navigator interface: attribute userAgent]
- expected: FAIL
-
[Navigator interface: attribute language]
expected: FAIL
@@ -8850,9 +8847,6 @@
[Navigator interface: window.navigator must inherit property "appVersion" with the proper type (2)]
expected: FAIL
- [Navigator interface: window.navigator must inherit property "userAgent" with the proper type (6)]
- expected: FAIL
-
[Navigator interface: window.navigator must inherit property "language" with the proper type (7)]
expected: FAIL
@@ -9405,9 +9399,6 @@
[WorkerNavigator interface: attribute appVersion]
expected: FAIL
- [WorkerNavigator interface: attribute userAgent]
- expected: FAIL
-
[WorkerNavigator interface: attribute language]
expected: FAIL