author | Bogdan Tara <btara@mozilla.com> |
Mon, 03 Dec 2018 23:49:14 +0200 | |
changeset 449256 | df64b0b461fd66616049654d4a4b7d136ab770c8 |
parent 449232 | 77f852e2fb222a1b3647c9c01cb380810592a8ac (current diff) |
parent 449255 | decb54eeaa7db1b065fb92eede8ac43c3edb5199 (diff) |
child 449261 | 215d850888f9c5f04c98cf05cb4ea70444058db4 |
child 449289 | 570521ec4d0fff93504332ee97c63eaffcb6a4de |
push id | 35153 |
push user | btara@mozilla.com |
push date | Mon, 03 Dec 2018 21:49:46 +0000 |
treeherder | mozilla-central@df64b0b461fd [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | merge |
milestone | 65.0a1 |
first release with | nightly linux32
df64b0b461fd
/
65.0a1
/
20181203214946
/
files
nightly linux64
df64b0b461fd
/
65.0a1
/
20181203214946
/
files
nightly mac
df64b0b461fd
/
65.0a1
/
20181203214946
/
files
nightly win32
df64b0b461fd
/
65.0a1
/
20181203214946
/
files
nightly win64
df64b0b461fd
/
65.0a1
/
20181203214946
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
65.0a1
/
20181203214946
/
pushlog to previous
nightly linux64
65.0a1
/
20181203214946
/
pushlog to previous
nightly mac
65.0a1
/
20181203214946
/
pushlog to previous
nightly win32
65.0a1
/
20181203214946
/
pushlog to previous
nightly win64
65.0a1
/
20181203214946
/
pushlog to previous
|
--- a/devtools/client/inspector/inspector.js +++ b/devtools/client/inspector/inspector.js @@ -1407,16 +1407,18 @@ Inspector.prototype = { if (this.walker) { this.walker.off("new-root", this.onNewRoot); this.pageStyle = null; } this.cancelUpdate(); + this.sidebar.destroy(); + this.panelWin.removeEventListener("resize", this.onPanelWindowResize, true); this.selection.off("new-node-front", this.onNewSelection); this.selection.off("detached-front", this.onDetached); this.sidebar.off("select", this.onSidebarSelect); this.sidebar.off("show", this.onSidebarShown); this.sidebar.off("hide", this.onSidebarHidden); this.sidebar.off("destroy", this.onSidebarHidden); this.target.off("will-navigate", this._onBeforeNavigate);
--- a/devtools/client/inspector/test/browser.ini +++ b/devtools/client/inspector/test/browser.ini @@ -155,16 +155,17 @@ skip-if = (os == 'linux' && bits == 32 & subsuite = clipboard skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts [browser_inspector_menu-04-use-in-console.js] [browser_inspector_menu-05-attribute-items.js] [browser_inspector_menu-06-other.js] [browser_inspector_navigation.js] [browser_inspector_navigate_to_errors.js] [browser_inspector_open_on_neterror.js] +[browser_inspector_pane_state_restore.js] [browser_inspector_pane-toggle-01.js] [browser_inspector_pane-toggle-02.js] [browser_inspector_pane-toggle-03.js] [browser_inspector_pane-toggle-04.js] [browser_inspector_picker-stop-on-tool-change.js] [browser_inspector_portrait_mode.js] [browser_inspector_pseudoclass-lock.js] [browser_inspector_pseudoclass-menu.js]
new file mode 100644 --- /dev/null +++ b/devtools/client/inspector/test/browser_inspector_pane_state_restore.js @@ -0,0 +1,55 @@ +/* vim: set ts=2 et sw=2 tw=80: */ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Tests that the previous inspector split box sizes are restored when reopening the +// inspector. + +const EXPECTED_INITIAL_WIDTH = 101; +const EXPECTED_INITIAL_HEIGHT = 102; +const EXPECTED_INITIAL_SIDEBAR_WIDTH = 103; + +const EXPECTED_NEW_WIDTH = 150; +const EXPECTED_NEW_HEIGHT = 100; +const EXPECTED_NEW_SIDEBAR_WIDTH = 250; + +add_task(async function() { + // Simulate that the user has already stored their preferred split boxes widths. + await pushPref("devtools.toolsidebar-width.inspector", EXPECTED_INITIAL_WIDTH); + await pushPref("devtools.toolsidebar-height.inspector", EXPECTED_INITIAL_HEIGHT); + await pushPref("devtools.toolsidebar-width.inspector.splitsidebar", + EXPECTED_INITIAL_SIDEBAR_WIDTH); + + const { inspector } = await openInspectorForURL("about:blank"); + + info("Check the initial size of the inspector."); + const { width, height, splitSidebarWidth } = inspector.getSidebarSize(); + is(width, EXPECTED_INITIAL_WIDTH, "Got correct initial width."); + is(height, EXPECTED_INITIAL_HEIGHT, "Got correct initial height."); + is(splitSidebarWidth, EXPECTED_INITIAL_SIDEBAR_WIDTH, + "Got correct initial split sidebar width."); + + info("Simulate updates to the dimensions of the various splitboxes."); + inspector.splitBox.setState({ + width: EXPECTED_NEW_WIDTH, + height: EXPECTED_NEW_HEIGHT, + }); + inspector.sidebarSplitBox.setState({ + width: EXPECTED_NEW_SIDEBAR_WIDTH, + }); + + await closeToolbox(); + + info("Check the stored sizes of the inspector in the preferences when the inspector " + + "is closed"); + const storedWidth = Services.prefs.getIntPref("devtools.toolsidebar-width.inspector"); + const storedHeight = Services.prefs.getIntPref("devtools.toolsidebar-height.inspector"); + const storedSplitSidebarWidth = + Services.prefs.getIntPref("devtools.toolsidebar-width.inspector.splitsidebar"); + is(storedWidth, EXPECTED_NEW_WIDTH, "Got correct stored width."); + is(storedHeight, EXPECTED_NEW_HEIGHT, "Got correct stored height"); + is(storedSplitSidebarWidth, EXPECTED_NEW_SIDEBAR_WIDTH, + "Got correct stored split sidebar width."); +});
--- a/layout/style/BorrowedTypeList.h +++ b/layout/style/BorrowedTypeList.h @@ -34,17 +34,16 @@ GECKO_BORROWED_TYPE(mozilla::dom::Elemen GECKO_BORROWED_TYPE(nsIDocument, RawGeckoDocument) GECKO_BORROWED_TYPE(nsINode, RawGeckoNode) GECKO_BORROWED_TYPE(nsPresContext, RawGeckoPresContext) GECKO_BORROWED_TYPE(nsXBLBinding, RawGeckoXBLBinding) GECKO_BORROWED_TYPE_MUT(mozilla::AnimationPropertySegment, RawGeckoAnimationPropertySegment) GECKO_BORROWED_TYPE_MUT(mozilla::ComputedTiming, RawGeckoComputedTiming) GECKO_BORROWED_TYPE_MUT(mozilla::dom::StyleChildrenIterator, RawGeckoStyleChildrenIterator) GECKO_BORROWED_TYPE_MUT(mozilla::GfxMatrix4x4, RawGeckoGfxMatrix4x4) -GECKO_BORROWED_TYPE_MUT(mozilla::ServoElementSnapshot, ServoElementSnapshot) GECKO_BORROWED_TYPE_MUT(mozilla::URLExtraData, RawGeckoURLExtraData) GECKO_BORROWED_TYPE_MUT(nsCSSPropertyIDSet, nsCSSPropertyIDSet) GECKO_BORROWED_TYPE_MUT(nsCSSValue, nsCSSValue) GECKO_BORROWED_TYPE_MUT(nsStyleAutoArray<mozilla::StyleAnimation>, RawGeckoStyleAnimationList) GECKO_BORROWED_TYPE_MUT(nsTArray<const RawServoStyleRule*>, RawGeckoServoStyleRuleList) GECKO_BORROWED_TYPE_MUT(nsTArray<mozilla::ComputedKeyframeValues>, RawGeckoComputedKeyframeValuesList) GECKO_BORROWED_TYPE_MUT(nsTArray<mozilla::Keyframe>, RawGeckoKeyframeList) GECKO_BORROWED_TYPE_MUT(nsTArray<mozilla::PropertyValuePair>, RawGeckoPropertyValuePairList)
--- a/layout/style/GeckoBindings.h +++ b/layout/style/GeckoBindings.h @@ -392,17 +392,17 @@ mozilla::CSSPseudoElementType Gecko_GetI // work as return values with the Linux 32-bit ABI at the moment because // they wrap the value in a struct. uint32_t Gecko_CalcStyleDifference(ComputedStyleBorrowed old_style, ComputedStyleBorrowed new_style, bool* any_style_struct_changed, bool* reset_only_changed); // Get an element snapshot for a given element from the table. -const ServoElementSnapshot* Gecko_GetElementSnapshot( +const mozilla::ServoElementSnapshot* Gecko_GetElementSnapshot( const mozilla::ServoElementSnapshotTable* table, RawGeckoElementBorrowed element); // Have we seen this pointer before? bool Gecko_HaveSeenPtr(mozilla::SeenPtrs* table, const void* ptr); // `array` must be an nsTArray // If changing this signature, please update the
--- a/servo/components/fallible/lib.rs +++ b/servo/components/fallible/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ extern crate hashglobe; extern crate smallvec; #[cfg(feature = "known_system_malloc")] use hashglobe::alloc; use hashglobe::FailedAllocationError; use smallvec::Array;
--- a/servo/components/malloc_size_of/Cargo.toml +++ b/servo/components/malloc_size_of/Cargo.toml @@ -5,45 +5,50 @@ authors = ["The Servo Project Developers license = "MIT/Apache-2.0" publish = false [lib] path = "lib.rs" [features] servo = [ + "crossbeam-channel", "hyper", "hyper_serde", "keyboard-types", "mozjs", "serde", "serde_bytes", - "servo_channel", "string_cache", "time", "url", "webrender_api", "xml5ever", ] [dependencies] app_units = "0.7" +crossbeam-channel = { version = "0.3", optional = true } cssparser = "0.25" euclid = "0.19" hashglobe = { path = "../hashglobe" } hyper = { version = "0.12", optional = true } hyper_serde = { version = "0.9", optional = true } keyboard-types = {version = "0.4.3", optional = true} -mozjs = { version = "0.9.4", optional = true } selectors = { path = "../selectors" } serde = { version = "1.0.27", optional = true } serde_bytes = { version = "0.10", optional = true } servo_arc = { path = "../servo_arc" } -servo_channel = { path = "../channel", optional = true } smallbitvec = "2.1.0" smallvec = "0.6" string_cache = { version = "0.7", optional = true } thin-slice = "0.1.0" time = { version = "0.1.17", optional = true } url = { version = "1.2", optional = true } webrender_api = { git = "https://github.com/servo/webrender", features = ["ipc"], optional = true } xml5ever = { version = "0.12", optional = true } void = "1.0.2" + +[target.'cfg(target_os = "android")'.dependencies] +mozjs = { version = "0.9.5", optional = true, features=["init_once"]} + +[target.'cfg(not(target_os = "android"))'.dependencies] +mozjs = { version = "0.9.5", optional = true}
--- a/servo/components/malloc_size_of/lib.rs +++ b/servo/components/malloc_size_of/lib.rs @@ -39,16 +39,18 @@ //! - If an `Rc` or `Arc` should be measured only if it hasn't been seen //! before, it should be measured via the `MallocConditionalSizeOf` trait. //! - Using universal function call syntax is a good idea when measuring boxed //! fields in structs, because it makes it clear that the Box is being //! measured as well as the thing it points to. E.g. //! `<Box<_> as MallocSizeOf>::size_of(field, ops)`. extern crate app_units; +#[cfg(feature = "servo")] +extern crate crossbeam_channel; extern crate cssparser; extern crate euclid; extern crate hashglobe; #[cfg(feature = "servo")] extern crate hyper; #[cfg(feature = "servo")] extern crate hyper_serde; #[cfg(feature = "servo")] @@ -56,18 +58,16 @@ extern crate keyboard_types; #[cfg(feature = "servo")] extern crate mozjs as js; extern crate selectors; #[cfg(feature = "servo")] extern crate serde; #[cfg(feature = "servo")] extern crate serde_bytes; extern crate servo_arc; -#[cfg(feature = "servo")] -extern crate servo_channel; extern crate smallbitvec; extern crate smallvec; #[cfg(feature = "servo")] extern crate string_cache; extern crate thin_slice; #[cfg(feature = "servo")] extern crate time; #[cfg(feature = "url")] @@ -1022,17 +1022,17 @@ where fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize { self.0.size_of(ops) } } // Placeholder for unique case where internals of Sender cannot be measured. // malloc size of is 0 macro complains about type supplied! #[cfg(feature = "servo")] -impl<T> MallocSizeOf for servo_channel::Sender<T> { +impl<T> MallocSizeOf for crossbeam_channel::Sender<T> { fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize { 0 } } #[cfg(feature = "servo")] impl MallocSizeOf for hyper::StatusCode { fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
--- a/servo/components/selectors/attr.rs +++ b/servo/components/selectors/attr.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::parser::SelectorImpl; use cssparser::ToCss; use std::fmt; #[derive(Clone, Eq, PartialEq)] pub struct AttrSelectorWithOptionalNamespace<Impl: SelectorImpl> { pub namespace: Option<NamespaceConstraint<(Impl::NamespacePrefix, Impl::NamespaceUrl)>>,
--- a/servo/components/selectors/bloom.rs +++ b/servo/components/selectors/bloom.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Counting and non-counting Bloom filters tuned for use as ancestor filters //! for selector matching. use std::fmt::{self, Debug}; // The top 8 bits of the 32-bit hash value are not used by the bloom filter. // Consumers may rely on this to pack hashes more efficiently.
--- a/servo/components/selectors/build.rs +++ b/servo/components/selectors/build.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ extern crate phf_codegen; use std::env; use std::fs::File; use std::io::{BufWriter, Write}; use std::path::Path;
--- a/servo/components/selectors/builder.rs +++ b/servo/components/selectors/builder.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Helper module to build up a selector safely and efficiently. //! //! Our selector representation is designed to optimize matching, and has //! several requirements: //! * All simple selectors and combinators are stored inline in the same buffer //! as Component instances. //! * We store the top-level compound selectors from right to left, i.e. in
--- a/servo/components/selectors/context.rs +++ b/servo/components/selectors/context.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::attr::CaseSensitivity; use crate::bloom::BloomFilter; use crate::nth_index_cache::NthIndexCache; use crate::parser::SelectorImpl; use crate::tree::{Element, OpaqueElement}; /// What kind of selector matching mode we should use.
--- a/servo/components/selectors/lib.rs +++ b/servo/components/selectors/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // Make |cargo bench| work. #![cfg_attr(feature = "bench", feature(test))] #[macro_use] extern crate bitflags; #[macro_use] extern crate cssparser;
--- a/servo/components/selectors/matching.rs +++ b/servo/components/selectors/matching.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::attr::{AttrSelectorOperation, NamespaceConstraint, ParsedAttrSelectorOperation}; use crate::bloom::{BloomFilter, BLOOM_HASH_MASK}; use crate::nth_index_cache::NthIndexCacheInner; use crate::parser::{AncestorHashes, Combinator, Component, LocalName}; use crate::parser::{NonTSPseudoClass, Selector, SelectorImpl, SelectorIter, SelectorList}; use crate::tree::Element; use std::borrow::Borrow;
--- a/servo/components/selectors/nth_index_cache.rs +++ b/servo/components/selectors/nth_index_cache.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::tree::OpaqueElement; use fxhash::FxHashMap; /// A cache to speed up matching of nth-index-like selectors. /// /// See [1] for some discussion around the design tradeoffs. ///
--- a/servo/components/selectors/parser.rs +++ b/servo/components/selectors/parser.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::attr::{AttrSelectorOperator, AttrSelectorWithOptionalNamespace}; use crate::attr::{NamespaceConstraint, ParsedAttrSelectorOperation}; use crate::attr::{ParsedCaseSensitivity, SELECTOR_WHITESPACE}; use crate::bloom::BLOOM_HASH_MASK; use crate::builder::{SelectorBuilder, SpecificityAndFlags}; use crate::context::QuirksMode; use crate::sink::Push;
--- a/servo/components/selectors/sink.rs +++ b/servo/components/selectors/sink.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Small helpers to abstract over different containers. #![deny(missing_docs)] use smallvec::{Array, SmallVec}; /// A trait to abstract over a `push` method that may be implemented for /// different kind of types.
--- a/servo/components/selectors/tree.rs +++ b/servo/components/selectors/tree.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Traits that nodes must implement. Breaks the otherwise-cyclic dependency //! between layout and style. use crate::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint}; use crate::matching::{ElementSelectorFlags, MatchingContext}; use crate::parser::SelectorImpl; use std::fmt::Debug;
--- a/servo/components/selectors/visitor.rs +++ b/servo/components/selectors/visitor.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Visitor traits for selectors. #![deny(missing_docs)] use crate::attr::NamespaceConstraint; use crate::parser::{Combinator, Component, SelectorImpl};
--- a/servo/components/size_of_test/lib.rs +++ b/servo/components/size_of_test/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #[macro_export] macro_rules! size_of_test { ($testname: ident, $t: ty, $expected_size: expr) => { #[test] fn $testname() { let new = ::std::mem::size_of::<$t>(); let old = $expected_size;
--- a/servo/components/style/Cargo.toml +++ b/servo/components/style/Cargo.toml @@ -16,29 +16,30 @@ path = "lib.rs" doctest = false [features] gecko = ["nsstring", "num_cpus", "style_traits/gecko", "fallible/known_system_malloc"] use_bindgen = ["bindgen", "regex", "toml"] servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5ever", "cssparser/serde", "encoding_rs", "malloc_size_of/servo", "arrayvec/use_union", - "servo_url", "string_cache", "servo_channel"] + "servo_url", "string_cache", "crossbeam-channel"] gecko_debug = [] [dependencies] app_units = "0.7" arrayvec = "0.4.6" atomic_refcell = "0.1" bitflags = "1.0" byteorder = "1.0" cfg-if = "0.1.0" cssparser = "0.25" +crossbeam-channel = { version = "0.3", optional = true } new_debug_unreachable = "1.0" -encoding_rs = {version = "0.7", optional = true} +encoding_rs = {version = "0.8", optional = true} euclid = "0.19" fallible = { path = "../fallible" } fxhash = "0.2" hashglobe = { path = "../hashglobe" } html5ever = {version = "0.22", optional = true} itertools = "0.7.6" itoa = "0.4" lazy_static = "1" @@ -55,17 +56,16 @@ ordered-float = "1.0" owning_ref = "0.3.3" parking_lot = "0.6" precomputed-hash = "0.1.1" rayon = "1" selectors = { path = "../selectors" } serde = {version = "1.0", optional = true, features = ["derive"]} servo_arc = { path = "../servo_arc" } servo_atoms = {path = "../atoms", optional = true} -servo_channel = {path = "../channel", optional = true} servo_config = {path = "../config", optional = true} smallbitvec = "2.1.1" smallvec = "0.6" string_cache = { version = "0.7", optional = true } style_derive = {path = "../style_derive"} style_traits = {path = "../style_traits"} servo_url = {path = "../url", optional = true} thin-slice = "0.1.0"
--- a/servo/components/style/animation.rs +++ b/servo/components/style/animation.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS transitions and animations. // NOTE(emilio): This code isn't really executed in Gecko, but we don't want to // compile it out so that people remember it exists, thus the cfg'd Sender // import. use crate::bezier::Bezier; @@ -20,19 +20,19 @@ use crate::rule_tree::CascadeLevel; use crate::stylesheets::keyframes_rule::{KeyframesAnimation, KeyframesStep, KeyframesStepValue}; use crate::timer::Timer; use crate::values::computed::box_::TransitionProperty; use crate::values::computed::Time; use crate::values::computed::TimingFunction; use crate::values::generics::box_::AnimationIterationCount; use crate::values::generics::easing::{StepPosition, TimingFunction as GenericTimingFunction}; use crate::Atom; +#[cfg(feature = "servo")] +use crossbeam_channel::Sender; use servo_arc::Arc; -#[cfg(feature = "servo")] -use servo_channel::Sender; use std::fmt; #[cfg(feature = "gecko")] use std::sync::mpsc::Sender; /// This structure represents a keyframes animation current iteration state. /// /// If the iteration count is infinite, there's no other state, otherwise we /// have to keep track the current iteration and the max iteration count.
--- a/servo/components/style/applicable_declarations.rs +++ b/servo/components/style/applicable_declarations.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Applicable declarations management. use crate::properties::PropertyDeclarationBlock; use crate::rule_tree::{CascadeLevel, ShadowCascadeOrder, StyleSource}; use crate::shared_lock::Locked; use servo_arc::Arc; use smallvec::SmallVec;
--- a/servo/components/style/attr.rs +++ b/servo/components/style/attr.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Parsed representations of [DOM attributes][attr]. //! //! [attr]: https://dom.spec.whatwg.org/#interface-attr use app_units::Au; use crate::properties::PropertyDeclarationBlock; use crate::shared_lock::Locked;
--- a/servo/components/style/author_styles.rs +++ b/servo/components/style/author_styles.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A set of author stylesheets and their computed representation, such as the //! ones used for ShadowRoot and XBL. use crate::context::QuirksMode; use crate::dom::TElement; #[cfg(feature = "gecko")] use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
--- a/servo/components/style/bezier.rs +++ b/servo/components/style/bezier.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Parametric Bézier curves. //! //! This is based on `WebCore/platform/graphics/UnitBezier.h` in WebKit. #![deny(missing_docs)] use crate::values::CSSFloat;
--- a/servo/components/style/bloom.rs +++ b/servo/components/style/bloom.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The style bloom filter is used as an optimization when matching deep //! descendant selectors. #![deny(missing_docs)] use atomic_refcell::{AtomicRefCell, AtomicRefMut}; use crate::dom::{SendElement, TElement};
--- a/servo/components/style/build.rs +++ b/servo/components/style/build.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #[macro_use] extern crate lazy_static; #[cfg(feature = "bindgen")] extern crate bindgen; #[cfg(feature = "bindgen")] extern crate log; #[cfg(feature = "bindgen")]
--- a/servo/components/style/build_gecko.rs +++ b/servo/components/style/build_gecko.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ mod common { use std::env; use std::path::PathBuf; lazy_static! { pub static ref OUTDIR_PATH: PathBuf = PathBuf::from(env::var_os("OUT_DIR").unwrap()).join("gecko");
--- a/servo/components/style/cbindgen.toml +++ b/servo/components/style/cbindgen.toml @@ -1,11 +1,11 @@ header = """/* 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/. */""" + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */""" autogen_warning = """/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen. * To generate this file: * 1. Get the latest cbindgen using `cargo install --force cbindgen` * a. Alternatively, you can clone `https://github.com/eqrion/cbindgen` and use a tagged release * 2. Run `rustup run nightly cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate style -o layout/style/ServoStyleConsts.h` */ class nsAtom; namespace mozilla {
--- a/servo/components/style/context.rs +++ b/servo/components/style/context.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The context within which style is calculated. use app_units::Au; #[cfg(feature = "servo")] use crate::animation::Animation; use crate::bloom::StyleBloom; use crate::data::{EagerPseudoStyles, ElementData}; @@ -24,28 +24,28 @@ use crate::rule_tree::StrongRuleNode; use crate::selector_parser::{SnapshotMap, EAGER_PSEUDO_COUNT}; use crate::shared_lock::StylesheetGuards; use crate::sharing::StyleSharingCache; use crate::stylist::Stylist; use crate::thread_state::{self, ThreadState}; use crate::timer::Timer; use crate::traversal::DomTraversal; use crate::traversal_flags::TraversalFlags; +#[cfg(feature = "servo")] +use crossbeam_channel::Sender; use euclid::Size2D; use euclid::TypedScale; use fxhash::FxHashMap; #[cfg(feature = "servo")] use parking_lot::RwLock; use selectors::matching::ElementSelectorFlags; use selectors::NthIndexCache; use servo_arc::Arc; #[cfg(feature = "servo")] use servo_atoms::Atom; -#[cfg(feature = "servo")] -use servo_channel::Sender; use std::fmt; use std::ops; #[cfg(feature = "servo")] use std::sync::Mutex; use style_traits::CSSPixel; use style_traits::DevicePixel; #[cfg(feature = "servo")] use style_traits::SpeculativePainter;
--- a/servo/components/style/counter_style/mod.rs +++ b/servo/components/style/counter_style/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The [`@counter-style`][counter-style] at-rule. //! //! [counter-style]: https://drafts.csswg.org/css-counter-styles/ use crate::error_reporting::ContextualParseError; use crate::parser::{Parse, ParserContext}; use crate::shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
--- a/servo/components/style/counter_style/predefined.rs +++ b/servo/components/style/counter_style/predefined.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ predefined! { "decimal", "decimal-leading-zero", "arabic-indic", "armenian", "upper-armenian", "lower-armenian",
--- a/servo/components/style/counter_style/update_predefined.py +++ b/servo/components/style/counter_style/update_predefined.py @@ -1,13 +1,13 @@ #!/usr/bin/env python # 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/. */ +# file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import os.path import re import urllib def main(filename): names = [ @@ -15,17 +15,17 @@ def main(filename): for line in urllib.urlopen("https://drafts.csswg.org/css-counter-styles/") if 'data-dfn-for="<counter-style-name>"' in line or 'data-dfn-for="<counter-style>"' in line ] with open(filename, "wb") as f: f.write("""\ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ predefined! { """) for name in names: f.write(' "%s",\n' % name) f.write('}\n')
--- a/servo/components/style/custom_properties.rs +++ b/servo/components/style/custom_properties.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Support for [custom properties for cascading variables][custom]. //! //! [custom]: https://drafts.csswg.org/css-variables/ use crate::hash::map::Entry; use crate::properties::{CSSWideKeyword, CustomDeclarationValue}; use crate::selector_map::{PrecomputedHashMap, PrecomputedHashSet};
--- a/servo/components/style/data.rs +++ b/servo/components/style/data.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Per-node data used in style calculation. use crate::context::{SharedStyleContext, StackLimitChecker}; use crate::dom::TElement; use crate::invalidation::element::invalidator::InvalidationResult; use crate::invalidation::element::restyle_hints::RestyleHint; use crate::properties::ComputedValues;
--- a/servo/components/style/dom.rs +++ b/servo/components/style/dom.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Types and traits used to access the DOM from style calculation. #![allow(unsafe_code)] #![deny(missing_docs)] use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut}; use crate::applicable_declarations::ApplicableDeclarationBlock;
--- a/servo/components/style/dom_apis.rs +++ b/servo/components/style/dom_apis.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic implementations of some DOM APIs so they can be shared between Servo //! and Gecko. use crate::context::QuirksMode; use crate::dom::{TDocument, TElement, TNode, TShadowRoot}; use crate::invalidation::element::invalidator::{DescendantInvalidationLists, Invalidation}; use crate::invalidation::element::invalidator::{InvalidationProcessor, InvalidationVector};
--- a/servo/components/style/driver.rs +++ b/servo/components/style/driver.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Implements traversal over the DOM tree. The traversal starts in sequential //! mode, and optionally parallelizes as it discovers work. #![deny(missing_docs)] use crate::context::{PerThreadTraversalStatistics, StyleContext}; use crate::context::{ThreadLocalStyleContext, TraversalStatistics};
--- a/servo/components/style/element_state.rs +++ b/servo/components/style/element_state.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! States elements can be in. bitflags! { /// Event-based element states. /// /// NB: Is important for this to remain in sync with Gecko's /// dom/events/EventStates.h.
--- a/servo/components/style/encoding_support.rs +++ b/servo/components/style/encoding_support.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Parsing stylesheets from bytes (not `&str`). extern crate encoding_rs; use crate::context::QuirksMode; use crate::error_reporting::ParseErrorReporter; use crate::media_queries::MediaList;
--- a/servo/components/style/error_reporting.rs +++ b/servo/components/style/error_reporting.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Types used to report parsing errors. #![deny(missing_docs)] use crate::stylesheets::UrlExtraData; use cssparser::{BasicParseErrorKind, ParseErrorKind, SourceLocation, Token}; use std::fmt;
--- a/servo/components/style/font_face.rs +++ b/servo/components/style/font_face.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The [`@font-face`][ff] at-rule. //! //! [ff]: https://drafts.csswg.org/css-fonts/#at-font-face-rule use crate::error_reporting::ContextualParseError; use crate::parser::{Parse, ParserContext}; #[cfg(feature = "gecko")]
--- a/servo/components/style/font_metrics.rs +++ b/servo/components/style/font_metrics.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Access to font metrics from the style system. #![deny(missing_docs)] use app_units::Au; use crate::context::SharedStyleContext; use crate::logical_geometry::WritingMode;
--- a/servo/components/style/gecko/arc_types.rs +++ b/servo/components/style/gecko/arc_types.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! This file lists all arc FFI types and defines corresponding addref //! and release functions. This list corresponds to ServoArcTypeList.h //! file in Gecko. #![allow(non_snake_case, missing_docs)] use crate::gecko::url::CssUrlData;
--- a/servo/components/style/gecko/conversions.rs +++ b/servo/components/style/gecko/conversions.rs @@ -1,24 +1,24 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! This module contains conversion helpers between Servo and Gecko types //! Ideally, it would be in geckolib itself, but coherence //! forces us to keep the traits and implementations here #![allow(unsafe_code)] use app_units::Au; use crate::gecko::values::GeckoStyleCoordConvertible; use crate::gecko_bindings::bindings; +use crate::gecko_bindings::structs::RawGeckoGfxMatrix4x4; use crate::gecko_bindings::structs::{self, nsStyleCoord_CalcValue}; use crate::gecko_bindings::structs::{nsStyleImage, nsresult, SheetType}; -use crate::gecko_bindings::structs::RawGeckoGfxMatrix4x4; use crate::gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, CoordDataValue}; use crate::stylesheets::{Origin, RulesMutateError}; use crate::values::computed::image::LineDirection; use crate::values::computed::transform::Matrix3D; use crate::values::computed::url::ComputedImageUrl; use crate::values::computed::{Angle, CalcLengthOrPercentage, Gradient, Image}; use crate::values::computed::{Integer, LengthOrPercentage}; use crate::values::computed::{LengthOrPercentageOrAuto, NonNegativeLengthOrPercentageOrAuto}; @@ -1140,27 +1140,40 @@ pub unsafe fn string_from_chars_pointer( while *iter != 0 { length += 1; iter = iter.offset(1); } let char_vec = slice::from_raw_parts(p, length as usize); String::from_utf16_lossy(char_vec) } -impl<'a> From< &'a RawGeckoGfxMatrix4x4> for Matrix3D { +impl<'a> From<&'a RawGeckoGfxMatrix4x4> for Matrix3D { fn from(m: &'a RawGeckoGfxMatrix4x4) -> Matrix3D { Matrix3D { - m11: m[0], m12: m[1], m13: m[2], m14: m[3], - m21: m[4], m22: m[5], m23: m[6], m24: m[7], - m31: m[8], m32: m[9], m33: m[10], m34: m[11], - m41: m[12], m42: m[13], m43: m[14], m44: m[15], + m11: m[0], + m12: m[1], + m13: m[2], + m14: m[3], + m21: m[4], + m22: m[5], + m23: m[6], + m24: m[7], + m31: m[8], + m32: m[9], + m33: m[10], + m34: m[11], + m41: m[12], + m42: m[13], + m43: m[14], + m44: m[15], } } } impl From<Matrix3D> for RawGeckoGfxMatrix4x4 { fn from(matrix: Matrix3D) -> RawGeckoGfxMatrix4x4 { - [ matrix.m11, matrix.m12, matrix.m13, matrix.m14, - matrix.m21, matrix.m22, matrix.m23, matrix.m24, - matrix.m31, matrix.m32, matrix.m33, matrix.m34, - matrix.m41, matrix.m42, matrix.m43, matrix.m44 ] + [ + matrix.m11, matrix.m12, matrix.m13, matrix.m14, matrix.m21, matrix.m22, matrix.m23, + matrix.m24, matrix.m31, matrix.m32, matrix.m33, matrix.m34, matrix.m41, matrix.m42, + matrix.m43, matrix.m44, + ] } }
--- a/servo/components/style/gecko/data.rs +++ b/servo/components/style/gecko/data.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Data needed to style a Gecko document. use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut}; use crate::context::QuirksMode; use crate::dom::TElement; use crate::gecko_bindings::bindings::{self, RawServoStyleSet}; use crate::gecko_bindings::structs::StyleSheet as DomStyleSheet;
--- a/servo/components/style/gecko/global_style_data.rs +++ b/servo/components/style/gecko/global_style_data.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Global style data use crate::context::StyleSystemOptions; use crate::gecko_bindings::bindings; use crate::parallel::STYLE_THREAD_STACK_SIZE_KB; use crate::shared_lock::SharedRwLock; use crate::thread_state;
--- a/servo/components/style/gecko/media_features.rs +++ b/servo/components/style/gecko/media_features.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Gecko's media feature list and evaluator. use app_units::Au; use crate::gecko_bindings::bindings; use crate::gecko_bindings::structs; use crate::media_queries::media_feature::{AllowsRanges, ParsingRequirements}; use crate::media_queries::media_feature::{Evaluator, MediaFeatureDescription};
--- a/servo/components/style/gecko/media_queries.rs +++ b/servo/components/style/gecko/media_queries.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Gecko's media-query device and expression representation. use app_units::Au; use app_units::AU_PER_PX; use crate::custom_properties::CssEnvironment; use crate::gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor}; use crate::gecko_bindings::bindings;
--- a/servo/components/style/gecko/mod.rs +++ b/servo/components/style/gecko/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Gecko-specific style-system bits. #[macro_use] mod non_ts_pseudo_class_list; pub mod arc_types; pub mod conversions;
--- a/servo/components/style/gecko/non_ts_pseudo_class_list.rs +++ b/servo/components/style/gecko/non_ts_pseudo_class_list.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ /* * This file contains a helper macro includes all supported non-tree-structural * pseudo-classes. * * FIXME: Find a way to autogenerate this file. * * Expected usage is as follows:
--- a/servo/components/style/gecko/pseudo_element.rs +++ b/servo/components/style/gecko/pseudo_element.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Gecko's definition of a pseudo-element. //! //! Note that a few autogenerated bits of this live in //! `pseudo_element_definition.mako.rs`. If you touch that file, you probably //! need to update the checked-in files for Servo. use crate::gecko_bindings::structs::{self, CSSPseudoElementType};
--- a/servo/components/style/gecko/pseudo_element_definition.mako.rs +++ b/servo/components/style/gecko/pseudo_element_definition.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ /// Gecko's pseudo-element definition. #[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq)] pub enum PseudoElement { % for pseudo in PSEUDOS: /// ${pseudo.value} % if pseudo.is_tree_pseudo_element(): ${pseudo.capitalized_pseudo()}(ThinBoxedSlice<Atom>),
--- a/servo/components/style/gecko/regen_atoms.py +++ b/servo/components/style/gecko/regen_atoms.py @@ -1,13 +1,13 @@ #!/usr/bin/env python # 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/. +# file, You can obtain one at https://mozilla.org/MPL/2.0/. import re import os import sys from io import BytesIO GECKO_DIR = os.path.dirname(__file__.replace('\\', '/')) @@ -111,17 +111,17 @@ class FileAvoidWrite(BytesIO): def __exit__(self, type, value, traceback): if not self.closed: self.close() PRELUDE = ''' /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // Autogenerated file created by components/style/gecko/regen_atoms.py. // DO NOT EDIT DIRECTLY '''[1:] IMPORTS = ''' use gecko_bindings::structs::nsStaticAtom; use string_cache::Atom;
--- a/servo/components/style/gecko/restyle_damage.rs +++ b/servo/components/style/gecko/restyle_damage.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Gecko's restyle damage computation (aka change hints, aka `nsChangeHint`). use crate::gecko_bindings::bindings; use crate::gecko_bindings::structs; use crate::gecko_bindings::structs::nsChangeHint; use crate::matching::{StyleChange, StyleDifference}; use crate::properties::ComputedValues;
--- a/servo/components/style/gecko/rules.rs +++ b/servo/components/style/gecko/rules.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Bindings for CSS Rule objects use crate::counter_style::{self, CounterBound}; use crate::gecko_bindings::structs::{self, nsCSSValue}; use crate::gecko_bindings::sugar::ns_css_value::ToNsCssValue; impl<'a> ToNsCssValue for &'a counter_style::System {
--- a/servo/components/style/gecko/selector_parser.rs +++ b/servo/components/style/gecko/selector_parser.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Gecko-specific bits for selector-parsing. use crate::element_state::{DocumentState, ElementState}; use crate::gecko_bindings::structs::RawServoSelectorList; use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI}; use crate::invalidation::element::document_state::InvalidationMatchingData; use crate::selector_parser::{Direction, SelectorParser};
--- a/servo/components/style/gecko/snapshot.rs +++ b/servo/components/style/gecko/snapshot.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A gecko snapshot, that stores the element attributes and state before they //! change in order to properly calculate restyle hints. use crate::dom::TElement; use crate::element_state::ElementState; use crate::gecko::snapshot_helpers; use crate::gecko::wrapper::{GeckoElement, NamespaceConstraintHelpers};
--- a/servo/components/style/gecko/snapshot_helpers.rs +++ b/servo/components/style/gecko/snapshot_helpers.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Element an snapshot common logic. use crate::gecko_bindings::bindings; use crate::gecko_bindings::structs::{self, nsAtom}; use crate::string_cache::{Atom, WeakAtom}; use crate::CaseSensitivityExt; use selectors::attr::CaseSensitivity;
--- a/servo/components/style/gecko/traversal.rs +++ b/servo/components/style/gecko/traversal.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Gecko-specific bits for the styling DOM traversal. use crate::context::{SharedStyleContext, StyleContext}; use crate::dom::{TElement, TNode}; use crate::gecko::wrapper::{GeckoElement, GeckoNode}; use crate::traversal::{recalc_style_at, DomTraversal, PerLevelTraversalData};
--- a/servo/components/style/gecko/url.rs +++ b/servo/components/style/gecko/url.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Common handling for the specified value CSS url() values. use crate::gecko_bindings::bindings; use crate::gecko_bindings::structs::root::mozilla::css::URLValue; use crate::gecko_bindings::structs::root::mozilla::CORSMode; use crate::gecko_bindings::structs::root::nsStyleImageRequest; use crate::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI};
--- a/servo/components/style/gecko/values.rs +++ b/servo/components/style/gecko/values.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![allow(unsafe_code)] //! Different kind of helpers to interact with Gecko values. use app_units::Au; use crate::counter_style::{Symbol, Symbols}; use crate::gecko_bindings::structs::{self, nsStyleCoord, CounterStylePtr};
--- a/servo/components/style/gecko/wrapper.rs +++ b/servo/components/style/gecko/wrapper.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![allow(unsafe_code)] //! Wrapper definitions on top of Gecko types in order to be used in the style //! system. //! //! This really follows the Servo pattern in //! `components/script/layout_wrapper.rs`.
--- a/servo/components/style/gecko_bindings/mod.rs +++ b/servo/components/style/gecko_bindings/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Gecko's C++ bindings, along with some rust helpers to ease its use. #[allow( dead_code, improper_ctypes, non_camel_case_types, missing_docs
--- a/servo/components/style/gecko_bindings/sugar/mod.rs +++ b/servo/components/style/gecko_bindings/sugar/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Rust sugar and convenience methods for Gecko types. mod ns_com_ptr; mod ns_compatibility; mod ns_css_shadow_array; mod ns_css_shadow_item; pub mod ns_css_value;
--- a/servo/components/style/gecko_bindings/sugar/ns_com_ptr.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_com_ptr.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Little helpers for `nsCOMPtr`. use crate::gecko_bindings::structs::nsCOMPtr; #[cfg(feature = "gecko_debug")] impl<T> nsCOMPtr<T> { /// Get this pointer as a raw pointer.
--- a/servo/components/style/gecko_bindings/sugar/ns_compatibility.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_compatibility.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Little helper for `nsCompatibility`. use crate::context::QuirksMode; use crate::gecko_bindings::structs::nsCompatibility; impl From<nsCompatibility> for QuirksMode { #[inline]
--- a/servo/components/style/gecko_bindings/sugar/ns_css_shadow_array.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_css_shadow_array.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Rust helpers for Gecko's `nsCSSShadowArray`. use crate::gecko_bindings::bindings::Gecko_AddRefCSSShadowArrayArbitraryThread; use crate::gecko_bindings::bindings::Gecko_NewCSSShadowArray; use crate::gecko_bindings::bindings::Gecko_ReleaseCSSShadowArrayArbitraryThread; use crate::gecko_bindings::structs::{nsCSSShadowArray, nsCSSShadowItem, RefPtr}; use std::ops::{Deref, DerefMut};
--- a/servo/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Rust helpers for Gecko's `nsCSSShadowItem`. use app_units::Au; use crate::gecko_bindings::structs::nsCSSShadowItem; use crate::values::computed::effects::{BoxShadow, SimpleShadow}; impl nsCSSShadowItem {
--- a/servo/components/style/gecko_bindings/sugar/ns_css_value.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_css_value.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Little helpers for `nsCSSValue`. use crate::gecko_bindings::bindings; use crate::gecko_bindings::structs; use crate::gecko_bindings::structs::{nsCSSUnit, nsCSSValue}; use crate::gecko_bindings::structs::{nsCSSValueList, nsCSSValue_Array}; use crate::gecko_string_cache::Atom;
--- a/servo/components/style/gecko_bindings/sugar/ns_style_auto_array.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_style_auto_array.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Rust helpers for Gecko's `nsStyleAutoArray`. use crate::gecko_bindings::bindings::Gecko_EnsureStyleAnimationArrayLength; use crate::gecko_bindings::bindings::Gecko_EnsureStyleTransitionArrayLength; use crate::gecko_bindings::structs::nsStyleAutoArray; use crate::gecko_bindings::structs::{StyleAnimation, StyleTransition}; use std::iter::{once, Chain, IntoIterator, Once};
--- a/servo/components/style/gecko_bindings/sugar/ns_style_coord.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_style_coord.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Rust helpers for Gecko's `nsStyleCoord`. use crate::gecko_bindings::bindings; use crate::gecko_bindings::structs::{nsStyleCoord, nsStyleCoord_Calc, nsStyleCoord_CalcValue}; use crate::gecko_bindings::structs::{nsStyleCorners, nsStyleSides}; use crate::gecko_bindings::structs::{nsStyleUnion, nsStyleUnit, nscoord}; use std::mem;
--- a/servo/components/style/gecko_bindings/sugar/ns_t_array.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_t_array.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Rust helpers for Gecko's nsTArray. use crate::gecko_bindings::bindings; use crate::gecko_bindings::structs::{nsTArray, nsTArrayHeader}; use std::mem; use std::ops::{Deref, DerefMut}; use std::slice;
--- a/servo/components/style/gecko_bindings/sugar/origin_flags.rs +++ b/servo/components/style/gecko_bindings/sugar/origin_flags.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Helper to iterate over `OriginFlags` bits. use crate::gecko_bindings::structs::OriginFlags; use crate::gecko_bindings::structs::OriginFlags_Author; use crate::gecko_bindings::structs::OriginFlags_User; use crate::gecko_bindings::structs::OriginFlags_UserAgent; use crate::stylesheets::OriginSet;
--- a/servo/components/style/gecko_bindings/sugar/ownership.rs +++ b/servo/components/style/gecko_bindings/sugar/ownership.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Helpers for different FFI pointer kinds that Gecko's FFI layer uses. use servo_arc::{Arc, RawOffsetArc}; use std::marker::PhantomData; use std::mem::{forget, transmute}; use std::ops::{Deref, DerefMut}; use std::ptr;
--- a/servo/components/style/gecko_bindings/sugar/refptr.rs +++ b/servo/components/style/gecko_bindings/sugar/refptr.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A rust helper to ease the use of Gecko's refcounted types. use crate::gecko_bindings::sugar::ownership::HasArcFFI; use crate::gecko_bindings::{bindings, structs}; use crate::Atom; use servo_arc::Arc; use std::marker::PhantomData;
--- a/servo/components/style/gecko_bindings/sugar/style_complex_color.rs +++ b/servo/components/style/gecko_bindings/sugar/style_complex_color.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Rust helpers to interact with Gecko's StyleComplexColor. use crate::gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor}; use crate::gecko_bindings::structs::StyleComplexColor; use crate::gecko_bindings::structs::StyleComplexColor_Tag as Tag; use crate::values::computed::ui::ColorOrAuto; use crate::values::computed::{Color as ComputedColor, RGBAColor as ComputedRGBA};
--- a/servo/components/style/gecko_string_cache/mod.rs +++ b/servo/components/style/gecko_string_cache/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![allow(unsafe_code)] // This is needed for the constants in atom_macro.rs, because we have some // atoms whose names differ only by case, e.g. datetime and dateTime. #![allow(non_upper_case_globals)] //! A drop-in replacement for string_cache, but backed by Gecko `nsAtom`s.
--- a/servo/components/style/gecko_string_cache/namespace.rs +++ b/servo/components/style/gecko_string_cache/namespace.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A type to represent a namespace. use crate::gecko_bindings::structs::nsAtom; use crate::string_cache::{Atom, WeakAtom}; use precomputed_hash::PrecomputedHash; use std::borrow::Borrow; use std::fmt;
--- a/servo/components/style/hash.rs +++ b/servo/components/style/hash.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Reexports of hashglobe types in Gecko mode, and stdlib hashmap shims in Servo mode //! //! Can go away when the stdlib gets fallible collections //! https://github.com/rust-lang/rfcs/pull/2116 use fxhash;
--- a/servo/components/style/invalidation/element/document_state.rs +++ b/servo/components/style/invalidation/element/document_state.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! An invalidation processor for style changes due to document state changes. use crate::dom::TElement; use crate::element_state::DocumentState; use crate::invalidation::element::invalidator::{DescendantInvalidationLists, InvalidationVector}; use crate::invalidation::element::invalidator::{Invalidation, InvalidationProcessor}; use crate::invalidation::element::state_and_attributes;
--- a/servo/components/style/invalidation/element/element_wrapper.rs +++ b/servo/components/style/invalidation/element/element_wrapper.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A wrapper over an element and a snapshot, that allows us to selector-match //! against a past state of the element. use crate::dom::TElement; use crate::element_state::ElementState; use crate::selector_parser::{AttrValue, NonTSPseudoClass, PseudoElement, SelectorImpl}; use crate::selector_parser::{Snapshot, SnapshotMap};
--- a/servo/components/style/invalidation/element/invalidation_map.rs +++ b/servo/components/style/invalidation/element/invalidation_map.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Code for invalidations due to state or attribute changes. use crate::context::QuirksMode; use crate::element_state::{DocumentState, ElementState}; use crate::selector_map::{MaybeCaseInsensitiveHashMap, SelectorMap, SelectorMapEntry}; use crate::selector_parser::SelectorImpl; use crate::{Atom, LocalName, Namespace};
--- a/servo/components/style/invalidation/element/invalidator.rs +++ b/servo/components/style/invalidation/element/invalidator.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The struct that takes care of encapsulating all the logic on where and how //! element styles need to be invalidated. use crate::context::StackLimitChecker; use crate::dom::{TElement, TNode, TShadowRoot}; use crate::selector_parser::SelectorImpl; use selectors::matching::matches_compound_selector_from;
--- a/servo/components/style/invalidation/element/mod.rs +++ b/servo/components/style/invalidation/element/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Invalidation of element styles due to attribute or style changes. pub mod document_state; pub mod element_wrapper; pub mod invalidation_map; pub mod invalidator; pub mod restyle_hints;
--- a/servo/components/style/invalidation/element/restyle_hints.rs +++ b/servo/components/style/invalidation/element/restyle_hints.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Restyle hints: an optimization to avoid unnecessarily matching selectors. #[cfg(feature = "gecko")] use crate::gecko_bindings::structs::nsRestyleHint; use crate::traversal_flags::TraversalFlags; bitflags! {
--- a/servo/components/style/invalidation/element/state_and_attributes.rs +++ b/servo/components/style/invalidation/element/state_and_attributes.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! An invalidation processor for style changes due to state and attribute //! changes. use crate::context::SharedStyleContext; use crate::data::ElementData; use crate::dom::TElement; use crate::element_state::ElementState;
--- a/servo/components/style/invalidation/media_queries.rs +++ b/servo/components/style/invalidation/media_queries.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Code related to the invalidation of media-query-affected rules. use crate::context::QuirksMode; use crate::media_queries::Device; use crate::shared_lock::SharedRwLockReadGuard; use crate::stylesheets::{DocumentRule, ImportRule, MediaRule}; use crate::stylesheets::{NestedRuleIterationCondition, Stylesheet, SupportsRule};
--- a/servo/components/style/invalidation/mod.rs +++ b/servo/components/style/invalidation/mod.rs @@ -1,9 +1,9 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Different bits of code related to invalidating style. pub mod element; pub mod media_queries; pub mod stylesheets;
--- a/servo/components/style/invalidation/stylesheets.rs +++ b/servo/components/style/invalidation/stylesheets.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A collection of invalidations due to changes in which stylesheets affect a //! document. #![deny(unsafe_code)] use crate::dom::{TDocument, TElement, TNode}; use crate::invalidation::element::element_wrapper::{ElementSnapshot, ElementWrapper};
--- a/servo/components/style/lib.rs +++ b/servo/components/style/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Calculate [specified][specified] and [computed values][computed] from a //! tree of DOM nodes and a set of stylesheets. //! //! [computed]: https://drafts.csswg.org/css-cascade/#computed //! [specified]: https://drafts.csswg.org/css-cascade/#specified //! //! In particular, this crate contains the definitions of supported properties, @@ -31,16 +31,18 @@ extern crate atomic_refcell; #[macro_use] extern crate bitflags; #[allow(unused_extern_crates)] extern crate byteorder; #[cfg(feature = "gecko")] #[macro_use] #[no_link] extern crate cfg_if; +#[cfg(feature = "servo")] +extern crate crossbeam_channel; #[macro_use] extern crate cssparser; #[macro_use] extern crate debug_unreachable; extern crate euclid; extern crate fallible; extern crate fxhash; #[cfg(feature = "gecko")] @@ -80,18 +82,16 @@ extern crate selectors; #[cfg(feature = "servo")] #[macro_use] extern crate serde; pub extern crate servo_arc; #[cfg(feature = "servo")] #[macro_use] extern crate servo_atoms; #[cfg(feature = "servo")] -extern crate servo_channel; -#[cfg(feature = "servo")] extern crate servo_config; #[cfg(feature = "servo")] extern crate servo_url; extern crate smallbitvec; extern crate smallvec; #[cfg(feature = "servo")] extern crate string_cache; #[macro_use]
--- a/servo/components/style/logical_geometry.rs +++ b/servo/components/style/logical_geometry.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Geometry in flow-relative space. use crate::properties::style_structs; use euclid::num::Zero; use euclid::{Point2D, Rect, SideOffsets2D, Size2D}; use std::cmp::{max, min}; use std::fmt::{self, Debug, Error, Formatter};
--- a/servo/components/style/macros.rs +++ b/servo/components/style/macros.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Various macro helpers. macro_rules! exclusive_value { (($value:ident, $set:expr) => $ident:path) => { if $value.intersects($set) { return Err(()); } else {
--- a/servo/components/style/matching.rs +++ b/servo/components/style/matching.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! High-level interface to CSS selector matching. #![allow(unsafe_code)] #![deny(missing_docs)] use crate::context::{ElementCascadeInputs, QuirksMode, SelectorFlagsMap}; use crate::context::{SharedStyleContext, StyleContext};
--- a/servo/components/style/media_queries/media_condition.rs +++ b/servo/components/style/media_queries/media_condition.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A media query condition: //! //! https://drafts.csswg.org/mediaqueries-4/#typedef-media-condition use super::{Device, MediaFeatureExpression}; use crate::context::QuirksMode; use crate::parser::ParserContext;
--- a/servo/components/style/media_queries/media_feature.rs +++ b/servo/components/style/media_queries/media_feature.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Media features. use super::media_feature_expression::{AspectRatio, RangeOrOperator}; use super::Device; use crate::parser::ParserContext; use crate::values::computed::{CSSPixelLength, Resolution}; use crate::Atom;
--- a/servo/components/style/media_queries/media_feature_expression.rs +++ b/servo/components/style/media_queries/media_feature_expression.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Parsing for media feature expressions, like `(foo: bar)` or //! `(width >= 400px)`. use super::media_feature::{Evaluator, MediaFeatureDescription}; use super::media_feature::{KeywordDiscriminant, ParsingRequirements}; use super::Device; use crate::context::QuirksMode;
--- a/servo/components/style/media_queries/media_list.rs +++ b/servo/components/style/media_queries/media_list.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A media query list: //! //! https://drafts.csswg.org/mediaqueries/#typedef-media-query-list use super::{Device, MediaQuery, Qualifier}; use crate::context::QuirksMode; use crate::error_reporting::ContextualParseError;
--- a/servo/components/style/media_queries/media_query.rs +++ b/servo/components/style/media_queries/media_query.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A media query: //! //! https://drafts.csswg.org/mediaqueries/#typedef-media-query use super::media_condition::MediaCondition; use crate::parser::ParserContext; use crate::str::string_as_ascii_lowercase;
--- a/servo/components/style/media_queries/mod.rs +++ b/servo/components/style/media_queries/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! [Media queries][mq]. //! //! [mq]: https://drafts.csswg.org/mediaqueries/ mod media_condition; mod media_list; mod media_query;
--- a/servo/components/style/parallel.rs +++ b/servo/components/style/parallel.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Implements parallel traversal over the DOM tree. //! //! This traversal is based on Rayon, and therefore its safety is largely //! verified by the type system. //! //! The primary trickiness and fine print for the above relates to the //! thread safety of the DOM nodes themselves. Accessing a DOM element
--- a/servo/components/style/parser.rs +++ b/servo/components/style/parser.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The context within which CSS code is parsed. use crate::context::QuirksMode; use crate::error_reporting::{ContextualParseError, ParseErrorReporter}; use crate::stylesheets::{CssRuleType, Namespaces, Origin, UrlExtraData}; use crate::use_counters::UseCounters; use cssparser::{Parser, SourceLocation, UnicodeRange};
--- a/servo/components/style/properties/build.py +++ b/servo/components/style/properties/build.py @@ -1,11 +1,11 @@ # 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/. +# file, You can obtain one at https://mozilla.org/MPL/2.0/. import json import os.path import re import sys BASE = os.path.dirname(__file__.replace('\\', '/')) sys.path.insert(0, os.path.join(BASE, "Mako-0.9.1.zip"))
--- a/servo/components/style/properties/cascade.rs +++ b/servo/components/style/properties/cascade.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The main cascading algorithm of the style system. use crate::context::QuirksMode; use crate::custom_properties::CustomPropertiesBuilder; use crate::dom::TElement; use crate::font_metrics::FontMetricsProvider; use crate::logical_geometry::WritingMode;
--- a/servo/components/style/properties/computed_value_flags.rs +++ b/servo/components/style/properties/computed_value_flags.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Misc information about a given computed style. bitflags! { /// Misc information about a given computed style. /// /// All flags are currently inherited for text, pseudo elements, and /// anonymous boxes, see StyleBuilder::for_inheritance and its callsites.
--- a/servo/components/style/properties/data.py +++ b/servo/components/style/properties/data.py @@ -1,11 +1,11 @@ # 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/. +# file, You can obtain one at https://mozilla.org/MPL/2.0/. import re PHYSICAL_SIDES = ["top", "right", "bottom", "left"] LOGICAL_SIDES = ["block-start", "block-end", "inline-start", "inline-end"] PHYSICAL_SIZES = ["width", "height"] LOGICAL_SIZES = ["block-size", "inline-size"]
--- a/servo/components/style/properties/declaration_block.rs +++ b/servo/components/style/properties/declaration_block.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A property declaration block. #![deny(missing_docs)] use crate::context::QuirksMode; use cssparser::{DeclarationListParser, parse_important, ParserInput, CowRcStr}; use cssparser::{Parser, AtRuleParser, DeclarationParser, Delimiter, ParseErrorKind};
--- a/servo/components/style/properties/gecko.mako.rs +++ b/servo/components/style/properties/gecko.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // `data` comes from components/style/properties.mako.rs; see build.rs for more details. <%! from data import to_camel_case, to_camel_case_lower from data import Keyword %> <%namespace name="helpers" file="/helpers.mako.rs" />
--- a/servo/components/style/properties/helpers.mako.rs +++ b/servo/components/style/properties/helpers.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%! from data import Keyword, to_rust_ident, to_camel_case from data import LOGICAL_SIDES, PHYSICAL_SIDES, LOGICAL_SIZES, SYSTEM_FONT_LONGHANDS %> <%def name="predefined_type(name, type, initial_value, parse_method='parse', needs_context=True, vector=False,
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs +++ b/servo/components/style/properties/helpers/animated_properties.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import to_idl_name, SYSTEM_FONT_LONGHANDS, to_camel_case from itertools import groupby %>
--- a/servo/components/style/properties/longhands/background.mako.rs +++ b/servo/components/style/properties/longhands/background.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("Background", inherited=False) %> ${helpers.predefined_type( "background-color", "Color",
--- a/servo/components/style/properties/longhands/border.mako.rs +++ b/servo/components/style/properties/longhands/border.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import Keyword, Method, PHYSICAL_SIDES, ALL_SIDES, maybe_moz_logical_alias %> <% data.new_style_struct("Border", inherited=False, additional_methods=[Method("border_" + side + "_has_nonzero_width", "bool") for side in ["top", "right", "bottom", "left"]]) %> <%
--- a/servo/components/style/properties/longhands/box.mako.rs +++ b/servo/components/style/properties/longhands/box.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import Keyword, Method, to_rust_ident, to_camel_case%> <% data.new_style_struct("Box", inherited=False, gecko_name="Display") %>
--- a/servo/components/style/properties/longhands/color.mako.rs +++ b/servo/components/style/properties/longhands/color.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("Color", inherited=True) %> <% from data import to_rust_ident %> ${helpers.predefined_type(
--- a/servo/components/style/properties/longhands/column.mako.rs +++ b/servo/components/style/properties/longhands/column.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("Column", inherited=False) %> ${helpers.predefined_type( "column-width", "length::NonNegativeLengthOrAuto",
--- a/servo/components/style/properties/longhands/counters.mako.rs +++ b/servo/components/style/properties/longhands/counters.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("Counters", inherited=False, gecko_name="Content") %> ${helpers.predefined_type( "content", "Content",
--- a/servo/components/style/properties/longhands/effects.mako.rs +++ b/servo/components/style/properties/longhands/effects.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> // Box-shadow, etc. <% data.new_style_struct("Effects", inherited=False) %> ${helpers.predefined_type( "opacity",
--- a/servo/components/style/properties/longhands/font.mako.rs +++ b/servo/components/style/properties/longhands/font.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import Method, to_camel_case, to_rust_ident, to_camel_case_lower, SYSTEM_FONT_LONGHANDS %> <% data.new_style_struct("Font", inherited=True) %> ${helpers.predefined_type( "font-family",
--- a/servo/components/style/properties/longhands/inherited_box.mako.rs +++ b/servo/components/style/properties/longhands/inherited_box.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("InheritedBox", inherited=True, gecko_name="Visibility") %> // TODO: collapse. Well, do tables first. ${helpers.single_keyword( "visibility",
--- a/servo/components/style/properties/longhands/inherited_svg.mako.rs +++ b/servo/components/style/properties/longhands/inherited_svg.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> // SVG 1.1 (Second Edition) // https://www.w3.org/TR/SVG/ <% data.new_style_struct("InheritedSVG", inherited=True, gecko_name="SVG") %> // Section 10 - Text
--- a/servo/components/style/properties/longhands/inherited_table.mako.rs +++ b/servo/components/style/properties/longhands/inherited_table.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("InheritedTable", inherited=True, gecko_name="TableBorder") %> ${helpers.single_keyword( "border-collapse", "separate collapse",
--- a/servo/components/style/properties/longhands/inherited_text.mako.rs +++ b/servo/components/style/properties/longhands/inherited_text.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import Keyword %> <% data.new_style_struct("InheritedText", inherited=True, gecko_name="Text") %> ${helpers.predefined_type( "line-height", "LineHeight",
--- a/servo/components/style/properties/longhands/inherited_ui.mako.rs +++ b/servo/components/style/properties/longhands/inherited_ui.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("InheritedUI", inherited=True, gecko_name="UI") %> ${helpers.predefined_type( "cursor", "Cursor",
--- a/servo/components/style/properties/longhands/list.mako.rs +++ b/servo/components/style/properties/longhands/list.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("List", inherited=True) %> ${helpers.single_keyword("list-style-position", "outside inside", animation_value_type="discrete", spec="https://drafts.csswg.org/css-lists/#propdef-list-style-position", servo_restyle_damage="rebuild_and_reflow")}
--- a/servo/components/style/properties/longhands/margin.mako.rs +++ b/servo/components/style/properties/longhands/margin.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import ALL_SIDES, maybe_moz_logical_alias %> <% data.new_style_struct("Margin", inherited=False) %> % for side in ALL_SIDES: <% spec = "https://drafts.csswg.org/css-box/#propdef-margin-%s" % side[0]
--- a/servo/components/style/properties/longhands/outline.mako.rs +++ b/servo/components/style/properties/longhands/outline.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import Method %> <% data.new_style_struct("Outline", inherited=False, additional_methods=[Method("outline_has_nonzero_width", "bool")]) %>
--- a/servo/components/style/properties/longhands/padding.mako.rs +++ b/servo/components/style/properties/longhands/padding.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import ALL_SIDES, maybe_moz_logical_alias %> <% data.new_style_struct("Padding", inherited=False) %> // APPLIES_TO_PLACEHOLDER so we can set it in UA stylesheets. But we use a // !important value there, so pages can't set it. % for side in ALL_SIDES:
--- a/servo/components/style/properties/longhands/position.mako.rs +++ b/servo/components/style/properties/longhands/position.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%! from data import to_rust_ident %> <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import ALL_SIZES, PHYSICAL_SIDES, LOGICAL_SIDES %> <% data.new_style_struct("Position", inherited=False) %> // "top" / "left" / "bottom" / "right"
--- a/servo/components/style/properties/longhands/svg.mako.rs +++ b/servo/components/style/properties/longhands/svg.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("SVG", inherited=False, gecko_name="SVGReset") %> ${helpers.single_keyword( "dominant-baseline", """auto use-script no-change reset-size ideographic alphabetic hanging
--- a/servo/components/style/properties/longhands/table.mako.rs +++ b/servo/components/style/properties/longhands/table.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% data.new_style_struct("Table", inherited=False) %> ${helpers.single_keyword( "table-layout", "auto fixed",
--- a/servo/components/style/properties/longhands/text.mako.rs +++ b/servo/components/style/properties/longhands/text.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import Method %> <% data.new_style_struct( "Text", inherited=False, gecko_name="TextReset",
--- a/servo/components/style/properties/longhands/ui.mako.rs +++ b/servo/components/style/properties/longhands/ui.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import Method %> // CSS Basic User Interface Module Level 1 // https://drafts.csswg.org/css-ui-3/ <% data.new_style_struct("UI", inherited=False, gecko_name="UIReset") %>
--- a/servo/components/style/properties/longhands/xul.mako.rs +++ b/servo/components/style/properties/longhands/xul.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import Method %> // Non-standard properties that Gecko uses for XUL elements. <% data.new_style_struct("XUL", inherited=False) %> ${helpers.single_keyword(
--- a/servo/components/style/properties/properties.mako.rs +++ b/servo/components/style/properties/properties.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // This file is a Mako template: http://www.makotemplates.org/ // Please note that valid Rust syntax may be mangled by the Mako parser. // For example, Vec<&Foo> will be mangled as Vec&Foo>. To work around these issues, the code // can be escaped. In the above example, Vec<<&Foo> or Vec< &Foo> achieves the desired result of Vec<&Foo>. <%namespace name="helpers" file="/helpers.mako.rs" />
--- a/servo/components/style/properties/shorthands/background.mako.rs +++ b/servo/components/style/properties/shorthands/background.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> // TODO: other background-* properties <%helpers:shorthand name="background" sub_properties="background-color background-position-x background-position-y background-repeat background-attachment background-image background-size background-origin background-clip"
--- a/servo/components/style/properties/shorthands/border.mako.rs +++ b/servo/components/style/properties/shorthands/border.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import to_rust_ident, ALL_SIDES, PHYSICAL_SIDES, maybe_moz_logical_alias %> ${helpers.four_sides_shorthand("border-color", "border-%s-color", "specified::Color::parse", spec="https://drafts.csswg.org/css-backgrounds/#border-color", allow_quirks=True)}
--- a/servo/components/style/properties/shorthands/box.mako.rs +++ b/servo/components/style/properties/shorthands/box.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="overflow" flags="SHORTHAND_IN_GETCS" sub_properties="overflow-x overflow-y" spec="https://drafts.csswg.org/css-overflow/#propdef-overflow" @@ -445,16 +445,17 @@ macro_rules! try_parse_one { } Ok(()) } } </%helpers:shorthand> <%helpers:shorthand name="page-break-before" + products="gecko" flags="SHORTHAND_IN_GETCS IS_LEGACY_SHORTHAND" sub_properties="break-before" spec="https://drafts.csswg.org/css2/page.html#propdef-page-break-before" > pub fn parse_value<'i>( _: &ParserContext, input: &mut Parser<'i, '_>, ) -> Result<Longhands, ParseError<'i>> { @@ -468,16 +469,17 @@ macro_rules! try_parse_one { fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write { self.break_before.to_css_legacy(dest) } } </%helpers:shorthand> <%helpers:shorthand name="page-break-after" + products="gecko" flags="SHORTHAND_IN_GETCS IS_LEGACY_SHORTHAND" sub_properties="break-after" spec="https://drafts.csswg.org/css2/page.html#propdef-page-break-after" > pub fn parse_value<'i>( _: &ParserContext, input: &mut Parser<'i, '_>, ) -> Result<Longhands, ParseError<'i>> {
--- a/servo/components/style/properties/shorthands/column.mako.rs +++ b/servo/components/style/properties/shorthands/column.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="columns" sub_properties="column-width column-count" servo_pref="layout.columns.enabled", derive_serialize="True" extra_prefixes="moz" spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
--- a/servo/components/style/properties/shorthands/font.mako.rs +++ b/servo/components/style/properties/shorthands/font.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% from data import SYSTEM_FONT_LONGHANDS %> <%helpers:shorthand name="font" sub_properties="font-style font-variant-caps font-weight font-stretch font-size line-height font-family ${'font-size-adjust' if product == 'gecko' else ''}
--- a/servo/components/style/properties/shorthands/inherited_svg.mako.rs +++ b/servo/components/style/properties/shorthands/inherited_svg.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="marker" products="gecko" sub_properties="marker-start marker-end marker-mid" spec="https://www.w3.org/TR/SVG2/painting.html#MarkerShorthand"> use crate::values::specified::url::UrlOrNone;
--- a/servo/components/style/properties/shorthands/inherited_text.mako.rs +++ b/servo/components/style/properties/shorthands/inherited_text.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="text-emphasis" products="gecko" sub_properties="text-emphasis-style text-emphasis-color" derive_serialize="True" spec="https://drafts.csswg.org/css-text-decor-3/#text-emphasis-property"> use crate::properties::longhands::{text_emphasis_color, text_emphasis_style};
--- a/servo/components/style/properties/shorthands/list.mako.rs +++ b/servo/components/style/properties/shorthands/list.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="list-style" sub_properties="list-style-position list-style-image list-style-type" derive_serialize="True" spec="https://drafts.csswg.org/css-lists/#propdef-list-style"> use crate::properties::longhands::{list_style_image, list_style_position, list_style_type};
--- a/servo/components/style/properties/shorthands/margin.mako.rs +++ b/servo/components/style/properties/shorthands/margin.mako.rs @@ -1,10 +1,10 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> ${helpers.four_sides_shorthand("margin", "margin-%s", "specified::LengthOrPercentageOrAuto::parse", spec="https://drafts.csswg.org/css-box/#propdef-margin", allowed_in_page_rule=True, allow_quirks=True)}
--- a/servo/components/style/properties/shorthands/outline.mako.rs +++ b/servo/components/style/properties/shorthands/outline.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="outline" sub_properties="outline-color outline-style outline-width" derive_serialize="True" spec="https://drafts.csswg.org/css-ui/#propdef-outline"> use crate::properties::longhands::{outline_color, outline_width, outline_style};
--- a/servo/components/style/properties/shorthands/padding.mako.rs +++ b/servo/components/style/properties/shorthands/padding.mako.rs @@ -1,9 +1,9 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> ${helpers.four_sides_shorthand("padding", "padding-%s", "specified::NonNegativeLengthOrPercentage::parse", spec="https://drafts.csswg.org/css-box-3/#propdef-padding", allow_quirks=True)}
--- a/servo/components/style/properties/shorthands/position.mako.rs +++ b/servo/components/style/properties/shorthands/position.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="flex-flow" sub_properties="flex-direction flex-wrap" extra_prefixes="webkit" derive_serialize="True" spec="https://drafts.csswg.org/css-flexbox/#flex-flow-property">
--- a/servo/components/style/properties/shorthands/svg.mako.rs +++ b/servo/components/style/properties/shorthands/svg.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="mask" products="gecko" extra_prefixes="webkit" flags="SHORTHAND_IN_GETCS" sub_properties="mask-mode mask-repeat mask-clip mask-origin mask-composite mask-position-x mask-position-y mask-size mask-image" spec="https://drafts.fxtf.org/css-masking/#propdef-mask">
--- a/servo/components/style/properties/shorthands/text.mako.rs +++ b/servo/components/style/properties/shorthands/text.mako.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="text-decoration" flags="SHORTHAND_IN_GETCS" sub_properties="text-decoration-line ${' text-decoration-style text-decoration-color' if product == 'gecko' else ''}" spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration">
--- a/servo/components/style/rule_cache.rs +++ b/servo/components/style/rule_cache.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A cache from rule node to computed values, in order to cache reset //! properties. use crate::logical_geometry::WritingMode; use crate::properties::{ComputedValues, StyleBuilder}; use crate::rule_tree::StrongRuleNode; use crate::selector_parser::PseudoElement;
--- a/servo/components/style/rule_collector.rs +++ b/servo/components/style/rule_collector.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Collects a series of applicable rules for a given element. use crate::applicable_declarations::{ApplicableDeclarationBlock, ApplicableDeclarationList}; use crate::dom::{TElement, TShadowRoot}; use crate::properties::{AnimationRules, PropertyDeclarationBlock}; use crate::rule_tree::{CascadeLevel, ShadowCascadeOrder}; use crate::selector_map::SelectorMap;
--- a/servo/components/style/rule_tree/mod.rs +++ b/servo/components/style/rule_tree/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![allow(unsafe_code)] //! The rule tree. use crate::applicable_declarations::ApplicableDeclarationList; #[cfg(feature = "gecko")] use crate::gecko::selector_parser::PseudoElement;
--- a/servo/components/style/scoped_tls.rs +++ b/servo/components/style/scoped_tls.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Stack-scoped thread-local storage for rayon thread pools. #![allow(unsafe_code)] #![deny(missing_docs)] use rayon; use std::cell::{Ref, RefCell, RefMut};
--- a/servo/components/style/selector_map.rs +++ b/servo/components/style/selector_map.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A data structure to efficiently index structs containing selectors by local //! name, ids and hash. use crate::applicable_declarations::ApplicableDeclarationList; use crate::context::QuirksMode; use crate::dom::TElement; use crate::hash::map as hash_map;
--- a/servo/components/style/selector_parser.rs +++ b/servo/components/style/selector_parser.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The pseudo-classes and pseudo-elements supported by the style system. #![deny(missing_docs)] use crate::element_state::ElementState; use crate::stylesheets::{Namespaces, Origin, UrlExtraData}; use crate::values::serialize_atom_identifier;
--- a/servo/components/style/servo/media_queries.rs +++ b/servo/components/style/servo/media_queries.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Servo's media-query device and expression representation. use app_units::Au; use crate::custom_properties::CssEnvironment; use crate::media_queries::media_feature::{AllowsRanges, ParsingRequirements}; use crate::media_queries::media_feature::{Evaluator, MediaFeatureDescription}; use crate::media_queries::media_feature_expression::RangeOrOperator;
--- a/servo/components/style/servo/mod.rs +++ b/servo/components/style/servo/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Servo-specific bits of the style system. //! //! These get compiled out on a Gecko build. pub mod media_queries; pub mod restyle_damage; pub mod selector_parser;
--- a/servo/components/style/servo/restyle_damage.rs +++ b/servo/components/style/servo/restyle_damage.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The restyle damage is a hint that tells layout which kind of operations may //! be needed in presence of incremental style changes. use crate::computed_values::display::T as Display; use crate::matching::{StyleChange, StyleDifference}; use crate::properties::ComputedValues; use std::fmt;
--- a/servo/components/style/servo/selector_parser.rs +++ b/servo/components/style/servo/selector_parser.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![deny(missing_docs)] //! Servo's selector parser. use crate::attr::{AttrIdentifier, AttrValue}; use crate::dom::{OpaqueNode, TElement, TNode}; use crate::element_state::{DocumentState, ElementState};
--- a/servo/components/style/servo/url.rs +++ b/servo/components/style/servo/url.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Common handling for the specified value CSS url() values. use crate::parser::{Parse, ParserContext}; use cssparser::Parser; use servo_url::ServoUrl; use std::fmt::{self, Write}; // Note: We use std::sync::Arc rather than servo_arc::Arc here because the
--- a/servo/components/style/shared_lock.rs +++ b/servo/components/style/shared_lock.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Different objects protected by the same lock #[cfg(feature = "gecko")] use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut}; use crate::str::{CssString, CssStringWriter}; use crate::stylesheets::Origin; #[cfg(feature = "servo")]
--- a/servo/components/style/sharing/checks.rs +++ b/servo/components/style/sharing/checks.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Different checks done during the style sharing process in order to determine //! quickly whether it's worth to share style, and whether two different //! elements can indeed share the same style. use crate::bloom::StyleBloom; use crate::context::{SelectorFlagsMap, SharedStyleContext}; use crate::dom::TElement;
--- a/servo/components/style/sharing/mod.rs +++ b/servo/components/style/sharing/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Code related to the style sharing cache, an optimization that allows similar //! nodes to share style without having to run selector matching twice. //! //! The basic setup is as follows. We have an LRU cache of style sharing //! candidates. When we try to style a target element, we first check whether //! we can quickly determine that styles match something in this cache, and if //! so we just use the cached style information. This check is done with a
--- a/servo/components/style/str.rs +++ b/servo/components/style/str.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! String utils for attributes and similar stuff. #![deny(missing_docs)] use num_traits::ToPrimitive; use std::borrow::Cow; use std::convert::AsRef;
--- a/servo/components/style/style_adjuster.rs +++ b/servo/components/style/style_adjuster.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A struct to encapsulate all the style fixups and flags propagations //! a computed style needs in order for it to adhere to the CSS spec. use app_units::Au; use crate::dom::TElement; use crate::properties::computed_value_flags::ComputedValueFlags; use crate::properties::longhands::display::computed_value::T as Display;
--- a/servo/components/style/style_resolver.rs +++ b/servo/components/style/style_resolver.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Style resolution for a given element or pseudo-element. use crate::applicable_declarations::ApplicableDeclarationList; use crate::context::{CascadeInputs, ElementCascadeInputs, StyleContext}; use crate::data::{EagerPseudoStyles, ElementStyles}; use crate::dom::TElement; use crate::matching::MatchMethods;
--- a/servo/components/style/stylesheet_set.rs +++ b/servo/components/style/stylesheet_set.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A centralized set of stylesheets for a document. use crate::dom::TElement; use crate::invalidation::stylesheets::StylesheetInvalidationSet; use crate::media_queries::Device; use crate::selector_parser::SnapshotMap; use crate::shared_lock::SharedRwLockReadGuard;
--- a/servo/components/style/stylesheets/counter_style_rule.rs +++ b/servo/components/style/stylesheets/counter_style_rule.rs @@ -1,7 +1,7 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![allow(missing_docs)] pub use crate::counter_style::CounterStyleRuleData as CounterStyleRule;
--- a/servo/components/style/stylesheets/document_rule.rs +++ b/servo/components/style/stylesheets/document_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! [@document rules](https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#at-document) //! initially in CSS Conditional Rules Module Level 3, @document has been postponed to the level 4. //! We implement the prefixed `@-moz-document`. use crate::media_queries::Device; use crate::parser::{Parse, ParserContext}; use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked};
--- a/servo/components/style/stylesheets/font_face_rule.rs +++ b/servo/components/style/stylesheets/font_face_rule.rs @@ -1,7 +1,7 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![allow(missing_docs)] pub use crate::font_face::FontFaceRuleData as FontFaceRule;
--- a/servo/components/style/stylesheets/font_feature_values_rule.rs +++ b/servo/components/style/stylesheets/font_feature_values_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The [`@font-feature-values`][font-feature-values] at-rule. //! //! [font-feature-values]: https://drafts.csswg.org/css-fonts-3/#at-font-feature-values-rule use crate::error_reporting::ContextualParseError; #[cfg(feature = "gecko")] use crate::gecko_bindings::bindings::Gecko_AppendFeatureValueHashEntry;
--- a/servo/components/style/stylesheets/import_rule.rs +++ b/servo/components/style/stylesheets/import_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The [`@import`][import] at-rule. //! //! [import]: https://drafts.csswg.org/css-cascade-3/#at-import use crate::context::QuirksMode; use crate::media_queries::MediaList; use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock};
--- a/servo/components/style/stylesheets/keyframes_rule.rs +++ b/servo/components/style/stylesheets/keyframes_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Keyframes: https://drafts.csswg.org/css-animations/#keyframes use crate::error_reporting::ContextualParseError; use crate::parser::ParserContext; use crate::properties::longhands::transition_timing_function::single_value::SpecifiedValue as SpecifiedTimingFunction; use crate::properties::LonghandIdSet; use crate::properties::{Importance, PropertyDeclaration};
--- a/servo/components/style/stylesheets/loader.rs +++ b/servo/components/style/stylesheets/loader.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The stylesheet loader is the abstraction used to trigger network requests //! for `@import` rules. use crate::media_queries::MediaList; use crate::parser::ParserContext; use crate::shared_lock::{Locked, SharedRwLock}; use crate::stylesheets::import_rule::ImportRule;
--- a/servo/components/style/stylesheets/media_rule.rs +++ b/servo/components/style/stylesheets/media_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! An [`@media`][media] urle. //! //! [media]: https://drafts.csswg.org/css-conditional/#at-ruledef-media use crate::media_queries::MediaList; use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked}; use crate::shared_lock::{SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
--- a/servo/components/style/stylesheets/mod.rs +++ b/servo/components/style/stylesheets/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Style sheets and their CSS rules. mod counter_style_rule; mod document_rule; mod font_face_rule; pub mod font_feature_values_rule; pub mod import_rule;
--- a/servo/components/style/stylesheets/namespace_rule.rs +++ b/servo/components/style/stylesheets/namespace_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The `@namespace` at-rule. use crate::shared_lock::{SharedRwLockReadGuard, ToCssWithGuard}; use crate::str::CssStringWriter; use crate::{Namespace, Prefix}; use cssparser::SourceLocation; use std::fmt::{self, Write};
--- a/servo/components/style/stylesheets/origin.rs +++ b/servo/components/style/stylesheets/origin.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! [CSS cascade origins](https://drafts.csswg.org/css-cascade/#cascading-origins). use std::marker::PhantomData; use std::ops::BitOrAssign; /// Each style rule has an origin, which determines where it enters the cascade. ///
--- a/servo/components/style/stylesheets/page_rule.rs +++ b/servo/components/style/stylesheets/page_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A [`@page`][page] rule. //! //! [page]: https://drafts.csswg.org/css2/page.html#page-box use crate::properties::PropertyDeclarationBlock; use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked}; use crate::shared_lock::{SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
--- a/servo/components/style/stylesheets/rule_list.rs +++ b/servo/components/style/stylesheets/rule_list.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A list of CSS rules. use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked}; use crate::shared_lock::{SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard}; use crate::str::CssStringWriter; use crate::stylesheets::loader::StylesheetLoader; use crate::stylesheets::rule_parser::{InsertRuleContext, State};
--- a/servo/components/style/stylesheets/rule_parser.rs +++ b/servo/components/style/stylesheets/rule_parser.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Parsing of the stylesheet contents. use crate::counter_style::{parse_counter_style_body, parse_counter_style_name_definition}; use crate::error_reporting::ContextualParseError; use crate::font_face::parse_font_face_block; use crate::media_queries::MediaList; use crate::parser::{Parse, ParserContext};
--- a/servo/components/style/stylesheets/rules_iterator.rs +++ b/servo/components/style/stylesheets/rules_iterator.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! An iterator over a list of rules. use crate::context::QuirksMode; use crate::media_queries::Device; use crate::shared_lock::SharedRwLockReadGuard; use crate::stylesheets::StylesheetInDocument; use crate::stylesheets::{CssRule, DocumentRule, ImportRule, MediaRule, SupportsRule};
--- a/servo/components/style/stylesheets/style_rule.rs +++ b/servo/components/style/stylesheets/style_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A style rule. use crate::properties::PropertyDeclarationBlock; use crate::selector_parser::SelectorImpl; use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked}; use crate::shared_lock::{SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard}; use crate::str::CssStringWriter;
--- a/servo/components/style/stylesheets/stylesheet.rs +++ b/servo/components/style/stylesheets/stylesheet.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::context::QuirksMode; use crate::error_reporting::{ContextualParseError, ParseErrorReporter}; use crate::invalidation::media_queries::{MediaListKey, ToMediaListKey}; use crate::media_queries::{Device, MediaList}; use crate::parser::ParserContext; use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked}; use crate::shared_lock::{SharedRwLock, SharedRwLockReadGuard};
--- a/servo/components/style/stylesheets/supports_rule.rs +++ b/servo/components/style/stylesheets/supports_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! [@supports rules](https://drafts.csswg.org/css-conditional-3/#at-supports) use crate::parser::ParserContext; use crate::properties::{PropertyDeclaration, PropertyId, SourcePropertyDeclaration}; use crate::selector_parser::{SelectorImpl, SelectorParser}; use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked}; use crate::shared_lock::{SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
--- a/servo/components/style/stylesheets/viewport_rule.rs +++ b/servo/components/style/stylesheets/viewport_rule.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! The [`@viewport`][at] at-rule and [`meta`][meta] element. //! //! [at]: https://drafts.csswg.org/css-device-adapt/#atviewport-rule //! [meta]: https://drafts.csswg.org/css-device-adapt/#viewport-meta use app_units::Au; use crate::context::QuirksMode;
--- a/servo/components/style/stylist.rs +++ b/servo/components/style/stylist.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Selector matching. use crate::applicable_declarations::{ApplicableDeclarationBlock, ApplicableDeclarationList}; use crate::context::{CascadeInputs, QuirksMode}; use crate::dom::{TElement, TShadowRoot}; use crate::element_state::{DocumentState, ElementState}; use crate::font_metrics::FontMetricsProvider;
--- a/servo/components/style/thread_state.rs +++ b/servo/components/style/thread_state.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Supports dynamic assertions in about what sort of thread is running and //! what state it's in. #![deny(missing_docs)] use std::cell::RefCell;
--- a/servo/components/style/timer.rs +++ b/servo/components/style/timer.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![deny(missing_docs)] //! A timer module, used to define a `Timer` type, that is controlled by script. use time; /// The `TimerMode` is used to determine what time should the `Timer` return.
--- a/servo/components/style/traversal.rs +++ b/servo/components/style/traversal.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Traversing the DOM tree; the bloom filter. use crate::context::{ElementCascadeInputs, SharedStyleContext, StyleContext}; use crate::data::{ElementData, ElementStyles}; use crate::dom::{NodeInfo, OpaqueNode, TElement, TNode}; use crate::invalidation::element::restyle_hints::RestyleHint; use crate::matching::{ChildCascadeRequirement, MatchMethods};
--- a/servo/components/style/traversal_flags.rs +++ b/servo/components/style/traversal_flags.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Flags that control the traversal process. //! //! We CamelCase rather than UPPER_CASING so that we can grep for the same //! strings across gecko and servo. #![allow(non_upper_case_globals)] bitflags! {
--- a/servo/components/style/use_counters/mod.rs +++ b/servo/components/style/use_counters/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Various stuff for CSS property use counters. #[cfg(feature = "gecko")] use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI}; use crate::properties::{NonCustomPropertyId, NON_CUSTOM_PROPERTY_ID_COUNT}; use std::cell::Cell;
--- a/servo/components/style/values/animated/color.rs +++ b/servo/components/style/values/animated/color.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Animated types for CSS colors. use crate::values::animated::{Animate, Procedure, ToAnimatedZero}; use crate::values::distance::{ComputeSquaredDistance, SquaredDistance}; use crate::values::generics::color::{Color as GenericColor, ComplexColorRatios}; /// An animated RGBA color.
--- a/servo/components/style/values/animated/effects.rs +++ b/servo/components/style/values/animated/effects.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Animated types for CSS values related to effects. use crate::values::animated::color::Color; use crate::values::computed::length::Length; #[cfg(feature = "gecko")] use crate::values::computed::url::ComputedUrl; use crate::values::computed::{Angle, Number};
--- a/servo/components/style/values/animated/font.rs +++ b/servo/components/style/values/animated/font.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Animation implementation for various font-related types. use super::{Animate, Procedure, ToAnimatedZero}; use crate::values::computed::font::{FontVariationSettings, FontWeight}; use crate::values::computed::Number; use crate::values::distance::{ComputeSquaredDistance, SquaredDistance}; use crate::values::generics::font::{FontSettings as GenericFontSettings, FontTag, VariationValue};
--- a/servo/components/style/values/animated/length.rs +++ b/servo/components/style/values/animated/length.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Animation implementation for various length-related types. use super::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero}; use crate::values::computed::length::{CalcLengthOrPercentage, Length}; use crate::values::computed::length::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone}; use crate::values::computed::MaxLength as ComputedMaxLength; use crate::values::computed::MozLength as ComputedMozLength;
--- a/servo/components/style/values/animated/mod.rs +++ b/servo/components/style/values/animated/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Animated values. //! //! Some values, notably colors, cannot be interpolated directly with their //! computed values and need yet another intermediate representation. This //! module's raison d'être is to ultimately contain all these types. use app_units::Au; @@ -16,20 +16,20 @@ use crate::values::computed::Angle as Co use crate::values::computed::BorderCornerRadius as ComputedBorderCornerRadius; use crate::values::CSSFloat; use euclid::{Point2D, Size2D}; use smallvec::SmallVec; use std::cmp; pub mod color; pub mod effects; -pub mod transform; mod font; mod length; mod svg; +pub mod transform; /// The category a property falls into for ordering purposes. /// /// https://drafts.csswg.org/web-animations/#calculating-computed-keyframes #[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] enum PropertyCategory { Custom, PhysicalLonghand,
--- a/servo/components/style/values/animated/svg.rs +++ b/servo/components/style/values/animated/svg.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Animation implementations for various SVG-related types. use super::{Animate, Procedure, ToAnimatedZero}; use crate::properties::animated_properties::ListAnimation; use crate::values::animated::color::Color as AnimatedColor; use crate::values::computed::url::ComputedUrl; use crate::values::computed::{LengthOrPercentage, Number, NumberOrPercentage};
--- a/servo/components/style/values/animated/transform.rs +++ b/servo/components/style/values/animated/transform.rs @@ -1,50 +1,51 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Animated types for transform. // There are still some implementation on Matrix3D in animated_properties.mako.rs // because they still need mako to generate the code. +use super::animate_multiplicative_factor; +use super::{Animate, Procedure, ToAnimatedZero}; use crate::properties::animated_properties::ListAnimation; -use crate::values::computed::transform::{DirectionVector, Matrix, Matrix3D}; -use crate::values::computed::transform::TransformOperation as ComputedTransformOperation; +use crate::values::computed::transform::Rotate as ComputedRotate; +use crate::values::computed::transform::Scale as ComputedScale; use crate::values::computed::transform::Transform as ComputedTransform; -use crate::values::computed::transform::Rotate as ComputedRotate; +use crate::values::computed::transform::TransformOperation as ComputedTransformOperation; use crate::values::computed::transform::Translate as ComputedTranslate; -use crate::values::computed::transform::Scale as ComputedScale; +use crate::values::computed::transform::{DirectionVector, Matrix, Matrix3D}; use crate::values::computed::Angle; use crate::values::computed::{Length, LengthOrPercentage}; use crate::values::computed::{Number, Percentage}; use crate::values::distance::{ComputeSquaredDistance, SquaredDistance}; use crate::values::generics::transform::{self, Transform, TransformOperation}; use crate::values::generics::transform::{Rotate, Scale, Translate}; use crate::values::CSSFloat; use num_traits::Zero; use std::cmp; -use super::{Animate, Procedure, ToAnimatedZero}; -use super::animate_multiplicative_factor; - // ------------------------------------ // Animations for Matrix/Matrix3D. // ------------------------------------ /// A 2d matrix for interpolation. #[derive(Clone, ComputeSquaredDistance, Copy, Debug)] #[cfg_attr(feature = "servo", derive(MallocSizeOf))] #[allow(missing_docs)] // FIXME: We use custom derive for ComputeSquaredDistance. However, If possible, we should convert // the InnerMatrix2D into types with physical meaning. This custom derive computes the squared // distance from each matrix item, and this makes the result different from that in Gecko if we // have skew factor in the Matrix3D. pub struct InnerMatrix2D { - pub m11: CSSFloat, pub m12: CSSFloat, - pub m21: CSSFloat, pub m22: CSSFloat, + pub m11: CSSFloat, + pub m12: CSSFloat, + pub m21: CSSFloat, + pub m22: CSSFloat, } impl Animate for InnerMatrix2D { fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { Ok(InnerMatrix2D { m11: animate_multiplicative_factor(self.m11, other.m11, procedure)?, m12: self.m12.animate(&other.m12, procedure)?, m21: self.m21.animate(&other.m21, procedure)?, @@ -92,32 +93,31 @@ impl Animate for MatrixDecomposed2D { // If x-axis of one is flipped, and y-axis of the other, // convert to an unflipped rotation. let mut scale = self.scale; let mut angle = self.angle; let mut other_angle = other.angle; if (scale.0 < 0.0 && other.scale.1 < 0.0) || (scale.1 < 0.0 && other.scale.0 < 0.0) { scale.0 = -scale.0; scale.1 = -scale.1; - angle += if angle < 0.0 {180.} else {-180.}; + angle += if angle < 0.0 { 180. } else { -180. }; } // Don't rotate the long way around. if angle == 0.0 { angle = 360. } if other_angle == 0.0 { other_angle = 360. } if (angle - other_angle).abs() > 180. { if angle > other_angle { angle -= 360. - } - else{ + } else { other_angle -= 360. } } // Interpolate all values. let translate = self.translate.animate(&other.translate, procedure)?; let scale = scale.animate(&other.scale, procedure)?; let angle = angle.animate(&other_angle, procedure)?; @@ -135,34 +135,36 @@ impl Animate for MatrixDecomposed2D { impl ComputeSquaredDistance for MatrixDecomposed2D { #[inline] fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> { // Use Radian to compute the distance. const RAD_PER_DEG: f64 = std::f64::consts::PI / 180.0; let angle1 = self.angle as f64 * RAD_PER_DEG; let angle2 = other.angle as f64 * RAD_PER_DEG; Ok(self.translate.compute_squared_distance(&other.translate)? + - self.scale.compute_squared_distance(&other.scale)? + - angle1.compute_squared_distance(&angle2)? + - self.matrix.compute_squared_distance(&other.matrix)?) + self.scale.compute_squared_distance(&other.scale)? + + angle1.compute_squared_distance(&angle2)? + + self.matrix.compute_squared_distance(&other.matrix)?) } } impl From<Matrix3D> for MatrixDecomposed2D { /// Decompose a 2D matrix. /// <https://drafts.csswg.org/css-transforms/#decomposing-a-2d-matrix> fn from(matrix: Matrix3D) -> MatrixDecomposed2D { let mut row0x = matrix.m11; let mut row0y = matrix.m12; let mut row1x = matrix.m21; let mut row1y = matrix.m22; let translate = Translate2D(matrix.m41, matrix.m42); - let mut scale = Scale2D((row0x * row0x + row0y * row0y).sqrt(), - (row1x * row1x + row1y * row1y).sqrt()); + let mut scale = Scale2D( + (row0x * row0x + row0y * row0y).sqrt(), + (row1x * row1x + row1y * row1y).sqrt(), + ); // If determinant is negative, one axis was flipped. let determinant = row0x * row1y - row0y * row1x; if determinant < 0. { if row0x < row1y { scale.0 = -scale.0; } else { scale.1 = -scale.1; @@ -190,18 +192,20 @@ impl From<Matrix3D> for MatrixDecomposed let m22 = row1y; row0x = cs * m11 + sn * m21; row0y = cs * m12 + sn * m22; row1x = -sn * m11 + cs * m21; row1y = -sn * m12 + cs * m22; } let m = InnerMatrix2D { - m11: row0x, m12: row0y, - m21: row1x, m22: row1y, + m11: row0x, + m12: row0y, + m21: row1x, + m22: row1y, }; // Convert into degrees because our rotation functions expect it. angle = angle.to_degrees(); MatrixDecomposed2D { translate: translate, scale: scale, angle: angle, @@ -259,28 +263,25 @@ impl Animate for Matrix { #[cfg(feature = "gecko")] // Gecko doesn't exactly follow the spec here; we use a different procedure // to match it fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { let from = decompose_2d_matrix(&(*self).into()); let to = decompose_2d_matrix(&(*other).into()); match (from, to) { - (Ok(from), Ok(to)) => { - Matrix3D::from(from.animate(&to, procedure)?).into_2d() - }, + (Ok(from), Ok(to)) => Matrix3D::from(from.animate(&to, procedure)?).into_2d(), // Matrices can be undecomposable due to couple reasons, e.g., // non-invertible matrices. In this case, we should report Err here, // and let the caller do the fallback procedure. - _ => Err(()) + _ => Err(()), } } } - /// A 3d translation. #[cfg_attr(feature = "servo", derive(MallocSizeOf))] #[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug)] pub struct Translate3D(pub f32, pub f32, pub f32); /// A 3d scale function. #[derive(Clone, ComputeSquaredDistance, Copy, Debug)] #[cfg_attr(feature = "servo", derive(MallocSizeOf))] @@ -311,18 +312,18 @@ impl Animate for Scale3D { pub struct Skew(f32, f32, f32); impl ComputeSquaredDistance for Skew { // We have to use atan() to convert the skew factors into skew angles, so implement // ComputeSquaredDistance manually. #[inline] fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> { Ok(self.0.atan().compute_squared_distance(&other.0.atan())? + - self.1.atan().compute_squared_distance(&other.1.atan())? + - self.2.atan().compute_squared_distance(&other.2.atan())?) + self.1.atan().compute_squared_distance(&other.1.atan())? + + self.2.atan().compute_squared_distance(&other.2.atan())?) } } /// A 3d perspective transformation. #[derive(Clone, ComputeSquaredDistance, Copy, Debug)] #[cfg_attr(feature = "servo", derive(MallocSizeOf))] pub struct Perspective(pub f32, pub f32, pub f32, pub f32); @@ -341,57 +342,66 @@ impl Animate for Perspective { #[derive(Clone, Copy, Debug)] #[cfg_attr(feature = "servo", derive(MallocSizeOf))] pub struct Quaternion(f64, f64, f64, f64); impl Quaternion { /// Return a quaternion from a unit direction vector and angle (unit: radian). #[inline] fn from_direction_and_angle(vector: &DirectionVector, angle: f64) -> Self { - debug_assert!((vector.length() - 1.).abs() < 0.0001, - "Only accept an unit direction vector to create a quaternion"); + debug_assert!( + (vector.length() - 1.).abs() < 0.0001, + "Only accept an unit direction vector to create a quaternion" + ); // Reference: // https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation // // if the direction axis is (x, y, z) = xi + yj + zk, // and the angle is |theta|, this formula can be done using // an extension of Euler's formula: // q = cos(theta/2) + (xi + yj + zk)(sin(theta/2)) // = cos(theta/2) + // x*sin(theta/2)i + y*sin(theta/2)j + z*sin(theta/2)k - Quaternion(vector.x as f64 * (angle / 2.).sin(), - vector.y as f64 * (angle / 2.).sin(), - vector.z as f64 * (angle / 2.).sin(), - (angle / 2.).cos()) + Quaternion( + vector.x as f64 * (angle / 2.).sin(), + vector.y as f64 * (angle / 2.).sin(), + vector.z as f64 * (angle / 2.).sin(), + (angle / 2.).cos(), + ) } /// Calculate the dot product. #[inline] fn dot(&self, other: &Self) -> f64 { self.0 * other.0 + self.1 * other.1 + self.2 * other.2 + self.3 * other.3 } /// Return the scaled quaternion by a factor. #[inline] fn scale(&self, factor: f64) -> Self { - Quaternion(self.0 * factor, self.1 * factor, self.2 * factor, self.3 * factor) + Quaternion( + self.0 * factor, + self.1 * factor, + self.2 * factor, + self.3 * factor, + ) } - } impl Animate for Quaternion { fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { use std::f64; let (this_weight, other_weight) = procedure.weights(); debug_assert!( // Doule EPSILON since both this_weight and other_weght have calculation errors // which are approximately equal to EPSILON. (this_weight + other_weight - 1.0f64).abs() <= f64::EPSILON * 2.0 || - other_weight == 1.0f64 || other_weight == 0.0f64, + other_weight == 1.0f64 || + other_weight == 0.0f64, "animate should only be used for interpolating or accumulating transforms" ); // We take a specialized code path for accumulation (where other_weight // is 1). if let Procedure::Accumulate { .. } = procedure { debug_assert_eq!(other_weight, 1.0); if this_weight == 0.0 { @@ -422,22 +432,19 @@ impl Animate for Quaternion { a.3 * b.2 + a.0 * b.1 - a.1 * b.0 + a.2 * b.3, a.3 * b.3 - a.0 * b.0 - a.1 * b.1 - a.2 * b.2, )); } // Straight from gfxQuaternion::Slerp. // // Dot product, clamped between -1 and 1. - let dot = - (self.0 * other.0 + - self.1 * other.1 + - self.2 * other.2 + - self.3 * other.3) - .min(1.0).max(-1.0); + let dot = (self.0 * other.0 + self.1 * other.1 + self.2 * other.2 + self.3 * other.3) + .min(1.0) + .max(-1.0); if dot.abs() == 1.0 { return Ok(*self); } let theta = dot.acos(); let rsintheta = 1.0 / (1.0 - dot * dot).sqrt(); @@ -541,39 +548,36 @@ impl From<MatrixDecomposed3D> for Matrix // Apply scale matrix.apply_scale(&decomposed.scale); matrix } } - /// Decompose a 3D matrix. /// https://drafts.csswg.org/css-transforms-2/#decomposing-a-3d-matrix /// http://www.realtimerendering.com/resources/GraphicsGems/gemsii/unmatrix.c fn decompose_3d_matrix(mut matrix: Matrix3D) -> Result<MatrixDecomposed3D, ()> { // Combine 2 point. let combine = |a: [f32; 3], b: [f32; 3], ascl: f32, bscl: f32| { [ (ascl * a[0]) + (bscl * b[0]), (ascl * a[1]) + (bscl * b[1]), - (ascl * a[2]) + (bscl * b[2]) + (ascl * a[2]) + (bscl * b[2]), ] }; // Dot product. - let dot = |a: [f32; 3], b: [f32; 3]| { - a[0] * b[0] + a[1] * b[1] + a[2] * b[2] - }; + let dot = |a: [f32; 3], b: [f32; 3]| a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; // Cross product. let cross = |row1: [f32; 3], row2: [f32; 3]| { [ row1[1] * row2[2] - row1[2] * row2[1], row1[2] * row2[0] - row1[0] * row2[2], - row1[0] * row2[1] - row1[1] * row2[0] + row1[0] * row2[1] - row1[1] * row2[0], ] }; if matrix.m44 == 0.0 { return Err(()); } let scaling_factor = matrix.m44; @@ -591,64 +595,76 @@ fn decompose_3d_matrix(mut matrix: Matri perspective_matrix.m44 = 1.0; if perspective_matrix.determinant() == 0.0 { return Err(()); } // First, isolate perspective. let perspective = if matrix.m14 != 0.0 || matrix.m24 != 0.0 || matrix.m34 != 0.0 { - let right_hand_side: [f32; 4] = [ - matrix.m14, - matrix.m24, - matrix.m34, - matrix.m44 - ]; + let right_hand_side: [f32; 4] = [matrix.m14, matrix.m24, matrix.m34, matrix.m44]; perspective_matrix = perspective_matrix.inverse().unwrap().transpose(); let perspective = perspective_matrix.pre_mul_point4(&right_hand_side); // NOTE(emilio): Even though the reference algorithm clears the // fourth column here (matrix.m14..matrix.m44), they're not used below // so it's not really needed. - Perspective(perspective[0], perspective[1], perspective[2], perspective[3]) + Perspective( + perspective[0], + perspective[1], + perspective[2], + perspective[3], + ) } else { Perspective(0.0, 0.0, 0.0, 1.0) }; // Next take care of translation (easy). let translate = Translate3D(matrix.m41, matrix.m42, matrix.m43); // Now get scale and shear. 'row' is a 3 element array of 3 component vectors let mut row = matrix.get_matrix_3x3_part(); // Compute X scale factor and normalize first row. let row0len = (row[0][0] * row[0][0] + row[0][1] * row[0][1] + row[0][2] * row[0][2]).sqrt(); let mut scale = Scale3D(row0len, 0.0, 0.0); - row[0] = [row[0][0] / row0len, row[0][1] / row0len, row[0][2] / row0len]; + row[0] = [ + row[0][0] / row0len, + row[0][1] / row0len, + row[0][2] / row0len, + ]; // Compute XY shear factor and make 2nd row orthogonal to 1st. let mut skew = Skew(dot(row[0], row[1]), 0.0, 0.0); row[1] = combine(row[1], row[0], 1.0, -skew.0); // Now, compute Y scale and normalize 2nd row. let row1len = (row[1][0] * row[1][0] + row[1][1] * row[1][1] + row[1][2] * row[1][2]).sqrt(); scale.1 = row1len; - row[1] = [row[1][0] / row1len, row[1][1] / row1len, row[1][2] / row1len]; + row[1] = [ + row[1][0] / row1len, + row[1][1] / row1len, + row[1][2] / row1len, + ]; skew.0 /= scale.1; // Compute XZ and YZ shears, orthogonalize 3rd row skew.1 = dot(row[0], row[2]); row[2] = combine(row[2], row[0], 1.0, -skew.1); skew.2 = dot(row[1], row[2]); row[2] = combine(row[2], row[1], 1.0, -skew.2); // Next, get Z scale and normalize 3rd row. let row2len = (row[2][0] * row[2][0] + row[2][1] * row[2][1] + row[2][2] * row[2][2]).sqrt(); scale.2 = row2len; - row[2] = [row[2][0] / row2len, row[2][1] / row2len, row[2][2] / row2len]; + row[2] = [ + row[2][0] / row2len, + row[2][1] / row2len, + row[2][2] / row2len, + ]; skew.1 /= scale.2; skew.2 /= scale.2; // At this point, the matrix (in rows) is orthonormal. // Check for a coordinate system flip. If the determinant // is -1, then negate the matrix and the scaling factors. if dot(row[0], cross(row[1], row[2])) < 0.0 { scale.negate(); @@ -659,17 +675,17 @@ fn decompose_3d_matrix(mut matrix: Matri } } // Now, get the rotations out. let mut quaternion = Quaternion( 0.5 * ((1.0 + row[0][0] - row[1][1] - row[2][2]).max(0.0) as f64).sqrt(), 0.5 * ((1.0 - row[0][0] + row[1][1] - row[2][2]).max(0.0) as f64).sqrt(), 0.5 * ((1.0 - row[0][0] - row[1][1] + row[2][2]).max(0.0) as f64).sqrt(), - 0.5 * ((1.0 + row[0][0] + row[1][1] + row[2][2]).max(0.0) as f64).sqrt() + 0.5 * ((1.0 + row[0][0] + row[1][1] + row[2][2]).max(0.0) as f64).sqrt(), ); if row[2][1] > row[1][2] { quaternion.0 = -quaternion.0 } if row[0][2] > row[2][0] { quaternion.1 = -quaternion.1 } @@ -728,35 +744,35 @@ fn decompose_2d_matrix(matrix: &Matrix3D scale_x = -scale_x; } Ok(MatrixDecomposed3D { translate: Translate3D(matrix.m41, matrix.m42, 0.), scale: Scale3D(scale_x, scale_y, 1.), skew: Skew(shear_xy, 0., 0.), perspective: Perspective(0., 0., 0., 1.), - quaternion: Quaternion::from_direction_and_angle(&DirectionVector::new(0., 0., 1.), - m12.atan2(m11) as f64) + quaternion: Quaternion::from_direction_and_angle( + &DirectionVector::new(0., 0., 1.), + m12.atan2(m11) as f64, + ), }) } impl Animate for Matrix3D { #[cfg(feature = "servo")] fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { if self.is_3d() || other.is_3d() { let decomposed_from = decompose_3d_matrix(*self); let decomposed_to = decompose_3d_matrix(*other); match (decomposed_from, decomposed_to) { - (Ok(this), Ok(other)) => { - Ok(Matrix3D::from(this.animate(&other, procedure)?)) - }, + (Ok(this), Ok(other)) => Ok(Matrix3D::from(this.animate(&other, procedure)?)), // Matrices can be undecomposable due to couple reasons, e.g., // non-invertible matrices. In this case, we should report Err // here, and let the caller do the fallback procedure. - _ => Err(()) + _ => Err(()), } } else { let this = MatrixDecomposed2D::from(*self); let other = MatrixDecomposed2D::from(*other); Ok(Matrix3D::from(this.animate(&other, procedure)?)) } } @@ -765,23 +781,21 @@ impl Animate for Matrix3D { // to match it fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { let (from, to) = if self.is_3d() || other.is_3d() { (decompose_3d_matrix(*self), decompose_3d_matrix(*other)) } else { (decompose_2d_matrix(self), decompose_2d_matrix(other)) }; match (from, to) { - (Ok(from), Ok(to)) => { - Ok(Matrix3D::from(from.animate(&to, procedure)?)) - }, + (Ok(from), Ok(to)) => Ok(Matrix3D::from(from.animate(&to, procedure)?)), // Matrices can be undecomposable due to couple reasons, e.g., // non-invertible matrices. In this case, we should report Err here, // and let the caller do the fallback procedure. - _ => Err(()) + _ => Err(()), } } } impl ComputeSquaredDistance for Matrix3D { #[inline] #[cfg(feature = "servo")] fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> { @@ -803,50 +817,41 @@ impl ComputeSquaredDistance for Matrix3D (decompose_3d_matrix(*self)?, decompose_3d_matrix(*other)?) } else { (decompose_2d_matrix(self)?, decompose_2d_matrix(other)?) }; from.compute_squared_distance(&to) } } - // ------------------------------------ // Animation for Transform list. // ------------------------------------ -fn is_matched_operation(first: &ComputedTransformOperation, second: &ComputedTransformOperation) -> bool { +fn is_matched_operation( + first: &ComputedTransformOperation, + second: &ComputedTransformOperation, +) -> bool { match (first, second) { - (&TransformOperation::Matrix(..), - &TransformOperation::Matrix(..)) | - (&TransformOperation::Matrix3D(..), - &TransformOperation::Matrix3D(..)) | - (&TransformOperation::Skew(..), - &TransformOperation::Skew(..)) | - (&TransformOperation::SkewX(..), - &TransformOperation::SkewX(..)) | - (&TransformOperation::SkewY(..), - &TransformOperation::SkewY(..)) | - (&TransformOperation::Rotate(..), - &TransformOperation::Rotate(..)) | - (&TransformOperation::Rotate3D(..), - &TransformOperation::Rotate3D(..)) | - (&TransformOperation::RotateX(..), - &TransformOperation::RotateX(..)) | - (&TransformOperation::RotateY(..), - &TransformOperation::RotateY(..)) | - (&TransformOperation::RotateZ(..), - &TransformOperation::RotateZ(..)) | - (&TransformOperation::Perspective(..), - &TransformOperation::Perspective(..)) => true, + (&TransformOperation::Matrix(..), &TransformOperation::Matrix(..)) | + (&TransformOperation::Matrix3D(..), &TransformOperation::Matrix3D(..)) | + (&TransformOperation::Skew(..), &TransformOperation::Skew(..)) | + (&TransformOperation::SkewX(..), &TransformOperation::SkewX(..)) | + (&TransformOperation::SkewY(..), &TransformOperation::SkewY(..)) | + (&TransformOperation::Rotate(..), &TransformOperation::Rotate(..)) | + (&TransformOperation::Rotate3D(..), &TransformOperation::Rotate3D(..)) | + (&TransformOperation::RotateX(..), &TransformOperation::RotateX(..)) | + (&TransformOperation::RotateY(..), &TransformOperation::RotateY(..)) | + (&TransformOperation::RotateZ(..), &TransformOperation::RotateZ(..)) | + (&TransformOperation::Perspective(..), &TransformOperation::Perspective(..)) => true, // Match functions that have the same primitive transform function (a, b) if a.is_translate() && b.is_translate() => true, (a, b) if a.is_scale() && b.is_scale() => true, (a, b) if a.is_rotate() && b.is_rotate() => true, // InterpolateMatrix and AccumulateMatrix are for mismatched transforms - _ => false + _ => false, } } /// <https://drafts.csswg.org/css-transforms/#interpolation-of-transforms> impl Animate for ComputedTransform { #[inline] fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { use std::borrow::Cow; @@ -915,18 +920,18 @@ impl Animate for ComputedTransform { &mut remainder .iter() .map(|transform| { let identity = transform.to_animated_zero().unwrap(); match transform { // We can't interpolate/accumulate ___Matrix types directly with a // matrix. Instead we need to wrap it in another ___Matrix type. - TransformOperation::AccumulateMatrix { .. } - | TransformOperation::InterpolateMatrix { .. } => { + TransformOperation::AccumulateMatrix { .. } | + TransformOperation::InterpolateMatrix { .. } => { let transform_list = Transform(vec![transform.clone()]); let identity_list = Transform(vec![identity]); let (from_list, to_list) = if fill_right { (transform_list, identity_list) } else { (identity_list, transform_list) }; @@ -956,17 +961,17 @@ impl Animate for ComputedTransform { (&identity, transform) }; lhs.animate(rhs, procedure) }, } }) .collect::<Result<Vec<_>, _>>()?, ); - } + }, (None, None) => {}, } Ok(Transform(result)) } } impl ComputeSquaredDistance for ComputedTransform { @@ -985,231 +990,137 @@ impl ComputeSquaredDistance for Computed squared_dist } } /// <http://dev.w3.org/csswg/css-transforms/#interpolation-of-transforms> impl Animate for ComputedTransformOperation { fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { match (self, other) { - ( - &TransformOperation::Matrix3D(ref this), - &TransformOperation::Matrix3D(ref other), - ) => { + (&TransformOperation::Matrix3D(ref this), &TransformOperation::Matrix3D(ref other)) => { Ok(TransformOperation::Matrix3D( this.animate(other, procedure)?, )) }, - ( - &TransformOperation::Matrix(ref this), - &TransformOperation::Matrix(ref other), - ) => { - Ok(TransformOperation::Matrix( - this.animate(other, procedure)?, - )) + (&TransformOperation::Matrix(ref this), &TransformOperation::Matrix(ref other)) => { + Ok(TransformOperation::Matrix(this.animate(other, procedure)?)) }, - ( - &TransformOperation::Skew(ref fx, None), - &TransformOperation::Skew(ref tx, None), - ) => { - Ok(TransformOperation::Skew( - fx.animate(tx, procedure)?, - None, - )) + (&TransformOperation::Skew(ref fx, None), &TransformOperation::Skew(ref tx, None)) => { + Ok(TransformOperation::Skew(fx.animate(tx, procedure)?, None)) }, ( &TransformOperation::Skew(ref fx, ref fy), &TransformOperation::Skew(ref tx, ref ty), - ) => { - Ok(TransformOperation::Skew( - fx.animate(tx, procedure)?, - Some(fy.unwrap_or(Angle::zero()).animate(&ty.unwrap_or(Angle::zero()), procedure)?) - )) + ) => Ok(TransformOperation::Skew( + fx.animate(tx, procedure)?, + Some( + fy.unwrap_or(Angle::zero()) + .animate(&ty.unwrap_or(Angle::zero()), procedure)?, + ), + )), + (&TransformOperation::SkewX(ref f), &TransformOperation::SkewX(ref t)) => { + Ok(TransformOperation::SkewX(f.animate(t, procedure)?)) }, - ( - &TransformOperation::SkewX(ref f), - &TransformOperation::SkewX(ref t), - ) => { - Ok(TransformOperation::SkewX( - f.animate(t, procedure)?, - )) - }, - ( - &TransformOperation::SkewY(ref f), - &TransformOperation::SkewY(ref t), - ) => { - Ok(TransformOperation::SkewY( - f.animate(t, procedure)?, - )) + (&TransformOperation::SkewY(ref f), &TransformOperation::SkewY(ref t)) => { + Ok(TransformOperation::SkewY(f.animate(t, procedure)?)) }, ( &TransformOperation::Translate3D(ref fx, ref fy, ref fz), &TransformOperation::Translate3D(ref tx, ref ty, ref tz), - ) => { - Ok(TransformOperation::Translate3D( - fx.animate(tx, procedure)?, - fy.animate(ty, procedure)?, - fz.animate(tz, procedure)?, - )) - }, + ) => Ok(TransformOperation::Translate3D( + fx.animate(tx, procedure)?, + fy.animate(ty, procedure)?, + fz.animate(tz, procedure)?, + )), ( &TransformOperation::Translate(ref fx, None), &TransformOperation::Translate(ref tx, None), - ) => { - Ok(TransformOperation::Translate( - fx.animate(tx, procedure)?, - None - )) - }, + ) => Ok(TransformOperation::Translate( + fx.animate(tx, procedure)?, + None, + )), ( &TransformOperation::Translate(ref fx, ref fy), &TransformOperation::Translate(ref tx, ref ty), - ) => { - Ok(TransformOperation::Translate( - fx.animate(tx, procedure)?, - Some(fy.unwrap_or(LengthOrPercentage::zero()) - .animate(&ty.unwrap_or(LengthOrPercentage::zero()), procedure)?) - )) - }, - ( - &TransformOperation::TranslateX(ref f), - &TransformOperation::TranslateX(ref t), - ) => { - Ok(TransformOperation::TranslateX( - f.animate(t, procedure)? - )) + ) => Ok(TransformOperation::Translate( + fx.animate(tx, procedure)?, + Some( + fy.unwrap_or(LengthOrPercentage::zero()) + .animate(&ty.unwrap_or(LengthOrPercentage::zero()), procedure)?, + ), + )), + (&TransformOperation::TranslateX(ref f), &TransformOperation::TranslateX(ref t)) => { + Ok(TransformOperation::TranslateX(f.animate(t, procedure)?)) }, - ( - &TransformOperation::TranslateY(ref f), - &TransformOperation::TranslateY(ref t), - ) => { - Ok(TransformOperation::TranslateY( - f.animate(t, procedure)? - )) + (&TransformOperation::TranslateY(ref f), &TransformOperation::TranslateY(ref t)) => { + Ok(TransformOperation::TranslateY(f.animate(t, procedure)?)) }, - ( - &TransformOperation::TranslateZ(ref f), - &TransformOperation::TranslateZ(ref t), - ) => { - Ok(TransformOperation::TranslateZ( - f.animate(t, procedure)? - )) + (&TransformOperation::TranslateZ(ref f), &TransformOperation::TranslateZ(ref t)) => { + Ok(TransformOperation::TranslateZ(f.animate(t, procedure)?)) }, ( &TransformOperation::Scale3D(ref fx, ref fy, ref fz), &TransformOperation::Scale3D(ref tx, ref ty, ref tz), - ) => { - Ok(TransformOperation::Scale3D( - animate_multiplicative_factor(*fx, *tx, procedure)?, - animate_multiplicative_factor(*fy, *ty, procedure)?, - animate_multiplicative_factor(*fz, *tz, procedure)?, - )) - }, - ( - &TransformOperation::ScaleX(ref f), - &TransformOperation::ScaleX(ref t), - ) => { - Ok(TransformOperation::ScaleX( - animate_multiplicative_factor(*f, *t, procedure)? - )) - }, - ( - &TransformOperation::ScaleY(ref f), - &TransformOperation::ScaleY(ref t), - ) => { - Ok(TransformOperation::ScaleY( - animate_multiplicative_factor(*f, *t, procedure)? - )) - }, - ( - &TransformOperation::ScaleZ(ref f), - &TransformOperation::ScaleZ(ref t), - ) => { - Ok(TransformOperation::ScaleZ( - animate_multiplicative_factor(*f, *t, procedure)? - )) - }, - ( - &TransformOperation::Scale(ref f, None), - &TransformOperation::Scale(ref t, None), - ) => { + ) => Ok(TransformOperation::Scale3D( + animate_multiplicative_factor(*fx, *tx, procedure)?, + animate_multiplicative_factor(*fy, *ty, procedure)?, + animate_multiplicative_factor(*fz, *tz, procedure)?, + )), + (&TransformOperation::ScaleX(ref f), &TransformOperation::ScaleX(ref t)) => Ok( + TransformOperation::ScaleX(animate_multiplicative_factor(*f, *t, procedure)?), + ), + (&TransformOperation::ScaleY(ref f), &TransformOperation::ScaleY(ref t)) => Ok( + TransformOperation::ScaleY(animate_multiplicative_factor(*f, *t, procedure)?), + ), + (&TransformOperation::ScaleZ(ref f), &TransformOperation::ScaleZ(ref t)) => Ok( + TransformOperation::ScaleZ(animate_multiplicative_factor(*f, *t, procedure)?), + ), + (&TransformOperation::Scale(ref f, None), &TransformOperation::Scale(ref t, None)) => { Ok(TransformOperation::Scale( animate_multiplicative_factor(*f, *t, procedure)?, - None + None, )) }, ( &TransformOperation::Scale(ref fx, ref fy), &TransformOperation::Scale(ref tx, ref ty), - ) => { - Ok(TransformOperation::Scale( - animate_multiplicative_factor(*fx, *tx, procedure)?, - Some(animate_multiplicative_factor( - fy.unwrap_or(*fx), - ty.unwrap_or(*tx), - procedure - )?), - )) - }, + ) => Ok(TransformOperation::Scale( + animate_multiplicative_factor(*fx, *tx, procedure)?, + Some(animate_multiplicative_factor( + fy.unwrap_or(*fx), + ty.unwrap_or(*tx), + procedure, + )?), + )), ( &TransformOperation::Rotate3D(fx, fy, fz, fa), &TransformOperation::Rotate3D(tx, ty, tz, ta), ) => { let animated = Rotate::Rotate3D(fx, fy, fz, fa) .animate(&Rotate::Rotate3D(tx, ty, tz, ta), procedure)?; let (fx, fy, fz, fa) = ComputedRotate::resolve(&animated); Ok(TransformOperation::Rotate3D(fx, fy, fz, fa)) }, - ( - &TransformOperation::RotateX(fa), - &TransformOperation::RotateX(ta), - ) => { - Ok(TransformOperation::RotateX( - fa.animate(&ta, procedure)? - )) + (&TransformOperation::RotateX(fa), &TransformOperation::RotateX(ta)) => { + Ok(TransformOperation::RotateX(fa.animate(&ta, procedure)?)) }, - ( - &TransformOperation::RotateY(fa), - &TransformOperation::RotateY(ta), - ) => { - Ok(TransformOperation::RotateY( - fa.animate(&ta, procedure)? - )) + (&TransformOperation::RotateY(fa), &TransformOperation::RotateY(ta)) => { + Ok(TransformOperation::RotateY(fa.animate(&ta, procedure)?)) }, - ( - &TransformOperation::RotateZ(fa), - &TransformOperation::RotateZ(ta), - ) => { - Ok(TransformOperation::RotateZ( - fa.animate(&ta, procedure)? - )) + (&TransformOperation::RotateZ(fa), &TransformOperation::RotateZ(ta)) => { + Ok(TransformOperation::RotateZ(fa.animate(&ta, procedure)?)) }, - ( - &TransformOperation::Rotate(fa), - &TransformOperation::Rotate(ta), - ) => { - Ok(TransformOperation::Rotate( - fa.animate(&ta, procedure)? - )) + (&TransformOperation::Rotate(fa), &TransformOperation::Rotate(ta)) => { + Ok(TransformOperation::Rotate(fa.animate(&ta, procedure)?)) }, - ( - &TransformOperation::Rotate(fa), - &TransformOperation::RotateZ(ta), - ) => { - Ok(TransformOperation::Rotate( - fa.animate(&ta, procedure)? - )) + (&TransformOperation::Rotate(fa), &TransformOperation::RotateZ(ta)) => { + Ok(TransformOperation::Rotate(fa.animate(&ta, procedure)?)) }, - ( - &TransformOperation::RotateZ(fa), - &TransformOperation::Rotate(ta), - ) => { - Ok(TransformOperation::Rotate( - fa.animate(&ta, procedure)? - )) + (&TransformOperation::RotateZ(fa), &TransformOperation::Rotate(ta)) => { + Ok(TransformOperation::Rotate(fa.animate(&ta, procedure)?)) }, ( &TransformOperation::Perspective(ref fd), &TransformOperation::Perspective(ref td), ) => { use crate::values::computed::CSSPixelLength; use crate::values::generics::transform::create_perspective_matrix; @@ -1218,34 +1129,38 @@ impl Animate for ComputedTransformOperat // The transform functions matrix(), matrix3d() and // perspective() get converted into 4x4 matrices first and // interpolated as defined in section Interpolation of // Matrices afterwards. // let from = create_perspective_matrix(fd.px()); let to = create_perspective_matrix(td.px()); - let interpolated = - Matrix3D::from(from).animate(&Matrix3D::from(to), procedure)?; + let interpolated = Matrix3D::from(from).animate(&Matrix3D::from(to), procedure)?; let decomposed = decompose_3d_matrix(interpolated)?; let perspective_z = decomposed.perspective.2; - let used_value = - if perspective_z == 0. { 0. } else { -1. / perspective_z }; - Ok(TransformOperation::Perspective(CSSPixelLength::new(used_value))) + let used_value = if perspective_z == 0. { + 0. + } else { + -1. / perspective_z + }; + Ok(TransformOperation::Perspective(CSSPixelLength::new( + used_value, + ))) }, - _ if self.is_translate() && other.is_translate() => { - self.to_translate_3d().animate(&other.to_translate_3d(), procedure) - }, + _ if self.is_translate() && other.is_translate() => self + .to_translate_3d() + .animate(&other.to_translate_3d(), procedure), _ if self.is_scale() && other.is_scale() => { self.to_scale_3d().animate(&other.to_scale_3d(), procedure) }, - _ if self.is_rotate() && other.is_rotate() => { - self.to_rotate_3d().animate(&other.to_rotate_3d(), procedure) - }, + _ if self.is_rotate() && other.is_rotate() => self + .to_rotate_3d() + .animate(&other.to_rotate_3d(), procedure), _ => Err(()), } } } // This might not be the most useful definition of distance. It might be better, for example, // to trace the distance travelled by a point as its transform is interpolated between the two // lists. That, however, proves to be quite complicated so we take a simple approach for now. @@ -1253,139 +1168,94 @@ impl Animate for ComputedTransformOperat impl ComputeSquaredDistance for ComputedTransformOperation { fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> { // For translate, We don't want to require doing layout in order to calculate the result, so // drop the percentage part. However, dropping percentage makes us impossible to // compute the distance for the percentage-percentage case, but Gecko uses the // same formula, so it's fine for now. // Note: We use pixel value to compute the distance for translate, so we have to // convert Au into px. - let extract_pixel_length = |lop: &LengthOrPercentage| { - match *lop { - LengthOrPercentage::Length(px) => px.px(), - LengthOrPercentage::Percentage(_) => 0., - LengthOrPercentage::Calc(calc) => calc.length().px(), - } + let extract_pixel_length = |lop: &LengthOrPercentage| match *lop { + LengthOrPercentage::Length(px) => px.px(), + LengthOrPercentage::Percentage(_) => 0., + LengthOrPercentage::Calc(calc) => calc.length().px(), }; match (self, other) { - ( - &TransformOperation::Matrix3D(ref this), - &TransformOperation::Matrix3D(ref other), - ) => { + (&TransformOperation::Matrix3D(ref this), &TransformOperation::Matrix3D(ref other)) => { this.compute_squared_distance(other) }, - ( - &TransformOperation::Matrix(ref this), - &TransformOperation::Matrix(ref other), - ) => { + (&TransformOperation::Matrix(ref this), &TransformOperation::Matrix(ref other)) => { let this: Matrix3D = (*this).into(); let other: Matrix3D = (*other).into(); this.compute_squared_distance(&other) }, ( &TransformOperation::Skew(ref fx, ref fy), &TransformOperation::Skew(ref tx, ref ty), - ) => { - Ok( - fx.compute_squared_distance(&tx)? + - fy.compute_squared_distance(&ty)?, - ) - }, - ( - &TransformOperation::SkewX(ref f), - &TransformOperation::SkewX(ref t), - ) | ( - &TransformOperation::SkewY(ref f), - &TransformOperation::SkewY(ref t), - ) => { + ) => Ok(fx.compute_squared_distance(&tx)? + fy.compute_squared_distance(&ty)?), + (&TransformOperation::SkewX(ref f), &TransformOperation::SkewX(ref t)) | + (&TransformOperation::SkewY(ref f), &TransformOperation::SkewY(ref t)) => { f.compute_squared_distance(&t) }, ( &TransformOperation::Translate3D(ref fx, ref fy, ref fz), &TransformOperation::Translate3D(ref tx, ref ty, ref tz), ) => { let fx = extract_pixel_length(&fx); let fy = extract_pixel_length(&fy); let tx = extract_pixel_length(&tx); let ty = extract_pixel_length(&ty); - Ok( - fx.compute_squared_distance(&tx)? + + Ok(fx.compute_squared_distance(&tx)? + fy.compute_squared_distance(&ty)? + - fz.compute_squared_distance(&tz)?, - ) + fz.compute_squared_distance(&tz)?) }, ( &TransformOperation::Scale3D(ref fx, ref fy, ref fz), &TransformOperation::Scale3D(ref tx, ref ty, ref tz), - ) => { - Ok( - fx.compute_squared_distance(&tx)? + - fy.compute_squared_distance(&ty)? + - fz.compute_squared_distance(&tz)?, - ) - }, + ) => Ok(fx.compute_squared_distance(&tx)? + + fy.compute_squared_distance(&ty)? + + fz.compute_squared_distance(&tz)?), ( &TransformOperation::Rotate3D(fx, fy, fz, fa), &TransformOperation::Rotate3D(tx, ty, tz, ta), - ) => { - Rotate::Rotate3D(fx, fy, fz, fa) - .compute_squared_distance(&Rotate::Rotate3D(tx, ty, tz, ta)) - }, - ( - &TransformOperation::RotateX(fa), - &TransformOperation::RotateX(ta), - ) | - ( - &TransformOperation::RotateY(fa), - &TransformOperation::RotateY(ta), - ) | - ( - &TransformOperation::RotateZ(fa), - &TransformOperation::RotateZ(ta), - ) | - ( - &TransformOperation::Rotate(fa), - &TransformOperation::Rotate(ta), - ) => { + ) => Rotate::Rotate3D(fx, fy, fz, fa) + .compute_squared_distance(&Rotate::Rotate3D(tx, ty, tz, ta)), + (&TransformOperation::RotateX(fa), &TransformOperation::RotateX(ta)) | + (&TransformOperation::RotateY(fa), &TransformOperation::RotateY(ta)) | + (&TransformOperation::RotateZ(fa), &TransformOperation::RotateZ(ta)) | + (&TransformOperation::Rotate(fa), &TransformOperation::Rotate(ta)) => { fa.compute_squared_distance(&ta) }, ( &TransformOperation::Perspective(ref fd), &TransformOperation::Perspective(ref td), - ) => { - fd.compute_squared_distance(td) - }, - ( - &TransformOperation::Perspective(ref p), - &TransformOperation::Matrix3D(ref m), - ) | ( - &TransformOperation::Matrix3D(ref m), - &TransformOperation::Perspective(ref p), - ) => { + ) => fd.compute_squared_distance(td), + (&TransformOperation::Perspective(ref p), &TransformOperation::Matrix3D(ref m)) | + (&TransformOperation::Matrix3D(ref m), &TransformOperation::Perspective(ref p)) => { // FIXME(emilio): Is this right? Why interpolating this with // Perspective but not with anything else? let mut p_matrix = Matrix3D::identity(); if p.px() > 0. { p_matrix.m34 = -1. / p.px(); } p_matrix.compute_squared_distance(&m) }, // Gecko cross-interpolates amongst all translate and all scale // functions (See ToPrimitive in layout/style/StyleAnimationValue.cpp) // without falling back to InterpolateMatrix - _ if self.is_translate() && other.is_translate() => { - self.to_translate_3d().compute_squared_distance(&other.to_translate_3d()) - }, - _ if self.is_scale() && other.is_scale() => { - self.to_scale_3d().compute_squared_distance(&other.to_scale_3d()) - }, - _ if self.is_rotate() && other.is_rotate() => { - self.to_rotate_3d().compute_squared_distance(&other.to_rotate_3d()) - }, + _ if self.is_translate() && other.is_translate() => self + .to_translate_3d() + .compute_squared_distance(&other.to_translate_3d()), + _ if self.is_scale() && other.is_scale() => self + .to_scale_3d() + .compute_squared_distance(&other.to_scale_3d()), + _ if self.is_rotate() && other.is_rotate() => self + .to_rotate_3d() + .compute_squared_distance(&other.to_rotate_3d()), _ => Err(()), } } } // ------------------------------------ // Individual transforms. // ------------------------------------ @@ -1401,30 +1271,36 @@ impl ComputedRotate { Rotate::Rotate3D(rx, ry, rz, angle) => (rx, ry, rz, angle), Rotate::Rotate(angle) => (0., 0., 1., angle), } } } impl Animate for ComputedRotate { #[inline] - fn animate( - &self, - other: &Self, - procedure: Procedure, - ) -> Result<Self, ()> { + fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { match (self, other) { (&Rotate::None, &Rotate::None) => Ok(Rotate::None), (&Rotate::Rotate3D(fx, fy, fz, fa), &Rotate::None) => { // No need to normalize `none`, so animate angle directly. - Ok(Rotate::Rotate3D(fx, fy, fz, fa.animate(&Angle::zero(), procedure)?)) + Ok(Rotate::Rotate3D( + fx, + fy, + fz, + fa.animate(&Angle::zero(), procedure)?, + )) }, (&Rotate::None, &Rotate::Rotate3D(tx, ty, tz, ta)) => { // No need to normalize `none`, so animate angle directly. - Ok(Rotate::Rotate3D(tx, ty, tz, Angle::zero().animate(&ta, procedure)?)) + Ok(Rotate::Rotate3D( + tx, + ty, + tz, + Angle::zero().animate(&ta, procedure)?, + )) }, (&Rotate::Rotate3D(_, ..), _) | (_, &Rotate::Rotate3D(_, ..)) => { let (from, to) = (self.resolve(), other.resolve()); let (mut fx, mut fy, mut fz, fa) = transform::get_normalized_vector_and_angle(from.0, from.1, from.2, from.3); let (mut tx, mut ty, mut tz, ta) = transform::get_normalized_vector_and_angle(to.0, to.1, to.2, to.3); @@ -1497,73 +1373,74 @@ impl ComputeSquaredDistance for Computed } else { let v1 = DirectionVector::new(fx, fy, fz); let v2 = DirectionVector::new(tx, ty, tz); let q1 = Quaternion::from_direction_and_angle(&v1, angle1.radians64()); let q2 = Quaternion::from_direction_and_angle(&v2, angle2.radians64()); q1.compute_squared_distance(&q2) } }, - (&Rotate::Rotate(_), _) | (_, &Rotate::Rotate(_)) => { - self.resolve().3.compute_squared_distance(&other.resolve().3) - }, + (&Rotate::Rotate(_), _) | (_, &Rotate::Rotate(_)) => self + .resolve() + .3 + .compute_squared_distance(&other.resolve().3), } } } /// <https://drafts.csswg.org/css-transforms-2/#propdef-translate> impl ComputedTranslate { fn resolve(&self) -> (LengthOrPercentage, LengthOrPercentage, Length) { // According to the spec: // https://drafts.csswg.org/css-transforms-2/#individual-transforms // // Unspecified translations default to 0px match *self { - Translate::None => { - (LengthOrPercentage::zero(), LengthOrPercentage::zero(), Length::zero()) - }, + Translate::None => ( + LengthOrPercentage::zero(), + LengthOrPercentage::zero(), + Length::zero(), + ), Translate::Translate3D(tx, ty, tz) => (tx, ty, tz), Translate::Translate(tx, ty) => (tx, ty, Length::zero()), } } } impl Animate for ComputedTranslate { #[inline] - fn animate( - &self, - other: &Self, - procedure: Procedure, - ) -> Result<Self, ()> { + fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { match (self, other) { (&Translate::None, &Translate::None) => Ok(Translate::None), (&Translate::Translate3D(_, ..), _) | (_, &Translate::Translate3D(_, ..)) => { let (from, to) = (self.resolve(), other.resolve()); - Ok(Translate::Translate3D(from.0.animate(&to.0, procedure)?, - from.1.animate(&to.1, procedure)?, - from.2.animate(&to.2, procedure)?)) + Ok(Translate::Translate3D( + from.0.animate(&to.0, procedure)?, + from.1.animate(&to.1, procedure)?, + from.2.animate(&to.2, procedure)?, + )) }, (&Translate::Translate(_, ..), _) | (_, &Translate::Translate(_, ..)) => { let (from, to) = (self.resolve(), other.resolve()); - Ok(Translate::Translate(from.0.animate(&to.0, procedure)?, - from.1.animate(&to.1, procedure)?)) + Ok(Translate::Translate( + from.0.animate(&to.0, procedure)?, + from.1.animate(&to.1, procedure)?, + )) }, } } } impl ComputeSquaredDistance for ComputedTranslate { #[inline] fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> { let (from, to) = (self.resolve(), other.resolve()); - Ok( - from.0.compute_squared_distance(&to.0)? + + Ok(from.0.compute_squared_distance(&to.0)? + from.1.compute_squared_distance(&to.1)? + - from.2.compute_squared_distance(&to.2)? - ) + from.2.compute_squared_distance(&to.2)?) } } /// <https://drafts.csswg.org/css-transforms-2/#propdef-scale> impl ComputedScale { fn resolve(&self) -> (Number, Number, Number) { // According to the spec: // https://drafts.csswg.org/css-transforms-2/#individual-transforms @@ -1574,21 +1451,17 @@ impl ComputedScale { Scale::Scale3D(sx, sy, sz) => (sx, sy, sz), Scale::Scale(sx, sy) => (sx, sy, 1.), } } } impl Animate for ComputedScale { #[inline] - fn animate( - &self, - other: &Self, - procedure: Procedure, - ) -> Result<Self, ()> { + fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { match (self, other) { (&Scale::None, &Scale::None) => Ok(Scale::None), (&Scale::Scale3D(_, ..), _) | (_, &Scale::Scale3D(_, ..)) => { let (from, to) = (self.resolve(), other.resolve()); // For transform lists, we add by appending to the list of // transform functions. However, ComputedScale cannot be // simply concatenated, so we have to calculate the additive // result here. @@ -1617,15 +1490,13 @@ impl Animate for ComputedScale { } } } impl ComputeSquaredDistance for ComputedScale { #[inline] fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> { let (from, to) = (self.resolve(), other.resolve()); - Ok( - from.0.compute_squared_distance(&to.0)? + + Ok(from.0.compute_squared_distance(&to.0)? + from.1.compute_squared_distance(&to.1)? + - from.2.compute_squared_distance(&to.2)? - ) + from.2.compute_squared_distance(&to.2)?) } }
--- a/servo/components/style/values/computed/align.rs +++ b/servo/components/style/values/computed/align.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Values for CSS Box Alignment properties //! //! https://drafts.csswg.org/css-align/ use crate::values::computed::{Context, ToComputedValue}; use crate::values::specified;
--- a/servo/components/style/values/computed/angle.rs +++ b/servo/components/style/values/computed/angle.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed angles. use crate::values::distance::{ComputeSquaredDistance, SquaredDistance}; use crate::values::CSSFloat; use num_traits::Zero; use std::f64::consts::PI; use std::fmt::{self, Write};
--- a/servo/components/style/values/computed/background.rs +++ b/servo/components/style/values/computed/background.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for CSS values related to backgrounds. use crate::values::computed::length::NonNegativeLengthOrPercentageOrAuto; use crate::values::generics::background::BackgroundSize as GenericBackgroundSize; pub use crate::values::specified::background::BackgroundRepeat;
--- a/servo/components/style/values/computed/basic_shape.rs +++ b/servo/components/style/values/computed/basic_shape.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS handling for the computed value of //! [`basic-shape`][basic-shape]s //! //! [basic-shape]: https://drafts.csswg.org/css-shapes/#typedef-basic-shape use crate::values::computed::url::ComputedUrl; use crate::values::computed::{Image, LengthOrPercentage};
--- a/servo/components/style/values/computed/border.rs +++ b/servo/components/style/values/computed/border.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for CSS values related to borders. use app_units::Au; use crate::values::animated::ToAnimatedZero; use crate::values::computed::length::{LengthOrPercentage, NonNegativeLength}; use crate::values::computed::{Number, NumberOrPercentage}; use crate::values::generics::border::BorderCornerRadius as GenericBorderCornerRadius;
--- a/servo/components/style/values/computed/box.rs +++ b/servo/components/style/values/computed/box.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for box properties. use crate::values::computed::length::{LengthOrPercentage, NonNegativeLength}; use crate::values::computed::{Context, Number, ToComputedValue}; use crate::values::generics::box_::AnimationIterationCount as GenericAnimationIterationCount; use crate::values::generics::box_::Perspective as GenericPerspective; use crate::values::generics::box_::VerticalAlign as GenericVerticalAlign;
--- a/servo/components/style/values/computed/color.rs +++ b/servo/components/style/values/computed/color.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed color values. use crate::values::animated::color::RGBA as AnimatedRGBA; use crate::values::animated::ToAnimatedValue; use crate::values::generics::color::Color as GenericColor; use cssparser::{Color as CSSParserColor, RGBA}; use std::fmt;
--- a/servo/components/style/values/computed/column.rs +++ b/servo/components/style/values/computed/column.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for the column properties. use crate::values::computed::PositiveInteger; use crate::values::generics::column::ColumnCount as GenericColumnCount; /// A computed type for `column-count` values. pub type ColumnCount = GenericColumnCount<PositiveInteger>;
--- a/servo/components/style/values/computed/counters.rs +++ b/servo/components/style/values/computed/counters.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed values for counter properties use crate::values::computed::url::ComputedImageUrl; use crate::values::generics::counters as generics; use crate::values::generics::counters::CounterIncrement as GenericCounterIncrement; use crate::values::generics::counters::CounterReset as GenericCounterReset;
--- a/servo/components/style/values/computed/easing.rs +++ b/servo/components/style/values/computed/easing.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for CSS Easing functions. use crate::values::computed::{Integer, Number}; use crate::values::generics::easing; /// A computed timing function. pub type ComputedTimingFunction = easing::TimingFunction<Integer, Number>;
--- a/servo/components/style/values/computed/effects.rs +++ b/servo/components/style/values/computed/effects.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for CSS values related to effects. use crate::values::computed::color::Color; use crate::values::computed::length::{Length, NonNegativeLength}; #[cfg(feature = "gecko")] use crate::values::computed::url::ComputedUrl; use crate::values::computed::{Angle, NonNegativeNumber};
--- a/servo/components/style/values/computed/flex.rs +++ b/servo/components/style/values/computed/flex.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for CSS values related to flexbox. use crate::values::generics::flex::FlexBasis as GenericFlexBasis; /// The `width` value type. #[cfg(feature = "servo")] pub type Width = crate::values::computed::NonNegativeLengthOrPercentageOrAuto;
--- a/servo/components/style/values/computed/font.rs +++ b/servo/components/style/values/computed/font.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed values for font properties use app_units::Au; use byteorder::{BigEndian, ByteOrder}; #[cfg(feature = "gecko")] use crate::gecko_bindings::sugar::refptr::RefPtr; #[cfg(feature = "gecko")]
--- a/servo/components/style/values/computed/gecko.rs +++ b/servo/components/style/values/computed/gecko.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for legacy Gecko-only properties. use crate::values::computed::length::LengthOrPercentage; use crate::values::generics::gecko::ScrollSnapPoint as GenericScrollSnapPoint; /// A computed type for scroll snap points. pub type ScrollSnapPoint = GenericScrollSnapPoint<LengthOrPercentage>;
--- a/servo/components/style/values/computed/image.rs +++ b/servo/components/style/values/computed/image.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS handling for the computed value of //! [`image`][image]s //! //! [image]: https://drafts.csswg.org/css-images/#image-values use crate::values::computed::position::Position; use crate::values::computed::url::ComputedImageUrl;
--- a/servo/components/style/values/computed/length.rs +++ b/servo/components/style/values/computed/length.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! `<length>` computed values, and related ones. use super::{Context, Number, Percentage, ToComputedValue}; use app_units::Au; use crate::values::animated::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero}; use crate::values::distance::{ComputeSquaredDistance, SquaredDistance}; use crate::values::generics::length::MaxLength as GenericMaxLength;
--- a/servo/components/style/values/computed/list.rs +++ b/servo/components/style/values/computed/list.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! `list` computed values. #[cfg(feature = "gecko")] pub use crate::values::specified::list::ListStyleType; pub use crate::values::specified::list::{QuotePair, Quotes}; use servo_arc::Arc;
--- a/servo/components/style/values/computed/mod.rs +++ b/servo/components/style/values/computed/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed values. use self::transform::DirectionVector; use super::animated::ToAnimatedValue; use super::generics::grid::GridTemplateComponent as GenericGridTemplateComponent; use super::generics::grid::{GridLine as GenericGridLine, TrackBreadth as GenericTrackBreadth}; use super::generics::grid::{TrackList as GenericTrackList, TrackSize as GenericTrackSize};
--- a/servo/components/style/values/computed/motion.rs +++ b/servo/components/style/values/computed/motion.rs @@ -1,10 +1,10 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for CSS values that are related to motion path. /// A computed offset-path. The computed value is as specified value. /// /// https://drafts.fxtf.org/motion-1/#offset-path-property pub use crate::values::specified::motion::OffsetPath;
--- a/servo/components/style/values/computed/outline.rs +++ b/servo/components/style/values/computed/outline.rs @@ -1,7 +1,7 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed values for outline properties pub use crate::values::specified::OutlineStyle;
--- a/servo/components/style/values/computed/percentage.rs +++ b/servo/components/style/values/computed/percentage.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed percentages. use crate::values::animated::ToAnimatedValue; use crate::values::generics::NonNegative; use crate::values::{serialize_percentage, CSSFloat}; use std::fmt; use style_traits::{CssWriter, ToCss};
--- a/servo/components/style/values/computed/position.rs +++ b/servo/components/style/values/computed/position.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS handling for the computed value of //! [`position`][position] values. //! //! [position]: https://drafts.csswg.org/css-backgrounds-3/#position use crate::values::computed::{Integer, LengthOrPercentage, Percentage}; use crate::values::generics::position::Position as GenericPosition;
--- a/servo/components/style/values/computed/rect.rs +++ b/servo/components/style/values/computed/rect.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for CSS borders. use crate::values::computed::length::LengthOrNumber; use crate::values::generics::rect::Rect; /// A specified rectangle made of four `<length-or-number>` values. pub type LengthOrNumberRect = Rect<LengthOrNumber>;
--- a/servo/components/style/values/computed/resolution.rs +++ b/servo/components/style/values/computed/resolution.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Resolution values: //! //! https://drafts.csswg.org/css-values/#resolution use crate::values::computed::{Context, ToComputedValue}; use crate::values::specified; use crate::values::CSSFloat;
--- a/servo/components/style/values/computed/svg.rs +++ b/servo/components/style/values/computed/svg.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for SVG properties. use crate::values::computed::color::Color; use crate::values::computed::url::ComputedUrl; use crate::values::computed::{LengthOrPercentage, NonNegativeLengthOrPercentage}; use crate::values::computed::{NonNegativeNumber, Number, Opacity}; use crate::values::generics::svg as generic;
--- a/servo/components/style/values/computed/table.rs +++ b/servo/components/style/values/computed/table.rs @@ -1,7 +1,7 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for table properties. pub use crate::values::specified::table::XSpan;
--- a/servo/components/style/values/computed/text.rs +++ b/servo/components/style/values/computed/text.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for text properties. #[cfg(feature = "servo")] use crate::properties::StyleBuilder; use crate::values::computed::length::{Length, LengthOrPercentage}; use crate::values::computed::{NonNegativeLength, NonNegativeNumber}; use crate::values::generics::text::InitialLetter as GenericInitialLetter;
--- a/servo/components/style/values/computed/time.rs +++ b/servo/components/style/values/computed/time.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed time values. use crate::values::CSSFloat; use std::fmt::{self, Write}; use style_traits::{CssWriter, ToCss}; /// A computed `<time>` value.
--- a/servo/components/style/values/computed/transform.rs +++ b/servo/components/style/values/computed/transform.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed types for CSS values that are related to transformations. use super::CSSFloat; use crate::values::animated::transform::{Perspective, Scale3D, Translate3D}; use crate::values::animated::ToAnimatedZero; use crate::values::computed::{Angle, Integer, Length, LengthOrPercentage, Number, Percentage}; use crate::values::generics::transform as generic;
--- a/servo/components/style/values/computed/ui.rs +++ b/servo/components/style/values/computed/ui.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed values for UI properties use crate::values::computed::color::Color; use crate::values::computed::url::ComputedImageUrl; use crate::values::computed::Number; use crate::values::generics::ui as generics; use crate::values::{Auto, Either};
--- a/servo/components/style/values/computed/url.rs +++ b/servo/components/style/values/computed/url.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Common handling for the computed value CSS url() values. use crate::values::generics::url::UrlOrNone as GenericUrlOrNone; #[cfg(feature = "gecko")] pub use crate::gecko::url::{ComputedImageUrl, ComputedUrl}; #[cfg(feature = "servo")]
--- a/servo/components/style/values/distance.rs +++ b/servo/components/style/values/distance.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Machinery to compute distances between animatable values. use app_units::Au; use euclid::Size2D; use std::iter::Sum; use std::ops::Add;
--- a/servo/components/style/values/generics/background.rs +++ b/servo/components/style/values/generics/background.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS values related to backgrounds. use crate::values::IsAuto; use std::fmt::{self, Write}; use style_traits::{CssWriter, ToCss}; /// A generic value for the `background-size` property.
--- a/servo/components/style/values/generics/basic_shape.rs +++ b/servo/components/style/values/generics/basic_shape.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS handling for the [`basic-shape`](https://drafts.csswg.org/css-shapes/#typedef-basic-shape) //! types that are generic over their `ToCss` implementations. use crate::values::animated::{Animate, Procedure, ToAnimatedZero}; use crate::values::distance::{ComputeSquaredDistance, SquaredDistance}; use crate::values::generics::border::BorderRadius; use crate::values::generics::position::Position;
--- a/servo/components/style/values/generics/border.rs +++ b/servo/components/style/values/generics/border.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS values related to borders. use crate::values::generics::rect::Rect; use crate::values::generics::size::Size; use std::fmt::{self, Write}; use style_traits::{CssWriter, ToCss};
--- a/servo/components/style/values/generics/box.rs +++ b/servo/components/style/values/generics/box.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for box properties. use crate::values::animated::ToAnimatedZero; /// A generic value for the `vertical-align` property. #[derive( Animate,
--- a/servo/components/style/values/generics/color.rs +++ b/servo/components/style/values/generics/color.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for color properties. /// Ratios representing the contribution of color and currentcolor to /// the final color value. #[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToAnimatedValue)] pub struct ComplexColorRatios { /// Numeric color contribution.
--- a/servo/components/style/values/generics/column.rs +++ b/servo/components/style/values/generics/column.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for the column properties. /// A generic type for `column-count` values. #[derive( Animate, Clone, ComputeSquaredDistance,
--- a/servo/components/style/values/generics/counters.rs +++ b/servo/components/style/values/generics/counters.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for counters-related CSS values. #[cfg(feature = "servo")] use crate::computed_values::list_style_type::T as ListStyleType; #[cfg(feature = "gecko")] use crate::values::generics::CounterStyleOrNone; #[cfg(feature = "gecko")]
--- a/servo/components/style/values/generics/easing.rs +++ b/servo/components/style/values/generics/easing.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS Easing Functions. //! https://drafts.csswg.org/css-easing/#timing-functions use crate::parser::ParserContext; use crate::values::CSSFloat; /// A generic easing function.
--- a/servo/components/style/values/generics/effects.rs +++ b/servo/components/style/values/generics/effects.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS values related to effects. /// A generic value for a single `box-shadow`. #[derive( Animate, Clone, ComputeSquaredDistance,
--- a/servo/components/style/values/generics/flex.rs +++ b/servo/components/style/values/generics/flex.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS values related to flexbox. /// A generic value for the `flex-basis` property. #[cfg_attr(feature = "servo", derive(MallocSizeOf))] #[derive( Animate, Clone,
--- a/servo/components/style/values/generics/font.rs +++ b/servo/components/style/values/generics/font.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for font stuff. use app_units::Au; use byteorder::{BigEndian, ReadBytesExt}; use crate::parser::{Parse, ParserContext}; use cssparser::Parser; use num_traits::One;
--- a/servo/components/style/values/generics/gecko.rs +++ b/servo/components/style/values/generics/gecko.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for legacy Gecko-only properties that should probably be //! unshipped at some point in the future. /// A generic value for scroll snap points. #[cfg_attr(feature = "gecko", derive(MallocSizeOf))] #[derive(Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)] pub enum ScrollSnapPoint<LengthOrPercentage> {
--- a/servo/components/style/values/generics/grid.rs +++ b/servo/components/style/values/generics/grid.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for the handling of //! [grids](https://drafts.csswg.org/css-grid/). use crate::parser::{Parse, ParserContext}; use crate::values::computed::{Context, ToComputedValue}; use crate::values::specified; use crate::values::specified::grid::parse_line_names;
--- a/servo/components/style/values/generics/image.rs +++ b/servo/components/style/values/generics/image.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for the handling of [images]. //! //! [images]: https://drafts.csswg.org/css-images/#image-values use crate::custom_properties; use crate::values::serialize_atom_identifier; use crate::Atom;
--- a/servo/components/style/values/generics/length.rs +++ b/servo/components/style/values/generics/length.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS values related to length. use crate::values::computed::ExtremumLength; /// A generic value for the `width`, `height`, `min-width`, or `min-height` property. /// /// Unlike `max-width` or `max-height` properties, a MozLength can be `auto`,
--- a/servo/components/style/values/generics/mod.rs +++ b/servo/components/style/values/generics/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types that share their serialization implementations //! for both specified and computed values. use super::CustomIdent; use crate::counter_style::{parse_counter_style_name, Symbols}; use crate::parser::{Parse, ParserContext}; use cssparser::Parser;
--- a/servo/components/style/values/generics/position.rs +++ b/servo/components/style/values/generics/position.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS handling of specified and computed values of //! [`position`](https://drafts.csswg.org/css-backgrounds-3/#position) /// A generic type for representing a CSS [position](https://drafts.csswg.org/css-values/#position). #[derive( Animate, Clone,
--- a/servo/components/style/values/generics/rect.rs +++ b/servo/components/style/values/generics/rect.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS values that are composed of four sides. use crate::parser::{Parse, ParserContext}; use cssparser::Parser; use std::fmt::{self, Write}; use style_traits::{CssWriter, ParseError, ToCss};
--- a/servo/components/style/values/generics/size.rs +++ b/servo/components/style/values/generics/size.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic type for CSS properties that are composed by two dimensions. use crate::parser::ParserContext; use crate::values::animated::ToAnimatedValue; use cssparser::Parser; use euclid::Size2D; use std::fmt::{self, Write};
--- a/servo/components/style/values/generics/svg.rs +++ b/servo/components/style/values/generics/svg.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS values in SVG use crate::parser::{Parse, ParserContext}; use crate::values::{Either, None_}; use cssparser::Parser; use style_traits::{ParseError, StyleParseErrorKind};
--- a/servo/components/style/values/generics/text.rs +++ b/servo/components/style/values/generics/text.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for text properties. use app_units::Au; use crate::parser::ParserContext; use crate::values::animated::{Animate, Procedure, ToAnimatedZero}; use crate::values::distance::{ComputeSquaredDistance, SquaredDistance}; use cssparser::Parser;
--- a/servo/components/style/values/generics/transform.rs +++ b/servo/components/style/values/generics/transform.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for CSS values that are related to transformations. use app_units::Au; use crate::values::computed::length::Length as ComputedLength; use crate::values::computed::length::LengthOrPercentage as ComputedLengthOrPercentage; use crate::values::specified::angle::Angle as SpecifiedAngle; use crate::values::specified::length::Length as SpecifiedLength; @@ -524,24 +524,17 @@ pub fn get_normalized_vector_and_angle<T (0., 0., 1., T::zero()) } else { let vector = vector.robust_normalize(); (vector.x, vector.y, vector.z, angle) } } #[derive( - Clone, - Copy, - Debug, - MallocSizeOf, - PartialEq, - SpecifiedValueInfo, - ToAnimatedZero, - ToComputedValue, + Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, )] /// A value of the `Rotate` property /// /// <https://drafts.csswg.org/css-transforms-2/#individual-transforms> pub enum Rotate<Number, Angle> { /// 'none' None, /// '<angle>' @@ -593,24 +586,17 @@ where dest.write_char(' ')?; angle.to_css(dest) }, } } } #[derive( - Clone, - Copy, - Debug, - MallocSizeOf, - PartialEq, - SpecifiedValueInfo, - ToAnimatedZero, - ToComputedValue, + Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, )] /// A value of the `Scale` property /// /// <https://drafts.csswg.org/css-transforms-2/#individual-transforms> pub enum Scale<Number> { /// 'none' None, /// '<number>{1,2}' @@ -641,23 +627,17 @@ impl<Number: ToCss + PartialEq> ToCss fo dest.write_char(' ')?; z.to_css(dest) }, } } } #[derive( - Clone, - Debug, - MallocSizeOf, - PartialEq, - SpecifiedValueInfo, - ToAnimatedZero, - ToComputedValue, + Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, )] /// A value of the `Translate` property /// /// <https://drafts.csswg.org/css-transforms-2/#individual-transforms> pub enum Translate<LengthOrPercentage, Length> { /// 'none' None, /// '<length-percentage>' or '<length-percentage> <length-percentage>'
--- a/servo/components/style/values/generics/ui.rs +++ b/servo/components/style/values/generics/ui.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic values for UI properties. use std::fmt::{self, Write}; use style_traits::cursor::CursorKind; use style_traits::{CssWriter, ToCss}; /// A generic value for the `cursor` property.
--- a/servo/components/style/values/generics/url.rs +++ b/servo/components/style/values/generics/url.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Generic types for url properties. use crate::parser::{Parse, ParserContext}; use cssparser::Parser; use style_traits::ParseError; /// An image url or none, used for example in list-style-image
--- a/servo/components/style/values/mod.rs +++ b/servo/components/style/values/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Common [values][values] used in CSS. //! //! [values]: https://drafts.csswg.org/css-values/ #![deny(missing_docs)] use crate::parser::{Parse, ParserContext};
--- a/servo/components/style/values/specified/align.rs +++ b/servo/components/style/values/specified/align.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Values for CSS Box Alignment properties //! //! https://drafts.csswg.org/css-align/ use crate::gecko_bindings::structs; use crate::parser::{Parse, ParserContext}; use cssparser::Parser;
--- a/servo/components/style/values/specified/angle.rs +++ b/servo/components/style/values/specified/angle.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified angles. use crate::parser::{Parse, ParserContext}; use crate::values::computed::angle::Angle as ComputedAngle; use crate::values::computed::{Context, ToComputedValue}; use crate::values::specified::calc::CalcNode; use crate::values::CSSFloat;
--- a/servo/components/style/values/specified/background.rs +++ b/servo/components/style/values/specified/background.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS values related to backgrounds. use crate::parser::{Parse, ParserContext}; use crate::values::generics::background::BackgroundSize as GenericBackgroundSize; use crate::values::specified::length::NonNegativeLengthOrPercentageOrAuto; use cssparser::Parser; use selectors::parser::SelectorParseErrorKind;
--- a/servo/components/style/values/specified/basic_shape.rs +++ b/servo/components/style/values/specified/basic_shape.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS handling for the specified value of //! [`basic-shape`][basic-shape]s //! //! [basic-shape]: https://drafts.csswg.org/css-shapes/#typedef-basic-shape use crate::parser::{Parse, ParserContext}; use crate::values::generics::basic_shape as generic;
--- a/servo/components/style/values/specified/border.rs +++ b/servo/components/style/values/specified/border.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS values related to borders. use crate::parser::{Parse, ParserContext}; use crate::values::computed::{self, Context, ToComputedValue}; use crate::values::generics::border::BorderCornerRadius as GenericBorderCornerRadius; use crate::values::generics::border::BorderImageSideWidth as GenericBorderImageSideWidth; use crate::values::generics::border::BorderImageSlice as GenericBorderImageSlice;
--- a/servo/components/style/values/specified/box.rs +++ b/servo/components/style/values/specified/box.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for box properties. use crate::custom_properties::Name as CustomPropertyName; use crate::parser::{Parse, ParserContext}; use crate::properties::{LonghandId, PropertyDeclarationId, PropertyFlags}; use crate::properties::{PropertyId, ShorthandId}; use crate::values::generics::box_::AnimationIterationCount as GenericAnimationIterationCount; @@ -1294,51 +1294,49 @@ pub enum BreakBetween { Right, } impl BreakBetween { /// Parse a legacy break-between value for `page-break-*`. /// /// See https://drafts.csswg.org/css-break/#page-break-properties. #[inline] - pub fn parse_legacy<'i>( - input: &mut Parser<'i, '_>, - ) -> Result<Self, ParseError<'i>> { + pub fn parse_legacy<'i>(input: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>> { let location = input.current_source_location(); let ident = input.expect_ident()?; let break_value = match BreakBetween::from_ident(ident) { Ok(v) => v, - Err(()) => return Err(location.new_custom_error( - SelectorParseErrorKind::UnexpectedIdent(ident.clone()) - )), + Err(()) => { + return Err(location + .new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone()))) + }, }; match break_value { BreakBetween::Always => Ok(BreakBetween::Page), - BreakBetween::Auto | - BreakBetween::Avoid | - BreakBetween::Left | - BreakBetween::Right => Ok(break_value), + BreakBetween::Auto | BreakBetween::Avoid | BreakBetween::Left | BreakBetween::Right => { + Ok(break_value) + }, BreakBetween::Page => { - Err(location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone()))) - } + Err(location + .new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone()))) + }, } } /// Serialize a legacy break-between value for `page-break-*`. /// /// See https://drafts.csswg.org/css-break/#page-break-properties. pub fn to_css_legacy<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write, { match *self { - BreakBetween::Auto | - BreakBetween::Avoid | - BreakBetween::Left | - BreakBetween::Right => self.to_css(dest), + BreakBetween::Auto | BreakBetween::Avoid | BreakBetween::Left | BreakBetween::Right => { + self.to_css(dest) + }, BreakBetween::Page => dest.write_str("always"), BreakBetween::Always => Ok(()), } } } /// A kind of break within a box. ///
--- a/servo/components/style/values/specified/calc.rs +++ b/servo/components/style/values/specified/calc.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! [Calc expressions][calc]. //! //! [calc]: https://drafts.csswg.org/css-values/#calc-notation use crate::parser::ParserContext; use crate::values::computed; use crate::values::specified::length::ViewportPercentageLength;
--- a/servo/components/style/values/specified/color.rs +++ b/servo/components/style/values/specified/color.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified color values. use super::AllowQuirks; #[cfg(feature = "gecko")] use crate::gecko_bindings::structs::nscolor; use crate::parser::{Parse, ParserContext}; #[cfg(feature = "gecko")]
--- a/servo/components/style/values/specified/column.rs +++ b/servo/components/style/values/specified/column.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for the column properties. use crate::parser::{Parse, ParserContext}; use crate::values::generics::column::ColumnCount as GenericColumnCount; use crate::values::specified::PositiveInteger; use cssparser::Parser; use style_traits::ParseError;
--- a/servo/components/style/values/specified/counters.rs +++ b/servo/components/style/values/specified/counters.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for counter properties. #[cfg(feature = "servo")] use crate::computed_values::list_style_type::T as ListStyleType; use crate::parser::{Parse, ParserContext}; use crate::values::generics::counters as generics; use crate::values::generics::counters::CounterIncrement as GenericCounterIncrement;
--- a/servo/components/style/values/specified/easing.rs +++ b/servo/components/style/values/specified/easing.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS Easing functions. use crate::parser::{Parse, ParserContext}; use crate::values::computed::easing::TimingFunction as ComputedTimingFunction; use crate::values::generics::easing::TimingFunction as GenericTimingFunction; use crate::values::generics::easing::{StepPosition, TimingKeyword}; use crate::values::specified::{Integer, Number};
--- a/servo/components/style/values/specified/effects.rs +++ b/servo/components/style/values/specified/effects.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS values related to effects. use crate::parser::{Parse, ParserContext}; use crate::values::computed::effects::BoxShadow as ComputedBoxShadow; use crate::values::computed::effects::SimpleShadow as ComputedSimpleShadow; use crate::values::computed::NonNegativeNumber as ComputedNonNegativeNumber; use crate::values::computed::{Context, ToComputedValue};
--- a/servo/components/style/values/specified/flex.rs +++ b/servo/components/style/values/specified/flex.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS values related to flexbox. use crate::parser::{Parse, ParserContext}; use crate::values::generics::flex::FlexBasis as GenericFlexBasis; use cssparser::Parser; use style_traits::ParseError;
--- a/servo/components/style/values/specified/font.rs +++ b/servo/components/style/values/specified/font.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified values for font properties use app_units::Au; use byteorder::{BigEndian, ByteOrder}; #[cfg(feature = "gecko")] use crate::gecko_bindings::bindings; use crate::parser::{Parse, ParserContext};
--- a/servo/components/style/values/specified/gecko.rs +++ b/servo/components/style/values/specified/gecko.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for legacy Gecko-only properties. use crate::gecko::values::GeckoStyleCoordConvertible; use crate::gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut}; use crate::parser::{Parse, ParserContext}; use crate::values::computed; use crate::values::computed::length::CSSPixelLength;
--- a/servo/components/style/values/specified/grid.rs +++ b/servo/components/style/values/specified/grid.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS handling for the computed value of //! [grids](https://drafts.csswg.org/css-grid/) use crate::parser::{Parse, ParserContext}; use crate::values::computed::{self, Context, ToComputedValue}; use crate::values::generics::grid::{GridTemplateComponent, RepeatCount, TrackBreadth}; use crate::values::generics::grid::{LineNameList, TrackKeyword, TrackRepeat, TrackSize};
--- a/servo/components/style/values/specified/image.rs +++ b/servo/components/style/values/specified/image.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS handling for the specified value of //! [`image`][image]s //! //! [image]: https://drafts.csswg.org/css-images/#image-values use crate::custom_properties::SpecifiedValue; use crate::parser::{Parse, ParserContext};
--- a/servo/components/style/values/specified/length.rs +++ b/servo/components/style/values/specified/length.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! [Length values][length]. //! //! [length]: https://drafts.csswg.org/css-values/#lengths use super::{AllowQuirks, Number, Percentage, ToComputedValue}; use app_units::Au; use crate::font_metrics::FontMetricsQueryResult;
--- a/servo/components/style/values/specified/list.rs +++ b/servo/components/style/values/specified/list.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! `list` specified values. use crate::parser::{Parse, ParserContext}; #[cfg(feature = "gecko")] use crate::values::generics::CounterStyleOrNone; #[cfg(feature = "gecko")] use crate::values::CustomIdent;
--- a/servo/components/style/values/specified/mod.rs +++ b/servo/components/style/values/specified/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified values. //! //! TODO(emilio): Enhance docs. use super::computed::transform::DirectionVector; use super::computed::{Context, ToComputedValue}; use super::generics::grid::{GridLine as GenericGridLine, TrackBreadth as GenericTrackBreadth};
--- a/servo/components/style/values/specified/motion.rs +++ b/servo/components/style/values/specified/motion.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS values that are related to motion path. use crate::parser::{Parse, ParserContext}; use crate::values::specified::SVGPathData; use cssparser::Parser; use style_traits::{ParseError, StyleParseErrorKind};
--- a/servo/components/style/values/specified/outline.rs +++ b/servo/components/style/values/specified/outline.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified values for outline properties use crate::parser::{Parse, ParserContext}; use crate::values::specified::BorderStyle; use cssparser::Parser; use selectors::parser::SelectorParseErrorKind; use style_traits::ParseError;
--- a/servo/components/style/values/specified/percentage.rs +++ b/servo/components/style/values/specified/percentage.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified percentages. use crate::parser::{Parse, ParserContext}; use crate::values::computed::percentage::Percentage as ComputedPercentage; use crate::values::computed::{Context, ToComputedValue}; use crate::values::specified::calc::CalcNode; use crate::values::{serialize_percentage, CSSFloat};
--- a/servo/components/style/values/specified/position.rs +++ b/servo/components/style/values/specified/position.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! CSS handling for the specified value of //! [`position`][position]s //! //! [position]: https://drafts.csswg.org/css-backgrounds-3/#position use crate::hash::FxHashMap; use crate::parser::{Parse, ParserContext};
--- a/servo/components/style/values/specified/rect.rs +++ b/servo/components/style/values/specified/rect.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS borders. use crate::parser::ParserContext; use crate::values::generics::rect::Rect; use crate::values::specified::length::LengthOrNumber; use cssparser::Parser; use style_traits::ParseError;
--- a/servo/components/style/values/specified/resolution.rs +++ b/servo/components/style/values/specified/resolution.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Resolution values: //! //! https://drafts.csswg.org/css-values/#resolution use crate::parser::{Parse, ParserContext}; use crate::values::CSSFloat; use cssparser::{Parser, Token};
--- a/servo/components/style/values/specified/source_size_list.rs +++ b/servo/components/style/values/specified/source_size_list.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! https://html.spec.whatwg.org/multipage/#source-size-list use app_units::Au; #[cfg(feature = "gecko")] use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI}; use crate::media_queries::{Device, MediaCondition}; use crate::parser::{Parse, ParserContext};
--- a/servo/components/style/values/specified/svg.rs +++ b/servo/components/style/values/specified/svg.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for SVG properties. use crate::parser::{Parse, ParserContext}; use crate::values::generics::svg as generic; use crate::values::specified::color::Color; use crate::values::specified::url::SpecifiedUrl; use crate::values::specified::LengthOrPercentage;
--- a/servo/components/style/values/specified/svg_path.rs +++ b/servo/components/style/values/specified/svg_path.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for SVG Path. use crate::parser::{Parse, ParserContext}; use crate::values::animated::{Animate, Procedure, ToAnimatedZero}; use crate::values::distance::{ComputeSquaredDistance, SquaredDistance}; use crate::values::CSSFloat; use cssparser::Parser;
--- a/servo/components/style/values/specified/table.rs +++ b/servo/components/style/values/specified/table.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for table properties. use crate::parser::{Parse, ParserContext}; use cssparser::Parser; use style_traits::{ParseError, StyleParseErrorKind}; #[derive(
--- a/servo/components/style/values/specified/text.rs +++ b/servo/components/style/values/specified/text.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for text properties. use crate::parser::{Parse, ParserContext}; use crate::properties::longhands::writing_mode::computed_value::T as SpecifiedWritingMode; use crate::values::computed::text::LineHeight as ComputedLineHeight; use crate::values::computed::text::TextEmphasisKeywordValue as ComputedTextEmphasisKeywordValue; use crate::values::computed::text::TextEmphasisStyle as ComputedTextEmphasisStyle;
--- a/servo/components/style/values/specified/time.rs +++ b/servo/components/style/values/specified/time.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified time values. use crate::parser::{Parse, ParserContext}; use crate::values::computed::time::Time as ComputedTime; use crate::values::computed::{Context, ToComputedValue}; use crate::values::specified::calc::CalcNode; use crate::values::CSSFloat;
--- a/servo/components/style/values/specified/transform.rs +++ b/servo/components/style/values/specified/transform.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for CSS values that are related to transformations. use crate::parser::{Parse, ParserContext}; use crate::values::computed::{Context, LengthOrPercentage as ComputedLengthOrPercentage}; use crate::values::computed::{Percentage as ComputedPercentage, ToComputedValue}; use crate::values::generics::transform as generic; use crate::values::generics::transform::{Matrix, Matrix3D};
--- a/servo/components/style/values/specified/ui.rs +++ b/servo/components/style/values/specified/ui.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Specified types for UI properties. use crate::parser::{Parse, ParserContext}; use crate::values::generics::ui as generics; use crate::values::specified::color::Color; use crate::values::specified::url::SpecifiedImageUrl; use crate::values::specified::Number;
--- a/servo/components/style/values/specified/url.rs +++ b/servo/components/style/values/specified/url.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Common handling for the specified value CSS url() values. use crate::values::generics::url::UrlOrNone as GenericUrlOrNone; #[cfg(feature = "gecko")] pub use crate::gecko::url::{SpecifiedImageUrl, SpecifiedUrl}; #[cfg(feature = "servo")]
--- a/servo/components/style_derive/animate.rs +++ b/servo/components/style_derive/animate.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::cg; use darling::util::IdentList; use quote::Tokens; use syn::{DeriveInput, Path}; use synstructure::{Structure, VariantInfo}; pub fn derive(mut input: DeriveInput) -> Tokens {
--- a/servo/components/style_derive/cg.rs +++ b/servo/components/style_derive/cg.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use darling::{FromDeriveInput, FromField, FromVariant}; use quote::Tokens; use syn::{self, AngleBracketedGenericArguments, Binding, DeriveInput, Field}; use syn::{GenericArgument, GenericParam, Ident, Path}; use syn::{PathArguments, PathSegment, QSelf, Type, TypeArray}; use syn::{TypeParam, TypeParen, TypePath, TypeSlice, TypeTuple}; use syn::{Variant, WherePredicate};
--- a/servo/components/style_derive/compute_squared_distance.rs +++ b/servo/components/style_derive/compute_squared_distance.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::animate::{AnimationFieldAttrs, AnimationInputAttrs, AnimationVariantAttrs}; use crate::cg; use quote::Tokens; use syn::{DeriveInput, Path}; use synstructure; pub fn derive(mut input: DeriveInput) -> Tokens {
--- a/servo/components/style_derive/lib.rs +++ b/servo/components/style_derive/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![recursion_limit = "128"] #[macro_use] extern crate darling; extern crate proc_macro; #[macro_use] extern crate quote;
--- a/servo/components/style_derive/parse.rs +++ b/servo/components/style_derive/parse.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::cg; use crate::to_css::CssVariantAttrs; use quote::Tokens; use syn::{DeriveInput, Path}; use synstructure; #[darling(attributes(parse), default)]
--- a/servo/components/style_derive/specified_value_info.rs +++ b/servo/components/style_derive/specified_value_info.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::cg; use crate::parse::ParseVariantAttrs; use crate::to_css::{CssFieldAttrs, CssInputAttrs, CssVariantAttrs}; use quote::Tokens; use syn::{Data, DeriveInput, Fields, Ident, Type}; pub fn derive(mut input: DeriveInput) -> Tokens {
--- a/servo/components/style_derive/to_animated_value.rs +++ b/servo/components/style_derive/to_animated_value.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::cg; use quote; use syn::DeriveInput; use synstructure::BindStyle; pub fn derive(mut input: DeriveInput) -> quote::Tokens { let mut where_clause = input.generics.where_clause.take();
--- a/servo/components/style_derive/to_animated_zero.rs +++ b/servo/components/style_derive/to_animated_zero.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::animate::{AnimationFieldAttrs, AnimationInputAttrs, AnimationVariantAttrs}; use crate::cg; use quote; use syn; use synstructure; pub fn derive(mut input: syn::DeriveInput) -> quote::Tokens {
--- a/servo/components/style_derive/to_computed_value.rs +++ b/servo/components/style_derive/to_computed_value.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::cg; use quote::Tokens; use syn::DeriveInput; use synstructure::BindStyle; pub fn derive(mut input: DeriveInput) -> Tokens { let mut where_clause = input.generics.where_clause.take();
--- a/servo/components/style_derive/to_css.rs +++ b/servo/components/style_derive/to_css.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::cg; use darling::util::Override; use quote::{ToTokens, Tokens}; use syn::{self, Data, Path, WhereClause}; use synstructure::{BindingInfo, Structure, VariantInfo}; pub fn derive(mut input: syn::DeriveInput) -> Tokens {
--- a/servo/components/style_traits/cursor.rs +++ b/servo/components/style_traits/cursor.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! A list of common mouse cursors per CSS3-UI § 8.1.1. use super::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss}; macro_rules! define_cursor { ( common properties = [
--- a/servo/components/style_traits/lib.rs +++ b/servo/components/style_traits/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! This module contains shared types and messages for use by devtools/script. //! The traits are here instead of in script so that the devtools crate can be //! modified independently of the rest of Servo. #![crate_name = "style_traits"] #![crate_type = "rlib"] #![deny(unsafe_code, missing_docs)]
--- a/servo/components/style_traits/specified_value_info.rs +++ b/servo/components/style_traits/specified_value_info.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Value information for devtools. use servo_arc::Arc; use std::ops::Range; use std::sync::Arc as StdArc; /// Type of value that a property supports. This is used by Gecko's
--- a/servo/components/style_traits/values.rs +++ b/servo/components/style_traits/values.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Helper types and traits for the handling of CSS values. use app_units::Au; use cssparser::ToCss as CssparserToCss; use cssparser::{serialize_string, ParseError, Parser, Token, UnicodeRange}; use servo_arc::Arc; use std::fmt::{self, Write};
--- a/servo/components/style_traits/viewport.rs +++ b/servo/components/style_traits/viewport.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Helper types for the `@viewport` rule. use crate::{CSSPixel, CssWriter, ParseError, PinchZoomFactor, ToCss}; use cssparser::Parser; use euclid::TypedSize2D; use std::fmt::{self, Write};
--- a/servo/moz.build +++ b/servo/moz.build @@ -1,13 +1,13 @@ # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- # vim: set filetype=python: # 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/. +# file, You can obtain one at https://mozilla.org/MPL/2.0/. with Files("**"): BUG_COMPONENT = ("Firefox", "General") with Files("components/style/**"): BUG_COMPONENT = ("Core", "CSS Parsing and Computation") with Files("components/style_derive/**"):
--- a/servo/ports/geckolib/error_reporter.rs +++ b/servo/ports/geckolib/error_reporter.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Wrapper around Gecko's CSS error reporting mechanism. #![allow(unsafe_code)] use cssparser::{serialize_identifier, CowRcStr, ToCss}; use cssparser::{BasicParseErrorKind, ParseError, ParseErrorKind, SourceLocation, Token}; use selectors::parser::SelectorParseErrorKind;
--- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::error_reporter::ErrorReporter; use super::stylesheet_loader::{AsyncStylesheetParser, StylesheetLoader}; use cssparser::ToCss as ParserToCss; use cssparser::{ParseErrorKind, Parser, ParserInput, SourceLocation}; use malloc_size_of::MallocSizeOfOps; use nsstring::{nsCString, nsStringRepr}; use selectors::matching::{matches_selector, MatchingContext, MatchingMode};
--- a/servo/ports/geckolib/lib.rs +++ b/servo/ports/geckolib/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ extern crate cssparser; #[macro_use] extern crate cstr; extern crate libc; #[macro_use] extern crate log; extern crate malloc_size_of;
--- a/servo/ports/geckolib/stylesheet_loader.rs +++ b/servo/ports/geckolib/stylesheet_loader.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::SourceLocation; use nsstring::nsCString; use servo_arc::Arc; use style::context::QuirksMode; use style::gecko::data::GeckoStyleSheet; use style::gecko::global_style_data::GLOBAL_STYLE_DATA; use style::gecko_bindings::bindings;
--- a/servo/ports/geckolib/tests/build.rs +++ b/servo/ports/geckolib/tests/build.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ extern crate regex; use regex::Regex; use std::env; use std::fs::File; use std::io::{BufRead, BufReader, Write}; use std::path::Path;
--- a/servo/ports/geckolib/tests/lib.rs +++ b/servo/ports/geckolib/tests/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // Disable this entire crate on Windows when Gecko symbols are not available // as linking would fail: // https://github.com/rust-lang/rust/pull/44603#issuecomment-338807312 // // On Linux and OS X linking succeeds anyway. // Presumably these symbol declarations don’t need to be resolved // as they’re not used in any code called from this crate.
--- a/servo/ports/geckolib/tests/servo_function_signatures.rs +++ b/servo/ports/geckolib/tests/servo_function_signatures.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![allow(unused)] use self::glue::*; use style::gecko_bindings::bindings; use style::gecko_properties::*; include!(concat!(env!("OUT_DIR"), "/check_bindings.rs"));
--- a/servo/ports/geckolib/tests/size_of.rs +++ b/servo/ports/geckolib/tests/size_of.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use selectors; use servo_arc::Arc; use style; use style::applicable_declarations::ApplicableDeclarationBlock; use style::data::{ElementData, ElementStyles}; use style::gecko::selector_parser::{self, SelectorImpl}; use style::properties::ComputedValues;
--- a/servo/ports/geckolib/tests/specified_values.rs +++ b/servo/ports/geckolib/tests/specified_values.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use style; #[cfg(all(test, target_pointer_width = "64"))] #[test] fn size_of_specified_values() { use std::mem::size_of; let threshold = 24;
--- a/servo/support/gecko/nsstring/src/conversions.rs +++ b/servo/support/gecko/nsstring/src/conversions.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ extern crate encoding_rs; use std::slice; use super::nsACString; use super::nsAString; use super::nsCStringLike;
--- a/servo/support/gecko/nsstring/src/lib.rs +++ b/servo/support/gecko/nsstring/src/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! This module provides rust bindings for the XPCOM string types. //! //! # TL;DR (what types should I use) //! //! Use `&{mut,} nsA[C]String` for functions in rust which wish to take or //! mutate XPCOM strings. The other string types `Deref` to this type. //!
--- a/servo/tests/unit/malloc_size_of/lib.rs +++ b/servo/tests/unit/malloc_size_of/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ /** ``` extern crate malloc_size_of; extern crate servo_arc; fn sizeable<T: malloc_size_of::MallocSizeOf>() {} fn shallow_sizeable<T: malloc_size_of::MallocShallowSizeOf>() {}
--- a/servo/tests/unit/style/animated_properties.rs +++ b/servo/tests/unit/style/animated_properties.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::RGBA; use style::values::animated::{Animate, Procedure, ToAnimatedValue}; use style::values::computed::Percentage; use style::values::generics::transform::{Transform, TransformOperation}; fn interpolate_rgba(from: RGBA, to: RGBA, progress: f64) -> RGBA { let from = from.to_animated_value();
--- a/servo/tests/unit/style/attr.rs +++ b/servo/tests/unit/style/attr.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use app_units::Au; use style::attr::{AttrValue, LengthOrPercentageOrAuto, parse_length}; use style::values::computed::{CalcLengthOrPercentage, Percentage}; #[test] fn test_length_calc() { let calc = CalcLengthOrPercentage::new(Au(10).into(), Some(Percentage(0.2)));
--- a/servo/tests/unit/style/custom_properties.rs +++ b/servo/tests/unit/style/custom_properties.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::{Parser, ParserInput}; use servo_arc::Arc; use style::custom_properties::{Name, SpecifiedValue, CustomPropertiesMap, CustomPropertiesBuilder, CssEnvironment}; use style::properties::CustomDeclarationValue; use test::{self, Bencher}; fn cascade(
--- a/servo/tests/unit/style/lib.rs +++ b/servo/tests/unit/style/lib.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![cfg(test)] #![feature(test)] extern crate app_units; extern crate cssparser; extern crate euclid; #[macro_use] extern crate html5ever;
--- a/servo/tests/unit/style/logical_geometry.rs +++ b/servo/tests/unit/style/logical_geometry.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use euclid::{Size2D, Point2D, SideOffsets2D, Rect}; use style::logical_geometry::{WritingMode, LogicalSize, LogicalPoint, LogicalMargin, LogicalRect}; #[cfg(test)] fn modes() -> [WritingMode; 13] { [ WritingMode::empty(),
--- a/servo/tests/unit/style/media_queries.rs +++ b/servo/tests/unit/style/media_queries.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use euclid::TypedScale; use euclid::TypedSize2D; use servo_arc::Arc; use servo_url::ServoUrl; use std::borrow::ToOwned; use style::Atom; use style::context::QuirksMode;
--- a/servo/tests/unit/style/parsing/animation.rs +++ b/servo/tests/unit/style/parsing/animation.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use servo_atoms::Atom; use style::parser::Parse; use style::properties::longhands::animation_name; use style::values::{KeyframesName, CustomIdent}; use style::values::specified::AnimationIterationCount; use style_traits::ToCss;
--- a/servo/tests/unit/style/parsing/background.rs +++ b/servo/tests/unit/style/parsing/background.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style::properties::longhands::{background_attachment, background_clip, background_color, background_image}; use style::properties::longhands::{background_origin, background_position_x, background_position_y, background_repeat}; use style::properties::longhands::background_size; use style::properties::shorthands::background; #[test]
--- a/servo/tests/unit/style/parsing/border.rs +++ b/servo/tests/unit/style/parsing/border.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style::parser::Parse; use style::properties::MaybeBoxed; use style::properties::longhands::{border_image_outset, border_image_repeat, border_image_slice}; use style::properties::longhands::{border_image_source, border_image_width}; use style::properties::shorthands::border_image; use style::values::specified::BorderRadius;
--- a/servo/tests/unit/style/parsing/box_.rs +++ b/servo/tests/unit/style/parsing/box_.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style_traits::ToCss; #[test] fn test_transform_translate() { use style::properties::longhands::transform; assert_roundtrip_with_context!(transform::parse, "translate(2px)");
--- a/servo/tests/unit/style/parsing/column.rs +++ b/servo/tests/unit/style/parsing/column.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style_traits::ToCss; #[test] fn test_column_width() { use style::properties::longhands::column_width;
--- a/servo/tests/unit/style/parsing/effects.rs +++ b/servo/tests/unit/style/parsing/effects.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style::properties::longhands::{perspective_origin, transform_origin}; use style_traits::ToCss; #[test] fn test_clip() { use style::properties::longhands::clip;
--- a/servo/tests/unit/style/parsing/image.rs +++ b/servo/tests/unit/style/parsing/image.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use style::parser::Parse; use style::values::specified::image::*; use style_traits::ToCss; #[test] fn test_linear_gradient() { // Parsing from the right
--- a/servo/tests/unit/style/parsing/inherited_text.rs +++ b/servo/tests/unit/style/parsing/inherited_text.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style::values::generics::text::Spacing; #[test] fn negative_letter_spacing_should_parse_properly() { use style::properties::longhands::letter_spacing; use style::values::specified::length::{Length, NoCalcLength, FontRelativeLength};
--- a/servo/tests/unit/style/parsing/mod.rs +++ b/servo/tests/unit/style/parsing/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Tests for parsing and serialization of values/properties use cssparser::{Parser, ParserInput}; use style::context::QuirksMode; use style::parser::ParserContext; use style::stylesheets::{CssRuleType, Origin}; use style_traits::{ParsingMode, ParseError};
--- a/servo/tests/unit/style/parsing/outline.rs +++ b/servo/tests/unit/style/parsing/outline.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style_traits::ToCss; #[test] fn test_outline_style() { use style::properties::longhands::outline_style;
--- a/servo/tests/unit/style/parsing/position.rs +++ b/servo/tests/unit/style/parsing/position.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::{parse, parse_entirely}; use style::parser::Parse; use style::values::specified::position::*; use style_traits::ToCss; #[test] fn test_position() {
--- a/servo/tests/unit/style/parsing/selectors.rs +++ b/servo/tests/unit/style/parsing/selectors.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::{Parser, ParserInput, ToCss}; use selectors::parser::SelectorList; use style::selector_parser::{SelectorImpl, SelectorParser}; use style::stylesheets::{Origin, Namespaces}; use style_traits::ParseError; fn parse_selector<'i, 't>(input: &mut Parser<'i, 't>) -> Result<SelectorList<SelectorImpl>, ParseError<'i>> {
--- a/servo/tests/unit/style/parsing/supports.rs +++ b/servo/tests/unit/style/parsing/supports.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::{Parser, ParserInput}; use style::stylesheets::supports_rule::SupportsCondition; use style_traits::ToCss; #[test] fn test_supports_condition() { assert_roundtrip!(SupportsCondition::parse, "(margin: 1px)");
--- a/servo/tests/unit/style/parsing/text_overflow.rs +++ b/servo/tests/unit/style/parsing/text_overflow.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style_traits::ToCss; #[test] fn test_text_overflow() { use style::properties::longhands::text_overflow;
--- a/servo/tests/unit/style/parsing/transition_duration.rs +++ b/servo/tests/unit/style/parsing/transition_duration.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style::properties::longhands::transition_duration; #[test] fn test_positive_transition_duration() { assert!(parse(transition_duration::parse, "5s").is_ok()); assert!(parse(transition_duration::parse, "0s").is_ok());
--- a/servo/tests/unit/style/parsing/transition_timing_function.rs +++ b/servo/tests/unit/style/parsing/transition_timing_function.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use parsing::parse; use style::properties::longhands::transition_timing_function; use style_traits::ToCss; #[test] fn test_cubic_bezier() { assert_roundtrip_with_context!(transition_timing_function::parse, "cubic-bezier(0, 0, 0, 0)");
--- a/servo/tests/unit/style/properties/mod.rs +++ b/servo/tests/unit/style/properties/mod.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::{Parser, ParserInput}; use style::context::QuirksMode; use style::parser::ParserContext; use style::stylesheets::{CssRuleType, Origin}; use style_traits::{ParsingMode, ParseError}; fn parse<T, F>(f: F, s: &'static str) -> Result<T, ParseError<'static>>
--- a/servo/tests/unit/style/properties/scaffolding.rs +++ b/servo/tests/unit/style/properties/scaffolding.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use serde_json::{self, Value}; use std::env; use std::fs::{File, remove_file}; use std::path::Path; use std::process::Command; #[test]
--- a/servo/tests/unit/style/properties/serialization.rs +++ b/servo/tests/unit/style/properties/serialization.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use properties::{parse, parse_input}; use style::computed_values::display::T as Display; use style::properties::{PropertyDeclaration, Importance}; use style::properties::declaration_block::PropertyDeclarationBlock; use style::properties::parse_property_declaration_list; use style::values::RGBA; use style::values::specified::{BorderStyle, BorderSideWidth, Color};
--- a/servo/tests/unit/style/rule_tree/bench.rs +++ b/servo/tests/unit/style/rule_tree/bench.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::SourceLocation; use rayon; use servo_arc::Arc; use servo_url::ServoUrl; use style::context::QuirksMode; use style::error_reporting::{ParseErrorReporter, ContextualParseError}; use style::media_queries::MediaList;
--- a/servo/tests/unit/style/rule_tree/mod.rs +++ b/servo/tests/unit/style/rule_tree/mod.rs @@ -1,5 +1,5 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ mod bench;
--- a/servo/tests/unit/style/size_of.rs +++ b/servo/tests/unit/style/size_of.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use selectors::parser::{SelectorParseError, SelectorParseErrorKind}; use style::invalidation::element::invalidation_map::Dependency; use style::properties; size_of_test!(test_size_of_dependency, Dependency, 16); size_of_test!(test_size_of_property_declaration, properties::PropertyDeclaration, 32);
--- a/servo/tests/unit/style/str.rs +++ b/servo/tests/unit/style/str.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use style::str::{split_html_space_chars, str_join, starts_with_ignore_ascii_case}; #[test] pub fn split_html_space_chars_whitespace() { assert!(split_html_space_chars("").collect::<Vec<_>>().is_empty()); assert!(split_html_space_chars("\u{0020}\u{0009}\u{000a}\u{000c}\u{000d}").collect::<Vec<_>>().is_empty()); }
--- a/servo/tests/unit/style/stylesheets.rs +++ b/servo/tests/unit/style/stylesheets.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::{self, SourceLocation}; use html5ever::{Namespace as NsAtom}; use parking_lot::RwLock; use selectors::attr::*; use selectors::parser::*; use servo_arc::Arc; use servo_atoms::Atom;
--- a/servo/tests/unit/style/stylist.rs +++ b/servo/tests/unit/style/stylist.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::SourceLocation; use euclid::TypedScale; use euclid::TypedSize2D; use selectors::parser::{AncestorHashes, Selector}; use servo_arc::Arc; use servo_atoms::Atom; use style::context::QuirksMode;
--- a/servo/tests/unit/style/viewport.rs +++ b/servo/tests/unit/style/viewport.rs @@ -1,11 +1,11 @@ /* 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/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::{Parser, ParserInput}; use euclid::TypedScale; use euclid::TypedSize2D; use servo_arc::Arc; use servo_config::prefs::{PREFS, PrefValue}; use servo_url::ServoUrl; use style::context::QuirksMode;