aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PULL_REQUEST_TEMPLATE.md1
-rw-r--r--components/gfx/Cargo.toml1
-rw-r--r--components/gfx/font.rs7
-rw-r--r--components/gfx/lib.rs1
-rw-r--r--components/gfx/text/shaping/harfbuzz.rs4
-rw-r--r--components/layout/Cargo.toml3
-rw-r--r--components/layout/fragment.rs2
-rw-r--r--components/layout/inline.rs18
-rw-r--r--components/layout/lib.rs1
-rw-r--r--components/layout/text.rs5
-rw-r--r--components/layout/traversal.rs2
-rw-r--r--components/script/Cargo.toml2
-rw-r--r--components/script/dom/element.rs18
-rw-r--r--components/script/dom/webglrenderingcontext.rs9
-rw-r--r--components/script/layout_wrapper.rs43
-rw-r--r--components/script_layout_interface/Cargo.toml2
-rw-r--r--components/script_layout_interface/wrapper_traits.rs18
-rw-r--r--components/servo/Cargo.lock59
-rw-r--r--components/style/Cargo.toml10
-rw-r--r--components/style/attr.rs3
-rw-r--r--components/style/dom.rs6
-rw-r--r--components/style/gecko_selector_impl.rs44
-rw-r--r--components/style/lib.rs7
-rw-r--r--components/style/matching.rs79
-rw-r--r--components/style/parser.rs3
-rw-r--r--components/style/properties/helpers/animated_properties.mako.rs20
-rw-r--r--components/style/properties/longhand/inherited_text.mako.rs11
-rw-r--r--components/style/restyle_hints.rs57
-rw-r--r--components/style/selector_impl.rs55
-rw-r--r--components/style/selector_matching.rs13
-rw-r--r--components/style/servo_selector_impl.rs45
-rw-r--r--components/style/traversal.rs5
-rw-r--r--components/style/values/computed/mod.rs10
-rw-r--r--components/style/values/specified/basic_shape.rs5
-rw-r--r--etc/ci/buildbot_steps.yml8
-rwxr-xr-xetc/ci/check_intermittents.sh24
-rw-r--r--etc/ci/former_intermittents_css.txt3
-rw-r--r--etc/ci/former_intermittents_wpt.txt0
-rw-r--r--ports/cef/Cargo.lock55
-rw-r--r--ports/geckolib/Cargo.lock113
-rw-r--r--ports/geckolib/Cargo.toml7
-rw-r--r--ports/geckolib/glue.rs2
-rw-r--r--ports/geckolib/lib.rs9
-rw-r--r--ports/geckolib/snapshot.rs21
-rw-r--r--ports/geckolib/snapshot_helpers.rs2
-rw-r--r--ports/geckolib/string_cache/Cargo.toml9
-rw-r--r--ports/geckolib/string_cache/atom_macro.rs11
-rw-r--r--ports/geckolib/string_cache/lib.rs189
-rw-r--r--ports/geckolib/string_cache/namespace.rs73
-rw-r--r--ports/geckolib/wrapper.rs33
-rw-r--r--ports/glutin/window.rs4
-rw-r--r--python/tidy/servo_tidy/tidy.py15
-rw-r--r--resources/shaders/blit.fs.glsl9
-rw-r--r--resources/shaders/blit.vs.glsl12
-rw-r--r--resources/shaders/clear.fs.glsl8
-rw-r--r--resources/shaders/clear.vs.glsl9
-rw-r--r--resources/shaders/mask.fs.glsl8
-rw-r--r--resources/shaders/mask.vs.glsl9
-rw-r--r--resources/shaders/prim_shared.glsl57
-rw-r--r--resources/shaders/ps_angle_gradient.vs.glsl2
-rw-r--r--resources/shaders/ps_image_transform.fs.glsl9
-rw-r--r--resources/shaders/ps_image_transform.glsl4
-rw-r--r--resources/shaders/ps_image_transform.vs.glsl44
-rw-r--r--resources/shaders/ps_rectangle.vs.glsl4
-rw-r--r--resources/shaders/ps_rectangle_clip.vs.glsl4
-rw-r--r--resources/shaders/ps_rectangle_transform.fs.glsl9
-rw-r--r--resources/shaders/ps_rectangle_transform.glsl4
-rw-r--r--resources/shaders/ps_rectangle_transform.vs.glsl45
-rw-r--r--resources/shaders/quad.fs.glsl38
-rw-r--r--resources/shaders/quad.vs.glsl112
-rw-r--r--resources/shaders/tile.fs.glsl11
-rw-r--r--resources/shaders/tile.vs.glsl11
-rw-r--r--tests/html/acid1.html124
-rwxr-xr-xtests/html/acid2.html2
-rw-r--r--tests/html/active_selector.html20
-rw-r--r--tests/html/background.html34
-rw-r--r--tests/html/border_collapse_test.html2
-rw-r--r--tests/html/form_html5_validations.html6
-rw-r--r--tests/html/inline_bg_color_simple.html2
-rw-r--r--tests/html/input_whitespace_regression.html2
-rw-r--r--tests/html/lipsum-large.html6
-rw-r--r--tests/html/lipsum.html6
-rw-r--r--tests/html/longcat.html28
-rw-r--r--tests/html/overflow_scroll_with_nested_fixed_height.html6
-rw-r--r--tests/html/percentage-body-height.html6
-rw-r--r--tests/html/service-worker/dashboard-page.html6
-rw-r--r--tests/html/service-worker/demo_iframe.html8
-rw-r--r--tests/html/service-worker/index.html2
-rw-r--r--tests/html/service-worker/profile.html6
-rw-r--r--tests/html/test-websocket.html138
-rw-r--r--tests/html/test_bg_color.html2
-rw-r--r--tests/html/test_class_helloworld.html30
-rw-r--r--tests/html/test_inline_border.html2
-rwxr-xr-xtests/html/test_local_bookmark.html6
-rw-r--r--tests/html/test_mouse_down_mouse_up_click.html12
-rw-r--r--tests/html/test_overflow_hidden.html4
-rw-r--r--tests/html/test_target_pseudoselector.html4
-rw-r--r--tests/html/test_textarea_input.html14
-rw-r--r--tests/html/test_underline_helloworld.html2
-rw-r--r--tests/html/tiny_test.html2
-rw-r--r--tests/unit/style/Cargo.toml2
-rw-r--r--tests/wpt/metadata-css/css-transforms-1_dev/html/transform-abspos-002.htm.ini3
-rw-r--r--tests/wpt/metadata-css/css-transforms-1_dev/html/transform-abspos-007.htm.ini3
-rw-r--r--tests/wpt/metadata-css/css-transforms-1_dev/html/transform-table-007.htm.ini3
-rw-r--r--tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-001.htm.ini3
-rw-r--r--tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-003.htm.ini3
-rw-r--r--tests/wpt/metadata-css/css21_dev/html4/inlines-017.htm.ini3
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html.ini2
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-complete.html.ini2
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html.ini2
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html.ini4
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html.ini2
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html.ini4
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html.ini2
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html.ini2
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html.ini2
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json30
-rw-r--r--tests/wpt/mozilla/tests/css/acid1_a.html106
-rwxr-xr-xtests/wpt/mozilla/tests/css/acid2.html2
-rw-r--r--tests/wpt/mozilla/tests/css/after_block_iteration_ref.html2
-rw-r--r--tests/wpt/mozilla/tests/css/animations/mixed-units.html33
-rw-r--r--tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_a.html20
-rw-r--r--tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_ref.html18
-rw-r--r--tests/wpt/mozilla/tests/css/border_inline_split.html20
-rw-r--r--tests/wpt/mozilla/tests/css/border_inline_split_ref.html14
-rw-r--r--tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html2
-rw-r--r--tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html2
-rw-r--r--tests/wpt/mozilla/tests/css/flex-item-assign-inline-size.html6
-rw-r--r--tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_a.html24
-rw-r--r--tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_ref.html20
-rw-r--r--tests/wpt/mozilla/tests/css/float_intrinsic_height.html42
-rw-r--r--tests/wpt/mozilla/tests/css/float_intrinsic_height_ref.html38
-rw-r--r--tests/wpt/mozilla/tests/css/fonts/takao-p-gothic/COPYING.html4
-rw-r--r--tests/wpt/mozilla/tests/css/height_compute.html12
-rw-r--r--tests/wpt/mozilla/tests/css/height_compute_reset.html12
-rw-r--r--tests/wpt/mozilla/tests/css/hide_after_create.html32
-rw-r--r--tests/wpt/mozilla/tests/css/hide_after_create_ref.html10
-rw-r--r--tests/wpt/mozilla/tests/css/iframe/hide_and_show.html28
-rw-r--r--tests/wpt/mozilla/tests/css/iframe/hide_and_show_ref.html16
-rw-r--r--tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_a.html14
-rw-r--r--tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_ref.html12
-rw-r--r--tests/wpt/mozilla/tests/css/inline_whitespace_a.html24
-rw-r--r--tests/wpt/mozilla/tests/css/inline_whitespace_b.html26
-rw-r--r--tests/wpt/mozilla/tests/css/inline_whitespace_ref.html22
-rw-r--r--tests/wpt/mozilla/tests/css/input_alignment_a.html8
-rw-r--r--tests/wpt/mozilla/tests/css/input_alignment_ref.html2
-rw-r--r--tests/wpt/mozilla/tests/css/input_placeholder.html2
-rw-r--r--tests/wpt/mozilla/tests/css/input_placeholder_ref.html2
-rw-r--r--tests/wpt/mozilla/tests/css/input_whitespace.html2
-rw-r--r--tests/wpt/mozilla/tests/css/input_whitespace_ref.html2
-rw-r--r--tests/wpt/mozilla/tests/css/linebreak_inline_span_a.html4
-rw-r--r--tests/wpt/mozilla/tests/css/linebreak_inline_span_b.html4
-rw-r--r--tests/wpt/mozilla/tests/css/object_element_b.html2
-rw-r--r--tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_a.html4
-rw-r--r--tests/wpt/mozilla/tests/css/position_abs_cb_with_non_cb_kid_a.html8
-rw-r--r--tests/wpt/mozilla/tests/css/position_abs_nested_a.html4
-rw-r--r--tests/wpt/mozilla/tests/css/position_abs_nested_b.html4
-rw-r--r--tests/wpt/mozilla/tests/css/position_abs_pseudo_a.html6
-rw-r--r--tests/wpt/mozilla/tests/css/position_abs_pseudo_b.html6
-rw-r--r--tests/wpt/mozilla/tests/css/position_abs_replaced_simple_b.html2
-rw-r--r--tests/wpt/mozilla/tests/css/pseudo_content_with_layers.html4
-rw-r--r--tests/wpt/mozilla/tests/css/table_auto_width.html26
-rw-r--r--tests/wpt/mozilla/tests/css/table_auto_width_ref.html26
-rw-r--r--tests/wpt/mozilla/tests/css/text_align_complex_a.html80
-rw-r--r--tests/wpt/mozilla/tests/css/text_align_complex_ref.html42
-rw-r--r--tests/wpt/mozilla/tests/css/transform_optimization.html54
-rw-r--r--tests/wpt/mozilla/tests/css/transform_optimization_ref.html40
-rw-r--r--tests/wpt/mozilla/tests/mozilla/calc.html2
-rw-r--r--tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_13.html2
-rw-r--r--tests/wpt/mozilla/tests/mozilla/element_parentOffset.html20
-rw-r--r--tests/wpt/mozilla/tests/mozilla/iframe_replacement.html28
-rw-r--r--tests/wpt/mozilla/tests/mozilla/img_width_height.html12
-rw-r--r--tests/wpt/mozilla/tests/mozilla/parentnodes.html2
-rw-r--r--tests/wpt/mozilla/tests/mozilla/preferences.html26
-rw-r--r--tests/wpt/mozilla/tests/mozilla/resources/ssl.https.html2
-rw-r--r--tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_mipmap.html2
176 files changed, 1656 insertions, 1445 deletions
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
index 8434ec91eea..919f2963a7b 100644
--- a/PULL_REQUEST_TEMPLATE.md
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -1,5 +1,6 @@
<!-- Please describe your changes on the following line: -->
+
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml
index 450c957886d..62e5927e404 100644
--- a/components/gfx/Cargo.toml
+++ b/components/gfx/Cargo.toml
@@ -28,6 +28,7 @@ log = "0.3.5"
mime = "0.2"
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
+ordered-float = "0.2.2"
plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"}
rand = "0.3"
diff --git a/components/gfx/font.rs b/components/gfx/font.rs
index e92fff1c58f..7e1cf5236d5 100644
--- a/components/gfx/font.rs
+++ b/components/gfx/font.rs
@@ -5,6 +5,7 @@
use app_units::Au;
use euclid::{Point2D, Rect, Size2D};
use font_template::FontTemplateDescriptor;
+use ordered_float::NotNaN;
use platform::font::{FontHandle, FontTable};
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
@@ -157,7 +158,7 @@ pub struct ShapingOptions {
/// NB: You will probably want to set the `IGNORE_LIGATURES_SHAPING_FLAG` if this is non-null.
pub letter_spacing: Option<Au>,
/// Spacing to add between each word. Corresponds to the CSS 2.1 `word-spacing` property.
- pub word_spacing: Au,
+ pub word_spacing: (Au, NotNaN<f32>),
/// The Unicode script property of the characters in this run.
pub script: Script,
/// Various flags.
@@ -225,7 +226,9 @@ impl Font {
let mut advance = Au::from_f64_px(self.glyph_h_advance(glyph_id));
if character == ' ' {
- advance += options.word_spacing;
+ // https://drafts.csswg.org/css-text-3/#word-spacing-property
+ let (length, percent) = options.word_spacing;
+ advance = (advance + length) + Au((advance.0 as f32 * percent.into_inner()) as i32);
}
if let Some(letter_spacing) = options.letter_spacing {
advance += letter_spacing;
diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs
index 58c92f304d9..b16ae9c555b 100644
--- a/components/gfx/lib.rs
+++ b/components/gfx/lib.rs
@@ -60,6 +60,7 @@ extern crate log;
extern crate mime;
extern crate msg;
extern crate net_traits;
+extern crate ordered_float;
#[macro_use]
extern crate profile_traits;
extern crate rand;
diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs
index 5106418be61..ba5f281c04d 100644
--- a/components/gfx/text/shaping/harfbuzz.rs
+++ b/components/gfx/text/shaping/harfbuzz.rs
@@ -403,7 +403,9 @@ impl Shaper {
// applied. The effect of the property on other word-separator characters is undefined."
// We elect to only space the two required code points.
if character == ' ' || character == '\u{a0}' {
- advance = advance + options.word_spacing
+ // https://drafts.csswg.org/css-text-3/#word-spacing-property
+ let (length, percent) = options.word_spacing;
+ advance = (advance + length) + Au((advance.0 as f32 * percent.into_inner()) as i32);
}
advance
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml
index 7471c12a5f7..a3a3431b912 100644
--- a/components/layout/Cargo.toml
+++ b/components/layout/Cargo.toml
@@ -26,13 +26,14 @@ libc = "0.2"
log = "0.3.5"
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
+ordered-float = "0.2.2"
plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
-selectors = {version = "0.7", features = ["heap_size"]}
+selectors = {version = "0.8", features = ["heap_size"]}
serde_macros = "0.7.15"
smallvec = "0.1"
string_cache = {version = "0.2.20", features = ["heap_size"]}
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 0ddb083c1c0..254ed8d4177 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -1644,7 +1644,7 @@ impl Fragment {
_ => return None,
};
- let mut remaining_inline_size = max_inline_size;
+ let mut remaining_inline_size = max_inline_size - self.border_padding.inline_start_end();
let mut inline_start_range = Range::new(text_fragment_info.range.begin(), ByteIndex(0));
let mut inline_end_range = None;
let mut overflowing = false;
diff --git a/components/layout/inline.rs b/components/layout/inline.rs
index f734e66eb6a..0bc24d76276 100644
--- a/components/layout/inline.rs
+++ b/components/layout/inline.rs
@@ -636,7 +636,23 @@ impl LineBreaker {
// Push the first fragment onto the line we're working on and start off the next line with
// the second fragment. If there's no second fragment, the next line will start off empty.
match (inline_start_fragment, inline_end_fragment) {
- (Some(inline_start_fragment), Some(inline_end_fragment)) => {
+ (Some(mut inline_start_fragment), Some(mut inline_end_fragment)) => {
+ inline_start_fragment.border_padding.inline_end = Au(0);
+ if let Some(ref mut inline_context) = inline_start_fragment.inline_context {
+ for node in &mut inline_context.nodes {
+ node.flags.remove(LAST_FRAGMENT_OF_ELEMENT);
+ }
+ }
+ inline_start_fragment.border_box.size.inline += inline_start_fragment.border_padding.inline_start;
+
+ inline_end_fragment.border_padding.inline_start = Au(0);
+ if let Some(ref mut inline_context) = inline_end_fragment.inline_context {
+ for node in &mut inline_context.nodes {
+ node.flags.remove(FIRST_FRAGMENT_OF_ELEMENT);
+ }
+ }
+ inline_end_fragment.border_box.size.inline += inline_end_fragment.border_padding.inline_end;
+
self.push_fragment_to_line(layout_context,
inline_start_fragment,
LineFlushMode::Flush);
diff --git a/components/layout/lib.rs b/components/layout/lib.rs
index b6f10c7fa89..65066b638e0 100644
--- a/components/layout/lib.rs
+++ b/components/layout/lib.rs
@@ -35,6 +35,7 @@ extern crate libc;
extern crate log;
extern crate msg;
extern crate net_traits;
+extern crate ordered_float;
#[macro_use]
#[no_link]
extern crate plugins as servo_plugins;
diff --git a/components/layout/text.rs b/components/layout/text.rs
index 85e0f620290..1cfbe0de13d 100644
--- a/components/layout/text.rs
+++ b/components/layout/text.rs
@@ -17,6 +17,7 @@ use gfx::text::text_run::TextRun;
use gfx::text::util::{self, CompressionMode};
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFragments, LAST_FRAGMENT_OF_ELEMENT};
use linked_list::split_off_head;
+use ordered_float::NotNaN;
use range::Range;
use std::borrow::ToOwned;
use std::collections::LinkedList;
@@ -164,7 +165,9 @@ impl TextRunScanner {
};
text_transform = inherited_text_style.text_transform;
letter_spacing = inherited_text_style.letter_spacing.0;
- word_spacing = inherited_text_style.word_spacing.0.unwrap_or(Au(0));
+ word_spacing = inherited_text_style.word_spacing.0
+ .map(|lop| lop.to_hash_key())
+ .unwrap_or((Au(0), NotNaN::new(0.0).unwrap()));
text_rendering = inherited_text_style.text_rendering;
}
diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs
index b1087e945d7..f9dcd975f9c 100644
--- a/components/layout/traversal.rs
+++ b/components/layout/traversal.rs
@@ -27,7 +27,7 @@ pub struct RecalcStyleAndConstructFlows<'lc> {
impl<'lc, N> DomTraversalContext<N> for RecalcStyleAndConstructFlows<'lc>
where N: LayoutNode + TNode,
- N::ConcreteElement: ::selectors::Element<Impl=ServoSelectorImpl, AttrString=String>
+ N::ConcreteElement: ::selectors::Element<Impl=ServoSelectorImpl>
{
type SharedContext = SharedLayoutContext;
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index 891b48f3dd9..75f8ec886cf 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -61,7 +61,7 @@ regex = "0.1.43"
rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
-selectors = {version = "0.7", features = ["heap_size"]}
+selectors = {version = "0.8", features = ["heap_size"]}
serde = "0.7.15"
smallvec = "0.1"
string_cache = {version = "0.2.20", features = ["heap_size", "unstable"]}
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index b9b02183762..f74f253aa78 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -73,7 +73,6 @@ use html5ever::tree_builder::{LimitedQuirks, NoQuirks, Quirks};
use ref_filter_map::ref_filter_map;
use selectors::matching::{DeclarationBlock, ElementFlags, matches};
use selectors::matching::{HAS_SLOW_SELECTOR, HAS_EDGE_CHILD_SELECTOR, HAS_SLOW_SELECTOR_LATER_SIBLINGS};
-use selectors::matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
use selectors::parser::{AttrSelector, NamespaceConstraint, parse_author_origin_selector_list_from_str};
use std::ascii::AsciiExt;
use std::borrow::Cow;
@@ -83,9 +82,10 @@ use std::default::Default;
use std::mem;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
-use string_cache::{Atom, BorrowedAtom, BorrowedNamespace, Namespace, QualName};
+use string_cache::{Atom, Namespace, QualName};
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
use style::element_state::*;
+use style::matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
use style::parser::ParserContextExtraData;
use style::properties::DeclaredValue;
use style::properties::longhands::{self, background_image, border_spacing, font_family, overflow_x, font_size};
@@ -2235,7 +2235,9 @@ impl VirtualMethods for Element {
}
impl<'a> ::selectors::MatchAttrGeneric for Root<Element> {
- fn match_attr<F>(&self, attr: &AttrSelector, test: F) -> bool
+ type Impl = ServoSelectorImpl;
+
+ fn match_attr<F>(&self, attr: &AttrSelector<ServoSelectorImpl>, test: F) -> bool
where F: Fn(&str) -> bool
{
use ::selectors::Element;
@@ -2263,8 +2265,6 @@ impl<'a> ::selectors::MatchAttrGeneric for Root<Element> {
}
impl<'a> ::selectors::Element for Root<Element> {
- type Impl = ServoSelectorImpl;
-
fn parent_element(&self) -> Option<Root<Element>> {
self.upcast::<Node>().GetParentElement()
}
@@ -2299,12 +2299,12 @@ impl<'a> ::selectors::Element for Root<Element> {
})
}
- fn get_local_name(&self) -> BorrowedAtom {
- BorrowedAtom(self.local_name())
+ fn get_local_name(&self) -> &Atom {
+ self.local_name()
}
- fn get_namespace(&self) -> BorrowedNamespace {
- BorrowedNamespace(self.namespace())
+ fn get_namespace(&self) -> &Namespace {
+ self.namespace()
}
fn match_non_ts_pseudo_class(&self, pseudo_class: NonTSPseudoClass) -> bool {
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index dbb774ad87b..a7418921e8a 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -987,6 +987,15 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
fn DepthRange(&self, near: f32, far: f32) {
+ // From the WebGL 1.0 spec, 6.12: Viewport Depth Range:
+ //
+ // "A call to depthRange will generate an
+ // INVALID_OPERATION error if zNear is greater than
+ // zFar."
+ if near > far {
+ return self.webgl_error(InvalidOperation);
+ }
+
self.ipc_renderer
.send(CanvasMsg::WebGL(WebGLCommand::DepthRange(near as f64, far as f64)))
.unwrap()
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 544eb00a560..d4518b015e8 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -52,7 +52,7 @@ use selectors::parser::{AttrSelector, NamespaceConstraint};
use std::marker::PhantomData;
use std::mem::{transmute, transmute_copy};
use std::sync::Arc;
-use string_cache::{Atom, BorrowedAtom, BorrowedNamespace, Namespace};
+use string_cache::{Atom, Namespace};
use style::attr::AttrValue;
use style::computed_values::display;
use style::context::SharedStyleContext;
@@ -433,7 +433,10 @@ fn as_element<'le>(node: LayoutJS<Node>) -> Option<ServoLayoutElement<'le>> {
}
impl<'le> ::selectors::MatchAttrGeneric for ServoLayoutElement<'le> {
- fn match_attr<F>(&self, attr: &AttrSelector, test: F) -> bool where F: Fn(&str) -> bool {
+ type Impl = ServoSelectorImpl;
+
+ fn match_attr<F>(&self, attr: &AttrSelector<ServoSelectorImpl>, test: F) -> bool
+ where F: Fn(&str) -> bool {
use ::selectors::Element;
let name = if self.is_html_element_in_html_document() {
&attr.lower_name
@@ -455,8 +458,6 @@ impl<'le> ::selectors::MatchAttrGeneric for ServoLayoutElement<'le> {
}
impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
- type Impl = ServoSelectorImpl;
-
fn parent_element(&self) -> Option<ServoLayoutElement<'le>> {
unsafe {
self.element.upcast().parent_node_ref().and_then(as_element)
@@ -516,13 +517,13 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
}
#[inline]
- fn get_local_name<'a>(&'a self) -> BorrowedAtom<'a> {
- BorrowedAtom(self.element.local_name())
+ fn get_local_name(&self) -> &Atom {
+ self.element.local_name()
}
#[inline]
- fn get_namespace<'a>(&'a self) -> BorrowedNamespace<'a> {
- BorrowedNamespace(self.element.namespace())
+ fn get_namespace(&self) -> &Namespace {
+ self.element.namespace()
}
fn match_non_ts_pseudo_class(&self, pseudo_class: NonTSPseudoClass) -> bool {
@@ -823,8 +824,8 @@ impl<ConcreteNode> Iterator for ThreadSafeLayoutNodeChildrenIterator<ConcreteNod
loop {
let next_node = if let Some(ref node) = current_node {
if node.is_element() &&
- node.as_element().get_local_name() == atom!("summary") &&
- node.as_element().get_namespace() == ns!(html) {
+ node.as_element().get_local_name() == &atom!("summary") &&
+ node.as_element().get_namespace() == &ns!(html) {
self.current_node = None;
return Some(node.clone());
}
@@ -841,8 +842,8 @@ impl<ConcreteNode> Iterator for ThreadSafeLayoutNodeChildrenIterator<ConcreteNod
let node = self.current_node.clone();
let node = node.and_then(|node| {
if node.is_element() &&
- node.as_element().get_local_name() == atom!("summary") &&
- node.as_element().get_namespace() == ns!(html) {
+ node.as_element().get_local_name() == &atom!("summary") &&
+ node.as_element().get_namespace() == &ns!(html) {
unsafe { node.dangerous_next_sibling() }
} else {
Some(node)
@@ -902,13 +903,13 @@ impl<'le> ThreadSafeLayoutElement for ServoThreadSafeLayoutElement<'le> {
}
#[inline]
- fn get_local_name<'a>(&'a self) -> BorrowedAtom<'a> {
- BorrowedAtom(self.element.local_name())
+ fn get_local_name(&self) -> &Atom {
+ self.element.local_name()
}
#[inline]
- fn get_namespace<'a>(&'a self) -> BorrowedNamespace<'a> {
- BorrowedNamespace(self.element.namespace())
+ fn get_namespace(&self) -> &Namespace {
+ self.element.namespace()
}
}
@@ -925,7 +926,9 @@ impl<'le> ThreadSafeLayoutElement for ServoThreadSafeLayoutElement<'le> {
/// Note that the element implementation is needed only for selector matching,
/// not for inheritance (styles are inherited appropiately).
impl<'le> ::selectors::MatchAttrGeneric for ServoThreadSafeLayoutElement<'le> {
- fn match_attr<F>(&self, attr: &AttrSelector, test: F) -> bool
+ type Impl = ServoSelectorImpl;
+
+ fn match_attr<F>(&self, attr: &AttrSelector<ServoSelectorImpl>, test: F) -> bool
where F: Fn(&str) -> bool {
match attr.namespace {
NamespaceConstraint::Specific(ref ns) => {
@@ -941,8 +944,6 @@ impl<'le> ::selectors::MatchAttrGeneric for ServoThreadSafeLayoutElement<'le> {
}
}
impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
- type Impl = ServoSelectorImpl;
-
fn parent_element(&self) -> Option<Self> {
warn!("ServoThreadSafeLayoutElement::parent_element called");
None
@@ -977,12 +978,12 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
}
#[inline]
- fn get_local_name<'a>(&'a self) -> BorrowedAtom<'a> {
+ fn get_local_name(&self) -> &Atom {
ThreadSafeLayoutElement::get_local_name(self)
}
#[inline]
- fn get_namespace<'a>(&'a self) -> BorrowedNamespace<'a> {
+ fn get_namespace(&self) -> &Namespace {
ThreadSafeLayoutElement::get_namespace(self)
}
diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml
index cbd8d65b72e..0bc63e678ab 100644
--- a/components/script_layout_interface/Cargo.toml
+++ b/components/script_layout_interface/Cargo.toml
@@ -27,7 +27,7 @@ plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
script_traits = {path = "../script_traits"}
-selectors = {version = "0.7", features = ["heap_size"]}
+selectors = {version = "0.8", features = ["heap_size"]}
string_cache = {version = "0.2.20", features = ["heap_size"]}
style = {path = "../style"}
url = {version = "1.0.0", features = ["heap_size"]}
diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs
index 0f7d4864179..17d948cc8ca 100644
--- a/components/script_layout_interface/wrapper_traits.rs
+++ b/components/script_layout_interface/wrapper_traits.rs
@@ -11,7 +11,7 @@ use msg::constellation_msg::PipelineId;
use range::Range;
use restyle_damage::RestyleDamage;
use std::sync::Arc;
-use string_cache::{Atom, BorrowedAtom, BorrowedNamespace, Namespace};
+use string_cache::{Atom, Namespace};
use style::computed_values::display;
use style::context::SharedStyleContext;
use style::dom::OpaqueNode;
@@ -86,7 +86,7 @@ pub trait LayoutNode: TNode {
pub trait ThreadSafeLayoutNode: Clone + Copy + Sized + PartialEq {
type ConcreteThreadSafeLayoutElement:
ThreadSafeLayoutElement<ConcreteThreadSafeLayoutNode = Self>
- + ::selectors::Element<Impl=ServoSelectorImpl, AttrString=String>;
+ + ::selectors::Element<Impl=ServoSelectorImpl>;
type ChildrenIterator: Iterator<Item = Self> + Sized;
/// Creates a new `ThreadSafeLayoutNode` for the same `LayoutNode`
@@ -158,8 +158,8 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + Sized + PartialEq {
#[inline]
fn get_details_summary_pseudo(&self) -> Option<Self> {
if self.is_element() &&
- self.as_element().get_local_name() == atom!("details") &&
- self.as_element().get_namespace() == ns!(html) {
+ self.as_element().get_local_name() == &atom!("details") &&
+ self.as_element().get_namespace() == &ns!(html) {
Some(self.with_pseudo(PseudoElementType::DetailsSummary(None)))
} else {
None
@@ -169,8 +169,8 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + Sized + PartialEq {
#[inline]
fn get_details_content_pseudo(&self) -> Option<Self> {
if self.is_element() &&
- self.as_element().get_local_name() == atom!("details") &&
- self.as_element().get_namespace() == ns!(html) {
+ self.as_element().get_local_name() == &atom!("details") &&
+ self.as_element().get_namespace() == &ns!(html) {
let display = if self.as_element().get_attr(&ns!(), &atom!("open")).is_some() {
None // Specified by the stylesheet
} else {
@@ -351,7 +351,7 @@ pub trait DangerousThreadSafeLayoutNode: ThreadSafeLayoutNode {
}
pub trait ThreadSafeLayoutElement: Clone + Copy + Sized +
- ::selectors::Element<Impl=ServoSelectorImpl, AttrString=String> +
+ ::selectors::Element<Impl=ServoSelectorImpl> +
PresentationalHintsSynthetizer {
type ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode<ConcreteThreadSafeLayoutElement = Self>;
@@ -359,8 +359,8 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized +
fn get_attr(&self, namespace: &Namespace, name: &Atom) -> Option<&str>;
#[inline]
- fn get_local_name<'a>(&'a self) -> BorrowedAtom<'a>;
+ fn get_local_name(&self) -> &Atom;
#[inline]
- fn get_namespace<'a>(&'a self) -> BorrowedNamespace<'a>;
+ fn get_namespace(&self) -> &Namespace;
}
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index 6a1927a08a7..3f8ec6e3ac1 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -766,6 +766,7 @@ dependencies = [
"mime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
+ "ordered-float 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"profile_traits 0.0.1",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -776,7 +777,7 @@ dependencies = [
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"simd 0.1.0 (git+https://github.com/huonw/simd)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -941,7 +942,7 @@ dependencies = [
"phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1124,16 +1125,17 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
+ "ordered-float 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"profile_traits 0.0.1",
"range 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1607,6 +1609,15 @@ dependencies = [
]
[[package]]
+name = "ordered-float"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unreachable 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "osmesa-sys"
version = "0.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1893,10 +1904,10 @@ dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
@@ -1930,8 +1941,8 @@ dependencies = [
"profile_traits 0.0.1",
"range 0.0.1",
"script_traits 0.0.1",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
@@ -1978,7 +1989,7 @@ dependencies = [
[[package]]
name = "selectors"
-version = "0.7.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1989,7 +2000,7 @@ dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2162,7 +2173,7 @@ dependencies = [
[[package]]
name = "string_cache"
-version = "0.2.21"
+version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2193,14 +2204,15 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ordered-float 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2216,8 +2228,8 @@ dependencies = [
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2363,6 +2375,14 @@ dependencies = [
[[package]]
name = "unreachable"
+version = "0.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "void 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "unreachable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
@@ -2455,6 +2475,11 @@ dependencies = [
[[package]]
name = "void"
+version = "0.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2554,7 +2579,7 @@ dependencies = [
[[package]]
name = "webrender"
version = "0.1.0"
-source = "git+https://github.com/servo/webrender#66b7134918a56c561cbdf72ab284f5da83459ec4"
+source = "git+https://github.com/servo/webrender#e2e8d91f24de961bfd6b53338e2403bc0c675aab"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2673,7 +2698,7 @@ dependencies = [
"phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml
index d0e5daddb04..46f62850e60 100644
--- a/components/style/Cargo.toml
+++ b/components/style/Cargo.toml
@@ -12,11 +12,11 @@ name = "style"
path = "lib.rs"
[features]
-gecko = ["gecko_bindings", "selectors/gecko"]
+gecko = ["gecko_bindings", "gecko_string_cache"]
servo = ["serde", "serde/nightly", "serde_macros", "heapsize", "heapsize_plugin",
"style_traits/servo", "app_units/plugins", "euclid/plugins",
"cssparser/heap_size", "cssparser/serde-serialization",
- "selectors/heap_size", "selectors/unstable", "string_cache/heap_size",
+ "selectors/heap_size", "selectors/unstable", "string_cache",
"url/heap_size", "plugins"]
[dependencies]
@@ -28,19 +28,21 @@ encoding = "0.2"
euclid = "0.7.1"
fnv = "1.0"
gecko_bindings = {path = "../../ports/geckolib/gecko_bindings", optional = true}
+gecko_string_cache = {path = "../../ports/geckolib/string_cache", optional = true}
heapsize = {version = "0.3.0", optional = true}
heapsize_plugin = {version = "0.1.2", optional = true}
lazy_static = "0.2"
log = "0.3.5"
matches = "0.1"
num-traits = "0.1.32"
+ordered-float = "0.2.2"
rand = "0.3"
rustc-serialize = "0.3"
-selectors = "0.7"
+selectors = "0.8.2"
serde = {version = "0.7.15", optional = true}
serde_macros = {version = "0.7.15", optional = true}
smallvec = "0.1"
-string_cache = "0.2.20"
+string_cache = {version = "0.2.22", features = ["heap_size"], optional = true}
style_traits = {path = "../style_traits"}
time = "0.1"
url = "1.0.0"
diff --git a/components/style/attr.rs b/components/style/attr.rs
index fc741d61575..b62e001a4e1 100644
--- a/components/style/attr.rs
+++ b/components/style/attr.rs
@@ -13,7 +13,8 @@ use num_traits::ToPrimitive;
use std::ascii::AsciiExt;
use std::str::FromStr;
use str::{HTML_SPACE_CHARACTERS, read_exponent, read_fraction};
-use str::{read_numbers, split_commas, split_html_space_chars, str_join};
+use str::{read_numbers, split_commas, split_html_space_chars};
+#[cfg(not(feature = "gecko"))] use str::str_join;
use string_cache::{Atom, Namespace};
use url::Url;
use values::specified::Length;
diff --git a/components/style/dom.rs b/components/style/dom.rs
index 3406cf2815e..510f139b401 100644
--- a/components/style/dom.rs
+++ b/components/style/dom.rs
@@ -12,8 +12,7 @@ use element_state::ElementState;
use properties::{ComputedValues, PropertyDeclaration, PropertyDeclarationBlock};
use refcell::{Ref, RefMut};
use restyle_hints::{RESTYLE_DESCENDANTS, RESTYLE_LATER_SIBLINGS, RESTYLE_SELF, RestyleHint};
-use selector_impl::{ElementExt, SelectorImplExt};
-use selectors::Element;
+use selector_impl::ElementExt;
use selectors::matching::DeclarationBlock;
use sink::Push;
use std::ops::BitOr;
@@ -162,8 +161,7 @@ pub trait TNode : Sized + Copy + Clone {
/// Returns the style results for the given node. If CSS selector matching
/// has not yet been performed, fails.
- fn style(&self, _context: &SharedStyleContext) -> Ref<Arc<ComputedValues>>
- where <Self::ConcreteElement as Element>::Impl: SelectorImplExt {
+ fn style(&self, _context: &SharedStyleContext) -> Ref<Arc<ComputedValues>> {
Ref::map(self.borrow_data().unwrap(), |data| data.style.as_ref().unwrap())
}
diff --git a/components/style/gecko_selector_impl.rs b/components/style/gecko_selector_impl.rs
index 5798222cb07..055bf5f7ff6 100644
--- a/components/style/gecko_selector_impl.rs
+++ b/components/style/gecko_selector_impl.rs
@@ -3,9 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use element_state::ElementState;
-use selector_impl::{PseudoElementCascadeType, SelectorImplExt};
-use selectors::parser::{ParserContext, SelectorImpl};
-use string_cache::Atom;
+use selector_impl::PseudoElementCascadeType;
+use selector_impl::{attr_exists_selector_is_shareable, attr_equals_selector_is_shareable};
+use selectors::parser::{ParserContext, SelectorImpl, AttrSelector};
+use string_cache::{Atom, WeakAtom, Namespace, WeakNamespace};
use stylesheets::Stylesheet;
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -149,10 +150,27 @@ impl NonTSPseudoClass {
}
impl SelectorImpl for GeckoSelectorImpl {
- type AttrString = Atom;
+ type AttrValue = Atom;
+ type Identifier = Atom;
+ type ClassName = Atom;
+ type LocalName = Atom;
+ type Namespace = Namespace;
+ type BorrowedNamespace = WeakNamespace;
+ type BorrowedLocalName = WeakAtom;
+
type PseudoElement = PseudoElement;
type NonTSPseudoClass = NonTSPseudoClass;
- fn parse_non_ts_pseudo_class(_context: &ParserContext,
+
+ fn attr_exists_selector_is_shareable(attr_selector: &AttrSelector<Self>) -> bool {
+ attr_exists_selector_is_shareable(attr_selector)
+ }
+
+ fn attr_equals_selector_is_shareable(attr_selector: &AttrSelector<Self>,
+ value: &Self::AttrValue) -> bool {
+ attr_equals_selector_is_shareable(attr_selector, value)
+ }
+
+ fn parse_non_ts_pseudo_class(_context: &ParserContext<Self>,
name: &str) -> Result<NonTSPseudoClass, ()> {
use self::NonTSPseudoClass::*;
let pseudo_class = match_ignore_ascii_case! { name,
@@ -174,7 +192,7 @@ impl SelectorImpl for GeckoSelectorImpl {
Ok(pseudo_class)
}
- fn parse_pseudo_element(context: &ParserContext,
+ fn parse_pseudo_element(context: &ParserContext<Self>,
name: &str) -> Result<PseudoElement, ()> {
use self::AnonBoxPseudoElement::*;
use self::PseudoElement::*;
@@ -286,9 +304,9 @@ impl SelectorImpl for GeckoSelectorImpl {
}
}
-impl SelectorImplExt for GeckoSelectorImpl {
+impl GeckoSelectorImpl {
#[inline]
- fn pseudo_element_cascade_type(pseudo: &PseudoElement) -> PseudoElementCascadeType {
+ pub fn pseudo_element_cascade_type(pseudo: &PseudoElement) -> PseudoElementCascadeType {
match *pseudo {
PseudoElement::Before |
PseudoElement::After => PseudoElementCascadeType::Eager,
@@ -298,7 +316,7 @@ impl SelectorImplExt for GeckoSelectorImpl {
}
#[inline]
- fn each_pseudo_element<F>(mut fun: F)
+ pub fn each_pseudo_element<F>(mut fun: F)
where F: FnMut(PseudoElement) {
use self::AnonBoxPseudoElement::*;
use self::PseudoElement::*;
@@ -375,7 +393,7 @@ impl SelectorImplExt for GeckoSelectorImpl {
}
#[inline]
- fn pseudo_is_before_or_after(pseudo: &PseudoElement) -> bool {
+ pub fn pseudo_is_before_or_after(pseudo: &PseudoElement) -> bool {
match *pseudo {
PseudoElement::Before |
PseudoElement::After => true,
@@ -384,17 +402,17 @@ impl SelectorImplExt for GeckoSelectorImpl {
}
#[inline]
- fn pseudo_class_state_flag(pc: &NonTSPseudoClass) -> ElementState {
+ pub fn pseudo_class_state_flag(pc: &NonTSPseudoClass) -> ElementState {
pc.state_flag()
}
#[inline]
- fn get_user_or_user_agent_stylesheets() -> &'static [Stylesheet] {
+ pub fn get_user_or_user_agent_stylesheets() -> &'static [Stylesheet] {
&[]
}
#[inline]
- fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet> {
+ pub fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet> {
None
}
}
diff --git a/components/style/lib.rs b/components/style/lib.rs
index aa1f91b6c83..1f760aa6d10 100644
--- a/components/style/lib.rs
+++ b/components/style/lib.rs
@@ -45,8 +45,8 @@ extern crate deque;
extern crate encoding;
extern crate euclid;
extern crate fnv;
-#[cfg(feature = "gecko")]
-extern crate gecko_bindings;
+#[cfg(feature = "gecko")] extern crate gecko_bindings;
+#[cfg(feature = "gecko")] #[macro_use] extern crate gecko_string_cache as string_cache;
#[cfg(feature = "servo")] extern crate heapsize;
#[allow(unused_extern_crates)]
#[macro_use]
@@ -57,12 +57,13 @@ extern crate log;
#[macro_use]
extern crate matches;
extern crate num_traits;
+extern crate ordered_float;
extern crate rand;
extern crate rustc_serialize;
extern crate selectors;
#[cfg(feature = "servo")] extern crate serde;
extern crate smallvec;
-#[macro_use(atom, ns)] extern crate string_cache;
+#[cfg(feature = "servo")] #[macro_use] extern crate string_cache;
#[macro_use]
extern crate style_traits;
extern crate time;
diff --git a/components/style/matching.rs b/components/style/matching.rs
index f8a7c0dc160..170534940a7 100644
--- a/components/style/matching.rs
+++ b/components/style/matching.rs
@@ -13,14 +13,13 @@ use context::{StyleContext, SharedStyleContext};
use data::PrivateStyleData;
use dom::{TElement, TNode, TRestyleDamage};
use properties::{ComputedValues, PropertyDeclaration, cascade};
-use selector_impl::{ElementExt, SelectorImplExt, TheSelectorImpl, PseudoElement};
+use selector_impl::{ElementExt, TheSelectorImpl, PseudoElement};
use selector_matching::{DeclarationBlock, Stylist};
-use selectors::Element;
use selectors::bloom::BloomFilter;
-use selectors::matching::{CommonStyleAffectingAttributeMode, CommonStyleAffectingAttributes};
-use selectors::matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
+use selectors::{Element, MatchAttr};
use sink::ForgetfulSink;
use smallvec::SmallVec;
+use std::borrow::Borrow;
use std::collections::HashMap;
use std::hash::{BuildHasherDefault, Hash, Hasher};
use std::slice::Iter;
@@ -257,7 +256,7 @@ impl StyleSharingCandidate {
}
pub fn can_share_style_with<E: TElement>(&self, element: &E) -> bool {
- if *element.get_local_name() != self.local_name {
+ if element.get_local_name() != self.local_name.borrow() {
return false
}
@@ -276,7 +275,7 @@ impl StyleSharingCandidate {
return false;
}
- if *element.get_namespace() != self.namespace {
+ if element.get_namespace() != self.namespace.borrow() {
return false
}
@@ -327,6 +326,61 @@ impl StyleSharingCandidate {
}
}
+bitflags! {
+ pub flags CommonStyleAffectingAttributes: u8 {
+ const HIDDEN_ATTRIBUTE = 0x01,
+ const NO_WRAP_ATTRIBUTE = 0x02,
+ const ALIGN_LEFT_ATTRIBUTE = 0x04,
+ const ALIGN_CENTER_ATTRIBUTE = 0x08,
+ const ALIGN_RIGHT_ATTRIBUTE = 0x10,
+ }
+}
+
+pub struct CommonStyleAffectingAttributeInfo {
+ pub atom: Atom,
+ pub mode: CommonStyleAffectingAttributeMode,
+}
+
+#[derive(Clone)]
+pub enum CommonStyleAffectingAttributeMode {
+ IsPresent(CommonStyleAffectingAttributes),
+ IsEqual(Atom, CommonStyleAffectingAttributes),
+}
+
+// NB: This must match the order in `selectors::matching::CommonStyleAffectingAttributes`.
+#[inline]
+pub fn common_style_affecting_attributes() -> [CommonStyleAffectingAttributeInfo; 5] {
+ [
+ CommonStyleAffectingAttributeInfo {
+ atom: atom!("hidden"),
+ mode: CommonStyleAffectingAttributeMode::IsPresent(HIDDEN_ATTRIBUTE),
+ },
+ CommonStyleAffectingAttributeInfo {
+ atom: atom!("nowrap"),
+ mode: CommonStyleAffectingAttributeMode::IsPresent(NO_WRAP_ATTRIBUTE),
+ },
+ CommonStyleAffectingAttributeInfo {
+ atom: atom!("align"),
+ mode: CommonStyleAffectingAttributeMode::IsEqual(atom!("left"), ALIGN_LEFT_ATTRIBUTE),
+ },
+ CommonStyleAffectingAttributeInfo {
+ atom: atom!("align"),
+ mode: CommonStyleAffectingAttributeMode::IsEqual(atom!("center"), ALIGN_CENTER_ATTRIBUTE),
+ },
+ CommonStyleAffectingAttributeInfo {
+ atom: atom!("align"),
+ mode: CommonStyleAffectingAttributeMode::IsEqual(atom!("right"), ALIGN_RIGHT_ATTRIBUTE),
+ }
+ ]
+}
+
+/// Attributes that, if present, disable style sharing. All legacy HTML attributes must be in
+/// either this list or `common_style_affecting_attributes`. See the comment in
+/// `synthesize_presentational_hints_for_legacy_attributes`.
+pub fn rare_style_affecting_attributes() -> [Atom; 3] {
+ [ atom!("bgcolor"), atom!("border"), atom!("colspan") ]
+}
+
static STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 40;
impl StyleSharingCandidateCache {
@@ -361,8 +415,7 @@ pub enum StyleSharingResult<ConcreteRestyleDamage: TRestyleDamage> {
StyleWasShared(usize, ConcreteRestyleDamage),
}
-trait PrivateMatchMethods: TNode
- where <Self::ConcreteElement as Element>::Impl: SelectorImplExt {
+trait PrivateMatchMethods: TNode {
/// Actually cascades style for a node or a pseudo-element of a node.
///
/// Note that animations only apply to nodes or ::before or ::after
@@ -507,8 +560,7 @@ trait PrivateMatchMethods: TNode
}
}
-impl<N: TNode> PrivateMatchMethods for N
- where <N::ConcreteElement as Element>::Impl: SelectorImplExt {}
+impl<N: TNode> PrivateMatchMethods for N {}
trait PrivateElementMatchMethods: TElement {
fn share_style_with_candidate_if_possible(&self,
@@ -611,8 +663,7 @@ pub trait ElementMatchMethods : TElement {
}
}
-impl<E: TElement> ElementMatchMethods for E
- where E::Impl: SelectorImplExt {}
+impl<E: TElement> ElementMatchMethods for E {}
pub trait MatchMethods : TNode {
// The below two functions are copy+paste because I can't figure out how to
@@ -713,7 +764,7 @@ pub trait MatchMethods : TNode {
data.style = Some(final_style);
- <Self::ConcreteElement as Element>::Impl::each_eagerly_cascaded_pseudo_element(|pseudo| {
+ <Self::ConcreteElement as MatchAttr>::Impl::each_eagerly_cascaded_pseudo_element(|pseudo| {
let applicable_declarations_for_this_pseudo =
applicable_declarations.per_pseudo.get(&pseudo).unwrap();
@@ -721,7 +772,7 @@ pub trait MatchMethods : TNode {
// NB: Transitions and animations should only work for
// pseudo-elements ::before and ::after
let should_animate_properties =
- <Self::ConcreteElement as Element>::Impl::pseudo_is_before_or_after(&pseudo);
+ <Self::ConcreteElement as MatchAttr>::Impl::pseudo_is_before_or_after(&pseudo);
let (new_damage, style) = self.cascade_node_pseudo_element(
context,
Some(data.style.as_ref().unwrap()),
diff --git a/components/style/parser.rs b/components/style/parser.rs
index f7aaf97465c..52ce1d9d5fd 100644
--- a/components/style/parser.rs
+++ b/components/style/parser.rs
@@ -8,6 +8,7 @@ use cssparser::{Parser, SourcePosition};
use error_reporting::ParseErrorReporter;
#[cfg(feature = "gecko")]
use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
+use selector_impl::TheSelectorImpl;
use selectors::parser::ParserContext as SelectorParserContext;
use stylesheets::Origin;
use url::Url;
@@ -37,7 +38,7 @@ impl ParserContextExtraData {
pub struct ParserContext<'a> {
pub stylesheet_origin: Origin,
pub base_url: &'a Url,
- pub selector_context: SelectorParserContext,
+ pub selector_context: SelectorParserContext<TheSelectorImpl>,
pub error_reporter: Box<ParseErrorReporter + Send>,
pub extra_data: ParserContextExtraData,
}
diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs
index c9a3ab8cb64..be4a26305ee 100644
--- a/components/style/properties/helpers/animated_properties.mako.rs
+++ b/components/style/properties/helpers/animated_properties.mako.rs
@@ -326,9 +326,25 @@ impl Interpolate for CSSParserColor {
impl Interpolate for CalcLengthOrPercentage {
#[inline]
fn interpolate(&self, other: &Self, time: f64) -> Result<Self, ()> {
+ fn interpolate_half<T>(this: Option<T>,
+ other: Option<T>,
+ time: f64)
+ -> Result<Option<T>, ()>
+ where T: Default + Interpolate
+ {
+ match (this, other) {
+ (None, None) => Ok(None),
+ (this, other) => {
+ let this = this.unwrap_or(T::default());
+ let other = other.unwrap_or(T::default());
+ this.interpolate(&other, time).map(Some)
+ }
+ }
+ }
+
Ok(CalcLengthOrPercentage {
- length: self.length.interpolate(&other.length, time).ok().and_then(|x|x),
- percentage: self.percentage.interpolate(&other.percentage, time).ok().and_then(|x|x),
+ length: try!(interpolate_half(self.length, other.length, time)),
+ percentage: try!(interpolate_half(self.percentage, other.percentage, time)),
})
}
}
diff --git a/components/style/properties/longhand/inherited_text.mako.rs b/components/style/properties/longhand/inherited_text.mako.rs
index abf15d3fd04..c166fc47700 100644
--- a/components/style/properties/longhand/inherited_text.mako.rs
+++ b/components/style/properties/longhand/inherited_text.mako.rs
@@ -285,7 +285,7 @@
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub enum SpecifiedValue {
Normal,
- Specified(specified::Length), // FIXME(SimonSapin) support percentages
+ Specified(specified::LengthOrPercentage),
}
impl ToCss for SpecifiedValue {
@@ -298,10 +298,10 @@
}
pub mod computed_value {
- use app_units::Au;
+ use values::computed::LengthOrPercentage;
#[derive(Debug, Clone, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
- pub struct T(pub Option<Au>);
+ pub struct T(pub Option<LengthOrPercentage>);
}
impl ToCss for computed_value::T {
@@ -326,7 +326,7 @@
match *self {
SpecifiedValue::Normal => computed_value::T(None),
SpecifiedValue::Specified(l) =>
- computed_value::T(Some(l.to_computed_value(context)))
+ computed_value::T(Some(l.to_computed_value(context))),
}
}
}
@@ -335,7 +335,8 @@
if input.try(|input| input.expect_ident_matching("normal")).is_ok() {
Ok(SpecifiedValue::Normal)
} else {
- specified::Length::parse_non_negative(input).map(SpecifiedValue::Specified)
+ specified::LengthOrPercentage::parse_non_negative(input)
+ .map(SpecifiedValue::Specified)
}
}
</%helpers:longhand>
diff --git a/components/style/restyle_hints.rs b/components/style/restyle_hints.rs
index 619aa22724b..4f1467c4584 100644
--- a/components/style/restyle_hints.rs
+++ b/components/style/restyle_hints.rs
@@ -5,13 +5,13 @@
//! Restyle hints: an optimization to avoid unnecessarily matching selectors.
use element_state::*;
-use selector_impl::{ElementExt, SelectorImplExt, TheSelectorImpl, AttrString};
+use selector_impl::{ElementExt, TheSelectorImpl, NonTSPseudoClass, AttrValue};
use selectors::matching::matches_compound_selector;
-use selectors::parser::{AttrSelector, Combinator, CompoundSelector, SelectorImpl, SimpleSelector};
+use selectors::parser::{AttrSelector, Combinator, CompoundSelector, SimpleSelector, SelectorImpl};
use selectors::{Element, MatchAttr};
use std::clone::Clone;
use std::sync::Arc;
-use string_cache::{Atom, BorrowedAtom, BorrowedNamespace};
+use string_cache::Atom;
/// When the ElementState of an element (like IN_HOVER_STATE) changes, certain
/// pseudo-classes (like :hover) may require us to restyle that element, its
@@ -52,7 +52,7 @@ bitflags! {
/// still need to take the ElementWrapper approach for attribute-dependent
/// style. So we do it the same both ways for now to reduce complexity, but it's
/// worth measuring the performance impact (if any) of the mStateMask approach.
-pub trait ElementSnapshot : Sized + MatchAttr {
+pub trait ElementSnapshot : Sized + MatchAttr<Impl=TheSelectorImpl> {
/// The state of the snapshot, if any.
fn state(&self) -> Option<ElementState>;
@@ -93,11 +93,11 @@ impl<'a, E> ElementWrapper<'a, E>
}
impl<'a, E> MatchAttr for ElementWrapper<'a, E>
- where E: ElementExt<AttrString=AttrString>,
+ where E: ElementExt,
{
- type AttrString = E::AttrString;
+ type Impl = TheSelectorImpl;
- fn match_attr_has(&self, attr: &AttrSelector) -> bool {
+ fn match_attr_has(&self, attr: &AttrSelector<TheSelectorImpl>) -> bool {
match self.snapshot {
Some(snapshot) if snapshot.has_attrs()
=> snapshot.match_attr_has(attr),
@@ -106,8 +106,8 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E>
}
fn match_attr_equals(&self,
- attr: &AttrSelector,
- value: &Self::AttrString) -> bool {
+ attr: &AttrSelector<TheSelectorImpl>,
+ value: &AttrValue) -> bool {
match self.snapshot {
Some(snapshot) if snapshot.has_attrs()
=> snapshot.match_attr_equals(attr, value),
@@ -116,8 +116,8 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E>
}
fn match_attr_equals_ignore_ascii_case(&self,
- attr: &AttrSelector,
- value: &Self::AttrString) -> bool {
+ attr: &AttrSelector<TheSelectorImpl>,
+ value: &AttrValue) -> bool {
match self.snapshot {
Some(snapshot) if snapshot.has_attrs()
=> snapshot.match_attr_equals_ignore_ascii_case(attr, value),
@@ -126,8 +126,8 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E>
}
fn match_attr_includes(&self,
- attr: &AttrSelector,
- value: &Self::AttrString) -> bool {
+ attr: &AttrSelector<TheSelectorImpl>,
+ value: &AttrValue) -> bool {
match self.snapshot {
Some(snapshot) if snapshot.has_attrs()
=> snapshot.match_attr_includes(attr, value),
@@ -136,8 +136,8 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E>
}
fn match_attr_dash(&self,
- attr: &AttrSelector,
- value: &Self::AttrString) -> bool {
+ attr: &AttrSelector<TheSelectorImpl>,
+ value: &AttrValue) -> bool {
match self.snapshot {
Some(snapshot) if snapshot.has_attrs()
=> snapshot.match_attr_dash(attr, value),
@@ -146,8 +146,8 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E>
}
fn match_attr_prefix(&self,
- attr: &AttrSelector,
- value: &Self::AttrString) -> bool {
+ attr: &AttrSelector<TheSelectorImpl>,
+ value: &AttrValue) -> bool {
match self.snapshot {
Some(snapshot) if snapshot.has_attrs()
=> snapshot.match_attr_prefix(attr, value),
@@ -156,8 +156,8 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E>
}
fn match_attr_substring(&self,
- attr: &AttrSelector,
- value: &Self::AttrString) -> bool {
+ attr: &AttrSelector<TheSelectorImpl>,
+ value: &AttrValue) -> bool {
match self.snapshot {
Some(snapshot) if snapshot.has_attrs()
=> snapshot.match_attr_substring(attr, value),
@@ -166,8 +166,8 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E>
}
fn match_attr_suffix(&self,
- attr: &AttrSelector,
- value: &Self::AttrString) -> bool {
+ attr: &AttrSelector<TheSelectorImpl>,
+ value: &AttrValue) -> bool {
match self.snapshot {
Some(snapshot) if snapshot.has_attrs()
=> snapshot.match_attr_suffix(attr, value),
@@ -177,13 +177,10 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E>
}
impl<'a, E> Element for ElementWrapper<'a, E>
- where E: ElementExt<AttrString=AttrString>,
- E::Impl: SelectorImplExt<AttrString=AttrString> {
- type Impl = E::Impl;
-
- fn match_non_ts_pseudo_class(&self,
- pseudo_class: <Self::Impl as SelectorImpl>::NonTSPseudoClass) -> bool {
- let flag = Self::Impl::pseudo_class_state_flag(&pseudo_class);
+ where E: ElementExt<Impl=TheSelectorImpl>
+{
+ fn match_non_ts_pseudo_class(&self, pseudo_class: NonTSPseudoClass) -> bool {
+ let flag = TheSelectorImpl::pseudo_class_state_flag(&pseudo_class);
if flag == ElementState::empty() {
self.element.match_non_ts_pseudo_class(pseudo_class)
} else {
@@ -218,11 +215,11 @@ impl<'a, E> Element for ElementWrapper<'a, E>
self.element.is_html_element_in_html_document()
}
- fn get_local_name(&self) -> BorrowedAtom {
+ fn get_local_name(&self) -> &<Self::Impl as SelectorImpl>::BorrowedLocalName {
self.element.get_local_name()
}
- fn get_namespace(&self) -> BorrowedNamespace {
+ fn get_namespace(&self) -> &<Self::Impl as SelectorImpl>::BorrowedNamespace {
self.element.get_namespace()
}
diff --git a/components/style/selector_impl.rs b/components/style/selector_impl.rs
index 923fdb7a75a..276b721ba7f 100644
--- a/components/style/selector_impl.rs
+++ b/components/style/selector_impl.rs
@@ -4,14 +4,12 @@
//! The pseudo-classes and pseudo-elements supported by the style system.
-use element_state::ElementState;
+use matching::{common_style_affecting_attributes, CommonStyleAffectingAttributeMode};
use restyle_hints;
use selectors::Element;
-use selectors::parser::SelectorImpl;
-use std::fmt::Debug;
-use stylesheets::Stylesheet;
+use selectors::parser::{AttrSelector, SelectorImpl};
-pub type AttrString = <TheSelectorImpl as SelectorImpl>::AttrString;
+pub type AttrValue = <TheSelectorImpl as SelectorImpl>::AttrValue;
#[cfg(feature = "servo")]
pub use servo_selector_impl::*;
@@ -72,22 +70,15 @@ impl PseudoElementCascadeType {
}
}
-pub trait ElementExt: Element<Impl=TheSelectorImpl, AttrString=<TheSelectorImpl as SelectorImpl>::AttrString> {
- type Snapshot: restyle_hints::ElementSnapshot<AttrString = Self::AttrString> + 'static;
+pub trait ElementExt: Element<Impl=TheSelectorImpl> {
+ type Snapshot: restyle_hints::ElementSnapshot + 'static;
fn is_link(&self) -> bool;
}
-// NB: The `Clone` trait is here for convenience due to:
-// https://github.com/rust-lang/rust/issues/26925
-pub trait SelectorImplExt : SelectorImpl + Clone + Debug + Sized + 'static {
- fn pseudo_element_cascade_type(pseudo: &Self::PseudoElement) -> PseudoElementCascadeType;
-
- fn each_pseudo_element<F>(mut fun: F)
- where F: FnMut(Self::PseudoElement);
-
+impl TheSelectorImpl {
#[inline]
- fn each_eagerly_cascaded_pseudo_element<F>(mut fun: F)
+ pub fn each_eagerly_cascaded_pseudo_element<F>(mut fun: F)
where F: FnMut(<Self as SelectorImpl>::PseudoElement) {
Self::each_pseudo_element(|pseudo| {
if Self::pseudo_element_cascade_type(&pseudo).is_eager() {
@@ -97,7 +88,7 @@ pub trait SelectorImplExt : SelectorImpl + Clone + Debug + Sized + 'static {
}
#[inline]
- fn each_precomputed_pseudo_element<F>(mut fun: F)
+ pub fn each_precomputed_pseudo_element<F>(mut fun: F)
where F: FnMut(<Self as SelectorImpl>::PseudoElement) {
Self::each_pseudo_element(|pseudo| {
if Self::pseudo_element_cascade_type(&pseudo).is_precomputed() {
@@ -105,12 +96,30 @@ pub trait SelectorImplExt : SelectorImpl + Clone + Debug + Sized + 'static {
}
})
}
+}
- fn pseudo_is_before_or_after(pseudo: &Self::PseudoElement) -> bool;
-
- fn pseudo_class_state_flag(pc: &Self::NonTSPseudoClass) -> ElementState;
-
- fn get_user_or_user_agent_stylesheets() -> &'static [Stylesheet];
+pub fn attr_exists_selector_is_shareable(attr_selector: &AttrSelector<TheSelectorImpl>) -> bool {
+ // NB(pcwalton): If you update this, remember to update the corresponding list in
+ // `can_share_style_with()` as well.
+ common_style_affecting_attributes().iter().any(|common_attr_info| {
+ common_attr_info.atom == attr_selector.name && match common_attr_info.mode {
+ CommonStyleAffectingAttributeMode::IsPresent(_) => true,
+ CommonStyleAffectingAttributeMode::IsEqual(..) => false,
+ }
+ })
+}
- fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet>;
+pub fn attr_equals_selector_is_shareable(attr_selector: &AttrSelector<TheSelectorImpl>,
+ value: &AttrValue) -> bool {
+ // FIXME(pcwalton): Remove once we start actually supporting RTL text. This is in
+ // here because the UA style otherwise disables all style sharing completely.
+ atom!("dir") == *value ||
+ common_style_affecting_attributes().iter().any(|common_attr_info| {
+ common_attr_info.atom == attr_selector.name && match common_attr_info.mode {
+ CommonStyleAffectingAttributeMode::IsEqual(ref target_value, _) => {
+ *target_value == *value
+ }
+ CommonStyleAffectingAttributeMode::IsPresent(_) => false,
+ }
+ })
}
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs
index 5451bae28bf..7b18a897d73 100644
--- a/components/style/selector_matching.rs
+++ b/components/style/selector_matching.rs
@@ -11,7 +11,7 @@ use keyframes::KeyframesAnimation;
use media_queries::{Device, MediaType};
use properties::{self, PropertyDeclaration, PropertyDeclarationBlock, ComputedValues};
use restyle_hints::{RestyleHint, DependencySet};
-use selector_impl::{ElementExt, SelectorImplExt, TheSelectorImpl, PseudoElement, AttrString};
+use selector_impl::{ElementExt, TheSelectorImpl, PseudoElement};
use selectors::Element;
use selectors::bloom::BloomFilter;
use selectors::matching::DeclarationBlock as GenericDeclarationBlock;
@@ -38,13 +38,6 @@ pub type DeclarationBlock = GenericDeclarationBlock<Vec<PropertyDeclaration>>;
///
/// This structure is effectively created once per pipeline, in the
/// LayoutThread corresponding to that pipeline.
-///
-/// The stylist is parameterized on `SelectorImplExt`, a trait that extends
-/// `selectors::parser::SelectorImpl`, and that allows to customise what
-/// pseudo-classes and pseudo-elements are parsed. This is actually either
-/// `ServoSelectorImpl`, the implementation used by Servo's layout system in
-/// regular builds, or `GeckoSelectorImpl`, the implementation used in the
-/// geckolib port.
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub struct Stylist {
/// Device that the stylist is currently evaluating against.
@@ -249,7 +242,7 @@ impl Stylist {
pseudo: &PseudoElement,
parent: &Arc<ComputedValues>)
-> Option<Arc<ComputedValues>>
- where E: Element<Impl=TheSelectorImpl, AttrString=AttrString> +
+ where E: Element<Impl=TheSelectorImpl> +
PresentationalHintsSynthetizer {
debug_assert!(TheSelectorImpl::pseudo_element_cascade_type(pseudo).is_lazy());
if self.pseudos_map.get(pseudo).is_none() {
@@ -315,7 +308,7 @@ impl Stylist {
pseudo_element: Option<&PseudoElement>,
applicable_declarations: &mut V)
-> bool
- where E: Element<Impl=TheSelectorImpl, AttrString=AttrString> +
+ where E: Element<Impl=TheSelectorImpl> +
PresentationalHintsSynthetizer,
V: Push<DeclarationBlock> + VecLike<DeclarationBlock> {
assert!(!self.is_device_dirty);
diff --git a/components/style/servo_selector_impl.rs b/components/style/servo_selector_impl.rs
index 5904cc3a478..fab4315dd9f 100644
--- a/components/style/servo_selector_impl.rs
+++ b/components/style/servo_selector_impl.rs
@@ -7,7 +7,8 @@ use element_state::ElementState;
use error_reporting::StdoutErrorReporter;
use parser::ParserContextExtraData;
use restyle_hints::ElementSnapshot;
-use selector_impl::{SelectorImplExt, ElementExt, PseudoElementCascadeType, TheSelectorImpl};
+use selector_impl::{ElementExt, PseudoElementCascadeType, TheSelectorImpl};
+use selector_impl::{attr_exists_selector_is_shareable, attr_equals_selector_is_shareable};
use selectors::parser::{AttrSelector, ParserContext, SelectorImpl};
use selectors::{Element, MatchAttrGeneric};
use std::process;
@@ -98,11 +99,27 @@ impl NonTSPseudoClass {
pub struct ServoSelectorImpl;
impl SelectorImpl for ServoSelectorImpl {
- type AttrString = String;
type PseudoElement = PseudoElement;
type NonTSPseudoClass = NonTSPseudoClass;
- fn parse_non_ts_pseudo_class(context: &ParserContext,
+ type AttrValue = String;
+ type Identifier = Atom;
+ type ClassName = Atom;
+ type LocalName = Atom;
+ type Namespace = Namespace;
+ type BorrowedLocalName = Atom;
+ type BorrowedNamespace = Namespace;
+
+ fn attr_exists_selector_is_shareable(attr_selector: &AttrSelector<Self>) -> bool {
+ attr_exists_selector_is_shareable(attr_selector)
+ }
+
+ fn attr_equals_selector_is_shareable(attr_selector: &AttrSelector<Self>,
+ value: &Self::AttrValue) -> bool {
+ attr_equals_selector_is_shareable(attr_selector, value)
+ }
+
+ fn parse_non_ts_pseudo_class(context: &ParserContext<TheSelectorImpl>,
name: &str) -> Result<NonTSPseudoClass, ()> {
use self::NonTSPseudoClass::*;
let pseudo_class = match_ignore_ascii_case! { name,
@@ -132,7 +149,7 @@ impl SelectorImpl for ServoSelectorImpl {
Ok(pseudo_class)
}
- fn parse_pseudo_element(context: &ParserContext,
+ fn parse_pseudo_element(context: &ParserContext<TheSelectorImpl>,
name: &str) -> Result<PseudoElement, ()> {
use self::PseudoElement::*;
let pseudo_element = match_ignore_ascii_case! { name,
@@ -158,14 +175,14 @@ impl SelectorImpl for ServoSelectorImpl {
}
}
-impl SelectorImplExt for ServoSelectorImpl {
+impl ServoSelectorImpl {
#[inline]
- fn pseudo_element_cascade_type(pseudo: &PseudoElement) -> PseudoElementCascadeType {
+ pub fn pseudo_element_cascade_type(pseudo: &PseudoElement) -> PseudoElementCascadeType {
pseudo.cascade_type()
}
#[inline]
- fn each_pseudo_element<F>(mut fun: F)
+ pub fn each_pseudo_element<F>(mut fun: F)
where F: FnMut(PseudoElement) {
fun(PseudoElement::Before);
fun(PseudoElement::After);
@@ -175,22 +192,22 @@ impl SelectorImplExt for ServoSelectorImpl {
}
#[inline]
- fn pseudo_class_state_flag(pc: &NonTSPseudoClass) -> ElementState {
+ pub fn pseudo_class_state_flag(pc: &NonTSPseudoClass) -> ElementState {
pc.state_flag()
}
#[inline]
- fn pseudo_is_before_or_after(pseudo: &PseudoElement) -> bool {
+ pub fn pseudo_is_before_or_after(pseudo: &PseudoElement) -> bool {
pseudo.is_before_or_after()
}
#[inline]
- fn get_user_or_user_agent_stylesheets() -> &'static [Stylesheet] {
+ pub fn get_user_or_user_agent_stylesheets() -> &'static [Stylesheet] {
&*USER_OR_USER_AGENT_STYLESHEETS
}
#[inline]
- fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet> {
+ pub fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet> {
Some(&*QUIRKS_MODE_STYLESHEET)
}
}
@@ -257,7 +274,9 @@ impl ElementSnapshot for ServoElementSnapshot {
}
impl MatchAttrGeneric for ServoElementSnapshot {
- fn match_attr<F>(&self, attr: &AttrSelector, test: F) -> bool
+ type Impl = ServoSelectorImpl;
+
+ fn match_attr<F>(&self, attr: &AttrSelector<ServoSelectorImpl>, test: F) -> bool
where F: Fn(&str) -> bool
{
use selectors::parser::NamespaceConstraint;
@@ -270,7 +289,7 @@ impl MatchAttrGeneric for ServoElementSnapshot {
}
}
-impl<E: Element<Impl=TheSelectorImpl, AttrString=String>> ElementExt for E {
+impl<E: Element<Impl=TheSelectorImpl>> ElementExt for E {
type Snapshot = ServoElementSnapshot;
fn is_link(&self) -> bool {
diff --git a/components/style/traversal.rs b/components/style/traversal.rs
index e56db456dbf..ded29719397 100644
--- a/components/style/traversal.rs
+++ b/components/style/traversal.rs
@@ -8,8 +8,6 @@ use animation;
use context::{SharedStyleContext, StyleContext};
use dom::{OpaqueNode, TElement, TNode, TRestyleDamage, UnsafeNode};
use matching::{ApplicableDeclarations, ElementMatchMethods, MatchMethods, StyleSharingResult};
-use selector_impl::SelectorImplExt;
-use selectors::Element;
use selectors::bloom::BloomFilter;
use std::cell::RefCell;
use tid::tid;
@@ -181,8 +179,7 @@ pub fn recalc_style_at<'a, N, C>(context: &'a C,
root: OpaqueNode,
node: N)
where N: TNode,
- C: StyleContext<'a>,
- <N::ConcreteElement as Element>::Impl: SelectorImplExt + 'a {
+ C: StyleContext<'a> {
// Get the parent node.
let parent_opt = match node.parent_node() {
Some(parent) if parent.is_element() => Some(parent),
diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs
index 49b3f2e7285..9864cd67983 100644
--- a/components/style/values/computed/mod.rs
+++ b/components/style/values/computed/mod.rs
@@ -4,6 +4,7 @@
use app_units::Au;
use euclid::size::Size2D;
+use ordered_float::NotNaN;
use properties::ComputedValues;
use std::fmt;
use super::LocalToCss;
@@ -241,6 +242,15 @@ impl LengthOrPercentage {
Length(_) | Percentage(_) | Calc(_) => false
}
}
+
+ pub fn to_hash_key(&self) -> (Au, NotNaN<f32>) {
+ use self::LengthOrPercentage::*;
+ match *self {
+ Length(l) => (l, NotNaN::new(0.0).unwrap()),
+ Percentage(p) => (Au(0), NotNaN::new(p).unwrap()),
+ Calc(c) => (c.length(), NotNaN::new(c.percentage()).unwrap()),
+ }
+ }
}
impl fmt::Debug for LengthOrPercentage {
diff --git a/components/style/values/specified/basic_shape.rs b/components/style/values/specified/basic_shape.rs
index a8193116b75..7616bb7bf6d 100644
--- a/components/style/values/specified/basic_shape.rs
+++ b/components/style/values/specified/basic_shape.rs
@@ -7,14 +7,13 @@
//!
//! [basic-shape]: https://drafts.csswg.org/css-shapes/#typedef-basic-shape
-use app_units::Au;
use cssparser::{Parser, ToCss};
use properties::shorthands::{parse_four_sides, serialize_four_sides};
use std::fmt;
use values::computed::basic_shape as computed_basic_shape;
use values::computed::{Context, ToComputedValue, ComputedValueAsSpecified};
-use values::specified::position::{Position, PositionComponent};
-use values::specified::{BorderRadiusSize, Length, LengthOrPercentage, Percentage};
+use values::specified::position::Position;
+use values::specified::{BorderRadiusSize, LengthOrPercentage, Percentage};
#[derive(Clone, PartialEq, Debug)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
diff --git a/etc/ci/buildbot_steps.yml b/etc/ci/buildbot_steps.yml
index 473c6379d5a..c5f3ad63b7b 100644
--- a/etc/ci/buildbot_steps.yml
+++ b/etc/ci/buildbot_steps.yml
@@ -27,6 +27,14 @@ mac-nightly:
- ./mach package --release
- ./etc/ci/upload_nightly.sh mac
+linux-rel-intermittent:
+ - ./mach build --release
+ - ./etc/ci/check_intermittents.sh
+
+mac-rel-intermittent:
+ - ./mach build --release
+ - ./etc/ci/check_intermittents.sh
+
linux-dev:
- ./mach test-tidy --no-progress --all
- ./mach test-tidy --no-progress --self-test
diff --git a/etc/ci/check_intermittents.sh b/etc/ci/check_intermittents.sh
new file mode 100755
index 00000000000..0ba915e4a86
--- /dev/null
+++ b/etc/ci/check_intermittents.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+
+set -o errexit
+set -o nounset
+set -o pipefail
+REPEAT_COUNT=100
+
+for test_type in wpt css; do
+ while read test_name; do
+ echo " - Checking ${test_name}"
+ ./mach "test-${test_type}" \
+ --release \
+ --log-raw - \
+ --repeat "${REPEAT_COUNT}" \
+ "${test_name}" \
+ > intermittents.log \
+ < /dev/null
+ done < "etc/ci/former_intermittents_${test_type}.txt"
+done
+
diff --git a/etc/ci/former_intermittents_css.txt b/etc/ci/former_intermittents_css.txt
new file mode 100644
index 00000000000..19abe956cb8
--- /dev/null
+++ b/etc/ci/former_intermittents_css.txt
@@ -0,0 +1,3 @@
+/css-transforms-1_dev/html/transform-table-007.htm
+/css-transforms-1_dev/html/transform-abspos-002.htm
+/css-transforms-1_dev/html/transform-abspos-007.htm
diff --git a/etc/ci/former_intermittents_wpt.txt b/etc/ci/former_intermittents_wpt.txt
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/etc/ci/former_intermittents_wpt.txt
diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock
index 76b49f1f76a..b2a898f764b 100644
--- a/ports/cef/Cargo.lock
+++ b/ports/cef/Cargo.lock
@@ -684,6 +684,7 @@ dependencies = [
"mime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
+ "ordered-float 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"profile_traits 0.0.1",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -694,7 +695,7 @@ dependencies = [
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"simd 0.1.0 (git+https://github.com/huonw/simd)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -850,7 +851,7 @@ dependencies = [
"phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1033,16 +1034,17 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
+ "ordered-float 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"profile_traits 0.0.1",
"range 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1481,6 +1483,15 @@ dependencies = [
]
[[package]]
+name = "ordered-float"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unreachable 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "osmesa-sys"
version = "0.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1747,10 +1758,10 @@ dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
@@ -1784,8 +1795,8 @@ dependencies = [
"profile_traits 0.0.1",
"range 0.0.1",
"script_traits 0.0.1",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
@@ -1822,7 +1833,7 @@ dependencies = [
[[package]]
name = "selectors"
-version = "0.7.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1833,7 +1844,7 @@ dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2047,7 +2058,7 @@ dependencies = [
[[package]]
name = "string_cache"
-version = "0.2.21"
+version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2078,14 +2089,15 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ordered-float 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2232,6 +2244,14 @@ dependencies = [
[[package]]
name = "unreachable"
+version = "0.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "void 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "unreachable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
@@ -2317,6 +2337,11 @@ dependencies = [
[[package]]
name = "void"
+version = "0.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2416,7 +2441,7 @@ dependencies = [
[[package]]
name = "webrender"
version = "0.1.0"
-source = "git+https://github.com/servo/webrender#66b7134918a56c561cbdf72ab284f5da83459ec4"
+source = "git+https://github.com/servo/webrender#e2e8d91f24de961bfd6b53338e2403bc0c675aab"
dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2535,7 +2560,7 @@ dependencies = [
"phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock
index 405fadd6627..8b7002cd4c3 100644
--- a/ports/geckolib/Cargo.lock
+++ b/ports/geckolib/Cargo.lock
@@ -6,12 +6,12 @@ dependencies = [
"env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gecko_bindings 0.0.1",
+ "gecko_string_cache 0.2.20",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -57,6 +57,14 @@ dependencies = [
]
[[package]]
+name = "debug_unreachable"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "deque"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -155,6 +163,18 @@ dependencies = [
]
[[package]]
+name = "gecko_string_cache"
+version = "0.2.20"
+dependencies = [
+ "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gecko_bindings 0.0.1",
+ "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "getopts"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -215,6 +235,33 @@ dependencies = [
]
[[package]]
+name = "num"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-iter 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num-iter"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-integer 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "num-traits"
version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -228,6 +275,29 @@ dependencies = [
]
[[package]]
+name = "ordered-float"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unreachable 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.7.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "phf_shared 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.7.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "quickersort"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -268,7 +338,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "selectors"
-version = "0.7.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -277,7 +347,7 @@ dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -292,22 +362,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "string_cache"
-version = "0.2.20"
+version = "0.2.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gecko_bindings 0.0.1",
- "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "phf_generator 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "phf_shared 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "string_cache"
-version = "0.2.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "string_cache 0.2.20"
-
-[[package]]
name = "style"
version = "0.0.1"
dependencies = [
@@ -319,17 +384,18 @@ dependencies = [
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gecko_bindings 0.0.1",
+ "gecko_string_cache 0.2.20",
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ordered-float 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -388,6 +454,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unreachable"
+version = "0.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "void 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "unreachable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
@@ -427,6 +501,11 @@ dependencies = [
[[package]]
name = "void"
+version = "0.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/ports/geckolib/Cargo.toml b/ports/geckolib/Cargo.toml
index 8cbe09340a6..10a9f55d264 100644
--- a/ports/geckolib/Cargo.toml
+++ b/ports/geckolib/Cargo.toml
@@ -14,16 +14,13 @@ app_units = "0.2.5"
env_logger = "0.3"
euclid = "0.7.1"
gecko_bindings = {version = "0.0.1", path = "gecko_bindings"}
+gecko_string_cache = {path = "string_cache"}
lazy_static = "0.2"
libc = "0.2"
log = {version = "0.3.5", features = ["release_max_level_info"]}
num_cpus = "0.2.2"
-selectors = "0.7"
-string_cache = {version = "0.2.20", features = ["unstable"]}
+selectors = "0.8"
style = {path = "../../components/style", features = ["gecko"]}
style_traits = {path = "../../components/style_traits"}
url = "1.0.0"
util = {path = "../../components/util"}
-
-[replace]
-"string_cache:0.2.20" = {path = "string_cache"}
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 98932fb8efc..b183656be81 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -31,7 +31,7 @@ use style::gecko_selector_impl::{GeckoSelectorImpl, PseudoElement};
use style::parallel;
use style::parser::ParserContextExtraData;
use style::properties::{ComputedValues, PropertyDeclarationBlock, parse_one_declaration};
-use style::selector_impl::{SelectorImplExt, PseudoElementCascadeType};
+use style::selector_impl::PseudoElementCascadeType;
use style::sequential;
use style::stylesheets::{Stylesheet, Origin};
use style::timer::Timer;
diff --git a/ports/geckolib/lib.rs b/ports/geckolib/lib.rs
index c5c31eae733..161f6b0b540 100644
--- a/ports/geckolib/lib.rs
+++ b/ports/geckolib/lib.rs
@@ -6,15 +6,12 @@ extern crate app_units;
extern crate env_logger;
extern crate euclid;
extern crate gecko_bindings;
-#[macro_use]
-extern crate lazy_static;
+#[macro_use] extern crate gecko_string_cache;
+#[macro_use] extern crate lazy_static;
extern crate libc;
-#[macro_use]
-extern crate log;
+#[macro_use] extern crate log;
extern crate num_cpus;
extern crate selectors;
-#[macro_use(atom, ns)]
-extern crate string_cache;
extern crate style;
extern crate style_traits;
extern crate url;
diff --git a/ports/geckolib/snapshot.rs b/ports/geckolib/snapshot.rs
index 60aba7037e9..0695162f759 100644
--- a/ports/geckolib/snapshot.rs
+++ b/ports/geckolib/snapshot.rs
@@ -4,11 +4,12 @@
use gecko_bindings::bindings;
use gecko_bindings::structs::ServoElementSnapshot;
use gecko_bindings::structs::ServoElementSnapshotFlags as Flags;
+use gecko_string_cache::Atom;
use selectors::parser::AttrSelector;
use snapshot_helpers;
-use string_cache::Atom;
use style::element_state::ElementState;
use style::restyle_hints::ElementSnapshot;
+use style::selector_impl::TheSelectorImpl;
use wrapper::AttrSelectorHelpers;
// NB: This is sound, in some sense, because during computation of restyle hints
@@ -34,9 +35,9 @@ impl GeckoElementSnapshot {
}
impl ::selectors::MatchAttr for GeckoElementSnapshot {
- type AttrString = Atom;
+ type Impl = TheSelectorImpl;
- fn match_attr_has(&self, attr: &AttrSelector) -> bool {
+ fn match_attr_has(&self, attr: &AttrSelector<TheSelectorImpl>) -> bool {
unsafe {
bindings::Gecko_SnapshotHasAttr(self.0,
attr.ns_or_null(),
@@ -44,7 +45,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
}
}
- fn match_attr_equals(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_equals(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_SnapshotAttrEquals(self.0,
attr.ns_or_null(),
@@ -54,7 +55,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
}
}
- fn match_attr_equals_ignore_ascii_case(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_equals_ignore_ascii_case(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_SnapshotAttrEquals(self.0,
attr.ns_or_null(),
@@ -63,7 +64,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
/* ignoreCase = */ true)
}
}
- fn match_attr_includes(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_includes(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_SnapshotAttrIncludes(self.0,
attr.ns_or_null(),
@@ -71,7 +72,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
value.as_ptr())
}
}
- fn match_attr_dash(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_dash(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_SnapshotAttrDashEquals(self.0,
attr.ns_or_null(),
@@ -79,7 +80,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
value.as_ptr())
}
}
- fn match_attr_prefix(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_prefix(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_SnapshotAttrHasPrefix(self.0,
attr.ns_or_null(),
@@ -87,7 +88,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
value.as_ptr())
}
}
- fn match_attr_substring(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_substring(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_SnapshotAttrHasSubstring(self.0,
attr.ns_or_null(),
@@ -95,7 +96,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
value.as_ptr())
}
}
- fn match_attr_suffix(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_suffix(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_SnapshotAttrHasSuffix(self.0,
attr.ns_or_null(),
diff --git a/ports/geckolib/snapshot_helpers.rs b/ports/geckolib/snapshot_helpers.rs
index ee7fdd14421..68b2d6d3b45 100644
--- a/ports/geckolib/snapshot_helpers.rs
+++ b/ports/geckolib/snapshot_helpers.rs
@@ -5,8 +5,8 @@
//! Element an snapshot common logic.
use gecko_bindings::structs::nsIAtom;
+use gecko_string_cache::Atom;
use std::{ptr, slice};
-use string_cache::Atom;
pub type ClassOrClassList<T> = unsafe extern fn (T, *mut *mut nsIAtom, *mut *mut *mut nsIAtom) -> u32;
diff --git a/ports/geckolib/string_cache/Cargo.toml b/ports/geckolib/string_cache/Cargo.toml
index bca87223593..8a7402bbd74 100644
--- a/ports/geckolib/string_cache/Cargo.toml
+++ b/ports/geckolib/string_cache/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "string_cache"
+name = "gecko_string_cache"
description = "A crate to allow using Gecko's nsIAtom as a replacement for string_cache."
version = "0.2.20"
authors = ["The Servo Project Developers"]
@@ -7,17 +7,12 @@ license = "MPL-2.0"
publish = false
[lib]
-name = "string_cache"
path = "lib.rs"
-[features]
-log-events = []
-unstable = []
-heap_size = []
-
[dependencies]
cfg-if = "0.1.0"
gecko_bindings = {version = "0.0.1", path = "../gecko_bindings"}
heapsize = "0.3.5"
libc = "0.2"
+selectors = "0.8"
serde = "0.7.15"
diff --git a/ports/geckolib/string_cache/atom_macro.rs b/ports/geckolib/string_cache/atom_macro.rs
index d5b46482284..c50bc347c18 100644
--- a/ports/geckolib/string_cache/atom_macro.rs
+++ b/ports/geckolib/string_cache/atom_macro.rs
@@ -1,8 +1,17 @@
use gecko_bindings::structs::nsIAtom;
use Atom;
+use WeakAtom;
-pub fn unsafe_atom_from_static(ptr: *mut nsIAtom) -> Atom { unsafe { Atom::from_static(ptr) } }
+// Static atoms have a dummy AddRef/Release, so we don't bother calling
+// AddRef() here. This would cause memory corruption with non-static atoms
+// both because (a) we wouldn't hold the atom alive, and (b) we can't avoid
+// calling Release() when the Atom is dropped, since we can't tell the
+// difference between static and non-static atoms without bloating the
+// size of Atom beyond word-size.
+pub fn unsafe_atom_from_static(ptr: *mut nsIAtom) -> Atom {
+ Atom(ptr as *mut WeakAtom)
+}
cfg_if! {
if #[cfg(not(target_env = "msvc"))] {
diff --git a/ports/geckolib/string_cache/lib.rs b/ports/geckolib/string_cache/lib.rs
index 8a6c59f0ca6..3d3e5709674 100644
--- a/ports/geckolib/string_cache/lib.rs
+++ b/ports/geckolib/string_cache/lib.rs
@@ -2,10 +2,11 @@
* 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/. */
-#[macro_use]
+#[macro_use] #[no_link]
extern crate cfg_if;
extern crate gecko_bindings;
extern crate heapsize;
+extern crate selectors;
extern crate serde;
use gecko_bindings::bindings::Gecko_AddRefAtom;
@@ -15,105 +16,95 @@ use gecko_bindings::bindings::Gecko_GetAtomAsUTF16;
use gecko_bindings::bindings::Gecko_ReleaseAtom;
use gecko_bindings::structs::nsIAtom;
use heapsize::HeapSizeOf;
+use selectors::bloom::BloomHash;
+use selectors::parser::FromCowStr;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
-use std::borrow::Cow;
-use std::char;
+use std::borrow::{Cow, Borrow};
+use std::char::{self, DecodeUtf16};
use std::fmt;
use std::hash::{Hash, Hasher};
-use std::marker::PhantomData;
-use std::mem::transmute;
+use std::iter::Cloned;
+use std::mem;
use std::ops::Deref;
use std::slice;
#[macro_use]
pub mod atom_macro;
+pub mod namespace;
-#[macro_export]
-macro_rules! ns {
- () => { $crate::Namespace(atom!("")) };
-}
+pub use namespace::{Namespace, WeakNamespace};
+/// A strong reference to a Gecko atom.
#[derive(PartialEq, Eq)]
-pub struct Atom(*mut nsIAtom);
-#[derive(PartialEq, Eq, Debug, Hash, Clone)]
-pub struct Namespace(pub Atom);
+pub struct Atom(*mut WeakAtom);
-pub struct BorrowedAtom<'a> {
- weak_ptr: *mut nsIAtom,
- chain: PhantomData<&'a ()>,
-}
+/// An atom *without* a strong reference.
+///
+/// Only usable as `&'a WeakAtom`,
+/// where `'a` is the lifetime of something that holds a strong reference to that atom.
+pub struct WeakAtom(nsIAtom);
-impl<'a> BorrowedAtom<'a> {
- pub unsafe fn new(atom: *mut nsIAtom) -> Self {
- BorrowedAtom {
- weak_ptr: atom,
- chain: PhantomData,
- }
- }
-}
+pub type BorrowedAtom<'a> = &'a WeakAtom;
-impl<'a> Deref for BorrowedAtom<'a> {
- type Target = Atom;
- fn deref(&self) -> &Atom {
+impl Deref for Atom {
+ type Target = WeakAtom;
+
+ #[inline]
+ fn deref(&self) -> &WeakAtom {
unsafe {
- transmute(self)
+ &*self.0
}
}
}
-impl<'a> PartialEq<Atom> for BorrowedAtom<'a> {
- fn eq(&self, other: &Atom) -> bool {
- self.weak_ptr == other.as_ptr()
+impl Borrow<WeakAtom> for Atom {
+ #[inline]
+ fn borrow(&self) -> &WeakAtom {
+ self
}
}
-pub struct BorrowedNamespace<'a> {
- weak_ptr: *mut nsIAtom,
- chain: PhantomData<&'a ()>,
-}
-
-impl<'a> BorrowedNamespace<'a> {
- pub unsafe fn new(atom: *mut nsIAtom) -> Self {
- BorrowedNamespace {
- weak_ptr: atom,
- chain: PhantomData,
- }
+impl Eq for WeakAtom {}
+impl PartialEq for WeakAtom {
+ #[inline]
+ fn eq(&self, other: &Self) -> bool {
+ let weak: *const WeakAtom = self;
+ let other: *const WeakAtom = other;
+ weak == other
}
}
-impl<'a> Deref for BorrowedNamespace<'a> {
- type Target = Namespace;
- fn deref(&self) -> &Namespace {
- unsafe {
- transmute(self)
- }
- }
-}
+unsafe impl Send for Atom {}
+unsafe impl Sync for Atom {}
+unsafe impl Sync for WeakAtom {}
-impl<'a> PartialEq<Namespace> for BorrowedNamespace<'a> {
- fn eq(&self, other: &Namespace) -> bool {
- self.weak_ptr == other.0.as_ptr()
+impl WeakAtom {
+ #[inline]
+ pub unsafe fn new<'a>(atom: *mut nsIAtom) -> &'a mut Self {
+ &mut *(atom as *mut WeakAtom)
}
-}
-unsafe impl Send for Atom {}
-unsafe impl Sync for Atom {}
+ #[inline]
+ pub fn clone(&self) -> Atom {
+ Atom::from(self.as_ptr())
+ }
-impl Atom {
pub fn get_hash(&self) -> u32 {
- unsafe {
- (*self.0).mHash
- }
+ self.0.mHash
}
pub fn as_slice(&self) -> &[u16] {
unsafe {
let mut len = 0;
- let ptr = Gecko_GetAtomAsUTF16(self.0, &mut len);
+ let ptr = Gecko_GetAtomAsUTF16(self.as_ptr(), &mut len);
slice::from_raw_parts(ptr, len as usize)
}
}
+ pub fn chars(&self) -> DecodeUtf16<Cloned<slice::Iter<u16>>> {
+ char::decode_utf16(self.as_slice().iter().cloned())
+ }
+
pub fn with_str<F, Output>(&self, cb: F) -> Output
where F: FnOnce(&str) -> Output {
// FIXME(bholley): We should measure whether it makes more sense to
@@ -124,7 +115,7 @@ impl Atom {
pub fn eq_str_ignore_ascii_case(&self, s: &str) -> bool {
unsafe {
- Gecko_AtomEqualsUTF8IgnoreCase(self.0, s.as_ptr() as *const _, s.len() as u32)
+ Gecko_AtomEqualsUTF8IgnoreCase(self.as_ptr(), s.as_ptr() as *const _, s.len() as u32)
}
}
@@ -132,29 +123,43 @@ impl Atom {
String::from_utf16(self.as_slice()).unwrap()
}
+ #[inline]
pub fn as_ptr(&self) -> *mut nsIAtom {
- self.0
+ let const_ptr: *const nsIAtom = &self.0;
+ const_ptr as *mut nsIAtom
}
+}
+impl Atom {
pub unsafe fn with<F>(ptr: *mut nsIAtom, callback: &mut F) where F: FnMut(&Atom) {
- callback(transmute(&ptr))
+ let atom = Atom(WeakAtom::new(ptr));
+ callback(&atom);
+ mem::forget(atom);
+ }
+}
+
+impl BloomHash for Atom {
+ #[inline]
+ fn bloom_hash(&self) -> u32 {
+ self.get_hash()
}
+}
- // Static atoms have a dummy AddRef/Release, so we don't bother calling
- // AddRef() here. This would cause memory corruption with non-static atoms
- // both because (a) we wouldn't hold the atom alive, and (b) we can't avoid
- // calling Release() when the Atom is dropped, since we can't tell the
- // difference between static and non-static atoms without bloating the
- // size of Atom beyond word-size.
- pub unsafe fn from_static(ptr: *mut nsIAtom) -> Atom {
- Atom(ptr)
+impl BloomHash for WeakAtom {
+ #[inline]
+ fn bloom_hash(&self) -> u32 {
+ self.get_hash()
}
}
impl Hash for Atom {
- fn hash<H>(&self, state: &mut H)
- where H: Hasher
- {
+ fn hash<H>(&self, state: &mut H) where H: Hasher {
+ state.write_u32(self.get_hash());
+ }
+}
+
+impl Hash for WeakAtom {
+ fn hash<H>(&self, state: &mut H) where H: Hasher {
state.write_u32(self.get_hash());
}
}
@@ -162,10 +167,7 @@ impl Hash for Atom {
impl Clone for Atom {
#[inline(always)]
fn clone(&self) -> Atom {
- unsafe {
- Gecko_AddRefAtom(self.0);
- }
- Atom(self.0)
+ Atom::from(self.as_ptr())
}
}
@@ -173,18 +175,19 @@ impl Drop for Atom {
#[inline]
fn drop(&mut self) {
unsafe {
- Gecko_ReleaseAtom(self.0);
+ Gecko_ReleaseAtom(self.as_ptr());
}
}
}
-impl HeapSizeOf for Atom {
- fn heap_size_of_children(&self) -> usize {
- 0
+impl Default for Atom {
+ #[inline]
+ fn default() -> Self {
+ atom!("")
}
}
-impl HeapSizeOf for Namespace {
+impl HeapSizeOf for Atom {
fn heap_size_of_children(&self) -> usize {
0
}
@@ -222,9 +225,11 @@ impl<'a> From<&'a str> for Atom {
#[inline]
fn from(string: &str) -> Atom {
assert!(string.len() <= u32::max_value() as usize);
- Atom(unsafe {
- Gecko_Atomize(string.as_ptr() as *const _, string.len() as u32)
- })
+ unsafe {
+ Atom(WeakAtom::new(
+ Gecko_Atomize(string.as_ptr() as *const _, string.len() as u32)
+ ))
+ }
}
}
@@ -235,6 +240,13 @@ impl<'a> From<Cow<'a, str>> for Atom {
}
}
+impl FromCowStr for Atom {
+ #[inline]
+ fn from_cow_str(string: Cow<str>) -> Atom {
+ Atom::from(&*string)
+ }
+}
+
impl From<String> for Atom {
#[inline]
fn from(string: String) -> Atom {
@@ -243,10 +255,11 @@ impl From<String> for Atom {
}
impl From<*mut nsIAtom> for Atom {
+ #[inline]
fn from(ptr: *mut nsIAtom) -> Atom {
unsafe {
Gecko_AddRefAtom(ptr);
- Atom(ptr)
+ Atom(WeakAtom::new(ptr))
}
}
}
diff --git a/ports/geckolib/string_cache/namespace.rs b/ports/geckolib/string_cache/namespace.rs
new file mode 100644
index 00000000000..6aadd0e3203
--- /dev/null
+++ b/ports/geckolib/string_cache/namespace.rs
@@ -0,0 +1,73 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * 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 gecko_bindings::structs::nsIAtom;
+use selectors::bloom::BloomHash;
+use std::borrow::Borrow;
+use std::ops::Deref;
+use {Atom, WeakAtom};
+
+#[macro_export]
+macro_rules! ns {
+ () => { $crate::Namespace(atom!("")) }
+}
+
+#[derive(Debug, PartialEq, Eq, Clone, Default, Hash)]
+pub struct Namespace(pub Atom);
+pub struct WeakNamespace(WeakAtom);
+
+impl Deref for Namespace {
+ type Target = WeakNamespace;
+
+ #[inline]
+ fn deref(&self) -> &WeakNamespace {
+ let weak: *const WeakAtom = &*self.0;
+ unsafe {
+ &*(weak as *const WeakNamespace)
+ }
+ }
+}
+
+impl Borrow<WeakNamespace> for Namespace {
+ #[inline]
+ fn borrow(&self) -> &WeakNamespace {
+ self
+ }
+}
+
+impl WeakNamespace {
+ #[inline]
+ pub unsafe fn new<'a>(atom: *mut nsIAtom) -> &'a Self {
+ &*(atom as *const WeakNamespace)
+ }
+
+ #[inline]
+ pub fn clone(&self) -> Namespace {
+ Namespace(self.0.clone())
+ }
+}
+
+impl Eq for WeakNamespace {}
+impl PartialEq for WeakNamespace {
+ #[inline]
+ fn eq(&self, other: &Self) -> bool {
+ let weak: *const WeakNamespace = self;
+ let other: *const WeakNamespace = other;
+ weak == other
+ }
+}
+
+impl BloomHash for Namespace {
+ #[inline]
+ fn bloom_hash(&self) -> u32 {
+ self.0.get_hash()
+ }
+}
+
+impl BloomHash for WeakNamespace {
+ #[inline]
+ fn bloom_hash(&self) -> u32 {
+ self.0.get_hash()
+ }
+}
diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs
index db2df0c6f02..b1299ff7bc5 100644
--- a/ports/geckolib/wrapper.rs
+++ b/ports/geckolib/wrapper.rs
@@ -26,6 +26,7 @@ use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsEle
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO};
use gecko_bindings::structs::{nsIAtom, nsChangeHint, nsStyleContext};
+use gecko_string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
use glue::GeckoDeclarationBlock;
use libc::uintptr_t;
use selectors::Element;
@@ -37,7 +38,6 @@ use std::marker::PhantomData;
use std::ops::BitOr;
use std::ptr;
use std::sync::Arc;
-use string_cache::{Atom, BorrowedAtom, BorrowedNamespace, Namespace};
use style::data::PrivateStyleData;
use style::dom::{OpaqueNode, PresentationalHintsSynthetizer};
use style::dom::{TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
@@ -459,8 +459,6 @@ impl<'le> PresentationalHintsSynthetizer for GeckoElement<'le> {
}
impl<'le> ::selectors::Element for GeckoElement<'le> {
- type Impl = GeckoSelectorImpl;
-
fn parent_element(&self) -> Option<Self> {
unsafe {
Gecko_GetParentElement(self.element).as_ref().map(|el| GeckoElement::from_ref(el))
@@ -502,15 +500,15 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
false
}
- fn get_local_name<'a>(&'a self) -> BorrowedAtom<'a> {
+ fn get_local_name(&self) -> &WeakAtom {
unsafe {
- BorrowedAtom::new(Gecko_LocalName(self.element))
+ WeakAtom::new(Gecko_LocalName(self.element))
}
}
- fn get_namespace<'a>(&'a self) -> BorrowedNamespace<'a> {
+ fn get_namespace(&self) -> &WeakNamespace {
unsafe {
- BorrowedNamespace::new(Gecko_Namespace(self.element))
+ WeakNamespace::new(Gecko_Namespace(self.element))
}
}
@@ -575,7 +573,7 @@ pub trait AttrSelectorHelpers {
fn select_name(&self, is_html_element_in_html_document: bool) -> *mut nsIAtom;
}
-impl AttrSelectorHelpers for AttrSelector {
+impl AttrSelectorHelpers for AttrSelector<GeckoSelectorImpl> {
fn ns_or_null(&self) -> *mut nsIAtom {
match self.namespace {
NamespaceConstraint::Any => ptr::null_mut(),
@@ -593,15 +591,16 @@ impl AttrSelectorHelpers for AttrSelector {
}
impl<'le> ::selectors::MatchAttr for GeckoElement<'le> {
- type AttrString = Atom;
- fn match_attr_has(&self, attr: &AttrSelector) -> bool {
+ type Impl = GeckoSelectorImpl;
+
+ fn match_attr_has(&self, attr: &AttrSelector<Self::Impl>) -> bool {
unsafe {
bindings::Gecko_HasAttr(self.element,
attr.ns_or_null(),
attr.select_name(self.is_html_element_in_html_document()))
}
}
- fn match_attr_equals(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_equals(&self, attr: &AttrSelector<Self::Impl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_AttrEquals(self.element,
attr.ns_or_null(),
@@ -610,7 +609,7 @@ impl<'le> ::selectors::MatchAttr for GeckoElement<'le> {
/* ignoreCase = */ false)
}
}
- fn match_attr_equals_ignore_ascii_case(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_equals_ignore_ascii_case(&self, attr: &AttrSelector<Self::Impl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_AttrEquals(self.element,
attr.ns_or_null(),
@@ -619,7 +618,7 @@ impl<'le> ::selectors::MatchAttr for GeckoElement<'le> {
/* ignoreCase = */ false)
}
}
- fn match_attr_includes(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_includes(&self, attr: &AttrSelector<Self::Impl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_AttrIncludes(self.element,
attr.ns_or_null(),
@@ -627,7 +626,7 @@ impl<'le> ::selectors::MatchAttr for GeckoElement<'le> {
value.as_ptr())
}
}
- fn match_attr_dash(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_dash(&self, attr: &AttrSelector<Self::Impl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_AttrDashEquals(self.element,
attr.ns_or_null(),
@@ -635,7 +634,7 @@ impl<'le> ::selectors::MatchAttr for GeckoElement<'le> {
value.as_ptr())
}
}
- fn match_attr_prefix(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_prefix(&self, attr: &AttrSelector<Self::Impl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_AttrHasPrefix(self.element,
attr.ns_or_null(),
@@ -643,7 +642,7 @@ impl<'le> ::selectors::MatchAttr for GeckoElement<'le> {
value.as_ptr())
}
}
- fn match_attr_substring(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_substring(&self, attr: &AttrSelector<Self::Impl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_AttrHasSubstring(self.element,
attr.ns_or_null(),
@@ -651,7 +650,7 @@ impl<'le> ::selectors::MatchAttr for GeckoElement<'le> {
value.as_ptr())
}
}
- fn match_attr_suffix(&self, attr: &AttrSelector, value: &Self::AttrString) -> bool {
+ fn match_attr_suffix(&self, attr: &AttrSelector<Self::Impl>, value: &Atom) -> bool {
unsafe {
bindings::Gecko_AttrHasSuffix(self.element,
attr.ns_or_null(),
diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs
index 24fdf489654..46b2a16e921 100644
--- a/ports/glutin/window.rs
+++ b/ports/glutin/window.rs
@@ -157,10 +157,6 @@ impl Window {
builder = builder.with_vsync();
}
- if opts::get().use_webrender {
- builder = builder.with_stencil_buffer(8);
- }
-
if opts::get().use_msaa {
builder = builder.with_multisampling(MULTISAMPLES)
}
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 3433e8265ed..61251983e19 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -27,7 +27,7 @@ MAX_LICENSE_LINESPAN = max(len(license.splitlines()) for license in licenses)
# File patterns to include in the non-WPT tidy check.
FILE_PATTERNS_TO_CHECK = ["*.rs", "*.rc", "*.cpp", "*.c",
"*.h", "Cargo.lock", "*.py", "*.sh",
- "*.toml", "*.webidl", "*.json"]
+ "*.toml", "*.webidl", "*.json", "*.html"]
# File patterns that are ignored for all tidy and lint checks.
FILE_PATTERNS_TO_IGNORE = ["*.#*", "*.pyc"]
@@ -44,6 +44,11 @@ IGNORED_FILES = [
os.path.join(".", "tests", "wpt", "metadata-css", "MANIFEST.json"),
os.path.join(".", "components", "script", "dom", "webidls", "ForceTouchEvent.webidl"),
os.path.join(".", "support", "android", "openssl.sh"),
+ # Ignore those files since the issues reported are on purpose
+ os.path.join(".", "tests", "html", "bad-line-ends.html"),
+ os.path.join(".", "tests", "unit", "net", "parsable_mime", "text"),
+ os.path.join(".", "tests", "wpt", "mozilla", "tests", "css", "fonts"),
+ os.path.join(".", "tests", "wpt", "mozilla", "tests", "css", "pre_with_tab.html"),
# FIXME(pcwalton, #11679): This is a workaround for a tidy error on the quoted string
# `"__TEXT,_info_plist"` inside an attribute.
os.path.join(".", "components", "servo", "platform", "macos", "mod.rs"),
@@ -148,7 +153,7 @@ def filter_files(start_dir, only_changed_files, progress):
def check_license(file_name, lines):
- if any(file_name.endswith(ext) for ext in (".toml", ".lock", ".json")):
+ if any(file_name.endswith(ext) for ext in (".toml", ".lock", ".json", ".html")):
raise StopIteration
while lines and (lines[0].startswith(EMACS_HEADER) or lines[0].startswith(VIM_HEADER)):
lines = lines[1:]
@@ -168,7 +173,7 @@ def check_modeline(file_name, lines):
def check_length(file_name, idx, line):
- if file_name.endswith(".lock") or file_name.endswith(".json"):
+ if file_name.endswith(".lock") or file_name.endswith(".json") or file_name.endswith(".html"):
raise StopIteration
# Prefer shorter lines when shell scripting.
if file_name.endswith(".sh"):
@@ -261,7 +266,7 @@ def check_lock(file_name, contents):
raise StopIteration
# package names to be neglected (as named by cargo)
- exceptions = ["lazy_static"]
+ exceptions = ["lazy_static", "unreachable", "void"]
import toml
content = toml.loads(contents)
@@ -672,7 +677,7 @@ def collect_errors_for_files(files_to_check, checking_functions, line_checking_f
def get_wpt_files(only_changed_files, progress):
- wpt_dir = os.path.join(".", "tests", "wpt", "web-platform-tests" + os.sep)
+ wpt_dir = os.path.join(".", "tests", "wpt" + os.sep)
file_iter = get_file_list(os.path.join(wpt_dir), only_changed_files)
(has_element, file_iter) = is_iter_empty(file_iter)
if not has_element:
diff --git a/resources/shaders/blit.fs.glsl b/resources/shaders/blit.fs.glsl
deleted file mode 100644
index 135553a8029..00000000000
--- a/resources/shaders/blit.fs.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-void main(void)
-{
- vec4 diffuse = Texture(sDiffuse, vColorTexCoord);
- SetFragColor(diffuse * vColor);
-}
diff --git a/resources/shaders/blit.vs.glsl b/resources/shaders/blit.vs.glsl
deleted file mode 100644
index 4d1e4dad739..00000000000
--- a/resources/shaders/blit.vs.glsl
+++ /dev/null
@@ -1,12 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-void main(void)
-{
- vColor = aColorRectTL / 255.0;
- vColorTexCoord = aColorTexCoordRectTop.xy;
- vec4 pos = vec4(aPosition, 1.0);
- pos.xy = SnapToPixels(pos.xy);
- gl_Position = uTransform * pos;
-}
diff --git a/resources/shaders/clear.fs.glsl b/resources/shaders/clear.fs.glsl
deleted file mode 100644
index 658ac27488c..00000000000
--- a/resources/shaders/clear.fs.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-void main(void)
-{
- SetFragColor(vColor);
-}
diff --git a/resources/shaders/clear.vs.glsl b/resources/shaders/clear.vs.glsl
deleted file mode 100644
index 491f3ea3863..00000000000
--- a/resources/shaders/clear.vs.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-void main(void)
-{
- vColor = aColorRectTL / 255.0;
- gl_Position = uTransform * vec4(aPosition, 1.0);
-}
diff --git a/resources/shaders/mask.fs.glsl b/resources/shaders/mask.fs.glsl
deleted file mode 100644
index 658ac27488c..00000000000
--- a/resources/shaders/mask.fs.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-void main(void)
-{
- SetFragColor(vColor);
-}
diff --git a/resources/shaders/mask.vs.glsl b/resources/shaders/mask.vs.glsl
deleted file mode 100644
index 491f3ea3863..00000000000
--- a/resources/shaders/mask.vs.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-void main(void)
-{
- vColor = aColorRectTL / 255.0;
- gl_Position = uTransform * vec4(aPosition, 1.0);
-}
diff --git a/resources/shaders/prim_shared.glsl b/resources/shaders/prim_shared.glsl
index 7c21cada7fa..ad2ab82e94b 100644
--- a/resources/shaders/prim_shared.glsl
+++ b/resources/shaders/prim_shared.glsl
@@ -146,6 +146,53 @@ VertexInfo write_vertex(PrimitiveInfo info) {
VertexInfo vi = VertexInfo(Rect(p0, p1), local_clamped_pos.xy, clamped_pos.xy);
return vi;
}
+
+struct TransformVertexInfo {
+ vec3 local_pos;
+};
+
+TransformVertexInfo write_transform_vertex(PrimitiveInfo info) {
+ Layer layer = layers[info.layer_tile_part.x];
+ Tile tile = tiles[info.layer_tile_part.y];
+
+ vec2 p0 = info.local_rect.xy;
+ vec2 p1 = info.local_rect.xy + vec2(info.local_rect.z, 0.0);
+ vec2 p2 = info.local_rect.xy + vec2(0.0, info.local_rect.w);
+ vec2 p3 = info.local_rect.xy + info.local_rect.zw;
+
+ vec4 t0 = layer.transform * vec4(p0, 0, 1);
+ vec4 t1 = layer.transform * vec4(p1, 0, 1);
+ vec4 t2 = layer.transform * vec4(p2, 0, 1);
+ vec4 t3 = layer.transform * vec4(p3, 0, 1);
+
+ vec2 tp0 = t0.xy / t0.w;
+ vec2 tp1 = t1.xy / t1.w;
+ vec2 tp2 = t2.xy / t2.w;
+ vec2 tp3 = t3.xy / t3.w;
+
+ vec2 min_pos = min(tp0.xy, min(tp1.xy, min(tp2.xy, tp3.xy)));
+ vec2 max_pos = max(tp0.xy, max(tp1.xy, max(tp2.xy, tp3.xy)));
+
+ vec2 min_pos_clamped = clamp(min_pos * uDevicePixelRatio,
+ vec2(tile.actual_rect.xy),
+ vec2(tile.actual_rect.xy + tile.actual_rect.zw));
+
+ vec2 max_pos_clamped = clamp(max_pos * uDevicePixelRatio,
+ vec2(tile.actual_rect.xy),
+ vec2(tile.actual_rect.xy + tile.actual_rect.zw));
+
+ vec2 clamped_pos = mix(min_pos_clamped,
+ max_pos_clamped,
+ aPosition.xy);
+
+ vec3 layer_pos = get_layer_pos(clamped_pos / uDevicePixelRatio, info.layer_tile_part.x);
+
+ vec2 final_pos = clamped_pos + vec2(tile.target_rect.xy) - vec2(tile.actual_rect.xy);
+
+ gl_Position = uTransform * vec4(final_pos, 0, 1);
+
+ return TransformVertexInfo(layer_pos);
+}
#endif
#ifdef WR_FRAGMENT_SHADER
@@ -177,4 +224,14 @@ bool point_in_rect(vec2 p, vec2 p0, vec2 p1) {
p.x <= p1.x &&
p.y <= p1.y;
}
+
+vec2 init_transform_fs(vec3 local_pos, vec4 local_rect) {
+ vec2 pos = local_pos.xy / local_pos.z;
+
+ if (!point_in_rect(pos, local_rect.xy, local_rect.xy + local_rect.zw)) {
+ discard;
+ }
+
+ return pos;
+}
#endif
diff --git a/resources/shaders/ps_angle_gradient.vs.glsl b/resources/shaders/ps_angle_gradient.vs.glsl
index 16296967bdb..3b1601f2f54 100644
--- a/resources/shaders/ps_angle_gradient.vs.glsl
+++ b/resources/shaders/ps_angle_gradient.vs.glsl
@@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
struct AngleGradient {
- PrimitiveInfo info;
+ PrimitiveInfo info;
vec4 start_end_point;
uvec4 stop_count;
vec4 colors[MAX_STOPS_PER_ANGLE_GRADIENT];
diff --git a/resources/shaders/ps_image_transform.fs.glsl b/resources/shaders/ps_image_transform.fs.glsl
index 57fdc563ade..b12b266328b 100644
--- a/resources/shaders/ps_image_transform.fs.glsl
+++ b/resources/shaders/ps_image_transform.fs.glsl
@@ -3,11 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
void main(void) {
- vec2 pos = vPos.xy / vPos.z;
-
- if (!point_in_rect(pos, vRect.xy, vRect.xy + vRect.zw)) {
- discard;
- }
-
- oFragColor = texture(sDiffuse, vUv / vPos.z);
+ init_transform_fs(vLocalPos, vLocalRect);
+ oFragColor = texture(sDiffuse, vUv / vLocalPos.z);
}
diff --git a/resources/shaders/ps_image_transform.glsl b/resources/shaders/ps_image_transform.glsl
index 77c0eb20719..d4aed4a5161 100644
--- a/resources/shaders/ps_image_transform.glsl
+++ b/resources/shaders/ps_image_transform.glsl
@@ -4,5 +4,5 @@
varying vec2 vUv;
-varying vec3 vPos;
-flat varying vec4 vRect;
+varying vec3 vLocalPos;
+flat varying vec4 vLocalRect;
diff --git a/resources/shaders/ps_image_transform.vs.glsl b/resources/shaders/ps_image_transform.vs.glsl
index b9fcf7c24c2..bb79aea1bec 100644
--- a/resources/shaders/ps_image_transform.vs.glsl
+++ b/resources/shaders/ps_image_transform.vs.glsl
@@ -15,51 +15,15 @@ layout(std140) uniform Items {
void main(void) {
Image image = images[gl_InstanceID];
- Layer layer = layers[image.info.layer_tile_part.x];
- Tile tile = tiles[image.info.layer_tile_part.y];
- vec2 p0 = image.info.local_rect.xy;
- vec2 p1 = image.info.local_rect.xy + vec2(image.info.local_rect.z, 0.0);
- vec2 p2 = image.info.local_rect.xy + vec2(0.0, image.info.local_rect.w);
- vec2 p3 = image.info.local_rect.xy + image.info.local_rect.zw;
+ TransformVertexInfo vi = write_transform_vertex(image.info);
- vec4 t0 = layer.transform * vec4(p0, 0, 1);
- vec4 t1 = layer.transform * vec4(p1, 0, 1);
- vec4 t2 = layer.transform * vec4(p2, 0, 1);
- vec4 t3 = layer.transform * vec4(p3, 0, 1);
+ vLocalRect = image.info.local_rect;
+ vLocalPos = vi.local_pos;
- vec2 tp0 = t0.xy / t0.w;
- vec2 tp1 = t1.xy / t1.w;
- vec2 tp2 = t2.xy / t2.w;
- vec2 tp3 = t3.xy / t3.w;
-
- vec2 min_pos = min(tp0.xy, min(tp1.xy, min(tp2.xy, tp3.xy)));
- vec2 max_pos = max(tp0.xy, max(tp1.xy, max(tp2.xy, tp3.xy)));
-
- vec2 min_pos_clamped = clamp(min_pos * uDevicePixelRatio,
- vec2(tile.actual_rect.xy),
- vec2(tile.actual_rect.xy + tile.actual_rect.zw));
-
- vec2 max_pos_clamped = clamp(max_pos * uDevicePixelRatio,
- vec2(tile.actual_rect.xy),
- vec2(tile.actual_rect.xy + tile.actual_rect.zw));
-
- vec2 clamped_pos = mix(min_pos_clamped,
- max_pos_clamped,
- aPosition.xy);
-
- vec3 layer_pos = get_layer_pos(clamped_pos / uDevicePixelRatio, image.info.layer_tile_part.x);
-
- vRect = image.info.local_rect;
- vPos = layer_pos;
-
- vec2 f = (layer_pos.xy - image.info.local_rect.xy) / image.info.local_rect.zw;
+ vec2 f = (vi.local_pos.xy - image.info.local_rect.xy) / image.info.local_rect.zw;
vUv = mix(image.st_rect.xy,
image.st_rect.zw,
f);
-
- vec2 final_pos = clamped_pos + vec2(tile.target_rect.xy) - vec2(tile.actual_rect.xy);
-
- gl_Position = uTransform * vec4(final_pos, 0, 1);
}
diff --git a/resources/shaders/ps_rectangle.vs.glsl b/resources/shaders/ps_rectangle.vs.glsl
index 01a4e5dc185..ee2adacec2d 100644
--- a/resources/shaders/ps_rectangle.vs.glsl
+++ b/resources/shaders/ps_rectangle.vs.glsl
@@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
struct Rectangle {
- PrimitiveInfo info;
- vec4 color;
+ PrimitiveInfo info;
+ vec4 color;
};
layout(std140) uniform Items {
diff --git a/resources/shaders/ps_rectangle_clip.vs.glsl b/resources/shaders/ps_rectangle_clip.vs.glsl
index b181638d010..da39ff9fd6f 100644
--- a/resources/shaders/ps_rectangle_clip.vs.glsl
+++ b/resources/shaders/ps_rectangle_clip.vs.glsl
@@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
struct Rectangle {
- PrimitiveInfo info;
- vec4 color;
+ PrimitiveInfo info;
+ vec4 color;
Clip clip;
};
diff --git a/resources/shaders/ps_rectangle_transform.fs.glsl b/resources/shaders/ps_rectangle_transform.fs.glsl
index a8ac40a8451..7552a01e6d3 100644
--- a/resources/shaders/ps_rectangle_transform.fs.glsl
+++ b/resources/shaders/ps_rectangle_transform.fs.glsl
@@ -3,11 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
void main(void) {
- vec2 pos = vPos.xy / vPos.z;
-
- if (!point_in_rect(pos, vRect.xy, vRect.xy + vRect.zw)) {
- discard;
- }
-
- oFragColor = vColor;
+ init_transform_fs(vLocalPos, vLocalRect);
+ oFragColor = vColor;
}
diff --git a/resources/shaders/ps_rectangle_transform.glsl b/resources/shaders/ps_rectangle_transform.glsl
index 0ae7f839aa9..e8990e9627a 100644
--- a/resources/shaders/ps_rectangle_transform.glsl
+++ b/resources/shaders/ps_rectangle_transform.glsl
@@ -4,5 +4,5 @@
varying vec4 vColor;
-varying vec3 vPos;
-flat varying vec4 vRect;
+varying vec3 vLocalPos;
+flat varying vec4 vLocalRect;
diff --git a/resources/shaders/ps_rectangle_transform.vs.glsl b/resources/shaders/ps_rectangle_transform.vs.glsl
index 0df46710492..b21f85158c5 100644
--- a/resources/shaders/ps_rectangle_transform.vs.glsl
+++ b/resources/shaders/ps_rectangle_transform.vs.glsl
@@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
struct Rectangle {
- PrimitiveInfo info;
- vec4 color;
+ PrimitiveInfo info;
+ vec4 color;
};
layout(std140) uniform Items {
@@ -14,46 +14,11 @@ layout(std140) uniform Items {
void main(void) {
Rectangle rect = rects[gl_InstanceID];
- Layer layer = layers[rect.info.layer_tile_part.x];
- Tile tile = tiles[rect.info.layer_tile_part.y];
- vec2 p0 = rect.info.local_rect.xy;
- vec2 p1 = rect.info.local_rect.xy + vec2(rect.info.local_rect.z, 0.0);
- vec2 p2 = rect.info.local_rect.xy + vec2(0.0, rect.info.local_rect.w);
- vec2 p3 = rect.info.local_rect.xy + rect.info.local_rect.zw;
+ TransformVertexInfo vi = write_transform_vertex(rect.info);
- vec4 t0 = layer.transform * vec4(p0, 0, 1);
- vec4 t1 = layer.transform * vec4(p1, 0, 1);
- vec4 t2 = layer.transform * vec4(p2, 0, 1);
- vec4 t3 = layer.transform * vec4(p3, 0, 1);
+ vLocalRect = rect.info.local_rect;
+ vLocalPos = vi.local_pos;
- vec2 tp0 = t0.xy / t0.w;
- vec2 tp1 = t1.xy / t1.w;
- vec2 tp2 = t2.xy / t2.w;
- vec2 tp3 = t3.xy / t3.w;
-
- vec2 min_pos = min(tp0.xy, min(tp1.xy, min(tp2.xy, tp3.xy)));
- vec2 max_pos = max(tp0.xy, max(tp1.xy, max(tp2.xy, tp3.xy)));
-
- vec2 min_pos_clamped = clamp(min_pos * uDevicePixelRatio,
- vec2(tile.actual_rect.xy),
- vec2(tile.actual_rect.xy + tile.actual_rect.zw));
-
- vec2 max_pos_clamped = clamp(max_pos * uDevicePixelRatio,
- vec2(tile.actual_rect.xy),
- vec2(tile.actual_rect.xy + tile.actual_rect.zw));
-
- vec2 clamped_pos = mix(min_pos_clamped,
- max_pos_clamped,
- aPosition.xy);
-
- vec3 layer_pos = get_layer_pos(clamped_pos / uDevicePixelRatio, rect.info.layer_tile_part.x);
-
- vRect = rect.info.local_rect;
- vPos = layer_pos;
vColor = rect.color;
-
- vec2 final_pos = clamped_pos + vec2(tile.target_rect.xy) - vec2(tile.actual_rect.xy);
-
- gl_Position = uTransform * vec4(final_pos, 0, 1);
}
diff --git a/resources/shaders/quad.fs.glsl b/resources/shaders/quad.fs.glsl
deleted file mode 100644
index 8909cd0755a..00000000000
--- a/resources/shaders/quad.fs.glsl
+++ /dev/null
@@ -1,38 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-// GLSL point in rect test.
-// See: https://stackoverflow.com/questions/12751080/glsl-point-inside-box-test
-bool PointInRect(vec2 p, vec2 p0, vec2 p1)
-{
- vec2 s = step(p0, p) - step(p1, p);
- return s.x * s.y != 0.0;
-}
-
-void main(void)
-{
- // Clip out.
- if (PointInRect(vPosition, vClipOutRect.xy, vClipOutRect.zw)) {
- discard;
- }
-
- // Clip in.
- if (!PointInRect(vPosition, vClipInRect.xy, vClipInRect.zw)) {
- discard;
- }
-
- // Apply image tiling parameters (offset and scale) to color UVs.
- vec2 colorTexCoord = vTileParams.xy + fract(vColorTexCoord.xy) * vTileParams.zw;
- vec2 maskTexCoord = vMaskTexCoord.xy;
-
- // Fetch the diffuse and mask texels.
- vec4 diffuse = Texture(sDiffuse, colorTexCoord);
- vec4 mask = Texture(sMask, maskTexCoord);
-
- // Extract alpha from the mask (component depends on platform)
- float alpha = GetAlphaFromMask(mask);
-
- // Write the final fragment color.
- SetFragColor(diffuse * vec4(vColor.rgb, vColor.a * alpha));
-}
diff --git a/resources/shaders/quad.vs.glsl b/resources/shaders/quad.vs.glsl
deleted file mode 100644
index 5b43fc539b2..00000000000
--- a/resources/shaders/quad.vs.glsl
+++ /dev/null
@@ -1,112 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-vec2 Bilerp2(vec2 tl, vec2 tr, vec2 br, vec2 bl, vec2 st) {
- return mix(mix(tl, bl, st.y), mix(tr, br, st.y), st.x);
-}
-
-vec4 Bilerp4(vec4 tl, vec4 tr, vec4 br, vec4 bl, vec2 st) {
- return mix(mix(tl, bl, st.y), mix(tr, br, st.y), st.x);
-}
-
-void main(void)
-{
- // Extract the image tiling parameters.
- // These are passed to the fragment shader, since
- // the uv interpolation must be done per-fragment.
- vTileParams = uTileParams[Bottom7Bits(int(aMisc.w))];
-
- // Determine clip rects.
- vClipOutRect = uClipRects[int(aMisc.z)];
- vec4 clipInRect = uClipRects[int(aMisc.y)];
-
- // Extract the complete (stacking context + css transform) transform
- // for this vertex. Transform the position by it.
- vec2 offsetParams = uOffsets[Bottom7Bits(int(aMisc.x))].xy;
- mat4 matrix = uMatrixPalette[Bottom7Bits(int(aMisc.x))];
-
- vec2 p0 = aPositionRect.xy + offsetParams;
- vec2 p1 = p0 + aPositionRect.zw;
-
- vec2 rect_origin = SnapToPixels(p0);
- vec2 rect_size = SnapToPixels(p1) - rect_origin;
-
- // Determine the position, color, and mask texture coordinates of this vertex.
- vec4 localPos = vec4(0.0, 0.0, 0.0, 1.0);
- bool isBorderCorner = int(aMisc.w) >= 0x80;
- bool isBottomTriangle = IsBottomTriangle();
- if (aPosition.y == 0.0) {
- localPos.y = rect_origin.y;
- if (aPosition.x == 0.0) {
- localPos.x = rect_origin.x;
- if (isBorderCorner) {
- vColor = isBottomTriangle ? aColorRectBL : aColorRectTR;
- }
- } else {
- localPos.x = rect_origin.x + rect_size.x;
- if (isBorderCorner) {
- vColor = aColorRectTR;
- }
- }
- } else {
- localPos.y = rect_origin.y + rect_size.y;
- if (aPosition.x == 0.0) {
- localPos.x = rect_origin.x;
- if (isBorderCorner) {
- vColor = aColorRectBL;
- }
- } else {
- localPos.x = rect_origin.x + rect_size.x;
- if (isBorderCorner) {
- vColor = isBottomTriangle ? aColorRectBL : aColorRectTR;
- }
- }
- }
-
- // Rotate or clip as necessary. If there is no rotation, we can clip here in the vertex shader
- // and save a whole bunch of fragment shader invocations. If there is a rotation, we fall back
- // to FS clipping.
- //
- // The rotation angle is encoded as a negative bottom left u coordinate. (uv coordinates should
- // always be nonnegative normally, and gradients don't use color textures, so this is fine.)
- vec4 colorTexCoordRectBottom = aColorTexCoordRectBottom;
- vec2 localST;
- if (colorTexCoordRectBottom.z < 0.0) {
- float angle = -colorTexCoordRectBottom.z;
- vec2 center = rect_origin + rect_size / 2.0;
- vec2 translatedPos = localPos.xy - center;
- localST = (localPos.xy - rect_origin) / rect_size;
- localPos.xy = vec2(translatedPos.x * cos(angle) - translatedPos.y * sin(angle),
- translatedPos.x * sin(angle) + translatedPos.y * cos(angle)) + center;
- colorTexCoordRectBottom.z = aColorTexCoordRectTop.x;
- vClipInRect = clipInRect;
- } else {
- localPos.x = clamp(localPos.x, clipInRect.x, clipInRect.z);
- localPos.y = clamp(localPos.y, clipInRect.y, clipInRect.w);
- localST = (localPos.xy - rect_origin) / rect_size;
- vClipInRect = vec4(-1e37, -1e37, 1e38, 1e38);
- }
-
- vColorTexCoord = Bilerp2(aColorTexCoordRectTop.xy, aColorTexCoordRectTop.zw,
- colorTexCoordRectBottom.xy, colorTexCoordRectBottom.zw,
- localST);
- vMaskTexCoord = Bilerp2(aMaskTexCoordRectTop.xy, aMaskTexCoordRectTop.zw,
- aMaskTexCoordRectBottom.xy, aMaskTexCoordRectBottom.zw,
- localST);
- if (!isBorderCorner) {
- vColor = Bilerp4(aColorRectTL, aColorRectTR, aColorRectBR, aColorRectBL, localST);
- }
-
- // Normalize the vertex color and mask texture coordinates.
- vColor /= 255.0;
- vMaskTexCoord /= uAtlasParams.zw;
-
- vPosition = localPos.xy;
-
- vec4 worldPos = matrix * localPos;
-
- // Transform by the orthographic projection into clip space.
- gl_Position = uTransform * worldPos;
-}
-
diff --git a/resources/shaders/tile.fs.glsl b/resources/shaders/tile.fs.glsl
deleted file mode 100644
index 3355ee4646f..00000000000
--- a/resources/shaders/tile.fs.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-void main(void) {
- vec2 textureSize = vBorderPosition.zw - vBorderPosition.xy;
- vec2 colorTexCoord = vBorderPosition.xy + mod(vColorTexCoord.xy, 1.0) * textureSize;
- vec4 diffuse = Texture(sDiffuse, colorTexCoord);
- SetFragColor(diffuse);
-}
-
diff --git a/resources/shaders/tile.vs.glsl b/resources/shaders/tile.vs.glsl
deleted file mode 100644
index 7f57bf1e360..00000000000
--- a/resources/shaders/tile.vs.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-void main(void)
-{
- vColorTexCoord = aBorderRadii.xy;
- vBorderPosition = aBorderPosition;
- gl_Position = uTransform * vec4(aPosition, 1.0);
-}
-
diff --git a/tests/html/acid1.html b/tests/html/acid1.html
index 88d5b325bd2..c78419966e8 100644
--- a/tests/html/acid1.html
+++ b/tests/html/acid1.html
@@ -1,11 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
- <title>
- display/box/float/clear test
- </title>
- <style type="text/css">
-/* last modified: 1 Dec 98 */
+ <title>
+ display/box/float/clear test
+ </title>
+ <style type="text/css">
+/* last modified: 1 Dec 98 */
html {
font: 10px/1 Verdana, sans-serif;
@@ -27,9 +27,9 @@ border: 0;
padding: .5em;
}
-dt {
+dt {
background-color: rgb(204,0,0);
-margin: 0;
+margin: 0;
padding: 1em;
width: 10.638%; /* refers to parent element's width of 47em. = 5em or 50px */
height: 28em;
@@ -82,12 +82,12 @@ background-color: black;
color: white;
}
-form {
+form {
margin: 0;
display: inline;
}
-p {
+p {
margin: 0;
}
@@ -125,59 +125,59 @@ font-weight: normal;
font-size: 1em;
}
</style>
- </head>
- <body>
- <dl>
- <dt>
- toggle
- </dt>
- <dd>
- <ul>
- <li>
- the way
- </li>
- <li id="bar">
- <p>
- the world ends
- </p>
- <form action="./" method="get">
- <p>
- bang
- <input name="foo" value="off" type="radio">
- </p>
- <p>
- whimper
- <input name="foo2" value="on" type="radio">
- </p>
- </form>
- </li>
- <li>
- i grow old
- </li>
- <li id="baz">
- pluot?
- </li>
- </ul>
- <blockquote>
- <address>
- bar maids,
- </address>
- </blockquote>
- <h1>
- sing to me, erbarme dich
- </h1>
- </dd>
- </dl>
- <p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
- This is a nonsensical document, but syntactically valid HTML 4.0. All
- 100%-conformant CSS1 agents should be able to render the document
+ </head>
+ <body>
+ <dl>
+ <dt>
+ toggle
+ </dt>
+ <dd>
+ <ul>
+ <li>
+ the way
+ </li>
+ <li id="bar">
+ <p>
+ the world ends
+ </p>
+ <form action="./" method="get">
+ <p>
+ bang
+ <input name="foo" value="off" type="radio">
+ </p>
+ <p>
+ whimper
+ <input name="foo2" value="on" type="radio">
+ </p>
+ </form>
+ </li>
+ <li>
+ i grow old
+ </li>
+ <li id="baz">
+ pluot?
+ </li>
+ </ul>
+ <blockquote>
+ <address>
+ bar maids,
+ </address>
+ </blockquote>
+ <h1>
+ sing to me, erbarme dich
+ </h1>
+ </dd>
+ </dl>
+ <p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
+ This is a nonsensical document, but syntactically valid HTML 4.0. All
+ 100%-conformant CSS1 agents should be able to render the document
elements above this paragraph indistinguishably (to the pixel) from this
-
- <a href="http://www.w3.org/Style/CSS/Test/CSS1/current/sec5526c.gif">reference rendering,</a>
- (except font rasterization and form widgets). All discrepancies
-should be traceable to CSS1 implementation shortcomings. Once you have
-finished evaluating this test, you can return to the <a href="http://www.w3.org/Style/CSS/Test/CSS1/current/sec5526c.htm">parent page</a>.
- </p>
-
+
+ <a href="http://www.w3.org/Style/CSS/Test/CSS1/current/sec5526c.gif">reference rendering,</a>
+ (except font rasterization and form widgets). All discrepancies
+should be traceable to CSS1 implementation shortcomings. Once you have
+finished evaluating this test, you can return to the <a href="http://www.w3.org/Style/CSS/Test/CSS1/current/sec5526c.htm">parent page</a>.
+ </p>
+
</body></html>
diff --git a/tests/html/acid2.html b/tests/html/acid2.html
index 9c7712a22f7..8c8c1800169 100755
--- a/tests/html/acid2.html
+++ b/tests/html/acid2.html
@@ -142,4 +142,4 @@
<div class="image-height-test"><table><tr><td><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAFSDNYfAAAAaklEQVR42u3XQQrAIAwAQeP%2F%2F6wf8CJBJTK9lnQ7FpHGaOurt1I34nfH9pMMZAZ8BwMGEvvh%2BBsJCAgICLwIOA8EBAQEBAQEBAQEBK79H5RfIQAAAAAAAAAAAAAAAAAAAAAAAAAAAID%2FABMSqAfj%2FsLmvAAAAABJRU5ErkJggg%3D%3D" alt=""></td></tr></table></div>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/html/active_selector.html b/tests/html/active_selector.html
index 8bf352b2dcc..ac53d2e6645 100644
--- a/tests/html/active_selector.html
+++ b/tests/html/active_selector.html
@@ -4,15 +4,15 @@
:active {border:1px solid #A61D61; background-color:#DC2F85; color:#333232;}
</style>
<body>
- <fieldset>
- <a href="https://servo.org/">
- Link
- </a>
- <button>Click Me!</button>
- <button disabled>You can't activate me</button>
- <a>Anchor with no href</a>
- <link href="www.mozilla.com">Link</link>
- <link>Link with no href</link>
- </fieldset>
+ <fieldset>
+ <a href="https://servo.org/">
+ Link
+ </a>
+ <button>Click Me!</button>
+ <button disabled>You can't activate me</button>
+ <a>Anchor with no href</a>
+ <link href="www.mozilla.com">Link</link>
+ <link>Link with no href</link>
+ </fieldset>
</body>
</html>
diff --git a/tests/html/background.html b/tests/html/background.html
index c3bb0df99ab..b574bd427ae 100644
--- a/tests/html/background.html
+++ b/tests/html/background.html
@@ -1,20 +1,20 @@
<!DOCTYPE html>
<html>
- <head>
- <title></title>
- </head>
- <style>
- .test { background: url(rust-0.png) gray; }
- </style>
- <body>
- <div class="test" style="width:200px; height:200px; color:red;">
- background: url(rust-0.png) gray; width:200px; height:200px;
- </div>
- <div class="test" style="background-image: url(rust-45.png); width:200px; height:200px; color:red;">
- background-image: url(rust-45.png); width:200px; height:200px;
- </div>
- <div style="background: url(rust-90.png) yellow; width:200px; height:200px; border: 5px solid #000; color:blue;">
- background: url(rust-90.png) yellow; width:200px; height:200px; border: 5px solid #000;
- </div>
- </body>
+ <head>
+ <title></title>
+ </head>
+ <style>
+ .test { background: url(rust-0.png) gray; }
+ </style>
+ <body>
+ <div class="test" style="width:200px; height:200px; color:red;">
+ background: url(rust-0.png) gray; width:200px; height:200px;
+ </div>
+ <div class="test" style="background-image: url(rust-45.png); width:200px; height:200px; color:red;">
+ background-image: url(rust-45.png); width:200px; height:200px;
+ </div>
+ <div style="background: url(rust-90.png) yellow; width:200px; height:200px; border: 5px solid #000; color:blue;">
+ background: url(rust-90.png) yellow; width:200px; height:200px; border: 5px solid #000;
+ </div>
+ </body>
</html>
diff --git a/tests/html/border_collapse_test.html b/tests/html/border_collapse_test.html
index 1771b3c6d36..42c76bde9b7 100644
--- a/tests/html/border_collapse_test.html
+++ b/tests/html/border_collapse_test.html
@@ -28,7 +28,7 @@ td.cell6 {
<td> 3
</tr>
<tr id="row2">
- <td> 4
+ <td> 4
<td class="cell5"> 5
<td class="cell6"> 6
</tr>
diff --git a/tests/html/form_html5_validations.html b/tests/html/form_html5_validations.html
index edbbabd68d3..2558a245c22 100644
--- a/tests/html/form_html5_validations.html
+++ b/tests/html/form_html5_validations.html
@@ -16,14 +16,14 @@
<option value="1">B</option>
<option value="2">C</option>
</select><br>
- Required Radio: <input type="radio" name="group1" value="1" required>1
+ Required Radio: <input type="radio" name="group1" value="1" required>1
<input type="radio" name="group1" value="2">2
<input type="radio" name="group1" value="3">3<br>
- Required Checkbox: <input type="checkbox" name="group2" value="1" required>1
+ Required Checkbox: <input type="checkbox" name="group2" value="1" required>1
<input type="checkbox" name="group2" value="2">2
<input type="checkbox" name="group2" value="3">3<br>
Required File: <input type="file" required><br>
<input type="submit">
</form>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/html/inline_bg_color_simple.html b/tests/html/inline_bg_color_simple.html
index 7d6efcfbe0d..ab09c8e5d8a 100644
--- a/tests/html/inline_bg_color_simple.html
+++ b/tests/html/inline_bg_color_simple.html
@@ -4,7 +4,7 @@
[block background color test]
<p style="background-color:yellow">paragraph yellow</p>
- [inline background color test]
+ [inline background color test]
<span style="font-size:30px;background-color:blue;"><img src="test.jpeg"/> span bluetexttexttext<span style="font-size:50px;background-color:yellow;">span yellow<span style="font-size:15px;background-color:red">nested-span red</span>test finishes</span></span>
</body>
diff --git a/tests/html/input_whitespace_regression.html b/tests/html/input_whitespace_regression.html
index b66e0a6e62c..61cc78e7346 100644
--- a/tests/html/input_whitespace_regression.html
+++ b/tests/html/input_whitespace_regression.html
@@ -4,4 +4,4 @@ Both input elements below should have more than one space between "foo" and "bar
<form>
<input value="foo bar">
<input value="foo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bar">
-</form> \ No newline at end of file
+</form>
diff --git a/tests/html/lipsum-large.html b/tests/html/lipsum-large.html
index 26458c34b3e..30a77b4df0d 100644
--- a/tests/html/lipsum-large.html
+++ b/tests/html/lipsum-large.html
@@ -10,7 +10,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc volutpat feugiat fermentum. Curabitur luctus consequat urna a tincidunt. Nullam vitae velit eu arcu congue volutpat in a diam. Pellentesque lacus ipsum, gravida et tristique sit amet, varius eu ipsum. Duis venenatis sem id nibh commodo tempor. Curabitur risus tellus, cursus quis pellentesque sed, elementum eget neque. Sed ultricies, orci et adipiscing dapibus, mauris nisi condimentum felis, ac euismod tellus nunc vel felis. Aliquam egestas accumsan turpis, a volutpat dui fermentum id. Aliquam erat volutpat. Nunc vel auctor odio. Donec eu posuere dolor. Donec vitae justo purus, nec bibendum lectus. Quisque elit tortor, tristique vel ultricies sed, euismod sed tellus. Nullam dolor purus, porta et hendrerit id, rhoncus eu lectus. Nam vel lorem at dui mattis pretium eget a nisi.
@@ -20,7 +20,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc volutpat feugiat fermentum. Curabitur luctus consequat urna a tincidunt. Nullam vitae velit eu arcu congue volutpat in a diam. Pellentesque lacus ipsum, gravida et tristique sit amet, varius eu ipsum. Duis venenatis sem id nibh commodo tempor. Curabitur risus tellus, cursus quis pellentesque sed, elementum eget neque. Sed ultricies, orci et adipiscing dapibus, mauris nisi condimentum felis, ac euismod tellus nunc vel felis. Aliquam egestas accumsan turpis, a volutpat dui fermentum id. Aliquam erat volutpat. Nunc vel auctor odio. Donec eu posuere dolor. Donec vitae justo purus, nec bibendum lectus. Quisque elit tortor, tristique vel ultricies sed, euismod sed tellus. Nullam dolor purus, porta et hendrerit id, rhoncus eu lectus. Nam vel lorem at dui mattis pretium eget a nisi.
@@ -30,7 +30,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
</div>
</body>
diff --git a/tests/html/lipsum.html b/tests/html/lipsum.html
index 39afaebe633..1adceee1c2e 100644
--- a/tests/html/lipsum.html
+++ b/tests/html/lipsum.html
@@ -10,7 +10,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc volutpat feugiat fermentum. Curabitur luctus consequat urna a tincidunt. Nullam vitae velit eu arcu congue volutpat in a diam. Pellentesque lacus ipsum, gravida et tristique sit amet, varius eu ipsum. Duis venenatis sem id nibh commodo tempor. Curabitur risus tellus, cursus quis pellentesque sed, elementum eget neque. Sed ultricies, orci et adipiscing dapibus, mauris nisi condimentum felis, ac euismod tellus nunc vel felis. Aliquam egestas accumsan turpis, a volutpat dui fermentum id. Aliquam erat volutpat. Nunc vel auctor odio. Donec eu posuere dolor. Donec vitae justo purus, nec bibendum lectus. Quisque elit tortor, tristique vel ultricies sed, euismod sed tellus. Nullam dolor purus, porta et hendrerit id, rhoncus eu lectus. Nam vel lorem at dui mattis pretium eget a nisi.
@@ -20,7 +20,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc volutpat feugiat fermentum. Curabitur luctus consequat urna a tincidunt. Nullam vitae velit eu arcu congue volutpat in a diam. Pellentesque lacus ipsum, gravida et tristique sit amet, varius eu ipsum. Duis venenatis sem id nibh commodo tempor. Curabitur risus tellus, cursus quis pellentesque sed, elementum eget neque. Sed ultricies, orci et adipiscing dapibus, mauris nisi condimentum felis, ac euismod tellus nunc vel felis. Aliquam egestas accumsan turpis, a volutpat dui fermentum id. Aliquam erat volutpat. Nunc vel auctor odio. Donec eu posuere dolor. Donec vitae justo purus, nec bibendum lectus. Quisque elit tortor, tristique vel ultricies sed, euismod sed tellus. Nullam dolor purus, porta et hendrerit id, rhoncus eu lectus. Nam vel lorem at dui mattis pretium eget a nisi.
@@ -30,7 +30,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
</div>
</body>
diff --git a/tests/html/longcat.html b/tests/html/longcat.html
index 68c86843415..aad11cd9238 100644
--- a/tests/html/longcat.html
+++ b/tests/html/longcat.html
@@ -15,23 +15,23 @@ var longcat_mid = longcats[1];
var longcat_bot = longcats[2];
function wait_for_img_load(f) {
- if (longcat_top.width != 0 && longcat_mid.width != 0 && longcat_bot.width != 0) {
- f();
- } else {
- window.setTimeout(function() { wait_for_img_load(f) }, 1);
- }
+ if (longcat_top.width != 0 && longcat_mid.width != 0 && longcat_bot.width != 0) {
+ f();
+ } else {
+ window.setTimeout(function() { wait_for_img_load(f) }, 1);
+ }
}
wait_for_img_load(function() {
- var count = 0;
- function elongate() {
- var height = Math.round((Math.cos(count + Math.PI) + 1) * 100 + 20);
- count += 0.2;
- longcat_mid.height = height;
- longcat_mid.width = 600;
- window.setTimeout(function() { elongate() }, 50);
- }
- elongate();
+ var count = 0;
+ function elongate() {
+ var height = Math.round((Math.cos(count + Math.PI) + 1) * 100 + 20);
+ count += 0.2;
+ longcat_mid.height = height;
+ longcat_mid.width = 600;
+ window.setTimeout(function() { elongate() }, 50);
+ }
+ elongate();
});
</script>
</body>
diff --git a/tests/html/overflow_scroll_with_nested_fixed_height.html b/tests/html/overflow_scroll_with_nested_fixed_height.html
index 14d8d3a335a..6807adb18f6 100644
--- a/tests/html/overflow_scroll_with_nested_fixed_height.html
+++ b/tests/html/overflow_scroll_with_nested_fixed_height.html
@@ -10,7 +10,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc volutpat feugiat fermentum. Curabitur luctus consequat urna a tincidunt. Nullam vitae velit eu arcu congue volutpat in a diam. Pellentesque lacus ipsum, gravida et tristique sit amet, varius eu ipsum. Duis venenatis sem id nibh commodo tempor. Curabitur risus tellus, cursus quis pellentesque sed, elementum eget neque. Sed ultricies, orci et adipiscing dapibus, mauris nisi condimentum felis, ac euismod tellus nunc vel felis. Aliquam egestas accumsan turpis, a volutpat dui fermentum id. Aliquam erat volutpat. Nunc vel auctor odio. Donec eu posuere dolor. Donec vitae justo purus, nec bibendum lectus. Quisque elit tortor, tristique vel ultricies sed, euismod sed tellus. Nullam dolor purus, porta et hendrerit id, rhoncus eu lectus. Nam vel lorem at dui mattis pretium eget a nisi.
@@ -20,7 +20,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc volutpat feugiat fermentum. Curabitur luctus consequat urna a tincidunt. Nullam vitae velit eu arcu congue volutpat in a diam. Pellentesque lacus ipsum, gravida et tristique sit amet, varius eu ipsum. Duis venenatis sem id nibh commodo tempor. Curabitur risus tellus, cursus quis pellentesque sed, elementum eget neque. Sed ultricies, orci et adipiscing dapibus, mauris nisi condimentum felis, ac euismod tellus nunc vel felis. Aliquam egestas accumsan turpis, a volutpat dui fermentum id. Aliquam erat volutpat. Nunc vel auctor odio. Donec eu posuere dolor. Donec vitae justo purus, nec bibendum lectus. Quisque elit tortor, tristique vel ultricies sed, euismod sed tellus. Nullam dolor purus, porta et hendrerit id, rhoncus eu lectus. Nam vel lorem at dui mattis pretium eget a nisi.
@@ -30,7 +30,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
</div>
</body>
diff --git a/tests/html/percentage-body-height.html b/tests/html/percentage-body-height.html
index 6a80d5fd79e..ae45318f91f 100644
--- a/tests/html/percentage-body-height.html
+++ b/tests/html/percentage-body-height.html
@@ -10,7 +10,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc volutpat feugiat fermentum. Curabitur luctus consequat urna a tincidunt. Nullam vitae velit eu arcu congue volutpat in a diam. Pellentesque lacus ipsum, gravida et tristique sit amet, varius eu ipsum. Duis venenatis sem id nibh commodo tempor. Curabitur risus tellus, cursus quis pellentesque sed, elementum eget neque. Sed ultricies, orci et adipiscing dapibus, mauris nisi condimentum felis, ac euismod tellus nunc vel felis. Aliquam egestas accumsan turpis, a volutpat dui fermentum id. Aliquam erat volutpat. Nunc vel auctor odio. Donec eu posuere dolor. Donec vitae justo purus, nec bibendum lectus. Quisque elit tortor, tristique vel ultricies sed, euismod sed tellus. Nullam dolor purus, porta et hendrerit id, rhoncus eu lectus. Nam vel lorem at dui mattis pretium eget a nisi.
@@ -20,7 +20,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc volutpat feugiat fermentum. Curabitur luctus consequat urna a tincidunt. Nullam vitae velit eu arcu congue volutpat in a diam. Pellentesque lacus ipsum, gravida et tristique sit amet, varius eu ipsum. Duis venenatis sem id nibh commodo tempor. Curabitur risus tellus, cursus quis pellentesque sed, elementum eget neque. Sed ultricies, orci et adipiscing dapibus, mauris nisi condimentum felis, ac euismod tellus nunc vel felis. Aliquam egestas accumsan turpis, a volutpat dui fermentum id. Aliquam erat volutpat. Nunc vel auctor odio. Donec eu posuere dolor. Donec vitae justo purus, nec bibendum lectus. Quisque elit tortor, tristique vel ultricies sed, euismod sed tellus. Nullam dolor purus, porta et hendrerit id, rhoncus eu lectus. Nam vel lorem at dui mattis pretium eget a nisi.
@@ -30,7 +30,7 @@ Nunc gravida massa quis nisl venenatis interdum. Integer non dui tortor, non vol
Cras ullamcorper vestibulum eros nec suscipit. Vivamus tincidunt, metus at tristique sodales, metus massa sagittis elit, eu scelerisque tortor ante ut sapien. Curabitur rutrum fringilla purus, eget commodo neque tincidunt ut. Etiam ac leo sed nisi ultricies ultrices sed in urna. Fusce blandit fermentum ipsum, vitae dapibus eros tempus vel. Praesent ullamcorper nulla sed nisl facilisis aliquam. Mauris consequat dui quis elit pulvinar vitae pellentesque sapien tempor. Sed accumsan consequat tortor, eget hendrerit lectus rhoncus nec. Mauris diam neque, congue ut laoreet a, hendrerit sit amet sem. Donec eget diam orci, ac vehicula orci. Ut sollicitudin ultricies arcu ut faucibus. Nulla felis nisl, auctor eget adipiscing sit amet, sagittis et est. Cras elit nisi, placerat quis tincidunt at, dapibus et arcu. Donec fermentum eleifend pretium. Nullam at posuere nulla. Phasellus at urna a arcu aliquam ullamcorper eget et ligula.
-Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
+Curabitur fermentum libero vitae libero mattis pulvinar. Vivamus luctus laoreet vulputate. Nunc dictum eros a nulla fringilla quis vestibulum ante malesuada. Suspendisse aliquam vulputate consequat. Duis eu sem eu justo convallis dictum sed ut arcu. Mauris porttitor nulla a augue iaculis posuere euismod mi scelerisque. Maecenas sodales nisi eu turpis fermentum dapibus. Morbi viverra iaculis magna, sed congue justo semper at. Nunc in mi enim. Ut aliquam mi et ligula molestie ac bibendum leo egestas. Nullam molestie, urna ac interdum auctor, dolor diam aliquam ligula, vitae gravida mi orci a tortor. Donec et felis turpis, id lobortis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer feugiat sagittis dictum. Donec mauris ante, feugiat sed ultricies ut, elementum a purus. Sed porta lectus et sem blandit vehicula.
</div>
</body>
diff --git a/tests/html/service-worker/dashboard-page.html b/tests/html/service-worker/dashboard-page.html
index fbbdec2b311..083b0bf013b 100644
--- a/tests/html/service-worker/dashboard-page.html
+++ b/tests/html/service-worker/dashboard-page.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <title>Dashboard Page</title>
+ <meta charset="UTF-8">
+ <title>Dashboard Page</title>
</head>
<body>
<div>
@@ -11,4 +11,4 @@
<a href="http://github.com/servo/servo">Servo Project</a>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/html/service-worker/demo_iframe.html b/tests/html/service-worker/demo_iframe.html
index ea0f4fb9494..1da0e4d7882 100644
--- a/tests/html/service-worker/demo_iframe.html
+++ b/tests/html/service-worker/demo_iframe.html
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <title>Servo Browser Engine</title>
+ <meta charset="UTF-8">
+ <title>Servo Browser Engine</title>
</head>
<body>
<div>
<a href="http://github.com/servo/servo">Servo Project</a>
</div>
-
+
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/html/service-worker/index.html b/tests/html/service-worker/index.html
index 1b38ffafd3b..a20fcbb67e4 100644
--- a/tests/html/service-worker/index.html
+++ b/tests/html/service-worker/index.html
@@ -48,4 +48,4 @@
</script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/html/service-worker/profile.html b/tests/html/service-worker/profile.html
index 93348123564..80d64df8a0d 100644
--- a/tests/html/service-worker/profile.html
+++ b/tests/html/service-worker/profile.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <title>Profile Page</title>
+ <meta charset="UTF-8">
+ <title>Profile Page</title>
</head>
<body>
<div>
@@ -11,4 +11,4 @@
<a href="http://github.com/servo/servo">Servo Project</a>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/html/test-websocket.html b/tests/html/test-websocket.html
index 2ff209e38d4..febefc5e038 100644
--- a/tests/html/test-websocket.html
+++ b/tests/html/test-websocket.html
@@ -1,69 +1,69 @@
-<!DOCTYPE html>
-
-<meta charset="utf-8" />
-
-<title>WebSocket Test</title>
-
-<script language="javascript" type="text/javascript">
-
-var wsUri = "ws://echo.websocket.org/";
-var output;
-
-function init() {
- output = document.getElementById("output");
- testWebSocket();
-}
-
-function testWebSocket() {
- websocket = new WebSocket(wsUri);
- websocket.onopen = function(evt) {
- onOpen(evt)
- };
- websocket.onclose = function(evt) {
- onClose(evt)
- };
- websocket.onmessage = function(evt) {
- onMessage(evt)
- };
- websocket.onerror = function(evt) {
- onError(evt)
- };
-}
-
-function onOpen(evt) {
- writeToScreen("CONNECTED");
- doSend("WebSocket rocks");
-}
-
-function onClose(evt) {
- writeToScreen("DISCONNECTED");
-}
-
-function onMessage(evt) {
- writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>');
- websocket.close();
-}
-
-function onError(evt) {
- writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
-}
-
-function doSend(message) {
- writeToScreen("SENT: " + message);
- websocket.send(message);
-}
-
-function writeToScreen(message) {
- var pre = document.createElement("p");
- pre.style.wordWrap = "break-word";
- pre.innerHTML = message;
- output.appendChild(pre);
-}
-
-window.addEventListener("load", init, false);
-
-</script>
-
-<h2>WebSocket Test</h2>
-
-<div id="output"></div>
+<!DOCTYPE html>
+
+<meta charset="utf-8" />
+
+<title>WebSocket Test</title>
+
+<script language="javascript" type="text/javascript">
+
+var wsUri = "ws://echo.websocket.org/";
+var output;
+
+function init() {
+ output = document.getElementById("output");
+ testWebSocket();
+}
+
+function testWebSocket() {
+ websocket = new WebSocket(wsUri);
+ websocket.onopen = function(evt) {
+ onOpen(evt)
+ };
+ websocket.onclose = function(evt) {
+ onClose(evt)
+ };
+ websocket.onmessage = function(evt) {
+ onMessage(evt)
+ };
+ websocket.onerror = function(evt) {
+ onError(evt)
+ };
+}
+
+function onOpen(evt) {
+ writeToScreen("CONNECTED");
+ doSend("WebSocket rocks");
+}
+
+function onClose(evt) {
+ writeToScreen("DISCONNECTED");
+}
+
+function onMessage(evt) {
+ writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>');
+ websocket.close();
+}
+
+function onError(evt) {
+ writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
+}
+
+function doSend(message) {
+ writeToScreen("SENT: " + message);
+ websocket.send(message);
+}
+
+function writeToScreen(message) {
+ var pre = document.createElement("p");
+ pre.style.wordWrap = "break-word";
+ pre.innerHTML = message;
+ output.appendChild(pre);
+}
+
+window.addEventListener("load", init, false);
+
+</script>
+
+<h2>WebSocket Test</h2>
+
+<div id="output"></div>
diff --git a/tests/html/test_bg_color.html b/tests/html/test_bg_color.html
index 7672b166b70..76c0a0adafd 100644
--- a/tests/html/test_bg_color.html
+++ b/tests/html/test_bg_color.html
@@ -6,7 +6,7 @@
<div class="darkblue">
<img class="maroon"></img>
<div class="darkgreen">
- <img class="gray"></img>
+ <img class="gray"></img>
</div>
</div>
<img class="black"></img>
diff --git a/tests/html/test_class_helloworld.html b/tests/html/test_class_helloworld.html
index 5ffd6074c03..f527c683b4e 100644
--- a/tests/html/test_class_helloworld.html
+++ b/tests/html/test_class_helloworld.html
@@ -1,17 +1,17 @@
<html>
- <head>
- <style type="text/css">
- .c1 { color: red; }
- .c2 { background: blue; }
- #i1 { color: green; }
- </style>
- </head>
- <body>
- <div>
- <div id='i1'>Hello</div>
- <div class='c1'>World</div>
- <div class='c2'>Hello</div>
- <div class='c1 c2'>World</div>
- </div>
- </body>
+ <head>
+ <style type="text/css">
+ .c1 { color: red; }
+ .c2 { background: blue; }
+ #i1 { color: green; }
+ </style>
+ </head>
+ <body>
+ <div>
+ <div id='i1'>Hello</div>
+ <div class='c1'>World</div>
+ <div class='c2'>Hello</div>
+ <div class='c1 c2'>World</div>
+ </div>
+ </body>
</html>
diff --git a/tests/html/test_inline_border.html b/tests/html/test_inline_border.html
index 9558595282d..e4aa9e3b733 100644
--- a/tests/html/test_inline_border.html
+++ b/tests/html/test_inline_border.html
@@ -8,7 +8,7 @@
<img src="test.jpeg" style="border:blue 30px solid;" />
kitty?
<em style="background:blue;font-size:15px;border:yellow 15px solid">
- this is em
+ this is em
</em>
</span>
</p>
diff --git a/tests/html/test_local_bookmark.html b/tests/html/test_local_bookmark.html
index 503cc46bbdd..50c80f9bdb3 100755
--- a/tests/html/test_local_bookmark.html
+++ b/tests/html/test_local_bookmark.html
@@ -16,14 +16,14 @@
<span>This </span> <span>is</span> <span>span</span>
</div>
<a name="top"> [name is "top"] </a>
- <h3 id="h3">
+ <h3 id="h3">
[id is "h3"] <hr/>
- <span> text </span>
+ <span> text </span>
<span style="font-family:Times New Roman"> Times New Roman </span>
<span style="font-family:Verdana"> Verdana </span>
<span style="font-family:Arail"> Arial </span>
<span style="font-family:Courier New"> Courier New </span>
- <span style="font-family:Georgia"> Georgia</span>
+ <span style="font-family:Georgia"> Georgia</span>
<span style="font-family:Lucida Console"> Lucida Console </span>
<div id ="num"> [id is "num"] </div>
<span> 1 </span>
diff --git a/tests/html/test_mouse_down_mouse_up_click.html b/tests/html/test_mouse_down_mouse_up_click.html
index 84cf8d7c954..29f3ec29cd8 100644
--- a/tests/html/test_mouse_down_mouse_up_click.html
+++ b/tests/html/test_mouse_down_mouse_up_click.html
@@ -2,13 +2,13 @@
<input id="clicked">
<script>
document.getElementById("clicked").addEventListener("mousedown", function () {
- window.alert("mousedown"); },
- false);
+ window.alert("mousedown"); },
+ false);
document.getElementById("clicked").addEventListener('mouseup', function() {
- window.alert("mouseup"); },
- false);
+ window.alert("mouseup"); },
+ false);
document.getElementById("clicked").addEventListener("click", function() {
- window.alert("clicked"); },
- false);
+ window.alert("clicked"); },
+ false);
</script>
</body>
diff --git a/tests/html/test_overflow_hidden.html b/tests/html/test_overflow_hidden.html
index 971cdf43f51..df8f72f7b9f 100644
--- a/tests/html/test_overflow_hidden.html
+++ b/tests/html/test_overflow_hidden.html
@@ -11,13 +11,13 @@
blockquote {
width : 125px; height : 100px;
- margin-top: 50px; margin-left: 50px;
+ margin-top: 50px; margin-left: 50px;
border: thin dashed black
}
cite {
display: block;
- text-align : right;
+ text-align : right;
border: none
}
</style>
diff --git a/tests/html/test_target_pseudoselector.html b/tests/html/test_target_pseudoselector.html
index 80b19520999..622e82ea5d4 100644
--- a/tests/html/test_target_pseudoselector.html
+++ b/tests/html/test_target_pseudoselector.html
@@ -14,8 +14,8 @@
</div>
<div>
- <button id="findme">Check for element with :target selector</button>
- <span id="result"></span>
+ <button id="findme">Check for element with :target selector</button>
+ <span id="result"></span>
</div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sodales leo in orci pulvinar, ut tincidunt ipsum vestibulum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Duis et vestibulum metus. Maecenas erat elit, ultrices eu gravida et, sollicitudin ac est. Sed in tellus ut tortor euismod aliquet non egestas metus. Sed pellentesque arcu ut lectus feugiat molestie. Fusce et justo non dui fermentum fermentum. Nunc nec ullamcorper urna. Morbi ultricies ornare arcu nec tincidunt. In sit amet risus lectus. Nam ac lacus urna. Phasellus semper eu enim quis rutrum. Suspendisse convallis orci vel nunc blandit, ut venenatis urna elementum. Curabitur a elit elementum sapien hendrerit laoreet eget in nunc. In vitae tempus neque.
diff --git a/tests/html/test_textarea_input.html b/tests/html/test_textarea_input.html
index 7fd3ab7cb36..be792c026b9 100644
--- a/tests/html/test_textarea_input.html
+++ b/tests/html/test_textarea_input.html
@@ -3,13 +3,13 @@
<head>
</head>
<body>
- <textarea id="textarea">
- </textarea>
+ <textarea id="textarea">
+ </textarea>
</body>
<script>
- var area = document.getElementById('textarea');
- area.addEventListener('input', function() {
- alert('input detected');
- });
+ var area = document.getElementById('textarea');
+ area.addEventListener('input', function() {
+ alert('input detected');
+ });
</script>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/html/test_underline_helloworld.html b/tests/html/test_underline_helloworld.html
index 0df52922ac2..3613a270e11 100644
--- a/tests/html/test_underline_helloworld.html
+++ b/tests/html/test_underline_helloworld.html
@@ -3,7 +3,7 @@
<head>
<title>The Book of Mozilla, 11:9</title>
<style type="text/css">
- div { text-decoration: underline; }
+ div { text-decoration: underline; }
</style>
</head>
<body>
diff --git a/tests/html/tiny_test.html b/tests/html/tiny_test.html
index 1a4baf536d7..8b137891791 100644
--- a/tests/html/tiny_test.html
+++ b/tests/html/tiny_test.html
@@ -1 +1 @@
-
+
diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml
index ca9cfe780c4..844b8ad31b9 100644
--- a/tests/unit/style/Cargo.toml
+++ b/tests/unit/style/Cargo.toml
@@ -14,7 +14,7 @@ app_units = "0.2.5"
cssparser = {version = "0.5.4", features = ["heap_size"]}
euclid = "0.7.1"
rustc-serialize = "0.3"
-selectors = {version = "0.7", features = ["heap_size"]}
+selectors = {version = "0.8", features = ["heap_size"]}
string_cache = {version = "0.2", features = ["heap_size"]}
style = {path = "../../../components/style"}
style_traits = {path = "../../../components/style_traits"}
diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-abspos-002.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-abspos-002.htm.ini
deleted file mode 100644
index 834651c26b3..00000000000
--- a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-abspos-002.htm.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[transform-abspos-002.htm]
- type: reftest
- disabled: https://github.com/servo/servo/issues/11561
diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-abspos-007.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-abspos-007.htm.ini
deleted file mode 100644
index d3924d64958..00000000000
--- a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-abspos-007.htm.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[transform-abspos-007.htm]
- type: reftest
- disabled: https://github.com/servo/servo/issues/11561
diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-table-007.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-table-007.htm.ini
deleted file mode 100644
index 839df62416d..00000000000
--- a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-table-007.htm.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[transform-table-007.htm]
- type: reftest
- disabled: https://github.com/servo/servo/issues/11574
diff --git a/tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-001.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-001.htm.ini
deleted file mode 100644
index a804c570c98..00000000000
--- a/tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-001.htm.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[c5509-ipadn-l-001.htm]
- type: reftest
- expected: FAIL
diff --git a/tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-003.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-003.htm.ini
index 6d242c822ca..11101467644 100644
--- a/tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-003.htm.ini
+++ b/tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-003.htm.ini
@@ -1,3 +1,4 @@
[c5509-ipadn-l-003.htm]
type: reftest
- expected: FAIL
+ expected:
+ if os == "mac": FAIL
diff --git a/tests/wpt/metadata-css/css21_dev/html4/inlines-017.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/inlines-017.htm.ini
deleted file mode 100644
index 9f87e4c3ae1..00000000000
--- a/tests/wpt/metadata-css/css21_dev/html4/inlines-017.htm.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[inlines-017.htm]
- type: reftest
- expected: FAIL
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html.ini
index 48a5a70fda1..5ed05f7bf40 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html.ini
@@ -1,7 +1,5 @@
[tex-sub-image-2d-bad-args.html]
type: testharness
- expected:
- if os == "linux": CRASH
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-complete.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-complete.html.ini
index 521d6449e3a..76ee42aadcf 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-complete.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-complete.html.ini
@@ -1,7 +1,5 @@
[texture-complete.html]
type: testharness
- expected:
- if os == "linux": CRASH
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html.ini
index 4766a121d4e..41d4267c9e6 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html.ini
@@ -1,7 +1,5 @@
[texture-sub-image-cube-maps.html]
type: testharness
- expected:
- if os == "linux": CRASH
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html.ini
deleted file mode 100644
index daef2612d9f..00000000000
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[texture-transparent-pixels-initialized.html]
- type: testharness
- expected:
- if os == "linux": CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html.ini
index 78c55a6b51c..99291ec52ff 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html.ini
@@ -1,7 +1,5 @@
[texture-upload-cube-maps.html]
type: testharness
- expected:
- if os == "linux": CRASH
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html.ini
deleted file mode 100644
index e921f03979d..00000000000
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[data-view-test.html]
- type: testharness
- expected:
- if os == "linux": CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html.ini
index 266f0cc8d7a..2183438b55f 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html.ini
@@ -1,7 +1,5 @@
[null-uniform-location.html]
type: testharness
- expected:
- if os == "linux": CRASH
[WebGL test #6: callUniformFunction('uniform1i') should be undefined. Threw exception TypeError: func is undefined]
expected: FAIL
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html.ini
index d8c77587466..25f129ccc2b 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html.ini
@@ -1,7 +1,5 @@
[uniform-location.html]
type: testharness
- expected:
- if os == "linux": CRASH
[WebGL test #1: contextA.uniformMatrix4fv(locationA, false, mat) threw exception TypeError: contextA.uniformMatrix4fv is not a function]
expected: FAIL
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html.ini
index 083f318219f..03cd6ea4a3b 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html.ini
@@ -1,7 +1,5 @@
[uniform-values-per-program.html]
type: testharness
- expected:
- if os == "linux": CRASH
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index d9d08e602d6..4291bf726aa 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -816,6 +816,18 @@
"url": "/_mozilla/css/border_collapse_simple_a.html"
}
],
+ "css/border_inline_split.html": [
+ {
+ "path": "css/border_inline_split.html",
+ "references": [
+ [
+ "/_mozilla/css/border_inline_split_ref.html",
+ "=="
+ ]
+ ],
+ "url": "/_mozilla/css/border_inline_split.html"
+ }
+ ],
"css/border_radius_asymmetric_sizes_a.html": [
{
"path": "css/border_radius_asymmetric_sizes_a.html",
@@ -6168,6 +6180,12 @@
"url": "/_mozilla/css/animations/basic-transition.html"
}
],
+ "css/animations/mixed-units.html": [
+ {
+ "path": "css/animations/mixed-units.html",
+ "url": "/_mozilla/css/animations/mixed-units.html"
+ }
+ ],
"css/animations/transition-raf.html": [
{
"path": "css/animations/transition-raf.html",
@@ -9964,6 +9982,18 @@
"url": "/_mozilla/css/border_collapse_simple_a.html"
}
],
+ "css/border_inline_split.html": [
+ {
+ "path": "css/border_inline_split.html",
+ "references": [
+ [
+ "/_mozilla/css/border_inline_split_ref.html",
+ "=="
+ ]
+ ],
+ "url": "/_mozilla/css/border_inline_split.html"
+ }
+ ],
"css/border_radius_asymmetric_sizes_a.html": [
{
"path": "css/border_radius_asymmetric_sizes_a.html",
diff --git a/tests/wpt/mozilla/tests/css/acid1_a.html b/tests/wpt/mozilla/tests/css/acid1_a.html
index 29332cb4cc7..3bec0f0244d 100644
--- a/tests/wpt/mozilla/tests/css/acid1_a.html
+++ b/tests/wpt/mozilla/tests/css/acid1_a.html
@@ -2,11 +2,11 @@
<html><head>
<link rel='match' href='acid1_b.html'>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
- <title>
- display/box/float/clear test
- </title>
- <style type="text/css">
-/* last modified: 1 Dec 98 */
+ <title>
+ display/box/float/clear test
+ </title>
+ <style type="text/css">
+/* last modified: 1 Dec 98 */
html {
font: 10px/1 Verdana, sans-serif;
@@ -29,9 +29,9 @@ border: 0;
padding: .5em;
}
-dt {
+dt {
background-color: rgb(204,0,0);
-margin: 0;
+margin: 0;
padding: 1em;
width: 10.638%; /* refers to parent element's width of 47em. = 5em or 50px */
height: 28em;
@@ -84,12 +84,12 @@ background-color: black;
color: white;
}
-form {
+form {
margin: 0;
display: inline;
}
-p {
+p {
margin: 0;
}
@@ -127,49 +127,49 @@ font-weight: normal;
font-size: 1em;
}
</style>
- </head>
- <body>
- <dl>
- <dt>
-
- </dt>
- <dd>
- <ul>
- <li>
-
- </li>
- <li id="bar">
- <p>
-
- </p>
- <form action="./" method="get">
- <p>
-
- </p>
- <p>
-
- </p>
- </form>
- </li>
- <li>
-
- </li>
- <li id="baz">
-
- </li>
- </ul>
- <blockquote>
- <address>
-
- </address>
- </blockquote>
- <h1>
-
- </h1>
- </dd>
- </dl>
- <p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
- </p>
-
+ </head>
+ <body>
+ <dl>
+ <dt>
+
+ </dt>
+ <dd>
+ <ul>
+ <li>
+
+ </li>
+ <li id="bar">
+ <p>
+
+ </p>
+ <form action="./" method="get">
+ <p>
+
+ </p>
+ <p>
+
+ </p>
+ </form>
+ </li>
+ <li>
+
+ </li>
+ <li id="baz">
+
+ </li>
+ </ul>
+ <blockquote>
+ <address>
+
+ </address>
+ </blockquote>
+ <h1>
+
+ </h1>
+ </dd>
+ </dl>
+ <p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
+ </p>
+
</body></html>
diff --git a/tests/wpt/mozilla/tests/css/acid2.html b/tests/wpt/mozilla/tests/css/acid2.html
index 2f700b14e71..4150d256bef 100755
--- a/tests/wpt/mozilla/tests/css/acid2.html
+++ b/tests/wpt/mozilla/tests/css/acid2.html
@@ -144,7 +144,7 @@
<script>
// window.scroll(0, 2684);
// setInterval(() => { console.log(window.scrollY); window.scroll(0, 2684);
-//}, 10);
+//}, 10);
</script>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/after_block_iteration_ref.html b/tests/wpt/mozilla/tests/css/after_block_iteration_ref.html
index e85c4b7cd02..432b040b891 100644
--- a/tests/wpt/mozilla/tests/css/after_block_iteration_ref.html
+++ b/tests/wpt/mozilla/tests/css/after_block_iteration_ref.html
@@ -8,4 +8,4 @@
<div>x</div>
</body>
</html>
-
+
diff --git a/tests/wpt/mozilla/tests/css/animations/mixed-units.html b/tests/wpt/mozilla/tests/css/animations/mixed-units.html
new file mode 100644
index 00000000000..bb029a9fa80
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/animations/mixed-units.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Animation test: mixed units.</title>
+<style>
+ .animatable {
+ width: 50px;
+ height: 50px;
+ background: red;
+ animation: foo 1s infinite linear;
+ }
+ @keyframes foo {
+ from { width: 0%; }
+ to { width: 500px; }
+ }
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div class="animatable"></div>
+<script>
+var div = document.querySelector('.animatable');
+async_test(function(t) {
+ window.addEventListener('load', function() {
+ var test = new window.TestBinding();
+ test.advanceClock(500);
+ assert_equals(getComputedStyle(div).getPropertyValue('width'), '250px');
+ test.advanceClock(500);
+ assert_equals(getComputedStyle(div).getPropertyValue('width'), '500px');
+ test.advanceClock(500);
+ assert_equals(getComputedStyle(div).getPropertyValue('width'), '250px');
+ t.done();
+ })
+})
+</script>
diff --git a/tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_a.html b/tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_a.html
index 77c3f5cfc64..a0dd4a53162 100644
--- a/tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_a.html
+++ b/tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_a.html
@@ -4,26 +4,26 @@
<link rel=match href=block_formatting_context_float_placement_ref.html>
<style>
#nav-searchbar {
- overflow: hidden;
+ overflow: hidden;
}
.nav-submit-button {
- float: right;
+ float: right;
}
#nav-search-in {
- float: left;
+ float: left;
}
.nav-searchfield-width {
- height: 35px;
- overflow: hidden;
- border: solid black 1px;
+ height: 35px;
+ overflow: hidden;
+ border: solid black 1px;
}
</style>
</head>
<body>
- <form id="nav-searchbar">
- <div class="nav-submit-button">Foo</div><span id="nav-search-in">Bar</span>
- <div class="nav-searchfield-width"></div>
- </form>
+ <form id="nav-searchbar">
+ <div class="nav-submit-button">Foo</div><span id="nav-search-in">Bar</span>
+ <div class="nav-searchfield-width"></div>
+ </form>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_ref.html b/tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_ref.html
index 86e27d5582e..aa4caa86df3 100644
--- a/tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_ref.html
+++ b/tests/wpt/mozilla/tests/css/block_formatting_context_float_placement_ref.html
@@ -3,23 +3,23 @@
<head>
<style>
.nav-submit-button {
- float: right;
+ float: right;
}
#nav-search-in {
- float: left;
+ float: left;
}
.nav-searchfield-width {
- height: 35px;
- overflow: hidden;
- border: solid black 1px;
+ height: 35px;
+ overflow: hidden;
+ border: solid black 1px;
}
</style>
</head>
<body>
- <form id="nav-searchbar">
- <div class="nav-submit-button">Foo</div><span id="nav-search-in">Bar</span>
- <div class="nav-searchfield-width"></div>
- </form>
+ <form id="nav-searchbar">
+ <div class="nav-submit-button">Foo</div><span id="nav-search-in">Bar</span>
+ <div class="nav-searchfield-width"></div>
+ </form>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/border_inline_split.html b/tests/wpt/mozilla/tests/css/border_inline_split.html
new file mode 100644
index 00000000000..4cf2aaacc11
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/border_inline_split.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<html><head>
+<link rel=match href=border_inline_split_ref.html>
+<meta content="ahem dom" name="flags">
+<style>
+ div {
+ font: 20px/1 Ahem;
+ width: 7em;
+ }
+ span {
+ border-left: yellow solid 0.5em;
+ border-right: yellow solid 0.5em;
+ }
+</style>
+</head>
+<body>
+ <div>
+ <span>Very long |</span>
+ </div>
+</body></html>
diff --git a/tests/wpt/mozilla/tests/css/border_inline_split_ref.html b/tests/wpt/mozilla/tests/css/border_inline_split_ref.html
new file mode 100644
index 00000000000..658b7f533b6
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/border_inline_split_ref.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html><head>
+<meta content="ahem dom" name="flags">
+<style>
+ span {
+ font: 20px/1 Ahem;
+ border-left: yellow solid 0.5em;
+ border-right: yellow solid 0.5em;
+ }
+</style>
+</head>
+<body>
+ <span>Very <br>long |</span>
+</body></html>
diff --git a/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html b/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html
index 429a18dbc80..f7e972e87a4 100644
--- a/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html
+++ b/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed.html
@@ -21,4 +21,4 @@
<div id="div_inner">
</div>
</div>
-</body> \ No newline at end of file
+</body>
diff --git a/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html b/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html
index 03e79789470..0b084d18269 100644
--- a/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html
+++ b/tests/wpt/mozilla/tests/css/box_shadow_blur_fixed_ref.html
@@ -20,4 +20,4 @@
<div id="div_inner">
</div>
</div>
-</body> \ No newline at end of file
+</body>
diff --git a/tests/wpt/mozilla/tests/css/flex-item-assign-inline-size.html b/tests/wpt/mozilla/tests/css/flex-item-assign-inline-size.html
index a6f0dd15169..0ca2243afce 100644
--- a/tests/wpt/mozilla/tests/css/flex-item-assign-inline-size.html
+++ b/tests/wpt/mozilla/tests/css/flex-item-assign-inline-size.html
@@ -52,13 +52,13 @@
test(function() {
var flex_container0 = document.getElementById("flex-container0");
var flex_item0 = document.getElementById("flex-item0");
-
+
var flex_container1 = document.getElementById("flex-container1");
var flex_item1 = document.getElementById("flex-item1");
-
+
assert_equals(flex_container0.clientWidth, 50);
assert_equals(flex_item0.clientWidth, 5);
-
+
assert_equals(flex_container1.clientWidth, 50);
assert_equals(flex_item1.clientWidth, 5);
});
diff --git a/tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_a.html b/tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_a.html
index cfc418664dd..7066f4f023a 100644
--- a/tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_a.html
+++ b/tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_a.html
@@ -4,23 +4,23 @@
<link rel='match' href='float_clearance_intrinsic_width_ref.html'>
<style>
#nav-your-account {
- background: lightblue;
- display: inline-block;
+ background: lightblue;
+ display: inline-block;
}
.nav-button-title {
- float: left;
- clear: both;
+ float: left;
+ clear: both;
}
</style>
</head>
<body>
- <a id="nav-your-account">
- <div class="nav-button-title">Hello.</div>
- <div class="nav-button-title">Account</div>
- <div class="nav-button-title">Account</div>
- <div class="nav-button-title">Account</div>
- <div class="nav-button-title">Account</div>
- <div class="nav-button-title">Account</div>
- </a>
+ <a id="nav-your-account">
+ <div class="nav-button-title">Hello.</div>
+ <div class="nav-button-title">Account</div>
+ <div class="nav-button-title">Account</div>
+ <div class="nav-button-title">Account</div>
+ <div class="nav-button-title">Account</div>
+ <div class="nav-button-title">Account</div>
+ </a>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_ref.html b/tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_ref.html
index 3d498ea2b87..d54b8b01ec8 100644
--- a/tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_ref.html
+++ b/tests/wpt/mozilla/tests/css/float_clearance_intrinsic_width_ref.html
@@ -3,19 +3,19 @@
<head>
<style>
#nav-your-account {
- background: lightblue;
- display: inline-block;
+ background: lightblue;
+ display: inline-block;
}
</style>
</head>
<body>
- <a id="nav-your-account">
- <div class="nav-button-title">Hello.</div>
- <div class="nav-button-title">Account</div>
- <div class="nav-button-title">Account</div>
- <div class="nav-button-title">Account</div>
- <div class="nav-button-title">Account</div>
- <div class="nav-button-title">Account</div>
- </a>
+ <a id="nav-your-account">
+ <div class="nav-button-title">Hello.</div>
+ <div class="nav-button-title">Account</div>
+ <div class="nav-button-title">Account</div>
+ <div class="nav-button-title">Account</div>
+ <div class="nav-button-title">Account</div>
+ <div class="nav-button-title">Account</div>
+ </a>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/float_intrinsic_height.html b/tests/wpt/mozilla/tests/css/float_intrinsic_height.html
index 62005640d5e..51daad9c536 100644
--- a/tests/wpt/mozilla/tests/css/float_intrinsic_height.html
+++ b/tests/wpt/mozilla/tests/css/float_intrinsic_height.html
@@ -1,25 +1,25 @@
<!DOCTYPE html>
<html>
- <head>
+ <head>
<link rel='match' href='float_intrinsic_height_ref.html'>
- <style type="text/css">
- .otherprojects {
- background-color: red;
- float: left;
- width: 200px;
- }
- .otherprojects-item {
- background-color: yellow;
- float: left;
- width: 100px;
- height: 100px;
- }
- </style>
- </head>
- <body>
- <div class="otherprojects">
- <div class="otherprojects-item">
- </div>
- </div>&nbsp;
- </body>
+ <style type="text/css">
+ .otherprojects {
+ background-color: red;
+ float: left;
+ width: 200px;
+ }
+ .otherprojects-item {
+ background-color: yellow;
+ float: left;
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="otherprojects">
+ <div class="otherprojects-item">
+ </div>
+ </div>&nbsp;
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/float_intrinsic_height_ref.html b/tests/wpt/mozilla/tests/css/float_intrinsic_height_ref.html
index ac8beeea0c3..97add6c2d43 100644
--- a/tests/wpt/mozilla/tests/css/float_intrinsic_height_ref.html
+++ b/tests/wpt/mozilla/tests/css/float_intrinsic_height_ref.html
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html>
- <head>
- <style type="text/css">
- .otherprojects {
- background-color: red;
- width: 200px;
- }
- .otherprojects-item {
- background-color: yellow;
- width: 100px;
- height: 100px;
- }
- </style>
- </head>
- <body>
- <div class="otherprojects">
- <div class="otherprojects-item">
- </div>
- </div>
- </body>
+ <head>
+ <style type="text/css">
+ .otherprojects {
+ background-color: red;
+ width: 200px;
+ }
+ .otherprojects-item {
+ background-color: yellow;
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="otherprojects">
+ <div class="otherprojects-item">
+ </div>
+ </div>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/fonts/takao-p-gothic/COPYING.html b/tests/wpt/mozilla/tests/css/fonts/takao-p-gothic/COPYING.html
index 2337aef8fce..5d7045cb7cf 100644
--- a/tests/wpt/mozilla/tests/css/fonts/takao-p-gothic/COPYING.html
+++ b/tests/wpt/mozilla/tests/css/fonts/takao-p-gothic/COPYING.html
@@ -18,7 +18,7 @@
</head>
<body id="comment-detail">
-
+
<h4 id="LicenceTOP">IPA Font License Agreement v1.0 <a href="#LicenceJP">日本語/Japanese</a> <a href="#LicenceEng">English</a></h4>
<h3 id="LicenceJP">IPAフォントライセンスv1.0 </h3>
@@ -114,7 +114,7 @@
<li>The Recipient may install the Licensed Program on any number of Computers and use the same in accordance with the provisions set forth in this Agreement.</li>
<li>The Recipient may use the Licensed Program, with or without modification in printed materials or in Digital Content as an expression of character texts or the like.</li>
<li>The Recipient may conduct Reproduction and Other Exploitation of the printed materials and Digital Content created in accordance with the preceding Paragraph, for commercial or non-commercial purposes and in any form of media including but not limited to broadcasting, communication and various recording media.</li>
- <li>If any Recipient extracts Embedded Fonts from a Digital Document File to create a Derived Program, such Derived Program shall be subject to the terms of this agreement.</li>
+ <li>If any Recipient extracts Embedded Fonts from a Digital Document File to create a Derived Program, such Derived Program shall be subject to the terms of this agreement.</li>
<li>If any Recipient performs Reproduction or Other Exploitation of a Digital Document File in which Embedded Fonts of the Licensed Program are used only for rendering the Digital Content within such Digital Document File then such Recipient shall have no further obligations under this Agreement in relation to such actions.</li>
<li>The Recipient may reproduce the Licensed Program as is without modification and transfer such copies, publicly transmit or otherwise redistribute the Licensed Program to a third party for commercial or non-commercial purposes (“Redistribute”), in accordance with the provisions set forth in Article 3 Paragraph 2.</li>
<li>The Recipient may create, use, reproduce and/or Redistribute a Derived Program under the terms stated above for the Licensed Program: provided, that the Recipient shall follow the provisions set forth in Article 3 Paragraph 1 when Redistributing the Derived Program. </li>
diff --git a/tests/wpt/mozilla/tests/css/height_compute.html b/tests/wpt/mozilla/tests/css/height_compute.html
index 0f017463495..ab017efb68a 100644
--- a/tests/wpt/mozilla/tests/css/height_compute.html
+++ b/tests/wpt/mozilla/tests/css/height_compute.html
@@ -12,11 +12,11 @@ body {margin : 0px}
</head>
<body>
<div class="start">
- <div class="half"></div>
- <div class="quarter"></div>
- <div class="eighth"></div>
- <div class="sixteenth"></div>
- <div class="thirtysecond"></div>
- <div class="sixtyfourth"></div>
+ <div class="half"></div>
+ <div class="quarter"></div>
+ <div class="eighth"></div>
+ <div class="sixteenth"></div>
+ <div class="thirtysecond"></div>
+ <div class="sixtyfourth"></div>
</div>
</body>
diff --git a/tests/wpt/mozilla/tests/css/height_compute_reset.html b/tests/wpt/mozilla/tests/css/height_compute_reset.html
index 146b6b994d9..8424600bef3 100644
--- a/tests/wpt/mozilla/tests/css/height_compute_reset.html
+++ b/tests/wpt/mozilla/tests/css/height_compute_reset.html
@@ -13,11 +13,11 @@
</head>
<body>
<div class="start">
- <div class="half"></div>
- <div class="quarter"></div>
- <div class="eighth"></div>
- <div class="sixteenth"></div>
- <div class="thirtysecond"></div>
- <div class="sixtyfourth"></div>
+ <div class="half"></div>
+ <div class="quarter"></div>
+ <div class="eighth"></div>
+ <div class="sixteenth"></div>
+ <div class="thirtysecond"></div>
+ <div class="sixtyfourth"></div>
</div>
</body>
diff --git a/tests/wpt/mozilla/tests/css/hide_after_create.html b/tests/wpt/mozilla/tests/css/hide_after_create.html
index 3ae85e9c54e..d76dce55e39 100644
--- a/tests/wpt/mozilla/tests/css/hide_after_create.html
+++ b/tests/wpt/mozilla/tests/css/hide_after_create.html
@@ -1,25 +1,25 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel='match' href='hide_after_create_ref.html'>
- <style type="text/css">
- .hidden {
- display: none;
- }
- body {
- background-color: green;
- }
- iframe {
- background-color: red;
- border: 0;
- }
- </style>
+ <style type="text/css">
+ .hidden {
+ display: none;
+ }
+ body {
+ background-color: green;
+ }
+ iframe {
+ background-color: red;
+ border: 0;
+ }
+ </style>
<body>
- <iframe id="iframe" src="about:blank"></iframe>
+ <iframe id="iframe" src="about:blank"></iframe>
</body>
<script type="text/javascript">
- window.onload = function() {
- document.getElementById("iframe").classList.add("hidden");
+ window.onload = function() {
+ document.getElementById("iframe").classList.add("hidden");
document.documentElement.classList.remove("reftest-wait");
- }
+ }
</script>
</html>
diff --git a/tests/wpt/mozilla/tests/css/hide_after_create_ref.html b/tests/wpt/mozilla/tests/css/hide_after_create_ref.html
index 1c5cdc2bd21..cb61f63d447 100644
--- a/tests/wpt/mozilla/tests/css/hide_after_create_ref.html
+++ b/tests/wpt/mozilla/tests/css/hide_after_create_ref.html
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
- <style type="text/css">
- body {
- background-color: green;
- }
- </style>
+ <style type="text/css">
+ body {
+ background-color: green;
+ }
+ </style>
<body>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/iframe/hide_and_show.html b/tests/wpt/mozilla/tests/css/iframe/hide_and_show.html
index 6acdaf6dc6f..097a549ae27 100644
--- a/tests/wpt/mozilla/tests/css/iframe/hide_and_show.html
+++ b/tests/wpt/mozilla/tests/css/iframe/hide_and_show.html
@@ -1,21 +1,21 @@
<!DOCTYPE html>
<html class="reftest-wait">
- <link rel=match href=hide_and_show_ref.html>
- <style type="text/css">
- .hidden {
- display: none;
- }
- iframe {
- border: 0;
- }
- </style>
+ <link rel=match href=hide_and_show_ref.html>
+ <style type="text/css">
+ .hidden {
+ display: none;
+ }
+ iframe {
+ border: 0;
+ }
+ </style>
<body id="container">
- <iframe id="iframe" class="hidden" src="data:text/html,%3Cbody%20style%3D%22background%3Agreen%3B%20%22%3E"></iframe>
+ <iframe id="iframe" class="hidden" src="data:text/html,%3Cbody%20style%3D%22background%3Agreen%3B%20%22%3E"></iframe>
</body>
<script type="text/javascript">
- window.onload = function() {
- document.getElementById("iframe").classList.remove("hidden");
- document.documentElement.classList.remove("reftest-wait");
- }
+ window.onload = function() {
+ document.getElementById("iframe").classList.remove("hidden");
+ document.documentElement.classList.remove("reftest-wait");
+ }
</script>
</html>
diff --git a/tests/wpt/mozilla/tests/css/iframe/hide_and_show_ref.html b/tests/wpt/mozilla/tests/css/iframe/hide_and_show_ref.html
index 1580b58858c..cc042f429d3 100644
--- a/tests/wpt/mozilla/tests/css/iframe/hide_and_show_ref.html
+++ b/tests/wpt/mozilla/tests/css/iframe/hide_and_show_ref.html
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
- <style type="text/css">
- div {
- width: 300px;
- height: 150px;
- background-color: green;
- }
- </style>
+ <style type="text/css">
+ div {
+ width: 300px;
+ height: 150px;
+ background-color: green;
+ }
+ </style>
<body>
- <div></div>
+ <div></div>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_a.html b/tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_a.html
index 656b344a34b..76b0b086b9e 100644
--- a/tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_a.html
+++ b/tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_a.html
@@ -9,19 +9,19 @@ html, body {
line-height: 0;
}
.nav-button-outer {
- background: red;
- display: inline-block;
+ background: red;
+ display: inline-block;
}
.nav-down-arrow {
- display: inline-block;
- border-style: solid;
- border-color: black;
- border-width: 10px 200px 0 0;
+ display: inline-block;
+ border-style: solid;
+ border-color: black;
+ border-width: 10px 200px 0 0;
}
</style>
</head>
<body>
- <a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
+ <a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_ref.html b/tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_ref.html
index b11fd4f1b8e..d71cf566933 100644
--- a/tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_ref.html
+++ b/tests/wpt/mozilla/tests/css/inline_block_border_intrinsic_size_ref.html
@@ -8,18 +8,18 @@ html, body {
line-height: 0;
}
.nav-button-outer {
- display: inline-block;
+ display: inline-block;
}
.nav-down-arrow {
- display: inline-block;
- border-style: solid;
- border-color: black;
- border-width: 10px 200px 0 0;
+ display: inline-block;
+ border-style: solid;
+ border-color: black;
+ border-width: 10px 200px 0 0;
}
</style>
</head>
<body>
- <a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
+ <a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/inline_whitespace_a.html b/tests/wpt/mozilla/tests/css/inline_whitespace_a.html
index 930f3b3b016..ee3fa57b78b 100644
--- a/tests/wpt/mozilla/tests/css/inline_whitespace_a.html
+++ b/tests/wpt/mozilla/tests/css/inline_whitespace_a.html
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
- <head>
- <link rel="stylesheet" type="text/css" href="css/ahem.css">
- <link rel=match href=inline_whitespace_ref.html>
- <style type="text/css">
- body {
- background-color: #f6f6f6;
- }
- </style>
- </head>
- <body>
- <span>A</span> <span>B</span>
- </body>
+ <head>
+ <link rel="stylesheet" type="text/css" href="css/ahem.css">
+ <link rel=match href=inline_whitespace_ref.html>
+ <style type="text/css">
+ body {
+ background-color: #f6f6f6;
+ }
+ </style>
+ </head>
+ <body>
+ <span>A</span> <span>B</span>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/inline_whitespace_b.html b/tests/wpt/mozilla/tests/css/inline_whitespace_b.html
index a9b1bbaf290..780fb6bb479 100644
--- a/tests/wpt/mozilla/tests/css/inline_whitespace_b.html
+++ b/tests/wpt/mozilla/tests/css/inline_whitespace_b.html
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
- <head>
- <link rel="stylesheet" type="text/css" href="css/ahem.css">
- <link rel=match href=inline_whitespace_ref.html>
- <style type="text/css">
- body {
- background-color: #f6f6f6;
- }
- </style>
- </head>
- <body>
- <span>A</span>
- <span>B</span>
- </body>
+ <head>
+ <link rel="stylesheet" type="text/css" href="css/ahem.css">
+ <link rel=match href=inline_whitespace_ref.html>
+ <style type="text/css">
+ body {
+ background-color: #f6f6f6;
+ }
+ </style>
+ </head>
+ <body>
+ <span>A</span>
+ <span>B</span>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/inline_whitespace_ref.html b/tests/wpt/mozilla/tests/css/inline_whitespace_ref.html
index 7c88e293d46..5340b9fc47a 100644
--- a/tests/wpt/mozilla/tests/css/inline_whitespace_ref.html
+++ b/tests/wpt/mozilla/tests/css/inline_whitespace_ref.html
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html>
- <head>
- <link rel="stylesheet" type="text/css" href="css/ahem.css">
- <style type="text/css">
- body {
- background-color: #f6f6f6;
- }
- </style>
- </head>
- <body>
- <span>A B</span>
- </body>
+ <head>
+ <link rel="stylesheet" type="text/css" href="css/ahem.css">
+ <style type="text/css">
+ body {
+ background-color: #f6f6f6;
+ }
+ </style>
+ </head>
+ <body>
+ <span>A B</span>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/input_alignment_a.html b/tests/wpt/mozilla/tests/css/input_alignment_a.html
index 9a2262e3b47..3bb95e8502c 100644
--- a/tests/wpt/mozilla/tests/css/input_alignment_a.html
+++ b/tests/wpt/mozilla/tests/css/input_alignment_a.html
@@ -4,13 +4,13 @@
<title>Input elements shouldn't inherit parent containers alignment</title>
<link rel="match" href="input_alignment_ref.html">
<style>
- div {
- text-align: center;
- float: left;
+ div {
+ text-align: center;
+ float: left;
}
</style>
</head>
<body>
<div><input value="test" /></div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/mozilla/tests/css/input_alignment_ref.html b/tests/wpt/mozilla/tests/css/input_alignment_ref.html
index 0a0b18e87ae..d356a418cf9 100644
--- a/tests/wpt/mozilla/tests/css/input_alignment_ref.html
+++ b/tests/wpt/mozilla/tests/css/input_alignment_ref.html
@@ -6,4 +6,4 @@
<body>
<input value="test" />
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/mozilla/tests/css/input_placeholder.html b/tests/wpt/mozilla/tests/css/input_placeholder.html
index 60da0f746b8..f74cec8d54c 100644
--- a/tests/wpt/mozilla/tests/css/input_placeholder.html
+++ b/tests/wpt/mozilla/tests/css/input_placeholder.html
@@ -2,4 +2,4 @@
<meta charset="utf-8">
<title></title>
<link rel="match" href="input_placeholder_ref.html">
-<input type=text placeholder="foo bar"><input type=text placeholder="foo bar"> \ No newline at end of file
+<input type=text placeholder="foo bar"><input type=text placeholder="foo bar">
diff --git a/tests/wpt/mozilla/tests/css/input_placeholder_ref.html b/tests/wpt/mozilla/tests/css/input_placeholder_ref.html
index 1d106384802..b82bc1cc702 100644
--- a/tests/wpt/mozilla/tests/css/input_placeholder_ref.html
+++ b/tests/wpt/mozilla/tests/css/input_placeholder_ref.html
@@ -2,4 +2,4 @@
<meta charset="utf-8">
<title></title>
<link rel="match" href="input_placeholder_ref.html">
-<input type=text value="foo bar"><input type=text value="foo bar"> \ No newline at end of file
+<input type=text value="foo bar"><input type=text value="foo bar">
diff --git a/tests/wpt/mozilla/tests/css/input_whitespace.html b/tests/wpt/mozilla/tests/css/input_whitespace.html
index 44f26751eac..1c2b87fa988 100644
--- a/tests/wpt/mozilla/tests/css/input_whitespace.html
+++ b/tests/wpt/mozilla/tests/css/input_whitespace.html
@@ -17,4 +17,4 @@ b
b
</textarea>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/mozilla/tests/css/input_whitespace_ref.html b/tests/wpt/mozilla/tests/css/input_whitespace_ref.html
index 6be82abad19..2599f727870 100644
--- a/tests/wpt/mozilla/tests/css/input_whitespace_ref.html
+++ b/tests/wpt/mozilla/tests/css/input_whitespace_ref.html
@@ -17,4 +17,4 @@ b
b
</textarea>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/mozilla/tests/css/linebreak_inline_span_a.html b/tests/wpt/mozilla/tests/css/linebreak_inline_span_a.html
index dc1fd42f49d..125e4ab9d65 100644
--- a/tests/wpt/mozilla/tests/css/linebreak_inline_span_a.html
+++ b/tests/wpt/mozilla/tests/css/linebreak_inline_span_a.html
@@ -3,8 +3,8 @@
<link rel='match' href='linebreak_inline_span_b.html'>
<style type="text/css">
* {
- margin: 0px;
- padding: 0px;
+ margin: 0px;
+ padding: 0px;
}
</style>
</head>
diff --git a/tests/wpt/mozilla/tests/css/linebreak_inline_span_b.html b/tests/wpt/mozilla/tests/css/linebreak_inline_span_b.html
index ea1df5cc545..1a0387d46f7 100644
--- a/tests/wpt/mozilla/tests/css/linebreak_inline_span_b.html
+++ b/tests/wpt/mozilla/tests/css/linebreak_inline_span_b.html
@@ -2,8 +2,8 @@
<head>
<style type="text/css">
* {
- margin: 0px;
- padding: 0px;
+ margin: 0px;
+ padding: 0px;
}
</style>
</head>
diff --git a/tests/wpt/mozilla/tests/css/object_element_b.html b/tests/wpt/mozilla/tests/css/object_element_b.html
index ae6d8ab3648..6b47ed7d16c 100644
--- a/tests/wpt/mozilla/tests/css/object_element_b.html
+++ b/tests/wpt/mozilla/tests/css/object_element_b.html
@@ -6,4 +6,4 @@
<body>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAYCAYAAAFy7sgCAAAGsUlEQVRo3u2ZbWwcZxHHf3s%2B7LNbO3ZjXBtowprGODRX0qpNQCjmJKuVKhMl1P2AkCwhFOIKkCBSm9IXavGFKAixIAECwkmWo5MrhRI3Ub40IEwQgp6aIDg3Cd6eEqyIHEteah%2B1E69vhw%2BZtTaX8704ZzkKjHS6271nZ56ZZ%2BY%2F%2F%2BdZKF%2FCwYshx3EkkggLsD1v4FQkEZZYLCbAKyG9%2Ba9EIsG6hnUAf8x74K3aUC3j4%2BM54HcsR2oAIomwZOezkv%2FnSHpYNh%2BNCmAE7xv94zvFdd1bHsjMZmQkPSxAJP%2B%2FfuBLwK54PC7JZFKAVJmzXLBt2w%2FMvcDLwIb8QS8CeJ4nkURYIomw7J%2FYJ8BvSiiXptGGxWds2%2Fa9%2Bnaxh%2BYAD%2Bgt04NDgABTpQY2cvvSFLzw86gWeBVwC8SzlOSv2YeBPfmDBoBHgKmR9LBEEmHZfDTqGykqfkUE0nA78BzQGfSgUeP3wNeTXwXg7MwZDhw4UHL6ra2ti79%2FOvljgG8AZ4H64Lhm4MvAocxsRppGG%2FxcXihlwLIs6R%2FfKV2HO%2F26uA94pdDYUKUZUU7W1RQYXA98Gnhaf5%2FXWX0HeAHYoQonqa4sZSOsSWMCWeC9Yko%2BCQwBe4E6oNc0Tc91XTl1%2BaTsn9gnI%2Blhyc5nZWxsrBIkKSbl2tiic3tW53YDEwOKaoFBrcOfqKee53lG9xsPMjV784r%2F4lO%2FpPvyJ9iyZcuvFSaXK5XYeAZ4CDgGvB3MS4B54LQuWYPeuy4iRFsevsXqpuYoqVQKIH2bK1CuDQNo11o4XUzh%2FcDWYIe1LEtyuZx4niee54njOGKapgfsqlL%2Bl2OjEXg8nxrc1dJ0h3hbtL%2BGCtz7KPBF4CuBe9uB15VafE8hr9qylI3HgG8C2%2FK7VyHZoJj7MrBRm30qFotJMpkU27YlHo%2F7Ha5a%2BV%2FKRkSJ4KuKRLVLKapTjB1SzAVIjY2NSXY%2BKyPpYdk%2FsU9OXT4pruv6BdZbBQfKsVGnvWlIe1VB6VQO8JxC1vZYLCbZ%2BaxsPhpdZDyRRFhG0sPiOE6ldKBg2lRg4xF1YCDIIIKN7DGgD3gH%2BBXwejKZfPrs2tPs%2FvPN2bKuYR1nd7xLKBSSJeqoXKnERjPwNWAG%2BLn2rZuM%2B4Tpml6vaWlp4eLcxVusZq5lCgVgOVKJjRqdX86ffL4D5wIoZACnTpw4wRMdT96i%2FImOJxERAs4uVyqxUacF%2FPdiCj%2BjdRBRGFtwXVdG0sPSdbhTmkYbpH98p2RmM2JZlig1vl0GWo4NQ%2Fn%2Bs5pKRXfwjweaxy7TND3HcRZbfC6X8xVPVQlGy7WxVWlO5XRXFXm6EZmrQuSXYyPE3SiVoEhE6Wyr0u2rumO6zv%2B21AFdQAswC1wCMuUCXCmyWQus103Qg8qlDO0lxwOb%2Fl4FiK3AB3VS%2FuKKLtK%2FgbeAnwG%2FvUODuRw%2FFrR0H1UC75fwu8oJ%2FhFsW5VIG%2FBUgEIN6Y65O4AHu4Ap0zQ9y7LEcZyb9lRBUHQcRyzL8unZVBW5bFWAvAp%2BhDQ2g4F47dUYtlU6obXA54DnVdFLekjUGGifh4AFy7LEdV3xj3X9I66m0QZpGm2QrsOd0j%2B%2BU0bSw5KZzYjrun6HWlAd961i4FfCj0aN1Usau%2Bc1lmuXPFwvAEumUut7tQQvAb%2FXb%2FT0bCAej9cODg7yt%2Bm%2F8q2%2F7OUHZ76PnZ1k2p0mJzlykmPancbOTnL0whHs7CQfb%2B5mx2d3sH79%2BtCRI0c6FeaOr9ICrIQfLvA%2B8BGNXxi4R6HrisJVUWrxAVW2oMFf0Aczim8o3kV6enowDIPjF9%2Fk%2BMU3S3rrjzMMg56eHr%2BxP7qKFbASfojG6kpeDGs1tiW53RxwWT%2Bin5q8w4xpQK5evQpAR30H7ZH2khNvj7TTUd8BgD4rqmu1ZKX8qNeY%2BfHz4zlXDgT5E8tpCTUq7XSBC4Euv8227TV9fX1E73%2BYtvo27BmbS9cvFVTY3bSRFza9yOcf6Gfmygy7d%2B%2Fm%2FPnzF4DvrsBLhnJlJfwIKXxv1PheAE4qK6p4H9AGbNKTuhngBPBPXYRe4IemaT5kWZbR19fHNbmGnZ1k4r3U4glDR30Hm5qjbGjsImJEOHbsGHv27JFz5869o0eFq01Jq%2BmHAXwI6FFKagMTgHM7GzFDS%2BoeLSMv7zjzC9x4Y7gxFovVDAwMEI1GaWlpWSzRVCrFwYMH%2FXfxZ4AfAa8B%2F7lDaGg1%2FQgp43lfK0yqtRMuJa3ceKe5DfgYsCYAZ2ngD8CfAkzqTpW7xY%2F%2FSznyX%2FVeUb2kVmX4AAAAAElFTkSuQmCC"/>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_a.html b/tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_a.html
index 344f43abd3e..549fa511556 100644
--- a/tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_a.html
+++ b/tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_a.html
@@ -25,8 +25,8 @@
<body>
<div id="first">
<div id="second">
- <div id="abs">
- </div>
+ <div id="abs">
+ </div>
</div>
</div>
</body>
diff --git a/tests/wpt/mozilla/tests/css/position_abs_cb_with_non_cb_kid_a.html b/tests/wpt/mozilla/tests/css/position_abs_cb_with_non_cb_kid_a.html
index a3dfbb29e38..3cdc98eb319 100644
--- a/tests/wpt/mozilla/tests/css/position_abs_cb_with_non_cb_kid_a.html
+++ b/tests/wpt/mozilla/tests/css/position_abs_cb_with_non_cb_kid_a.html
@@ -29,10 +29,10 @@
<div id="abs">
</div>
<div id="non-cb-2">
- <div id="second">
- </div>
- <div id="abs">
- </div>
+ <div id="second">
+ </div>
+ <div id="abs">
+ </div>
</div>
</div>
</body>
diff --git a/tests/wpt/mozilla/tests/css/position_abs_nested_a.html b/tests/wpt/mozilla/tests/css/position_abs_nested_a.html
index 0a4e7c31dba..aae8081c2c0 100644
--- a/tests/wpt/mozilla/tests/css/position_abs_nested_a.html
+++ b/tests/wpt/mozilla/tests/css/position_abs_nested_a.html
@@ -27,8 +27,8 @@
<body>
<div id="first">
<div id="abs">
- <div id="abs2">
- </div>
+ <div id="abs2">
+ </div>
</div>
</div>
</body>
diff --git a/tests/wpt/mozilla/tests/css/position_abs_nested_b.html b/tests/wpt/mozilla/tests/css/position_abs_nested_b.html
index b539f248c8a..f3ccdee17aa 100644
--- a/tests/wpt/mozilla/tests/css/position_abs_nested_b.html
+++ b/tests/wpt/mozilla/tests/css/position_abs_nested_b.html
@@ -27,8 +27,8 @@
<div id="first">
<div class="row"></div>
<div class="center">
- <div class="little-box">
- </div>
+ <div class="little-box">
+ </div>
</div>
<div class="row"></div>
</div>
diff --git a/tests/wpt/mozilla/tests/css/position_abs_pseudo_a.html b/tests/wpt/mozilla/tests/css/position_abs_pseudo_a.html
index 4ec6934cdbc..2362c883e5c 100644
--- a/tests/wpt/mozilla/tests/css/position_abs_pseudo_a.html
+++ b/tests/wpt/mozilla/tests/css/position_abs_pseudo_a.html
@@ -2,18 +2,18 @@
<html>
<head>
<link rel='match' href='position_abs_pseudo_b.html'>
- <style>
+ <style>
body {
margin: 0;
}
- div:before {
+ div:before {
position: absolute;
width: 100px;
height: 100px;
background-color: red;
content: "";
}
- </style>
+ </style>
</head>
<body>
<div>
diff --git a/tests/wpt/mozilla/tests/css/position_abs_pseudo_b.html b/tests/wpt/mozilla/tests/css/position_abs_pseudo_b.html
index 19f3ed47cfa..21420d4893d 100644
--- a/tests/wpt/mozilla/tests/css/position_abs_pseudo_b.html
+++ b/tests/wpt/mozilla/tests/css/position_abs_pseudo_b.html
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<head>
- <style>
+ <style>
body {
margin: 0;
}
- .before {
+ .before {
width: 100px;
height: 100px;
background-color: red;
}
- </style>
+ </style>
</head>
<body>
<div class="before">
diff --git a/tests/wpt/mozilla/tests/css/position_abs_replaced_simple_b.html b/tests/wpt/mozilla/tests/css/position_abs_replaced_simple_b.html
index da942fa82b6..38d051ed829 100644
--- a/tests/wpt/mozilla/tests/css/position_abs_replaced_simple_b.html
+++ b/tests/wpt/mozilla/tests/css/position_abs_replaced_simple_b.html
@@ -23,7 +23,7 @@
<div class="row">
</div>
<div class="center">
- <img src="rust_logo.png" width="30" id="abs" alt="Rust Logo" />
+ <img src="rust_logo.png" width="30" id="abs" alt="Rust Logo" />
</div>
<div class="row">
</div>
diff --git a/tests/wpt/mozilla/tests/css/pseudo_content_with_layers.html b/tests/wpt/mozilla/tests/css/pseudo_content_with_layers.html
index 2238ec06a8c..09dcdbcfbd1 100644
--- a/tests/wpt/mozilla/tests/css/pseudo_content_with_layers.html
+++ b/tests/wpt/mozilla/tests/css/pseudo_content_with_layers.html
@@ -3,7 +3,7 @@
<link rel='match' href='pseudo_content_with_layers_ref.html'>
<body>
<style>
- .before-test::before {
+ .before-test::before {
content: " ";
position: fixed;
width: 100px;
@@ -11,7 +11,7 @@
background: green;
}
- .after-test::after {
+ .after-test::after {
content: " ";
position: fixed;
width: 100px;
diff --git a/tests/wpt/mozilla/tests/css/table_auto_width.html b/tests/wpt/mozilla/tests/css/table_auto_width.html
index 6571bc84f39..02efc2cc36d 100644
--- a/tests/wpt/mozilla/tests/css/table_auto_width.html
+++ b/tests/wpt/mozilla/tests/css/table_auto_width.html
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html>
- <head>
+ <head>
<link rel='match' href='table_auto_width_ref.html'>
- </head>
- <body>
- <table>
- <tbody>
- <tr>
- <td style="padding: 0">
- <span>12345<span>67890</span></span>
- </td>
- </tr>
- </tbody>
- </table>
- </body>
+ </head>
+ <body>
+ <table>
+ <tbody>
+ <tr>
+ <td style="padding: 0">
+ <span>12345<span>67890</span></span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/table_auto_width_ref.html b/tests/wpt/mozilla/tests/css/table_auto_width_ref.html
index 0cb28c3ef1e..79dd490fc23 100644
--- a/tests/wpt/mozilla/tests/css/table_auto_width_ref.html
+++ b/tests/wpt/mozilla/tests/css/table_auto_width_ref.html
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
- <head>
- </head>
- <body>
- <table>
- <tbody>
- <tr>
- <td style="padding: 0">
- <span>1234567890</span>
- </td>
- </tr>
- </tbody>
- </table>
- </body>
+ <head>
+ </head>
+ <body>
+ <table>
+ <tbody>
+ <tr>
+ <td style="padding: 0">
+ <span>1234567890</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/text_align_complex_a.html b/tests/wpt/mozilla/tests/css/text_align_complex_a.html
index 5fe118020db..2d81dc278b3 100644
--- a/tests/wpt/mozilla/tests/css/text_align_complex_a.html
+++ b/tests/wpt/mozilla/tests/css/text_align_complex_a.html
@@ -1,40 +1,40 @@
-<!DOCTYPE html>
-<html>
-<head>
-<link rel='match' href='text_align_complex_ref.html'>
-<link rel="stylesheet" type="text/css" href="css/ahem.css">
-<style>
-
- * { margin: 0px !important; padding: 0px !important; }
-
- div {
- width: 100px;
- font-size: 10px;
- font-family: Ahem;
- padding: 10px !important;
- }
-
-</style>
-</head>
-<body>
-
-<section style="text-align: right; color: #f00;">
- <div style="background: #fdd;"> xx xx xx xxxx</div>
- <div style="background: #fdd;"> xx xx xx xxxxxxxxxxxxx</div>
- <div style="background: #fdd;">xxxxxxxxxxxxx xx xx xx xxxx</div>
-</section>
-
-<section style="text-align: center; color: #0f0;">
- <div style="background: #dfd;"> xx xx xx xxxx </div>
- <div style="background: #dfd;"> xx xx xx xxxxxxxxxxxxx</div>
- <div style="background: #dfd;">xxxxxxxxxxxxx xx xx xx xxxx </div>
-</section>
-
-<section style="text-align: justify; color: #00f;">
- <div style="background: #ddf;">xx xx xx xxxx</div>
- <div style="background: #ddf;">xx xx xx xxxxxxxxxxxxx</div>
- <div style="background: #ddf;">xxxxxxxxxxxxx xx xx xx xxxx </div>
-</section>
-</body>
-</html>
-
+<!DOCTYPE html>
+<html>
+<head>
+<link rel='match' href='text_align_complex_ref.html'>
+<link rel="stylesheet" type="text/css" href="css/ahem.css">
+<style>
+
+ * { margin: 0px !important; padding: 0px !important; }
+
+ div {
+ width: 100px;
+ font-size: 10px;
+ font-family: Ahem;
+ padding: 10px !important;
+ }
+
+</style>
+</head>
+<body>
+
+<section style="text-align: right; color: #f00;">
+ <div style="background: #fdd;"> xx xx xx xxxx</div>
+ <div style="background: #fdd;"> xx xx xx xxxxxxxxxxxxx</div>
+ <div style="background: #fdd;">xxxxxxxxxxxxx xx xx xx xxxx</div>
+</section>
+
+<section style="text-align: center; color: #0f0;">
+ <div style="background: #dfd;"> xx xx xx xxxx </div>
+ <div style="background: #dfd;"> xx xx xx xxxxxxxxxxxxx</div>
+ <div style="background: #dfd;">xxxxxxxxxxxxx xx xx xx xxxx </div>
+</section>
+
+<section style="text-align: justify; color: #00f;">
+ <div style="background: #ddf;">xx xx xx xxxx</div>
+ <div style="background: #ddf;">xx xx xx xxxxxxxxxxxxx</div>
+ <div style="background: #ddf;">xxxxxxxxxxxxx xx xx xx xxxx </div>
+</section>
+</body>
+</html>
+
diff --git a/tests/wpt/mozilla/tests/css/text_align_complex_ref.html b/tests/wpt/mozilla/tests/css/text_align_complex_ref.html
index 4526c34d65e..d7a244de5a8 100644
--- a/tests/wpt/mozilla/tests/css/text_align_complex_ref.html
+++ b/tests/wpt/mozilla/tests/css/text_align_complex_ref.html
@@ -4,38 +4,38 @@
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style>
- * { margin: 0px !important; padding: 0px !important; }
-
- div {
- width: 100px;
- font-size: 10px;
- font-family: Ahem;
- padding: 10px !important;
- }
-
- section.reference { text-align: left !important; }
- section.reference > div { white-space: pre; }
-
+ * { margin: 0px !important; padding: 0px !important; }
+
+ div {
+ width: 100px;
+ font-size: 10px;
+ font-family: Ahem;
+ padding: 10px !important;
+ }
+
+ section.reference { text-align: left !important; }
+ section.reference > div { white-space: pre; }
+
</style>
</head>
<body>
<section class="reference" style="text-align: right; color: #f00;">
- <div style="background: #fdd;"> xx xx xx<br /> xxxx</div>
- <div style="background: #fdd;"> xx xx xx<br />xxxxxxxxxxxxx</div>
- <div style="background: #fdd;">xxxxxxxxxxxxx<br /> xx xx xx<br /> xxxx</div>
+ <div style="background: #fdd;"> xx xx xx<br /> xxxx</div>
+ <div style="background: #fdd;"> xx xx xx<br />xxxxxxxxxxxxx</div>
+ <div style="background: #fdd;">xxxxxxxxxxxxx<br /> xx xx xx<br /> xxxx</div>
</section>
<section class="reference" style="text-align: center; color: #0f0;">
- <div style="background: #dfd;"> xx xx xx <br /> xxxx </div>
- <div style="background: #dfd;"> xx xx xx <br />xxxxxxxxxxxxx</div>
- <div style="background: #dfd;">xxxxxxxxxxxxx<br /> xx xx xx <br /> xxxx </div>
+ <div style="background: #dfd;"> xx xx xx <br /> xxxx </div>
+ <div style="background: #dfd;"> xx xx xx <br />xxxxxxxxxxxxx</div>
+ <div style="background: #dfd;">xxxxxxxxxxxxx<br /> xx xx xx <br /> xxxx </div>
</section>
<section class="reference" style="text-align: justify; color: #00f;">
- <div style="background: #ddf;">xx xx xx<br />xxxx</div>
- <div style="background: #ddf;">xx xx xx<br />xxxxxxxxxxxxx</div>
- <div style="background: #ddf;">xxxxxxxxxxxxx<br />xx xx xx<br />xxxx </div>
+ <div style="background: #ddf;">xx xx xx<br />xxxx</div>
+ <div style="background: #ddf;">xx xx xx<br />xxxxxxxxxxxxx</div>
+ <div style="background: #ddf;">xxxxxxxxxxxxx<br />xx xx xx<br />xxxx </div>
</section>
</body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/transform_optimization.html b/tests/wpt/mozilla/tests/css/transform_optimization.html
index 9811511e1f8..41eef420c27 100644
--- a/tests/wpt/mozilla/tests/css/transform_optimization.html
+++ b/tests/wpt/mozilla/tests/css/transform_optimization.html
@@ -1,30 +1,30 @@
<!DOCTYPE html>
<html>
- <head>
- <link rel='match' href='transform_optimization_ref.html'>
- <style type="text/css">
- body {
- margin: 0;
- }
- #outer {
- position: absolute;
- background-color: transparent;
- width: 100%;
- height: 100px;
- transform: translateX(300px);
- }
- #inner {
- position: absolute;
- width: 400px;
- height: 100px;
- background-color: red;
- }
- </style>
- </head>
- <body>
- <div id="outer">
- <div id="inner">
- </div>
- </div>
- </body>
+ <head>
+ <link rel='match' href='transform_optimization_ref.html'>
+ <style type="text/css">
+ body {
+ margin: 0;
+ }
+ #outer {
+ position: absolute;
+ background-color: transparent;
+ width: 100%;
+ height: 100px;
+ transform: translateX(300px);
+ }
+ #inner {
+ position: absolute;
+ width: 400px;
+ height: 100px;
+ background-color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="outer">
+ <div id="inner">
+ </div>
+ </div>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/css/transform_optimization_ref.html b/tests/wpt/mozilla/tests/css/transform_optimization_ref.html
index a20d5a1478c..09c0eb20664 100644
--- a/tests/wpt/mozilla/tests/css/transform_optimization_ref.html
+++ b/tests/wpt/mozilla/tests/css/transform_optimization_ref.html
@@ -1,23 +1,23 @@
<!DOCTYPE html>
<html>
- <head>
- <style type="text/css">
- body {
- margin: 0;
- }
- #inner {
- position: absolute;
- left: 300px;
- width: 400px;
- height: 100px;
- background-color: red;
- }
- </style>
- </head>
- <body>
- <div id="outer">
- <div id="inner">
- </div>
- </div>
- </body>
+ <head>
+ <style type="text/css">
+ body {
+ margin: 0;
+ }
+ #inner {
+ position: absolute;
+ left: 300px;
+ width: 400px;
+ height: 100px;
+ background-color: red;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="outer">
+ <div id="inner">
+ </div>
+ </div>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/mozilla/calc.html b/tests/wpt/mozilla/tests/mozilla/calc.html
index 1db42bb6f25..63ac26613f7 100644
--- a/tests/wpt/mozilla/tests/mozilla/calc.html
+++ b/tests/wpt/mozilla/tests/mozilla/calc.html
@@ -148,7 +148,7 @@ otherProperties.forEach(function(testcase) {
}, 'calc for ' + testcase[0]);
});
-/* TODO: test these:
+/* TODO: test these:
counter-increment, counter-reset,
color, box-shadow, clip, text-shadow, transform
transition-timing-function
diff --git a/tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_13.html b/tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_13.html
index 43f9512dbcf..5e663d197b2 100644
--- a/tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_13.html
+++ b/tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_13.html
@@ -25,7 +25,7 @@ destCtx.imageSmoothingEnabled = smoothingEnabled;
// The source Image doesn't have a src url defined
// It should throw an exception because the HTMLImageElement is
// in the broken state
-// https://html.spec.whatwg.org/multipage/scripting.html#check-the-usability-of-the-image-argument
+// https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument
try {
destCtx.drawImage(sourceImg, 0, 0);
// It makes the test fail if the exception is not thrown
diff --git a/tests/wpt/mozilla/tests/mozilla/element_parentOffset.html b/tests/wpt/mozilla/tests/mozilla/element_parentOffset.html
index d2b390c05cb..a6e86ebe869 100644
--- a/tests/wpt/mozilla/tests/mozilla/element_parentOffset.html
+++ b/tests/wpt/mozilla/tests/mozilla/element_parentOffset.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html>
- <head>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
+ <head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
<style type="text/css">
#outer {
position: absolute;
@@ -25,16 +25,16 @@
background-color: blue;
}
</style>
- </head>
- <body>
+ </head>
+ <body>
<div id="outer">
<div id="inner">
<div id="div"></div>
</div>
</div>
- <script>
- test(function() {
+ <script>
+ test(function() {
var div = document.getElementById("div");
var outer = document.getElementById("outer");
@@ -45,7 +45,7 @@
assert_equals(div.offsetTop, 25);
assert_equals(div.offsetWidth, 80);
assert_equals(div.offsetHeight, 130);
- });
- </script>
- </body>
+ });
+ </script>
+ </body>
</html>
diff --git a/tests/wpt/mozilla/tests/mozilla/iframe_replacement.html b/tests/wpt/mozilla/tests/mozilla/iframe_replacement.html
index 175dc3d2859..8feccdcc94d 100644
--- a/tests/wpt/mozilla/tests/mozilla/iframe_replacement.html
+++ b/tests/wpt/mozilla/tests/mozilla/iframe_replacement.html
@@ -10,20 +10,20 @@
</body>
<script>
async_test(function(t) {
- setTimeout(t.step_func(function() {
- var frame = document.createElement('iframe');
- frame.src = "data:text/html,<p>test</p>";
- document.body.appendChild(frame);
- setTimeout(t.step_func(function() {
- document.body.removeChild(frame);
- frame = document.createElement('iframe');
- frame.src = "data:text/html,<p>test</p>";
- document.body.appendChild(frame);
- setTimeout(t.step_func(function() {
- t.done();
- }), 100);
- }), 100);
- }), 100);
+ setTimeout(t.step_func(function() {
+ var frame = document.createElement('iframe');
+ frame.src = "data:text/html,<p>test</p>";
+ document.body.appendChild(frame);
+ setTimeout(t.step_func(function() {
+ document.body.removeChild(frame);
+ frame = document.createElement('iframe');
+ frame.src = "data:text/html,<p>test</p>";
+ document.body.appendChild(frame);
+ setTimeout(t.step_func(function() {
+ t.done();
+ }), 100);
+ }), 100);
+ }), 100);
});
</script>
</html>
diff --git a/tests/wpt/mozilla/tests/mozilla/img_width_height.html b/tests/wpt/mozilla/tests/mozilla/img_width_height.html
index 8fa0f597ac9..ec68ac34ee2 100644
--- a/tests/wpt/mozilla/tests/mozilla/img_width_height.html
+++ b/tests/wpt/mozilla/tests/mozilla/img_width_height.html
@@ -12,12 +12,12 @@ async_test(function() {
var img = window.document.getElementsByTagName("img")[0];
img.onload = this.step_func_done(function() {
- assert_equals(img.width, 500);
- assert_equals(img.height, 378);
- img.width = 200;
- img.height = 100;
- assert_equals(img.width, 200);
- assert_equals(img.height, 100);
+ assert_equals(img.width, 500);
+ assert_equals(img.height, 378);
+ img.width = 200;
+ img.height = 100;
+ assert_equals(img.width, 200);
+ assert_equals(img.height, 100);
});
});
</script>
diff --git a/tests/wpt/mozilla/tests/mozilla/parentnodes.html b/tests/wpt/mozilla/tests/mozilla/parentnodes.html
index 5effbcdfdab..5aff666995f 100644
--- a/tests/wpt/mozilla/tests/mozilla/parentnodes.html
+++ b/tests/wpt/mozilla/tests/mozilla/parentnodes.html
@@ -14,7 +14,7 @@
var elem = document.createElement("p");
assert_equals(elem.parentNode, null);
assert_equals(elem.parentElement, null);
-
+
var child = document.createElement("p");
elem.appendChild(child);
diff --git a/tests/wpt/mozilla/tests/mozilla/preferences.html b/tests/wpt/mozilla/tests/mozilla/preferences.html
index c3f9c8f6b24..a1da58a825e 100644
--- a/tests/wpt/mozilla/tests/mozilla/preferences.html
+++ b/tests/wpt/mozilla/tests/mozilla/preferences.html
@@ -5,18 +5,18 @@
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
- var testBinding = new TestBinding();
- assert_equals(typeof testBinding.BooleanMozPreference, "function");
- assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.falsy"), false);
- assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.truthy"), true);
- assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_test"), false);
- assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_empty"), false);
- assert_equals(typeof testBinding.StringMozPreference, "function");
- assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_test"), "test");
- assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_empty"), "");
- assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.falsy"), "");
- assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.truthy"), "");
- assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2");
- assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2");
+ var testBinding = new TestBinding();
+ assert_equals(typeof testBinding.BooleanMozPreference, "function");
+ assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.falsy"), false);
+ assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.truthy"), true);
+ assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_test"), false);
+ assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_empty"), false);
+ assert_equals(typeof testBinding.StringMozPreference, "function");
+ assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_test"), "test");
+ assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_empty"), "");
+ assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.falsy"), "");
+ assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.truthy"), "");
+ assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2");
+ assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2");
}, "prefs");
</script>
diff --git a/tests/wpt/mozilla/tests/mozilla/resources/ssl.https.html b/tests/wpt/mozilla/tests/mozilla/resources/ssl.https.html
index ea0a70858a4..8faa57c0c47 100644
--- a/tests/wpt/mozilla/tests/mozilla/resources/ssl.https.html
+++ b/tests/wpt/mozilla/tests/mozilla/resources/ssl.https.html
@@ -2,4 +2,4 @@
<body>
this should be a secure connection
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_mipmap.html b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_mipmap.html
index ed8779c4252..5391417795d 100644
--- a/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_mipmap.html
+++ b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_mipmap.html
@@ -108,7 +108,7 @@
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
gl.generateMipmap(gl.TEXTURE_2D);
-
+
gl.drawArrays(gl.TRIANGLES, 0, 6);
document.documentElement.classList.remove("reftest-wait");
}