aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--components/script/dom/document.rs1
-rw-r--r--components/script/dom/element.rs6
-rw-r--r--components/script/dom/htmlstyleelement.rs1
-rw-r--r--components/script/dom/nodelist.rs23
-rw-r--r--components/script/dom/window.rs40
-rw-r--r--components/selectors/bloom.rs2
-rw-r--r--components/style/gecko/global_style_data.rs28
-rw-r--r--components/style/properties/helpers.mako.rs12
-rw-r--r--components/style/properties/helpers/animated_properties.mako.rs2
-rw-r--r--components/style/properties/longhand/box.mako.rs45
-rw-r--r--components/style/properties/longhand/inherited_svg.mako.rs23
-rw-r--r--components/style/properties/properties.mako.rs16
-rw-r--r--ports/geckolib/glue.rs9
-rw-r--r--tests/wpt/metadata-css/css-transitions-1_dev/html/transition-property-002.htm.ini3
-rw-r--r--tests/wpt/metadata/MANIFEST.json8
-rw-r--r--tests/wpt/metadata/html/browsers/browsing-the-web/scroll-to-fragid/003.html.ini4
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-append-to-child-document.html.ini4
-rw-r--r--tests/wpt/metadata/selectors/attribute-selectors/attribute-case/semantics.html.ini29
-rw-r--r--tests/wpt/metadata/selectors/attribute-selectors/attribute-case/syntax.html.ini218
-rw-r--r--tests/wpt/metadata/workers/Worker_ErrorEvent_error.htm.ini2
-rw-r--r--tests/wpt/metadata/workers/data-url.html.ini1
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json2
-rw-r--r--tests/wpt/mozilla/tests/mozilla/calc.html1
-rw-r--r--tests/wpt/web-platform-tests/cssom-view/elementScroll.html5
-rw-r--r--tests/wpt/web-platform-tests/cssom/style-sheet-interfaces-001.html11
-rw-r--r--tests/wpt/web-platform-tests/workers/Worker_ErrorEvent_error.htm4
-rw-r--r--tests/wpt/web-platform-tests/workers/data-url.html4
28 files changed, 141 insertions, 365 deletions
diff --git a/README.md b/README.md
index c1227f0b94a..dbab149c7f3 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ If you've already partially compiled servo but forgot to do this step, run `./ma
#### On Debian-based Linuxes
``` sh
-sudo apt install git curl freeglut3-dev autoconf \
+sudo apt install git curl freeglut3-dev autoconf libx11-dev \
libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
gperf g++ build-essential cmake virtualenv python-pip \
libssl1.0-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index d603d898f5c..c97d352872c 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -703,6 +703,7 @@ impl Document {
// Step 3
let global_scope = self.window.upcast::<GlobalScope>();
let webrender_pipeline_id = global_scope.pipeline_id().to_webrender();
+ self.window.update_viewport_for_scroll(x, y);
self.window.perform_a_scroll(x,
y,
ClipId::root_scroll_node(webrender_pipeline_id),
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index a431d0c9dbb..2c7372ebddf 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -1356,7 +1356,7 @@ impl Element {
// Step 10 (TODO)
// Step 11
- win.scroll_node(node.to_trusted_node_address(), x, y, behavior);
+ win.scroll_node(node, x, y, behavior);
}
// https://w3c.github.io/DOM-Parsing/#parsing
@@ -1798,7 +1798,7 @@ impl ElementMethods for Element {
// Step 10 (TODO)
// Step 11
- win.scroll_node(node.to_trusted_node_address(), self.ScrollLeft(), y, behavior);
+ win.scroll_node(node, self.ScrollLeft(), y, behavior);
}
// https://drafts.csswg.org/cssom-view/#dom-element-scrolltop
@@ -1891,7 +1891,7 @@ impl ElementMethods for Element {
// Step 10 (TODO)
// Step 11
- win.scroll_node(node.to_trusted_node_address(), x, self.ScrollTop(), behavior);
+ win.scroll_node(node, x, self.ScrollTop(), behavior);
}
// https://drafts.csswg.org/cssom-view/#dom-element-scrollwidth
diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs
index bf4266e1875..bbce33f3d52 100644
--- a/components/script/dom/htmlstyleelement.rs
+++ b/components/script/dom/htmlstyleelement.rs
@@ -111,6 +111,7 @@ impl HTMLStyleElement {
win.layout_chan().send(Msg::AddStylesheet(sheet.clone())).unwrap();
*self.stylesheet.borrow_mut() = Some(sheet);
+ self.cssom_stylesheet.set(None);
doc.invalidate_stylesheets();
}
diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs
index 39b4cc1c41e..31e4dfb40c8 100644
--- a/components/script/dom/nodelist.rs
+++ b/components/script/dom/nodelist.rs
@@ -103,11 +103,9 @@ impl NodeList {
}
}
- pub fn iter(&self) -> NodeListIterator {
- NodeListIterator {
- nodes: self,
- offset: 0,
- }
+ pub fn iter<'a>(&'a self) -> impl Iterator<Item=Root<Node>> + 'a {
+ let len = self.Length();
+ (0..len).flat_map(move |i| self.Item(i))
}
}
@@ -289,18 +287,3 @@ impl ChildrenList {
self.last_index.set(0u32);
}
}
-
-pub struct NodeListIterator<'a> {
- nodes: &'a NodeList,
- offset: u32,
-}
-
-impl<'a> Iterator for NodeListIterator<'a> {
- type Item = Root<Node>;
-
- fn next(&mut self) -> Option<Root<Node>> {
- let result = self.nodes.Item(self.offset);
- self.offset = self.offset + 1;
- result
- }
-}
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index d560c71b3ad..58f0e7b4a1a 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -13,7 +13,6 @@ use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
use dom::bindings::codegen::Bindings::EventHandlerBinding::OnBeforeUnloadEventHandlerNonNull;
use dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull;
use dom::bindings::codegen::Bindings::FunctionBinding::Function;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionState;
use dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
use dom::bindings::codegen::Bindings::WindowBinding::{self, FrameRequestCallback, WindowMethods};
@@ -1126,8 +1125,11 @@ impl Window {
//let document = self.Document();
// Step 12
let global_scope = self.upcast::<GlobalScope>();
- self.perform_a_scroll(x.to_f32().unwrap_or(0.0f32),
- y.to_f32().unwrap_or(0.0f32),
+ let x = x.to_f32().unwrap_or(0.0f32);
+ let y = y.to_f32().unwrap_or(0.0f32);
+ self.update_viewport_for_scroll(x, y);
+ self.perform_a_scroll(x,
+ y,
global_scope.pipeline_id().root_scroll_node(),
behavior,
None);
@@ -1158,9 +1160,6 @@ impl Window {
scroll_offset: Vector2D::new(-x, -y),
})).unwrap();
- // TODO (farodin91): Raise an event to stop the current_viewport
- self.update_viewport_for_scroll(x, y);
-
let global_scope = self.upcast::<GlobalScope>();
let message = ConstellationMsg::ScrollFragmentPoint(scroll_root_id, point, smooth);
global_scope.constellation_chan().send(message).unwrap();
@@ -1450,33 +1449,32 @@ impl Window {
}
pub fn scroll_offset_query(&self, node: &Node) -> Vector2D<f32> {
- let mut node = Root::from_ref(node);
- loop {
- if let Some(scroll_offset) = self.scroll_offsets
- .borrow()
- .get(&node.to_untrusted_node_address()) {
- return *scroll_offset
- }
- node = match node.GetParentNode() {
- Some(node) => node,
- None => break,
- }
+ if let Some(scroll_offset) = self.scroll_offsets
+ .borrow()
+ .get(&node.to_untrusted_node_address()) {
+ return *scroll_offset
}
- let vp_origin = self.current_viewport.get().origin;
- Vector2D::new(vp_origin.x.to_f32_px(), vp_origin.y.to_f32_px())
+ Vector2D::new(0.0, 0.0)
}
// https://drafts.csswg.org/cssom-view/#dom-element-scroll
pub fn scroll_node(&self,
- node: TrustedNodeAddress,
+ node: &Node,
x_: f64,
y_: f64,
behavior: ScrollBehavior) {
if !self.reflow(ReflowGoal::ForScriptQuery,
- ReflowQueryType::NodeScrollRootIdQuery(node),
+ ReflowQueryType::NodeScrollRootIdQuery(node.to_trusted_node_address()),
ReflowReason::Query) {
return;
}
+
+ // The scroll offsets are immediatly updated since later calls
+ // to topScroll and others may access the properties before
+ // webrender has a chance to update the offsets.
+ self.scroll_offsets.borrow_mut().insert(node.to_untrusted_node_address(),
+ Vector2D::new(x_ as f32, y_ as f32));
+
let NodeScrollRootIdResponse(scroll_root_id) = self.layout_rpc.node_scroll_root_id();
// Step 12
diff --git a/components/selectors/bloom.rs b/components/selectors/bloom.rs
index 8caab9935cb..0e8290fc8c9 100644
--- a/components/selectors/bloom.rs
+++ b/components/selectors/bloom.rs
@@ -7,7 +7,7 @@
use fnv::FnvHasher;
use std::hash::{Hash, Hasher};
-// The top 12 bits of the 32-bit hash value are not used by the bloom filter.
+// The top 8 bits of the 32-bit hash value are not used by the bloom filter.
// Consumers may rely on this to pack hashes more efficiently.
pub const BLOOM_HASH_MASK: u32 = 0x00ffffff;
const KEY_SIZE: usize = 12;
diff --git a/components/style/gecko/global_style_data.rs b/components/style/gecko/global_style_data.rs
index 0f80a18816e..f396a4ee451 100644
--- a/components/style/gecko/global_style_data.rs
+++ b/components/style/gecko/global_style_data.rs
@@ -16,12 +16,6 @@ use std::ffi::CString;
/// Global style data
pub struct GlobalStyleData {
- /// How many threads parallel styling can use.
- pub num_threads: usize,
-
- /// The parallel styling thread pool.
- pub style_thread_pool: Option<rayon::ThreadPool>,
-
/// Shared RWLock for CSSOM objects
pub shared_lock: SharedRwLock,
@@ -29,6 +23,15 @@ pub struct GlobalStyleData {
pub options: StyleSystemOptions,
}
+/// Global thread pool
+pub struct StyleThreadPool {
+ /// How many threads parallel styling can use.
+ pub num_threads: usize,
+
+ /// The parallel styling thread pool.
+ pub style_thread_pool: Option<rayon::ThreadPool>,
+}
+
fn thread_name(index: usize) -> String {
format!("StyleThread#{}", index)
}
@@ -53,8 +56,8 @@ fn thread_shutdown(_: usize) {
}
lazy_static! {
- /// Global style data
- pub static ref GLOBAL_STYLE_DATA: GlobalStyleData = {
+ /// Global thread pool
+ pub static ref STYLE_THREAD_POOL: StyleThreadPool = {
let stylo_threads = env::var("STYLO_THREADS")
.map(|s| s.parse::<usize>().expect("invalid STYLO_THREADS value"));
let mut num_threads = match stylo_threads {
@@ -93,11 +96,14 @@ lazy_static! {
pool
};
- GlobalStyleData {
+ StyleThreadPool {
num_threads: num_threads,
style_thread_pool: pool,
- shared_lock: SharedRwLock::new(),
- options: StyleSystemOptions::default(),
}
};
+ /// Global style data
+ pub static ref GLOBAL_STYLE_DATA: GlobalStyleData = GlobalStyleData {
+ shared_lock: SharedRwLock::new(),
+ options: StyleSystemOptions::default(),
+ };
}
diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs
index 54b5c313e36..8c6701497e4 100644
--- a/components/style/properties/helpers.mako.rs
+++ b/components/style/properties/helpers.mako.rs
@@ -9,7 +9,7 @@
<%def name="predefined_type(name, type, initial_value, parse_method='parse',
needs_context=True, vector=False, computed_type=None, initial_specified_value=None,
- allow_quirks=False, **kwargs)">
+ allow_quirks=False, allow_empty=False, **kwargs)">
<%def name="predefined_type_inner(name, type, initial_value, parse_method)">
#[allow(unused_imports)]
use app_units::Au;
@@ -27,7 +27,9 @@
pub use values::computed::${type} as T;
% endif
}
+ % if initial_value:
#[inline] pub fn get_initial_value() -> computed_value::T { ${initial_value} }
+ % endif
% if initial_specified_value:
#[inline] pub fn get_initial_specified_value() -> SpecifiedValue { ${initial_specified_value} }
% endif
@@ -46,7 +48,9 @@
}
</%def>
% if vector:
- <%call expr="vector_longhand(name, predefined_type=type, **kwargs)">
+ <%call
+ expr="vector_longhand(name, predefined_type=type, allow_empty=allow_empty or not initial_value, **kwargs)"
+ >
${predefined_type_inner(name, type, initial_value, parse_method)}
% if caller:
${caller.body()}
@@ -202,7 +206,7 @@
}
pub fn get_initial_value() -> computed_value::T {
- % if allow_empty:
+ % if allow_empty and allow_empty != "NotInitial":
computed_value::T(SmallVec::new())
% else:
let mut v = SmallVec::new();
@@ -333,7 +337,7 @@
let quirks_mode = context.quirks_mode;
::properties::substitute_variables_${property.ident}(
&declared_value, &custom_props,
- |value| {
+ &mut |value| {
if let Some(ref mut cascade_info) = *cascade_info {
cascade_info.on_cascade_property(&declaration,
&value);
diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs
index 3874f972a25..99b2cc377f6 100644
--- a/components/style/properties/helpers/animated_properties.mako.rs
+++ b/components/style/properties/helpers/animated_properties.mako.rs
@@ -582,7 +582,7 @@ impl AnimationValue {
&variables.url_data,
variables.from_shorthand,
&custom_props,
- |v| {
+ &mut |v| {
let declaration = match *v {
DeclaredValue::Value(value) => {
PropertyDeclaration::${prop.camel_case}(value.clone())
diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs
index 4f0449ad0bf..871eb37513d 100644
--- a/components/style/properties/longhand/box.mako.rs
+++ b/components/style/properties/longhand/box.mako.rs
@@ -429,17 +429,19 @@ ${helpers.predefined_type("transition-timing-function",
extra_prefixes="moz webkit",
spec="https://drafts.csswg.org/css-transitions/#propdef-transition-timing-function")}
-${helpers.predefined_type("transition-property",
- "TransitionProperty",
- "computed::TransitionProperty::All",
- initial_specified_value="specified::TransitionProperty::All",
- vector=True,
- allow_empty=True,
- need_index=True,
- needs_context=False,
- animation_value_type="none",
- extra_prefixes="moz webkit",
- spec="https://drafts.csswg.org/css-transitions/#propdef-transition-property")}
+${helpers.predefined_type(
+ "transition-property",
+ "TransitionProperty",
+ "computed::TransitionProperty::All",
+ initial_specified_value="specified::TransitionProperty::All",
+ vector=True,
+ allow_empty="NotInitial",
+ need_index=True,
+ needs_context=False,
+ animation_value_type="none",
+ extra_prefixes="moz webkit",
+ spec="https://drafts.csswg.org/css-transitions/#propdef-transition-property",
+)}
${helpers.predefined_type("transition-delay",
"Time",
@@ -668,16 +670,17 @@ ${helpers.predefined_type("scroll-snap-destination",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
animation_value_type="ComputedValue")}
-${helpers.predefined_type("scroll-snap-coordinate",
- "Position",
- "computed::Position::zero()",
- vector=True,
- products="gecko",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
- animation_value_type="ComputedValue",
- allow_empty=True,
- delegate_animate=True)}
-
+${helpers.predefined_type(
+ "scroll-snap-coordinate",
+ "Position",
+ "computed::Position::zero()",
+ vector=True,
+ products="gecko",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
+ animation_value_type="ComputedValue",
+ allow_empty="NotInitial",
+ delegate_animate=True,
+)}
<%helpers:longhand name="transform" extra_prefixes="webkit"
animation_value_type="ComputedValue"
diff --git a/components/style/properties/longhand/inherited_svg.mako.rs b/components/style/properties/longhand/inherited_svg.mako.rs
index 3799c89d3ad..1d7fd7a985a 100644
--- a/components/style/properties/longhand/inherited_svg.mako.rs
+++ b/components/style/properties/longhand/inherited_svg.mako.rs
@@ -88,17 +88,18 @@ ${helpers.predefined_type("stroke-opacity", "Opacity", "1.0",
products="gecko", animation_value_type="ComputedValue",
spec="https://www.w3.org/TR/SVG11/painting.html#StrokeOpacityProperty")}
-${helpers.predefined_type("stroke-dasharray",
- "LengthOrPercentageOrNumber",
- "Either::First(0.0)",
- "parse_non_negative",
- vector="True",
- delegate_animate="True",
- allow_empty="True",
- products="gecko",
- animation_value_type="ComputedValue",
- space_separated_allowed="True",
- spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing")}
+${helpers.predefined_type(
+ "stroke-dasharray",
+ "LengthOrPercentageOrNumber",
+ None,
+ "parse_non_negative",
+ vector=True,
+ delegate_animate=True,
+ products="gecko",
+ animation_value_type="ComputedValue",
+ space_separated_allowed="True",
+ spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing",
+)}
${helpers.predefined_type(
"stroke-dashoffset", "LengthOrPercentageOrNumber",
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index 390ad3d3c27..4507ea5119a 100644
--- a/components/style/properties/properties.mako.rs
+++ b/components/style/properties/properties.mako.rs
@@ -373,13 +373,13 @@ impl PropertyDeclarationIdSet {
value: &DeclaredValue<longhands::${property.ident}::SpecifiedValue>,
% endif
custom_properties: &Option<Arc<::custom_properties::ComputedValuesMap>>,
- f: F,
+ f: &mut F,
error_reporter: &ParseErrorReporter,
quirks_mode: QuirksMode)
% if property.boxed:
- where F: FnOnce(&DeclaredValue<Box<longhands::${property.ident}::SpecifiedValue>>)
+ where F: FnMut(&DeclaredValue<Box<longhands::${property.ident}::SpecifiedValue>>)
% else:
- where F: FnOnce(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>)
+ where F: FnMut(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>)
% endif
{
if let DeclaredValue::WithVariables(ref with_variables) = *value {
@@ -404,13 +404,13 @@ impl PropertyDeclarationIdSet {
url_data: &UrlExtraData,
from_shorthand: Option<ShorthandId>,
custom_properties: &Option<Arc<::custom_properties::ComputedValuesMap>>,
- f: F,
+ f: &mut F,
error_reporter: &ParseErrorReporter,
quirks_mode: QuirksMode)
% if property.boxed:
- where F: FnOnce(&DeclaredValue<Box<longhands::${property.ident}::SpecifiedValue>>)
+ where F: FnMut(&DeclaredValue<Box<longhands::${property.ident}::SpecifiedValue>>)
% else:
- where F: FnOnce(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>)
+ where F: FnMut(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>)
% endif
{
f(&
@@ -1765,7 +1765,9 @@ pub mod style_structs {
/// Returns whether there are any transitions specified.
#[cfg(feature = "servo")]
pub fn specifies_transitions(&self) -> bool {
- self.transition_property_count() > 0
+ self.transition_duration_iter()
+ .take(self.transition_property_count())
+ .any(|t| t.seconds() > 0.)
}
% endif
}
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 5ef3d30e354..f9f57cb48c3 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -19,7 +19,7 @@ use style::element_state::ElementState;
use style::error_reporting::RustLogReporter;
use style::font_metrics::{FontMetricsProvider, get_metrics_provider_for_product};
use style::gecko::data::{PerDocumentStyleData, PerDocumentStyleDataImpl};
-use style::gecko::global_style_data::{GLOBAL_STYLE_DATA, GlobalStyleData};
+use style::gecko::global_style_data::{GLOBAL_STYLE_DATA, GlobalStyleData, STYLE_THREAD_POOL};
use style::gecko::restyle_damage::GeckoRestyleDamage;
use style::gecko::selector_parser::PseudoElement;
use style::gecko::traversal::RecalcStyleOnly;
@@ -227,7 +227,8 @@ fn traverse_subtree(element: GeckoElement,
debug!("Traversing subtree:");
debug!("{:?}", ShowSubtreeData(element.as_node()));
- let traversal_driver = if global_style_data.style_thread_pool.is_none() || !element.is_root() {
+ let style_thread_pool = &*STYLE_THREAD_POOL;
+ let traversal_driver = if style_thread_pool.style_thread_pool.is_none() || !element.is_root() {
TraversalDriver::Sequential
} else {
TraversalDriver::Parallel
@@ -236,7 +237,7 @@ fn traverse_subtree(element: GeckoElement,
let traversal = RecalcStyleOnly::new(shared_style_context, traversal_driver);
if traversal_driver.is_parallel() {
parallel::traverse_dom(&traversal, element, token,
- global_style_data.style_thread_pool.as_ref().unwrap());
+ style_thread_pool.style_thread_pool.as_ref().unwrap());
} else {
sequential::traverse_dom(&traversal, element, token);
}
@@ -729,7 +730,7 @@ pub extern "C" fn Servo_Property_IsDiscreteAnimatable(property: nsCSSPropertyID)
#[no_mangle]
pub extern "C" fn Servo_StyleWorkerThreadCount() -> u32 {
- GLOBAL_STYLE_DATA.num_threads as u32
+ STYLE_THREAD_POOL.num_threads as u32
}
#[no_mangle]
diff --git a/tests/wpt/metadata-css/css-transitions-1_dev/html/transition-property-002.htm.ini b/tests/wpt/metadata-css/css-transitions-1_dev/html/transition-property-002.htm.ini
index 701a4cb902f..746ea201c4c 100644
--- a/tests/wpt/metadata-css/css-transitions-1_dev/html/transition-property-002.htm.ini
+++ b/tests/wpt/metadata-css/css-transitions-1_dev/html/transition-property-002.htm.ini
@@ -6,6 +6,3 @@
[parse 'all, none']
expected: FAIL
- [parse 'initial']
- expected: FAIL
-
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index a7628638b6f..bb4ad32115b 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -553578,7 +553578,7 @@
"testharness"
],
"cssom-view/elementScroll.html": [
- "5471dca08aae9d446c487d40853957e9290677f3",
+ "56d85d2973ad630dd28842df6479b1f571b7f340",
"testharness"
],
"cssom-view/elementsFromPoint.html": [
@@ -553998,7 +553998,7 @@
"testharness"
],
"cssom/style-sheet-interfaces-001.html": [
- "15509e87505d5a22d4f6dbbffcc90c24fcee642a",
+ "e77ec7de74baa901cc15a3b90d2b29125c282562",
"testharness"
],
"cssom/style-sheet-interfaces-002.html": [
@@ -615810,7 +615810,7 @@
"testharness"
],
"workers/Worker_ErrorEvent_error.htm": [
- "975ca8b575fb2f616623b810696287513b164d2d",
+ "43f1cd277819f57c7708690ff3a91dde8b2a3af5",
"testharness"
],
"workers/Worker_ErrorEvent_filename.htm": [
@@ -616102,7 +616102,7 @@
"testharness"
],
"workers/data-url.html": [
- "50abaf936cfb58ba14e6870c9b7f239f5d54f59c",
+ "a9084f9a3b6fc31d54b564b80869826f132f1166",
"testharness"
],
"workers/interfaces.idl": [
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/scroll-to-fragid/003.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/scroll-to-fragid/003.html.ini
new file mode 100644
index 00000000000..ae630f04075
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/scroll-to-fragid/003.html.ini
@@ -0,0 +1,4 @@
+[003.html]
+ type: testharness
+ [Fragment Navigation: Updating scroll position]
+ expected: FAIL \ No newline at end of file
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-append-to-child-document.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-append-to-child-document.html.ini
index ad2cf9dee6b..d73bfee8141 100644
--- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-append-to-child-document.html.ini
+++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-append-to-child-document.html.ini
@@ -1,3 +1,5 @@
[iframe-append-to-child-document.html]
type: testharness
- disabled: https://github.com/servo/servo/issues/14411
+ [Append iframe element to its own child document]
+ bug: https://github.com/servo/servo/issues/17479
+ expected: FAIL
diff --git a/tests/wpt/metadata/selectors/attribute-selectors/attribute-case/semantics.html.ini b/tests/wpt/metadata/selectors/attribute-selectors/attribute-case/semantics.html.ini
deleted file mode 100644
index 804d84f3514..00000000000
--- a/tests/wpt/metadata/selectors/attribute-selectors/attribute-case/semantics.html.ini
+++ /dev/null
@@ -1,29 +0,0 @@
-[semantics.html]
- type: testharness
- [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in standards mode]
- expected: FAIL
-
- [@namespace x 'a'; [x|foo='' i\] <div {A}foo=""> in standards mode]
- expected: FAIL
-
- [@namespace x 'A'; [x|foo='' i\] <div {a}foo=""> in standards mode]
- expected: FAIL
-
- [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in quirks mode]
- expected: FAIL
-
- [@namespace x 'a'; [x|foo='' i\] <div {A}foo=""> in quirks mode]
- expected: FAIL
-
- [@namespace x 'A'; [x|foo='' i\] <div {a}foo=""> in quirks mode]
- expected: FAIL
-
- [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' i\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in XML]
- expected: FAIL
-
- [@namespace x 'a'; [x|foo='' i\] <div {A}foo=""> in XML]
- expected: FAIL
-
- [@namespace x 'A'; [x|foo='' i\] <div {a}foo=""> in XML]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/selectors/attribute-selectors/attribute-case/syntax.html.ini b/tests/wpt/metadata/selectors/attribute-selectors/attribute-case/syntax.html.ini
deleted file mode 100644
index 3b4aa0649a8..00000000000
--- a/tests/wpt/metadata/selectors/attribute-selectors/attribute-case/syntax.html.ini
+++ /dev/null
@@ -1,218 +0,0 @@
-[syntax.html]
- type: testharness
- [[foo='BAR'\] /* sanity check (valid) */ in standards mode]
- expected: FAIL
-
- [[foo='bar' i\] in standards mode]
- expected: FAIL
-
- [[foo='bar' I\] in standards mode]
- expected: FAIL
-
- [[foo=bar i\] in standards mode]
- expected: FAIL
-
- [[foo="bar" i\] in standards mode]
- expected: FAIL
-
- [[foo='bar'i\] in standards mode]
- expected: FAIL
-
- [[foo='bar'i \] in standards mode]
- expected: FAIL
-
- [[foo='bar' i \] in standards mode]
- expected: FAIL
-
- [[foo='bar' /**/ i\] in standards mode]
- expected: FAIL
-
- [[foo='bar' i /**/ \] in standards mode]
- expected: FAIL
-
- [[foo='bar'/**/i/**/\] in standards mode]
- expected: FAIL
-
- [[foo=bar/**/i\] in standards mode]
- expected: FAIL
-
- [[foo='bar'\ti\t\] /* \\t */ in standards mode]
- expected: FAIL
-
- [[foo='bar'\ni\n\] /* \\n */ in standards mode]
- expected: FAIL
-
- [[foo='bar'\ri\r\] /* \\r */ in standards mode]
- expected: FAIL
-
- [[foo='bar' \\i\] in standards mode]
- expected: FAIL
-
- [[foo='bar' \\69\] in standards mode]
- expected: FAIL
-
- [[foo~='bar' i\] in standards mode]
- expected: FAIL
-
- [[foo^='bar' i\] in standards mode]
- expected: FAIL
-
- [[foo$='bar' i\] in standards mode]
- expected: FAIL
-
- [[foo*='bar' i\] in standards mode]
- expected: FAIL
-
- [[foo|='bar' i\] in standards mode]
- expected: FAIL
-
- [[|foo='bar' i\] in standards mode]
- expected: FAIL
-
- [[*|foo='bar' i\] in standards mode]
- expected: FAIL
-
- [[foo='BAR'\] /* sanity check (valid) */ in quirks mode]
- expected: FAIL
-
- [[foo='bar' i\] in quirks mode]
- expected: FAIL
-
- [[foo='bar' I\] in quirks mode]
- expected: FAIL
-
- [[foo=bar i\] in quirks mode]
- expected: FAIL
-
- [[foo="bar" i\] in quirks mode]
- expected: FAIL
-
- [[foo='bar'i\] in quirks mode]
- expected: FAIL
-
- [[foo='bar'i \] in quirks mode]
- expected: FAIL
-
- [[foo='bar' i \] in quirks mode]
- expected: FAIL
-
- [[foo='bar' /**/ i\] in quirks mode]
- expected: FAIL
-
- [[foo='bar' i /**/ \] in quirks mode]
- expected: FAIL
-
- [[foo='bar'/**/i/**/\] in quirks mode]
- expected: FAIL
-
- [[foo=bar/**/i\] in quirks mode]
- expected: FAIL
-
- [[foo='bar'\ti\t\] /* \\t */ in quirks mode]
- expected: FAIL
-
- [[foo='bar'\ni\n\] /* \\n */ in quirks mode]
- expected: FAIL
-
- [[foo='bar'\ri\r\] /* \\r */ in quirks mode]
- expected: FAIL
-
- [[foo='bar' \\i\] in quirks mode]
- expected: FAIL
-
- [[foo='bar' \\69\] in quirks mode]
- expected: FAIL
-
- [[foo~='bar' i\] in quirks mode]
- expected: FAIL
-
- [[foo^='bar' i\] in quirks mode]
- expected: FAIL
-
- [[foo$='bar' i\] in quirks mode]
- expected: FAIL
-
- [[foo*='bar' i\] in quirks mode]
- expected: FAIL
-
- [[foo|='bar' i\] in quirks mode]
- expected: FAIL
-
- [[|foo='bar' i\] in quirks mode]
- expected: FAIL
-
- [[*|foo='bar' i\] in quirks mode]
- expected: FAIL
-
- [[foo='BAR'\] /* sanity check (valid) */ in XML]
- expected: FAIL
-
- [[foo='bar' i\] in XML]
- expected: FAIL
-
- [[foo='bar' I\] in XML]
- expected: FAIL
-
- [[foo=bar i\] in XML]
- expected: FAIL
-
- [[foo="bar" i\] in XML]
- expected: FAIL
-
- [[foo='bar'i\] in XML]
- expected: FAIL
-
- [[foo='bar'i \] in XML]
- expected: FAIL
-
- [[foo='bar' i \] in XML]
- expected: FAIL
-
- [[foo='bar' /**/ i\] in XML]
- expected: FAIL
-
- [[foo='bar' i /**/ \] in XML]
- expected: FAIL
-
- [[foo='bar'/**/i/**/\] in XML]
- expected: FAIL
-
- [[foo=bar/**/i\] in XML]
- expected: FAIL
-
- [[foo='bar'\ti\t\] /* \\t */ in XML]
- expected: FAIL
-
- [[foo='bar'\ni\n\] /* \\n */ in XML]
- expected: FAIL
-
- [[foo='bar'\ri\r\] /* \\r */ in XML]
- expected: FAIL
-
- [[foo='bar' \\i\] in XML]
- expected: FAIL
-
- [[foo='bar' \\69\] in XML]
- expected: FAIL
-
- [[foo~='bar' i\] in XML]
- expected: FAIL
-
- [[foo^='bar' i\] in XML]
- expected: FAIL
-
- [[foo$='bar' i\] in XML]
- expected: FAIL
-
- [[foo*='bar' i\] in XML]
- expected: FAIL
-
- [[foo|='bar' i\] in XML]
- expected: FAIL
-
- [[|foo='bar' i\] in XML]
- expected: FAIL
-
- [[*|foo='bar' i\] in XML]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/workers/Worker_ErrorEvent_error.htm.ini b/tests/wpt/metadata/workers/Worker_ErrorEvent_error.htm.ini
deleted file mode 100644
index f58936a3ebd..00000000000
--- a/tests/wpt/metadata/workers/Worker_ErrorEvent_error.htm.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[Worker_ErrorEvent_error.htm]
- expected: ERROR
diff --git a/tests/wpt/metadata/workers/data-url.html.ini b/tests/wpt/metadata/workers/data-url.html.ini
index 315740342a1..ddcfc38e63b 100644
--- a/tests/wpt/metadata/workers/data-url.html.ini
+++ b/tests/wpt/metadata/workers/data-url.html.ini
@@ -1,6 +1,5 @@
[data-url.html]
type: testharness
- expected: ERROR
[worker has opaque origin]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index f98e337b32a..2e7c9320623 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -25556,7 +25556,7 @@
"testharness"
],
"mozilla/calc.html": [
- "a1f441f7fd4b9ab3ae9e1cb5403cfe8de90bb71c",
+ "5d59d5b367a023e778ce6968acdeca6b8b7c3197",
"testharness"
],
"mozilla/canvas.initial.reset.2dstate.html": [
diff --git a/tests/wpt/mozilla/tests/mozilla/calc.html b/tests/wpt/mozilla/tests/mozilla/calc.html
index d3acc867b38..a2494e9f3de 100644
--- a/tests/wpt/mozilla/tests/mozilla/calc.html
+++ b/tests/wpt/mozilla/tests/mozilla/calc.html
@@ -9,6 +9,7 @@
#inner {
border-style: solid; /* So used border == computed border */
outline-style: solid; /* So used outline-width == computed outline-width */
+ transition-property: none; /* so that tests don't occur in the middle of a transition */
}
</style>
</head>
diff --git a/tests/wpt/web-platform-tests/cssom-view/elementScroll.html b/tests/wpt/web-platform-tests/cssom-view/elementScroll.html
index 6227d665457..85bf4c5c95e 100644
--- a/tests/wpt/web-platform-tests/cssom-view/elementScroll.html
+++ b/tests/wpt/web-platform-tests/cssom-view/elementScroll.html
@@ -33,12 +33,14 @@
Curabitur elit lacus, bibendum non tempus a, bibendum sit amet ante. Mauris eget nibh quis leo rhoncus consequat. Integer iaculis sed sapien eu pellentesque. In aliquet elementum lorem, ut consequat elit ultrices id. Phasellus vestibulum ex ex, ac sagittis tortor convallis et. Curabitur placerat id lectus at aliquam. Morbi sed nisl sem. Nam sit amet arcu maximus, volutpat nisl ac, dignissim neque. Etiam nec efficitur libero. Quisque tristique pulvinar est, eget dictum ex vehicula non. Nam dignissim non felis a iaculis. Nullam vel dolor vitae libero aliquet congue. Donec mi eros, semper non lectus at, commodo ullamcorper ligula. Donec commodo, sem vel lacinia porttitor, elit orci maximus felis, eget eleifend est velit id lorem.
</div>
+ <div id="unrelated"></div>
</section>
<script>
setup({explicit_done:true});
window.onload = function () {
var section = document.getElementById("section");
+ var unrelated = document.getElementById("unrelated");
test(function () {
assert_equals(section.scrollTop, 0, "initial scrollTop should be 0");
@@ -49,6 +51,9 @@
assert_equals(section.scrollTop, 30, "changed scrollTop should be 40");
assert_equals(section.scrollLeft, 40, "changed scrollLeft should be 40");
+
+ assert_equals(unrelated.scrollTop, 0, "unrelated element should not scroll");
+ assert_equals(unrelated.scrollLeft, 0, "unrelated element should not scroll");
}, "Element scrollTop/Left getter/setter test");
test(function () {
diff --git a/tests/wpt/web-platform-tests/cssom/style-sheet-interfaces-001.html b/tests/wpt/web-platform-tests/cssom/style-sheet-interfaces-001.html
index 3f4956cb3ad..fb1fde86eff 100644
--- a/tests/wpt/web-platform-tests/cssom/style-sheet-interfaces-001.html
+++ b/tests/wpt/web-platform-tests/cssom/style-sheet-interfaces-001.html
@@ -61,6 +61,17 @@
assert: [ "styleElement.sheet exists", "styleElement.sheet is a CSSStyleSheet",
"linkElement.sheet exists", "linkElement.sheet is a CSSStyleSheet"] });
+ test(function () {
+ var style = document.createElement("style");
+ document.querySelector("head").appendChild(style);
+ var sheet1 = style.sheet;
+ assert_equals(sheet1.cssRules.length, 0);
+ style.appendChild(document.createTextNode("a { color: green; }"));
+ assert_equals(style.sheet.cssRules.length, 1);
+ }, "sheet_property_updates",
+ { help: "https://www.w3.org/TR/cssom-1/#the-linkstyle-interface",
+ assert: "The sheet property on LinkStyle should always return the current associated style sheet." });
+
test(function() {
assert_own_property(styleSheet, "ownerRule");
assert_own_property(styleSheet, "cssRules");
diff --git a/tests/wpt/web-platform-tests/workers/Worker_ErrorEvent_error.htm b/tests/wpt/web-platform-tests/workers/Worker_ErrorEvent_error.htm
index 1c1257d1bd2..b7a7f549c83 100644
--- a/tests/wpt/web-platform-tests/workers/Worker_ErrorEvent_error.htm
+++ b/tests/wpt/web-platform-tests/workers/Worker_ErrorEvent_error.htm
@@ -4,6 +4,10 @@
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
+// The worker events races with the window's load event; if the worker events
+// arrive first, the harness will detect the error event and fail the test.
+setup({ allow_uncaught_exception: true });
+
var t1 = async_test("Error handler outside the worker should not see the error value");
var t2 = async_test("Error handlers inside a worker should see the error value");
diff --git a/tests/wpt/web-platform-tests/workers/data-url.html b/tests/wpt/web-platform-tests/workers/data-url.html
index 3a4eb6c705c..306eaf92b5e 100644
--- a/tests/wpt/web-platform-tests/workers/data-url.html
+++ b/tests/wpt/web-platform-tests/workers/data-url.html
@@ -25,7 +25,9 @@ function assert_worker_construction_fails(test_desc, mime_type, worker_code) {
w.onmessage = t.step_func_done(function(e) {
assert_unreached('Should not receive any message back.');
});
- w.onerror = t.step_func_done(function() {
+ w.onerror = t.step_func_done(function(e) {
+ // Stop the error from being propagated to the WPT test harness
+ e.preventDefault();
});
}, test_desc);
}