diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 04f771e591d0..d26d02668526 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -2239,7 +2239,18 @@ function loadOneOrMoreURIs(aURIString, aTriggeringPrincipal) { } } -function focusAndSelectUrlBar() { +/** + * Focuses the location bar input field and selects its contents. + * + * @param [optional] userInitiatedFocus + * Whether this focus is caused by an user interaction whose intention + * was to use the location bar. For example, using a shortcut to go to + * the location bar, or a contextual menu to search from it. + * The default is false and should be used in all those cases where the + * code focuses the location bar but that's not the primary user + * intention, like when opening a new tab. + */ +function focusAndSelectUrlBar(userInitiatedFocus = false) { // In customize mode, the url bar is disabled. If a new tab is opened or the // user switches to a different tab, this function gets called before we've // finished leaving customize mode, and the url bar will still be disabled. @@ -2247,7 +2258,7 @@ function focusAndSelectUrlBar() { // we've finished leaving customize mode. if (CustomizationHandler.isExitingCustomizeMode) { gNavToolbox.addEventListener("aftercustomization", function() { - focusAndSelectUrlBar(); + focusAndSelectUrlBar(userInitiatedFocus); }, {once: true}); return true; @@ -2257,7 +2268,9 @@ function focusAndSelectUrlBar() { if (window.fullScreen) FullScreen.showNavToolbox(); + gURLBar.userInitiatedFocus = userInitiatedFocus; gURLBar.select(); + gURLBar.userInitiatedFocus = false; if (document.activeElement == gURLBar.inputField) return true; } @@ -2265,7 +2278,7 @@ function focusAndSelectUrlBar() { } function openLocation() { - if (focusAndSelectUrlBar()) + if (focusAndSelectUrlBar(true)) return; if (window.location.href != getBrowserURL()) { @@ -3815,7 +3828,7 @@ const BrowserSearch = { let focusUrlBarIfSearchFieldIsNotActive = function(aSearchBar) { if (!aSearchBar || document.activeElement != aSearchBar.textbox.inputField) { - focusAndSelectUrlBar(); + focusAndSelectUrlBar(true); } }; diff --git a/browser/base/content/test/static/browser_all_files_referenced.js b/browser/base/content/test/static/browser_all_files_referenced.js index 65fd585f6250..206cb17a757b 100644 --- a/browser/base/content/test/static/browser_all_files_referenced.js +++ b/browser/base/content/test/static/browser_all_files_referenced.js @@ -133,8 +133,6 @@ var whitelist = [ {file: "chrome://global/content/customizeToolbar.xul"}, // Bug 1343837 {file: "chrome://global/content/findUtils.js"}, - // Bug 1343843 - {file: "chrome://global/content/url-classifier/unittests.xul"}, // Bug 1348362 {file: "chrome://global/skin/icons/warning-64.png", platforms: ["linux", "win"]}, // Bug 1348525 diff --git a/browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-out.js b/browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-out.js index 9fca402f2681..2accabb3833f 100644 --- a/browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-out.js +++ b/browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-out.js @@ -1,3 +1,4 @@ +/* eslint-disable mozilla/no-arbitrary-setTimeout */ // The order of the tests here matters! const SUGGEST_ALL_PREF = "browser.search.suggest.enabled"; @@ -38,7 +39,7 @@ add_task(async function focus() { setupVisibleHint(); gURLBar.blur(); let popupPromise = promisePopupShown(gURLBar.popup); - gURLBar.focus(); + focusAndSelectUrlBar(true); await popupPromise; Assert.ok(gURLBar.popup.popupOpen, "popup should be open"); assertVisible(true); @@ -64,23 +65,40 @@ add_task(async function focus() { await BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "about:blank"); }); -add_task(async function new_tab() { - // Opening a new tab when the urlbar is unfocused, should focusing it and thus - // open the popup in order to show the notification. +add_task(async function click_on_focused() { + // Even if the location bar is already focused, we should still show the popup + // and the notification on click. setupVisibleHint(); gURLBar.blur(); + // Won't show the hint since it's not user initiated. + gURLBar.focus(); + await new Promise(resolve => setTimeout(resolve, 500)); + Assert.ok(!gURLBar.popup.popupOpen, "popup should be closed"); + let popupPromise = promisePopupShown(gURLBar.popup); - // openNewForegroundTab doesn't focus the urlbar. - await BrowserTestUtils.synthesizeKey("t", { accelKey: true }, gBrowser.selectedBrowser); + EventUtils.synthesizeMouseAtCenter(gURLBar.inputField, { button: 0, type: "mousedown" }); await popupPromise; + Assert.ok(gURLBar.popup.popupOpen, "popup should be open"); assertVisible(true); assertFooterVisible(false); Assert.equal(gURLBar.popup._matchCount, 0, "popup should have no results"); - await BrowserTestUtils.removeTab(gBrowser.selectedTab); + gURLBar.blur(); Assert.ok(!gURLBar.popup.popupOpen, "popup should be closed"); }); +add_task(async function new_tab() { + // Opening a new tab when the urlbar is unfocused, should focus it but not + // open the popup. + setupVisibleHint(); + gURLBar.blur(); + // openNewForegroundTab doesn't focus the urlbar. + await BrowserTestUtils.synthesizeKey("t", { accelKey: true }, gBrowser.selectedBrowser); + await new Promise(resolve => setTimeout(resolve, 500)); + Assert.ok(!gURLBar.popup.popupOpen, "popup should be closed"); + await BrowserTestUtils.removeTab(gBrowser.selectedTab); +}); + add_task(async function privateWindow() { // Since suggestions are disabled in private windows, the notification should // not appear even when suggestions are otherwise enabled. diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index cf8fb827ddbc..44aa6b88da79 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -184,6 +184,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. + + false + + href="data:text/css,%00b%00o%00d%00y%00{%00c%00o%00l%00o%00r%00:%00g%00r%00e%00e%00n%00}"> This should be green - + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index a0d896fe9c9c..db9de2f259bb 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1330,7 +1330,7 @@ fuzzy-if(skiaContent,1,5) == 482659-1d.html 482659-1-ref.html == 483565.xul 483565-ref.xul == 484256-1.html 484256-1-ref.html == 484256-2.html 484256-1-ref.html -fails-if(stylo||styloVsGecko) == 485012-1.html 485012-1-ref.html # bug 1396093 +== 485012-1.html 485012-1-ref.html == 485275-1.html 485275-1-ref.html == 485275-1.svg 485275-1-ref.html == 486052-1.html 486052-1-ref.html diff --git a/layout/style/ServoBindingList.h b/layout/style/ServoBindingList.h index 41c5439b24c4..3a56599823f0 100644 --- a/layout/style/ServoBindingList.h +++ b/layout/style/ServoBindingList.h @@ -74,6 +74,11 @@ SERVO_BINDING_FUNC(Servo_StyleSet_RebuildCachedData, void, // they wrap the value in a struct. SERVO_BINDING_FUNC(Servo_StyleSet_MediumFeaturesChanged, uint8_t, RawServoStyleSetBorrowed set, bool* viewport_units_used) +// We'd like to return `OriginFlags` here, but bindgen bitfield enums don't +// work as return values with the Linux 32-bit ABI at the moment because +// they wrap the value in a struct. +SERVO_BINDING_FUNC(Servo_StyleSet_SetDevice, uint8_t, + RawServoStyleSetBorrowed set, RawGeckoPresContextOwned pres_context) SERVO_BINDING_FUNC(Servo_StyleSet_Drop, void, RawServoStyleSetOwned set) SERVO_BINDING_FUNC(Servo_StyleSet_CompatModeChanged, void, RawServoStyleSetBorrowed raw_data) diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index d28016cfdd6c..e2f451257db4 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -105,10 +105,37 @@ ServoStyleSet::~ServoStyleSet() } } +UniquePtr +ServoStyleSet::CreateXBLServoStyleSet( + nsPresContext* aPresContext, + const nsTArray>& aNewSheets) +{ + auto set = MakeUnique(Kind::ForXBL); + set->Init(aPresContext, nullptr); + + // The XBL style sheets aren't document level sheets, but we need to + // decide a particular SheetType to add them to style set. This type + // doesn't affect the place where we pull those rules from + // stylist::push_applicable_declarations_as_xbl_only_stylist(). + set->ReplaceSheets(SheetType::Doc, aNewSheets); + + // Update stylist immediately. + set->UpdateStylist(); + + // The PresContext of the bound document could be destroyed anytime later, + // which shouldn't be used for XBL styleset, so we clear it here to avoid + // dangling pointer. + set->mPresContext = nullptr; + + return set; +} + void ServoStyleSet::Init(nsPresContext* aPresContext, nsBindingManager* aBindingManager) { mPresContext = aPresContext; + mLastPresContextUsesXBLStyleSet = aPresContext; + mRawSet.reset(Servo_StyleSet_Init(aPresContext)); mBindingManager = aBindingManager; @@ -164,15 +191,37 @@ ServoStyleSet::InvalidateStyleForCSSRuleChanges() mPresContext->RestyleManager()->AsServo()->PostRestyleEventForCSSRuleChanges(); } +bool +ServoStyleSet::SetPresContext(nsPresContext* aPresContext) +{ + MOZ_ASSERT(IsForXBL(), "Only XBL styleset can set PresContext!"); + + mLastPresContextUsesXBLStyleSet = aPresContext; + + const OriginFlags rulesChanged = static_cast( + Servo_StyleSet_SetDevice(mRawSet.get(), aPresContext)); + + if (rulesChanged != OriginFlags(0)) { + MarkOriginsDirty(rulesChanged); + return true; + } + + return false; +} + nsRestyleHint ServoStyleSet::MediumFeaturesChanged(bool aViewportChanged) { bool viewportUnitsUsed = false; - const OriginFlags rulesChanged = static_cast( - Servo_StyleSet_MediumFeaturesChanged(mRawSet.get(), &viewportUnitsUsed)); + bool rulesChanged = MediumFeaturesChangedRules(&viewportUnitsUsed); - if (rulesChanged != OriginFlags(0)) { - MarkOriginsDirty(rulesChanged); + if (mBindingManager && + mBindingManager->MediumFeaturesChanged(mPresContext)) { + SetStylistXBLStyleSheetsDirty(); + rulesChanged = true; + } + + if (rulesChanged) { return eRestyle_Subtree; } @@ -183,6 +232,22 @@ ServoStyleSet::MediumFeaturesChanged(bool aViewportChanged) return nsRestyleHint(0); } +bool +ServoStyleSet::MediumFeaturesChangedRules(bool* aViewportUnitsUsed) +{ + MOZ_ASSERT(aViewportUnitsUsed); + + const OriginFlags rulesChanged = static_cast( + Servo_StyleSet_MediumFeaturesChanged(mRawSet.get(), aViewportUnitsUsed)); + + if (rulesChanged != OriginFlags(0)) { + MarkOriginsDirty(rulesChanged); + return true; + } + + return false; +} + MOZ_DEFINE_MALLOC_SIZE_OF(ServoStyleSetMallocSizeOf) void @@ -731,13 +796,6 @@ ServoStyleSet::InsertStyleSheetBefore(SheetType aType, return NS_OK; } -void -ServoStyleSet::UpdateStyleSheet(ServoStyleSheet* aSheet) -{ - MOZ_ASSERT(aSheet); - // TODO(emilio): Get rid of this. -} - int32_t ServoStyleSet::SheetCount(SheetType aType) const { @@ -1372,13 +1430,21 @@ ServoStyleSet::UpdateStylist() { MOZ_ASSERT(StylistNeedsUpdate()); - // There's no need to compute invalidations and such for an XBL styleset, - // since they are loaded and unloaded synchronously, and they don't have to - // deal with dynamic content changes. - Element* root = - IsMaster() ? mPresContext->Document()->GetDocumentElement() : nullptr; + if (mStylistState & StylistState::StyleSheetsDirty) { + // There's no need to compute invalidations and such for an XBL styleset, + // since they are loaded and unloaded synchronously, and they don't have to + // deal with dynamic content changes. + Element* root = + IsMaster() ? mPresContext->Document()->GetDocumentElement() : nullptr; + + Servo_StyleSet_FlushStyleSheets(mRawSet.get(), root); + } + + if (MOZ_UNLIKELY(mStylistState & StylistState::XBLStyleSheetsDirty)) { + MOZ_ASSERT(IsMaster(), "Only master styleset can mark XBL stylesets dirty!"); + mBindingManager->UpdateBoundContentBindingsForServo(mPresContext); + } - Servo_StyleSet_FlushStyleSheets(mRawSet.get(), root); mStylistState = StylistState::NotDirty; } diff --git a/layout/style/ServoStyleSet.h b/layout/style/ServoStyleSet.h index c48c7ea7eaf8..553dc88d5f83 100644 --- a/layout/style/ServoStyleSet.h +++ b/layout/style/ServoStyleSet.h @@ -46,18 +46,22 @@ struct TreeMatchContext; namespace mozilla { -/** - * A few flags used to track which kind of stylist state we may need to - * update. - */ +// A few flags used to track which kind of stylist state we may need to +// update. enum class StylistState : uint8_t { - /** The stylist is not dirty, we should do nothing */ + // The stylist is not dirty, we should do nothing. NotDirty = 0, - /** The style sheets have changed, so we need to update the style data. */ - StyleSheetsDirty, + // The style sheets have changed, so we need to update the style data. + StyleSheetsDirty = 1 << 0, + + // Some of the style sheets of the bound elements in binding manager have + // changed, so we need to tell the binding manager to update style data. + XBLStyleSheetsDirty = 1 << 1, }; +MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(StylistState) + // Bitfield type to represent Servo stylesheet origins. enum class OriginFlags : uint8_t { UserAgent = 0x01, @@ -114,6 +118,10 @@ public: explicit ServoStyleSet(Kind aKind); ~ServoStyleSet(); + static UniquePtr + CreateXBLServoStyleSet(nsPresContext* aPresContext, + const nsTArray>& aNewSheets); + void Init(nsPresContext* aPresContext, nsBindingManager* aBindingManager); void BeginShutdown(); void Shutdown(); @@ -133,6 +141,9 @@ public: nsRestyleHint MediumFeaturesChanged(bool aViewportChanged); + // aViewportChanged outputs whether any viewport units is used. + bool MediumFeaturesChangedRules(bool* aViewportUnitsUsed); + void InvalidateStyleForCSSRuleChanges(); void AddSizeOfIncludingThis(nsWindowSizes& aSizes) const; @@ -231,11 +242,6 @@ public: ServoStyleSheet* aNewSheet, ServoStyleSheet* aReferenceSheet); - // Notify servo that the underlying raw sheet has changed, through cloning. - // This should only be called on a just-cloned sheet, because it does not - // mark the stylesheets as dirty either here or in servo. - void UpdateStyleSheet(ServoStyleSheet* aSheet); - int32_t SheetCount(SheetType aType) const; ServoStyleSheet* StyleSheetAt(SheetType aType, int32_t aIndex) const; @@ -428,11 +434,15 @@ public: // Returns the style rule map. ServoStyleRuleMap* StyleRuleMap(); - // Clear mPresContext. This is needed after XBL ServoStyleSet is created. - void ClearPresContext() { - mPresContext = nullptr; + // Return whether this is the last PresContext which uses this XBL styleset. + bool IsPresContextChanged(nsPresContext* aPresContext) const { + return aPresContext != mLastPresContextUsesXBLStyleSet; } + // Set PresContext (i.e. Device) for mRawSet. This should be called only + // by XBL stylesets. Returns true if there is any rule changing. + bool SetPresContext(nsPresContext* aPresContext); + /** * Returns true if a modification to an an attribute with the specified * local name might require us to restyle the element. @@ -525,7 +535,12 @@ private: */ void SetStylistStyleSheetsDirty() { - mStylistState = StylistState::StyleSheetsDirty; + mStylistState |= StylistState::StyleSheetsDirty; + } + + void SetStylistXBLStyleSheetsDirty() + { + mStylistState |= StylistState::XBLStyleSheetsDirty; } bool StylistNeedsUpdate() const @@ -565,7 +580,15 @@ private: ServoStyleSheet* aSheet); const Kind mKind; - nsPresContext* mPresContext; + + // Nullptr if this is an XBL style set. + nsPresContext* MOZ_NON_OWNING_REF mPresContext = nullptr; + + // Because XBL style set could be used by multiple PresContext, we need to + // store the last PresContext pointer which uses this XBL styleset for + // computing medium rule changes. + void* MOZ_NON_OWNING_REF mLastPresContextUsesXBLStyleSet = nullptr; + UniquePtr mRawSet; EnumeratedArray>> mSheets; diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 901a8d941b39..01d5fae91a8b 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -2686,8 +2686,8 @@ nsStyleSet::MediumFeaturesChanged(bool aViewportChanged) } if (mBindingManager) { - bool thisChanged = false; - mBindingManager->MediumFeaturesChanged(presContext, &thisChanged); + bool thisChanged = + mBindingManager->MediumFeaturesChanged(presContext); stylesChanged = stylesChanged || thisChanged; } diff --git a/layout/style/nsStyleUtil.cpp b/layout/style/nsStyleUtil.cpp index 2c2602e9684a..dfab7c7ea484 100644 --- a/layout/style/nsStyleUtil.cpp +++ b/layout/style/nsStyleUtil.cpp @@ -94,8 +94,8 @@ void nsStyleUtil::AppendEscapedCSSString(const nsAString& aString, const char16_t* in = aString.BeginReading(); const char16_t* const end = aString.EndReading(); for (; in != end; in++) { - if (*in < 0x20 || (*in >= 0x7F && *in < 0xA0)) { - // Escape U+0000 through U+001F and U+007F through U+009F numerically. + if (*in < 0x20 || *in == 0x7F) { + // Escape U+0000 through U+001F and U+007F numerically. aReturn.AppendPrintf("\\%x ", *in); } else { if (*in == '"' || *in == '\'' || *in == '\\') { @@ -158,8 +158,8 @@ nsStyleUtil::AppendEscapedCSSIdent(const nsAString& aIdent, nsAString& aReturn) char16_t ch = *in; if (ch == 0x00) { aReturn.Append(char16_t(0xFFFD)); - } else if (ch < 0x20 || (0x7F <= ch && ch < 0xA0)) { - // Escape U+0000 through U+001F and U+007F through U+009F numerically. + } else if (ch < 0x20 || 0x7F == ch) { + // Escape U+0000 through U+001F and U+007F numerically. aReturn.AppendPrintf("\\%x ", *in); } else { // Escape ASCII non-identifier printables as a backslash plus diff --git a/layout/style/test/mochitest.ini b/layout/style/test/mochitest.ini index 021494e6c99a..fb7453603b3e 100644 --- a/layout/style/test/mochitest.ini +++ b/layout/style/test/mochitest.ini @@ -242,7 +242,6 @@ skip-if = !stylo skip-if = android_version == '18' #debug-only failure; timed out #Android 4.3 aws only; bug 1030419 [test_media_queries_dynamic.html] [test_media_queries_dynamic_xbl.html] -fail-if = stylo # bug 1382078 [test_media_query_list.html] [test_media_query_serialization.html] [test_moz_device_pixel_ratio.html] diff --git a/layout/style/test/test_css_escape_api.html b/layout/style/test/test_css_escape_api.html index 00ec240c70d7..a9879b4aaefe 100644 --- a/layout/style/test/test_css_escape_api.html +++ b/layout/style/test/test_css_escape_api.html @@ -75,7 +75,7 @@ is(CSS.escape('-9a'), '-\\39 a', "escapingFailed Char: -9a"); is(CSS.escape('--a'), '--a', 'Should not need to escape leading "--"'); -is(CSS.escape('\x80\x2D\x5F\xA9'), '\\80 \x2D\x5F\xA9', "escapingFailed Char: \\x80\\x2D\\x5F\\xA9"); +is(CSS.escape('\x7F\x80\x2D\x5F\xA9'), '\\7f \x80\x2D\x5F\xA9', "escapingFailed Char: \\x7F\\x80\\x2D\\x5F\\xA9"); is(CSS.escape('\xA0\xA1\xA2'), '\xA0\xA1\xA2', "escapingFailed Char: \\xA0\\xA1\\xA2"); is(CSS.escape('a0123456789b'), 'a0123456789b', "escapingFailed Char: a0123465789"); is(CSS.escape('abcdefghijklmnopqrstuvwxyz'), 'abcdefghijklmnopqrstuvwxyz', "escapingFailed Char: abcdefghijklmnopqrstuvwxyz"); diff --git a/layout/style/test/test_parser_diagnostics_unprintables.html b/layout/style/test/test_parser_diagnostics_unprintables.html index f478f7916764..6693f01b17d4 100644 --- a/layout/style/test/test_parser_diagnostics_unprintables.html +++ b/layout/style/test/test_parser_diagnostics_unprintables.html @@ -18,6 +18,8 @@ // That's not the point of the test, though; the point is only that // *that text* is properly escaped. +const isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo; + // There is one "pattern" for each code path through the error reporter // that might need to escape some kind of user-supplied text. // Each "pattern" is tested once with each of the "substitution"s below: @@ -39,13 +41,14 @@ let patterns = [ // _AtKeyword { i: "x{@: }", o: "declaration but found \u2018@\u2019." }, // _String - { i: "x{ ''}" , o: "declaration but found \u2018''\u2019." }, + { i: "x{ ''}" , o: isStylo ? 'declaration but found \u2018""\u2019.' + : "declaration but found \u2018''\u2019." }, // _Bad_String - { i: "x{ '\n}", o: "declaration but found \u2018'\u2019." }, + // FIXME: temporarily disabled https://bugzilla.mozilla.org/show_bug.cgi?id=1396664 + { i: "x{ '\n}", o: isStylo ? "declaration but found \u2018\"\n\u2019." + : "declaration but found \u2018'\u2019." }, ]; -const isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo; - // Stylo's CSS parser only reports the 'url(' token, not the actual bad URL. if (!isStylo) { patterns.push( @@ -97,7 +100,7 @@ const substitutions = [ // ASCII printables that must be escaped in identifiers. // Most of these should not be escaped in strings. { t: "\\!\\\"\\#\\$", i: "\\!\\\"\\#\\$", s: "!\\\"#$" }, - { t: "\\%\\&\\'\\(", i: "\\%\\&\\'\\(", s: "%&\\'(" }, + { t: "\\%\\&\\'\\(", i: "\\%\\&\\'\\(", s: isStylo ? "%&'(" : "%&\\'(" }, { t: "\\)\\*\\+\\,", i: "\\)\\*\\+\\,", s: ")*+," }, { t: "\\.\\/\\:\\;", i: "\\.\\/\\:\\;", s: "./:;" }, { t: "\\<\\=\\>\\?", i: "\\<\\=\\>\\?", s: "<=>?", }, @@ -127,26 +130,26 @@ const substitutions = [ s: "\\1c \\1d \\1e \\1f " }, // U+007F (DELETE) and U+0080 - U+009F (C1 controls) - { t: "\\\x7f\\\x80\\\x81\\\x82", i: "\\7f \\80 \\81 \\82 ", - s: "\\7f \\80 \\81 \\82 " }, - { t: "\\\x83\\\x84\\\x85\\\x86", i: "\\83 \\84 \\85 \\86 ", - s: "\\83 \\84 \\85 \\86 " }, - { t: "\\\x87\\\x88\\\x89\\\x8A", i: "\\87 \\88 \\89 \\8a ", - s: "\\87 \\88 \\89 \\8a " }, - { t: "\\\x8B\\\x8C\\\x8D\\\x8E", i: "\\8b \\8c \\8d \\8e ", - s: "\\8b \\8c \\8d \\8e " }, - { t: "\\\x8F\\\x90\\\x91\\\x92", i: "\\8f \\90 \\91 \\92 ", - s: "\\8f \\90 \\91 \\92 " }, - { t: "\\\x93\\\x94\\\x95\\\x96", i: "\\93 \\94 \\95 \\96 ", - s: "\\93 \\94 \\95 \\96 " }, - { t: "\\\x97\\\x98\\\x99\\\x9A", i: "\\97 \\98 \\99 \\9a ", - s: "\\97 \\98 \\99 \\9a " }, - { t: "\\\x9B\\\x9C\\\x9D\\\x9E\\\x9F", i: "\\9b \\9c \\9d \\9e \\9f ", - s: "\\9b \\9c \\9d \\9e \\9f " }, + { t: "\\\x7f\\\x80\\\x81\\\x82", i: "\\7f \x80\x81\x82", + s: "\\7f \x80\x81\x82" }, + { t: "\\\x83\\\x84\\\x85\\\x86", i: "\x83\x84\x85\x86", + s: "\x83\x84\x85\x86" }, + { t: "\\\x87\\\x88\\\x89\\\x8A", i: "\x87\x88\x89\x8A", + s: "\x87\x88\x89\x8A" }, + { t: "\\\x8B\\\x8C\\\x8D\\\x8E", i: "\x8B\x8C\x8D\x8E", + s: "\x8B\x8C\x8D\x8E" }, + { t: "\\\x8F\\\x90\\\x91\\\x92", i: "\x8F\x90\x91\x92", + s: "\x8F\x90\x91\x92" }, + { t: "\\\x93\\\x94\\\x95\\\x96", i: "\x93\x94\x95\x96", + s: "\x93\x94\x95\x96" }, + { t: "\\\x97\\\x98\\\x99\\\x9A", i: "\x97\x98\x99\x9A", + s: "\x97\x98\x99\x9A" }, + { t: "\\\x9B\\\x9C\\\x9D\\\x9E\\\x9F", i: "\x9B\x9C\x9D\x9E\x9F", + s: "\x9B\x9C\x9D\x9E\x9F" }, // CSS doesn't bother with the full Unicode rules for identifiers, // instead declaring that any code point greater than or equal to - // U+00A0 is a valid identifier character. Test a small handful + // U+0080 is a valid identifier character. Test a small handful // of both basic and astral plane characters. // Arabic (caution to editors: there is a possibly-invisible U+200E diff --git a/memory/mozjemalloc/linkedlist.h b/memory/mozjemalloc/linkedlist.h index d75531410512..712749e16913 100644 --- a/memory/mozjemalloc/linkedlist.h +++ b/memory/mozjemalloc/linkedlist.h @@ -35,9 +35,7 @@ #include -typedef struct LinkedList_s LinkedList; - -struct LinkedList_s { +struct LinkedList { LinkedList *next; LinkedList *prev; }; diff --git a/memory/mozjemalloc/mozjemalloc.cpp b/memory/mozjemalloc/mozjemalloc.cpp index 255e3800757c..014779172ef4 100644 --- a/memory/mozjemalloc/mozjemalloc.cpp +++ b/memory/mozjemalloc/mozjemalloc.cpp @@ -420,12 +420,12 @@ static pthread_key_t tlsIndex; #define malloc_mutex_t CRITICAL_SECTION #define malloc_spinlock_t CRITICAL_SECTION #elif defined(XP_DARWIN) -typedef struct { +struct malloc_mutex_t { OSSpinLock lock; -} malloc_mutex_t; -typedef struct { +}; +struct malloc_spinlock_t { OSSpinLock lock; -} malloc_spinlock_t; +}; #else typedef pthread_mutex_t malloc_mutex_t; typedef pthread_mutex_t malloc_spinlock_t; @@ -449,14 +449,12 @@ static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER; * Statistics data structures. */ -typedef struct malloc_bin_stats_s malloc_bin_stats_t; -struct malloc_bin_stats_s { +struct malloc_bin_stats_t { /* Current number of runs in this bin. */ unsigned long curruns; }; -typedef struct arena_stats_s arena_stats_t; -struct arena_stats_s { +struct arena_stats_t { /* Number of bytes currently mapped. */ size_t mapped; @@ -483,8 +481,7 @@ enum ChunkType { }; /* Tree of extents. */ -typedef struct extent_node_s extent_node_t; -struct extent_node_s { +struct extent_node_t { /* Linkage for the size/address-ordered tree. */ rb_node(extent_node_t) link_szad; @@ -517,8 +514,7 @@ typedef rb_tree(extent_node_t) extent_tree_t; # define MALLOC_RTREE_NODESIZE CACHELINE #endif -typedef struct malloc_rtree_s malloc_rtree_t; -struct malloc_rtree_s { +struct malloc_rtree_t { malloc_spinlock_t lock; void **root; unsigned height; @@ -530,12 +526,11 @@ struct malloc_rtree_s { * Arena data structures. */ -typedef struct arena_s arena_t; -typedef struct arena_bin_s arena_bin_t; +struct arena_t; +struct arena_bin_t; /* Each element of the chunk map corresponds to one page within the chunk. */ -typedef struct arena_chunk_map_s arena_chunk_map_t; -struct arena_chunk_map_s { +struct arena_chunk_map_t { /* * Linkage for run trees. There are two disjoint uses: * @@ -618,8 +613,7 @@ typedef rb_tree(arena_chunk_map_t) arena_avail_tree_t; typedef rb_tree(arena_chunk_map_t) arena_run_tree_t; /* Arena chunk header. */ -typedef struct arena_chunk_s arena_chunk_t; -struct arena_chunk_s { +struct arena_chunk_t { /* Arena that owns the chunk. */ arena_t *arena; @@ -644,8 +638,7 @@ struct arena_chunk_s { }; typedef rb_tree(arena_chunk_t) arena_chunk_tree_t; -typedef struct arena_run_s arena_run_t; -struct arena_run_s { +struct arena_run_t { #if defined(MOZ_DEBUG) || defined(MOZ_DIAGNOSTIC_ASSERT_ENABLED) uint32_t magic; # define ARENA_RUN_MAGIC 0x384adf93 @@ -664,7 +657,7 @@ struct arena_run_s { unsigned regs_mask[1]; /* Dynamically sized. */ }; -struct arena_bin_s { +struct arena_bin_t { /* * Current run being used to service allocations of this bin's size * class. @@ -699,7 +692,7 @@ struct arena_bin_s { malloc_bin_stats_t stats; }; -struct arena_s { +struct arena_t { #if defined(MOZ_DEBUG) || defined(MOZ_DIAGNOSTIC_ASSERT_ENABLED) uint32_t magic; # define ARENA_MAGIC 0x947d3d24 diff --git a/mfbt/WindowsVersion.h b/mfbt/WindowsVersion.h index 1037fee484f2..bee81bccb28b 100644 --- a/mfbt/WindowsVersion.h +++ b/mfbt/WindowsVersion.h @@ -158,6 +158,41 @@ IsNotWin7PreRTM() return IsWin7SP1OrLater() || IsWindowsBuildOrLater(7600); } +inline bool +IsWin7AndPre2000Compatible() { + /* + * See Bug 1279171. + * We'd like to avoid using WMF on specific OS version when compatibility + * mode is in effect. The purpose of this function is to check if FF runs on + * Win7 OS with application compatibility mode being set to 95/98/ME. + * Those compatibility mode options (95/98/ME) can only display and + * be selected for 32-bit application. + * If the compatibility mode is in effect, the GetVersionEx function will + * report the OS as it identifies itself, which may not be the OS that is + * installed. + * Note : 1) We only target for Win7 build number greater than 7600. + * 2) GetVersionEx may be altered or unavailable for release after + * Win8.1. Set pragma to avoid build warning as error. + */ + bool isWin7 = IsNotWin7PreRTM() && !IsWin8OrLater(); + if (!isWin7) { + return false; + } + + OSVERSIONINFOEX info; + ZeroMemory(&info, sizeof(OSVERSIONINFOEX)); + + info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); +#pragma warning(push) +#pragma warning(disable:4996) + bool success = GetVersionEx((LPOSVERSIONINFO) &info); +#pragma warning(pop) + if (!success) { + return false; + } + return info.dwMajorVersion < 5; +} + } // namespace mozilla #endif /* mozilla_WindowsVersion_h */ diff --git a/mobile/android/app/src/photon/res/drawable-hdpi/reading_list_folder.png b/mobile/android/app/src/photon/res/drawable-hdpi/reading_list_folder.png index b638a3e2205b..29b1a573340e 100644 Binary files a/mobile/android/app/src/photon/res/drawable-hdpi/reading_list_folder.png and b/mobile/android/app/src/photon/res/drawable-hdpi/reading_list_folder.png differ diff --git a/mobile/android/app/src/photon/res/drawable-xhdpi/reading_list_folder.png b/mobile/android/app/src/photon/res/drawable-xhdpi/reading_list_folder.png index adb778eb8aaf..4145da44fc85 100644 Binary files a/mobile/android/app/src/photon/res/drawable-xhdpi/reading_list_folder.png and b/mobile/android/app/src/photon/res/drawable-xhdpi/reading_list_folder.png differ diff --git a/mobile/android/app/src/photon/res/drawable-xxhdpi/reading_list_folder.png b/mobile/android/app/src/photon/res/drawable-xxhdpi/reading_list_folder.png index 0d5bf3872e7b..89d797361049 100644 Binary files a/mobile/android/app/src/photon/res/drawable-xxhdpi/reading_list_folder.png and b/mobile/android/app/src/photon/res/drawable-xxhdpi/reading_list_folder.png differ diff --git a/mobile/android/app/src/photon/res/drawable-xxxhdpi/reading_list_folder.png b/mobile/android/app/src/photon/res/drawable-xxxhdpi/reading_list_folder.png index de101cc91be2..2631a8532dbe 100644 Binary files a/mobile/android/app/src/photon/res/drawable-xxxhdpi/reading_list_folder.png and b/mobile/android/app/src/photon/res/drawable-xxxhdpi/reading_list_folder.png differ diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index 00b757f26ae1..1a51c2f035c9 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -3720,7 +3720,7 @@ public class BrowserApp extends GeckoApp private int resolveMenuIconTint(final boolean isPrivate) { final int tintResId; - if (isPrivate && HardwareUtils.isTablet()) { + if (isPrivate && HardwareUtils.isLargeTablet()) { tintResId = R.color.menu_item_tint_private; } else { tintResId = R.color.menu_item_tint; diff --git a/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java b/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java index 188889308052..00557c8482ef 100644 --- a/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java @@ -18,6 +18,7 @@ import android.text.TextUtils; import android.util.Log; import org.mozilla.gecko.Experiments; +import org.mozilla.gecko.GeckoThread; import org.mozilla.gecko.MmaConstants; import org.mozilla.gecko.PrefsHelper; import org.mozilla.gecko.R; @@ -64,6 +65,7 @@ public class MmaDelegate { private static final String[] PREFS = { KEY_PREF_BOOLEAN_MMA_ENABLED }; + @Deprecated private static boolean isGeckoPrefOn = false; private static MmaInterface mmaHelper = MmaConstants.getMma(); private static WeakReference applicationContext; @@ -92,7 +94,6 @@ public class MmaDelegate { // Note that generateUserAttribute always return a non null HashMap. Map attributes = gatherUserAttributes(activity); mmaHelper.setGcmSenderId(PushManager.getSenderIds()); - mmaHelper.setCustomIcon(R.drawable.ic_status_logo); mmaHelper.init(activity, attributes); if (!isDefaultBrowser(activity)) { @@ -123,52 +124,59 @@ public class MmaDelegate { return attributes; } - public static void track(String event) { - if (isMmaEnabled()) { + if (applicationContext != null && isMmaEnabled(applicationContext.get())) { mmaHelper.event(event); } } + public static void track(String event, long value) { - if (isMmaEnabled()) { + if (applicationContext != null && isMmaEnabled(applicationContext.get())) { mmaHelper.event(event, value); } } - private static boolean isMmaEnabled() { - if (applicationContext == null) { - return false; - } + // isMmaEnabled should use pass-in context. The context comes from + // 1. track(), it's called from UI (where we inject events). Context is from weak reference to Activity (assigned in init()) + // 2. handleGcmMessage(), it's called from GcmListenerService (where we handle GCM messages). Context is from the Service + private static boolean isMmaEnabled(Context context) { - final Context context = applicationContext.get(); if (context == null) { return false; } - final boolean healthReport = GeckoPreferences.getBooleanPref(context, GeckoPreferences.PREFS_HEALTHREPORT_UPLOAD_ENABLED, true); final boolean inExperiment = SwitchBoard.isInExperiment(context, Experiments.LEANPLUM); final Tab selectedTab = Tabs.getInstance().getSelectedTab(); - // if selected tab is null or private, mma should be disabled. - final boolean isInPrivateBrowsing = selectedTab == null || selectedTab.isPrivate(); - return inExperiment && healthReport && isGeckoPrefOn && !isInPrivateBrowsing; + + // if selected tab is private, mma should be disabled. + final boolean isInPrivateBrowsing = selectedTab != null && selectedTab.isPrivate(); + // only check Gecko Pref when Gecko is running + // FIXME : Remove isGeckoPrefOn in bug 1396714 + final boolean skipGeckoPrefCheck = !GeckoThread.isRunning(); + return inExperiment && (skipGeckoPrefCheck || isGeckoPrefOn) && healthReport && !isInPrivateBrowsing; } - public static boolean isDefaultBrowser(Context context) { + private static boolean isDefaultBrowser(Context context) { final Intent viewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.mozilla.org")); final ResolveInfo info = context.getPackageManager().resolveActivity(viewIntent, PackageManager.MATCH_DEFAULT_ONLY); if (info == null) { // No default is set return false; } - final String packageName = info.activityInfo.packageName; return (TextUtils.equals(packageName, context.getPackageName())); } + // Always use pass-in context. Do not use applicationContext here. applicationContext will be null if MmaDelegate.init() is not called. public static boolean handleGcmMessage(@NonNull Context context, String from, @NonNull Bundle bundle) { - return isMmaEnabled() && mmaHelper.handleGcmMessage(context, from, bundle); + if (isMmaEnabled(context)) { + mmaHelper.setCustomIcon(R.drawable.ic_status_logo); + return mmaHelper.handleGcmMessage(context, from, bundle); + } else { + return false; + } } public static String getMmaSenderId() { diff --git a/mobile/android/chrome/content/aboutAddons.js b/mobile/android/chrome/content/aboutAddons.js index 580237ae1a04..a81c8a45a4b8 100644 --- a/mobile/android/chrome/content/aboutAddons.js +++ b/mobile/android/chrome/content/aboutAddons.js @@ -397,7 +397,7 @@ var Addons = { // Allow the options to use all the available width space. optionsBox.classList.remove("inner"); - this.createWebExtensionOptions(optionsBox, addon); + this.createWebExtensionOptions(optionsBox, addon, addonItem); break; case AddonManager.OPTIONS_TYPE_TAB: // Keep the usual layout for any options related the legacy (or system) add-ons @@ -405,7 +405,7 @@ var Addons = { // details page. optionsBox.classList.add("inner"); - this.createOptionsInTabButton(optionsBox, addon); + this.createOptionsInTabButton(optionsBox, addon, addonItem); break; case AddonManager.OPTIONS_TYPE_INLINE: // Keep the usual layout for any options related the legacy (or system) add-ons. @@ -418,7 +418,7 @@ var Addons = { showAddonOptions(); }, - createOptionsInTabButton: function(destination, addon) { + createOptionsInTabButton: function(destination, addon, detailItem) { let frame = destination.querySelector("iframe#addon-options"); let button = destination.querySelector("button#open-addon-options"); @@ -446,9 +446,13 @@ var Addons = { const {optionsURL} = addon; openOptionsInTab(optionsURL); }; + + // Ensure that the Addon Options are visible (the options box will be hidden if the optionsURL + // attribute is an empty string, which happens when a WebExtensions is still loading). + detailItem.removeAttribute("optionsURL"); }, - createWebExtensionOptions: async function(destination, addon) { + createWebExtensionOptions: async function(destination, addon, detailItem) { // WebExtensions are loaded asynchronously and the optionsURL // may not be available until the addon has been started. await addon.startupPromise; @@ -493,6 +497,10 @@ var Addons = { // Loading the URL this way prevents the native back // button from applying to the iframe. frame.contentWindow.location.replace(optionsURL); + + // Ensure that the Addon Options are visible (the options box will be hidden if the optionsURL + // attribute is an empty string, which happens when a WebExtensions is still loading). + detailItem.removeAttribute("optionsURL"); }, createInlineOptions(destination, optionsURL, aListItem) { diff --git a/mobile/android/chrome/jar.mn b/mobile/android/chrome/jar.mn index 0f3e39569693..791f0ec94992 100644 --- a/mobile/android/chrome/jar.mn +++ b/mobile/android/chrome/jar.mn @@ -66,3 +66,34 @@ chrome.jar: % override chrome://global/content/config.xul chrome://browser/content/config.xhtml % override chrome://global/content/netError.xhtml chrome://browser/content/netError.xhtml % override chrome://mozapps/content/extensions/extensions.xul chrome://browser/content/aboutAddons.xhtml + +# L10n resource overrides. +% override chrome://global/locale/about.dtd chrome://browser/locale/overrides/about.dtd +% override chrome://global/locale/aboutAbout.dtd chrome://browser/locale/overrides/aboutAbout.dtd +% override chrome://global/locale/aboutReader.properties chrome://browser/locale/overrides/aboutReader.properties +% override chrome://global/locale/aboutRights.dtd chrome://browser/locale/overrides/aboutRights.dtd +% override chrome://global/locale/charsetMenu.properties chrome://browser/locale/overrides/charsetMenu.properties +% override chrome://global/locale/commonDialogs.properties chrome://browser/locale/overrides/commonDialogs.properties +% override chrome://global/locale/intl.properties chrome://browser/locale/overrides/intl.properties +% override chrome://global/locale/intl.css chrome://browser/locale/overrides/intl.css +% override chrome://global/locale/search/search.properties chrome://browser/locale/overrides/search/search.properties +% override chrome://pluginproblem/locale/pluginproblem.dtd chrome://browser/locale/overrides/plugins/pluginproblem.dtd +% override chrome://global/locale/aboutSupport.dtd chrome://browser/locale/overrides/global/aboutSupport.dtd +% override chrome://global/locale/aboutSupport.properties chrome://browser/locale/overrides/global/aboutSupport.properties +% override chrome://global/locale/crashes.dtd chrome://browser/locale/overrides/crashreporter/crashes.dtd +% override chrome://global/locale/crashes.properties chrome://browser/locale/overrides/crashreporter/crashes.properties +% override chrome://global/locale/mozilla.dtd chrome://browser/locale/overrides/global/mozilla.dtd +% override chrome://global/locale/aboutTelemetry.dtd chrome://browser/locale/overrides/global/aboutTelemetry.dtd +% override chrome://global/locale/aboutTelemetry.properties chrome://browser/locale/overrides/global/aboutTelemetry.properties +% override chrome://global/locale/aboutWebrtc.properties chrome://browser/locale/overrides/global/aboutWebrtc.properties + +# overrides for dom l10n, also for en-US +# keep this file list in sync with filter.py +% override chrome://global/locale/global.dtd chrome://browser/locale/overrides/global.dtd +% override chrome://global/locale/AccessFu.properties chrome://browser/locale/overrides/AccessFu.properties +% override chrome://global/locale/dom/dom.properties chrome://browser/locale/overrides/dom/dom.properties +% override chrome://global/locale/plugins.properties chrome://browser/locale/overrides/plugins.properties + +# mobile/locales/jar.mn overrides +% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd +% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties diff --git a/mobile/android/components/extensions/ext-browsingData.js b/mobile/android/components/extensions/ext-browsingData.js index 83e10db9c6cb..88365b0a5cf9 100644 --- a/mobile/android/components/extensions/ext-browsingData.js +++ b/mobile/android/components/extensions/ext-browsingData.js @@ -11,13 +11,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "Services", XPCOMUtils.defineLazyModuleGetter(this, "SharedPreferences", "resource://gre/modules/SharedPreferences.jsm"); -let clearCookies = async function(options) { - if (options.originTypes && - (options.originTypes.protectedWeb || options.originTypes.extension)) { - return Promise.reject( - {message: "Firefox does not support protectedWeb or extension as originTypes."}); - } +const clearCache = () => { + // Clearing the cache does not support timestamps. + return Sanitizer.clearItem("cache"); +}; +const clearCookies = async function(options) { let cookieMgr = Services.cookies; let yieldCounter = 0; const YIELD_PERIOD = 10; @@ -46,8 +45,53 @@ let clearCookies = async function(options) { } }; +const clearDownloads = options => { + return Sanitizer.clearItem("downloadHistory", options.since); +}; + +const clearFormData = options => { + return Sanitizer.clearItem("formdata", options.since); +}; + +const doRemoval = (options, dataToRemove, extension) => { + if (options.originTypes && + (options.originTypes.protectedWeb || options.originTypes.extension)) { + return Promise.reject( + {message: "Firefox does not support protectedWeb or extension as originTypes."}); + } + + let removalPromises = []; + let invalidDataTypes = []; + for (let dataType in dataToRemove) { + if (dataToRemove[dataType]) { + switch (dataType) { + case "cache": + removalPromises.push(clearCache()); + break; + case "cookies": + removalPromises.push(clearCookies(options)); + break; + case "downloads": + removalPromises.push(clearDownloads(options)); + break; + case "formData": + removalPromises.push(clearFormData(options)); + break; + default: + invalidDataTypes.push(dataType); + } + } + } + if (extension && invalidDataTypes.length) { + extension.logger.warn( + `Firefox does not support dataTypes: ${invalidDataTypes.toString()}.`); + } + return Promise.all(removalPromises); +}; + this.browsingData = class extends ExtensionAPI { getAPI(context) { + let {extension} = context; return { browsingData: { settings() { @@ -88,17 +132,20 @@ this.browsingData = class extends ExtensionAPI { // so, since value is given 0, which means Everything return Promise.resolve({options: {since: 0}, dataToRemove, dataRemovalPermitted}); }, - removeCookies(options) { - return clearCookies(options); + remove(options, dataToRemove) { + return doRemoval(options, dataToRemove, extension); }, removeCache(options) { - return Sanitizer.clearItem("cache"); + return doRemoval(options, {cache: true}); + }, + removeCookies(options) { + return doRemoval(options, {cookies: true}); }, removeDownloads(options) { - return Sanitizer.clearItem("downloadHistory", options.since); + return doRemoval(options, {downloads: true}); }, removeFormData(options) { - return Sanitizer.clearItem("formdata", options.since); + return doRemoval(options, {formData: true}); }, }, }; diff --git a/mobile/android/components/extensions/schemas/browsing_data.json b/mobile/android/components/extensions/schemas/browsing_data.json index e48a17a68218..e89107872f4a 100644 --- a/mobile/android/components/extensions/schemas/browsing_data.json +++ b/mobile/android/components/extensions/schemas/browsing_data.json @@ -162,7 +162,6 @@ "description": "Clears various types of browsing data stored in a user's profile.", "type": "function", "async": "callback", - "unsupported": true, "parameters": [ { "$ref": "RemovalOptions", diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_cookies_cache.html b/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_cookies_cache.html index aa943259a8fe..4990f9be7f90 100644 --- a/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_cookies_cache.html +++ b/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_cookies_cache.html @@ -45,7 +45,11 @@ async function setUpCookies() { add_task(async function testCookies() { function background() { browser.test.onMessage.addListener(async (msg, options) => { - await browser.browsingData.removeCookies(options); + if (msg == "removeCookies") { + await browser.browsingData.removeCookies(options); + } else { + await browser.browsingData.remove(options, {cookies: true}); + } browser.test.sendMessage("cookiesRemoved"); }); } @@ -89,6 +93,7 @@ add_task(async function testCookies() { await extension.startup(); await testRemovalMethod("removeCookies"); + await testRemovalMethod("remove"); await extension.unload(); }); @@ -98,6 +103,8 @@ add_task(async function testCache() { browser.test.onMessage.addListener(async msg => { if (msg == "removeCache") { await browser.browsingData.removeCache({}); + } else { + await browser.browsingData.remove({}, {cache: true}); } browser.test.sendMessage("cacheRemoved"); }); @@ -133,6 +140,7 @@ add_task(async function testCache() { await extension.startup(); await testRemovalMethod("removeCache"); + await testRemovalMethod("remove"); await extension.unload(); }); diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_downloads.html b/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_downloads.html index 44dcd7156463..c517ab089b5d 100644 --- a/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_downloads.html +++ b/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_downloads.html @@ -77,7 +77,11 @@ async function setupDownloads() { add_task(async function testDownloads() { function background() { browser.test.onMessage.addListener(async (msg, options) => { - await browser.browsingData.removeDownloads(options); + if (msg == "removeDownloads") { + await browser.browsingData.removeDownloads(options); + } else { + await browser.browsingData.remove(options, {downloads: true}); + } browser.test.sendMessage("downloadsRemoved"); }); } @@ -112,6 +116,7 @@ add_task(async function testDownloads() { await extension.startup(); await testRemovalMethod("removeDownloads"); + await testRemovalMethod("remove"); await extension.unload(); }); diff --git a/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_formdata.html b/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_formdata.html index 106c6f9316a9..ec047c098242 100644 --- a/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_formdata.html +++ b/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_formdata.html @@ -94,7 +94,11 @@ async function setupFormHistory() { add_task(async function testFormData() { function background() { browser.test.onMessage.addListener(async (msg, options) => { - await browser.browsingData.removeFormData(options); + if (msg == "removeFormData") { + await browser.browsingData.removeFormData(options); + } else { + await browser.browsingData.remove(options, {formData: true}); + } browser.test.sendMessage("formDataRemoved"); }); } @@ -138,6 +142,7 @@ add_task(async function testFormData() { await extension.startup(); await testRemovalMethod("removeFormData"); + await testRemovalMethod("remove"); await extension.unload(); }); diff --git a/mobile/android/locales/jar.mn b/mobile/android/locales/jar.mn index 12501037a973..1cfb0d2723f2 100644 --- a/mobile/android/locales/jar.mn +++ b/mobile/android/locales/jar.mn @@ -3,6 +3,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Note: All overrides should go to mobile/android/chrome/jar.mn in order to avoid +# having to create the same override entry for each locale. @AB_CD@.jar: % locale browser @AB_CD@ %locale/@AB_CD@/browser/ @@ -64,25 +66,6 @@ relativesrcdir toolkit/locales: #about:webrtc locale/@AB_CD@/browser/overrides/global/aboutWebrtc.properties (%chrome/global/aboutWebrtc.properties) -% override chrome://global/locale/about.dtd chrome://browser/locale/overrides/about.dtd -% override chrome://global/locale/aboutAbout.dtd chrome://browser/locale/overrides/aboutAbout.dtd -% override chrome://global/locale/aboutReader.properties chrome://browser/locale/overrides/aboutReader.properties -% override chrome://global/locale/aboutRights.dtd chrome://browser/locale/overrides/aboutRights.dtd -% override chrome://global/locale/charsetMenu.properties chrome://browser/locale/overrides/charsetMenu.properties -% override chrome://global/locale/commonDialogs.properties chrome://browser/locale/overrides/commonDialogs.properties -% override chrome://global/locale/intl.properties chrome://browser/locale/overrides/intl.properties -% override chrome://global/locale/intl.css chrome://browser/locale/overrides/intl.css -% override chrome://global/locale/search/search.properties chrome://browser/locale/overrides/search/search.properties -% override chrome://pluginproblem/locale/pluginproblem.dtd chrome://browser/locale/overrides/plugins/pluginproblem.dtd -% override chrome://global/locale/aboutSupport.dtd chrome://browser/locale/overrides/global/aboutSupport.dtd -% override chrome://global/locale/aboutSupport.properties chrome://browser/locale/overrides/global/aboutSupport.properties -% override chrome://global/locale/crashes.dtd chrome://browser/locale/overrides/crashreporter/crashes.dtd -% override chrome://global/locale/crashes.properties chrome://browser/locale/overrides/crashreporter/crashes.properties -% override chrome://global/locale/mozilla.dtd chrome://browser/locale/overrides/global/mozilla.dtd -% override chrome://global/locale/aboutTelemetry.dtd chrome://browser/locale/overrides/global/aboutTelemetry.dtd -% override chrome://global/locale/aboutTelemetry.properties chrome://browser/locale/overrides/global/aboutTelemetry.properties -% override chrome://global/locale/aboutWebrtc.properties chrome://browser/locale/overrides/global/aboutWebrtc.properties - # overrides for dom l10n, also for en-US # keep this file list in sync with filter.py relativesrcdir dom/locales: @@ -91,8 +74,3 @@ relativesrcdir dom/locales: locale/@AB_CD@/browser/overrides/dom/dom.properties (%chrome/dom/dom.properties) #about:plugins locale/@AB_CD@/browser/overrides/plugins.properties (%chrome/plugins.properties) - -% override chrome://global/locale/global.dtd chrome://browser/locale/overrides/global.dtd -% override chrome://global/locale/AccessFu.properties chrome://browser/locale/overrides/AccessFu.properties -% override chrome://global/locale/dom/dom.properties chrome://browser/locale/overrides/dom/dom.properties -% override chrome://global/locale/plugins.properties chrome://browser/locale/overrides/plugins.properties diff --git a/mobile/locales/jar.mn b/mobile/locales/jar.mn index 2f16c28bfb0d..7565acffe3ba 100644 --- a/mobile/locales/jar.mn +++ b/mobile/locales/jar.mn @@ -3,6 +3,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Note: All overrides should go to mobile/android/chrome/jar.mn in order to avoid +# having to create the same override entry for each locale. @AB_CD@.jar: % locale browser @AB_CD@ %locale/@AB_CD@/browser/ @@ -10,6 +12,4 @@ # Fennec-specific overrides of generic strings locale/@AB_CD@/browser/netError.dtd (%overrides/netError.dtd) -% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd locale/@AB_CD@/browser/appstrings.properties (%overrides/appstrings.properties) -% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties diff --git a/netwerk/base/ProxyAutoConfig.cpp b/netwerk/base/ProxyAutoConfig.cpp index 8a07cb7084c9..bbc39b32212c 100644 --- a/netwerk/base/ProxyAutoConfig.cpp +++ b/netwerk/base/ProxyAutoConfig.cpp @@ -872,6 +872,7 @@ ProxyAutoConfig::GC() ProxyAutoConfig::~ProxyAutoConfig() { MOZ_COUNT_DTOR(ProxyAutoConfig); + MOZ_ASSERT(mShutdown, "Shutdown must be called before dtor."); NS_ASSERTION(!mJSContext, "~ProxyAutoConfig leaking JS context that " "should have been deleted on pac thread"); @@ -882,8 +883,9 @@ ProxyAutoConfig::Shutdown() { MOZ_ASSERT(!NS_IsMainThread(), "wrong thread for shutdown"); - if (GetRunning() || mShutdown) + if (NS_WARN_IF(GetRunning()) || mShutdown) { return; + } mShutdown = true; delete mJSContext; diff --git a/netwerk/base/RequestContextService.cpp b/netwerk/base/RequestContextService.cpp index e064a45f6d25..11fcd84c0d60 100644 --- a/netwerk/base/RequestContextService.cpp +++ b/netwerk/base/RequestContextService.cpp @@ -27,6 +27,9 @@ LazyLogModule gRequestContextLog("RequestContext"); #undef LOG #define LOG(args) MOZ_LOG(gRequestContextLog, LogLevel::Info, args) +// This is used to prevent adding tail pending requests after shutdown +static bool sShutdown = false; + // nsIRequestContext class RequestContext final : public nsIRequestContext , public nsITimerCallback @@ -335,6 +338,10 @@ RequestContext::IsContextTailBlocked(nsIRequestTailUnblockCallback * aRequest, *aBlocked = false; + if (sShutdown) { + return NS_ERROR_ILLEGAL_DURING_SHUTDOWN; + } + if (mUntailAt.IsNull()) { LOG((" untail time passed")); return NS_OK; @@ -459,7 +466,13 @@ void RequestContextService::Shutdown() { MOZ_ASSERT(NS_IsMainThread()); + // We need to do this to prevent the requests from being scheduled after + // shutdown. + for (auto iter = mTable.Iter(); !iter.Done(); iter.Next()) { + iter.Data()->CancelTailPendingRequests(NS_ERROR_ABORT); + } mTable.Clear(); + sShutdown = true; } /* static */ nsresult @@ -484,6 +497,10 @@ RequestContextService::GetRequestContext(const uint64_t rcID, nsIRequestContext NS_ENSURE_ARG_POINTER(rc); *rc = nullptr; + if (sShutdown) { + return NS_ERROR_ILLEGAL_DURING_SHUTDOWN; + } + if (!mTable.Get(rcID, rc)) { nsCOMPtr newSC = new RequestContext(rcID); mTable.Put(rcID, newSC); @@ -514,6 +531,10 @@ RequestContextService::NewRequestContext(nsIRequestContext **rc) NS_ENSURE_ARG_POINTER(rc); *rc = nullptr; + if (sShutdown) { + return NS_ERROR_ILLEGAL_DURING_SHUTDOWN; + } + uint64_t rcID = ((static_cast(mRCIDNamespace) << 32) & 0xFFFFFFFF00000000LL) | mNextRCID++; nsCOMPtr newSC = new RequestContext(rcID); diff --git a/netwerk/base/nsPACMan.cpp b/netwerk/base/nsPACMan.cpp index 28e253517905..fbcceeed7ae6 100644 --- a/netwerk/base/nsPACMan.cpp +++ b/netwerk/base/nsPACMan.cpp @@ -348,6 +348,8 @@ nsPACMan::nsPACMan(nsIEventTarget *mainThreadEventTarget) nsPACMan::~nsPACMan() { + MOZ_ASSERT(mShutdown, "Shutdown must be called before dtor."); + if (mPACThread) { if (NS_IsMainThread()) { mPACThread->Shutdown(); @@ -371,6 +373,8 @@ nsPACMan::Shutdown() } mShutdown = true; CancelExistingLoad(); + + MOZ_ASSERT(mPACThread, "mPAC requires mPACThread to shutdown"); PostCancelPendingQ(NS_ERROR_ABORT); RefPtr runnable = new WaitForThreadShutdown(this); diff --git a/netwerk/protocol/res/ExtensionProtocolHandler.cpp b/netwerk/protocol/res/ExtensionProtocolHandler.cpp index 8f0e1b616a65..d42b39cc2270 100644 --- a/netwerk/protocol/res/ExtensionProtocolHandler.cpp +++ b/netwerk/protocol/res/ExtensionProtocolHandler.cpp @@ -111,7 +111,8 @@ class ExtensionStreamGetter : public RefCounted // because we don't need to ask the parent for an FD for the JAR, but // wrapping the JARChannel in a SimpleChannel allows HTTP forwarding to // moz-extension URI's to work because HTTP forwarding requires the - // target channel implement nsIChildChannel. + // target channel implement nsIChildChannel. mMainThreadEventTarget is + // not used for this case, so don't set it up. explicit ExtensionStreamGetter(already_AddRefed&& aJarChannel) : mJarChannel(Move(aJarChannel)) @@ -119,8 +120,6 @@ class ExtensionStreamGetter : public RefCounted , mIsCachedJar(true) { MOZ_ASSERT(mJarChannel); - - SetupEventTarget(); } ~ExtensionStreamGetter() {} @@ -234,7 +233,7 @@ ExtensionStreamGetter::GetAsync(nsIStreamListener* aListener, nsIChannel* aChannel) { MOZ_ASSERT(IsNeckoChild()); - MOZ_ASSERT(mMainThreadEventTarget); + MOZ_ASSERT(mMainThreadEventTarget || mIsCachedJar); mListener = aListener; mChannel = aChannel; @@ -243,7 +242,11 @@ ExtensionStreamGetter::GetAsync(nsIStreamListener* aListener, // parent if the JAR is cached if (mIsCachedJar) { MOZ_ASSERT(mIsJarChannel); - mJarChannel->AsyncOpen2(mListener); + nsresult rv = mJarChannel->AsyncOpen2(mListener); + if (NS_FAILED(rv)) { + mChannel->Cancel(NS_BINDING_ABORTED); + return Result(rv); + } return Ok(); } diff --git a/python/mozbuild/mozbuild/action/langpack_manifest.py b/python/mozbuild/mozbuild/action/langpack_manifest.py index 84effd57ea6b..547d2d660cdd 100644 --- a/python/mozbuild/mozbuild/action/langpack_manifest.py +++ b/python/mozbuild/mozbuild/action/langpack_manifest.py @@ -219,7 +219,9 @@ def parse_chrome_manifest(path, base_path, chrome_entries): # locstr (str) - A string with a comma separated list of locales # for which resources are embedded in the # language pack -# appver (str) - A version of the application the language +# min_app_ver (str) - A minimum version of the application the language +# resources are for +# max_app_ver (str) - A maximum version of the application the language # resources are for # defines (dict) - A dictionary of defines entries # chrome_entries (dict) - A dictionary of chrome registry entries @@ -232,6 +234,7 @@ def parse_chrome_manifest(path, base_path, chrome_entries): # ['pl'], # '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}', # '57.0', +# '57.0.*', # {'MOZ_LANG_TITLE': 'Polski'}, # chrome_entries # ) @@ -239,7 +242,6 @@ def parse_chrome_manifest(path, base_path, chrome_entries): # 'languages': { # 'pl': { # 'version': '201709121481', -# 'resources': None, # 'chrome_resources': { # 'alert': 'chrome/pl/locale/pl/alert/', # 'branding': 'browser/chrome/pl/locale/global/', @@ -254,6 +256,11 @@ def parse_chrome_manifest(path, base_path, chrome_entries): # } # } # }, +# 'sources': { +# 'browser': { +# 'base_path': 'browser/' +# } +# }, # 'applications': { # 'gecko': { # 'strict_min_version': '57.0', @@ -266,7 +273,7 @@ def parse_chrome_manifest(path, base_path, chrome_entries): # ... # } ### -def create_webmanifest(locstr, appver, defines, chrome_entries): +def create_webmanifest(locstr, min_app_ver, max_app_ver, defines, chrome_entries): locales = map(lambda loc: loc.strip(), locstr.split(',')) main_locale = locales[0] @@ -281,14 +288,19 @@ def create_webmanifest(locstr, appver, defines, chrome_entries): 'applications': { 'gecko': { 'id': 'langpack-{0}@firefox.mozilla.org'.format(main_locale), - 'strict_min_version': appver, - 'strict_max_version': '{0}.*'.format(appver) + 'strict_min_version': min_app_ver, + 'strict_max_version': max_app_ver, } }, 'name': '{0} Language Pack'.format(defines['MOZ_LANG_TITLE']), 'description': 'Language pack for Firefox for {0}'.format(main_locale), - 'version': appver, + 'version': min_app_ver, 'languages': {}, + 'sources': { + 'browser': { + 'base_path': 'browser/' + } + }, 'author': author } @@ -309,8 +321,7 @@ def create_webmanifest(locstr, appver, defines, chrome_entries): for loc in locales: manifest['languages'][loc] = { - 'version': appver, - 'resources': None, + 'version': min_app_ver, 'chrome_resources': cr } @@ -321,8 +332,10 @@ def main(args): parser = argparse.ArgumentParser() parser.add_argument('--locales', help='List of language codes provided by the langpack') - parser.add_argument('--appver', - help='Version of the application the langpack is for') + parser.add_argument('--min-app-ver', + help='Min version of the application the langpack is for') + parser.add_argument('--max-app-ver', + help='Max version of the application the langpack is for') parser.add_argument('--defines', default=[], nargs='+', help='List of defines files to load data from') parser.add_argument('--input', @@ -338,7 +351,8 @@ def main(args): res = create_webmanifest( args.locales, - args.appver, + args.min_app_ver, + args.max_app_ver, defines, chrome_entries ) diff --git a/security/manager/ssl/StaticHPKPins.h b/security/manager/ssl/StaticHPKPins.h index dd88f6db7807..13d84186b4dc 100644 --- a/security/manager/ssl/StaticHPKPins.h +++ b/security/manager/ssl/StaticHPKPins.h @@ -1140,4 +1140,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = { static const int32_t kUnknownId = -1; -static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1512927270423000); +static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1513012774620000); diff --git a/security/manager/ssl/nsSTSPreloadList.errors b/security/manager/ssl/nsSTSPreloadList.errors index 1bcac4c94328..b9c8d2db5da2 100644 --- a/security/manager/ssl/nsSTSPreloadList.errors +++ b/security/manager/ssl/nsSTSPreloadList.errors @@ -40,7 +40,6 @@ 166166.com: could not connect to host 16deza.com: did not receive HSTS header 16packets.com: could not connect to host -173vpn.cn: could not connect to host 188betwarriors.co.uk: could not connect to host 188trafalgar.ca: did not receive HSTS header 195gm.com: could not connect to host @@ -66,7 +65,7 @@ 2carpros.com: did not receive HSTS header 2intermediate.co.uk: did not receive HSTS header 2or3.tk: could not connect to host -2ss.jp: could not connect to host +2ss.jp: did not receive HSTS header 300651.ru: did not receive HSTS header 300m.com: did not receive HSTS header 300mbmovies4u.cc: could not connect to host @@ -84,7 +83,6 @@ 3778xl.com: did not receive HSTS header 38sihu.com: could not connect to host 39sihu.com: could not connect to host -3ags.de: did not receive HSTS header 3chit.cf: could not connect to host 3click-loan.com: could not connect to host 3d-bastler.de: could not connect to host @@ -108,11 +106,9 @@ 4sqsu.eu: could not connect to host 4w-performers.link: could not connect to host 50millionablaze.org: could not connect to host -517vpn.cn: could not connect to host 540.co: did not receive HSTS header 54bf.com: could not connect to host 56ct.com: could not connect to host -5ece.de: could not connect to host 5piecesofadvice.com: could not connect to host 5w5.la: could not connect to host 60ych.net: did not receive HSTS header @@ -125,6 +121,7 @@ 7kovrikov.ru: did not receive HSTS header 7nw.eu: could not connect to host 7thheavenrestaurant.com: could not connect to host +8.net.co: could not connect to host 808.lv: did not receive HSTS header 83i.net: could not connect to host 88.to: could not connect to host @@ -136,6 +133,7 @@ 960news.ca: could not connect to host 9651678.ru: could not connect to host 99511.fi: did not receive HSTS header +99998522.com: did not receive HSTS header 9point6.com: could not connect to host 9tolife.be: did not receive HSTS header a-intel.com: could not connect to host @@ -309,6 +307,11 @@ alexberts.ch: did not receive HSTS header alexdaulby.com: could not connect to host alexei.su: could not connect to host alexisabarca.com: could not connect to host +alexismeza.com: could not connect to host +alexismeza.com.mx: could not connect to host +alexismeza.dk: could not connect to host +alexismeza.es: could not connect to host +alexismeza.nl: could not connect to host alexvetter.de: could not connect to host alfa24.pro: could not connect to host alilialili.ga: could not connect to host @@ -355,6 +358,11 @@ amerhd.com: did not receive HSTS header american-truck-simulator.de: could not connect to host american-truck-simulator.net: could not connect to host americanworkwear.nl: did not receive HSTS header +ameza.co.uk: could not connect to host +ameza.com.mx: could not connect to host +ameza.io: could not connect to host +ameza.me: could not connect to host +ameza.net: could not connect to host amigogeek.net: could not connect to host amilx.com: could not connect to host amilx.org: could not connect to host @@ -372,7 +380,7 @@ amri.nl: did not receive HSTS header anabol.nl: could not connect to host anadoluefessporkulubu.org: could not connect to host anagra.ms: could not connect to host -analytic-s.ml: could not connect to host +analytic-s.ml: did not receive HSTS header analyticsinmotion.net: could not connect to host ancientkarma.com: could not connect to host andere-gedanken.net: max-age too low: 10 @@ -445,7 +453,6 @@ aozora.moe: could not connect to host apachelounge.com: did not receive HSTS header apaginastore.com.br: did not receive HSTS header aparaatti.org: could not connect to host -apartmanicg.me: did not receive HSTS header apeasternpower.com: could not connect to host api.mega.co.nz: could not connect to host apibot.de: could not connect to host @@ -479,6 +486,7 @@ aquilalab.com: could not connect to host arabdigitalexpression.org: did not receive HSTS header aradulconteaza.ro: could not connect to host aran.me.uk: could not connect to host +arbeitslosenverwaltung.de: did not receive HSTS header arboineuropa.nl: did not receive HSTS header arboleda-hurtado.com: could not connect to host arbu.eu: max-age too low: 2419200 @@ -487,20 +495,20 @@ ardao.me: could not connect to host ardorlabs.se: could not connect to host arewedubstepyet.com: could not connect to host argennon.xyz: could not connect to host -argh.io: could not connect to host arguggi.co.uk: could not connect to host ariacreations.net: did not receive HSTS header aristilabs.com: did not receive HSTS header arlen.io: could not connect to host arlen.se: could not connect to host -arlet.click: could not connect to host armingrodon.de: max-age too low: 0 +arminpech.de: could not connect to host armor.com: did not receive HSTS header armored.ninja: could not connect to host armory.consulting: could not connect to host armory.supplies: could not connect to host armsday.com: could not connect to host armytricka.cz: did not receive HSTS header +aromaclub.nl: did not receive HSTS header aroundme.org: did not receive HSTS header arpa.ph: did not receive HSTS header arpr.co: did not receive HSTS header @@ -509,7 +517,6 @@ arrow-api.nl: did not receive HSTS header arrow-cloud.nl: could not connect to host arrowfunction.com: could not connect to host ars-design.net: could not connect to host -art2web.net: could not connect to host artartefatos.com.br: did not receive HSTS header artesupra.com: did not receive HSTS header arthan.me: could not connect to host @@ -607,6 +614,7 @@ avantmfg.com: did not receive HSTS header avec-ou-sans-ordonnance.fr: could not connect to host avepol.cz: did not receive HSTS header avepol.eu: did not receive HSTS header +avi9526.pp.ua: could not connect to host aviacao.pt: did not receive HSTS header aviodeals.com: could not connect to host avonlearningcampus.com: could not connect to host @@ -644,7 +652,7 @@ badcronjob.com: could not connect to host badenhard.eu: could not connect to host badkamergigant.com: could not connect to host badlink.org: could not connect to host -baff.lu: did not receive HSTS header +baff.lu: could not connect to host bagiobella.com: max-age too low: 0 baiduaccount.com: could not connect to host bailbondsaffordable.com: did not receive HSTS header @@ -661,6 +669,7 @@ banbanchs.com: could not connect to host banchethai.com: did not receive HSTS header bandb.xyz: could not connect to host bandrcrafts.com: did not receive HSTS header +bangzafran.com: did not receive HSTS header banqingdiao.com: could not connect to host barely.sexy: did not receive HSTS header bariller.fr: could not connect to host @@ -724,7 +733,9 @@ beier.io: could not connect to host beikeil.de: did not receive HSTS header belairsewvac.com: could not connect to host belegit.org: could not connect to host +belewpictures.com: could not connect to host belize-firmengruendung.com: could not connect to host +belliash.eu.org: did not receive HSTS header belltower.io: could not connect to host belmontprom.com: could not connect to host bemyvictim.com: max-age too low: 2678400 @@ -783,6 +794,7 @@ bgcparkstad.nl: did not receive HSTS header bgmn.net: max-age too low: 0 bhatia.at: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no] bi.search.yahoo.com: did not receive HSTS header +biblerhymes.com: did not receive HSTS header bidon.ca: did not receive HSTS header bieberium.de: could not connect to host biego.cn: did not receive HSTS header @@ -804,8 +816,6 @@ billninja.com: did not receive HSTS header billrusling.com: could not connect to host bimbo.com: did not receive HSTS header binaryabstraction.com: could not connect to host -binaryappdev.com: did not receive HSTS header -binaryfigments.com: could not connect to host binderapp.net: could not connect to host biofam.ru: did not receive HSTS header bioknowme.com: did not receive HSTS header @@ -837,7 +847,6 @@ bitwrought.net: could not connect to host bivsi.com: could not connect to host bizcms.com: did not receive HSTS header bizon.sk: did not receive HSTS header -biztok.eu: could not connect to host bkb-skandal.ch: could not connect to host black-armada.com: could not connect to host black-armada.com.pl: could not connect to host @@ -887,7 +896,6 @@ bm-trading.nl: did not receive HSTS header bnhlibrary.com: did not receive HSTS header board-buy.ru: could not connect to host boardgamegeeks.de: could not connect to host -boboolo.com: could not connect to host bodo-wolff.de: could not connect to host bodyblog.nl: did not receive HSTS header bodybuilding-legends.com: could not connect to host @@ -939,7 +947,6 @@ brandspray.com: could not connect to host brasilmorar.com: did not receive HSTS header bratteng.xyz: could not connect to host bravz.de: could not connect to host -brefy.com: did not receive HSTS header bregnedalsystems.dk: did not receive HSTS header bremensaki.com: max-age too low: 2592000 brettabel.com: could not connect to host @@ -954,7 +961,7 @@ broken-oak.com: could not connect to host brookechase.com: did not receive HSTS header browserid.org: could not connect to host brunix.net: did not receive HSTS header -brunohenc.from.hr: could not connect to host +brunohenc.from.hr: did not receive HSTS header brunoonline.co.uk: could not connect to host brunoramos.com: could not connect to host brunoramos.org: could not connect to host @@ -966,7 +973,6 @@ bsdug.org: could not connect to host bsociabl.com: could not connect to host btc-e.com: did not receive HSTS header btcdlc.com: could not connect to host -buben.tech: could not connect to host bubulazi.com: did not receive HSTS header bubulazy.com: did not receive HSTS header buch-cuber.de: could not connect to host @@ -1101,7 +1107,6 @@ cancelmyprofile.com: did not receive HSTS header candicontrols.com: did not receive HSTS header candratech.com: could not connect to host candygirl.shop: could not connect to host -candylion.rocks: could not connect to host cannyfoxx.me: could not connect to host canyonshoa.com: did not receive HSTS header capecycles.co.za: did not receive HSTS header @@ -1113,7 +1118,6 @@ captianseb.de: could not connect to host captivatedbytabrett.com: could not connect to host capturethepen.co.uk: could not connect to host car-navi.ph: did not receive HSTS header -car-shop.top: could not connect to host carano-service.de: did not receive HSTS header caraudio69.cz: could not connect to host card-toka.jp: did not receive HSTS header @@ -1122,7 +1126,6 @@ cardstream.com: did not receive HSTS header cardurl.com: did not receive HSTS header careerstuds.com: could not connect to host caringladies.org: could not connect to host -carlandfaith.com: could not connect to host carlo.mx: did not receive HSTS header carlolly.co.uk: could not connect to host carlosalves.info: could not connect to host @@ -1151,7 +1154,6 @@ cavaleria.ro: did not receive HSTS header caveclan.org: did not receive HSTS header cavedevs.de: could not connect to host cavedroid.xyz: could not connect to host -cbdev.de: could not connect to host cbengineeringinc.com: did not receive HSTS header cbhq.net: could not connect to host ccblog.de: did not receive HSTS header @@ -1159,16 +1161,17 @@ cctech.ph: could not connect to host cd.search.yahoo.com: did not receive HSTS header cd0.us: could not connect to host cdcpartners.gov: could not connect to host -cdlcenter.com: could not connect to host cdnb.co: could not connect to host cdndepo.com: could not connect to host cdreporting.co.uk: did not receive HSTS header +cee.io: could not connect to host celeirorural.com.br: did not receive HSTS header celina-reads.de: did not receive HSTS header cellsites.nz: could not connect to host centralpoint.be: did not receive HSTS header centralpoint.nl: did not receive HSTS header centralvacsunlimited.net: could not connect to host +centrationgame.com: could not connect to host centrepoint-community.com: could not connect to host centsforchange.net: did not receive HSTS header ceritamalam.net: could not connect to host @@ -1197,6 +1200,7 @@ chaoswebs.net: did not receive HSTS header charge.co: could not connect to host charityclear.com: did not receive HSTS header charitystreet.co.uk: could not connect to host +charlipopkids.com.au: could not connect to host charnleyhouse.co.uk: max-age too low: 604800 charp.eu: could not connect to host chartpen.com: could not connect to host @@ -1234,13 +1238,15 @@ chlouis.net: could not connect to host chm.vn: did not receive HSTS header chodobien.com: could not connect to host choiralberta.ca: could not connect to host -chon.io: could not connect to host +chonghe.org: did not receive HSTS header chontalpa.pw: could not connect to host choruscrowd.com: could not connect to host +chosenplaintext.org: could not connect to host chotu.net: could not connect to host chris-web.info: could not connect to host chrisandsarahinasia.com: did not receive HSTS header chrisbrakebill.com: could not connect to host +chrisbrown.id.au: could not connect to host chrisfaber.com: could not connect to host chriskirchner.de: could not connect to host chriskyrouac.com: could not connect to host @@ -1251,11 +1257,11 @@ christophercolumbusfoundation.gov: could not connect to host christophersole.com: could not connect to host christophheich.me: could not connect to host chrisupjohn.com: could not connect to host +chromaryu.net: did not receive HSTS header chrome-devtools-frontend.appspot.com: did not receive HSTS header (error ignored - included regardless) chrome.google.com: did not receive HSTS header (error ignored - included regardless) chrst.ph: could not connect to host chua.cf: could not connect to host -chua.family: could not connect to host chulado.com: did not receive HSTS header churchux.co: did not receive HSTS header cidr.ml: could not connect to host @@ -1298,6 +1304,7 @@ clintonbloodworth.com: could not connect to host clintonbloodworth.io: could not connect to host clintwilson.technology: max-age too low: 2592000 clipped4u.com: could not connect to host +closient.com: could not connect to host cloud-project.com: did not receive HSTS header cloud.wtf: could not connect to host cloudapi.vc: could not connect to host @@ -1315,7 +1322,7 @@ cloudstoragemaus.com: could not connect to host cloudstorm.me: could not connect to host cloudstrike.co: could not connect to host cloudwalk.io: did not receive HSTS header -clovissantos.com: could not connect to host +clovissantos.com: did not receive HSTS header clowde.in: could not connect to host clubmate.rocks: could not connect to host clubmix.co.kr: could not connect to host @@ -1415,6 +1422,7 @@ contactbig.com: could not connect to host contactsingapore.sg: did not receive HSTS header containerstatistics.com: could not connect to host contarkos.xyz: could not connect to host +contextplatform.com: could not connect to host continuumgaming.com: could not connect to host controlcenter.gigahost.dk: did not receive HSTS header convert.zone: did not receive HSTS header @@ -1451,6 +1459,7 @@ couponcodeq.com: did not receive HSTS header couragewhispers.ca: could not connect to host coursdeprogrammation.com: could not connect to host coursella.com: did not receive HSTS header +courtlistener.com: could not connect to host covenantbank.net: could not connect to host coverduck.ru: could not connect to host cpuvinf.eu.org: could not connect to host @@ -1466,6 +1475,7 @@ cravelyrics.com: could not connect to host crazifyngers.com: could not connect to host crazy-crawler.de: did not receive HSTS header crazycen.com: could not connect to host +crazycraftland.de: could not connect to host crazycraftland.net: could not connect to host crazyhotseeds.com: did not receive HSTS header crbug.com: did not receive HSTS header (error ignored - included regardless) @@ -1478,12 +1488,12 @@ crendontech.com: could not connect to host crestoncottage.com: could not connect to host criena.net: did not receive HSTS header crimewatch.net.za: could not connect to host +crisissurvivalspecialists.com: could not connect to host cristiandeluxe.com: did not receive HSTS header crizk.com: could not connect to host crockett.io: did not receive HSTS header croome.no-ip.org: could not connect to host crosbug.com: did not receive HSTS header (error ignored - included regardless) -crosscom.ch: could not connect to host crosssec.com: did not receive HSTS header crow.tw: could not connect to host crowd.supply: did not receive HSTS header @@ -1539,7 +1549,6 @@ cubeserver.eu: could not connect to host cubewano.com: could not connect to host cucc.date: did not receive HSTS header cujanovic.com: did not receive HSTS header -cujba.com: could not connect to host culinae.nl: could not connect to host culture-school.top: could not connect to host cumshots-video.ru: could not connect to host @@ -1561,7 +1570,8 @@ cyberlab.kiev.ua: did not receive HSTS header cyberpunk.ca: could not connect to host cybershambles.com: could not connect to host cybersmart.co.uk: did not receive HSTS header -cycleluxembourg.lu: did not receive HSTS header +cyclehackluxembourgcity.lu: could not connect to host +cycleluxembourg.lu: could not connect to host cydia-search.io: could not connect to host cyhour.com: did not receive HSTS header cynoshair.com: could not connect to host @@ -1609,7 +1619,6 @@ danrl.de: could not connect to host danwillenberg.com: did not receive HSTS header daolerp.xyz: could not connect to host daplie.com: did not receive HSTS header -daracokorilo.com: did not receive HSTS header dargasia.is: could not connect to host dario.im: could not connect to host dark-x.cf: could not connect to host @@ -1662,7 +1671,6 @@ dcuofriends.net: could not connect to host dcurt.is: did not receive HSTS header dcw.io: did not receive HSTS header ddatsh.com: could not connect to host -ddepot.us: did not receive HSTS header debank.tv: did not receive HSTS header debatch.se: could not connect to host debian-vhost.de: did not receive HSTS header @@ -1724,6 +1732,10 @@ detalhecomercio.com.br: did not receive HSTS header detector.exposed: could not connect to host detest.org: could not connect to host detutorial.com: max-age too low: 0 +deux.solutions: could not connect to host +deuxsol.co: could not connect to host +deuxsol.com: could not connect to host +deuxsolutions.com: could not connect to host deuxvia.com: could not connect to host dev-aegon.azurewebsites.net: did not receive HSTS header devafterdark.com: could not connect to host @@ -1753,7 +1765,6 @@ dicando.com: max-age too low: 2592000 dicelab.co.uk: could not connect to host dicgaming.net: could not connect to host dicionariofinanceiro.com: did not receive HSTS header -dickieslife.com: could not connect to host didierlaumen.be: could not connect to host die-borts.ch: could not connect to host dierenkruiden.nl: could not connect to host @@ -1803,6 +1814,7 @@ dmix.ca: could not connect to host dmtry.me: did not receive HSTS header dmwall.cn: could not connect to host dmz.ninja: could not connect to host +dndtools.net: could not connect to host dns.google.com: did not receive HSTS header (error ignored - included regardless) dnsknowledge.com: did not receive HSTS header do-do.tk: could not connect to host @@ -1824,6 +1836,7 @@ dojin.nagoya: could not connect to host dokan.online: did not receive HSTS header doked.io: could not connect to host dolevik.com: could not connect to host +doli.se: could not connect to host dollarstore24.com: could not connect to host dollywiki.co.uk: could not connect to host dolphin-cloud.com: could not connect to host @@ -1853,6 +1866,7 @@ dot42.no: could not connect to host dotacni-parazit.cz: did not receive HSTS header dotadata.me: could not connect to host dotspaperie.com: could not connect to host +dougferris.id.au: could not connect to host doujin.nagoya: could not connect to host dovecotadmin.org: could not connect to host doveholesband.co.uk: did not receive HSTS header @@ -1981,6 +1995,7 @@ edelblack.ch: could not connect to host edelsteincosmetic.com: did not receive HSTS header eden-noel.at: could not connect to host edenaya.com: could not connect to host +edgar.cloud: could not connect to host edgereinvent.com: did not receive HSTS header ediscomp.sk: did not receive HSTS header edissecurity.sk: did not receive HSTS header @@ -2041,7 +2056,6 @@ elemprendedor.com.ve: did not receive HSTS header elenag.ga: could not connect to host elenoon.ir: did not receive HSTS header elgacien.de: could not connect to host -elhall.ru: did not receive HSTS header elimdengelen.com: did not receive HSTS header elite-porno.ru: could not connect to host elitefishtank.com: could not connect to host @@ -2086,6 +2100,7 @@ endohaus.com: could not connect to host endohaus.eu: could not connect to host enefan.jp: could not connect to host engelwerbung.com: did not receive HSTS header +engg.ca: could not connect to host enginsight.com: did not receive HSTS header englishyamal.ru: did not receive HSTS header enigmacpt.com: did not receive HSTS header @@ -2171,7 +2186,7 @@ etheria-software.tk: did not receive HSTS header ethicalexploiting.com: could not connect to host ethicall.org.uk: did not receive HSTS header ethil-faer.fr: could not connect to host -ethlan.fr: max-age too low: 0 +ethlan.fr: could not connect to host etk2000.com: did not receive HSTS header etmirror.top: could not connect to host etmirror.xyz: could not connect to host @@ -2268,6 +2283,7 @@ famio.cn: could not connect to host fantasyfootballpundit.com: did not receive HSTS header fanyl.cn: could not connect to host farces.com: did not receive HSTS header +farhadexchange.com: did not receive HSTS header farhood.org: did not receive HSTS header fashion.net: did not receive HSTS header fashioncare.cz: did not receive HSTS header @@ -2428,7 +2444,7 @@ fotografosexpertos.com: did not receive HSTS header fotopasja.info: could not connect to host fourchin.net: could not connect to host fourwheelpartloanssimple.com: did not receive HSTS header -foxdev.io: could not connect to host +foxdev.io: did not receive HSTS header foxley-farm.co.uk: did not receive HSTS header foxley-seeds.co.uk: did not receive HSTS header foxleyseeds.co.uk: could not connect to host @@ -2442,12 +2458,10 @@ frankwei.xyz: did not receive HSTS header franta.biz: did not receive HSTS header franta.email: did not receive HSTS header franzt.de: could not connect to host -franzt.ovh: could not connect to host frasesdeamizade.pt: could not connect to host frasys.io: could not connect to host frau-inge.de: could not connect to host fraudempire.com: could not connect to host -frebib.net: could not connect to host freeflow.tv: could not connect to host freelanced.co.za: could not connect to host freelo.cz: did not receive HSTS header @@ -2498,6 +2512,7 @@ futurestarsusa.org: did not receive HSTS header futuretechnologi.es: could not connect to host futureyouhealth.com: did not receive HSTS header fuwafuwa.moe: could not connect to host +fuxwerk.de: could not connect to host fwei.tk: could not connect to host fwest.ovh: did not receive HSTS header fwest98.ovh: did not receive HSTS header @@ -2628,7 +2643,9 @@ getwashdaddy.com: could not connect to host gfm.tech: could not connect to host gfournier.ca: could not connect to host gfwsb.ml: could not connect to host +gglks.com: did not receive HSTS header ggss.ml: could not connect to host +ggx.us: could not connect to host gh16.com.ar: could not connect to host gheorghe-sarcov.ga: could not connect to host gheorghesarcov.ga: could not connect to host @@ -2657,6 +2674,7 @@ gis3m.org: did not receive HSTS header gistfy.com: could not connect to host git-stuff.tk: could not connect to host github.party: did not receive HSTS header +gitstuff.tk: could not connect to host givemyanswer.com: could not connect to host gizzo.sk: could not connect to host gl.search.yahoo.com: did not receive HSTS header @@ -2682,7 +2700,6 @@ gm.search.yahoo.com: did not receive HSTS header gmail.com: did not receive HSTS header (error ignored - included regardless) gmat.ovh: could not connect to host gmoes.at: max-age too low: 600000 -gnilebein.de: could not connect to host go.ax: did not receive HSTS header go2sh.de: did not receive HSTS header goabonga.com: could not connect to host @@ -2693,6 +2710,8 @@ goat.chat: did not receive HSTS header goat.xyz: max-age too low: 86400 goben.ch: could not connect to host goblins.net: did not receive HSTS header +godsofhell.com: did not receive HSTS header +godsofhell.de: did not receive HSTS header goedeke.ml: could not connect to host goerner.me: did not receive HSTS header goge.site: could not connect to host @@ -2710,7 +2729,6 @@ golocal-media.de: could not connect to host gong8.win: could not connect to host gonzalosanchez.mx: did not receive HSTS header goodenough.nz: did not receive HSTS header -goodmengroup.de: could not connect to host goodtech.com.br: could not connect to host goodwin43.ru: could not connect to host google: could not connect to host (error ignored - included regardless) @@ -2722,7 +2740,8 @@ goozz.nl: did not receive HSTS header gopay.cz: did not receive HSTS header gopokego.cz: could not connect to host gorilla-gym.site: could not connect to host -gorillow.com: did not receive HSTS header +gorillow.com: could not connect to host +gorn.ch: could not connect to host goshop.cz: did not receive HSTS header gotgenes.com: could not connect to host goto.google.com: did not receive HSTS header (error ignored - included regardless) @@ -2762,6 +2781,8 @@ greenhillantiques.co.uk: did not receive HSTS header greenvines.com.tw: did not receive HSTS header greenvpn.ltd: could not connect to host greg.red: could not connect to host +gregmilton.com: could not connect to host +gregmilton.org: could not connect to host gregorytlee.me: could not connect to host gremots.com: could not connect to host greplin.com: could not connect to host @@ -2936,6 +2957,7 @@ hduin.xyz: could not connect to host hdwallpapers.net: did not receive HSTS header head-shop.lt: could not connect to host head-shop.lv: could not connect to host +headmates.xyz: could not connect to host healthycod.in: could not connect to host healtious.com: could not connect to host heart.ge: did not receive HSTS header @@ -2952,13 +2974,11 @@ heidilein.info: did not receive HSTS header heijblok.com: could not connect to host heimnetze.org: could not connect to host helencrump.co.uk: did not receive HSTS header -hellofilters.com: did not receive HSTS header helloworldhost.com: did not receive HSTS header helpadmin.net: could not connect to host helpium.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no] helpmebuild.com: did not receive HSTS header helpmij.cf: did not receive HSTS header -helup.com: did not receive HSTS header hemdal.se: could not connect to host hencagon.com: could not connect to host henriknoerr.com: could not connect to host @@ -3002,7 +3022,7 @@ hitoy.org: did not receive HSTS header hittipps.com: did not receive HSTS header hiv.gov: did not receive HSTS header hjw-kunstwerk.de: could not connect to host -hloe0xff.ru: could not connect to host +hloe0xff.ru: did not receive HSTS header hlyue.com: did not receive HSTS header hm1ch.ovh: could not connect to host hmm.nyc: could not connect to host @@ -3014,12 +3034,12 @@ hoerbuecher-und-hoerspiele.de: could not connect to host hofiprojekt.cz: did not receive HSTS header hogar123.es: could not connect to host hoiku-map.tokyo: could not connect to host -hoikuen-now.top: could not connect to host holgerlehner.com: could not connect to host holifestival-freyung.de: could not connect to host holymoly.lu: could not connect to host homa.website: could not connect to host homads.com: did not receive HSTS header +homeandyarddetailing.com: could not connect to host homeclouding.de: could not connect to host homedna.com: did not receive HSTS header homeexx.com: could not connect to host @@ -3117,7 +3137,6 @@ ibnuwebhost.com: could not connect to host icabanken.se: did not receive HSTS header icaforsakring.se: did not receive HSTS header ice.yt: could not connect to host -icebat.dyndns.org: could not connect to host icepink.com.br: did not receive HSTS header icfl.com.br: could not connect to host ich-find-den-g.net: could not connect to host @@ -3140,7 +3159,6 @@ idecode.net: could not connect to host idedr.com: could not connect to host identitylabs.uk: could not connect to host idgsupply.com: did not receive HSTS header -idinby.dk: did not receive HSTS header idisplay.es: did not receive HSTS header idlekernel.com: could not connect to host idontexist.me: did not receive HSTS header @@ -3171,7 +3189,6 @@ ilbuongiorno.it: did not receive HSTS header ilgi.work: could not connect to host ilikerainbows.co: could not connect to host ilikerainbows.co.uk: could not connect to host -ilikfreshweedstores.com: could not connect to host ilmconpm.de: did not receive HSTS header ilona.graphics: did not receive HSTS header iluvscotland.co.uk: max-age too low: 7776000 @@ -3238,11 +3255,11 @@ ingeeibach.de: could not connect to host ingesol.fr: did not receive HSTS header injertoshorticolas.com: did not receive HSTS header injigo.com: did not receive HSTS header -injust.cf: did not receive HSTS header -injust.ga: did not receive HSTS header -injust.gq: did not receive HSTS header +injust.cf: could not connect to host +injust.ga: could not connect to host +injust.gq: could not connect to host injust.ml: could not connect to host -injust.tk: did not receive HSTS header +injust.tk: could not connect to host inkable.com.au: did not receive HSTS header inked-guy.de: could not connect to host inkedguy.de: could not connect to host @@ -3254,6 +3271,7 @@ inmyarea.com: max-age too low: 0 innophate-security.nl: could not connect to host innovation.gov: could not connect to host innovativeideaz.org: did not receive HSTS header +inoa8.com: did not receive HSTS header inquisitive.io: did not receive HSTS header insane-bullets.com: could not connect to host insane.zone: could not connect to host @@ -3268,7 +3286,6 @@ instinctiveads.com: did not receive HSTS header institutoflordelavida.com: could not connect to host instruktor.io: could not connect to host intarweb.ca: could not connect to host -integraelchen.de: could not connect to host intel.li: could not connect to host interboursegeneva.ch: did not receive HSTS header interference.io: could not connect to host @@ -3356,7 +3373,6 @@ it-schwerin.de: could not connect to host itechgeek.com: max-age too low: 0 iteha.de: could not connect to host items.lv: did not receive HSTS header -itemton.com: did not receive HSTS header ithakama.com: did not receive HSTS header ithakama.cz: did not receive HSTS header itinsight.hu: did not receive HSTS header @@ -3472,7 +3488,7 @@ jetsetpay.com: could not connect to host jettshome.org: could not connect to host jeugdkans.nl: did not receive HSTS header jewellerydesignstore.com: could not connect to host -jfmel.com: did not receive HSTS header +jfmel.com: could not connect to host jfx.space: did not receive HSTS header jh-media.eu: could not connect to host jhburton.uk: could not connect to host @@ -3523,6 +3539,7 @@ jonfor.net: could not connect to host jongha.me: could not connect to host jonn.me: could not connect to host jonnichols.info: did not receive HSTS header +jonnybarnes.uk: did not receive HSTS header jonsno.ws: could not connect to host joostbovee.nl: did not receive HSTS header jordanhamilton.me: could not connect to host @@ -3532,7 +3549,6 @@ jorgemesa.me: could not connect to host josahrens.me: could not connect to host josecage.com: could not connect to host joshi.su: could not connect to host -joshschmelzle.com: could not connect to host joshstroup.me: could not connect to host jotpics.com: could not connect to host jottit.com: could not connect to host @@ -3639,6 +3655,7 @@ kermadec.com: could not connect to host kermadec.net: could not connect to host kernl.us: did not receive HSTS header keskeces.com: did not receive HSTS header +kevinmeijer.nl: could not connect to host keymaster.lookout.com: did not receive HSTS header kfbrussels.be: could not connect to host kg-rating.com: could not connect to host @@ -3688,6 +3705,7 @@ kiyo.space: could not connect to host kizil.net: could not connect to host kjaermaxi.me: did not receive HSTS header kjg-bachrain.de: could not connect to host +klangnok.de: could not connect to host klauwd.com: did not receive HSTS header klaxn.org: could not connect to host kleertjesvoordelig.nl: could not connect to host @@ -3710,6 +3728,7 @@ koelbli.ch: did not receive HSTS header koen.io: did not receive HSTS header koenrouwhorst.nl: did not receive HSTS header koenvdheuvel.me: did not receive HSTS header +koerperimpuls.ch: did not receive HSTS header koha.be: could not connect to host koik.io: could not connect to host kojima-life.co.jp: max-age too low: 0 @@ -3718,6 +3737,7 @@ kola-entertainments.de: did not receive HSTS header kolaykaydet.com: did not receive HSTS header kolozsvaricsuhe.hu: did not receive HSTS header komikito.com: could not connect to host +kominfo.go.id: could not connect to host kompetenzwerft.de: did not receive HSTS header konata.us: could not connect to host kontaxis.network: could not connect to host @@ -3728,7 +3748,6 @@ kori.ml: did not receive HSTS header koriyoukai.net: did not receive HSTS header korni22.org: did not receive HSTS header korsanparti.org: could not connect to host -koryfi.com: could not connect to host kostuumstore.nl: could not connect to host kotonehoko.net: could not connect to host kotovstyle.ru: could not connect to host @@ -3766,7 +3785,6 @@ kuechenplan.online: could not connect to host kueulangtahunanak.net: could not connect to host kum.com: could not connect to host kummerlaender.eu: did not receive HSTS header -kuoruan.com: could not connect to host kupelne-ptacek.sk: did not receive HSTS header kuppingercole.com: did not receive HSTS header kura.io: could not connect to host @@ -3783,6 +3801,7 @@ kyanite.co: could not connect to host kylapps.com: did not receive HSTS header kylinj.com: could not connect to host kyochon.fr: could not connect to host +kyusyu.org: did not receive HSTS header kz.search.yahoo.com: did not receive HSTS header kzjnet.com: could not connect to host l-rickroll-i.pw: could not connect to host @@ -3831,7 +3850,6 @@ laobox.fr: could not connect to host laospage.com: did not receive HSTS header laplaceduvillage.net: could not connect to host laquack.com: could not connect to host -laracode.eu: could not connect to host laredsemanario.com: could not connect to host lasercloud.ml: could not connect to host laserfuchs.de: did not receive HSTS header @@ -3866,7 +3884,6 @@ ledgerscope.net: could not connect to host leen.io: did not receive HSTS header legarage.org: could not connect to host legavenue.com.br: did not receive HSTS header -lehighmathcircle.org: could not connect to host leinir.dk: did not receive HSTS header leitner.com.au: did not receive HSTS header leiyun.me: did not receive HSTS header @@ -3899,6 +3916,7 @@ letstox.com: could not connect to host letustravel.tk: could not connect to host levatc.tk: could not connect to host level-10.net: did not receive HSTS header +levelcheat.com: did not receive HSTS header levelum.com: did not receive HSTS header levert.ch: could not connect to host lexpierce.social: could not connect to host @@ -3927,6 +3945,7 @@ libertyrp.org: could not connect to host library.linode.com: did not receive HSTS header librechan.net: could not connect to host libreduca.com: could not connect to host +librends.org: could not connect to host lichess4545.com: did not receive HSTS header lichess4545.tv: did not receive HSTS header lidl-selection.at: could not connect to host @@ -3979,7 +3998,8 @@ litespeed.io: could not connect to host little.pw: did not receive HSTS header littlefreelibrary.org: did not receive HSTS header littleqiu.net: could not connect to host -liudon.org: could not connect to host +litz.ca: could not connect to host +litzenberger.ca: could not connect to host livedemo.io: could not connect to host livej.am: could not connect to host livi.co: did not receive HSTS header @@ -4059,6 +4079,7 @@ ludwiggrill.de: could not connect to host luelistan.net: could not connect to host lufthansaexperts.com: max-age too low: 2592000 luis-checa.com: could not connect to host +lukeistschuld.de: did not receive HSTS header lukeng.me: could not connect to host lukonet.com: did not receive HSTS header luludapomerania.com: could not connect to host @@ -4095,6 +4116,7 @@ m2tc.fr: could not connect to host m3-gmbh.de: did not receive HSTS header m82labs.com: did not receive HSTS header maarten.nyc: could not connect to host +maartenterpstra.xyz: could not connect to host mac-torrents.me: did not receive HSTS header macbolo.com: could not connect to host macchaberrycream.com: could not connect to host @@ -4110,6 +4132,7 @@ maderwin.com: did not receive HSTS header madesoftware.com.br: could not connect to host mafamane.com: could not connect to host maff.scot: could not connect to host +mafiaforum.de: did not receive HSTS header mafiareturns.com: max-age too low: 2592000 magenx.com: did not receive HSTS header magi.systems: could not connect to host @@ -4130,7 +4153,6 @@ majesnix.org: did not receive HSTS header make-pizza.info: could not connect to host makeitdynamic.com: could not connect to host makerstuff.net: did not receive HSTS header -makeyourlaws.org: could not connect to host malena.com.ua: did not receive HSTS header malerversand.de: did not receive HSTS header malfait.nl: could not connect to host @@ -4162,6 +4184,7 @@ manningbrothers.com: did not receive HSTS header manshop24.com: could not connect to host mansion-note.com: did not receive HSTS header maomaofuli.vip: could not connect to host +maozedong.red: did not receive HSTS header maple5.com: did not receive HSTS header marcelparra.com: could not connect to host marchagen.nl: did not receive HSTS header @@ -4267,7 +4290,6 @@ mdosch.de: did not receive HSTS header mdscomp.net: did not receive HSTS header meadowfen.farm: could not connect to host meadowfenfarm.com: could not connect to host -meadowviewfarms.org: could not connect to host meamod.com: max-age too low: 0 meat-education.com: could not connect to host mebio.us: did not receive HSTS header @@ -4275,7 +4297,6 @@ mecenat-cassous.com: did not receive HSTS header mechmk1.me: did not receive HSTS header medallia.io: could not connect to host mediacru.sh: could not connect to host -mediaexpert.fr: could not connect to host mediafinancelab.org: did not receive HSTS header mediamag.am: max-age too low: 0 mediastorm.us: could not connect to host @@ -4284,7 +4305,6 @@ medicalwikis.cz: did not receive HSTS header medienservice-fritz.de: did not receive HSTS header medirich.co: could not connect to host meditek-dv.ru: could not connect to host -medlineplus.gov: did not receive HSTS header medm-test.com: could not connect to host medzinenews.com: did not receive HSTS header meedoennoordkop.nl: did not receive HSTS header @@ -4332,6 +4352,7 @@ meteosky.net: could not connect to host meter.md: could not connect to host metin2blog.de: did not receive HSTS header metis.pw: could not connect to host +metrans-spedition.de: could not connect to host metricaid.com: did not receive HSTS header metzgerei-birkenhof.de: could not connect to host meuemail.pro: could not connect to host @@ -4342,6 +4363,7 @@ mfcatalin.com: could not connect to host mfedderke.com: could not connect to host mgdigital.fr: did not receive HSTS header mh-bloemen.co.jp: could not connect to host +mhalfter.de: did not receive HSTS header mhdsyarif.com: did not receive HSTS header mhealthdemocamp.com: could not connect to host mhertel.com: did not receive HSTS header @@ -4418,7 +4440,6 @@ minecraftserverz.com: could not connect to host minecraftvoter.com: could not connect to host mineover.es: could not connect to host minesouls.fr: did not receive HSTS header -mingy.ddns.net: could not connect to host minh.at: could not connect to host mini-piraten.de: did not receive HSTS header minikneet.nl: could not connect to host @@ -4438,7 +4459,6 @@ mister.hosting: could not connect to host misterl.net: did not receive HSTS header mitarbeiter-pc.de: did not receive HSTS header mitchellrenouf.ca: could not connect to host -mitsu-szene.de: did not receive HSTS header mittenhacks.com: could not connect to host mivcon.net: could not connect to host mizd.at: could not connect to host @@ -4479,6 +4499,7 @@ modded-minecraft-server-list.com: could not connect to host moddedark.com: could not connect to host mode-marine.com: could not connect to host model9.io: did not receive HSTS header +modelsclub.org.ua: could not connect to host modemagazines.co.uk: could not connect to host moderatoren.org: did not receive HSTS header moderatortv.de: did not receive HSTS header @@ -4508,6 +4529,7 @@ mondwandler.de: could not connect to host monika-sokol.de: did not receive HSTS header monitaure.io: could not connect to host monitman.com: did not receive HSTS header +monpc-pro.fr: did not receive HSTS header monsieurbureau.com: did not receive HSTS header montanacures.org: could not connect to host montenero.pl: could not connect to host @@ -4549,6 +4571,7 @@ moviedollars.com: did not receive HSTS header moviesabout.net: could not connect to host moy-gorod.od.ua: did not receive HSTS header mp3juices.is: could not connect to host +mpe.org: could not connect to host mqas.net: could not connect to host mr-hosting.com: could not connect to host mrawe.com: could not connect to host @@ -4675,6 +4698,7 @@ nanokamo.com: did not receive HSTS header nansay.cn: could not connect to host nanto.eu: could not connect to host narada.com.ua: could not connect to host +nartuk.com.ua: did not receive HSTS header nashira.cz: did not receive HSTS header natalia-fadeeva.ru: could not connect to host natalia.io: could not connect to host @@ -4701,7 +4725,6 @@ near.st: did not receive HSTS header nebra.io: could not connect to host nebulousenhanced.com: could not connect to host nedzad.me: could not connect to host -neer.io: could not connect to host neftaly.com: did not receive HSTS header negativecurvature.net: could not connect to host neilgreen.net: did not receive HSTS header @@ -4712,12 +4735,11 @@ nemovement.org: could not connect to host neoani.me: could not connect to host neofelhz.space: did not receive HSTS header neonisi.com: could not connect to host -neonnuke.tech: did not receive HSTS header +neonnuke.tech: could not connect to host neosolution.ca: did not receive HSTS header nephos.xyz: did not receive HSTS header nepustil.net: did not receive HSTS header nerd42.de: could not connect to host -nerdhouse.io: could not connect to host neris.io: could not connect to host nestedquotes.ca: could not connect to host net-navi.cc: did not receive HSTS header @@ -4727,7 +4749,6 @@ netherwind.eu: did not receive HSTS header nethruster.com: did not receive HSTS header netlilo.com: could not connect to host netloanusa.com: could not connect to host -netlocal.ru: could not connect to host netmagik.com: did not receive HSTS header netprofile.com.au: did not receive HSTS header netresourcedesign.com: could not connect to host @@ -4742,6 +4763,7 @@ neueonlinecasino2016.com: could not connect to host neuralgic.net: could not connect to host neuro-plus-100.com: could not connect to host neuronfactor.com: max-age too low: 1000 +neurotransmitter.net: could not connect to host never-afk.de: did not receive HSTS header neveta.com: could not connect to host newbieboss.com: did not receive HSTS header @@ -4765,6 +4787,7 @@ nexth.us: could not connect to host nextpages.de: could not connect to host nextproject.us: could not connect to host nfo.so: could not connect to host +nfz.moe: did not receive HSTS header ng-security.com: could not connect to host ngine.ch: did not receive HSTS header nginxnudes.com: could not connect to host @@ -4790,7 +4813,6 @@ niho.jp: did not receive HSTS header nikcub.com: could not connect to host niklas.pw: did not receive HSTS header niklaslindblad.se: did not receive HSTS header -nikolasbradshaw.com: did not receive HSTS header ninchisho-online.com: did not receive HSTS header ninhs.org: could not connect to host ninjaspiders.com: could not connect to host @@ -4798,7 +4820,6 @@ nippler.org: did not receive HSTS header nippombashi.net: did not receive HSTS header nipponcareers.com: did not receive HSTS header nirudo.me: did not receive HSTS header -niva.synology.me: could not connect to host nixmag.net: did not receive HSTS header nkp-media.de: could not connect to host nll.fi: could not connect to host @@ -4831,11 +4852,11 @@ noref.tk: could not connect to host northcutt.com: did not receive HSTS header nosecretshop.com: could not connect to host notadd.com: did not receive HSTS header -notarankastojkovic.me: did not receive HSTS header notenoughtime.de: could not connect to host nothing.net.nz: max-age too low: 7776000 nothing.org.uk: did not receive HSTS header noticia.do: did not receive HSTS header +notify.moe: could not connect to host notjustbitchy.com: did not receive HSTS header nottheonion.net: did not receive HSTS header nou.si: could not connect to host @@ -4843,7 +4864,6 @@ nouvelle-vague-saint-cast.fr: did not receive HSTS header nova-elearning.com: did not receive HSTS header novaco.in: max-age too low: 3600 novacoast.com: did not receive HSTS header -novascan.net: could not connect to host novatrucking.de: could not connect to host novavoidhowl.com: did not receive HSTS header novelabs.de: could not connect to host @@ -4923,7 +4943,7 @@ offshoremarineparts.com: did not receive HSTS header ofo2.com: could not connect to host oganek.ie: could not connect to host ogogoshop.com: could not connect to host -ohai.su: did not receive HSTS header +ohai.su: could not connect to host ohling.org: could not connect to host ohyooo.com: could not connect to host oiepoie.nl: could not connect to host @@ -4941,6 +4961,7 @@ oliverdunk.com: did not receive HSTS header ollehbizev.co.kr: could not connect to host olswangtrainees.com: could not connect to host omacostudio.com: could not connect to host +omarh.net: could not connect to host omgaanmetidealen.com: could not connect to host ominto.com: max-age too low: 0 omniscimus.net: could not connect to host @@ -5016,6 +5037,7 @@ openxmpp.com: could not connect to host opim.ca: did not receive HSTS header opoleo.com: could not connect to host opperwall.net: could not connect to host +oprechtgezegd.nl: could not connect to host opsafewinter.net: could not connect to host opsbears.com: did not receive HSTS header opstacks.com: did not receive HSTS header @@ -5137,9 +5159,6 @@ partyvan.it: could not connect to host partyvan.moe: could not connect to host partyvan.nl: could not connect to host partyvan.se: could not connect to host -pascalmathis.com: did not receive HSTS header -pascalmathis.me: did not receive HSTS header -pascalmathis.net: did not receive HSTS header passumpsicbank.com: did not receive HSTS header passwd.io: could not connect to host passwordbox.com: did not receive HSTS header @@ -5159,7 +5178,7 @@ patientinsight.net: did not receive HSTS header patt.us: could not connect to host patterson.mp: could not connect to host paul-kerebel.pro: could not connect to host -paulbramhall.uk: could not connect to host +paulbramhall.uk: did not receive HSTS header paulbunyanmls.com: did not receive HSTS header paulproell.at: could not connect to host paulshir.com: could not connect to host @@ -5219,7 +5238,6 @@ personaldatabasen.no: could not connect to host personalinjurylist.com: could not connect to host personalizedtouch.co: could not connect to host perthdevicelab.com: did not receive HSTS header -pervacio.hu: could not connect to host pet-nsk.ru: could not connect to host petchart.net: could not connect to host peterdavehello.org: did not receive HSTS header @@ -5281,7 +5299,7 @@ piratedot.com: could not connect to host piratelist.online: could not connect to host piratenlogin.de: could not connect to host pirateproxy.pe: could not connect to host -pirateproxy.sx: did not receive HSTS header +pirateproxy.sx: could not connect to host pirateproxy.vip: could not connect to host pirati.cz: did not receive HSTS header piratte.net: did not receive HSTS header @@ -5384,18 +5402,16 @@ poweroff.win: could not connect to host powerplannerapp.com: did not receive HSTS header powershift.ne.jp: did not receive HSTS header powerxequality.com: could not connect to host -ppmathis.ch: did not receive HSTS header -ppmathis.com: did not receive HSTS header ppr-truby.ru: could not connect to host ppuu.org: did not receive HSTS header ppy3.com: did not receive HSTS header pr.search.yahoo.com: did not receive HSTS header pr2studio.com: could not connect to host practicallabs.com: could not connect to host +practodev.com: did not receive HSTS header pratinav.xyz: could not connect to host prattpokemon.com: could not connect to host praxis-research.info: did not receive HSTS header -prc.gov: did not receive HSTS header prediksisydney.com: could not connect to host preezzie.com: could not connect to host prefis.com: did not receive HSTS header @@ -5416,6 +5432,7 @@ preworkout.me: could not connect to host prezola.com: did not receive HSTS header prgslab.net: could not connect to host pridoc.se: did not receive HSTS header +prielwurmjaeger.de: did not receive HSTS header printerest.io: could not connect to host printexpress.cloud: did not receive HSTS header printfn.com: could not connect to host @@ -5451,7 +5468,6 @@ prontocleaners.co.uk: could not connect to host prontolight.com: did not receive HSTS header prontomovers.co.uk: could not connect to host propactrading.com: could not connect to host -proposalonline.com: could not connect to host prosocialmachines.com: could not connect to host prosoft.sk: did not receive HSTS header prosperident.com: did not receive HSTS header @@ -5506,9 +5522,9 @@ pwnsdx.pw: could not connect to host pwntr.com: could not connect to host py.search.yahoo.com: did not receive HSTS header pyol.org: could not connect to host -pypi-mirrors.org: could not connect to host +pypi-mirrors.org: did not receive HSTS header pypi-status.org: could not connect to host -pyplo.org: could not connect to host +pyplo.org: did not receive HSTS header pypt.lt: did not receive HSTS header pyrrhonism.org: could not connect to host q-rickroll-u.pw: could not connect to host @@ -5564,7 +5580,6 @@ ra-schaal.de: could not connect to host raajheshkannaa.com: could not connect to host rackblue.com: did not receive HSTS header radicaleducation.net: could not connect to host -radiormi.com: did not receive HSTS header radtke.bayern: could not connect to host rafaelcz.de: could not connect to host raidstone.com: could not connect to host @@ -5586,6 +5601,7 @@ rannseier.org: did not receive HSTS header rany.duckdns.org: could not connect to host rany.io: could not connect to host rany.pw: did not receive HSTS header +rapido.nu: did not receive HSTS header rapidresearch.me: could not connect to host rapidthunder.io: could not connect to host rasing.me: did not receive HSTS header @@ -5624,7 +5640,6 @@ rdyrda.fr: could not connect to host re-customer.net: did not receive HSTS header reachr.com: could not connect to host reader.ga: could not connect to host -readmeeatmedrinkme.com: could not connect to host readr.pw: could not connect to host reagir43.fr: did not receive HSTS header realmic.net: could not connect to host @@ -5683,7 +5698,8 @@ renem.net: max-age too low: 2592000 rengarenkblog.com: could not connect to host renideo.fr: could not connect to host renlong.org: did not receive HSTS header -renrenss.com: could not connect to host +renrenss.com: did not receive HSTS header +renscreations.com: could not connect to host rentacarcluj.xyz: did not receive HSTS header rentbrowsertrain.me: could not connect to host rentcarassist.com: could not connect to host @@ -5736,8 +5752,11 @@ ring0.xyz: did not receive HSTS header ringh.am: could not connect to host rionewyork.com.br: did not receive HSTS header rippleunion.com: could not connect to host +rischard.org: could not connect to host riskmgt.com.au: could not connect to host rithm.ch: did not receive HSTS header +rivaforum.de: did not receive HSTS header +rivastation.de: did not receive HSTS header rivlo.com: could not connect to host rix.ninja: could not connect to host rizon.me: could not connect to host @@ -5763,7 +5782,6 @@ rockeyscrivo.com: did not receive HSTS header rocksberg.net: could not connect to host rockz.io: did not receive HSTS header rodney.id.au: did not receive HSTS header -rodomonte.org: did not receive HSTS header rodosto.com: could not connect to host roelof.io: could not connect to host roeper.party: could not connect to host @@ -5858,7 +5876,6 @@ salserocafe.com: did not receive HSTS header salserototal.com: could not connect to host saltedskies.com: could not connect to host saltra.online: did not receive HSTS header -salzamt.tk: could not connect to host samegoal.org: did not receive HSTS header sametovymesic.cz: could not connect to host samfunnet.no: max-age too low: 0 @@ -5872,6 +5889,7 @@ sanatfilan.com: did not receive HSTS header sandviks.com: did not receive HSTS header sanex.ca: could not connect to host sanguoxiu.com: could not connect to host +sanhei.ch: did not receive HSTS header sanpham-balea.org: could not connect to host sansage.com.br: did not receive HSTS header sansdev.com: could not connect to host @@ -5908,7 +5926,6 @@ sc4le.com: could not connect to host scannabi.com: could not connect to host schadegarant.net: could not connect to host schauer.so: could not connect to host -schmelzle.io: could not connect to host schmitt.ovh: could not connect to host schnell-gold.com: could not connect to host schooltrends.co.uk: did not receive HSTS header @@ -5959,7 +5976,6 @@ sebastian-bair.de: could not connect to host sebastianhampl.de: could not connect to host sebster.com: did not receive HSTS header secandtech.com: could not connect to host -secboom.com: did not receive HSTS header seccom.ch: did not receive HSTS header secnet.ga: could not connect to host secondary-survivor.com: could not connect to host @@ -5970,7 +5986,6 @@ secondarysurvivorportal.com: could not connect to host secondarysurvivorportal.help: could not connect to host secondbyte.nl: could not connect to host secondspace.ca: could not connect to host -sectia22.ro: did not receive HSTS header section508.gov: did not receive HSTS header sectun.com: did not receive HSTS header secure-games.us: could not connect to host @@ -6034,7 +6049,6 @@ seq.tf: did not receive HSTS header serathius.ovh: could not connect to host serenitycreams.com: did not receive HSTS header serfdom.io: did not receive HSTS header -sergije-stanic.me: did not receive HSTS header serized.pw: could not connect to host serverangels.co.uk: could not connect to host servercode.ca: did not receive HSTS header @@ -6058,7 +6072,6 @@ shadowmorph.info: did not receive HSTS header shadowsocks.net: could not connect to host shadowsocks.wiki: did not receive HSTS header shakebox.de: could not connect to host -shamka.ru: could not connect to host shanekoster.net: did not receive HSTS header shanesage.com: could not connect to host shaobin.wang: could not connect to host @@ -6165,6 +6178,7 @@ siterip.org: could not connect to host sites.google.com: did not receive HSTS header (error ignored - included regardless) sitesten.com: did not receive HSTS header sixtwentyten.com: did not receive HSTS header +sjsc.fr: did not receive HSTS header ski-insurance.com.au: did not receive HSTS header skidstresser.com: did not receive HSTS header skile.ru: could not connect to host @@ -6207,13 +6221,17 @@ smartofficesandsmarthomes.com: did not receive HSTS header smartphone.continental.com: could not connect to host smartrak.co.nz: did not receive HSTS header smdev.fr: could not connect to host -sme-gmbh.net: could not connect to host smet.us: could not connect to host smimea.com: could not connect to host smirkingwhorefromhighgarden.pro: could not connect to host smkn1lengkong.sch.id: did not receive HSTS header smksi2.com: could not connect to host smksultanismail2.com: did not receive HSTS header +smoothics.at: could not connect to host +smoothics.com: could not connect to host +smoothics.eu: could not connect to host +smoothics.mobi: could not connect to host +smoothics.net: could not connect to host smove.sg: did not receive HSTS header smplix.com: could not connect to host smusg.com: did not receive HSTS header @@ -6221,9 +6239,9 @@ smzsq.com: did not receive HSTS header snailing.org: could not connect to host snakehosting.dk: did not receive HSTS header snapappts.com: could not connect to host -snapserv.net: did not receive HSTS header snapworks.net: did not receive HSTS header snazel.co.uk: could not connect to host +snekchat.moe: could not connect to host snel4u.nl: could not connect to host snelwerk.be: could not connect to host sng.my: could not connect to host @@ -6255,7 +6273,7 @@ sokolka.tv: did not receive HSTS header sol-3.de: did not receive HSTS header solentes.com.br: did not receive HSTS header solidfuelappliancespares.co.uk: did not receive HSTS header -solidus.systems: could not connect to host +solidus.systems: did not receive HSTS header soljem.com: did not receive HSTS header soll-i.ch: did not receive HSTS header solosmusic.xyz: could not connect to host @@ -6265,13 +6283,13 @@ somali-derp.com: could not connect to host someshit.xyz: could not connect to host something-else.cf: could not connect to host somethingnew.xyz: could not connect to host +songzhuolun.com: could not connect to host sonic.network: did not receive HSTS header sonicrainboom.rocks: did not receive HSTS header soobi.org: did not receive HSTS header soondy.com: did not receive HSTS header soporte.cc: could not connect to host sorensen-online.com: could not connect to host -sorincocorada.ro: could not connect to host sosaka.ml: could not connect to host sosiolog.com: did not receive HSTS header sotor.de: did not receive HSTS header @@ -6299,6 +6317,7 @@ sparsa.army: could not connect to host sparta-trade.com: could not connect to host spauted.com: could not connect to host spdysync.com: could not connect to host +specialedesigns.com: could not connect to host speculor.net: could not connect to host speed-mailer.com: could not connect to host speedcounter.net: did not receive HSTS header @@ -6330,6 +6349,7 @@ spresso.me: did not receive HSTS header sprk.fitness: did not receive HSTS header sproutconnections.com: did not receive HSTS header sprutech.de: did not receive HSTS header +squaddraft.com: did not receive HSTS header square.gs: could not connect to host squatldf.org: did not receive HSTS header sqzryang.com: did not receive HSTS header @@ -6354,7 +6374,6 @@ staack.com: could not connect to host stabletoken.com: could not connect to host stackfiles.io: could not connect to host stadjerspasonline.nl: could not connect to host -stadt-apotheke-muensingen.de: could not connect to host stadtbauwerk.at: did not receive HSTS header staffjoy.com: did not receive HSTS header staffjoystaging.com: could not connect to host @@ -6362,7 +6381,6 @@ stahl.xyz: could not connect to host stalkerhispano.com: max-age too low: 0 stalkerteam.pl: did not receive HSTS header stalschermer.nl: could not connect to host -stamparmakarije.me: did not receive HSTS header stanandjerre.org: could not connect to host standardssuck.org: did not receive HSTS header standingmist.com: did not receive HSTS header @@ -6370,6 +6388,7 @@ starandshield.com: did not receive HSTS header starapple.nl: did not receive HSTS header stargatepartners.com: did not receive HSTS header starmusic.ga: did not receive HSTS header +startrek.in: did not receive HSTS header starttraffic.com: did not receive HSTS header startuponcloud.com: max-age too low: 2678400 startuppeople.co.uk: could not connect to host @@ -6393,6 +6412,7 @@ stepbystep3d.com: did not receive HSTS header stephanierxo.com: did not receive HSTS header stephanos.me: could not connect to host stephenandburns.com: did not receive HSTS header +stereo.lu: could not connect to host stevechekblain.win: did not receive HSTS header stevensononthe.net: did not receive HSTS header stewartremodelingadvantage.com: could not connect to host @@ -6485,6 +6505,7 @@ supercreepsvideo.com: could not connect to host supereight.net: did not receive HSTS header superiorfloridavacation.com: did not receive HSTS header superklima.ro: did not receive HSTS header +superlandnetwork.de: could not connect to host superlentes.com.br: did not receive HSTS header supersalescontest.nl: did not receive HSTS header superschnappchen.de: could not connect to host @@ -6553,7 +6574,7 @@ tadigitalstore.com: could not connect to host tafoma.com: did not receive HSTS header tageau.com: could not connect to host taglondon.org: did not receive HSTS header -tahf.net: could not connect to host +tahf.net: did not receive HSTS header tailify.com: did not receive HSTS header tails.com.ar: did not receive HSTS header talado.gr: could not connect to host @@ -6629,6 +6650,7 @@ techtraveller.com.au: did not receive HSTS header tecnimotos.com: did not receive HSTS header tecnogaming.com: did not receive HSTS header tecture.de: did not receive HSTS header +tecyt.com: did not receive HSTS header tedovo.com: did not receive HSTS header tedxkmitl.com: could not connect to host tefl.io: could not connect to host @@ -6685,6 +6707,7 @@ theamateurs.net: did not receive HSTS header theamp.com: did not receive HSTS header theater.cf: could not connect to host thebasementguys.com: could not connect to host +thebeginningisnye.com: could not connect to host theberkshirescompany.com: could not connect to host thebigfail.net: could not connect to host thebrightons.co.uk: did not receive HSTS header @@ -6760,7 +6783,6 @@ thirdpartytrade.com: did not receive HSTS header thirty5.net: did not receive HSTS header thisisacompletetest.ga: could not connect to host thisisforager.com: could not connect to host -thisistheserver.com: could not connect to host thiswasalreadymyusername.tk: could not connect to host thiswebhost.com: did not receive HSTS header thkb.net: could not connect to host @@ -6803,6 +6825,7 @@ tillcraft.com: could not connect to host timbeilby.com: could not connect to host timbuktutimber.com: did not receive HSTS header timcamara.com: could not connect to host +timdoug.com: could not connect to host time-river.xyz: could not connect to host timeserver0.de: could not connect to host timeserver1.de: could not connect to host @@ -6833,6 +6856,7 @@ tjc.wiki: could not connect to host tjullrich.de: could not connect to host tkappertjedemetamorfose.nl: could not connect to host tkonstantopoulos.tk: could not connect to host +tlach.cz: did not receive HSTS header tlcdn.net: could not connect to host tlo.hosting: could not connect to host tlo.link: could not connect to host @@ -6904,6 +6928,7 @@ toucedo.de: could not connect to host touchbasemail.com: did not receive HSTS header touchpointidg.us: could not connect to host touchscreen-handy.de: did not receive HSTS header +touchstonefms.co.uk: could not connect to host touchtable.nl: did not receive HSTS header tourpeer.com: did not receive HSTS header toxme.se: did not receive HSTS header @@ -6957,7 +6982,6 @@ truebred-labradors.com: could not connect to host trunkjunk.co: did not receive HSTS header trusteecar.com: did not receive HSTS header trustmeimfancy.com: could not connect to host -truthmessages.pw: could not connect to host trybind.com: could not connect to host tryoneday.co: did not receive HSTS header ts2.se: could not connect to host @@ -7089,7 +7113,6 @@ unccdesign.club: could not connect to host unclegen.xyz: could not connect to host under30stravelinsurance.com.au: did not receive HSTS header unfiltered.nyc: did not receive HSTS header -unfuddle.cn: could not connect to host unhu.fr: could not connect to host uni-games.com: could not connect to host unicooo.com: did not receive HSTS header @@ -7107,14 +7130,15 @@ unleash.pw: max-age too low: 7889231 unmanaged.space: could not connect to host unplugg3r.dk: could not connect to host unravel.ie: could not connect to host +unsupervised.ca: could not connect to host unsystem.net: could not connect to host unwiredbrain.com: could not connect to host +unwomen.is: did not receive HSTS header unyq.me: could not connect to host uonstaffhub.com: could not connect to host uow.ninja: could not connect to host up1.ca: could not connect to host upaknship.com: did not receive HSTS header -upay.ru: could not connect to host upboard.jp: could not connect to host upldr.pw: could not connect to host uporoops.com: could not connect to host @@ -7137,7 +7161,7 @@ uscntalk.com: could not connect to host uscurrency.gov: did not receive HSTS header used-in.jp: could not connect to host usercare.com: did not receive HSTS header -userify.com: did not receive HSTS header +userify.com: max-age too low: 0 uslab.io: could not connect to host ustr.gov: max-age too low: 86400 utleieplassen.no: could not connect to host @@ -7156,6 +7180,7 @@ uz.search.yahoo.com: did not receive HSTS header uzmandroid.com: did not receive HSTS header uzmandroid.net: could not connect to host uzmandroid.top: could not connect to host +v0rtex.xyz: could not connect to host v0tti.com: could not connect to host v2.pw: did not receive HSTS header v2ex.us: did not receive HSTS header @@ -7166,7 +7191,7 @@ vaalmarketplace.co.za: did not receive HSTS header vacationality.com: could not connect to host vackerbetong.se: could not connect to host vaddder.com: could not connect to host -valesdigital.com: could not connect to host +valenscaelum.com: could not connect to host valethound.com: could not connect to host valhalla-agency.com: did not receive HSTS header valhallacostarica.com: could not connect to host @@ -7182,7 +7207,6 @@ vampirism.eu: could not connect to host vanacht.co.za: did not receive HSTS header vande-walle.eu: did not receive HSTS header vanderkley.it: could not connect to host -vanderstraeten.dynv6.net: could not connect to host vanestack.com: could not connect to host vanetv.com: could not connect to host vanitas.xyz: could not connect to host @@ -7217,6 +7241,7 @@ venzocrm.com: did not receive HSTS header verifikatorindonesia.com: could not connect to host vermontcareergateway.org: could not connect to host versfin.net: could not connect to host +versicherungskontor.net: could not connect to host veryhax.de: could not connect to host vestacp.top: could not connect to host vetdnacenter.com: did not receive HSTS header @@ -7458,6 +7483,7 @@ whitehat.id: could not connect to host whiterabbit.org: did not receive HSTS header whiterabbitcakery.com: could not connect to host whitestagforge.com: did not receive HSTS header +whmcs.hosting: could not connect to host whoclicks.net: could not connect to host whoisapi.online: could not connect to host wholebites.com: max-age too low: 7776000 @@ -7540,6 +7566,7 @@ wowinvasion.com: did not receive HSTS header wpblog.com.tw: could not connect to host wpcarer.pro: could not connect to host wpdublin.com: could not connect to host +wpfast.net: could not connect to host wpfortify.com: did not receive HSTS header wphostingspot.com: did not receive HSTS header wpmetadatastandardsproject.org: could not connect to host @@ -7552,6 +7579,7 @@ writeapp.me: did not receive HSTS header wrldevelopment.com: did not receive HSTS header wrwg.ca: could not connect to host wsscompany.com.ve: could not connect to host +wtpmj.com: did not receive HSTS header wubthecaptain.eu: could not connect to host wufu.org: did not receive HSTS header wuhengmin.com: could not connect to host @@ -7572,7 +7600,7 @@ www-8003.com: did not receive HSTS header www-88599.com: did not receive HSTS header www-9995.com: did not receive HSTS header www-djbet.com: did not receive HSTS header -www-jinshavip.com: could not connect to host +www-jinshavip.com: did not receive HSTS header www.braintreepayments.com: did not receive HSTS header www.cueup.com: could not connect to host www.cyveillance.com: did not receive HSTS header @@ -7586,7 +7614,6 @@ www.honeybadger.io: did not receive HSTS header www.jitsi.org: did not receive HSTS header www.ledgerscope.net: could not connect to host www.logentries.com: did not receive HSTS header -www.makeyourlaws.org: could not connect to host www.moneybookers.com: did not receive HSTS header www.neonisi.com: could not connect to host www.paycheckrecords.com: did not receive HSTS header @@ -7619,6 +7646,7 @@ xellos.ml: could not connect to host xenesisziarovky.sk: could not connect to host xett.com: did not receive HSTS header xf-liam.com: did not receive HSTS header +xfack.com: did not receive HSTS header xfive.de: could not connect to host xgusto.com: did not receive HSTS header xiaody.me: could not connect to host @@ -7679,6 +7707,7 @@ xpi.fr: could not connect to host xpj.sx: could not connect to host xrp.pw: could not connect to host xsmobile.de: could not connect to host +xt.om: could not connect to host xtom.email: could not connect to host xtream-hosting.com: could not connect to host xtream-hosting.de: could not connect to host @@ -7764,7 +7793,6 @@ yuko.moe: could not connect to host yummyfamilyrecipes.com: could not connect to host yunpan.blue: could not connect to host yuntama.xyz: did not receive HSTS header -yunzhan.io: could not connect to host yunzhu.li: did not receive HSTS header yunzhu.org: could not connect to host yuriykuzmin.com: did not receive HSTS header @@ -7798,6 +7826,7 @@ zeedroom.be: did not receive HSTS header zefiris.org: did not receive HSTS header zefu.ca: could not connect to host zehntner.ch: could not connect to host +zelfmoord.ga: could not connect to host zelfstandigemakelaars.net: could not connect to host zenghx.tk: could not connect to host zenhaiku.com: did not receive HSTS header @@ -7817,6 +7846,7 @@ zh.search.yahoo.com: did not receive HSTS header zh1.li: could not connect to host zhang.wtf: could not connect to host zhangruilin.com: did not receive HSTS header +zhangsidan.com: could not connect to host zhangzifan.com: did not receive HSTS header zhaojin97.cn: did not receive HSTS header zhendingresources.com: did not receive HSTS header @@ -7845,10 +7875,10 @@ zking.ga: could not connect to host zmsastro.co.za: could not connect to host zmy.im: did not receive HSTS header zocken.com: did not receive HSTS header +zockenbiszumumfallen.de: did not receive HSTS header zoe.vc: could not connect to host zohar.link: could not connect to host zolokar.xyz: could not connect to host -zolotoy-standart.com.ua: did not receive HSTS header zomiac.pp.ua: could not connect to host zoneminder.com: did not receive HSTS header zoo24.de: did not receive HSTS header @@ -7863,6 +7893,7 @@ zqjs.tk: could not connect to host ztan.tk: could not connect to host ztcaoll222.cn: did not receive HSTS header zubel.it: did not receive HSTS header +zuram.net: could not connect to host zvncloud.com: did not receive HSTS header zwollemagazine.nl: did not receive HSTS header zyf.pw: could not connect to host diff --git a/security/manager/ssl/nsSTSPreloadList.inc b/security/manager/ssl/nsSTSPreloadList.inc index 8c1bb68a8e25..27c4e4082581 100644 --- a/security/manager/ssl/nsSTSPreloadList.inc +++ b/security/manager/ssl/nsSTSPreloadList.inc @@ -8,7 +8,7 @@ /*****************************************************************************/ #include -const PRTime gPreloadListExpirationTime = INT64_C(1515346460948000); +const PRTime gPreloadListExpirationTime = INT64_C(1515431965223000); %% 0-1.party, 1 0.me.uk, 1 @@ -118,6 +118,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1515346460948000); 1600esplanade.com, 1 16164f.com, 1 1644091933.rsc.cdn77.org, 1 +173vpn.cn, 1 174.net.nz, 1 1750studios.com, 0 17hats.com, 1 @@ -244,6 +245,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1515346460948000); 38888msc.com, 1 393335.ml, 1 398.info, 1 +3ags.de, 1 3bakayottu.com, 1 3bigking.com, 1 3c-d.de, 1 @@ -319,6 +321,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1515346460948000); 500p.xyz, 1 50plusnet.nl, 1 513vpn.net, 1 +517vpn.cn, 1 525.info, 1 52neptune.com, 1 5432.cc, 1 @@ -331,6 +334,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1515346460948000); 57aromas.com, 1 5apps.com, 1 5c1fd0f31022cbc40af9f785847baaf9.space, 1 +5ece.de, 1 5francs.com, 1 5gb.space, 1 5h0r7.com, 1 @@ -370,7 +374,6 @@ const PRTime gPreloadListExpirationTime = INT64_C(1515346460948000); 7thcircledesigns.com, 1 7trade8.com, 1 7x24servis.com, 1 -8.net.co, 1 8003pay.com, 1 8522.am, 1 8522.com, 1 @@ -431,7 +434,6 @@ const PRTime gPreloadListExpirationTime = INT64_C(1515346460948000); 9933445.com, 1 99599.fi, 1 99599.net, 1 -99998522.com, 1 99buffets.com, 1 99rst.org, 1 9jadirect.com, 1 @@ -1041,11 +1043,6 @@ alexey-shamara.ru, 1 alexgaynor.net, 1 alexhaydock.co.uk, 1 alexhd.de, 1 -alexismeza.com, 1 -alexismeza.com.mx, 1 -alexismeza.dk, 1 -alexismeza.es, 1 -alexismeza.nl, 1 alexkidd.de, 1 alexkott.com, 1 alexmak.net, 1 @@ -1252,11 +1249,6 @@ amerimarkdirect.com, 1 amerimex.cc, 1 amesvacuumrepair.com, 1 amethystcards.co.uk, 1 -ameza.co.uk, 1 -ameza.com.mx, 1 -ameza.io, 1 -ameza.me, 1 -ameza.net, 1 amf.to, 1 ami-de-bastanes.fr, 1 amicalecanyon.ch, 1 @@ -1529,6 +1521,7 @@ ap-swiss.ch, 1 apachehaus.de, 0 apadrinaunolivo.org, 1 apadvantage.com, 1 +apartmanicg.me, 1 apartment-natik.fr, 1 apartmentkroatien.at, 1 apartmentregister.com.au, 1 @@ -1665,7 +1658,6 @@ arawaza.biz, 1 arawaza.com, 0 arawaza.info, 1 arbeitskreis-asyl-eningen.de, 1 -arbeitslosenverwaltung.de, 1 arbitrarion.com, 1 arbitrary.ch, 1 arboworks.com, 1 @@ -1698,6 +1690,7 @@ arfad.ch, 1 arg.zone, 1 argb.de, 1 argekultur.at, 1 +argh.io, 1 argot.com, 1 argovpay.com, 1 ariege-pyrenees.net, 1 @@ -1721,13 +1714,13 @@ arksan.com.tr, 1 arlatools.com, 1 arlen.tv, 1 arlenarmageddon.com, 1 +arlet.click, 1 armadaquadrat.com, 1 armandsdiscount.com, 1 armarinhovirtual.com.br, 1 armazemdaminiatura.com.br, 1 armenians.online, 1 armil.it, 1 -arminpech.de, 1 armleads.com, 1 armstrongsengineering.com, 1 army24.cz, 1 @@ -1744,7 +1737,6 @@ arnor.org, 1 arocloud.de, 0 arod.tk, 1 arokha.com, 1 -aromaclub.nl, 1 aroonchande.com, 1 around-the-blog.com, 1 arox.eu, 1 @@ -1761,6 +1753,7 @@ arrowwebprojects.nl, 1 arsenal.ru, 1 arsk1.com, 1 art-et-culture.ch, 1 +art2web.net, 1 artansoft.com, 1 artbytik.ru, 1 artdeco-photo.com, 1 @@ -2090,7 +2083,6 @@ avenueeyecare.com, 1 averam.net, 1 averen.co.uk, 1 avg.club, 1 -avi9526.pp.ua, 1 aviationstrategy.aero, 1 avid.blue, 1 avmemo.com, 1 @@ -2291,7 +2283,6 @@ bangdream.ga, 1 bangkok-dark-night.com, 1 bangkok.dating, 1 bangkokcity.de, 1 -bangzafran.com, 0 bank.simple.com, 0 bankbranchlocator.com, 1 bankcardoffer.com, 1 @@ -2528,7 +2519,6 @@ belarto.pl, 1 belastingdienst-in-beeld.nl, 1 belastingmiddeling.nl, 1 belcompany.nl, 0 -belewpictures.com, 1 belfastlocks.com, 1 belfasttechservices.co.uk, 1 belge.rs, 1 @@ -2538,7 +2528,6 @@ belhopro.be, 1 belics.com, 0 belien-tweedehandswagens.be, 1 believablebook.com, 0 -belliash.eu.org, 1 belloy.ch, 1 belloy.net, 1 belly-button-piercings.com, 1 @@ -2738,7 +2727,6 @@ biathloncup.ru, 1 bible-maroc.com, 1 bible.ru, 1 bibleonline.ru, 1 -biblerhymes.com, 1 bibliaon.com, 1 biblio.wiki, 1 biblioblog.fr, 1 @@ -2820,7 +2808,9 @@ bina.az, 1 binam.center, 1 binarization.com, 1 binaryapparatus.com, 1 +binaryappdev.com, 1 binaryevolved.com, 1 +binaryfigments.com, 1 binarystud.io, 1 binding-problem.com, 1 binfind.com, 1 @@ -2968,6 +2958,7 @@ bizedge.co.nz, 1 bizniskatalog.mk, 1 biznpro.ru, 1 biztera.com, 1 +biztok.eu, 1 bizzartech.com, 1 bizzi.tv, 1 bjgongyi.com, 1 @@ -3156,6 +3147,7 @@ bobisec.cz, 1 bobkoetsier.nl, 1 boboates.com, 1 bobobox.net, 1 +boboolo.com, 1 bocamo.it, 1 bochs.info, 1 bockenauer.at, 1 @@ -3402,6 +3394,7 @@ breeethretail.ru, 0 breest.net, 1 breeswish.org, 1 breeyn.com, 1 +brefy.com, 1 brege.org, 1 breitbild-beamer.de, 1 brejoc.com, 1 @@ -3528,6 +3521,7 @@ btxiaobai.com, 1 bubba.cc, 1 bubblegumblog.com, 1 bubblespetspa.com, 1 +buben.tech, 1 bubhub.io, 1 buch-angucken.de, 1 buck.com, 1 @@ -3839,6 +3833,7 @@ candicecity.com, 1 candidasa.com, 1 cando.eu, 1 candy-it.de, 1 +candylion.rocks, 1 candyout.com, 1 canhazip.com, 1 canifis.net, 1 @@ -3884,6 +3879,7 @@ capture-app.com, 1 captured-symphonies.com, 1 caputo.com, 1 caputodesign.com, 1 +car-shop.top, 1 car.info, 1 car24.de, 1 car24portal.de, 1 @@ -3936,6 +3932,7 @@ carigami.fr, 1 carinsurance.es, 1 cariocacooking.com, 1 carisenda.com, 1 +carlandfaith.com, 1 carlgo11.com, 1 carlife-at.jp, 1 carlingfordapartments.com.au, 1 @@ -4034,6 +4031,7 @@ cazes.info, 1 cbamo.org, 1 cbbank.com, 1 cbd.supply, 1 +cbdev.de, 1 cbecrft.net, 1 cbintermountainrealty.com, 1 cbr-xml-daily.ru, 1 @@ -4063,6 +4061,7 @@ cdeck.net, 1 cdepot.eu, 1 cdkeykopen.com, 1 cdkeyworld.de, 1 +cdlcenter.com, 1 cdmhp.org.nz, 1 cdmon.tech, 1 cdn6.de, 1 @@ -4079,7 +4078,6 @@ cecipu.gob.cl, 1 ced-services.nl, 1 cedriccassimo.ch, 1 cedriccassimo.com, 1 -cee.io, 1 ceebee.com, 1 cefak.org.br, 1 cegfw.com, 1 @@ -4114,7 +4112,6 @@ centrallead.net, 1 centralstatecu.org, 1 centralvoice.org, 1 centralync.com, 1 -centrationgame.com, 1 centreoeil.ch, 1 centricweb.com, 1 centrobill.com, 1 @@ -4236,7 +4233,6 @@ charlestonfacialplastic.com, 1 charliehr.com, 1 charlierogers.co.uk, 1 charlierogers.com, 1 -charlipopkids.com.au, 1 charlotte-touati.ch, 1 charlottesvillegolfcommunities.com, 1 charmander.me, 1 @@ -4386,7 +4382,7 @@ chocotough.nl, 0 chocoweb.net, 1 chodocu.com, 1 chokladfantasi.net, 1 -chonghe.org, 1 +chon.io, 1 chook.as, 1 choosemypc.net, 1 chopperforums.com, 1 @@ -4396,12 +4392,10 @@ chorkley.com, 1 chorkley.me, 1 chorkley.uk, 1 chorpinkpoemps.de, 1 -chosenplaintext.org, 1 chourishi-shigoto.com, 1 chris-edwards.net, 1 chrisb.me, 1 chrisb.xyz, 1 -chrisbrown.id.au, 1 chrisburnell.com, 1 chriscarey.com, 1 chriscowley.me.uk, 1 @@ -4450,7 +4444,6 @@ chrisupjohn.xyz, 1 chriswarrick.com, 1 chriswbarry.com, 1 chriswells.io, 1 -chromaryu.net, 0 chromaxa.com, 1 chrome-devtools-frontend.appspot.com, 1 chrome.com, 0 @@ -4468,6 +4461,7 @@ chrpaul.de, 1 chrstn.eu, 1 chsh.moe, 1 chsterz.de, 1 +chua.family, 1 chuchote-moi.fr, 1 chuck.ovh, 1 chuckame.fr, 1 @@ -4649,7 +4643,6 @@ closeli.com, 0 closelinksecurity.co.uk, 1 closelinksecurity.com, 1 closetemail.com, 1 -closient.com, 1 closingholding.com, 1 cloud-crowd.com.au, 1 cloud-surfer.net, 1 @@ -5067,7 +5060,6 @@ content-api-dev.azurewebsites.net, 0 content-design.de, 1 contentpass.net, 1 contessa32experience.com, 1 -contextplatform.com, 1 continuation.io, 1 contrabass.net, 1 contractormountain.com, 1 @@ -5202,7 +5194,6 @@ course.pp.ua, 1 coursera.org, 1 courses.nl, 1 courseworkbank.info, 1 -courtlistener.com, 1 cousincouples.com, 1 cove.sh, 1 covenantoftheriver.org, 1 @@ -5260,7 +5251,6 @@ crapouill.es, 1 crashsec.com, 1 crawcial.de, 1 crawl.report, 1 -crazycraftland.de, 1 crazydomains.ae, 1 crazydomains.co.nz, 1 crazydomains.co.uk, 1 @@ -5323,7 +5313,6 @@ criadorespet.com.br, 1 criminal-attorney.ru, 1 criminal.enterprises, 1 crimson.no, 1 -crisissurvivalspecialists.com, 1 crisp.chat, 1 crisp.im, 1 cristarta.com, 1 @@ -5347,6 +5336,7 @@ cross-led-sign.com, 1 cross-view.com, 1 cross-x.com, 1 crossborderreturns.com, 1 +crosscom.ch, 1 crossfitblackwater.com, 1 crossfunctional.com, 1 crossorig.in, 1 @@ -5458,6 +5448,7 @@ cuecasonline.com.br, 1 cuetoems.com, 1 cuibonobo.com, 1 cuisinezest.com, 1 +cujba.com, 1 cultiv.nl, 1 cultivo.bio, 1 cultofperf.org.uk, 1 @@ -5573,7 +5564,6 @@ cybozu.com, 1 cybozulive-dev.com, 1 cybozulive.com, 1 cyclebeads.com, 1 -cyclehackluxembourgcity.lu, 1 cyclingjunkies.com, 1 cydetec.com, 1 cyfly.org, 1 @@ -5732,6 +5722,7 @@ danwin1210.me, 1 dao.spb.su, 1 daoro.net, 1 daphne.informatik.uni-freiburg.de, 1 +daracokorilo.com, 1 darbi.org, 1 darbtech.net, 1 darchoods.net, 0 @@ -5910,6 +5901,7 @@ dd.art.pl, 1 dden.ca, 0 dden.website, 1 dden.xyz, 1 +ddepot.us, 1 ddfreedish.site, 0 ddhosted.com, 1 ddmeportal.com, 1 @@ -6175,10 +6167,6 @@ deusu.de, 1 deusu.org, 1 deutsch-vietnamesisch-dolmetscher.com, 1 deutschland-dsl.de, 1 -deux.solutions, 1 -deuxsol.co, 1 -deuxsol.com, 1 -deuxsolutions.com, 1 dev-bluep.pantheonsite.io, 1 dev-pulse-mtn.pantheonsite.io, 1 dev-talk.net, 1 @@ -6294,6 +6282,7 @@ dicionariodesimbolos.com.br, 1 dicionarioetimologico.com.br, 1 dicionariopopular.com, 1 dick.red, 1 +dickieslife.com, 1 dicoding.com, 1 didacte.com, 1 didche.net, 1 @@ -6529,7 +6518,6 @@ dn42.eu, 0 dn42.us, 1 dna.li, 1 dnc.org.nz, 1 -dndtools.net, 1 dne.lu, 1 dnmaze.com, 1 dnmlab.it, 1 @@ -6604,7 +6592,6 @@ dokuraum.de, 1 dolarcanadense.com.br, 1 dolcevitatech.education, 1 doleta.gov, 1 -doli.se, 1 dolice.net, 1 dollemore.com, 1 dolorism.com, 1 @@ -6728,7 +6715,6 @@ doublethink.online, 1 doubleup.com.au, 1 doubleyummy.uk, 1 doucheba.gs, 1 -dougferris.id.au, 1 doujinshi.info, 1 dounats.com, 1 douzer.de, 1 @@ -6769,7 +6755,7 @@ dragons.moe, 0 dragonschool.org, 1 dragonwork.me, 1 drahcro.uk, 1 -drainagebuizen.nl, 1 +drainagebuizen.nl, 0 drakeluce.com, 1 drakenprospero.com, 0 drakenson.de, 1 @@ -7153,7 +7139,6 @@ edenmal.net, 1 edesseglabor.hu, 1 edfa3ly.co, 0 edfa3ly.com, 0 -edgar.cloud, 1 edge-cloud.net, 1 edgecustomersportal.com, 1 edgeservices.co.uk, 1 @@ -7361,6 +7346,7 @@ elexel.ru, 1 elglobo.com.mx, 1 elgosblanc.com, 1 elhall.pro, 1 +elhall.ru, 1 elhamadimi.com, 1 elhossari.com, 1 elia.cloud, 1 @@ -7531,7 +7517,6 @@ enfu.se, 1 engarde.net, 1 engaugetools.com, 1 engelundlicht.ch, 1 -engg.ca, 1 engineowning.com, 1 enginepit.com, 1 enginx.net, 1 @@ -8184,7 +8169,6 @@ faretravel.co.uk, 1 farfallapets.com.br, 1 farfetchos.com, 1 fargtorget.se, 1 -farhadexchange.com, 1 farkas.bz, 1 farm24.co.uk, 1 farmacia.pt, 1 @@ -8230,7 +8214,7 @@ fastforwardthemes.com, 1 fastmail.com, 0 fastrevision.com, 1 fastwebsites.com.br, 1 -faszienrollen-info.de, 1 +faszienrollen-info.de, 0 fatedata.com, 1 fatimamoldes.com.br, 1 fator25.com.br, 1 @@ -8849,6 +8833,7 @@ franksiler.com, 1 frankyan.com, 1 fransallen.com, 1 frantic1048.com, 1 +franzt.ovh, 1 frappant.cc, 1 fraselab.ru, 1 frasesaniversarios.com.br, 1 @@ -8865,6 +8850,7 @@ frbracch.it, 1 frdl.ch, 1 freaksites.dk, 1 frebi.org, 1 +frebib.net, 1 freddythechick.uk, 1 frederik-braun.com, 1 frederikschoell.de, 0 @@ -9114,7 +9100,6 @@ futurezone.at, 1 futuristarchitecture.com, 1 futurope.com, 1 fuvpn.com, 1 -fuxwerk.de, 1 fuyu.moe, 1 fuzoku-sodan.com, 1 fuzzing-project.org, 1 @@ -9504,13 +9489,11 @@ gfxbench.com, 1 ggdcpt.com, 1 gginin.today, 1 ggl-luzern.ch, 1 -gglks.com, 1 ggmmontascale.it, 1 ggp2.com, 1 ggs.jp, 1 ggservers.com, 1 ggss.cf, 1 -ggx.us, 1 gha.st, 1 ghaglund.se, 1 ghcif.de, 1 @@ -9575,7 +9558,6 @@ gistr.io, 1 git.co, 1 git.market, 1 github.com, 1 -gitstuff.tk, 1 gittr.ch, 1 giunchi.net, 1 giuseppemacario.men, 1 @@ -9670,6 +9652,7 @@ gmx.net, 1 gn00.com, 1 gnetion.com, 1 gnetwork.eu, 1 +gnilebein.de, 1 gnom.me, 1 gnosticjade.net, 1 gnucashtoqif.us, 1 @@ -9690,8 +9673,6 @@ gocleanerslondon.co.uk, 1 godesigner.ru, 1 godrealms.com, 1 godrive.ga, 1 -godsofhell.com, 1 -godsofhell.de, 1 goededoelkerstkaarten.nl, 1 goedverzekerd.net, 1 goemail.me, 1 @@ -9735,6 +9716,7 @@ goo.gl, 1 good-tips.pro, 1 goodfeels.net, 1 goodfurday.ca, 1 +goodmengroup.de, 1 goods-memo.net, 1 goodsex4all.com.br, 1 goodvibesblog.com, 1 @@ -9757,7 +9739,6 @@ gorf.chat, 1 gorf.club, 1 gorgiaxx.com, 1 gorky.media, 1 -gorn.ch, 1 gorod74.ru, 0 gorschenin.com, 1 gosccs.com, 1 @@ -9898,8 +9879,6 @@ greenvpn.pro, 1 greger.me, 1 greggsfoundation.org.uk, 1 gregmartyn.com, 1 -gregmilton.com, 1 -gregmilton.org, 1 gregoirow.be, 1 gregorians.org, 1 gregorykelleher.com, 1 @@ -10359,7 +10338,6 @@ hdy.nz, 1 head.org, 1 headjapan.com, 1 headlinepublishing.be, 1 -headmates.xyz, 1 headshotharp.de, 1 health-match.com.au, 1 health.graphics, 1 @@ -10451,6 +10429,7 @@ hellersgas.com, 1 helles-koepfchen.de, 1 helloacm.com, 1 helloanselm.com, 1 +hellofilters.com, 1 hellomouse.cf, 1 hellomouse.tk, 1 hellotandem.com, 1 @@ -10461,6 +10440,7 @@ helpconnect.com.au, 1 helpgoabroad.com, 1 helsingfors.guide, 1 helsinki.dating, 1 +helup.com, 1 helvella.de, 1 hematoonkologia.pl, 1 hemlockhillscabinrentals.com, 1 @@ -10707,6 +10687,7 @@ hogl.dk, 1 hohm.in, 1 hohnet.com, 1 hoiku-navi.com, 1 +hoikuen-now.top, 1 hoken-wakaru.jp, 1 hokieprivacy.org, 1 hokify.at, 1 @@ -10740,7 +10721,6 @@ holzvergaser-forum.de, 1 home-cloud.online, 1 home-coaching.be, 1 home-v.ind.in, 1 -homeandyarddetailing.com, 1 homebodyalberta.com, 1 homecareassociatespa.com, 1 homecarpetcleaning.co.uk, 1 @@ -11098,6 +11078,7 @@ icarlos.net, 1 icasnetwork.com, 1 icbemp.gov, 1 iccpublisher.com, 1 +icebat.dyndns.org, 1 iceberg.academy, 1 icebound.cc, 1 icebound.win, 1 @@ -11160,6 +11141,7 @@ idexxpublicationportal.com, 1 idgard.de, 1 idhosts.co.id, 1 idid.tk, 1 +idinby.dk, 1 idiopolis.org, 1 idiotentruppe.de, 1 idmanagement.gov, 1 @@ -11263,6 +11245,7 @@ ile-kalorii.pl, 1 ileat.com, 1 ilektronika-farmakeia-online.gr, 1 ilhansubasi.com, 1 +ilikfreshweedstores.com, 1 illambias.ch, 1 illegalpornography.me, 1 illich.cz, 1 @@ -11508,7 +11491,6 @@ innovativebuildingsolutions.co.za, 1 innoventure.de, 1 innsalzachsingles.de, 1 innwan.com, 1 -inoa8.com, 1 inobun.jp, 1 inondation.ch, 1 inorder.website, 1 @@ -11557,6 +11539,7 @@ insurance321.com, 1 int-ext-design.fr, 1 int-ma.in, 1 intafe.co.jp, 1 +integraelchen.de, 1 integralblue.com, 1 integralkk.com, 1 integrationinc.com, 0 @@ -11870,6 +11853,7 @@ iteecafe.hu, 1 iteke.ml, 1 iteke.tk, 1 iteli.eu, 1 +itemton.com, 1 iterror.co, 1 itfaq.nl, 1 itfh.eu, 1 @@ -12400,7 +12384,6 @@ jonilar.com, 1 jonirrings.com, 1 jonkermedia.nl, 1 jonlabelle.com, 1 -jonnybarnes.uk, 1 jonnystoten.com, 1 jonoalderson.com, 1 jonpads.com, 1 @@ -12443,6 +12426,7 @@ joshharmon.me, 1 joshpanter.com, 1 joshplant.co.uk, 1 joshrickert.com, 1 +joshschmelzle.com, 1 joshtriplett.org, 1 joshua-kuepper.de, 1 joshuajohnson.ca, 1 @@ -12891,7 +12875,6 @@ kevindekoninck.com, 0 kevinhill.nl, 1 kevinkla.es, 1 kevinlocke.name, 1 -kevinmeijer.nl, 1 kevinmorssink.nl, 1 kevinpirnie.com, 1 kevinratcliff.com, 1 @@ -13078,7 +13061,6 @@ kl-diaetist.dk, 1 klaim.us, 1 klamathrestoration.gov, 1 klanggut.at, 1 -klangnok.de, 0 klares-licht.de, 1 klarika.com, 1 klarmobil-empfehlen.de, 1 @@ -13171,7 +13153,6 @@ koebbes.de, 1 koelnmafia.de, 1 koenigsbrunner-tafel.de, 1 koerper-wie-seele.de, 0 -koerperimpuls.ch, 1 koertner-muth.com, 1 koertner-muth.de, 1 koethen-markt.de, 1 @@ -13205,7 +13186,6 @@ komget.net, 0 komicloud.com, 1 komidoc.com, 1 komiksbaza.pl, 1 -kominfo.go.id, 1 kominfo.net, 1 kominki-sauny.pl, 1 komischkeszeug.de, 1 @@ -13248,6 +13228,7 @@ korono.de, 1 korp.fr, 1 korrelzout.nl, 1 kortgebyr.dk, 1 +koryfi.com, 1 kosaki.moe, 1 koscielniak-nieruchomosci.pl, 1 kosho.org, 1 @@ -13393,6 +13374,7 @@ kundenerreichen.de, 1 kundo.se, 1 kungerkueken.de, 1 kunstundunrat.de, 1 +kuoruan.com, 1 kupferstichshop.com, 1 kupiec.eu.org, 1 kupimlot.ru, 1 @@ -13446,7 +13428,6 @@ kyoto-tomikawa.jp, 1 kyoto-tomoshibi.jp, 1 kyujin-office.net, 1 kyunyuki.com, 1 -kyusyu.org, 1 kyy.me, 1 kzsdabas.hu, 1 l-lab.org, 1 @@ -13570,6 +13551,7 @@ lapolla.com, 1 laposte.net, 1 lapotagere.ch, 1 lapparente-aise.ch, 1 +laracode.eu, 1 laraeph.com, 1 laranara.se, 1 laraveldirectory.com, 1 @@ -13783,6 +13765,7 @@ legjobblogo.hu, 1 legland.fr, 1 legoutdesplantes.be, 1 legymnase.eu, 1 +lehighmathcircle.org, 1 lehtinen.xyz, 1 leibniz-remscheid.de, 0 leifdreizler.com, 0 @@ -13895,7 +13878,6 @@ leuenhagen.com, 1 leuthardtfamily.com, 1 levans.fr, 1 levanscatering.com, 1 -levelcheat.com, 1 levelupwear.com, 1 levendwater.org, 1 levensbron.nl, 1 @@ -13948,7 +13930,6 @@ libre.university, 1 libreboot.org, 1 librelamp.com, 1 libremail.nl, 1 -librends.org, 1 libreoffice-from-collabora.com, 1 libreofficefromcollabora.com, 1 librervac.org, 1 @@ -14142,10 +14123,9 @@ littleservice.cn, 1 littleswitch.co.jp, 1 littlewatcher.com, 1 litvideoserver.de, 1 -litz.ca, 1 -litzenberger.ca, 1 liuboznaiko.eu, 1 liud.im, 1 +liudon.org, 1 liujunyang.com, 1 liukang.tech, 1 liul.in, 1 @@ -14482,7 +14462,6 @@ lukaszorn.de, 1 lukasztkacz.com, 1 lukatz.de, 1 luke.ch, 1 -lukeistschuld.de, 1 lukeng.net, 1 lukmanulhakim.id, 1 lumiere.com, 1 @@ -14573,7 +14552,6 @@ ma-plancha.ch, 1 ma2t.com, 1 maartenderaedemaeker.be, 1 maartenprovo.be, 1 -maartenterpstra.xyz, 1 maartenvandekamp.nl, 1 mabulledu.net, 1 mac-i-tea.ch, 1 @@ -14637,7 +14615,6 @@ maelstrom.ninja, 1 maestrano.com, 1 maff.co.uk, 1 mafia.network, 1 -mafiaforum.de, 1 mafiasi.de, 1 magasinsalledebains.be, 1 magasinsalledebains.fr, 1 @@ -14712,6 +14689,7 @@ makenaiyo-fx.com, 1 makeshiftco.de, 1 makeuplove.nl, 1 makeyourank.com, 1 +makeyourlaws.org, 1 makinen.ru, 1 makkusu.photo, 1 makowitz.cz, 1 @@ -14814,7 +14792,6 @@ maone.net, 1 maorseo.com, 1 maosensanguentadasdejesus.net, 1 maowtm.org, 1 -maozedong.red, 1 map4erfurt.de, 1 map4jena.de, 1 mapasmundi.com.br, 1 @@ -15188,6 +15165,7 @@ me-center.com, 1 me-dc.com, 1 me-groups.com, 1 me.net.nz, 1 +meadowviewfarms.org, 1 mealgoo.com, 1 mealz.com, 1 meanevo.com, 1 @@ -15212,6 +15190,7 @@ media-instance.ru, 1 mediaarea.net, 1 mediaburst.co.uk, 1 mediadex.be, 1 +mediaexpert.fr, 1 medialab.nrw, 1 mediamarkt.pl, 1 mediaselection.eu, 1 @@ -15229,6 +15208,7 @@ mediterenopmaandag.nl, 1 medium.com, 1 mediumraw.org, 1 mediweed.tk, 1 +medlineplus.gov, 1 medo64.com, 1 medovea.ru, 1 medpics.com, 1 @@ -15404,7 +15384,6 @@ meterhost.com, 1 methamphetamine.co.uk, 1 methylone.com, 1 metin2sepeti.com, 1 -metrans-spedition.de, 1 metrix-money-ptc.com, 1 metroairvirtual.com, 1 metrobriefs.com, 1 @@ -15435,7 +15414,6 @@ mgoessel.de, 1 mgrossklaus.de, 1 mgrt.net, 1 mgsisk.com, 1 -mhalfter.de, 1 mhatlaw.com, 1 mheistermann.de, 1 mhermans.nl, 1 @@ -15605,6 +15583,7 @@ minf3-games.de, 1 mingo.nl, 1 mingram.net, 1 mingwah.ch, 1 +mingy.ddns.net, 1 mingyueli.com, 1 minhanossasenhora.com.br, 1 mini2.fi, 1 @@ -15690,6 +15669,7 @@ mitrax.com.br, 1 mitrecaasd.org, 1 mitremai.org, 1 mitsign.com, 1 +mitsu-szene.de, 1 mitsukabose.com, 1 mittelunsachlich.de, 1 mitzpettel.com, 1 @@ -15800,7 +15780,6 @@ modehaus-marionk.de, 1 modelcase.co.jp, 0 modelcube.com, 1 modeldimension.com, 1 -modelsclub.org.ua, 1 modelservis.cz, 1 modemaille.com, 1 modeportaal.nl, 1 @@ -15886,7 +15865,6 @@ monodukuri.com, 1 monolithapps.com, 1 monolithinteractive.com, 1 monoseis-monotica.gr, 1 -monpc-pro.fr, 1 monpermismoto.com, 1 monpermisvoiture.com, 1 monsieursavon.ch, 1 @@ -16009,7 +15987,6 @@ mozzilla.cz, 1 mp3gratuiti.com, 1 mpc-hc.org, 1 mpcompliance.com, 1 -mpe.org, 1 mpetroff.net, 1 mpg-universal.com, 1 mpg.ovh, 1 @@ -16492,7 +16469,6 @@ narodsovety.ru, 1 naroska.name, 1 narrativasdigitais.pt, 1 narthollis.net, 1 -nartuk.com.ua, 0 nasarawanewsonline.com, 1 nasbnation.com, 1 nascher.org, 0 @@ -16655,6 +16631,7 @@ neeerd.org, 1 neel.ch, 1 neels.ch, 1 neemzy.org, 1 +neer.io, 1 neet-investor.biz, 1 nefertitis.cz, 1 neftebitum-kngk.ru, 1 @@ -16706,6 +16683,7 @@ nephelion.org, 1 nephy.jp, 1 nepovolenainternetovahazardnihra.cz, 1 nercp.org.uk, 1 +nerdhouse.io, 1 nerdjokes.de, 1 nerdmind.de, 1 nerdoutstudios.tv, 1 @@ -16752,6 +16730,7 @@ nethackwiki.com, 1 nethunter.top, 1 netica.fr, 0 netki.com, 1 +netlocal.ru, 1 netmazk.net, 0 netnodes.net, 1 netraising.com, 1 @@ -16799,7 +16778,6 @@ neuroethics.com, 1 neurogroove.info, 1 neuronasdigitales.com, 1 neuropharmacology.com, 1 -neurotransmitter.net, 1 neutralox.com, 0 neuwal.com, 1 nevadafiber.net, 1 @@ -16881,7 +16859,6 @@ nfls.io, 1 nframe.io, 1 nfrost.me, 1 nfsec.pl, 1 -nfz.moe, 1 ng-firewall.com, 1 ngasembaru.com, 1 nghe.net, 1 @@ -16980,6 +16957,7 @@ nikksno.io, 1 niklasbabel.com, 1 nikobradshaw.com, 1 nikolaichik.photo, 1 +nikolasbradshaw.com, 1 nikolasgrottendieck.com, 1 nikomo.fi, 0 nil.gs, 1 @@ -17021,6 +16999,7 @@ nitropur.com, 1 nitropur.de, 1 nitrous-networks.com, 1 niu.moe, 1 +niva.synology.me, 1 nivi.ca, 1 nix.org.ua, 0 nixien.fr, 1 @@ -17051,7 +17030,7 @@ nobly.de, 1 noc.wang, 1 nocit.dk, 1 nocs.cn, 1 -nodari.com.ar, 1 +nodari.com.ar, 0 nodariweb.com.ar, 1 node-core-app.com, 1 nodecompat.com, 1 @@ -17157,6 +17136,7 @@ notalone.gov, 1 notar-glagowski.com, 1 notar-glagowski.de, 1 notar-peikert.com, 1 +notarankastojkovic.me, 1 notarobot.fr, 1 notarvysocina.cz, 1 notbolaget.se, 1 @@ -17167,7 +17147,6 @@ notesforpebble.com, 1 notevencode.com, 1 noticiasdehumor.com, 1 notificami.com, 1 -notify.moe, 1 notinglife.com, 1 notjustvacs.com, 1 notnize.net, 1 @@ -17183,6 +17162,7 @@ novabench.com, 1 novacraft.me, 1 novafreixo.pt, 1 novaopcaofestas.com.br, 1 +novascan.net, 1 novawave.ca, 1 novelfeed.com, 1 novelinglife.net, 1 @@ -17493,7 +17473,6 @@ olympe-transport.fr, 1 olympiads.ca, 1 olympic-research.com, 1 omanko.porn, 1 -omarh.net, 1 omertabeyond.com, 1 omertabeyond.net, 1 ometepeislandinfo.com, 1 @@ -17665,7 +17644,6 @@ opportunitycorps.org, 1 opposer.me, 1 opq.pw, 1 oprbox.com, 1 -oprechtgezegd.nl, 1 opreismetingvoorunicef.nl, 0 opsmate.com, 0 opsnotepad.com, 1 @@ -18033,6 +18011,9 @@ pascal-wittmann.de, 1 pascalchristen.ch, 1 pascaline-jouis.fr, 1 pascalleguern.com, 1 +pascalmathis.com, 1 +pascalmathis.me, 1 +pascalmathis.net, 1 pascalspoerri.ch, 1 pass.org.my, 1 passieposse.nl, 1 @@ -18309,6 +18290,7 @@ perspektivwechsel-coaching.de, 1 persson.im, 1 persson.me, 1 perucasestoril.com.br, 1 +pervacio.hu, 1 perzeidi.hr, 1 pestalozzishop.com.br, 1 pestici.de, 1 @@ -18702,7 +18684,7 @@ plugin-planet.com, 1 pluginfactory.io, 1 plumlocosoft.com, 1 plumnet.ch, 1 -plumpie.net, 1 +plumpie.net, 0 plus-5.com, 1 plus-u.com.au, 1 plus.google.com, 0 @@ -18932,6 +18914,8 @@ pozyczka-bez-zaswiadczen.pl, 1 pozytywnyplan.pl, 1 pozzo-balbi.com, 1 ppipe.net, 1 +ppmathis.ch, 1 +ppmathis.com, 1 ppmoon.com, 1 ppoozl.com, 1 ppro.com, 1 @@ -18941,7 +18925,6 @@ prac.to, 1 pracowniatkanin.com, 1 practicepanther.com, 1 practo.com, 1 -practodev.com, 1 prado.it, 1 praeparation-keppner.de, 1 prague-swim.cz, 1 @@ -18954,6 +18937,7 @@ praxis-familienglueck.de, 1 prayerrequest.com, 1 prazeresdavida.com.br, 1 prazynka.pl, 1 +prc.gov, 1 precedecaritas.com.br, 1 preciouslife.fr, 1 preciscx.com, 1 @@ -19006,7 +18990,6 @@ prevenir.ch, 1 priceholic.com, 1 prideindomination.com, 1 pridetechdesign.com, 1 -prielwurmjaeger.de, 1 prifo.se, 1 prilock.com, 1 primaconsulting.net, 1 @@ -19145,6 +19128,7 @@ propertygroup.pl, 1 propertyone.mk, 1 propipesystem.com, 1 propmag.co, 1 +proposalonline.com, 1 propr.no, 1 propseller.com, 1 proslimdiets.com, 1 @@ -19516,6 +19500,7 @@ radiomodem.dk, 1 radiomontebianco.it, 1 radionicabg.com, 1 radiopolarniki.spb.ru, 1 +radiormi.com, 1 radis-adopt.com, 1 radishmoon.com, 1 radondetectionandcontrol.com, 1 @@ -19584,7 +19569,6 @@ rapenroer.nl, 1 raphael.li, 1 raphaelcasazza.ch, 1 rapidapp.io, 1 -rapido.nu, 1 rapidshit.net, 1 rapidstone.com, 1 rareative.com, 1 @@ -19662,6 +19646,7 @@ reades.co.uk, 1 readingandmath.org, 1 readism.io, 1 readityourself.net, 1 +readmeeatmedrinkme.com, 0 readonly.de, 1 readouble.com, 0 readtldr.com, 1 @@ -19880,7 +19865,6 @@ renlen.nl, 1 rennfire.org, 1 renrenche.com, 0 rens.nu, 1 -renscreations.com, 1 rent-a-coder.de, 1 rentasweb.gob.ar, 1 rentbrowser.com, 1 @@ -20092,7 +20076,6 @@ ripmixmake.org, 1 ripple.com, 1 risaphuketproperty.com, 1 riscascape.net, 1 -rischard.org, 1 rise-technologies.com, 1 riseup.net, 1 rishikeshyoga.in, 1 @@ -20103,9 +20086,7 @@ ristioja.ee, 1 ristoarea.it, 1 ristorantefattoamano.eu, 1 ristorantefattoamano.it, 1 -rivaforum.de, 1 rivalsa.cn, 1 -rivastation.de, 1 riverbanktearooms.co.uk, 1 riverford.co.uk, 1 rivermendhealthcenters.com, 1 @@ -20195,6 +20176,7 @@ rodevlaggen.nl, 1 rodichi.net, 1 rodneybrooksjr.com, 1 rodolfo.gs, 1 +rodomonte.org, 1 rodrigocarvalho.blog.br, 1 rodzina-kupiec.eu.org, 1 roeckx.be, 1 @@ -20604,6 +20586,7 @@ saludsexualmasculina.org, 1 saludsis.mil.co, 1 salutethepig.com, 1 salverainha.org, 1 +salzamt.tk, 1 sam-football.fr, 1 samaritan.tech, 1 samaritansnet.org, 1 @@ -20658,7 +20641,6 @@ sandraindenfotografie.nl, 1 sandrolittke.de, 1 sanglierhurlant.fr, 1 sangwon.io, 1 -sanhei.ch, 1 sanik.my, 1 sanissimo.com.mx, 1 sanitairwinkel.be, 1 @@ -20832,6 +20814,7 @@ schlarp.com, 1 schlechtewitze.com, 1 schlossereieder.at, 1 schmaeh-coaching.ch, 1 +schmelzle.io, 1 schmidthomes.com, 1 schmidttulskie.de, 1 schmitt-max.com, 1 @@ -20873,7 +20856,7 @@ schreibnacht.de, 1 schreinerei-jahreis.de, 1 schreinerei-wortmann.de, 1 schrenkinzl.at, 1 -schrikdraad.net, 1 +schrikdraad.net, 0 schritt4fit.de, 1 schrodingersscat.com, 1 schrodingersscat.org, 1 @@ -21024,6 +21007,7 @@ sec.ec, 1 sec.gd, 1 sec3ure.co.uk, 1 secanje.nl, 1 +secboom.com, 1 seccomp.ru, 1 secctexasgiving.org, 0 secgui.de, 1 @@ -21043,6 +21027,7 @@ secretserveronline.com, 1 secretum.tech, 1 sectelligence.nl, 1 sectest.ml, 1 +sectia22.ro, 1 sectio-aurea.org, 1 section-31.org, 1 section.io, 1 @@ -21226,6 +21211,7 @@ sereema.com, 1 serenaden.at, 1 serf.io, 1 sergeyreznikov.com, 1 +sergije-stanic.me, 1 sergiosantoro.it, 1 serienstream.to, 1 serigraphs.co.uk, 1 @@ -21357,6 +21343,7 @@ shakespearevet.com, 1 shalott.org, 1 shamara.info, 1 shamariki.ru, 1 +shamka.ru, 1 shan.io, 0 shanae.nl, 1 shanetully.com, 1 @@ -21753,7 +21740,6 @@ sja-se-training.com, 1 sjd.is, 1 sjdaws.com, 1 sjoorm.com, 1 -sjsc.fr, 1 sk-net.cz, 1 skalender.ch, 0 skandiabanken.no, 1 @@ -21951,6 +21937,7 @@ smatch.com, 1 smb445.com, 1 smdavis.us, 1 smdcn.net, 1 +sme-gmbh.net, 1 smeetsengraas.com, 1 smexpt.com, 1 smiatek.name, 1 @@ -21970,11 +21957,6 @@ smm.im, 1 smol.cat, 1 smoo.st, 1 smoothgesturesplus.com, 1 -smoothics.at, 1 -smoothics.com, 1 -smoothics.eu, 1 -smoothics.mobi, 1 -smoothics.net, 1 smorgasblog.ie, 1 smow.com, 1 smow.de, 1 @@ -21994,6 +21976,7 @@ snap.com, 1 snapappointments.com, 1 snapfinance.com, 1 snapserv.ch, 1 +snapserv.net, 1 snarf.in, 1 snatch.com.ua, 1 snazzie.nl, 1 @@ -22007,7 +21990,6 @@ sneedit.com, 1 sneedit.de, 1 sneeuwhoogtes.eu, 1 sneezry.com, 1 -snekchat.moe, 1 snelshops.nl, 1 snelwebshop.nl, 1 snelxboxlivegold.nl, 1 @@ -22156,7 +22138,6 @@ sondergaard.de, 1 sonerezh.bzh, 1 songsmp3.co, 1 songsthatsavedyourlife.com, 1 -songzhuolun.com, 1 sonic.sk, 0 sonja-daniels.com, 1 sonja-kowa.de, 1 @@ -22175,6 +22156,7 @@ sorakumo.jp, 1 sorcix.com, 1 sorenstudios.com, 1 sorex.photo, 1 +sorincocorada.ro, 1 sorinmuntean.ro, 1 sorn.service.gov.uk, 1 sorrowfulunfounded.com, 1 @@ -22275,7 +22257,6 @@ spaysy.com, 1 spdepartamentos.com.br, 1 spdf.net, 1 spearfishingmx.com, 1 -specialedesigns.com, 1 speciesism.com, 1 spectrosoftware.de, 1 spedition-transport-umzug.de, 1 @@ -22400,7 +22381,6 @@ sqlapius.net, 1 sqr-training.com, 1 sqroot.eu, 1 sqshq.de, 1 -squaddraft.com, 1 square-gaming.org, 1 square-src.de, 0 square.com, 0 @@ -22471,6 +22451,7 @@ stackptr.com, 1 stacktile.io, 1 stadionmanager.com, 1 stadm.com, 1 +stadt-apotheke-muensingen.de, 1 stadtgartenla.com, 1 stadtpapa.de, 1 stadtplan-ilmenau.de, 1 @@ -22492,6 +22473,7 @@ stamboomvanderwal.nl, 1 stamkassa.nl, 1 stammtisch.domains, 1 stamonicatourandtravel.com, 1 +stamparmakarije.me, 1 stampederadon.com, 1 standagainstspying.org, 1 standards.gov, 1 @@ -22520,7 +22502,6 @@ starstreak.net, 1 startlab.sk, 1 startpage.com, 1 startpage.info, 1 -startrek.in, 1 starttraffic.uk, 1 startup.melbourne, 1 startupsort.com, 1 @@ -22615,7 +22596,6 @@ stephsolis.net, 1 stephspace.net, 1 stepsweb.com, 1 sterchi-fromages.ch, 1 -stereo.lu, 1 stereochro.me, 0 stern-freunde.de, 1 stern.koeln, 1 @@ -22885,7 +22865,6 @@ superguide.com.au, 1 superhappiness.com, 1 superhome.com.au, 1 superkonsult.se, 1 -superlandnetwork.de, 1 supermarx.nl, 1 supern0va.net, 1 supernt.lt, 1 @@ -23382,7 +23361,6 @@ techwords.io, 1 tecnoarea.com.ar, 1 tecnobrasilloja.com.br, 1 tecnodritte.it, 1 -tecyt.com, 1 tedb.us, 1 teddy.ch, 1 teddybradford.com, 1 @@ -23586,7 +23564,6 @@ theavenuegallery.com, 1 thebakers.com.br, 1 thebakingclass.com, 1 thebeautifulmusic.net, 1 -thebeginningisnye.com, 1 thebest.ch, 1 thebestsavingsplan.com, 1 thebigdatacompany.com, 1 @@ -23810,6 +23787,7 @@ thisbrownman.com, 1 thiscloudiscrap.com, 0 thisfreelife.gov, 1 thisishugo.com, 0 +thisistheserver.com, 1 thismumdoesntknowbest.com, 1 thisoldearth.com, 1 thisserver.dontexist.net, 1 @@ -23922,7 +23900,6 @@ timbarlotta.com, 1 timbishopartist.com, 1 timdebruijn.nl, 1 timdeneau.com, 1 -timdoug.com, 1 time2060.ru, 1 time22.com, 1 timeauction.hk, 1 @@ -24004,7 +23981,6 @@ tkjg.fi, 1 tkn.tokyo, 1 tkts.cl, 1 tkusano.jp, 1 -tlach.cz, 1 tlehseasyads.com, 1 tlo.xyz, 1 tloxygen.com, 1 @@ -24270,7 +24246,6 @@ touch.facebook.com, 0 touch.mail.ru, 1 touchoflife.in, 1 touchscreentills.com, 1 -touchstonefms.co.uk, 1 touha.me, 0 touhou.cc, 1 toujours-actif.com, 1 @@ -24528,6 +24503,7 @@ trusitio.com, 1 trustcase.com, 1 trustedinnovators.com, 1 trustfield.ch, 1 +truthmessages.pw, 1 trw-reseller.com, 1 trybabyschoice.com, 1 tryfabulousdiet.com, 1 @@ -24833,6 +24809,7 @@ unerosesurlalune.fr, 1 unexpected.nu, 1 unfdev.com, 1 unfettered.net, 0 +unfuddle.cn, 1 unga.dk, 1 ungegamere.dk, 1 ungern.guide, 1 @@ -24913,7 +24890,6 @@ unsee.cc, 1 unseen.is, 1 unseen.tw, 1 unser-gartenforum.de, 1 -unsupervised.ca, 1 unsuspicious.click, 1 unterfrankenclan.de, 1 unterkunft.guru, 1 @@ -24923,11 +24899,11 @@ untoldstory.eu, 1 unun.fi, 1 unusualhatclub.com, 1 unveiledgnosis.com, 1 -unwomen.is, 1 unx.dk, 1 unxicdellum.cat, 1 upandclear.org, 1 upani.net, 1 +upay.ru, 1 upbad.com, 1 upbeatrobot.com, 1 upbeatrobot.eu, 1 @@ -25049,7 +25025,6 @@ uwimonacs.org.jm, 1 uxux.pl, 1 uygindir.ml, 1 v-u-z.ru, 1 -v0rtex.xyz, 1 v12.co.uk, 1 v1sit0r.ru, 1 v2bv.win, 1 @@ -25084,13 +25059,13 @@ valecnatechnika.cz, 1 valenciadevops.me, 1 valenhub.com, 1 valenhub.es, 1 -valenscaelum.com, 1 valentin-sundermann.de, 1 valentineapparel.com, 1 valentineforpresident.com, 1 valentinesongs.com, 1 valentinritz.com, 1 valeriansaliou.name, 1 +valesdigital.com, 1 validatis.com, 1 validator.nu, 1 validbrands.com, 1 @@ -25120,6 +25095,7 @@ vandeput.be, 1 vanderkrieken.org, 1 vandermeer.frl, 1 vanderrijt.nl, 1 +vanderstraeten.dynv6.net, 1 vanderziel.org, 1 vanessabalibridal.com, 1 vangeluwedeberlaere.be, 1 @@ -25250,7 +25226,6 @@ verrerie-mousseline.org, 1 versagercloud.de, 1 versbeton.nl, 1 versia.ru, 1 -versicherungskontor.net, 0 verspai.de, 1 verstraetenusedcars.be, 1 vertebrates.com, 1 @@ -25658,7 +25633,7 @@ wardow.com, 1 warekon.com, 1 warekon.dk, 1 warezaddict.com, 1 -warflame.net, 0 +warflame.net, 1 wargameexclusive.com, 1 warhaggis.com, 1 warlions.info, 0 @@ -26031,7 +26006,6 @@ whitewinterwolf.com, 1 whitkirkartsguild.com, 1 whitkirkchurch.org.uk, 1 whitworth.nyc, 1 -whmcs.hosting, 1 who.pm, 1 whocalld.com, 1 whocalled.us, 1 @@ -26330,7 +26304,6 @@ wpac.de, 1 wpandup.org, 1 wpcharged.nz, 1 wpdirecto.com, 1 -wpfast.net, 1 wphome.org, 1 wphostingblog.nl, 1 wpinfos.de, 1 @@ -26395,7 +26368,6 @@ wt-server3.de, 1 wtf.ninja, 1 wtfismyip.com, 1 wth.in, 1 -wtpmj.com, 1 wubify.com, 1 wubocong.com, 1 wuchipc.com, 1 @@ -26462,6 +26434,7 @@ www.irccloud.com, 0 www.lastpass.com, 0 www.linode.com, 0 www.lookout.com, 0 +www.makeyourlaws.org, 1 www.messenger.com, 1 www.mydigipass.com, 0 www.mylookout.com, 0 @@ -26543,7 +26516,6 @@ xeonlab.de, 1 xerblade.com, 1 xerhost.de, 0 xetown.com, 1 -xfack.com, 1 xfd3.de, 1 xferion.com, 1 xfix.pw, 1 @@ -26728,7 +26700,6 @@ xss.sk, 1 xsstime.nl, 1 xsyds.cn, 1 xsz.jp, 1 -xt.om, 1 xtarget.ru, 1 xtom.chat, 1 xtom.com, 1 @@ -27033,6 +27004,7 @@ yumeconcert.com, 1 yuna.tg, 1 yunity.org, 1 yunjishou.pro, 1 +yunzhan.io, 1 yuricarlenzoli.it, 1 yurikirin.me, 1 yurimoens.be, 1 @@ -27120,7 +27092,6 @@ zeitpunkt-kulturmagazin.de, 1 zeitzer-turngala.de, 1 zekinteractive.com, 1 zelezny.uk, 0 -zelfmoord.ga, 1 zelfrijdendeautos.com, 1 zellari.ru, 1 zeloz.xyz, 1 @@ -27174,7 +27145,6 @@ zhang-hao.com, 1 zhangfangzhou.com, 1 zhangge.net, 1 zhanghao.me, 1 -zhangsidan.com, 1 zhangsir.net, 1 zhangyuhao.com, 1 zhaochen.xyz, 1 @@ -27227,13 +27197,13 @@ znacite.com, 1 znation.nl, 1 zning.net.cn, 1 zobraz.cz, 1 -zockenbiszumumfallen.de, 1 zoeller.me, 1 zohar.shop, 1 zohar.wang, 0 zoigl.club, 1 zojadravai.com, 1 zoki.art, 1 +zolotoy-standart.com.ua, 1 zombiesecured.com, 1 zomerschoen.nl, 1 zone-produkte.de, 1 @@ -27291,7 +27261,6 @@ zuolan.me, 1 zup.me, 1 zupago.com, 1 zupago.pe, 1 -zuram.net, 1 zurickrelogios.com.br, 1 zurret.de, 1 zusjesvandenbos.nl, 1 diff --git a/servo/components/atoms/static_atoms.txt b/servo/components/atoms/static_atoms.txt index 9a878b09017b..efded7c65a9b 100644 --- a/servo/components/atoms/static_atoms.txt +++ b/servo/components/atoms/static_atoms.txt @@ -1,75 +1,79 @@ -serif -sans-serif -cursive -fantasy -monospace - -left -center -right - -none - -hidden -submit -button -reset -radio -checkbox -file -image -password -text -search -url -tel -email -datetime -date -month -week -time -datetime-local -number - -dir - -DOMContentLoaded -select -input -load -loadstart -loadend -progress -transitionend -error -readystatechange -message -close -storage -activate -webglcontextcreationerror -mouseover -beforeunload -message -click -keydown -keypress abort -invalid +activate +beforeunload +button +canplay +canplaythrough +center change -open -toggle -statechange -controllerchange -fetch characteristicvaluechanged +checkbox +click +close +controllerchange +cursive +date +datetime +datetime-local +dir +DOMContentLoaded +email +emptied +error +fantasy +fetch +file fullscreenchange fullscreenerror gattserverdisconnected +hidden +image +input +invalid +keydown +keypress +left +load +loadeddata +loadedmetadata +loadend +loadstart +message +message +monospace +month +mouseover +none +number onchange - -reftest-wait - -screen +open +password +pause +play +playing print +progress +radio +readystatechange +reftest-wait +reset +right +sans-serif +screen +search +select +serif +statechange +storage +submit +suspend +tel +text +time +timeupdate +toggle +transitionend +url +waiting +webglcontextcreationerror +week diff --git a/servo/components/script/dom/htmlmediaelement.rs b/servo/components/script/dom/htmlmediaelement.rs index 79560fce4bad..965599e93c3b 100644 --- a/servo/components/script/dom/htmlmediaelement.rs +++ b/servo/components/script/dom/htmlmediaelement.rs @@ -19,7 +19,7 @@ use dom::bindings::reflector::DomObject; use dom::bindings::str::DOMString; use dom::document::Document; use dom::element::{Element, AttributeMutation}; -use dom::event::{Event, EventBubbles, EventCancelable}; +use dom::eventtarget::EventTarget; use dom::htmlaudioelement::HTMLAudioElement; use dom::htmlelement::HTMLElement; use dom::htmlsourceelement::HTMLSourceElement; @@ -36,7 +36,6 @@ use net_traits::{FetchResponseListener, FetchMetadata, Metadata, NetworkError}; use net_traits::request::{CredentialsMode, Destination, RequestInit, Type as RequestType}; use network_listener::{NetworkListener, PreInvoke}; use script_thread::{Runnable, ScriptThread}; -use servo_atoms::Atom; use servo_url::ServoUrl; use std::cell::Cell; use std::sync::{Arc, Mutex}; @@ -111,7 +110,12 @@ impl FetchResponseListener for HTMLMediaElementContext { // https://html.spec.whatwg.org/multipage/#concept-media-load-resource step 4, // => "If mode is remote" step 2 if time::get_time() > self.next_progress_event { - elem.queue_fire_simple_event("progress"); + let window = window_from_node(&*elem); + window.dom_manipulation_task_source().queue_simple_event( + elem.upcast(), + atom!("progress"), + &window, + ); self.next_progress_event = time::get_time() + Duration::milliseconds(350); } } @@ -129,11 +133,11 @@ impl FetchResponseListener for HTMLMediaElementContext { else if status.is_ok() { elem.change_ready_state(HAVE_ENOUGH_DATA); - elem.fire_simple_event("progress"); + elem.upcast::().fire_event(atom!("progress")); elem.network_state.set(NETWORK_IDLE); - elem.fire_simple_event("suspend"); + elem.upcast::().fire_event(atom!("suspend")); } // => "If the connection is interrupted after some media data has been received..." else if elem.ready_state.get() != HAVE_NOTHING { @@ -147,7 +151,7 @@ impl FetchResponseListener for HTMLMediaElementContext { // TODO: Step 4 - update delay load flag // Step 5 - elem.fire_simple_event("error"); + elem.upcast::().fire_event(atom!("error")); } else { // => "If the media data cannot be fetched at all..." elem.queue_dedicated_media_source_failure_steps(); @@ -267,7 +271,7 @@ impl HTMLMediaElement { // https://html.spec.whatwg.org/multipage/#notify-about-playing fn notify_about_playing(&self) { // Step 1 - self.fire_simple_event("playing"); + self.upcast::().fire_event(atom!("playing")); // TODO Step 2 } @@ -297,11 +301,11 @@ impl HTMLMediaElement { impl Runnable for Task { fn handler(self: Box) { - let elem = self.elem.root(); + let target = Root::upcast::(self.elem.root()); // 2.2.1 - elem.fire_simple_event("timeupdate"); + target.fire_event(atom!("timeupdate")); // 2.2.2 - elem.fire_simple_event("pause"); + target.fire_event(atom!("pause")); // TODO 2.2.3 } } @@ -313,21 +317,6 @@ impl HTMLMediaElement { let _ = win.dom_manipulation_task_source().queue(task, win.upcast()); } - fn queue_fire_simple_event(&self, type_: &'static str) { - let win = window_from_node(self); - let task = box FireSimpleEventTask::new(self, type_); - let _ = win.dom_manipulation_task_source().queue(task, win.upcast()); - } - - fn fire_simple_event(&self, type_: &str) { - let window = window_from_node(self); - let event = Event::new(window.upcast(), - Atom::from(type_), - EventBubbles::DoesNotBubble, - EventCancelable::NotCancelable); - event.fire(self.upcast()); - } - // https://html.spec.whatwg.org/multipage/#ready-states fn change_ready_state(&self, ready_state: u16) { let old_ready_state = self.ready_state.get(); @@ -337,12 +326,19 @@ impl HTMLMediaElement { return; } + let window = window_from_node(self); + let task_source = window.dom_manipulation_task_source(); + // Step 1 match (old_ready_state, ready_state) { // previous ready state was HAVE_NOTHING, and the new ready state is // HAVE_METADATA (HAVE_NOTHING, HAVE_METADATA) => { - self.queue_fire_simple_event("loadedmetadata"); + task_source.queue_simple_event( + self.upcast(), + atom!("loadedmetadata"), + &window, + ); } // previous ready state was HAVE_METADATA and the new ready state is @@ -352,7 +348,11 @@ impl HTMLMediaElement { (HAVE_METADATA, HAVE_ENOUGH_DATA) => { if self.first_data_load.get() { self.first_data_load.set(false); - self.queue_fire_simple_event("loadeddata"); + task_source.queue_simple_event( + self.upcast(), + atom!("loadeddata"), + &window, + ); } } @@ -379,7 +379,11 @@ impl HTMLMediaElement { (HAVE_CURRENT_DATA, HAVE_FUTURE_DATA) | (HAVE_METADATA, HAVE_FUTURE_DATA) | (HAVE_NOTHING, HAVE_FUTURE_DATA) => { - self.queue_fire_simple_event("canplay"); + task_source.queue_simple_event( + self.upcast(), + atom!("canplay"), + &window, + ); if !self.Paused() { self.queue_notify_about_playing(); @@ -389,7 +393,11 @@ impl HTMLMediaElement { // new ready state is HAVE_ENOUGH_DATA (_, HAVE_ENOUGH_DATA) => { if old_ready_state <= HAVE_CURRENT_DATA { - self.queue_fire_simple_event("canplay"); + task_source.queue_simple_event( + self.upcast(), + atom!("canplay"), + &window, + ); if !self.Paused() { self.queue_notify_about_playing(); @@ -404,14 +412,22 @@ impl HTMLMediaElement { self.paused.set(false); // TODO step 2: show poster // Step 3 - self.queue_fire_simple_event("play"); + task_source.queue_simple_event( + self.upcast(), + atom!("play"), + &window, + ); // Step 4 self.queue_notify_about_playing(); // Step 5 self.autoplaying.set(false); } - self.queue_fire_simple_event("canplaythrough"); + task_source.queue_simple_event( + self.upcast(), + atom!("canplaythrough"), + &window, + ); } _ => (), @@ -460,7 +476,12 @@ impl HTMLMediaElement { self.network_state.set(NETWORK_LOADING); // Step 8 - self.queue_fire_simple_event("loadstart"); + let window = window_from_node(self); + window.dom_manipulation_task_source().queue_simple_event( + self.upcast(), + atom!("loadstart"), + &window, + ); // Step 9 match mode { @@ -511,7 +532,12 @@ impl HTMLMediaElement { self.network_state.set(NETWORK_IDLE); // 4.1.2 - self.queue_fire_simple_event("suspend"); + let window = window_from_node(self); + window.dom_manipulation_task_source().queue_simple_event( + self.upcast(), + atom!("suspend"), + &window, + ); // TODO 4.1.3 (delay load flag) @@ -584,7 +610,7 @@ impl HTMLMediaElement { // TODO step 4 (show poster) // Step 5 - self.fire_simple_event("error"); + self.upcast::().fire_event(atom!("error")); // TODO step 6 (resolve pending play promises) // TODO step 7 (delay load event) @@ -600,16 +626,23 @@ impl HTMLMediaElement { self.generation_id.set(self.generation_id.get() + 1); // TODO reject pending play promises + let window = window_from_node(self); + let task_source = window.dom_manipulation_task_source(); + // Step 3 let network_state = self.NetworkState(); if network_state == NETWORK_LOADING || network_state == NETWORK_IDLE { - self.queue_fire_simple_event("abort"); + task_source.queue_simple_event( + self.upcast(), + atom!("abort"), + &window, + ); } // Step 4 if network_state != NETWORK_EMPTY { // 4.1 - self.queue_fire_simple_event("emptied"); + task_source.queue_simple_event(self.upcast(), atom!("emptied"), &window); // TODO 4.2 (abort in-progress fetch) @@ -721,14 +754,21 @@ impl HTMLMediaElementMethods for HTMLMediaElement { // TODO 7.2 (show poster) + let window = window_from_node(self); + let task_source = window.dom_manipulation_task_source(); + // 7.3 - self.queue_fire_simple_event("play"); + task_source.queue_simple_event(self.upcast(), atom!("play"), &window); // 7.4 if state == HAVE_NOTHING || state == HAVE_METADATA || state == HAVE_CURRENT_DATA { - self.queue_fire_simple_event("waiting"); + task_source.queue_simple_event( + self.upcast(), + atom!("waiting"), + &window, + ); } else { self.queue_notify_about_playing(); } @@ -820,27 +860,6 @@ impl MicrotaskRunnable for MediaElementMicrotask { } } -struct FireSimpleEventTask { - elem: Trusted, - type_: &'static str, -} - -impl FireSimpleEventTask { - fn new(target: &HTMLMediaElement, type_: &'static str) -> FireSimpleEventTask { - FireSimpleEventTask { - elem: Trusted::new(target), - type_: type_, - } - } -} - -impl Runnable for FireSimpleEventTask { - fn handler(self: Box) { - let elem = self.elem.root(); - elem.fire_simple_event(self.type_); - } -} - struct DedicatedMediaSourceFailureTask { elem: Trusted, } diff --git a/servo/components/script_layout_interface/reporter.rs b/servo/components/script_layout_interface/reporter.rs index ac5706f51169..7f5acfef8c19 100644 --- a/servo/components/script_layout_interface/reporter.rs +++ b/servo/components/script_layout_interface/reporter.rs @@ -31,7 +31,7 @@ impl ParseErrorReporter for CSSErrorReporter { url.as_str(), location.line, location.column, - error.to_string()) + error) } //TODO: report a real filename diff --git a/servo/components/style/counter_style/mod.rs b/servo/components/style/counter_style/mod.rs index d7ca421b5741..094f14a1cdcf 100644 --- a/servo/components/style/counter_style/mod.rs +++ b/servo/components/style/counter_style/mod.rs @@ -327,7 +327,8 @@ impl ToCss for System { System::Additive => dest.write_str("additive"), System::Fixed { first_symbol_value } => { if let Some(value) = first_symbol_value { - write!(dest, "fixed {}", value) + dest.write_str("fixed ")?; + value.to_css(dest) } else { dest.write_str("fixed") } @@ -455,7 +456,7 @@ where W: fmt::Write { fn bound_to_css(range: Option, dest: &mut W) -> fmt::Result where W: fmt::Write { if let Some(finite) = range { - write!(dest, "{}", finite) + finite.to_css(dest) } else { dest.write_str("infinite") } diff --git a/servo/components/style/driver.rs b/servo/components/style/driver.rs index 568338c009b9..c6370d012e5b 100644 --- a/servo/components/style/driver.rs +++ b/servo/components/style/driver.rs @@ -13,7 +13,6 @@ use parallel; use parallel::{DispatchMode, WORK_UNIT_MAX}; use rayon; use scoped_tls::ScopedTLS; -use std::borrow::Borrow; use std::collections::VecDeque; use std::mem; use time; @@ -115,12 +114,12 @@ where let mut aggregate = mem::replace(&mut context.thread_local.statistics, Default::default()); let parallel = maybe_tls.is_some(); - if let Some(tls) = maybe_tls { + if let Some(ref mut tls) = maybe_tls { let slots = unsafe { tls.unsafe_get() }; aggregate = slots.iter().fold(aggregate, |acc, t| { match *t.borrow() { None => acc, - Some(ref cx) => &cx.borrow().statistics + &acc, + Some(ref cx) => &cx.statistics + &acc, } }); } diff --git a/servo/components/style/error_reporting.rs b/servo/components/style/error_reporting.rs index 66b9c99e3ffe..bfc9df177620 100644 --- a/servo/components/style/error_reporting.rs +++ b/servo/components/style/error_reporting.rs @@ -9,6 +9,7 @@ use cssparser::{BasicParseError, Token, SourceLocation}; use cssparser::ParseError as CssParseError; use log; +use std::fmt; use style_traits::ParseError; use stylesheets::UrlExtraData; @@ -46,104 +47,127 @@ pub enum ContextualParseError<'a> { InvalidCounterStyleExtendsWithAdditiveSymbols } -impl<'a> ContextualParseError<'a> { - /// Turn a parse error into a string representation. - pub fn to_string(&self) -> String { - fn token_to_str(t: &Token) -> String { +impl<'a> fmt::Display for ContextualParseError<'a> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn token_to_str(t: &Token, f: &mut fmt::Formatter) -> fmt::Result { match *t { - Token::Ident(ref i) => format!("identifier {}", i), - Token::AtKeyword(ref kw) => format!("keyword @{}", kw), - Token::Hash(ref h) => format!("hash #{}", h), - Token::IDHash(ref h) => format!("id selector #{}", h), - Token::QuotedString(ref s) => format!("quoted string \"{}\"", s), - Token::UnquotedUrl(ref u) => format!("url {}", u), - Token::Delim(ref d) => format!("delimiter {}", d), - Token::Number { int_value: Some(i), .. } => format!("number {}", i), - Token::Number { value, .. } => format!("number {}", value), - Token::Percentage { int_value: Some(i), .. } => format!("percentage {}", i), - Token::Percentage { unit_value, .. } => format!("percentage {}", unit_value * 100.), - Token::Dimension { value, ref unit, .. } => format!("dimension {}{}", value, unit), - Token::WhiteSpace(_) => format!("whitespace"), - Token::Comment(_) => format!("comment"), - Token::Colon => format!("colon (:)"), - Token::Semicolon => format!("semicolon (;)"), - Token::Comma => format!("comma (,)"), - Token::IncludeMatch => format!("include match (~=)"), - Token::DashMatch => format!("dash match (|=)"), - Token::PrefixMatch => format!("prefix match (^=)"), - Token::SuffixMatch => format!("suffix match ($=)"), - Token::SubstringMatch => format!("substring match (*=)"), - Token::Column => format!("column (||)"), - Token::CDO => format!("CDO ()"), - Token::Function(ref f) => format!("function {}", f), - Token::ParenthesisBlock => format!("parenthesis ("), - Token::SquareBracketBlock => format!("square bracket ["), - Token::CurlyBracketBlock => format!("curly bracket {{"), - Token::BadUrl(ref _u) => format!("bad url parse error"), - Token::BadString(ref _s) => format!("bad string parse error"), - Token::CloseParenthesis => format!("unmatched close parenthesis"), - Token::CloseSquareBracket => format!("unmatched close square bracket"), - Token::CloseCurlyBracket => format!("unmatched close curly bracket"), + Token::Ident(ref i) => write!(f, "identifier {}", i), + Token::AtKeyword(ref kw) => write!(f, "keyword @{}", kw), + Token::Hash(ref h) => write!(f, "hash #{}", h), + Token::IDHash(ref h) => write!(f, "id selector #{}", h), + Token::QuotedString(ref s) => write!(f, "quoted string \"{}\"", s), + Token::UnquotedUrl(ref u) => write!(f, "url {}", u), + Token::Delim(ref d) => write!(f, "delimiter {}", d), + Token::Number { int_value: Some(i), .. } => write!(f, "number {}", i), + Token::Number { value, .. } => write!(f, "number {}", value), + Token::Percentage { int_value: Some(i), .. } => write!(f, "percentage {}", i), + Token::Percentage { unit_value, .. } => write!(f, "percentage {}", unit_value * 100.), + Token::Dimension { value, ref unit, .. } => write!(f, "dimension {}{}", value, unit), + Token::WhiteSpace(_) => write!(f, "whitespace"), + Token::Comment(_) => write!(f, "comment"), + Token::Colon => write!(f, "colon (:)"), + Token::Semicolon => write!(f, "semicolon (;)"), + Token::Comma => write!(f, "comma (,)"), + Token::IncludeMatch => write!(f, "include match (~=)"), + Token::DashMatch => write!(f, "dash match (|=)"), + Token::PrefixMatch => write!(f, "prefix match (^=)"), + Token::SuffixMatch => write!(f, "suffix match ($=)"), + Token::SubstringMatch => write!(f, "substring match (*=)"), + Token::Column => write!(f, "column (||)"), + Token::CDO => write!(f, "CDO ()"), + Token::Function(ref name) => write!(f, "function {}", name), + Token::ParenthesisBlock => write!(f, "parenthesis ("), + Token::SquareBracketBlock => write!(f, "square bracket ["), + Token::CurlyBracketBlock => write!(f, "curly bracket {{"), + Token::BadUrl(ref _u) => write!(f, "bad url parse error"), + Token::BadString(ref _s) => write!(f, "bad string parse error"), + Token::CloseParenthesis => write!(f, "unmatched close parenthesis"), + Token::CloseSquareBracket => write!(f, "unmatched close square bracket"), + Token::CloseCurlyBracket => write!(f, "unmatched close curly bracket"), } } - fn parse_error_to_str(err: &ParseError) -> String { + fn parse_error_to_str(err: &ParseError, f: &mut fmt::Formatter) -> fmt::Result { match *err { - CssParseError::Basic(BasicParseError::UnexpectedToken(ref t)) => - format!("found unexpected {}", token_to_str(t)), - CssParseError::Basic(BasicParseError::EndOfInput) => - format!("unexpected end of input"), - CssParseError::Basic(BasicParseError::AtRuleInvalid(ref i)) => - format!("@ rule invalid: {}", i), - CssParseError::Basic(BasicParseError::AtRuleBodyInvalid) => - format!("@ rule invalid"), - CssParseError::Basic(BasicParseError::QualifiedRuleInvalid) => - format!("qualified rule invalid"), - CssParseError::Custom(ref err) => - format!("{:?}", err) + CssParseError::Basic(BasicParseError::UnexpectedToken(ref t)) => { + write!(f, "found unexpected ")?; + token_to_str(t, f) + } + CssParseError::Basic(BasicParseError::EndOfInput) => { + write!(f, "unexpected end of input") + } + CssParseError::Basic(BasicParseError::AtRuleInvalid(ref i)) => { + write!(f, "@ rule invalid: {}", i) + } + CssParseError::Basic(BasicParseError::AtRuleBodyInvalid) => { + write!(f, "@ rule invalid") + } + CssParseError::Basic(BasicParseError::QualifiedRuleInvalid) => { + write!(f, "qualified rule invalid") + } + CssParseError::Custom(ref err) => { + write!(f, "{:?}", err) + } } } match *self { - ContextualParseError::UnsupportedPropertyDeclaration(decl, ref err) => - format!("Unsupported property declaration: '{}', {}", decl, - parse_error_to_str(err)), - ContextualParseError::UnsupportedFontFaceDescriptor(decl, ref err) => - format!("Unsupported @font-face descriptor declaration: '{}', {}", decl, - parse_error_to_str(err)), - ContextualParseError::UnsupportedFontFeatureValuesDescriptor(decl, ref err) => - format!("Unsupported @font-feature-values descriptor declaration: '{}', {}", decl, - parse_error_to_str(err)), - ContextualParseError::InvalidKeyframeRule(rule, ref err) => - format!("Invalid keyframe rule: '{}', {}", rule, - parse_error_to_str(err)), - ContextualParseError::InvalidFontFeatureValuesRule(rule, ref err) => - format!("Invalid font feature value rule: '{}', {}", rule, - parse_error_to_str(err)), - ContextualParseError::UnsupportedKeyframePropertyDeclaration(decl, ref err) => - format!("Unsupported keyframe property declaration: '{}', {}", decl, - parse_error_to_str(err)), - ContextualParseError::InvalidRule(rule, ref err) => - format!("Invalid rule: '{}', {}", rule, parse_error_to_str(err)), - ContextualParseError::UnsupportedRule(rule, ref err) => - format!("Unsupported rule: '{}', {}", rule, parse_error_to_str(err)), - ContextualParseError::UnsupportedViewportDescriptorDeclaration(decl, ref err) => - format!("Unsupported @viewport descriptor declaration: '{}', {}", decl, - parse_error_to_str(err)), - ContextualParseError::UnsupportedCounterStyleDescriptorDeclaration(decl, ref err) => - format!("Unsupported @counter-style descriptor declaration: '{}', {}", decl, - parse_error_to_str(err)), - ContextualParseError::InvalidCounterStyleWithoutSymbols(ref system) => - format!("Invalid @counter-style rule: 'system: {}' without 'symbols'", system), - ContextualParseError::InvalidCounterStyleNotEnoughSymbols(ref system) => - format!("Invalid @counter-style rule: 'system: {}' less than two 'symbols'", system), - ContextualParseError::InvalidCounterStyleWithoutAdditiveSymbols => - "Invalid @counter-style rule: 'system: additive' without 'additive-symbols'".into(), - ContextualParseError::InvalidCounterStyleExtendsWithSymbols => - "Invalid @counter-style rule: 'system: extends …' with 'symbols'".into(), - ContextualParseError::InvalidCounterStyleExtendsWithAdditiveSymbols => - "Invalid @counter-style rule: 'system: extends …' with 'additive-symbols'".into(), + ContextualParseError::UnsupportedPropertyDeclaration(decl, ref err) => { + write!(f, "Unsupported property declaration: '{}', ", decl)?; + parse_error_to_str(err, f) + } + ContextualParseError::UnsupportedFontFaceDescriptor(decl, ref err) => { + write!(f, "Unsupported @font-face descriptor declaration: '{}', ", decl)?; + parse_error_to_str(err, f) + } + ContextualParseError::UnsupportedFontFeatureValuesDescriptor(decl, ref err) => { + write!(f, "Unsupported @font-feature-values descriptor declaration: '{}', ", decl)?; + parse_error_to_str(err, f) + } + ContextualParseError::InvalidKeyframeRule(rule, ref err) => { + write!(f, "Invalid keyframe rule: '{}', ", rule)?; + parse_error_to_str(err, f) + } + ContextualParseError::InvalidFontFeatureValuesRule(rule, ref err) => { + write!(f, "Invalid font feature value rule: '{}', ", rule)?; + parse_error_to_str(err, f) + } + ContextualParseError::UnsupportedKeyframePropertyDeclaration(decl, ref err) => { + write!(f, "Unsupported keyframe property declaration: '{}', ", decl)?; + parse_error_to_str(err, f) + } + ContextualParseError::InvalidRule(rule, ref err) => { + write!(f, "Invalid rule: '{}', ", rule)?; + parse_error_to_str(err, f) + } + ContextualParseError::UnsupportedRule(rule, ref err) => { + write!(f, "Unsupported rule: '{}', ", rule)?; + parse_error_to_str(err, f) + } + ContextualParseError::UnsupportedViewportDescriptorDeclaration(decl, ref err) => { + write!(f, "Unsupported @viewport descriptor declaration: '{}', ", decl)?; + parse_error_to_str(err, f) + } + ContextualParseError::UnsupportedCounterStyleDescriptorDeclaration(decl, ref err) => { + write!(f, "Unsupported @counter-style descriptor declaration: '{}', ", decl)?; + parse_error_to_str(err, f) + } + ContextualParseError::InvalidCounterStyleWithoutSymbols(ref system) => { + write!(f, "Invalid @counter-style rule: 'system: {}' without 'symbols'", system) + } + ContextualParseError::InvalidCounterStyleNotEnoughSymbols(ref system) => { + write!(f, "Invalid @counter-style rule: 'system: {}' less than two 'symbols'", system) + } + ContextualParseError::InvalidCounterStyleWithoutAdditiveSymbols => { + write!(f, "Invalid @counter-style rule: 'system: additive' without 'additive-symbols'") + } + ContextualParseError::InvalidCounterStyleExtendsWithSymbols => { + write!(f, "Invalid @counter-style rule: 'system: extends …' with 'symbols'") + } + ContextualParseError::InvalidCounterStyleExtendsWithAdditiveSymbols => { + write!(f, "Invalid @counter-style rule: 'system: extends …' with 'additive-symbols'") + } } } } @@ -174,7 +198,7 @@ impl ParseErrorReporter for RustLogReporter { location: SourceLocation, error: ContextualParseError) { if log_enabled!(log::LogLevel::Info) { - info!("Url:\t{}\n{}:{} {}", url.as_str(), location.line, location.column, error.to_string()) + info!("Url:\t{}\n{}:{} {}", url.as_str(), location.line, location.column, error) } } } diff --git a/servo/components/style/gecko/generated/bindings.rs b/servo/components/style/gecko/generated/bindings.rs index f8e0913ba267..d39be9eeea9c 100644 --- a/servo/components/style/gecko/generated/bindings.rs +++ b/servo/components/style/gecko/generated/bindings.rs @@ -1982,6 +1982,11 @@ extern "C" { viewport_units_used: *mut bool) -> u8; } +extern "C" { + pub fn Servo_StyleSet_SetDevice(set: RawServoStyleSetBorrowed, + pres_context: RawGeckoPresContextOwned) + -> u8; +} extern "C" { pub fn Servo_StyleSet_CompatModeChanged(raw_data: RawServoStyleSetBorrowed); diff --git a/servo/components/style/gecko/generated/structs_debug.rs b/servo/components/style/gecko/generated/structs_debug.rs index 5b97cbc3ab1c..7ffddc5747c4 100644 --- a/servo/components/style/gecko/generated/structs_debug.rs +++ b/servo/components/style/gecko/generated/structs_debug.rs @@ -1045,6 +1045,20 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; + pub type pair__EnableB = u8; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct pair__CheckArgs { + pub _address: u8, + } + pub type pair__CheckArgsDep = u8; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct pair__CheckTupleLikeConstructor { + pub _address: u8, + } + pub type pair__CheckTLC = u8; + pub type conditional_type<_If> = _If; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1064,32 +1078,118 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] + #[derive(Debug, Copy)] + pub struct forward_iterator_tag { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_forward_iterator_tag() { + assert_eq!(::std::mem::size_of::() , 1usize + , concat ! ( + "Size of: " , stringify ! ( forward_iterator_tag ) )); + assert_eq! (::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of " , stringify ! ( forward_iterator_tag ) + )); + } + impl Clone for forward_iterator_tag { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct bidirectional_iterator_tag { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_bidirectional_iterator_tag() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of: " , stringify ! ( bidirectional_iterator_tag + ) )); + assert_eq! (::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of " , stringify ! ( + bidirectional_iterator_tag ) )); + } + impl Clone for bidirectional_iterator_tag { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct random_access_iterator_tag { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_random_access_iterator_tag() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of: " , stringify ! ( random_access_iterator_tag + ) )); + assert_eq! (::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of " , stringify ! ( + random_access_iterator_tag ) )); + } + impl Clone for random_access_iterator_tag { + fn clone(&self) -> Self { *self } + } + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct iterator { pub _address: u8, } - pub type iterator_iterator_category<_Category> = _Category; pub type iterator_value_type<_Tp> = _Tp; pub type iterator_difference_type<_Distance> = _Distance; pub type iterator_pointer<_Pointer> = _Pointer; pub type iterator_reference<_Reference> = _Reference; + pub type iterator_iterator_category<_Category> = _Category; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct atomic { } - pub type _Base_bitset__WordT = ::std::os::raw::c_ulong; - pub type bitset__Base = u8; - pub type bitset__WordT = ::std::os::raw::c_ulong; + pub type atomic___base = u8; #[repr(C)] - #[derive(Debug)] - pub struct bitset_reference { - pub _M_wp: *mut root::std::bitset__WordT, - pub _M_bpos: usize, + #[derive(Debug, Copy, Clone)] + pub struct function { + pub _address: u8, } - } - pub mod __gnu_cxx { - #[allow(unused_imports)] - use self::super::super::root; + pub type __bit_iterator_difference_type = [u8; 0usize]; + pub type __bit_iterator_value_type = bool; + pub type __bit_iterator_pointer = u8; + pub type __bit_iterator_reference = u8; + pub type __bit_iterator_iterator_category = + root::std::random_access_iterator_tag; + pub type __bit_iterator___storage_type = [u8; 0usize]; + pub type __bit_iterator___storage_pointer = [u8; 0usize]; + #[repr(C)] + pub struct __bit_const_reference { + pub __seg_: root::std::__bit_const_reference___storage_pointer, + pub __mask_: root::std::__bit_const_reference___storage_type, + } + pub type __bit_const_reference___storage_type = [u8; 0usize]; + pub type __bit_const_reference___storage_pointer = [u8; 0usize]; + pub type __bit_reference___storage_type = [u8; 0usize]; + pub type __bit_reference___storage_pointer = [u8; 0usize]; + pub type __bitset_difference_type = isize; + pub type __bitset_size_type = usize; + pub type __bitset___storage_type = root::std::__bitset_size_type; + pub type __bitset___self = u8; + pub type __bitset___storage_pointer = + *mut root::std::__bitset___storage_type; + pub type __bitset___const_storage_pointer = + *const root::std::__bitset___storage_type; + pub const __bitset___bits_per_word: ::std::os::raw::c_uint = 64; + pub type __bitset_reference = u8; + pub type __bitset_const_reference = root::std::__bit_const_reference; + pub type __bitset_iterator = u8; + pub type __bitset_const_iterator = u8; + extern "C" { + #[link_name = "__n_words"] + pub static bitset___n_words: ::std::os::raw::c_uint; + } + pub type bitset_base = u8; + pub type bitset_reference = root::std::bitset_base; + pub type bitset_const_reference = root::std::bitset_base; } pub mod mozilla { #[allow(unused_imports)] @@ -1136,8 +1236,9 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = + root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1204,9 +1305,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<::std::os::raw::c_char>; + root::nsReadingIterator; pub type nsCStringRepr_iterator = - root::nsWritingIterator<::std::os::raw::c_char>; + root::nsWritingIterator; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -2229,7 +2330,7 @@ pub mod root { } } #[repr(C)] - #[derive(Debug)] + #[derive(Debug, Copy)] pub struct ThreadSafeAutoRefCnt { pub mValue: u64, } @@ -2250,6 +2351,9 @@ pub mod root { ThreadSafeAutoRefCnt ) , "::" , stringify ! ( mValue ) )); } + impl Clone for ThreadSafeAutoRefCnt { + fn clone(&self) -> Self { *self } + } #[repr(C)] #[derive(Debug)] pub struct OwningNonNull { @@ -6283,6 +6387,7 @@ pub mod root { pub struct AbstractThread { _unused: [u8; 0], } + pub type Preferences_PrefSetting = root::mozilla::dom::PrefSetting; #[repr(C)] #[derive(Debug)] pub struct CycleCollectedJSContext_RunInMetastableStateData { @@ -8622,6 +8727,8 @@ pub mod root { #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub struct OriginFlags(pub u8); + pub type ComputedKeyframeValues = + root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_open0_RawServoStyleSet_close0_instantiation() { assert_eq!(::std::mem::size_of::() , @@ -9680,15 +9787,6 @@ pub mod root { "Alignment of field: " , stringify ! ( ServoMediaList ) , "::" , stringify ! ( mRawList ) )); } - pub mod dmd { - #[allow(unused_imports)] - use self::super::super::super::root; - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct JSONWriteFunc { - _unused: [u8; 0], - } /// A PostTraversalTask is a task to be performed immediately after a Servo /// traversal. There are just a few tasks we need to perform, so we use this /// class rather than Runnables, to avoid virtual calls and some allocations. @@ -11738,6 +11836,11 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } + pub type WarningReporter = + ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -11843,6 +11946,140 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } + /// Describes a single error or warning that occurs in the execution of script. + #[repr(C)] + #[derive(Debug)] + pub struct JSErrorReport { + pub _base: root::JSErrorBase, + pub linebuf_: *const u16, + pub linebufLength_: usize, + pub tokenOffset_: usize, + pub notes: root::mozilla::UniquePtr, + pub flags: ::std::os::raw::c_uint, + pub exnType: i16, + pub _bitfield_1: u8, + pub __bindgen_padding_0: u8, + } + #[test] + fn bindgen_test_layout_JSErrorReport() { + assert_eq!(::std::mem::size_of::() , 72usize , concat ! + ( "Size of: " , stringify ! ( JSErrorReport ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebuf_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as + * const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebufLength_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * + const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( tokenOffset_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . notes as * const + _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( notes ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . flags as * const + _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( flags ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . exnType as * + const _ as usize } , 68usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( exnType ) )); + } + impl JSErrorReport { + #[inline] + pub fn isMuted(&self) -> bool { + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 1u64 as u8; + let val = (unit_field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_isMuted(&mut self, val: bool) { + let mask = 1u64 as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 0usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn ownsLinebuf_(&self) -> bool { + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 2u64 as u8; + let val = (unit_field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_ownsLinebuf_(&mut self, val: bool) { + let mask = 2u64 as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 1usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn new_bitfield_1(isMuted: bool, ownsLinebuf_: bool) -> u8 { + ({ ({ 0 } | ((isMuted as u8 as u8) << 0usize) & (1u64 as u8)) } | + ((ownsLinebuf_ as u8 as u8) << 1usize) & (2u64 as u8)) + } + } #[repr(C)] #[derive(Debug, Copy)] pub struct nsIWeakReference { @@ -12619,7 +12856,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, + pub featureSelectors: root::nsTArray, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -12724,7 +12961,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<::std::os::raw::c_uint>, + pub mValues: root::nsTArray, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -12822,7 +13059,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -15780,7 +16017,7 @@ pub mod root { /// tracking. NOTE: A string buffer can be modified only if its reference /// count is 1. #[repr(C)] - #[derive(Debug)] + #[derive(Debug, Copy)] pub struct nsStringBuffer { pub mRefCount: u32, pub mStorageSize: u32, @@ -15802,6 +16039,9 @@ pub mod root { "Alignment of field: " , stringify ! ( nsStringBuffer ) , "::" , stringify ! ( mStorageSize ) )); } + impl Clone for nsStringBuffer { + fn clone(&self) -> Self { *self } + } #[repr(C)] #[derive(Debug, Copy)] pub struct nsIAtom { @@ -17190,7 +17430,7 @@ pub mod root { pub mUpgradeInsecurePreloads: bool, pub mHSTSPrimingURIList: [u64; 6usize], pub mDocumentContainer: u64, - pub mCharacterSet: root::mozilla::NotNull<*const root::mozilla::Encoding>, + pub mCharacterSet: root::mozilla::NotNull<*const root::nsIDocument_Encoding>, pub mCharacterSetSource: i32, pub mParentDocument: *mut root::nsIDocument, pub mCachedRootElement: *mut root::mozilla::dom::Element, @@ -17242,7 +17482,7 @@ pub mod root { /// The current frame request callback handle pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray>, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -20193,7 +20433,7 @@ pub mod root { pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBoundContentSet: u64, - pub mWrapperTable: u64, + pub mWrapperTable: root::nsAutoPtr, pub mDocumentTable: u64, pub mLoadingDocTable: u64, pub mAttachedStack: root::nsBindingList, @@ -20239,6 +20479,8 @@ pub mod root { impl Clone for nsBindingManager_cycleCollection { fn clone(&self) -> Self { *self } } + pub type nsBindingManager_BoundContentBindingCallback = + root::std::function; pub type nsBindingManager_WrapperHashtable = u8; extern "C" { #[link_name = "_ZN16nsBindingManager21_cycleCollectorGlobalE"] @@ -24154,7 +24396,7 @@ pub mod root { pub _base_1: root::nsWrapperCache, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, - pub mContent: root::nsCOMPtr, + pub mContent: root::nsCOMPtr, /// Cache of Attrs. pub mAttributeCache: root::nsDOMAttributeMap_AttrCache, } @@ -25527,57 +25769,57 @@ pub mod root { pub struct nsRange { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_83 { + pub enum _bindgen_ty_18 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -29351,7 +29593,7 @@ pub mod root { pub mRefCnt: root::nsAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mTabGroup: root::RefPtr, @@ -32530,7 +32772,7 @@ pub mod root { pub type RawGeckoPropertyValuePairList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoStyleAnimationList = root::nsStyleAutoArray; pub type RawGeckoFontFaceRuleList = @@ -33203,46 +33445,46 @@ pub mod root { assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsISMILAttr ) )); } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_85 + root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_20 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_85 { + pub enum _bindgen_ty_20 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -33834,7 +34076,7 @@ pub mod root { "::" , stringify ! ( mArray ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char16_t_close0_instantiation() { + fn __bindgen_test_layout_nsCharTraits_open0_nsStringRepr_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33845,62 +34087,33 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_open0_char16_t_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_open0_char16_t_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_open0_nsStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); + root::nsReadingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_open0_nsStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); + root::nsWritingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char16_t_close0_instantiation_1() { + fn __bindgen_test_layout_nsCharTraits_open0_nsCStringRepr_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33911,7 +34124,44 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char_close0_instantiation_1() { + fn __bindgen_test_layout_nsReadingIterator_open0_nsCStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsWritingIterator_open0_nsCStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_open0_nsSubstringTuple_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_open0_nsCSubstringTuple_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34012,26 +34262,26 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxFontFeatureValueSet_ValueList_close0_instantiation() { @@ -34047,37 +34297,37 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_3() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_4() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_4() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxAlternateValue_close0_instantiation() { @@ -34113,18 +34363,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229171_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212850_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34480,7 +34730,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231001_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214679_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34645,7 +34895,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_236616__bindgen_ty_id_236623_close0_instantiation() { + fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_220268__bindgen_ty_id_220275_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34893,15 +35143,15 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239133_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222771_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation() { @@ -34961,15 +35211,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239438_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223076_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation_1() { @@ -35073,16 +35323,16 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_239987_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_223625_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); - assert_eq!(::std::mem::align_of::>() + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); } #[test] @@ -35284,28 +35534,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIWeakReference_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsWeakPtr_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocumentEncoder_close0_instantiation() { @@ -35488,7 +35725,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240413_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224047_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35578,7 +35815,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240818_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224455_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35679,7 +35916,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241790_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225430_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35710,13 +35947,17 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsInterfaceHashtable_open1_nsISupportsHashKey_nsIXPConnectWrappedJS_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) + fn __bindgen_test_layout_nsAutoPtr_open0_nsBindingManager_WrapperHashtable_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsAutoPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - u64 ) )); + root::nsAutoPtr ) + )); } #[test] fn __bindgen_test_layout_nsAutoPtr_open0_nsRefPtrHashtable_open1_nsURIHashKey_nsXBLDocumentInfo_close1_close0_instantiation() { @@ -35768,7 +36009,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242095_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225739_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35779,7 +36020,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242100_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225744_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35836,7 +36077,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242593_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226237_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36225,15 +36466,15 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_Element_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsCOMPtr_open0_nsDOMAttributeMap_Element_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); + root::nsCOMPtr ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_StyleSheet_close1_close0_instantiation_3() { @@ -36484,7 +36725,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation_1() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36495,7 +36736,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_245425_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229067_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36574,7 +36815,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251697_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_235293_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36607,7 +36848,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_252866_close0_instantiation() { + fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_236462_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36618,7 +36859,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_252870_close0_instantiation() { + fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_236466_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36640,7 +36881,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_252877_close0_instantiation() { + fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_236473_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36719,7 +36960,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253982_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237926_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36914,7 +37155,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_255427_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239297_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37019,7 +37260,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_257835_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241701_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37230,15 +37471,15 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_ImageURL_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_RefPtr_open0_imgRequestProxy_ImageURL_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); + root::RefPtr ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadGroup_close0_instantiation() { @@ -37786,7 +38027,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_260403_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244267_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38023,7 +38264,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_268208_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251963_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38034,7 +38275,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_268213_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251968_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38122,7 +38363,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_268326_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_252081_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38409,7 +38650,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_269912_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253688_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38431,7 +38672,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_270074_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253848_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38442,7 +38683,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_270079_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253853_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38453,7 +38694,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_5() { + fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38563,18 +38804,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_272654_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_256860_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38585,7 +38826,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_272662_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_256868_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/servo/components/style/gecko/generated/structs_release.rs b/servo/components/style/gecko/generated/structs_release.rs index a29e8b40cb32..939cd652ff00 100644 --- a/servo/components/style/gecko/generated/structs_release.rs +++ b/servo/components/style/gecko/generated/structs_release.rs @@ -1045,6 +1045,20 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; + pub type pair__EnableB = u8; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct pair__CheckArgs { + pub _address: u8, + } + pub type pair__CheckArgsDep = u8; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct pair__CheckTupleLikeConstructor { + pub _address: u8, + } + pub type pair__CheckTLC = u8; + pub type conditional_type<_If> = _If; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1064,32 +1078,118 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] + #[derive(Debug, Copy)] + pub struct forward_iterator_tag { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_forward_iterator_tag() { + assert_eq!(::std::mem::size_of::() , 1usize + , concat ! ( + "Size of: " , stringify ! ( forward_iterator_tag ) )); + assert_eq! (::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of " , stringify ! ( forward_iterator_tag ) + )); + } + impl Clone for forward_iterator_tag { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct bidirectional_iterator_tag { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_bidirectional_iterator_tag() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of: " , stringify ! ( bidirectional_iterator_tag + ) )); + assert_eq! (::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of " , stringify ! ( + bidirectional_iterator_tag ) )); + } + impl Clone for bidirectional_iterator_tag { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct random_access_iterator_tag { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_random_access_iterator_tag() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of: " , stringify ! ( random_access_iterator_tag + ) )); + assert_eq! (::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of " , stringify ! ( + random_access_iterator_tag ) )); + } + impl Clone for random_access_iterator_tag { + fn clone(&self) -> Self { *self } + } + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct iterator { pub _address: u8, } - pub type iterator_iterator_category<_Category> = _Category; pub type iterator_value_type<_Tp> = _Tp; pub type iterator_difference_type<_Distance> = _Distance; pub type iterator_pointer<_Pointer> = _Pointer; pub type iterator_reference<_Reference> = _Reference; + pub type iterator_iterator_category<_Category> = _Category; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct atomic { } - pub type _Base_bitset__WordT = ::std::os::raw::c_ulong; - pub type bitset__Base = u8; - pub type bitset__WordT = ::std::os::raw::c_ulong; + pub type atomic___base = u8; #[repr(C)] - #[derive(Debug)] - pub struct bitset_reference { - pub _M_wp: *mut root::std::bitset__WordT, - pub _M_bpos: usize, + #[derive(Debug, Copy, Clone)] + pub struct function { + pub _address: u8, } - } - pub mod __gnu_cxx { - #[allow(unused_imports)] - use self::super::super::root; + pub type __bit_iterator_difference_type = [u8; 0usize]; + pub type __bit_iterator_value_type = bool; + pub type __bit_iterator_pointer = u8; + pub type __bit_iterator_reference = u8; + pub type __bit_iterator_iterator_category = + root::std::random_access_iterator_tag; + pub type __bit_iterator___storage_type = [u8; 0usize]; + pub type __bit_iterator___storage_pointer = [u8; 0usize]; + #[repr(C)] + pub struct __bit_const_reference { + pub __seg_: root::std::__bit_const_reference___storage_pointer, + pub __mask_: root::std::__bit_const_reference___storage_type, + } + pub type __bit_const_reference___storage_type = [u8; 0usize]; + pub type __bit_const_reference___storage_pointer = [u8; 0usize]; + pub type __bit_reference___storage_type = [u8; 0usize]; + pub type __bit_reference___storage_pointer = [u8; 0usize]; + pub type __bitset_difference_type = isize; + pub type __bitset_size_type = usize; + pub type __bitset___storage_type = root::std::__bitset_size_type; + pub type __bitset___self = u8; + pub type __bitset___storage_pointer = + *mut root::std::__bitset___storage_type; + pub type __bitset___const_storage_pointer = + *const root::std::__bitset___storage_type; + pub const __bitset___bits_per_word: ::std::os::raw::c_uint = 64; + pub type __bitset_reference = u8; + pub type __bitset_const_reference = root::std::__bit_const_reference; + pub type __bitset_iterator = u8; + pub type __bitset_const_iterator = u8; + extern "C" { + #[link_name = "__n_words"] + pub static bitset___n_words: ::std::os::raw::c_uint; + } + pub type bitset_base = u8; + pub type bitset_reference = root::std::bitset_base; + pub type bitset_const_reference = root::std::bitset_base; } pub mod mozilla { #[allow(unused_imports)] @@ -1136,8 +1236,9 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = + root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1204,9 +1305,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<::std::os::raw::c_char>; + root::nsReadingIterator; pub type nsCStringRepr_iterator = - root::nsWritingIterator<::std::os::raw::c_char>; + root::nsWritingIterator; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -2153,7 +2254,7 @@ pub mod root { } } #[repr(C)] - #[derive(Debug)] + #[derive(Debug, Copy)] pub struct ThreadSafeAutoRefCnt { pub mValue: u64, } @@ -2174,6 +2275,9 @@ pub mod root { ThreadSafeAutoRefCnt ) , "::" , stringify ! ( mValue ) )); } + impl Clone for ThreadSafeAutoRefCnt { + fn clone(&self) -> Self { *self } + } #[repr(C)] #[derive(Debug)] pub struct OwningNonNull { @@ -6164,6 +6268,7 @@ pub mod root { pub struct AbstractThread { _unused: [u8; 0], } + pub type Preferences_PrefSetting = root::mozilla::dom::PrefSetting; #[repr(C)] #[derive(Debug)] pub struct CycleCollectedJSContext_RunInMetastableStateData { @@ -8468,6 +8573,8 @@ pub mod root { #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub struct OriginFlags(pub u8); + pub type ComputedKeyframeValues = + root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_open0_RawServoStyleSet_close0_instantiation() { assert_eq!(::std::mem::size_of::() , @@ -9526,15 +9633,6 @@ pub mod root { "Alignment of field: " , stringify ! ( ServoMediaList ) , "::" , stringify ! ( mRawList ) )); } - pub mod dmd { - #[allow(unused_imports)] - use self::super::super::super::root; - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct JSONWriteFunc { - _unused: [u8; 0], - } /// A PostTraversalTask is a task to be performed immediately after a Servo /// traversal. There are just a few tasks we need to perform, so we use this /// class rather than Runnables, to avoid virtual calls and some allocations. @@ -11562,6 +11660,11 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } + pub type WarningReporter = + ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -11659,6 +11762,140 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } + /// Describes a single error or warning that occurs in the execution of script. + #[repr(C)] + #[derive(Debug)] + pub struct JSErrorReport { + pub _base: root::JSErrorBase, + pub linebuf_: *const u16, + pub linebufLength_: usize, + pub tokenOffset_: usize, + pub notes: root::mozilla::UniquePtr, + pub flags: ::std::os::raw::c_uint, + pub exnType: i16, + pub _bitfield_1: u8, + pub __bindgen_padding_0: u8, + } + #[test] + fn bindgen_test_layout_JSErrorReport() { + assert_eq!(::std::mem::size_of::() , 72usize , concat ! + ( "Size of: " , stringify ! ( JSErrorReport ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebuf_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as + * const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebufLength_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * + const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( tokenOffset_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . notes as * const + _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( notes ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . flags as * const + _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( flags ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . exnType as * + const _ as usize } , 68usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( exnType ) )); + } + impl JSErrorReport { + #[inline] + pub fn isMuted(&self) -> bool { + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 1u64 as u8; + let val = (unit_field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_isMuted(&mut self, val: bool) { + let mask = 1u64 as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 0usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn ownsLinebuf_(&self) -> bool { + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 2u64 as u8; + let val = (unit_field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_ownsLinebuf_(&mut self, val: bool) { + let mask = 2u64 as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 1usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn new_bitfield_1(isMuted: bool, ownsLinebuf_: bool) -> u8 { + ({ ({ 0 } | ((isMuted as u8 as u8) << 0usize) & (1u64 as u8)) } | + ((ownsLinebuf_ as u8 as u8) << 1usize) & (2u64 as u8)) + } + } #[repr(C)] #[derive(Debug, Copy)] pub struct nsIWeakReference { @@ -12411,7 +12648,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, + pub featureSelectors: root::nsTArray, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -12516,7 +12753,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<::std::os::raw::c_uint>, + pub mValues: root::nsTArray, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -12614,7 +12851,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -15572,7 +15809,7 @@ pub mod root { /// tracking. NOTE: A string buffer can be modified only if its reference /// count is 1. #[repr(C)] - #[derive(Debug)] + #[derive(Debug, Copy)] pub struct nsStringBuffer { pub mRefCount: u32, pub mStorageSize: u32, @@ -15594,6 +15831,9 @@ pub mod root { "Alignment of field: " , stringify ! ( nsStringBuffer ) , "::" , stringify ! ( mStorageSize ) )); } + impl Clone for nsStringBuffer { + fn clone(&self) -> Self { *self } + } #[repr(C)] #[derive(Debug, Copy)] pub struct nsIAtom { @@ -16960,7 +17200,7 @@ pub mod root { pub mUpgradeInsecurePreloads: bool, pub mHSTSPrimingURIList: [u64; 5usize], pub mDocumentContainer: u64, - pub mCharacterSet: root::mozilla::NotNull<*const root::mozilla::Encoding>, + pub mCharacterSet: root::mozilla::NotNull<*const root::nsIDocument_Encoding>, pub mCharacterSetSource: i32, pub mParentDocument: *mut root::nsIDocument, pub mCachedRootElement: *mut root::mozilla::dom::Element, @@ -17009,7 +17249,7 @@ pub mod root { /// The current frame request callback handle pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -19959,7 +20199,7 @@ pub mod root { pub _base: root::nsStubMutationObserver, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub mBoundContentSet: u64, - pub mWrapperTable: u64, + pub mWrapperTable: root::nsAutoPtr, pub mDocumentTable: u64, pub mLoadingDocTable: u64, pub mAttachedStack: root::nsBindingList, @@ -20005,6 +20245,8 @@ pub mod root { impl Clone for nsBindingManager_cycleCollection { fn clone(&self) -> Self { *self } } + pub type nsBindingManager_BoundContentBindingCallback = + root::std::function; pub type nsBindingManager_WrapperHashtable = u8; extern "C" { #[link_name = "_ZN16nsBindingManager21_cycleCollectorGlobalE"] @@ -25132,57 +25374,57 @@ pub mod root { pub struct nsRange { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_18 = + _bindgen_ty_18::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_83 { + pub enum _bindgen_ty_18 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -28919,7 +29161,7 @@ pub mod root { pub _base_4: root::nsITimedChannel, pub mRefCnt: root::nsAutoRefCnt, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mTabGroup: root::RefPtr, @@ -32039,7 +32281,7 @@ pub mod root { pub type RawGeckoPropertyValuePairList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoStyleAnimationList = root::nsStyleAutoArray; pub type RawGeckoFontFaceRuleList = @@ -32712,46 +32954,46 @@ pub mod root { assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsISMILAttr ) )); } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_85 + root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_20 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_20 = + _bindgen_ty_20::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_85 { + pub enum _bindgen_ty_20 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -33343,7 +33585,7 @@ pub mod root { "::" , stringify ! ( mArray ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char16_t_close0_instantiation() { + fn __bindgen_test_layout_nsCharTraits_open0_nsStringRepr_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33354,62 +33596,33 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_open0_char16_t_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_open0_char16_t_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_open0_nsStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); + root::nsReadingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_open0_nsStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); + root::nsWritingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char16_t_close0_instantiation_1() { + fn __bindgen_test_layout_nsCharTraits_open0_nsCStringRepr_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33420,7 +33633,44 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char_close0_instantiation_1() { + fn __bindgen_test_layout_nsReadingIterator_open0_nsCStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsWritingIterator_open0_nsCStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_open0_nsSubstringTuple_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_open0_nsCSubstringTuple_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33521,26 +33771,26 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxFontFeatureValueSet_ValueList_close0_instantiation() { @@ -33556,37 +33806,37 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_3() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_4() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_4() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxAlternateValue_close0_instantiation() { @@ -33622,18 +33872,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226795_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210478_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33989,7 +34239,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_228591_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212273_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34154,7 +34404,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_234178__bindgen_ty_id_234185_close0_instantiation() { + fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_217834__bindgen_ty_id_217841_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34402,15 +34652,15 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236693_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_220335_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation() { @@ -34470,15 +34720,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236998_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_220640_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation_1() { @@ -34582,16 +34832,16 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_237547_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_221189_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); - assert_eq!(::std::mem::align_of::>() + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); } #[test] @@ -34793,26 +35043,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIWeakReference_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , + fn __bindgen_test_layout_nsTArray_open0_nsWeakPtr_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocumentEncoder_close0_instantiation() { @@ -34995,7 +35234,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237971_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_221609_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35085,7 +35324,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238374_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222015_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35186,7 +35425,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239336_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222980_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35217,13 +35456,17 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsInterfaceHashtable_open1_nsISupportsHashKey_nsIXPConnectWrappedJS_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) + fn __bindgen_test_layout_nsAutoPtr_open0_nsBindingManager_WrapperHashtable_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsAutoPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - u64 ) )); + root::nsAutoPtr ) + )); } #[test] fn __bindgen_test_layout_nsAutoPtr_open0_nsRefPtrHashtable_open1_nsURIHashKey_nsXBLDocumentInfo_close1_close0_instantiation() { @@ -35275,7 +35518,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239639_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223287_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35286,7 +35529,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239644_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223292_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35343,7 +35586,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240121_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223769_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35730,7 +35973,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_Element_close0_instantiation() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsDOMAttributeMap_Element_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35978,7 +36221,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation_1() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35989,7 +36232,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_242923_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226569_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36068,7 +36311,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249178_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_232778_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36101,7 +36344,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_250347_close0_instantiation() { + fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_233947_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36112,7 +36355,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_250351_close0_instantiation() { + fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_233951_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36134,7 +36377,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_250358_close0_instantiation() { + fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_233958_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36213,7 +36456,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251463_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_235411_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36408,7 +36651,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_252908_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236782_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36513,7 +36756,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_255281_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239151_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36724,15 +36967,15 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_ImageURL_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_RefPtr_open0_imgRequestProxy_ImageURL_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); + root::RefPtr ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadGroup_close0_instantiation() { @@ -37280,7 +37523,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_257773_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241641_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37517,7 +37760,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_265578_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249337_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37528,7 +37771,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_265583_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249342_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37616,7 +37859,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_265696_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249455_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37903,7 +38146,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_267276_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251056_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37925,7 +38168,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_267434_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251212_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37936,7 +38179,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_267439_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_251217_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37947,7 +38190,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_5() { + fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38057,18 +38300,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_270004_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_254214_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -38079,7 +38322,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_270010_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_254220_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/servo/components/style/gecko/media_queries.rs b/servo/components/style/gecko/media_queries.rs index 2ddc73ebdda2..067375bef40b 100644 --- a/servo/components/style/gecko/media_queries.rs +++ b/servo/components/style/gecko/media_queries.rs @@ -399,7 +399,9 @@ impl MediaExpressionValue { dest.write_str(if v { "1" } else { "0" }) }, MediaExpressionValue::IntRatio(a, b) => { - write!(dest, "{}/{}", a, b) + a.to_css(dest)?; + dest.write_char('/')?; + b.to_css(dest) }, MediaExpressionValue::Resolution(ref r) => r.to_css(dest), MediaExpressionValue::Ident(ref ident) => { diff --git a/servo/components/style/gecko/selector_parser.rs b/servo/components/style/gecko/selector_parser.rs index 8000c0af5f48..7fdd75f5d5fd 100644 --- a/servo/components/style/gecko/selector_parser.rs +++ b/servo/components/style/gecko/selector_parser.rs @@ -70,7 +70,7 @@ impl ToCss for NonTSPseudoClass { match *self { $(NonTSPseudoClass::$name => concat!(":", $css),)* $(NonTSPseudoClass::$s_name(ref s) => { - write!(dest, ":{}(", $s_css)?; + dest.write_str(concat!(":", $s_css, "("))?; { // FIXME(emilio): Avoid the extra allocation! let mut css = CssStringWriter::new(dest); @@ -84,7 +84,9 @@ impl ToCss for NonTSPseudoClass { $(NonTSPseudoClass::$k_name(ref s) => { // Don't include the terminating nul. let value = String::from_utf16(&s[..s.len() - 1]).unwrap(); - return write!(dest, ":{}({})", $k_css, value) + dest.write_str(concat!(":", $k_css, "("))?; + dest.write_str(&value)?; + return dest.write_char(')') }, )* NonTSPseudoClass::MozAny(ref selectors) => { dest.write_str(":-moz-any(")?; diff --git a/servo/components/style/macros.rs b/servo/components/style/macros.rs index 12be15a182a9..390a7c895387 100644 --- a/servo/components/style/macros.rs +++ b/servo/components/style/macros.rs @@ -88,7 +88,7 @@ macro_rules! define_keyword_type { impl fmt::Debug for $name { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, $css) + f.write_str($css) } } diff --git a/servo/components/style/media_queries.rs b/servo/components/style/media_queries.rs index aef18a989fa0..dd90a30088c4 100644 --- a/servo/components/style/media_queries.rs +++ b/servo/components/style/media_queries.rs @@ -96,7 +96,7 @@ impl ToCss for MediaQuery { { if let Some(qual) = self.qualifier { qual.to_css(dest)?; - write!(dest, " ")?; + dest.write_char(' ')?; } match self.media_type { @@ -107,7 +107,7 @@ impl ToCss for MediaQuery { // Otherwise, we'd serialize media queries like "(min-width: // 40px)" in "all (min-width: 40px)", which is unexpected. if self.qualifier.is_some() || self.expressions.is_empty() { - write!(dest, "all")?; + dest.write_str("all")?; } }, MediaQueryType::Concrete(MediaType(ref desc)) => desc.to_css(dest)?, @@ -118,13 +118,13 @@ impl ToCss for MediaQuery { } if self.media_type != MediaQueryType::All || self.qualifier.is_some() { - write!(dest, " and ")?; + dest.write_str(" and ")?; } self.expressions[0].to_css(dest)?; for expr in self.expressions.iter().skip(1) { - write!(dest, " and ")?; + dest.write_str(" and ")?; expr.to_css(dest)?; } Ok(()) diff --git a/servo/components/style/properties/longhand/box.mako.rs b/servo/components/style/properties/longhand/box.mako.rs index 55b7f100e642..5fc7b59171c6 100644 --- a/servo/components/style/properties/longhand/box.mako.rs +++ b/servo/components/style/properties/longhand/box.mako.rs @@ -631,7 +631,6 @@ ${helpers.predefined_type( use values::specified::{Angle, Integer, Length, LengthOrPercentage}; use values::specified::{LengthOrNumber, LengthOrPercentageOrNumber as LoPoNumber, Number}; use style_traits::ToCss; - use style_traits::values::Css; use std::fmt; @@ -819,58 +818,99 @@ ${helpers.predefined_type( m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, - m41, m42, m43, m44 } => write!( - dest, "matrix3d({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {})", - Css(m11), Css(m12), Css(m13), Css(m14), - Css(m21), Css(m22), Css(m23), Css(m24), - Css(m31), Css(m32), Css(m33), Css(m34), - Css(m41), Css(m42), Css(m43), Css(m44)), + m41, m42, m43, m44, + } => { + serialize_function!(dest, matrix3d( + m11, m12, m13, m14, + m21, m22, m23, m24, + m31, m32, m33, m34, + m41, m42, m43, m44, + )) + } SpecifiedOperation::PrefixedMatrix3D { m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, - ref m41, ref m42, ref m43, m44 } => write!( - dest, "matrix3d({}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {})", - Css(m11), Css(m12), Css(m13), Css(m14), - Css(m21), Css(m22), Css(m23), Css(m24), - Css(m31), Css(m32), Css(m33), Css(m34), - Css(m41), Css(m42), Css(m43), Css(m44)), - SpecifiedOperation::Skew(ax, None) => write!(dest, "skew({})", Css(ax)), - SpecifiedOperation::Skew(ax, Some(ay)) => write!(dest, "skew({}, {})", Css(ax), Css(ay)), - SpecifiedOperation::SkewX(angle) => write!(dest, "skewX({})", Css(angle)), - SpecifiedOperation::SkewY(angle) => write!(dest, "skewY({})", Css(angle)), - SpecifiedOperation::Translate(ref tx, None) => write!(dest, "translate({})", Css(tx)), + ref m41, ref m42, ref m43, m44, + } => { + serialize_function!(dest, matrix3d( + m11, m12, m13, m14, + m21, m22, m23, m24, + m31, m32, m33, m34, + m41, m42, m43, m44, + )) + } + SpecifiedOperation::Skew(ax, None) => { + serialize_function!(dest, skew(ax)) + } + SpecifiedOperation::Skew(ax, Some(ay)) => { + serialize_function!(dest, skew(ax, ay)) + } + SpecifiedOperation::SkewX(angle) => { + serialize_function!(dest, skewX(angle)) + } + SpecifiedOperation::SkewY(angle) => { + serialize_function!(dest, skewY(angle)) + } + SpecifiedOperation::Translate(ref tx, None) => { + serialize_function!(dest, translate(tx)) + } SpecifiedOperation::Translate(ref tx, Some(ref ty)) => { - write!(dest, "translate({}, {})", Css(tx), Css(ty)) - }, - SpecifiedOperation::TranslateX(ref tx) => write!(dest, "translateX({})", Css(tx)), - SpecifiedOperation::TranslateY(ref ty) => write!(dest, "translateY({})", Css(ty)), - SpecifiedOperation::TranslateZ(ref tz) => write!(dest, "translateZ({})", Css(tz)), - SpecifiedOperation::Translate3D(ref tx, ref ty, ref tz) => write!( - dest, "translate3d({}, {}, {})", Css(tx), Css(ty), Css(tz)), - SpecifiedOperation::Scale(factor, None) => write!(dest, "scale({})", Css(factor)), - SpecifiedOperation::Scale(sx, Some(sy)) => write!(dest, "scale({}, {})", Css(sx), Css(sy)), - SpecifiedOperation::ScaleX(sx) => write!(dest, "scaleX({})", Css(sx)), - SpecifiedOperation::ScaleY(sy) => write!(dest, "scaleY({})", Css(sy)), - SpecifiedOperation::ScaleZ(sz) => write!(dest, "scaleZ({})", Css(sz)), + serialize_function!(dest, translate(tx, ty)) + } + SpecifiedOperation::TranslateX(ref tx) => { + serialize_function!(dest, translateX(tx)) + } + SpecifiedOperation::TranslateY(ref ty) => { + serialize_function!(dest, translateY(ty)) + } + SpecifiedOperation::TranslateZ(ref tz) => { + serialize_function!(dest, translateZ(tz)) + } + SpecifiedOperation::Translate3D(ref tx, ref ty, ref tz) => { + serialize_function!(dest, translate3d(tx, ty, tz)) + } + SpecifiedOperation::Scale(factor, None) => { + serialize_function!(dest, scale(factor)) + } + SpecifiedOperation::Scale(sx, Some(sy)) => { + serialize_function!(dest, scale(sx, sy)) + } + SpecifiedOperation::ScaleX(sx) => { + serialize_function!(dest, scaleX(sx)) + } + SpecifiedOperation::ScaleY(sy) => { + serialize_function!(dest, scaleY(sy)) + } + SpecifiedOperation::ScaleZ(sz) => { + serialize_function!(dest, scaleZ(sz)) + } SpecifiedOperation::Scale3D(sx, sy, sz) => { - write!(dest, "scale3d({}, {}, {})", Css(sx), Css(sy), Css(sz)) - }, - SpecifiedOperation::Rotate(theta) => write!(dest, "rotate({})", Css(theta)), - SpecifiedOperation::RotateX(theta) => write!(dest, "rotateX({})", Css(theta)), - SpecifiedOperation::RotateY(theta) => write!(dest, "rotateY({})", Css(theta)), - SpecifiedOperation::RotateZ(theta) => write!(dest, "rotateZ({})", Css(theta)), - SpecifiedOperation::Rotate3D(x, y, z, theta) => write!( - dest, "rotate3d({}, {}, {}, {})", - Css(x), Css(y), Css(z), Css(theta)), - SpecifiedOperation::Perspective(ref length) => write!(dest, "perspective({})", Css(length)), + serialize_function!(dest, scale3d(sx, sy, sz)) + } + SpecifiedOperation::Rotate(theta) => { + serialize_function!(dest, rotate(theta)) + } + SpecifiedOperation::RotateX(theta) => { + serialize_function!(dest, rotateX(theta)) + } + SpecifiedOperation::RotateY(theta) => { + serialize_function!(dest, rotateY(theta)) + } + SpecifiedOperation::RotateZ(theta) => { + serialize_function!(dest, rotateZ(theta)) + } + SpecifiedOperation::Rotate3D(x, y, z, theta) => { + serialize_function!(dest, rotate3d(x, y, z, theta)) + } + SpecifiedOperation::Perspective(ref length) => { + serialize_function!(dest, perspective(length)) + } SpecifiedOperation::InterpolateMatrix { ref from_list, ref to_list, progress } => { - write!(dest, "interpolatematrix({}, {}, {})", - Css(from_list), Css(to_list), Css(progress)) - }, + serialize_function!(dest, interpolatematrix(from_list, to_list, progress)) + } SpecifiedOperation::AccumulateMatrix { ref from_list, ref to_list, count } => { - write!(dest, "accumulatematrix({}, {}, {})", - Css(from_list), Css(to_list), Css(count)) + serialize_function!(dest, accumulatematrix(from_list, to_list, count)) } } } diff --git a/servo/components/style/properties/longhand/color.mako.rs b/servo/components/style/properties/longhand/color.mako.rs index a2c2c61a33e2..620d2a11b29a 100644 --- a/servo/components/style/properties/longhand/color.mako.rs +++ b/servo/components/style/properties/longhand/color.mako.rs @@ -8,134 +8,107 @@ <% from data import to_rust_ident %> -<%helpers:longhand name="color" need_clone="True" - animation_value_type="AnimatedRGBA" - ignored_when_colors_disabled="True" - flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER" - spec="https://drafts.csswg.org/css-color/#color"> - use cssparser::RGBA; - use values::specified::{AllowQuirks, Color}; +${helpers.predefined_type( + "color", + "ColorPropertyValue", + "::cssparser::RGBA::new(0, 0, 0, 255)", + animation_value_type="AnimatedRGBA", + flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER", + ignored_when_colors_disabled="True", + spec="https://drafts.csswg.org/css-color/#color", + need_clone="True" +)} - impl ToComputedValue for SpecifiedValue { - type ComputedValue = computed_value::T; +// FIXME(#15973): Add servo support for system colors +// +// FIXME(emilio): Move outside of mako. +% if product == "gecko": +pub mod system_colors { + <% + # These are actually parsed. See nsCSSProps::kColorKTable + system_colors = """activeborder activecaption appworkspace background buttonface + buttonhighlight buttonshadow buttontext captiontext graytext highlight + highlighttext inactiveborder inactivecaption inactivecaptiontext + infobackground infotext menu menutext scrollbar threeddarkshadow + threedface threedhighlight threedlightshadow threedshadow window + windowframe windowtext -moz-buttondefault -moz-buttonhoverface + -moz-buttonhovertext -moz-cellhighlight -moz-cellhighlighttext + -moz-eventreerow -moz-field -moz-fieldtext -moz-dialog -moz-dialogtext + -moz-dragtargetzone -moz-gtk-info-bar-text -moz-html-cellhighlight + -moz-html-cellhighlighttext -moz-mac-buttonactivetext + -moz-mac-chrome-active -moz-mac-chrome-inactive + -moz-mac-defaultbuttontext -moz-mac-focusring -moz-mac-menuselect + -moz-mac-menushadow -moz-mac-menutextdisable -moz-mac-menutextselect + -moz-mac-disabledtoolbartext -moz-mac-secondaryhighlight + -moz-menuhover -moz-menuhovertext -moz-menubartext -moz-menubarhovertext + -moz-oddtreerow -moz-win-mediatext -moz-win-communicationstext + -moz-win-accentcolor -moz-win-accentcolortext + -moz-nativehyperlinktext -moz-comboboxtext -moz-combobox""".split() - #[inline] - fn to_computed_value(&self, context: &Context) -> computed_value::T { - self.0.to_computed_value(context) - .to_rgba(context.builder.get_parent_color().clone_color()) - } + # These are not parsed but must be serialized + # They are only ever set directly by Gecko + extra_colors = """WindowBackground WindowForeground WidgetBackground WidgetForeground + WidgetSelectBackground WidgetSelectForeground Widget3DHighlight Widget3DShadow + TextBackground TextForeground TextSelectBackground TextSelectForeground + TextSelectForegroundCustom TextSelectBackgroundDisabled TextSelectBackgroundAttention + TextHighlightBackground TextHighlightForeground IMERawInputBackground + IMERawInputForeground IMERawInputUnderline IMESelectedRawTextBackground + IMESelectedRawTextForeground IMESelectedRawTextUnderline + IMEConvertedTextBackground IMEConvertedTextForeground IMEConvertedTextUnderline + IMESelectedConvertedTextBackground IMESelectedConvertedTextForeground + IMESelectedConvertedTextUnderline SpellCheckerUnderline""".split() + %> + use cssparser::Parser; + use gecko_bindings::bindings::Gecko_GetLookAndFeelSystemColor; + use gecko_bindings::structs::root::mozilla::LookAndFeel_ColorID; + use std::fmt; + use style_traits::ToCss; + use values::computed::{Context, ToComputedValue}; - #[inline] - fn from_computed_value(computed: &computed_value::T) -> Self { - SpecifiedValue(Color::rgba(*computed).into()) + pub type SystemColor = LookAndFeel_ColorID; + + impl ToCss for SystemColor { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + let s = match *self { + % for color in system_colors + extra_colors: + LookAndFeel_ColorID::eColorID_${to_rust_ident(color)} => "${color}", + % endfor + LookAndFeel_ColorID::eColorID_LAST_COLOR => unreachable!(), + }; + dest.write_str(s) } } - #[cfg_attr(feature = "servo", derive(HeapSizeOf))] - #[derive(Clone, Debug, PartialEq, ToCss)] - pub struct SpecifiedValue(pub Color); + impl ToComputedValue for SystemColor { + type ComputedValue = u32; // nscolor - pub mod computed_value { - use cssparser; - pub type T = cssparser::RGBA; - } - #[inline] - pub fn get_initial_value() -> computed_value::T { - RGBA::new(0, 0, 0, 255) // black - } - pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result> { - Color::parse_quirky(context, input, AllowQuirks::Yes).map(SpecifiedValue) + #[inline] + fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue { + unsafe { + Gecko_GetLookAndFeelSystemColor(*self as i32, + cx.device().pres_context()) + } + } + + #[inline] + fn from_computed_value(_: &Self::ComputedValue) -> Self { + unreachable!() + } } - // FIXME(#15973): Add servo support for system colors - % if product == "gecko": - <% - # These are actually parsed. See nsCSSProps::kColorKTable - system_colors = """activeborder activecaption appworkspace background buttonface - buttonhighlight buttonshadow buttontext captiontext graytext highlight - highlighttext inactiveborder inactivecaption inactivecaptiontext - infobackground infotext menu menutext scrollbar threeddarkshadow - threedface threedhighlight threedlightshadow threedshadow window - windowframe windowtext -moz-buttondefault -moz-buttonhoverface - -moz-buttonhovertext -moz-cellhighlight -moz-cellhighlighttext - -moz-eventreerow -moz-field -moz-fieldtext -moz-dialog -moz-dialogtext - -moz-dragtargetzone -moz-gtk-info-bar-text -moz-html-cellhighlight - -moz-html-cellhighlighttext -moz-mac-buttonactivetext - -moz-mac-chrome-active -moz-mac-chrome-inactive - -moz-mac-defaultbuttontext -moz-mac-focusring -moz-mac-menuselect - -moz-mac-menushadow -moz-mac-menutextdisable -moz-mac-menutextselect - -moz-mac-disabledtoolbartext -moz-mac-secondaryhighlight - -moz-menuhover -moz-menuhovertext -moz-menubartext -moz-menubarhovertext - -moz-oddtreerow -moz-win-mediatext -moz-win-communicationstext - -moz-win-accentcolor -moz-win-accentcolortext - -moz-nativehyperlinktext -moz-comboboxtext -moz-combobox""".split() - - # These are not parsed but must be serialized - # They are only ever set directly by Gecko - extra_colors = """WindowBackground WindowForeground WidgetBackground WidgetForeground - WidgetSelectBackground WidgetSelectForeground Widget3DHighlight Widget3DShadow - TextBackground TextForeground TextSelectBackground TextSelectForeground - TextSelectForegroundCustom TextSelectBackgroundDisabled TextSelectBackgroundAttention - TextHighlightBackground TextHighlightForeground IMERawInputBackground - IMERawInputForeground IMERawInputUnderline IMESelectedRawTextBackground - IMESelectedRawTextForeground IMESelectedRawTextUnderline - IMEConvertedTextBackground IMEConvertedTextForeground IMEConvertedTextUnderline - IMESelectedConvertedTextBackground IMESelectedConvertedTextForeground - IMESelectedConvertedTextUnderline SpellCheckerUnderline""".split() - %> - use gecko_bindings::bindings::Gecko_GetLookAndFeelSystemColor; - use gecko_bindings::structs::root::mozilla::LookAndFeel_ColorID; - use std::fmt; - use style_traits::ToCss; - - pub type SystemColor = LookAndFeel_ColorID; - - impl ToCss for SystemColor { - fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - let s = match *self { - % for color in system_colors + extra_colors: - LookAndFeel_ColorID::eColorID_${to_rust_ident(color)} => "${color}", + impl SystemColor { + pub fn parse<'i, 't>(input: &mut Parser<'i, 't>,) -> Result { + ascii_case_insensitive_phf_map! { + color_name -> SystemColor = { + % for color in system_colors: + "${color}" => LookAndFeel_ColorID::eColorID_${to_rust_ident(color)}, % endfor - LookAndFeel_ColorID::eColorID_LAST_COLOR => unreachable!(), - }; - dest.write_str(s) - } - } - - impl ToComputedValue for SystemColor { - type ComputedValue = u32; // nscolor - #[inline] - fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue { - unsafe { - Gecko_GetLookAndFeelSystemColor(*self as i32, - cx.device().pres_context()) } } - #[inline] - fn from_computed_value(_: &Self::ComputedValue) -> Self { - unreachable!() - } + let ident = input.expect_ident().map_err(|_| ())?; + color_name(ident).cloned().ok_or(()) } - - impl SystemColor { - pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result> { - ascii_case_insensitive_phf_map! { - color_name -> SystemColor = { - % for color in system_colors: - "${color}" => LookAndFeel_ColorID::eColorID_${to_rust_ident(color)}, - % endfor - } - } - - let ident = input.expect_ident()?; - if let Some(color) = color_name(&ident) { - Ok(*color) - } else { - Err(SelectorParseError::UnexpectedIdent(ident.clone()).into()) - } - } - } - % endif - + } +} +% endif diff --git a/servo/components/style/properties/longhand/font.mako.rs b/servo/components/style/properties/longhand/font.mako.rs index c95ea97c2f7b..9ced9950015f 100644 --- a/servo/components/style/properties/longhand/font.mako.rs +++ b/servo/components/style/properties/longhand/font.mako.rs @@ -273,7 +273,7 @@ macro_rules! impl_gecko_keyword_conversions { % if product == "gecko": // We should treat -moz-fixed as monospace if name == &atom!("-moz-fixed") { - return write!(dest, "monospace"); + return dest.write_str("monospace"); } % endif diff --git a/servo/components/style/properties/shorthand/box.mako.rs b/servo/components/style/properties/shorthand/box.mako.rs index 209d33eb7b4f..d838039c68c7 100644 --- a/servo/components/style/properties/shorthand/box.mako.rs +++ b/servo/components/style/properties/shorthand/box.mako.rs @@ -176,7 +176,7 @@ macro_rules! try_parse_one { for i in 0..len { if i != 0 { - write!(dest, ", ")?; + dest.write_str(", ")?; } self.transition_property.0[i].to_css(dest)?; % for name in "duration timing_function delay".split(): @@ -289,7 +289,7 @@ macro_rules! try_parse_one { for i in 0..len { if i != 0 { - write!(dest, ", ")?; + dest.write_str(", ")?; } % for name in props[1:]: diff --git a/servo/components/style/servo/media_queries.rs b/servo/components/style/servo/media_queries.rs index 437a73322408..43e38554a320 100644 --- a/servo/components/style/servo/media_queries.rs +++ b/servo/components/style/servo/media_queries.rs @@ -215,15 +215,14 @@ impl ToCss for Expression { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write, { - write!(dest, "(")?; - let (mm, l) = match self.0 { - ExpressionKind::Width(Range::Min(ref l)) => ("min-", l), - ExpressionKind::Width(Range::Max(ref l)) => ("max-", l), - ExpressionKind::Width(Range::Eq(ref l)) => ("", l), + let (s, l) = match self.0 { + ExpressionKind::Width(Range::Min(ref l)) => ("(min-width: ", l), + ExpressionKind::Width(Range::Max(ref l)) => ("(max-width: ", l), + ExpressionKind::Width(Range::Eq(ref l)) => ("(width: ", l), }; - write!(dest, "{}width: ", mm)?; + dest.write_str(s)?; l.to_css(dest)?; - write!(dest, ")") + dest.write_char(')') } } diff --git a/servo/components/style/stylesheets/font_feature_values_rule.rs b/servo/components/style/stylesheets/font_feature_values_rule.rs index d27a8ab21186..57fc9ccc7868 100644 --- a/servo/components/style/stylesheets/font_feature_values_rule.rs +++ b/servo/components/style/stylesheets/font_feature_values_rule.rs @@ -68,7 +68,7 @@ impl Parse for SingleValue { impl ToCss for SingleValue { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - write!(dest, "{}", self.0) + self.0.to_css(dest) } } @@ -105,9 +105,10 @@ impl Parse for PairValues { impl ToCss for PairValues { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - write!(dest, "{}", self.0)?; + self.0.to_css(dest)?; if let Some(second) = self.1 { - write!(dest, " {}", second)?; + dest.write_char(' ')?; + second.to_css(dest)?; } Ok(()) } @@ -158,10 +159,10 @@ impl ToCss for VectorValues { let mut iter = self.0.iter(); let first = iter.next(); if let Some(first) = first { - write!(dest, "{}", first)?; + first.to_css(dest)?; for value in iter { - dest.write_str(" ")?; - write!(dest, "{}", value)?; + dest.write_char(' ')?; + value.to_css(dest)?; } } Ok(()) diff --git a/servo/components/style/stylesheets/keyframes_rule.rs b/servo/components/style/stylesheets/keyframes_rule.rs index 6c860003b7e0..02fe37bd2453 100644 --- a/servo/components/style/stylesheets/keyframes_rule.rs +++ b/servo/components/style/stylesheets/keyframes_rule.rs @@ -155,7 +155,7 @@ impl ToCss for KeyframeSelector { let mut iter = self.0.iter(); iter.next().unwrap().to_css(dest)?; for percentage in iter { - write!(dest, ", ")?; + dest.write_str(", ")?; percentage.to_css(dest)?; } Ok(()) diff --git a/servo/components/style/stylesheets/viewport_rule.rs b/servo/components/style/stylesheets/viewport_rule.rs index 98cb8c5b3845..22d41f992e0b 100644 --- a/servo/components/style/stylesheets/viewport_rule.rs +++ b/servo/components/style/stylesheets/viewport_rule.rs @@ -151,7 +151,7 @@ impl ToCss for ViewportLength { { match *self { ViewportLength::Specified(ref length) => length.to_css(dest), - ViewportLength::ExtendToZoom => write!(dest, "extend-to-zoom"), + ViewportLength::ExtendToZoom => dest.write_str("extend-to-zoom"), } } } diff --git a/servo/components/style/stylist.rs b/servo/components/style/stylist.rs index 3e9aea16f395..0f9e41fc72d2 100644 --- a/servo/components/style/stylist.rs +++ b/servo/components/style/stylist.rs @@ -1070,34 +1070,32 @@ impl Stylist { /// Also, the device that arrives here may need to take the viewport rules /// into account. /// - /// feature = "servo" because gecko only has one device, and manually tracks - /// when the device is dirty. - /// - /// FIXME(emilio): The semantics of the device for Servo and Gecko are - /// different enough we may want to unify them. - #[cfg(feature = "servo")] + /// For Gecko, this is called when XBL bindings are used by different + /// documents. pub fn set_device( &mut self, mut device: Device, guard: &SharedRwLockReadGuard, ) -> OriginSet { - let cascaded_rule = { - let stylesheets = self.stylesheets.iter(); + if viewport_rule::enabled() { + let cascaded_rule = { + let stylesheets = self.stylesheets.iter(); - ViewportRule { - declarations: viewport_rule::Cascade::from_stylesheets( - stylesheets.clone(), - guard, - &device - ).finish(), + ViewportRule { + declarations: viewport_rule::Cascade::from_stylesheets( + stylesheets.clone(), + guard, + &device + ).finish(), + } + }; + + self.viewport_constraints = + ViewportConstraints::maybe_new(&device, &cascaded_rule, self.quirks_mode); + + if let Some(ref constraints) = self.viewport_constraints { + device.account_for_viewport_rule(constraints); } - }; - - self.viewport_constraints = - ViewportConstraints::maybe_new(&device, &cascaded_rule, self.quirks_mode); - - if let Some(ref constraints) = self.viewport_constraints { - device.account_for_viewport_rule(constraints); } self.device = device; diff --git a/servo/components/style/values/computed/color.rs b/servo/components/style/values/computed/color.rs index 7294ce871905..c28bd88edddf 100644 --- a/servo/components/style/values/computed/color.rs +++ b/servo/components/style/values/computed/color.rs @@ -26,6 +26,9 @@ pub struct Color { /// Computed value type for the specified RGBAColor. pub type RGBAColor = RGBA; +/// The computed value of the `color` property. +pub type ColorPropertyValue = RGBA; + impl Color { /// Returns a numeric color representing the given RGBA value. pub fn rgba(rgba: RGBA) -> Color { diff --git a/servo/components/style/values/computed/mod.rs b/servo/components/style/values/computed/mod.rs index afd1930ef16a..d4d584a9f658 100644 --- a/servo/components/style/values/computed/mod.rs +++ b/servo/components/style/values/computed/mod.rs @@ -35,7 +35,7 @@ pub use self::background::BackgroundSize; pub use self::border::{BorderImageSlice, BorderImageWidth, BorderImageSideWidth}; pub use self::border::{BorderRadius, BorderCornerRadius}; pub use self::box_::VerticalAlign; -pub use self::color::{Color, RGBAColor}; +pub use self::color::{Color, ColorPropertyValue, RGBAColor}; pub use self::effects::{BoxShadow, Filter, SimpleShadow}; pub use self::flex::FlexBasis; pub use self::image::{Gradient, GradientItem, Image, ImageLayer, LineDirection, MozImageRect}; diff --git a/servo/components/style/values/generics/mod.rs b/servo/components/style/values/generics/mod.rs index 16f90ec11a29..239b104d49db 100644 --- a/servo/components/style/values/generics/mod.rs +++ b/servo/components/style/values/generics/mod.rs @@ -226,7 +226,10 @@ impl ToCss for FontSettingTagInt { match self.0 { 1 => Ok(()), 0 => dest.write_str(" off"), - x => write!(dest, " {}", x) + x => { + dest.write_char(' ')?; + x.to_css(dest) + } } } } diff --git a/servo/components/style/values/generics/svg.rs b/servo/components/style/values/generics/svg.rs index 9b0f19ae4bca..2d743100dc18 100644 --- a/servo/components/style/values/generics/svg.rs +++ b/servo/components/style/values/generics/svg.rs @@ -35,6 +35,7 @@ pub struct SVGPaint { #[derive(ToAnimatedValue, ToAnimatedZero, ToComputedValue, ToCss)] pub enum SVGPaintKind { /// `none` + #[animation(error)] None, /// `` Color(ColorType), diff --git a/servo/components/style/values/specified/color.rs b/servo/components/style/values/specified/color.rs index 724f8eea54b4..df7b75ad117d 100644 --- a/servo/components/style/values/specified/color.rs +++ b/servo/components/style/values/specified/color.rs @@ -10,7 +10,7 @@ use gecko_bindings::structs::nscolor; use itoa; use parser::{ParserContext, Parse}; #[cfg(feature = "gecko")] -use properties::longhands::color::SystemColor; +use properties::longhands::system_colors::SystemColor; use std::fmt; use std::io::Write; use style_traits::{ToCss, ParseError, StyleParseError, ValueParseError}; @@ -329,3 +329,32 @@ impl From for RGBAColor { RGBAColor(color) } } + +/// Specified value for the "color" property, which resolves the `currentcolor` +/// keyword to the parent color instead of self's color. +#[derive(Clone, Debug, PartialEq, ToCss)] +pub struct ColorPropertyValue(pub Color); + +impl ToComputedValue for ColorPropertyValue { + type ComputedValue = RGBA; + + #[inline] + fn to_computed_value(&self, context: &Context) -> RGBA { + self.0.to_computed_value(context) + .to_rgba(context.builder.get_parent_color().clone_color()) + } + + #[inline] + fn from_computed_value(computed: &RGBA) -> Self { + ColorPropertyValue(Color::rgba(*computed).into()) + } +} + +impl Parse for ColorPropertyValue { + fn parse<'i, 't>( + context: &ParserContext, + input: &mut Parser<'i, 't>, + ) -> Result> { + Color::parse_quirky(context, input, AllowQuirks::Yes).map(ColorPropertyValue) + } +} diff --git a/servo/components/style/values/specified/length.rs b/servo/components/style/values/specified/length.rs index c816e5420206..3789a5446699 100644 --- a/servo/components/style/values/specified/length.rs +++ b/servo/components/style/values/specified/length.rs @@ -424,7 +424,11 @@ impl ToCss for NoCalcLength { NoCalcLength::FontRelative(length) => length.to_css(dest), NoCalcLength::ViewportPercentage(length) => length.to_css(dest), /* This should only be reached from style dumping code */ - NoCalcLength::ServoCharacterWidth(CharacterWidth(i)) => write!(dest, "CharWidth({})", i), + NoCalcLength::ServoCharacterWidth(CharacterWidth(i)) => { + dest.write_str("CharWidth(")?; + i.to_css(dest)?; + dest.write_char(')') + } #[cfg(feature = "gecko")] NoCalcLength::Physical(length) => length.to_css(dest), } diff --git a/servo/components/style/values/specified/mod.rs b/servo/components/style/values/specified/mod.rs index 7afbd2e18e3f..ecceede0156f 100644 --- a/servo/components/style/values/specified/mod.rs +++ b/servo/components/style/values/specified/mod.rs @@ -32,7 +32,7 @@ pub use self::background::BackgroundSize; pub use self::border::{BorderCornerRadius, BorderImageSlice, BorderImageWidth}; pub use self::border::{BorderImageSideWidth, BorderRadius, BorderSideWidth}; pub use self::box_::VerticalAlign; -pub use self::color::{Color, RGBAColor}; +pub use self::color::{Color, ColorPropertyValue, RGBAColor}; pub use self::effects::{BoxShadow, Filter, SimpleShadow}; pub use self::flex::FlexBasis; #[cfg(feature = "gecko")] diff --git a/servo/components/style_traits/values.rs b/servo/components/style_traits/values.rs index 94e59e26bbec..8d669d3496ad 100644 --- a/servo/components/style_traits/values.rs +++ b/servo/components/style_traits/values.rs @@ -6,6 +6,7 @@ use app_units::Au; use cssparser::{BasicParseError, ParseError, Parser, Token, UnicodeRange, serialize_string}; +use cssparser::ToCss as CssparserToCss; use std::fmt::{self, Write}; /// Serialises a value according to its CSS representation. @@ -69,6 +70,24 @@ where } } +#[macro_export] +macro_rules! serialize_function { + ($dest: expr, $name: ident($( $arg: expr, )+)) => { + serialize_function!($dest, $name($($arg),+)) + }; + ($dest: expr, $name: ident($first_arg: expr $( , $arg: expr )*)) => { + { + $dest.write_str(concat!(stringify!($name), "("))?; + $first_arg.to_css($dest)?; + $( + $dest.write_str(", ")?; + $arg.to_css($dest)?; + )* + $dest.write_char(')') + } + } +} + /// Convenience wrapper to serialise CSS values separated by a given string. pub struct SequenceWriter<'a, W> { writer: TrackedWriter, @@ -326,7 +345,8 @@ impl ToCss for Box where T: ?Sized + ToCss { impl ToCss for Au { fn to_css(&self, dest: &mut W) -> fmt::Result where W: Write { - write!(dest, "{}px", self.to_f64_px()) + self.to_f64_px().to_css(dest)?; + dest.write_str("px") } } @@ -531,14 +551,3 @@ pub mod specified { } } } - - -/// Wrap CSS types for serialization with `write!` or `format!` macros. -/// Used by ToCss of SpecifiedOperation. -pub struct Css(pub T); - -impl fmt::Display for Css { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.0.to_css(f) - } -} diff --git a/servo/components/style_traits/viewport.rs b/servo/components/style_traits/viewport.rs index 97b63aa49153..d688f131ccf2 100644 --- a/servo/components/style_traits/viewport.rs +++ b/servo/components/style_traits/viewport.rs @@ -45,19 +45,31 @@ impl ToCss for ViewportConstraints { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - write!(dest, "@viewport {{")?; - write!(dest, " width: {}px;", self.size.width)?; - write!(dest, " height: {}px;", self.size.height)?; - write!(dest, " zoom: {};", self.initial_zoom.get())?; + dest.write_str("@viewport { width: ")?; + self.size.width.to_css(dest)?; + + dest.write_str("px; height: ")?; + self.size.height.to_css(dest)?; + + dest.write_str("px; zoom: ")?; + self.initial_zoom.get().to_css(dest)?; + if let Some(min_zoom) = self.min_zoom { - write!(dest, " min-zoom: {};", min_zoom.get())?; + dest.write_str("; min-zoom: ")?; + min_zoom.get().to_css(dest)?; } + if let Some(max_zoom) = self.max_zoom { - write!(dest, " max-zoom: {};", max_zoom.get())?; + dest.write_str("; max-zoom: ")?; + max_zoom.get().to_css(dest)?; } - write!(dest, " user-zoom: ")?; self.user_zoom.to_css(dest)?; - write!(dest, "; orientation: ")?; self.orientation.to_css(dest)?; - write!(dest, "; }}") + + dest.write_str("; user-zoom: ")?; + self.user_zoom.to_css(dest)?; + + dest.write_str("; orientation: ")?; + self.orientation.to_css(dest)?; + dest.write_str("; }") } } @@ -78,9 +90,12 @@ impl ToCss for Zoom { where W: fmt::Write, { match *self { - Zoom::Number(number) => write!(dest, "{}", number), - Zoom::Percentage(percentage) => write!(dest, "{}%", percentage * 100.), - Zoom::Auto => write!(dest, "auto") + Zoom::Number(number) => number.to_css(dest), + Zoom::Auto => dest.write_str("auto"), + Zoom::Percentage(percentage) => { + (percentage * 100.).to_css(dest)?; + dest.write_char('%') + } } } } diff --git a/servo/ports/geckolib/error_reporter.rs b/servo/ports/geckolib/error_reporter.rs index 09875015ed66..98699d6063e5 100644 --- a/servo/ports/geckolib/error_reporter.rs +++ b/servo/ports/geckolib/error_reporter.rs @@ -6,8 +6,8 @@ #![allow(unsafe_code)] +use cssparser::{CowRcStr, serialize_identifier, ToCss}; use cssparser::{SourceLocation, ParseError as CssParseError, Token, BasicParseError}; -use cssparser::CowRcStr; use selectors::parser::SelectorParseError; use std::ptr; use style::error_reporting::{ParseErrorReporter, ContextualParseError}; @@ -53,137 +53,14 @@ impl<'a> ErrorString<'a> { fn into_str(self) -> CowRcStr<'a> { match self { ErrorString::Snippet(s) => s, - ErrorString::Ident(i) => escape_css_ident(&i).into(), - ErrorString::UnexpectedToken(t) => token_to_str(t).into(), - } - } -} - -// This is identical to the behaviour of cssparser::serialize_identifier, except that -// it uses numerical escapes for a larger set of characters. -fn escape_css_ident(ident: &str) -> String { - // The relevant parts of the CSS grammar are: - // ident ([-]?{nmstart}|[-][-]){nmchar}* - // nmstart [_a-z]|{nonascii}|{escape} - // nmchar [_a-z0-9-]|{nonascii}|{escape} - // nonascii [^\0-\177] - // escape {unicode}|\\[^\n\r\f0-9a-f] - // unicode \\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])? - // from http://www.w3.org/TR/CSS21/syndata.html#tokenization but - // modified for idents by - // http://dev.w3.org/csswg/cssom/#serialize-an-identifier and - // http://dev.w3.org/csswg/css-syntax/#would-start-an-identifier - if ident.is_empty() { - return ident.into() - } - - let mut escaped = String::with_capacity(ident.len()); - - // A leading dash does not need to be escaped as long as it is not the - // *only* character in the identifier. - let mut iter = ident.chars().peekable(); - if iter.peek() == Some(&'-') { - if ident.len() == 1 { - return "\\-".into(); - } - - escaped.push('-'); - // Skip the first character. - let _ = iter.next(); - } - - // Escape a digit at the start (including after a dash), - // numerically. If we didn't escape it numerically, it would get - // interpreted as a numeric escape for the wrong character. - if iter.peek().map_or(false, |&c| '0' <= c && c <= '9') { - let ch = iter.next().unwrap(); - escaped.push_str(&format!("\\{:x} ", ch as u32)); - } - - while let Some(ch) = iter.next() { - if ch == '\0' { - escaped.push_str("\u{FFFD}"); - } else if ch < (0x20 as char) || (0x7f as char <= ch && ch < (0xA0 as char)) { - // Escape U+0000 through U+001F and U+007F through U+009F numerically. - escaped.push_str(&format!("\\{:x} ", ch as u32)); - } else { - // Escape ASCII non-identifier printables as a backslash plus - // the character. - if (ch < (0x7F as char)) && - ch != '_' && ch != '-' && - (ch < '0' || '9' < ch) && - (ch < 'A' || 'Z' < ch) && - (ch < 'a' || 'z' < ch) - { - escaped.push('\\'); + ErrorString::UnexpectedToken(t) => t.to_css_string().into(), + ErrorString::Ident(i) => { + let mut s = String::new(); + serialize_identifier(&i, &mut s).unwrap(); + s.into() } - escaped.push(ch); } } - - escaped -} - -// This is identical to the behaviour of cssparser::CssStringWriter, except that -// the characters between 0x7F and 0xA0 as numerically escaped as well. -fn escape_css_string(s: &str) -> String { - let mut escaped = String::new(); - for ch in s.chars() { - if ch < ' ' || (ch >= (0x7F as char) && ch < (0xA0 as char)) { - escaped.push_str(&format!("\\{:x} ", ch as u32)); - } else { - if ch == '"' || ch == '\'' || ch == '\\' { - // Escape backslash and quote characters symbolically. - // It's not technically necessary to escape the quote - // character that isn't being used to delimit the string, - // but we do it anyway because that makes testing simpler. - escaped.push('\\'); - } - escaped.push(ch); - } - } - escaped -} - -fn token_to_str<'a>(t: Token<'a>) -> String { - match t { - Token::Ident(i) => escape_css_ident(&i), - Token::AtKeyword(kw) => format!("@{}", escape_css_ident(&kw)), - Token::Hash(h) | Token::IDHash(h) => format!("#{}", escape_css_ident(&h)), - Token::QuotedString(s) => format!("'{}'", escape_css_string(&s)), - Token::UnquotedUrl(u) => format!("'{}'", escape_css_string(&u)), - Token::Delim(d) => d.to_string(), - Token::Number { int_value: Some(i), .. } => i.to_string(), - Token::Number { value, .. } => value.to_string(), - Token::Percentage { int_value: Some(i), .. } => i.to_string(), - Token::Percentage { unit_value, .. } => unit_value.to_string(), - Token::Dimension { int_value: Some(i), ref unit, .. } => - format!("{}{}", i, escape_css_ident(&*unit)), - Token::Dimension { value, ref unit, .. } => - format!("{}{}", value, escape_css_ident(&*unit)), - Token::WhiteSpace(s) => s.into(), - Token::Comment(_) => "comment".into(), - Token::Colon => ":".into(), - Token::Semicolon => ";".into(), - Token::Comma => ",".into(), - Token::IncludeMatch => "~=".into(), - Token::DashMatch => "|=".into(), - Token::PrefixMatch => "^=".into(), - Token::SuffixMatch => "$=".into(), - Token::SubstringMatch => "*=".into(), - Token::Column => "||".into(), - Token::CDO => "".into(), - Token::Function(f) => format!("{}(", escape_css_ident(&f)), - Token::ParenthesisBlock => "(".into(), - Token::SquareBracketBlock => "[".into(), - Token::CurlyBracketBlock => "{".into(), - Token::BadUrl(url) => format!("url('{}", escape_css_string(&url)).into(), - Token::BadString(s) => format!("'{}", escape_css_string(&s)).into(), - Token::CloseParenthesis => "unmatched close parenthesis".into(), - Token::CloseSquareBracket => "unmatched close square bracket".into(), - Token::CloseCurlyBracket => "unmatched close curly bracket".into(), - } } enum Action { @@ -200,30 +77,44 @@ trait ErrorHelpers<'a> { fn extract_error_param<'a>(err: ParseError<'a>) -> Option> { Some(match err { - CssParseError::Basic(BasicParseError::UnexpectedToken(t)) => - ErrorString::UnexpectedToken(t), + CssParseError::Basic(BasicParseError::UnexpectedToken(t)) => { + ErrorString::UnexpectedToken(t) + } CssParseError::Basic(BasicParseError::AtRuleInvalid(i)) | CssParseError::Custom(SelectorParseError::Custom( - StyleParseError::UnsupportedAtRule(i))) => - ErrorString::Snippet(format!("@{}", escape_css_ident(&i)).into()), + StyleParseError::UnsupportedAtRule(i) + )) => { + let mut s = String::from("@"); + serialize_identifier(&i, &mut s).unwrap(); + ErrorString::Snippet(s.into()) + } CssParseError::Custom(SelectorParseError::Custom( StyleParseError::PropertyDeclaration( - PropertyDeclarationParseError::InvalidValue(property, None)))) => - ErrorString::Snippet(property), + PropertyDeclarationParseError::InvalidValue(property, None) + ) + )) => { + ErrorString::Snippet(property) + } - CssParseError::Custom(SelectorParseError::UnexpectedIdent(ident)) => - ErrorString::Ident(ident), + CssParseError::Custom(SelectorParseError::UnexpectedIdent(ident)) => { + ErrorString::Ident(ident) + } CssParseError::Custom(SelectorParseError::Custom( StyleParseError::PropertyDeclaration( - PropertyDeclarationParseError::UnknownProperty(property)))) => - ErrorString::Ident(property), + PropertyDeclarationParseError::UnknownProperty(property) + ) + )) => { + ErrorString::Ident(property) + } CssParseError::Custom(SelectorParseError::Custom( - StyleParseError::UnexpectedTokenWithinNamespace(token))) => - ErrorString::UnexpectedToken(token), + StyleParseError::UnexpectedTokenWithinNamespace(token) + )) => { + ErrorString::UnexpectedToken(token) + } _ => return None, }) diff --git a/servo/ports/geckolib/glue.rs b/servo/ports/geckolib/glue.rs index c446a9163694..ec1f896c9768 100644 --- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -102,7 +102,7 @@ use style::gecko_bindings::sugar::ownership::{HasSimpleFFI, Strong}; use style::gecko_bindings::sugar::refptr::RefPtr; use style::gecko_properties::style_structs; use style::invalidation::element::restyle_hints; -use style::media_queries::{MediaList, parse_media_query_list}; +use style::media_queries::{Device, MediaList, parse_media_query_list}; use style::parser::{ParserContext, self}; use style::properties::{CascadeFlags, ComputedValues, Importance}; use style::properties::{IS_FIELDSET_CONTENT, IS_LINK, IS_VISITED_LINK, LonghandIdSet}; @@ -948,6 +948,25 @@ pub extern "C" fn Servo_StyleSet_MediumFeaturesChanged( OriginFlags::from(origins_in_which_rules_changed).0 } +#[no_mangle] +pub extern "C" fn Servo_StyleSet_SetDevice( + raw_data: RawServoStyleSetBorrowed, + pres_context: RawGeckoPresContextOwned +) -> u8 { + let global_style_data = &*GLOBAL_STYLE_DATA; + let guard = global_style_data.shared_lock.read(); + + let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); + let device = Device::new(pres_context); + let origins_in_which_rules_changed = + data.stylist.set_device(device, &guard); + + // We'd like to return `OriginFlags` here, but bindgen bitfield enums don't + // work as return values with the Linux 32-bit ABI at the moment because + // they wrap the value in a struct, so for now just unwrap it. + OriginFlags::from(origins_in_which_rules_changed).0 +} + #[no_mangle] pub extern "C" fn Servo_StyleSet_PrependStyleSheet( raw_data: RawServoStyleSetBorrowed, diff --git a/servo/tests/unit/style/rule_tree/bench.rs b/servo/tests/unit/style/rule_tree/bench.rs index 156a2e32b278..35abf6119fe4 100644 --- a/servo/tests/unit/style/rule_tree/bench.rs +++ b/servo/tests/unit/style/rule_tree/bench.rs @@ -22,7 +22,7 @@ impl ParseErrorReporter for ErrorringErrorReporter { url: &ServoUrl, location: SourceLocation, error: ContextualParseError) { - panic!("CSS error: {}\t\n{}:{} {}", url.as_str(), location.line, location.column, error.to_string()); + panic!("CSS error: {}\t\n{}:{} {}", url.as_str(), location.line, location.column, error); } } diff --git a/servo/tests/unit/style/stylesheets.rs b/servo/tests/unit/style/stylesheets.rs index 69063931a5e4..8d1550bbeffa 100644 --- a/servo/tests/unit/style/stylesheets.rs +++ b/servo/tests/unit/style/stylesheets.rs @@ -280,7 +280,7 @@ impl ParseErrorReporter for CSSInvalidErrorReporterTest { url: url.clone(), line: location.line, column: location.column, - message: error.to_string() + message: error.to_string(), } ); } diff --git a/servo/tests/unit/style/viewport.rs b/servo/tests/unit/style/viewport.rs index 7321adf2d066..9b48d16e07ee 100644 --- a/servo/tests/unit/style/viewport.rs +++ b/servo/tests/unit/style/viewport.rs @@ -11,7 +11,7 @@ use servo_config::prefs::{PREFS, PrefValue}; use servo_url::ServoUrl; use style::context::QuirksMode; use style::media_queries::{Device, MediaList, MediaType}; -use style::parser::{Parse, ParserContext, ParserErrorContext}; +use style::parser::{ParserContext, ParserErrorContext}; use style::shared_lock::SharedRwLock; use style::stylesheets::{CssRuleType, Stylesheet, StylesheetInDocument, Origin}; use style::stylesheets::viewport_rule::*; diff --git a/servo/tests/unit/stylo/lib.rs b/servo/tests/unit/stylo/lib.rs index 0b7da6ad03c5..85ac29c09e5c 100644 --- a/servo/tests/unit/stylo/lib.rs +++ b/servo/tests/unit/stylo/lib.rs @@ -12,7 +12,6 @@ extern crate selectors; #[macro_use] extern crate style; extern crate style_traits; -mod sanity_checks; #[cfg(target_pointer_width = "64")] mod size_of; mod specified_values; diff --git a/servo/tests/unit/stylo/sanity_checks.rs b/servo/tests/unit/stylo/sanity_checks.rs deleted file mode 100644 index c7558d3055cc..000000000000 --- a/servo/tests/unit/stylo/sanity_checks.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -//! Different static asserts that ensure the build does what it's expected to. -//! -//! TODO: maybe cfg(test) this? - -#![allow(unused_imports)] - -use std::mem; - -macro_rules! check_enum_value { - ($a:expr, $b:expr) => { - unsafe { - mem::transmute::<[u32; $a as usize], - [u32; $b as usize]>([0; $a as usize]); - } - } -} - -// NB: It's a shame we can't do this statically with bitflags, but no -// const-fn and no other way to access the numerical value :-( -macro_rules! check_enum_value_non_static { - ($a:expr, $b:expr) => { - assert_eq!($a.0 as usize, $b as usize); - } -} diff --git a/servo/tests/unit/stylo/specified_values.rs b/servo/tests/unit/stylo/specified_values.rs index d373966c41fb..6bc01a97a460 100644 --- a/servo/tests/unit/stylo/specified_values.rs +++ b/servo/tests/unit/stylo/specified_values.rs @@ -5,6 +5,7 @@ use style; #[cfg(all(test, target_pointer_width = "64"))] +#[test] fn size_of_specified_values() { use std::mem::size_of; let threshold = 24; diff --git a/testing/geckodriver/Cargo.lock b/testing/geckodriver/Cargo.lock index 206a65f27913..69ff5609d662 100644 --- a/testing/geckodriver/Cargo.lock +++ b/testing/geckodriver/Cargo.lock @@ -17,7 +17,7 @@ dependencies = [ "slog-stdlog 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-stream 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "webdriver 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "webdriver 0.30.0", "zip 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -643,7 +643,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "webdriver" version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -770,7 +769,6 @@ dependencies = [ "checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f" "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum webdriver 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b05f860c230757d0df161f6b2db8820ca636940689b29b148ea53bd8685feb84" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winreg 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e63857fb213f619b4c4fff86b158285c76766aac7e7474967e92fb6dbbfeefe9" diff --git a/testing/geckodriver/Cargo.toml b/testing/geckodriver/Cargo.toml index c5bb69cc627f..8eaedf6a512f 100644 --- a/testing/geckodriver/Cargo.toml +++ b/testing/geckodriver/Cargo.toml @@ -3,7 +3,7 @@ name = "geckodriver" version = "0.18.0" authors = [ "James Graham ", - "Andreas Tolfsen ", + "Andreas Tolfsen ", ] description = "Proxy for using WebDriver clients to interact with Gecko-based browsers." keywords = ["webdriver", "w3c", "httpd", "mozilla", "firefox"] @@ -13,7 +13,7 @@ license = "MPL-2.0" [dependencies] chrono = "^0.2" -clap = {version = "^2.19", default-features = false, features = ["suggestions", "wrap_help"]} +clap = { version = "^2.19", default-features = false, features = ["suggestions", "wrap_help"] } hyper = "0.10" lazy_static = "0.1" log = "0.3" @@ -27,7 +27,7 @@ slog-atomic = "0.4" slog-stdlog = "1" slog-stream = "1" uuid = "0.1.18" -webdriver = "0.30.0" +webdriver = { path = "../webdriver" } zip = "0.1" [[bin]] diff --git a/testing/geckodriver/LICENSE b/testing/geckodriver/LICENSE deleted file mode 100644 index 14e2f777f6c3..000000000000 --- a/testing/geckodriver/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/testing/mozharness/configs/releases/bouncer_firefox_beta.py b/testing/mozharness/configs/releases/bouncer_firefox_beta.py index b6b7b0a773db..01acaa47387d 100644 --- a/testing/mozharness/configs/releases/bouncer_firefox_beta.py +++ b/testing/mozharness/configs/releases/bouncer_firefox_beta.py @@ -34,6 +34,7 @@ config = { "installer-ssl": { "product-name": "Firefox-%(version)s-SSL", "check_uptake": True, + "alias": "firefox-beta-latest-ssl", "ssl-only": True, "add-locales": True, "paths": { diff --git a/testing/mozharness/configs/releases/bouncer_firefox_esr.py b/testing/mozharness/configs/releases/bouncer_firefox_esr.py index dd832dbdca27..b794122f9c35 100644 --- a/testing/mozharness/configs/releases/bouncer_firefox_esr.py +++ b/testing/mozharness/configs/releases/bouncer_firefox_esr.py @@ -34,6 +34,7 @@ config = { "installer-ssl": { "product-name": "Firefox-%(version)s-SSL", "check_uptake": True, + "alias": "firefox-esr-latest-ssl", "ssl-only": True, "add-locales": True, "paths": { @@ -63,7 +64,7 @@ config = { "product-name": "Firefox-%(version)s-sha1", "check_uptake": True, # XP/Vista Release users are redicted to ESR52 - "alias": "firefox-sha1", + "alias": "firefox-sha1-ssl", "ssl-only": True, "add-locales": True, "paths": { diff --git a/testing/mozharness/configs/releases/bouncer_firefox_release.py b/testing/mozharness/configs/releases/bouncer_firefox_release.py index 043deee6f94b..5c59b6c53aa1 100644 --- a/testing/mozharness/configs/releases/bouncer_firefox_release.py +++ b/testing/mozharness/configs/releases/bouncer_firefox_release.py @@ -34,6 +34,7 @@ config = { "installer-ssl": { "product-name": "Firefox-%(version)s-SSL", "check_uptake": True, + "alias": "firefox-latest-ssl", "ssl-only": True, "add-locales": True, "paths": { diff --git a/testing/web-platform/meta/cssom/escape.html.ini b/testing/web-platform/meta/cssom/escape.html.ini deleted file mode 100644 index 2a52dea78de1..000000000000 --- a/testing/web-platform/meta/cssom/escape.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[escape.html] - type: testharness - [Various tests] - expected: FAIL - diff --git a/testing/web-platform/meta/performance-timeline/po-callback-mutate.any.js.ini b/testing/web-platform/meta/performance-timeline/po-callback-mutate.any.js.ini deleted file mode 100644 index e916e5294c78..000000000000 --- a/testing/web-platform/meta/performance-timeline/po-callback-mutate.any.js.ini +++ /dev/null @@ -1,13 +0,0 @@ -[po-callback-mutate.any.worker.html] - type: testharness - expected: TIMEOUT - [PerformanceObserver modifications inside callback should update filtering and not clear buffer] - expected: TIMEOUT - - -[po-callback-mutate.any.html] - type: testharness - expected: TIMEOUT - [PerformanceObserver modifications inside callback should update filtering and not clear buffer] - expected: TIMEOUT - diff --git a/testing/web-platform/meta/performance-timeline/po-entries-sort.any.js.ini b/testing/web-platform/meta/performance-timeline/po-entries-sort.any.js.ini deleted file mode 100644 index eee9e90c6d63..000000000000 --- a/testing/web-platform/meta/performance-timeline/po-entries-sort.any.js.ini +++ /dev/null @@ -1,11 +0,0 @@ -[po-entries-sort.any.worker.html] - type: testharness - [getEntries, getEntriesByType, getEntriesByName sort order] - expected: FAIL - - -[po-entries-sort.any.html] - type: testharness - [getEntries, getEntriesByType, getEntriesByName sort order] - expected: FAIL - diff --git a/testing/web-platform/meta/performance-timeline/po-getentries.any.js.ini b/testing/web-platform/meta/performance-timeline/po-getentries.any.js.ini deleted file mode 100644 index 33bb08b0403c..000000000000 --- a/testing/web-platform/meta/performance-timeline/po-getentries.any.js.ini +++ /dev/null @@ -1,11 +0,0 @@ -[po-getentries.any.html] - type: testharness - [getEntries, getEntriesByType and getEntriesByName work] - expected: FAIL - - -[po-getentries.any.worker.html] - type: testharness - [getEntries, getEntriesByType and getEntriesByName work] - expected: FAIL - diff --git a/testing/web-platform/meta/performance-timeline/po-observe.html.ini b/testing/web-platform/meta/performance-timeline/po-observe.html.ini index d8946e53a38b..fb4244d9033c 100644 --- a/testing/web-platform/meta/performance-timeline/po-observe.html.ini +++ b/testing/web-platform/meta/performance-timeline/po-observe.html.ini @@ -3,4 +3,5 @@ expected: TIMEOUT [PerformanceObserverInit.buffered should retrieve previously buffered entries] expected: TIMEOUT + bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1043083 diff --git a/testing/webdriver/.hgignore b/testing/webdriver/.hgignore new file mode 100644 index 000000000000..2c96eb1b6517 --- /dev/null +++ b/testing/webdriver/.hgignore @@ -0,0 +1,2 @@ +target/ +Cargo.lock diff --git a/testing/webdriver/Cargo.toml b/testing/webdriver/Cargo.toml index 7743847b7224..76bfeb6a416f 100644 --- a/testing/webdriver/Cargo.toml +++ b/testing/webdriver/Cargo.toml @@ -2,16 +2,16 @@ name = "webdriver" version = "0.30.0" authors = ["Mozilla Tools and Automation "] -description = "Library implementing the wire protocol for the W3C WebDriver specification" -documentation = "https://docs.rs/webdriver" -repository = "https://github.com/mozilla/webdriver-rust" -readme = "README.md" +description = "Library implementing the wire protocol for the W3C WebDriver specification." keywords = ["webdriver", "browser", "automation", "protocol", "w3c"] +documentation = "https://docs.rs/webdriver" +repository = "https://hg.mozilla.org/mozilla-central/file/tip/testing/webdriver" +readme = "README.md" license = "MPL-2.0" [dependencies] backtrace = "0.3" -cookie = {version = "0.9", default-features = false} +cookie = { version = "0.9", default-features = false } hyper = "0.10" log = "0.3" regex = "0.2" diff --git a/testing/webdriver/LICENSE b/testing/webdriver/LICENSE deleted file mode 100644 index 14e2f777f6c3..000000000000 --- a/testing/webdriver/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/testing/webdriver/README.md b/testing/webdriver/README.md index a5096c9183a6..0a0978dc44a6 100644 --- a/testing/webdriver/README.md +++ b/testing/webdriver/README.md @@ -1,6 +1,101 @@ -# webdriver Rust library [![Crate version](https://img.shields.io/crates/v/webdriver.svg)](https://crates.io/crates/webdriver) [![Documentation](https://docs.rs/webdriver/badge.svg)](https://docs.rs/webdriver/) [![Build status](https://travis-ci.org/mozilla/webdriver-rust.svg?branch=master)](https://travis-ci.org/mozilla/webdriver-rust) +webdriver library +================= -As of right now this is an implementation -for the server side of the WebDriver API in Rust, -not the client side. +The [webdriver crate] is a library implementation of the wire protocol +for the [W3C WebDriver standard] written in Rust. WebDriver is a remote +control interface that enables introspection and control of user agents. +It provides a platform- and language-neutral wire protocol as a way +for out-of-process programs to remotely instruct the behaviour of web +browsers. +The webdriver library provides the formal types, error codes, type and +bounds checks, and JSON marshaling conventions for correctly parsing +and emitting the WebDriver protocol. It also provides an HTTP server +where endpoints are mapped to the different WebDriver commands. + +**As of right now, this is an implementation for the server side of the +WebDriver API in Rust, not the client side.** + +[webdriver crate]: https://crates.io/crates/webdriver +[W3C WebDriver standard]: https://w3c.github.io/webdriver/webdriver-spec.html + + +Building +======== + +The library is built using the usual [Rust conventions]: + + % cargo build + +To run the tests: + + % cargo test + +[Rust conventions]: http://doc.crates.io/guide.html + + +Usage +===== + +To start an HTTP server that handles incoming command requests, a request +handler needs to be implemented. It takes an incoming `WebDriverMessage` +and emits a `WebDriverResponse`: + + impl WebDriverHandler for MyHandler { + fn handle_command( + &mut self, + _: &Option, + msg: WebDriverMessage, + ) -> WebDriverResult { + … + } + + fn delete_session(&mut self, _: &Option) { + … + } + } + + let addr = SocketAddr::new("localhost", 4444); + let handler = MyHandler {}; + let server = webdriver::server::start(addr, handler, vec![])?; + info!("Listening on {}", server.socket); + +It is also possible to provide so called [extension commands] by providing +a vector of known extension routes, for which each new route needs to +implement the `WebDriverExtensionRoute` trait. Each route needs to map +to a `WebDriverExtensionCommand`: + + pub enum MyExtensionRoute { HelloWorld } + pub enum MyExtensionCommand { HelloWorld } + + impl WebDriverExtensionRoute for MyExtensionRoute { + fn command( + &self, + captures: &Captures, + body: &Json, + ) -> WebDriverResult> { + … + } + } + + let extension_routes = vec![ + (Method::Get, "/session/{sessionId}/moz/hello", MyExtensions::HelloWorld) + ]; + + … + + let server = webdriver::server::start(addr, handler, extension_routes[..])?; + +[extension commands]: https://w3c.github.io/webdriver/webdriver-spec.html#dfn-extension-commands + +Contact +======= + +The mailing list for webdriver discussion is +tools-marionette@lists.mozilla.org ([subscribe], [archive]). + +There is also an IRC channel to talk about using and developing webdriver +in #ateam on irc.mozilla.org. + +[subscribe]: https://lists.mozilla.org/listinfo/tools-marionette +[archive]: http://groups.google.com/group/mozilla.tools.marionette diff --git a/third_party/rust/webdriver/.cargo-checksum.json b/third_party/rust/webdriver/.cargo-checksum.json deleted file mode 100644 index 3b25cf9c835c..000000000000 --- a/third_party/rust/webdriver/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"78252ef89a407b1d76616b7afbf7afb8205530a7f7039f3a7ea140684e3aa8bc","Cargo.toml":"9ce1bfb98e94cb9f2494676ef0cc741dcfeab1b60d7f5fa23ae261b02025bc1c","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"bd0e99ce271903a9f67cf5f8fca2f67f2583e4336fbaf583fcd78ec238d4176e","src/capabilities.rs":"12a71bf787f1102435f9c2ae2c357acf397b80fadcb3355710ef9bbc39d8a337","src/command.rs":"3538491c5e77746eca8d326185903f3336e47f75f69401167acbd655708e736a","src/common.rs":"79d50f6c29f16d370b707988fe7b1747e17372f979df75d30be3e250dce55836","src/error.rs":"7621e0c325c488b537e1bd26dd580b23863bf07bbae52cf8b77e6a7d37df47c3","src/httpapi.rs":"83fec1cefedbadb8bf7458374f909a44ff76d67046e8428fc01067d5d8401dc6","src/lib.rs":"336c146e934711dfe49f4b44bbcf278686b00be8d89abb9c7b7b045254994fbf","src/macros.rs":"93094c48e3880d925e684fba9678693eb8c0c39c7ed47b130b0751c4bca37ddc","src/response.rs":"160bc15135d623d1bc5b33c6edaf69a4034d36c1cd8d9cefb64f436001dda01e","src/server.rs":"4f8976a215783c98f1e3927e5440590fe3a41189bf62fea151434598f904753c"},"package":"b05f860c230757d0df161f6b2db8820ca636940689b29b148ea53bd8685feb84"} \ No newline at end of file diff --git a/third_party/rust/webdriver/.cargo-ok b/third_party/rust/webdriver/.cargo-ok deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/third_party/rust/webdriver/.travis.yml b/third_party/rust/webdriver/.travis.yml deleted file mode 100644 index 5ac32e78deef..000000000000 --- a/third_party/rust/webdriver/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: rust - -rust: - - nightly - - stable - -script: - - cargo build --verbose - - cargo test --verbose \ No newline at end of file diff --git a/third_party/rust/webdriver/Cargo.toml b/third_party/rust/webdriver/Cargo.toml deleted file mode 100644 index 2d28aaf5d71b..000000000000 --- a/third_party/rust/webdriver/Cargo.toml +++ /dev/null @@ -1,46 +0,0 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies -# -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) - -[package] -name = "webdriver" -version = "0.30.0" -authors = ["Mozilla Tools and Automation "] -description = "Library implementing the wire protocol for the W3C WebDriver specification" -documentation = "https://docs.rs/webdriver" -readme = "README.md" -keywords = ["webdriver", "browser", "automation", "protocol", "w3c"] -license = "MPL-2.0" -repository = "https://github.com/mozilla/webdriver-rust" -[dependencies.time] -version = "0.1" - -[dependencies.rustc-serialize] -version = "0.3" - -[dependencies.backtrace] -version = "0.3" - -[dependencies.log] -version = "0.3" - -[dependencies.cookie] -version = "0.9" -default-features = false - -[dependencies.url] -version = "1" - -[dependencies.hyper] -version = "0.10" - -[dependencies.regex] -version = "0.2" diff --git a/third_party/rust/webdriver/LICENSE b/third_party/rust/webdriver/LICENSE deleted file mode 100644 index 14e2f777f6c3..000000000000 --- a/third_party/rust/webdriver/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/third_party/rust/webdriver/README.md b/third_party/rust/webdriver/README.md deleted file mode 100644 index ac7dc06d1fd1..000000000000 --- a/third_party/rust/webdriver/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# webdriver Rust library [![Crate version](https://img.shields.io/crates/v/webdriver.svg)](https://crates.io/crates/webdriver) [![Documentation](https://docs.rs/webdriver/badge.svg)](https://docs.rs/webdriver/) [![Build status](https://travis-ci.org/mozilla/webdriver-rust.svg?branch=master)](https://travis-ci.org/mozilla/webdriver-rust) - -As of right now this is an implementation -for the server side of the WebDriver API in Rust, -not the client side. diff --git a/third_party/rust/webdriver/src/capabilities.rs b/third_party/rust/webdriver/src/capabilities.rs deleted file mode 100644 index ab0edf8aad32..000000000000 --- a/third_party/rust/webdriver/src/capabilities.rs +++ /dev/null @@ -1,520 +0,0 @@ -use command::Parameters; -use error::{ErrorStatus, WebDriverError, WebDriverResult}; -use rustc_serialize::json::{Json, ToJson}; -use std::collections::BTreeMap; -use url::Url; - -pub type Capabilities = BTreeMap; - -/// Trait for objects that can be used to inspect browser capabilities -/// -/// The main methods in this trait are called with a Capabilites object -/// resulting from a full set of potential capabilites for the session. -/// Given those Capabilities they return a property of the browser instance -/// that would be initiated. In many cases this will be independent of the -/// input, but in the case of e.g. browser version, it might depend on a -/// path to the binary provided as a capability. -pub trait BrowserCapabilities { - /// Set up the Capabilites object - /// - /// Typically used to create any internal caches - fn init(&mut self, &Capabilities); - - /// Name of the browser - fn browser_name(&mut self, &Capabilities) -> WebDriverResult>; - /// Version number of the browser - fn browser_version(&mut self, &Capabilities) -> WebDriverResult>; - /// Compare actual browser version to that provided in a version specifier - /// - /// Parameters are the actual browser version and the comparison string, - /// respectively. The format of the comparison string is implementation-defined. - fn compare_browser_version(&mut self, version: &str, comparison: &str) -> WebDriverResult; - /// Name of the platform/OS - fn platform_name(&mut self, &Capabilities) -> WebDriverResult>; - /// Whether insecure certificates are supported - fn accept_insecure_certs(&mut self, &Capabilities) -> WebDriverResult; - - fn accept_proxy(&mut self, proxy_settings: &BTreeMap, &Capabilities) -> WebDriverResult; - - /// Type check custom properties - /// - /// Check that custom properties containing ":" have the correct data types. - /// Properties that are unrecognised must be ignored i.e. return without - /// error. - fn validate_custom(&self, name: &str, value: &Json) -> WebDriverResult<()>; - /// Check if custom properties are accepted capabilites - /// - /// Check that custom properties containing ":" are compatible with - /// the implementation. - fn accept_custom(&mut self, name: &str, value: &Json, merged: &Capabilities) -> WebDriverResult; -} - -/// Trait to abstract over various version of the new session parameters -/// -/// This trait is expected to be implemented on objects holding the capabilities -/// from a new session command. -pub trait CapabilitiesMatching { - /// Match the BrowserCapabilities against some candidate capabilites - /// - /// Takes a BrowserCapabilites object and returns a set of capabilites that - /// are valid for that browser, if any, or None if there are no matching - /// capabilities. - fn match_browser(&self, browser_capabilities: &mut T) - -> WebDriverResult>; -} - -#[derive(Debug, PartialEq)] -pub struct SpecNewSessionParameters { - pub alwaysMatch: Capabilities, - pub firstMatch: Vec, -} - -impl SpecNewSessionParameters { - fn validate(&self, - mut capabilities: Capabilities, - browser_capabilities: &T) -> WebDriverResult { - // Filter out entries with the value `null` - let null_entries = capabilities - .iter() - .filter(|&(_, ref value)| **value == Json::Null) - .map(|(k, _)| k.clone()) - .collect::>(); - for key in null_entries { - capabilities.remove(&key); - } - - for (key, value) in capabilities.iter() { - match &**key { - "acceptInsecureCerts" => if !value.is_boolean() { - return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "acceptInsecureCerts was not a boolean")) - }, - x @ "browserName" | - x @ "browserVersion" | - x @ "platformName" => if !value.is_string() { - return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - format!("{} was not a boolean", x))) - }, - "pageLoadStrategy" => { - try!(SpecNewSessionParameters::validate_page_load_strategy(value)) - } - "proxy" => { - try!(SpecNewSessionParameters::validate_proxy(value)) - }, - "timeouts" => { - try!(SpecNewSessionParameters::validate_timeouts(value)) - }, - "unhandledPromptBehavior" => { - try!(SpecNewSessionParameters::validate_unhandled_prompt_behaviour(value)) - } - x => { - if !x.contains(":") { - return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - format!("{} was not a the name of a known capability or a valid extension capability", x))) - } else { - try!(browser_capabilities.validate_custom(x, value)); - } - } - } - } - Ok(capabilities) - } - - fn validate_page_load_strategy(value: &Json) -> WebDriverResult<()> { - match value { - &Json::String(ref x) => { - match &**x { - "normal" | - "eager" | - "none" => {}, - x => { - return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - format!("\"{}\" not a valid page load strategy", x))) - } - } - } - _ => return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "pageLoadStrategy was not a string")) - } - Ok(()) - } - - fn validate_proxy(proxy_value: &Json) -> WebDriverResult<()> { - let obj = try_opt!(proxy_value.as_object(), - ErrorStatus::InvalidArgument, - "proxy was not an object"); - for (key, value) in obj.iter() { - match &**key { - "proxyType" => match value.as_string() { - Some("pac") | - Some("direct") | - Some("autodetect") | - Some("system") | - Some("manual") => {}, - Some(x) => return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - format!("{} was not a valid proxyType value", x))), - None => return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "proxyType value was not a string")), - }, - "proxyAutoconfigUrl" => match value.as_string() { - Some(x) => { - try!(Url::parse(x).or(Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "proxyAutoconfigUrl was not a valid url")))); - }, - None => return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "proxyAutoconfigUrl was not a string" - )) - }, - "ftpProxy" => try!(SpecNewSessionParameters::validate_host(value)), - "httpProxy" => try!(SpecNewSessionParameters::validate_host(value)), - "sslProxy" => try!(SpecNewSessionParameters::validate_host(value)), - "socksProxy" => try!(SpecNewSessionParameters::validate_host(value)), - "socksVersion" => if !value.is_number() { - return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "socksVersion was not a number")) - }, - "socksUsername" => if !value.is_string() { - return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "socksUsername was not a string")) - }, - "socksPassword" => if !value.is_string() { - return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "socksPassword was not a string")) - }, - x => return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - format!("{} was not a valid proxy configuration capability", x))) - } - } - Ok(()) - } - - /// Validate whether a named capability is JSON value is a string containing a host - /// and possible port - fn validate_host(value: &Json) -> WebDriverResult<()> { - match value.as_string() { - Some(host) => { - if host.contains("://") { - return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - format!("{} contains a scheme", host))); - } - - // Temporarily add a scheme so the host can be parsed as URL - let s = String::from(format!("http://{}", host)); - let url = try!(Url::parse(s.as_str()).or(Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - format!("{} is not a valid host", host))))); - - if url.username() != "" || - url.password() != None || - url.path() != "/" || - url.query() != None || - url.fragment() != None { - return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - format!("{} was not of the form host[:port]", host))); - } - }, - None => return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - format!("{} was not a string", value) - )) - } - Ok(()) - } - - fn validate_timeouts(value: &Json) -> WebDriverResult<()> { - let obj = try_opt!(value.as_object(), - ErrorStatus::InvalidArgument, - "timeouts capability was not an object"); - for (key, value) in obj.iter() { - match &**key { - x @ "script" | - x @ "pageLoad" | - x @ "implicit" => { - let timeout = try_opt!(value.as_i64(), - ErrorStatus::InvalidArgument, - format!("{} timeouts value was not an integer", x)); - if timeout < 0 { - return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - format!("{} timeouts value was negative", x))) - } - }, - x => return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - format!("{} was not a valid timeouts capability", x))) - } - } - Ok(()) - } - - fn validate_unhandled_prompt_behaviour(value: &Json) -> WebDriverResult<()> { - let behaviour = try_opt!(value.as_string(), - ErrorStatus::InvalidArgument, - "unhandledPromptBehavior capability was not a string"); - match behaviour { - "dismiss" | - "accept" => {}, - x => return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - format!("{} was not a valid unhandledPromptBehavior value", x))) } - Ok(()) - } -} - -impl Parameters for SpecNewSessionParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::UnknownError, - "Message body was not an object"); - - let capabilities = try_opt!( - try_opt!(data.get("capabilities"), - ErrorStatus::InvalidArgument, - "Missing 'capabilities' parameter").as_object(), - ErrorStatus::InvalidArgument, - "'capabilities' parameter is not an object"); - - let default_always_match = Json::Object(Capabilities::new()); - let always_match = try_opt!(capabilities.get("alwaysMatch") - .unwrap_or(&default_always_match) - .as_object(), - ErrorStatus::InvalidArgument, - "'alwaysMatch' parameter is not an object"); - let default_first_matches = Json::Array(vec![]); - let first_matches = try!( - try_opt!(capabilities.get("firstMatch") - .unwrap_or(&default_first_matches) - .as_array(), - ErrorStatus::InvalidArgument, - "'firstMatch' parameter is not an array") - .iter() - .map(|x| x.as_object() - .map(|x| x.clone()) - .ok_or(WebDriverError::new(ErrorStatus::InvalidArgument, - "'firstMatch' entry is not an object"))) - .collect::>>()); - - return Ok(SpecNewSessionParameters { - alwaysMatch: always_match.clone(), - firstMatch: first_matches - }); - } -} - -impl ToJson for SpecNewSessionParameters { - fn to_json(&self) -> Json { - let mut body = BTreeMap::new(); - let mut capabilities = BTreeMap::new(); - capabilities.insert("alwaysMatch".into(), self.alwaysMatch.to_json()); - capabilities.insert("firstMatch".into(), self.firstMatch.to_json()); - body.insert("capabilities".into(), capabilities.to_json()); - Json::Object(body) - } -} - -impl CapabilitiesMatching for SpecNewSessionParameters { - fn match_browser(&self, browser_capabilities: &mut T) - -> WebDriverResult> { - let default = vec![BTreeMap::new()]; - let capabilities_list = if self.firstMatch.len() > 0 { - &self.firstMatch - } else { - &default - }; - - let merged_capabilities = try!(capabilities_list - .iter() - .map(|first_match_entry| { - if first_match_entry.keys().any(|k| { - self.alwaysMatch.contains_key(k) - }) { - return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "'firstMatch' key shadowed a value in 'alwaysMatch'")); - } - let mut merged = self.alwaysMatch.clone(); - merged.append(&mut first_match_entry.clone()); - Ok(merged) - }) - .map(|merged| merged.and_then(|x| self.validate(x, browser_capabilities))) - .collect::>>()); - - let selected = merged_capabilities - .iter() - .filter_map(|merged| { - browser_capabilities.init(merged); - - for (key, value) in merged.iter() { - match &**key { - "browserName" => { - let browserValue = browser_capabilities - .browser_name(merged) - .ok() - .and_then(|x| x); - - if value.as_string() != browserValue.as_ref().map(|x| &**x) { - return None; - } - }, - "browserVersion" => { - let browserValue = browser_capabilities - .browser_version(merged) - .ok() - .and_then(|x| x); - // We already validated this was a string - let version_cond = value.as_string().unwrap_or(""); - if let Some(version) = browserValue { - if !browser_capabilities - .compare_browser_version(&*version, version_cond) - .unwrap_or(false) { - return None; - } - } else { - return None - } - }, - "platformName" => { - let browserValue = browser_capabilities - .platform_name(merged) - .ok() - .and_then(|x| x); - if value.as_string() != browserValue.as_ref().map(|x| &**x) { - return None; - } - } - "acceptInsecureCerts" => { - if value.as_boolean().unwrap_or(false) && - !browser_capabilities - .accept_insecure_certs(merged) - .unwrap_or(false) { - return None; - } - }, - "proxy" => { - let default = BTreeMap::new(); - let proxy = value.as_object().unwrap_or(&default); - if !browser_capabilities.accept_proxy(&proxy, - merged) - .unwrap_or(false) { - return None - } - }, - name => { - if name.contains(":") { - if !browser_capabilities - .accept_custom(name, value, merged) - .unwrap_or(false) { - return None - } - } else { - // Accept the capability - } - } - } - } - - return Some(merged) - }) - .next() - .map(|x| x.clone()); - Ok(selected) - } -} - -#[derive(Debug, PartialEq)] -pub struct LegacyNewSessionParameters { - pub desired: Capabilities, - pub required: Capabilities, -} - -impl CapabilitiesMatching for LegacyNewSessionParameters { - fn match_browser(&self, browser_capabilities: &mut T) - -> WebDriverResult> { - /* For now don't do anything much, just merge the - desired and required and return the merged list. */ - - let mut capabilities: Capabilities = BTreeMap::new(); - self.required.iter() - .chain(self.desired.iter()) - .fold(&mut capabilities, - |mut caps, (key, value)| { - if !caps.contains_key(key) { - caps.insert(key.clone(), value.clone()); - } - caps}); - browser_capabilities.init(&capabilities); - Ok(Some(capabilities)) - } -} - -impl Parameters for LegacyNewSessionParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::UnknownError, - "Message body was not an object"); - - let desired_capabilities = - if let Some(capabilities) = data.get("desiredCapabilities") { - try_opt!(capabilities.as_object(), - ErrorStatus::InvalidArgument, - "'desiredCapabilities' parameter is not an object").clone() - } else { - BTreeMap::new() - }; - - let required_capabilities = - if let Some(capabilities) = data.get("requiredCapabilities") { - try_opt!(capabilities.as_object(), - ErrorStatus::InvalidArgument, - "'requiredCapabilities' parameter is not an object").clone() - } else { - BTreeMap::new() - }; - - Ok(LegacyNewSessionParameters { - desired: desired_capabilities, - required: required_capabilities - }) - } -} - -impl ToJson for LegacyNewSessionParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("desiredCapabilities".to_owned(), self.desired.to_json()); - data.insert("requiredCapabilities".to_owned(), self.required.to_json()); - Json::Object(data) - } -} - -#[cfg(test)] -mod tests { - use rustc_serialize::json::Json; - use super::{WebDriverResult, SpecNewSessionParameters}; - - fn validate_host(value: &str) -> WebDriverResult<()> { - SpecNewSessionParameters::validate_host(&Json::String(value.into())) - } - - #[test] - fn test_validate_host() { - validate_host("127.0.0.1").unwrap(); - validate_host("127.0.0.1:").unwrap(); - validate_host("127.0.0.1:3128").unwrap(); - validate_host("[2001:db8::1]").unwrap(); - validate_host("[2001:db8::1]:3128").unwrap(); - validate_host("localhost").unwrap(); - validate_host("localhost:3128").unwrap(); - validate_host("example.org").unwrap(); - validate_host("example.org:3128").unwrap(); - - assert!(validate_host("http://example.org").is_err()); // existing scheme - assert!(validate_host("example.org:-1").is_err()); // invalid port - assert!(validate_host("2001:db8::1").is_err()); // missing brackets - } -} diff --git a/third_party/rust/webdriver/src/command.rs b/third_party/rust/webdriver/src/command.rs deleted file mode 100644 index ce0f15ab4d80..000000000000 --- a/third_party/rust/webdriver/src/command.rs +++ /dev/null @@ -1,1743 +0,0 @@ -use capabilities::{SpecNewSessionParameters, LegacyNewSessionParameters, - CapabilitiesMatching, BrowserCapabilities, Capabilities}; -use common::{Date, Nullable, WebElement, FrameId, LocatorStrategy}; -use error::{WebDriverResult, WebDriverError, ErrorStatus}; -use httpapi::{Route, WebDriverExtensionRoute, VoidWebDriverExtensionRoute}; -use regex::Captures; -use rustc_serialize::json; -use rustc_serialize::json::{ToJson, Json}; -use std::collections::BTreeMap; -use std::default::Default; - -#[derive(Debug, PartialEq)] -pub enum WebDriverCommand { - NewSession(NewSessionParameters), - DeleteSession, - Get(GetParameters), - GetCurrentUrl, - GoBack, - GoForward, - Refresh, - GetTitle, - GetPageSource, - GetWindowHandle, - GetWindowHandles, - CloseWindow, - GetWindowRect, - SetWindowRect(WindowRectParameters), - MinimizeWindow, - MaximizeWindow, - FullscreenWindow, - SwitchToWindow(SwitchToWindowParameters), - SwitchToFrame(SwitchToFrameParameters), - SwitchToParentFrame, - FindElement(LocatorParameters), - FindElements(LocatorParameters), - FindElementElement(WebElement, LocatorParameters), - FindElementElements(WebElement, LocatorParameters), - GetActiveElement, - IsDisplayed(WebElement), - IsSelected(WebElement), - GetElementAttribute(WebElement, String), - GetElementProperty(WebElement, String), - GetCSSValue(WebElement, String), - GetElementText(WebElement), - GetElementTagName(WebElement), - GetElementRect(WebElement), - IsEnabled(WebElement), - ExecuteScript(JavascriptCommandParameters), - ExecuteAsyncScript(JavascriptCommandParameters), - GetCookies, - GetNamedCookie(String), - AddCookie(AddCookieParameters), - DeleteCookies, - DeleteCookie(String), - GetTimeouts, - SetTimeouts(TimeoutsParameters), - ElementClick(WebElement), - ElementTap(WebElement), - ElementClear(WebElement), - ElementSendKeys(WebElement, SendKeysParameters), - PerformActions(ActionsParameters), - ReleaseActions, - DismissAlert, - AcceptAlert, - GetAlertText, - SendAlertText(SendKeysParameters), - TakeScreenshot, - TakeElementScreenshot(WebElement), - Status, - Extension(T) -} - -pub trait WebDriverExtensionCommand : Clone + Send + PartialEq { - fn parameters_json(&self) -> Option; -} - -#[derive(Clone, Debug, PartialEq)] -pub struct VoidWebDriverExtensionCommand; - -impl WebDriverExtensionCommand for VoidWebDriverExtensionCommand { - fn parameters_json(&self) -> Option { - panic!("No extensions implemented"); - } -} - -#[derive(Debug, PartialEq)] -pub struct WebDriverMessage { - pub session_id: Option, - pub command: WebDriverCommand, -} - -impl WebDriverMessage { - pub fn new(session_id: Option, - command: WebDriverCommand) - -> WebDriverMessage { - WebDriverMessage { - session_id: session_id, - command: command, - } - } - - pub fn from_http(match_type: Route, - params: &Captures, - raw_body: &str, - requires_body: bool) - -> WebDriverResult> { - let session_id = WebDriverMessage::::get_session_id(params); - let body_data = try!(WebDriverMessage::::decode_body(raw_body, requires_body)); - - let command = match match_type { - Route::NewSession => { - let parameters: NewSessionParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::NewSession(parameters) - }, - Route::DeleteSession => WebDriverCommand::DeleteSession, - Route::Get => { - let parameters: GetParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::Get(parameters) - }, - Route::GetCurrentUrl => WebDriverCommand::GetCurrentUrl, - Route::GoBack => WebDriverCommand::GoBack, - Route::GoForward => WebDriverCommand::GoForward, - Route::Refresh => WebDriverCommand::Refresh, - Route::GetTitle => WebDriverCommand::GetTitle, - Route::GetPageSource => WebDriverCommand::GetPageSource, - Route::GetWindowHandle => WebDriverCommand::GetWindowHandle, - Route::GetWindowHandles => WebDriverCommand::GetWindowHandles, - Route::CloseWindow => WebDriverCommand::CloseWindow, - Route::GetTimeouts => WebDriverCommand::GetTimeouts, - Route::SetTimeouts => { - let parameters: TimeoutsParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::SetTimeouts(parameters) - }, - Route::GetWindowRect | Route::GetWindowPosition | Route::GetWindowSize => WebDriverCommand::GetWindowRect, - Route::SetWindowRect | Route::SetWindowPosition | Route::SetWindowSize => { - let parameters: WindowRectParameters = Parameters::from_json(&body_data)?; - WebDriverCommand::SetWindowRect(parameters) - }, - Route::MinimizeWindow => WebDriverCommand::MinimizeWindow, - Route::MaximizeWindow => WebDriverCommand::MaximizeWindow, - Route::FullscreenWindow => WebDriverCommand::FullscreenWindow, - Route::SwitchToWindow => { - let parameters: SwitchToWindowParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::SwitchToWindow(parameters) - } - Route::SwitchToFrame => { - let parameters: SwitchToFrameParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::SwitchToFrame(parameters) - }, - Route::SwitchToParentFrame => WebDriverCommand::SwitchToParentFrame, - Route::FindElement => { - let parameters: LocatorParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::FindElement(parameters) - }, - Route::FindElements => { - let parameters: LocatorParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::FindElements(parameters) - }, - Route::FindElementElement => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - let parameters: LocatorParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::FindElementElement(element, parameters) - }, - Route::FindElementElements => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - let parameters: LocatorParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::FindElementElements(element, parameters) - }, - Route::GetActiveElement => WebDriverCommand::GetActiveElement, - Route::IsDisplayed => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::IsDisplayed(element) - }, - Route::IsSelected => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::IsSelected(element) - }, - Route::GetElementAttribute => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - let attr = try_opt!(params.name("name"), - ErrorStatus::InvalidArgument, - "Missing name parameter").as_str(); - WebDriverCommand::GetElementAttribute(element, attr.into()) - }, - Route::GetElementProperty => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - let property = try_opt!(params.name("name"), - ErrorStatus::InvalidArgument, - "Missing name parameter").as_str(); - WebDriverCommand::GetElementProperty(element, property.into()) - }, - Route::GetCSSValue => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - let property = try_opt!(params.name("propertyName"), - ErrorStatus::InvalidArgument, - "Missing propertyName parameter").as_str(); - WebDriverCommand::GetCSSValue(element, property.into()) - }, - Route::GetElementText => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::GetElementText(element) - }, - Route::GetElementTagName => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::GetElementTagName(element) - }, - Route::GetElementRect => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::GetElementRect(element) - }, - Route::IsEnabled => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::IsEnabled(element) - }, - Route::ElementClick => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::ElementClick(element) - }, - Route::ElementTap => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::ElementTap(element) - }, - Route::ElementClear => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::ElementClear(element) - }, - Route::ElementSendKeys => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - let parameters: SendKeysParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::ElementSendKeys(element, parameters) - }, - Route::ExecuteScript => { - let parameters: JavascriptCommandParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::ExecuteScript(parameters) - }, - Route::ExecuteAsyncScript => { - let parameters: JavascriptCommandParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::ExecuteAsyncScript(parameters) - }, - Route::GetCookies => { - WebDriverCommand::GetCookies - }, - Route::GetNamedCookie => { - let name = try_opt!(params.name("name"), - ErrorStatus::InvalidArgument, - "Missing 'name' parameter").as_str().into(); - WebDriverCommand::GetNamedCookie(name) - }, - Route::AddCookie => { - let parameters: AddCookieParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::AddCookie(parameters) - }, - Route::DeleteCookies => { - WebDriverCommand::DeleteCookies - }, - Route::DeleteCookie => { - let name = try_opt!(params.name("name"), - ErrorStatus::InvalidArgument, - "Missing name parameter").as_str().into(); - WebDriverCommand::DeleteCookie(name) - }, - Route::PerformActions => { - let parameters: ActionsParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::PerformActions(parameters) - }, - Route::ReleaseActions => { - WebDriverCommand::ReleaseActions - }, - Route::DismissAlert => { - WebDriverCommand::DismissAlert - }, - Route::AcceptAlert => { - WebDriverCommand::AcceptAlert - }, - Route::GetAlertText => { - WebDriverCommand::GetAlertText - }, - Route::SendAlertText => { - let parameters: SendKeysParameters = try!(Parameters::from_json(&body_data)); - WebDriverCommand::SendAlertText(parameters) - }, - Route::TakeScreenshot => WebDriverCommand::TakeScreenshot, - Route::TakeElementScreenshot => { - let element_id = try_opt!(params.name("elementId"), - ErrorStatus::InvalidArgument, - "Missing elementId parameter"); - let element = WebElement::new(element_id.as_str().into()); - WebDriverCommand::TakeElementScreenshot(element) - }, - Route::Status => WebDriverCommand::Status, - Route::Extension(ref extension) => { - try!(extension.command(params, &body_data)) - } - }; - Ok(WebDriverMessage::new(session_id, command)) - } - - fn get_session_id(params: &Captures) -> Option { - params.name("sessionId").map(|x| x.as_str().into()) - } - - fn decode_body(body: &str, requires_body: bool) -> WebDriverResult { - if requires_body { - match Json::from_str(body) { - Ok(x @ Json::Object(_)) => Ok(x), - Ok(_) => { - Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "Body was not a JSON Object")) - } - Err(json::ParserError::SyntaxError(_, line, col)) => { - let msg = format!("Failed to decode request as JSON: {}", body); - let stack = format!("Syntax error at :{}:{}", line, col); - Err(WebDriverError::new_with_stack(ErrorStatus::InvalidArgument, msg, stack)) - } - Err(json::ParserError::IoError(e)) => { - Err(WebDriverError::new(ErrorStatus::InvalidArgument, - format!("I/O error whilst decoding body: {}", e))) - } - } - } else { - Ok(Json::Null) - } - } -} - -impl ToJson for WebDriverMessage { - fn to_json(&self) -> Json { - let parameters = match self.command { - WebDriverCommand::AcceptAlert | - WebDriverCommand::CloseWindow | - WebDriverCommand::ReleaseActions | - WebDriverCommand::DeleteCookie(_) | - WebDriverCommand::DeleteCookies | - WebDriverCommand::DeleteSession | - WebDriverCommand::DismissAlert | - WebDriverCommand::ElementClear(_) | - WebDriverCommand::ElementClick(_) | - WebDriverCommand::ElementTap(_) | - WebDriverCommand::GetActiveElement | - WebDriverCommand::GetAlertText | - WebDriverCommand::GetNamedCookie(_) | - WebDriverCommand::GetCookies | - WebDriverCommand::GetCSSValue(_, _) | - WebDriverCommand::GetCurrentUrl | - WebDriverCommand::GetElementAttribute(_, _) | - WebDriverCommand::GetElementProperty(_, _) | - WebDriverCommand::GetElementRect(_) | - WebDriverCommand::GetElementTagName(_) | - WebDriverCommand::GetElementText(_) | - WebDriverCommand::GetPageSource | - WebDriverCommand::GetTimeouts | - WebDriverCommand::GetTitle | - WebDriverCommand::GetWindowHandle | - WebDriverCommand::GetWindowHandles | - WebDriverCommand::GetWindowRect | - WebDriverCommand::GoBack | - WebDriverCommand::GoForward | - WebDriverCommand::IsDisplayed(_) | - WebDriverCommand::IsEnabled(_) | - WebDriverCommand::IsSelected(_) | - WebDriverCommand::MinimizeWindow | - WebDriverCommand::MaximizeWindow | - WebDriverCommand::FullscreenWindow | - WebDriverCommand::NewSession(_) | - WebDriverCommand::Refresh | - WebDriverCommand::Status | - WebDriverCommand::SwitchToParentFrame | - WebDriverCommand::TakeElementScreenshot(_) | - WebDriverCommand::TakeScreenshot => { - None - }, - - WebDriverCommand::AddCookie(ref x) => Some(x.to_json()), - WebDriverCommand::ElementSendKeys(_, ref x) => Some(x.to_json()), - WebDriverCommand::ExecuteAsyncScript(ref x) | - WebDriverCommand::ExecuteScript(ref x) => Some(x.to_json()), - WebDriverCommand::FindElementElement(_, ref x) => Some(x.to_json()), - WebDriverCommand::FindElementElements(_, ref x) => Some(x.to_json()), - WebDriverCommand::FindElement(ref x) => Some(x.to_json()), - WebDriverCommand::FindElements(ref x) => Some(x.to_json()), - WebDriverCommand::Get(ref x) => Some(x.to_json()), - WebDriverCommand::PerformActions(ref x) => Some(x.to_json()), - WebDriverCommand::SendAlertText(ref x) => Some(x.to_json()), - WebDriverCommand::SetTimeouts(ref x) => Some(x.to_json()), - WebDriverCommand::SetWindowRect(ref x) => Some(x.to_json()), - WebDriverCommand::SwitchToFrame(ref x) => Some(x.to_json()), - WebDriverCommand::SwitchToWindow(ref x) => Some(x.to_json()), - WebDriverCommand::Extension(ref x) => x.parameters_json(), - }; - - let mut data = BTreeMap::new(); - if let Some(parameters) = parameters { - data.insert("parameters".to_string(), parameters); - } - Json::Object(data) - } -} - -pub trait Parameters: Sized { - fn from_json(body: &Json) -> WebDriverResult; -} - -/// Wrapper around the two supported variants of new session paramters -/// -/// The Spec variant is used for storing spec-compliant parameters whereas -/// the legacy variant is used to store desiredCapabilities/requiredCapabilities -/// parameters, and is intended to minimise breakage as we transition users to -/// the spec design. -#[derive(Debug, PartialEq)] -pub enum NewSessionParameters { - Spec(SpecNewSessionParameters), - Legacy(LegacyNewSessionParameters), -} - -impl Parameters for NewSessionParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::UnknownError, - "Message body was not an object"); - if data.get("capabilities").is_some() { - Ok(NewSessionParameters::Spec(try!(SpecNewSessionParameters::from_json(body)))) - } else { - Ok(NewSessionParameters::Legacy(try!(LegacyNewSessionParameters::from_json(body)))) - } - } -} - -impl ToJson for NewSessionParameters { - fn to_json(&self) -> Json { - match self { - &NewSessionParameters::Spec(ref x) => x.to_json(), - &NewSessionParameters::Legacy(ref x) => x.to_json() - } - } -} - -impl CapabilitiesMatching for NewSessionParameters { - fn match_browser(&self, browser_capabilities: &mut T) - -> WebDriverResult> { - match self { - &NewSessionParameters::Spec(ref x) => x.match_browser(browser_capabilities), - &NewSessionParameters::Legacy(ref x) => x.match_browser(browser_capabilities) - } - } -} - - -#[derive(Debug, PartialEq)] -pub struct GetParameters { - pub url: String -} - -impl Parameters for GetParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), ErrorStatus::UnknownError, - "Message body was not an object"); - let url = try_opt!( - try_opt!(data.get("url"), - ErrorStatus::InvalidArgument, - "Missing 'url' parameter").as_string(), - ErrorStatus::InvalidArgument, - "'url' not a string"); - Ok(GetParameters { - url: url.to_string() - }) - } -} - -impl ToJson for GetParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("url".to_string(), self.url.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct TimeoutsParameters { - pub script: Option, - pub page_load: Option, - pub implicit: Option, -} - -impl Parameters for TimeoutsParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::UnknownError, - "Message body was not an object"); - - let script = match data.get("script") { - Some(json) => { - Some(try_opt!(json.as_u64(), - ErrorStatus::InvalidArgument, - "Script timeout duration was not a signed integer")) - } - None => None, - }; - - let page_load = match data.get("pageLoad") { - Some(json) => { - Some(try_opt!(json.as_u64(), - ErrorStatus::InvalidArgument, - "Page load timeout duration was not a signed integer")) - } - None => None, - }; - - let implicit = match data.get("implicit") { - Some(json) => { - Some(try_opt!(json.as_u64(), - ErrorStatus::InvalidArgument, - "Implicit timeout duration was not a signed integer")) - } - None => None, - }; - - Ok(TimeoutsParameters { - script: script, - page_load: page_load, - implicit: implicit, - }) - } -} - -impl ToJson for TimeoutsParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - if let Some(ms) = self.script { - data.insert("script".into(), ms.to_json()); - } - if let Some(ms) = self.page_load { - data.insert("pageLoad".into(), ms.to_json()); - } - if let Some(ms) = self.implicit { - data.insert("implicit".into(), ms.to_json()); - } - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct WindowRectParameters { - pub x: Nullable, - pub y: Nullable, - pub width: Nullable, - pub height: Nullable, -} - -impl Parameters for WindowRectParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::UnknownError, - "Message body was not an object"); - - let x = match data.get("x") { - Some(json) => { - try!(Nullable::from_json(json, |n| { - Ok((try_opt!(n.as_i64(), - ErrorStatus::InvalidArgument, - "'x' is not an integer"))) - })) - } - None => Nullable::Null, - }; - let y = match data.get("y") { - Some(json) => { - try!(Nullable::from_json(json, |n| { - Ok((try_opt!(n.as_i64(), - ErrorStatus::InvalidArgument, - "'y' is not an integer"))) - })) - } - None => Nullable::Null, - }; - let width = match data.get("width") { - Some(json) => { - try!(Nullable::from_json(json, |n| { - Ok((try_opt!(n.as_u64(), - ErrorStatus::InvalidArgument, - "'width' is not a positive integer"))) - })) - } - None => Nullable::Null, - }; - let height = match data.get("height") { - Some(json) => { - try!(Nullable::from_json(json, |n| { - Ok((try_opt!(n.as_u64(), - ErrorStatus::InvalidArgument, - "'height' is not a positive integer"))) - })) - } - None => Nullable::Null, - }; - - Ok(WindowRectParameters { - x: x, - y: y, - width: width, - height: height, - }) - } -} - -impl ToJson for WindowRectParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("x".to_string(), self.x.to_json()); - data.insert("y".to_string(), self.y.to_json()); - data.insert("width".to_string(), self.width.to_json()); - data.insert("height".to_string(), self.height.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct SwitchToWindowParameters { - pub handle: String -} - -impl Parameters for SwitchToWindowParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), ErrorStatus::UnknownError, - "Message body was not an object"); - let handle = try_opt!( - try_opt!(data.get("handle"), - ErrorStatus::InvalidArgument, - "Missing 'handle' parameter").as_string(), - ErrorStatus::InvalidArgument, - "'handle' not a string"); - return Ok(SwitchToWindowParameters { - handle: handle.to_string() - }) - } -} - -impl ToJson for SwitchToWindowParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("handle".to_string(), self.handle.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct LocatorParameters { - pub using: LocatorStrategy, - pub value: String -} - -impl Parameters for LocatorParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), ErrorStatus::UnknownError, - "Message body was not an object"); - - let using = try!(LocatorStrategy::from_json( - try_opt!(data.get("using"), - ErrorStatus::InvalidArgument, - "Missing 'using' parameter"))); - - let value = try_opt!( - try_opt!(data.get("value"), - ErrorStatus::InvalidArgument, - "Missing 'value' parameter").as_string(), - ErrorStatus::InvalidArgument, - "Could not convert using to string").to_string(); - - return Ok(LocatorParameters { - using: using, - value: value - }) - } -} - -impl ToJson for LocatorParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("using".to_string(), self.using.to_json()); - data.insert("value".to_string(), self.value.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct SwitchToFrameParameters { - pub id: FrameId -} - -impl Parameters for SwitchToFrameParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::UnknownError, - "Message body was not an object"); - let id = try!(FrameId::from_json(try_opt!(data.get("id"), - ErrorStatus::UnknownError, - "Missing 'id' parameter"))); - - Ok(SwitchToFrameParameters { - id: id - }) - } -} - -impl ToJson for SwitchToFrameParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("id".to_string(), self.id.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct SendKeysParameters { - pub text: String -} - -impl Parameters for SendKeysParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Message body was not an object"); - let text = try_opt!(try_opt!(data.get("text"), - ErrorStatus::InvalidArgument, - "Missing 'text' parameter").as_string(), - ErrorStatus::InvalidArgument, - "Could not convert 'text' to string"); - - Ok(SendKeysParameters { - text: text.into() - }) - } -} - -impl ToJson for SendKeysParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("value".to_string(), self.text.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct JavascriptCommandParameters { - pub script: String, - pub args: Nullable> -} - -impl Parameters for JavascriptCommandParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Message body was not an object"); - - let args_json = try_opt!(data.get("args"), - ErrorStatus::InvalidArgument, - "Missing args parameter"); - - let args = try!(Nullable::from_json( - args_json, - |x| { - Ok((try_opt!(x.as_array(), - ErrorStatus::InvalidArgument, - "Failed to convert args to Array")).clone()) - })); - - //TODO: Look for WebElements in args? - let script = try_opt!( - try_opt!(data.get("script"), - ErrorStatus::InvalidArgument, - "Missing script parameter").as_string(), - ErrorStatus::InvalidArgument, - "Failed to convert script to String"); - Ok(JavascriptCommandParameters { - script: script.to_string(), - args: args.clone() - }) - } -} - -impl ToJson for JavascriptCommandParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - //TODO: Wrap script so that it becomes marionette-compatible - data.insert("script".to_string(), self.script.to_json()); - data.insert("args".to_string(), self.args.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct GetNamedCookieParameters { - pub name: Nullable, -} - -impl Parameters for GetNamedCookieParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Message body was not an object"); - let name_json = try_opt!(data.get("name"), - ErrorStatus::InvalidArgument, - "Missing 'name' parameter"); - let name = try!(Nullable::from_json(name_json, |x| { - Ok(try_opt!(x.as_string(), - ErrorStatus::InvalidArgument, - "Failed to convert name to string") - .to_string()) - })); - return Ok(GetNamedCookieParameters { name: name }); - } -} - -impl ToJson for GetNamedCookieParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("name".to_string(), self.name.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct AddCookieParameters { - pub name: String, - pub value: String, - pub path: Nullable, - pub domain: Nullable, - pub expiry: Nullable, - pub secure: bool, - pub httpOnly: bool -} - -impl Parameters for AddCookieParameters { - fn from_json(body: &Json) -> WebDriverResult { - if !body.is_object() { - return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "Message body was not an object")); - } - - let data = try_opt!(body.find("cookie").and_then(|x| x.as_object()), - ErrorStatus::UnableToSetCookie, - "Cookie parameter not found or not an object"); - - let name = try_opt!( - try_opt!(data.get("name"), - ErrorStatus::InvalidArgument, - "Missing 'name' parameter").as_string(), - ErrorStatus::InvalidArgument, - "'name' is not a string").to_string(); - - let value = try_opt!( - try_opt!(data.get("value"), - ErrorStatus::InvalidArgument, - "Missing 'value' parameter").as_string(), - ErrorStatus::InvalidArgument, - "'value' is not a string").to_string(); - - let path = match data.get("path") { - Some(path_json) => { - try!(Nullable::from_json( - path_json, - |x| { - Ok(try_opt!(x.as_string(), - ErrorStatus::InvalidArgument, - "Failed to convert path to String").to_string()) - })) - }, - None => Nullable::Null - }; - - let domain = match data.get("domain") { - Some(domain_json) => { - try!(Nullable::from_json( - domain_json, - |x| { - Ok(try_opt!(x.as_string(), - ErrorStatus::InvalidArgument, - "Failed to convert domain to String").to_string()) - })) - }, - None => Nullable::Null - }; - - let expiry = match data.get("expiry") { - Some(expiry_json) => { - try!(Nullable::from_json( - expiry_json, - |x| { - Ok(Date::new(try_opt!(x.as_u64(), - ErrorStatus::InvalidArgument, - "Failed to convert expiry to Date"))) - })) - }, - None => Nullable::Null - }; - - let secure = match data.get("secure") { - Some(x) => try_opt!(x.as_boolean(), - ErrorStatus::InvalidArgument, - "Failed to convert secure to boolean"), - None => false - }; - - let http_only = match data.get("httpOnly") { - Some(x) => try_opt!(x.as_boolean(), - ErrorStatus::InvalidArgument, - "Failed to convert httpOnly to boolean"), - None => false - }; - - return Ok(AddCookieParameters { - name: name, - value: value, - path: path, - domain: domain, - expiry: expiry, - secure: secure, - httpOnly: http_only - }) - } -} - -impl ToJson for AddCookieParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("name".to_string(), self.name.to_json()); - data.insert("value".to_string(), self.value.to_json()); - data.insert("path".to_string(), self.path.to_json()); - data.insert("domain".to_string(), self.domain.to_json()); - data.insert("expiry".to_string(), self.expiry.to_json()); - data.insert("secure".to_string(), self.secure.to_json()); - data.insert("httpOnly".to_string(), self.httpOnly.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct TakeScreenshotParameters { - pub element: Nullable -} - -impl Parameters for TakeScreenshotParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Message body was not an object"); - let element = match data.get("element") { - Some(element_json) => try!(Nullable::from_json( - element_json, - |x| { - Ok(try!(WebElement::from_json(x))) - })), - None => Nullable::Null - }; - - return Ok(TakeScreenshotParameters { - element: element - }) - } -} - -impl ToJson for TakeScreenshotParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("element".to_string(), self.element.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct ActionsParameters { - pub actions: Vec -} - -impl Parameters for ActionsParameters { - fn from_json(body: &Json) -> WebDriverResult { - try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Message body was not an object"); - let actions = try_opt!( - try_opt!(body.find("actions"), - ErrorStatus::InvalidArgument, - "No actions parameter found").as_array(), - ErrorStatus::InvalidArgument, - "Parameter 'actions' was not an array"); - - let mut result = Vec::with_capacity(actions.len()); - for chain in actions.iter() { - result.push(try!(ActionSequence::from_json(chain))); - } - Ok(ActionsParameters { - actions: result - }) - } -} - -impl ToJson for ActionsParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("actions".to_owned(), - self.actions.iter().map(|x| x.to_json()).collect::>().to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct ActionSequence { - pub id: Nullable, - pub actions: ActionsType -} - -impl Parameters for ActionSequence { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Actions chain was not an object"); - - let type_name = try_opt!(try_opt!(data.get("type"), - ErrorStatus::InvalidArgument, - "Missing type parameter").as_string(), - ErrorStatus::InvalidArgument, - "Parameter ;type' was not a string"); - - let id = match data.get("id") { - Some(x) => Some(try_opt!(x.as_string(), - ErrorStatus::InvalidArgument, - "Parameter 'id' was not a string").to_owned()), - None => None - }; - - - // Note that unlike the spec we get the pointer parameters in ActionsType::from_json - - let actions = match type_name { - "none" | "key" | "pointer" => try!(ActionsType::from_json(&body)), - _ => return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "Invalid action type")) - }; - - Ok(ActionSequence { - id: id.into(), - actions: actions - }) - } -} - -impl ToJson for ActionSequence { - fn to_json(&self) -> Json { - let mut data: BTreeMap = BTreeMap::new(); - data.insert("id".into(), self.id.to_json()); - let (action_type, actions) = match self.actions { - ActionsType::Null(ref actions) => { - ("none", - actions.iter().map(|x| x.to_json()).collect::>()) - } - ActionsType::Key(ref actions) => { - ("key", - actions.iter().map(|x| x.to_json()).collect::>()) - } - ActionsType::Pointer(ref parameters, ref actions) => { - data.insert("parameters".into(), parameters.to_json()); - ("pointer", - actions.iter().map(|x| x.to_json()).collect::>()) - } - }; - data.insert("type".into(), action_type.to_json()); - data.insert("actions".into(), actions.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub enum ActionsType { - Null(Vec), - Key(Vec), - Pointer(PointerActionParameters, Vec) -} - -impl Parameters for ActionsType { - fn from_json(body: &Json) -> WebDriverResult { - // These unwraps are OK as long as this is only called from ActionSequence::from_json - let data = body.as_object().expect("Body should be a JSON Object"); - let actions_type = body.find("type").and_then(|x| x.as_string()).expect("Type should be a string"); - let actions_chain = try_opt!(try_opt!(data.get("actions"), - ErrorStatus::InvalidArgument, - "Missing actions parameter").as_array(), - ErrorStatus::InvalidArgument, - "Parameter 'actions' was not an array"); - match actions_type { - "none" => { - let mut actions = Vec::with_capacity(actions_chain.len()); - for action_body in actions_chain.iter() { - actions.push(try!(NullActionItem::from_json(action_body))); - }; - Ok(ActionsType::Null(actions)) - }, - "key" => { - let mut actions = Vec::with_capacity(actions_chain.len()); - for action_body in actions_chain.iter() { - actions.push(try!(KeyActionItem::from_json(action_body))); - }; - Ok(ActionsType::Key(actions)) - }, - "pointer" => { - let mut actions = Vec::with_capacity(actions_chain.len()); - let parameters = match data.get("parameters") { - Some(x) => try!(PointerActionParameters::from_json(x)), - None => Default::default() - }; - - for action_body in actions_chain.iter() { - actions.push(try!(PointerActionItem::from_json(action_body))); - } - Ok(ActionsType::Pointer(parameters, actions)) - } - _ => panic!("Got unexpected action type after checking type") - } - } -} - -#[derive(Debug, PartialEq)] -pub enum PointerType { - Mouse, - Pen, - Touch, -} - -impl Parameters for PointerType { - fn from_json(body: &Json) -> WebDriverResult { - match body.as_string() { - Some("mouse") => Ok(PointerType::Mouse), - Some("pen") => Ok(PointerType::Pen), - Some("touch") => Ok(PointerType::Touch), - Some(_) => Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "Unsupported pointer type" - )), - None => Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "Pointer type was not a string" - )) - } - } -} - -impl ToJson for PointerType { - fn to_json(&self) -> Json { - match *self { - PointerType::Mouse => "mouse".to_json(), - PointerType::Pen => "pen".to_json(), - PointerType::Touch => "touch".to_json(), - }.to_json() - } -} - -impl Default for PointerType { - fn default() -> PointerType { - PointerType::Mouse - } -} - -#[derive(Debug, Default, PartialEq)] -pub struct PointerActionParameters { - pub pointer_type: PointerType -} - -impl Parameters for PointerActionParameters { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Parameter 'parameters' was not an object"); - let pointer_type = match data.get("pointerType") { - Some(x) => try!(PointerType::from_json(x)), - None => PointerType::default() - }; - Ok(PointerActionParameters { - pointer_type: pointer_type - }) - } -} - -impl ToJson for PointerActionParameters { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("pointerType".to_owned(), - self.pointer_type.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub enum NullActionItem { - General(GeneralAction) -} - -impl Parameters for NullActionItem { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Actions chain was not an object"); - let type_name = try_opt!( - try_opt!(data.get("type"), - ErrorStatus::InvalidArgument, - "Missing 'type' parameter").as_string(), - ErrorStatus::InvalidArgument, - "Parameter 'type' was not a string"); - match type_name { - "pause" => Ok(NullActionItem::General( - try!(GeneralAction::from_json(body)))), - _ => return Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "Invalid type attribute")) - } - } -} - -impl ToJson for NullActionItem { - fn to_json(&self) -> Json { - match self { - &NullActionItem::General(ref x) => x.to_json(), - } - } -} - -#[derive(Debug, PartialEq)] -pub enum KeyActionItem { - General(GeneralAction), - Key(KeyAction) -} - -impl Parameters for KeyActionItem { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Key action item was not an object"); - let type_name = try_opt!( - try_opt!(data.get("type"), - ErrorStatus::InvalidArgument, - "Missing 'type' parameter").as_string(), - ErrorStatus::InvalidArgument, - "Parameter 'type' was not a string"); - match type_name { - "pause" => Ok(KeyActionItem::General( - try!(GeneralAction::from_json(body)))), - _ => Ok(KeyActionItem::Key( - try!(KeyAction::from_json(body)))) - } - } -} - -impl ToJson for KeyActionItem { - fn to_json(&self) -> Json { - match *self { - KeyActionItem::General(ref x) => x.to_json(), - KeyActionItem::Key(ref x) => x.to_json() - } - } -} - -#[derive(Debug, PartialEq)] -pub enum PointerActionItem { - General(GeneralAction), - Pointer(PointerAction) -} - -impl Parameters for PointerActionItem { - fn from_json(body: &Json) -> WebDriverResult { - let data = try_opt!(body.as_object(), - ErrorStatus::InvalidArgument, - "Pointer action item was not an object"); - let type_name = try_opt!( - try_opt!(data.get("type"), - ErrorStatus::InvalidArgument, - "Missing 'type' parameter").as_string(), - ErrorStatus::InvalidArgument, - "Parameter 'type' was not a string"); - - match type_name { - "pause" => Ok(PointerActionItem::General(try!(GeneralAction::from_json(body)))), - _ => Ok(PointerActionItem::Pointer(try!(PointerAction::from_json(body)))) - } - } -} - -impl ToJson for PointerActionItem { - fn to_json(&self) -> Json { - match self { - &PointerActionItem::General(ref x) => x.to_json(), - &PointerActionItem::Pointer(ref x) => x.to_json() - } - } -} - -#[derive(Debug, PartialEq)] -pub enum GeneralAction { - Pause(PauseAction) -} - -impl Parameters for GeneralAction { - fn from_json(body: &Json) -> WebDriverResult { - match body.find("type").and_then(|x| x.as_string()) { - Some("pause") => Ok(GeneralAction::Pause(try!(PauseAction::from_json(body)))), - _ => Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "Invalid or missing type attribute")) - } - } -} - -impl ToJson for GeneralAction { - fn to_json(&self) -> Json { - match self { - &GeneralAction::Pause(ref x) => x.to_json() - } - } -} - -#[derive(Debug, PartialEq)] -pub struct PauseAction { - pub duration: u64 -} - -impl Parameters for PauseAction { - fn from_json(body: &Json) -> WebDriverResult { - let default = Json::U64(0); - Ok(PauseAction { - duration: try_opt!(body.find("duration").unwrap_or(&default).as_u64(), - ErrorStatus::InvalidArgument, - "Parameter 'duration' was not a positive integer") - }) - } -} - -impl ToJson for PauseAction { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("type".to_owned(), - "pause".to_json()); - data.insert("duration".to_owned(), - self.duration.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub enum KeyAction { - Up(KeyUpAction), - Down(KeyDownAction) -} - -impl Parameters for KeyAction { - fn from_json(body: &Json) -> WebDriverResult { - match body.find("type").and_then(|x| x.as_string()) { - Some("keyDown") => Ok(KeyAction::Down(try!(KeyDownAction::from_json(body)))), - Some("keyUp") => Ok(KeyAction::Up(try!(KeyUpAction::from_json(body)))), - Some(_) | None => Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "Invalid type attribute value for key action")) - } - } -} - -impl ToJson for KeyAction { - fn to_json(&self) -> Json { - match self { - &KeyAction::Down(ref x) => x.to_json(), - &KeyAction::Up(ref x) => x.to_json(), - } - } -} - -fn validate_key_value(value_str: &str) -> WebDriverResult { - let mut chars = value_str.chars(); - let value = if let Some(c) = chars.next() { - c - } else { - return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "Parameter 'value' was an empty string")) - }; - if chars.next().is_some() { - return Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "Parameter 'value' contained multiple characters")) - }; - Ok(value) -} - -#[derive(Debug, PartialEq)] -pub struct KeyUpAction { - pub value: char -} - -impl Parameters for KeyUpAction { - fn from_json(body: &Json) -> WebDriverResult { - let value_str = try_opt!( - try_opt!(body.find("value"), - ErrorStatus::InvalidArgument, - "Missing value parameter").as_string(), - ErrorStatus::InvalidArgument, - "Parameter 'value' was not a string"); - - let value = try!(validate_key_value(value_str)); - Ok(KeyUpAction { - value: value - }) - } -} - -impl ToJson for KeyUpAction { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("type".to_owned(), - "keyUp".to_json()); - data.insert("value".to_string(), - self.value.to_string().to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct KeyDownAction { - pub value: char -} - -impl Parameters for KeyDownAction { - fn from_json(body: &Json) -> WebDriverResult { - let value_str = try_opt!( - try_opt!(body.find("value"), - ErrorStatus::InvalidArgument, - "Missing value parameter").as_string(), - ErrorStatus::InvalidArgument, - "Parameter 'value' was not a string"); - let value = try!(validate_key_value(value_str)); - Ok(KeyDownAction { - value: value - }) - } -} - -impl ToJson for KeyDownAction { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("type".to_owned(), - "keyDown".to_json()); - data.insert("value".to_owned(), - self.value.to_string().to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub enum PointerOrigin { - Viewport, - Pointer, - Element(WebElement), -} - -impl Parameters for PointerOrigin { - fn from_json(body: &Json) -> WebDriverResult { - match *body { - Json::String(ref x) => { - match &**x { - "viewport" => Ok(PointerOrigin::Viewport), - "pointer" => Ok(PointerOrigin::Pointer), - _ => Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "Unknown pointer origin")) - } - }, - Json::Object(_) => Ok(PointerOrigin::Element(try!(WebElement::from_json(body)))), - _ => Err(WebDriverError::new(ErrorStatus::InvalidArgument, - "Pointer origin was not a string or an object")) - } - } -} - -impl ToJson for PointerOrigin { - fn to_json(&self) -> Json { - match *self { - PointerOrigin::Viewport => "viewport".to_json(), - PointerOrigin::Pointer => "pointer".to_json(), - PointerOrigin::Element(ref x) => x.to_json(), - } - } -} - -impl Default for PointerOrigin { - fn default() -> PointerOrigin { - PointerOrigin::Viewport - } -} - -#[derive(Debug, PartialEq)] -pub enum PointerAction { - Up(PointerUpAction), - Down(PointerDownAction), - Move(PointerMoveAction), - Cancel -} - -impl Parameters for PointerAction { - fn from_json(body: &Json) -> WebDriverResult { - match body.find("type").and_then(|x| x.as_string()) { - Some("pointerUp") => Ok(PointerAction::Up(try!(PointerUpAction::from_json(body)))), - Some("pointerDown") => Ok(PointerAction::Down(try!(PointerDownAction::from_json(body)))), - Some("pointerMove") => Ok(PointerAction::Move(try!(PointerMoveAction::from_json(body)))), - Some("pointerCancel") => Ok(PointerAction::Cancel), - Some(_) | None => Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - "Missing or invalid type argument for pointer action")) - } - } -} - -impl ToJson for PointerAction { - fn to_json(&self) -> Json { - match self { - &PointerAction::Down(ref x) => x.to_json(), - &PointerAction::Up(ref x) => x.to_json(), - &PointerAction::Move(ref x) => x.to_json(), - &PointerAction::Cancel => { - let mut data = BTreeMap::new(); - data.insert("type".to_owned(), - "pointerCancel".to_json()); - Json::Object(data) - } - } - } -} - -#[derive(Debug, PartialEq)] -pub struct PointerUpAction { - pub button: u64, -} - -impl Parameters for PointerUpAction { - fn from_json(body: &Json) -> WebDriverResult { - let button = try_opt!( - try_opt!(body.find("button"), - ErrorStatus::InvalidArgument, - "Missing button parameter").as_u64(), - ErrorStatus::InvalidArgument, - "Parameter 'button' was not a positive integer"); - - Ok(PointerUpAction { - button: button - }) - } -} - -impl ToJson for PointerUpAction { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("type".to_owned(), - "pointerUp".to_json()); - data.insert("button".to_owned(), self.button.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct PointerDownAction { - pub button: u64, -} - -impl Parameters for PointerDownAction { - fn from_json(body: &Json) -> WebDriverResult { - let button = try_opt!( - try_opt!(body.find("button"), - ErrorStatus::InvalidArgument, - "Missing button parameter").as_u64(), - ErrorStatus::InvalidArgument, - "Parameter 'button' was not a positive integer"); - - Ok(PointerDownAction { - button: button - }) - } -} - -impl ToJson for PointerDownAction { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("type".to_owned(), - "pointerDown".to_json()); - data.insert("button".to_owned(), self.button.to_json()); - Json::Object(data) - } -} - -#[derive(Debug, PartialEq)] -pub struct PointerMoveAction { - pub duration: Nullable, - pub origin: PointerOrigin, - pub x: Nullable, - pub y: Nullable -} - -impl Parameters for PointerMoveAction { - fn from_json(body: &Json) -> WebDriverResult { - let duration = match body.find("duration") { - Some(duration) => Some(try_opt!(duration.as_u64(), - ErrorStatus::InvalidArgument, - "Parameter 'duration' was not a positive integer")), - None => None - - }; - - let origin = match body.find("origin") { - Some(o) => try!(PointerOrigin::from_json(o)), - None => PointerOrigin::default() - }; - - let x = match body.find("x") { - Some(x) => { - Some(try_opt!(x.as_i64(), - ErrorStatus::InvalidArgument, - "Parameter 'x' was not an integer")) - }, - None => None - }; - - let y = match body.find("y") { - Some(y) => { - Some(try_opt!(y.as_i64(), - ErrorStatus::InvalidArgument, - "Parameter 'y' was not an integer")) - }, - None => None - }; - - Ok(PointerMoveAction { - duration: duration.into(), - origin: origin.into(), - x: x.into(), - y: y.into(), - }) - } -} - -impl ToJson for PointerMoveAction { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("type".to_owned(), "pointerMove".to_json()); - if self.duration.is_value() { - data.insert("duration".to_owned(), - self.duration.to_json()); - } - - data.insert("origin".to_owned(), self.origin.to_json()); - - if self.x.is_value() { - data.insert("x".to_owned(), self.x.to_json()); - } - if self.y.is_value() { - data.insert("y".to_owned(), self.y.to_json()); - } - Json::Object(data) - } -} - -#[cfg(test)] -mod tests { - use rustc_serialize::json::Json; - use super::{Nullable, Parameters, WindowRectParameters}; - - #[test] - fn test_window_rect() { - let expected = WindowRectParameters { - x: Nullable::Value(0i64), - y: Nullable::Value(1i64), - width: Nullable::Value(2u64), - height: Nullable::Value(3u64), - }; - let actual = Json::from_str(r#"{"x": 0, "y": 1, "width": 2, "height": 3}"#).unwrap(); - assert_eq!(expected, Parameters::from_json(&actual).unwrap()); - } - - #[test] - fn test_window_rect_nullable() { - let expected = WindowRectParameters { - x: Nullable::Value(0i64), - y: Nullable::Null, - width: Nullable::Value(2u64), - height: Nullable::Null, - }; - let actual = Json::from_str(r#"{"x": 0, "y": null, "width": 2, "height": null}"#).unwrap(); - assert_eq!(expected, Parameters::from_json(&actual).unwrap()); - } - - #[test] - fn test_window_rect_missing_fields() { - let expected = WindowRectParameters { - x: Nullable::Value(0i64), - y: Nullable::Null, - width: Nullable::Value(2u64), - height: Nullable::Null, - }; - let actual = Json::from_str(r#"{"x": 0, "width": 2}"#).unwrap(); - assert_eq!(expected, Parameters::from_json(&actual).unwrap()); - } -} diff --git a/third_party/rust/webdriver/src/common.rs b/third_party/rust/webdriver/src/common.rs deleted file mode 100644 index 718c49b5c95a..000000000000 --- a/third_party/rust/webdriver/src/common.rs +++ /dev/null @@ -1,271 +0,0 @@ -use rustc_serialize::{Encodable, Encoder}; -use rustc_serialize::json::{Json, ToJson}; -use std::collections::BTreeMap; - -use error::{WebDriverResult, WebDriverError, ErrorStatus}; - -pub static ELEMENT_KEY: &'static str = "element-6066-11e4-a52e-4f735466cecf"; - -#[derive(Clone, Debug, PartialEq, RustcEncodable)] -pub struct Date(pub u64); - -impl Date { - pub fn new(timestamp: u64) -> Date { - Date(timestamp) - } -} - -impl ToJson for Date { - fn to_json(&self) -> Json { - let &Date(x) = self; - x.to_json() - } -} - -#[derive(Clone, Debug, PartialEq)] -pub enum Nullable { - Value(T), - Null -} - -impl Nullable { - pub fn is_null(&self) -> bool { - match *self { - Nullable::Value(_) => false, - Nullable::Null => true - } - } - - pub fn is_value(&self) -> bool { - match *self { - Nullable::Value(_) => true, - Nullable::Null => false - } - } - - pub fn map(self, f: F) -> Nullable - where F: FnOnce(T) -> U { - match self { - Nullable::Value(val) => Nullable::Value(f(val)), - Nullable::Null => Nullable::Null - } - } -} - -impl Nullable { - //This is not very pretty - pub fn from_json WebDriverResult>(value: &Json, f: F) -> WebDriverResult> { - if value.is_null() { - Ok(Nullable::Null) - } else { - Ok(Nullable::Value(try!(f(value)))) - } - } -} - -impl ToJson for Nullable { - fn to_json(&self) -> Json { - match *self { - Nullable::Value(ref x) => x.to_json(), - Nullable::Null => Json::Null - } - } -} - -impl Encodable for Nullable { - fn encode(&self, s: &mut S) -> Result<(), S::Error> { - match *self { - Nullable::Value(ref x) => x.to_json().encode(s), - Nullable::Null => s.emit_option_none() - } - } -} - -impl Into> for Nullable { - fn into(self) -> Option { - match self { - Nullable::Value(val) => Some(val), - Nullable::Null => None - } - } -} - -impl From> for Nullable { - fn from(option: Option) -> Nullable { - match option { - Some(val) => Nullable::Value(val), - None => Nullable::Null, - } - } -} - -#[derive(Clone, Debug, PartialEq)] -pub struct WebElement { - pub id: String -} - -impl WebElement { - pub fn new(id: String) -> WebElement { - WebElement { - id: id - } - } - - pub fn from_json(data: &Json) -> WebDriverResult { - let object = try_opt!(data.as_object(), - ErrorStatus::InvalidArgument, - "Could not convert webelement to object"); - let id_value = try_opt!(object.get(ELEMENT_KEY), - ErrorStatus::InvalidArgument, - "Could not find webelement key"); - - let id = try_opt!(id_value.as_string(), - ErrorStatus::InvalidArgument, - "Could not convert web element to string").to_string(); - - Ok(WebElement::new(id)) - } -} - -impl ToJson for WebElement { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert(ELEMENT_KEY.to_string(), self.id.to_json()); - Json::Object(data) - } -} - -impl From for WebElement - where T: Into { - fn from(data: T) -> WebElement { - WebElement::new(data.into()) - } -} - -#[derive(Debug, PartialEq)] -pub enum FrameId { - Short(u16), - Element(WebElement), - Null -} - -impl FrameId { - pub fn from_json(data: &Json) -> WebDriverResult { - match data { - &Json::U64(x) => { - if x > u16::max_value() as u64 || x < u16::min_value() as u64 { - return Err(WebDriverError::new(ErrorStatus::NoSuchFrame, - "frame id out of range")) - }; - Ok(FrameId::Short(x as u16)) - }, - &Json::Null => Ok(FrameId::Null), - &Json::Object(_) => Ok(FrameId::Element( - try!(WebElement::from_json(data)))), - _ => Err(WebDriverError::new(ErrorStatus::NoSuchFrame, - "frame id has unexpected type")) - } - } -} - -impl ToJson for FrameId { - fn to_json(&self) -> Json { - match *self { - FrameId::Short(x) => { - Json::U64(x as u64) - }, - FrameId::Element(ref x) => { - Json::String(x.id.clone()) - }, - FrameId::Null => { - Json::Null - } - } - } -} - -#[derive(Debug, PartialEq)] -pub enum LocatorStrategy { - CSSSelector, - LinkText, - PartialLinkText, - XPath, -} - -impl LocatorStrategy { - pub fn from_json(body: &Json) -> WebDriverResult { - match try_opt!(body.as_string(), - ErrorStatus::InvalidArgument, - "Expected locator strategy as string") { - "css selector" => Ok(LocatorStrategy::CSSSelector), - "link text" => Ok(LocatorStrategy::LinkText), - "partial link text" => Ok(LocatorStrategy::PartialLinkText), - "xpath" => Ok(LocatorStrategy::XPath), - x => Err(WebDriverError::new(ErrorStatus::InvalidArgument, - format!("Unknown locator strategy {}", x))) - } - } -} - -impl ToJson for LocatorStrategy { - fn to_json(&self) -> Json { - Json::String(match *self { - LocatorStrategy::CSSSelector => "css selector", - LocatorStrategy::LinkText => "link text", - LocatorStrategy::PartialLinkText => "partial link text", - LocatorStrategy::XPath => "xpath" - }.to_string()) - } -} - -/// The top-level browsing context has an associated window state which -/// describes what visibility state its OS widget window is in. -/// -/// The default state is [`Normal`]. -/// -/// [`normal`]: #variant.Normal -#[derive(Debug)] -pub enum WindowState { - /// The window is maximized. - Maximized, - /// The window is iconified. - Minimized, - /// The window is shown normally. - Normal, - /// The window is in full screen mode. - Fullscreen, -} - -impl WindowState { - pub fn from_json(body: &Json) -> WebDriverResult { - use self::WindowState::*; - let s = try_opt!( - body.as_string(), - ErrorStatus::InvalidArgument, - "Expecetd window state as string" - ); - match s { - "maximized" => Ok(Maximized), - "minimized" => Ok(Minimized), - "normal" => Ok(Normal), - "fullscreen" => Ok(Fullscreen), - x => Err(WebDriverError::new( - ErrorStatus::InvalidArgument, - format!("Unknown window state {}", x), - )), - } - } -} - -impl ToJson for WindowState { - fn to_json(&self) -> Json { - use self::WindowState::*; - let state = match *self { - Maximized => "maximized", - Minimized => "minimized", - Normal => "normal", - Fullscreen => "fullscreen", - }; - Json::String(state.to_string()) - } -} diff --git a/third_party/rust/webdriver/src/error.rs b/third_party/rust/webdriver/src/error.rs deleted file mode 100644 index 1ca0af8f66a0..000000000000 --- a/third_party/rust/webdriver/src/error.rs +++ /dev/null @@ -1,318 +0,0 @@ -use backtrace::Backtrace; -use hyper::status::StatusCode; -use rustc_serialize::base64::FromBase64Error; -use rustc_serialize::json::{DecoderError, Json, ParserError, ToJson}; -use std::borrow::Cow; -use std::collections::BTreeMap; -use std::convert::From; -use std::error::Error; -use std::fmt; -use std::io; - -#[derive(Debug, PartialEq)] -pub enum ErrorStatus { - /// The [`ElementClick`] command could not be completed because the - /// [element] receiving the events is obscuring the element that was - /// requested clicked. - /// - /// [`ElementClick`]: - /// ../command/enum.WebDriverCommand.html#variant.ElementClick - /// [element]: ../common/struct.WebElement.html - ElementClickIntercepted, - - /// A [command] could not be completed because the element is not pointer- - /// or keyboard interactable. - /// - /// [command]: ../command/index.html - ElementNotInteractable, - - /// An attempt was made to select an [element] that cannot be selected. - /// - /// [element]: ../common/struct.WebElement.html - ElementNotSelectable, - - /// Navigation caused the user agent to hit a certificate warning, which is - /// usually the result of an expired or invalid TLS certificate. - InsecureCertificate, - - /// The arguments passed to a [command] are either invalid or malformed. - /// - /// [command]: ../command/index.html - InvalidArgument, - - /// An illegal attempt was made to set a cookie under a different domain - /// than the current page. - InvalidCookieDomain, - - /// The coordinates provided to an interactions operation are invalid. - InvalidCoordinates, - - /// A [command] could not be completed because the element is an invalid - /// state, e.g. attempting to click an element that is no longer attached - /// to the document. - /// - /// [command]: ../command/index.html - InvalidElementState, - - /// Argument was an invalid selector. - InvalidSelector, - - /// Occurs if the given session ID is not in the list of active sessions, - /// meaning the session either does not exist or that it’s not active. - InvalidSessionId, - - /// An error occurred while executing JavaScript supplied by the user. - JavascriptError, - - /// The target for mouse interaction is not in the browser’s viewport and - /// cannot be brought into that viewport. - MoveTargetOutOfBounds, - - /// An attempt was made to operate on a modal dialogue when one was not - /// open. - NoSuchAlert, - - /// No cookie matching the given path name was found amongst the associated - /// cookies of the current browsing context’s active document. - NoSuchCookie, - - /// An [element] could not be located on the page using the given search - /// parameters. - /// - /// [element]: ../common/struct.WebElement.html - NoSuchElement, - - /// A [command] to switch to a frame could not be satisfied because the - /// frame could not be found. - /// - /// [command]: ../command/index.html - NoSuchFrame, - - /// A [command] to switch to a window could not be satisfied because the - /// window could not be found. - /// - /// [command]: ../command/index.html - NoSuchWindow, - - /// A script did not complete before its timeout expired. - ScriptTimeout, - - /// A new session could not be created. - SessionNotCreated, - - /// A [command] failed because the referenced [element] is no longer - /// attached to the DOM. - /// - /// [command]: ../command/index.html - /// [element]: ../common/struct.WebElement.html - StaleElementReference, - - /// An operation did not complete before its timeout expired. - Timeout, - - /// A screen capture was made impossible. - UnableToCaptureScreen, - - /// Setting the cookie’s value could not be done. - UnableToSetCookie, - - /// A modal dialogue was open, blocking this operation. - UnexpectedAlertOpen, - - /// The requested command could not be executed because it does not exist. - UnknownCommand, - - /// An unknown error occurred in the remote end whilst processing the - /// [command]. - /// - /// [command]: ../command/index.html - UnknownError, - - /// The requested [command] matched a known endpoint, but did not match a - /// method for that endpoint. - /// - /// [command]: ../command/index.html - UnknownMethod, - - UnknownPath, - - /// Indicates that a [command] that should have executed properly is not - /// currently supported. - UnsupportedOperation, -} - - -impl ErrorStatus { - pub fn error_code(&self) -> &'static str { - match *self { - ErrorStatus::ElementClickIntercepted => "element click intercepted", - ErrorStatus::ElementNotInteractable => "element not interactable", - ErrorStatus::ElementNotSelectable => "element not selectable", - ErrorStatus::InsecureCertificate => "insecure certificate", - ErrorStatus::InvalidArgument => "invalid argument", - ErrorStatus::InvalidCookieDomain => "invalid cookie domain", - ErrorStatus::InvalidCoordinates => "invalid coordinates", - ErrorStatus::InvalidElementState => "invalid element state", - ErrorStatus::InvalidSelector => "invalid selector", - ErrorStatus::InvalidSessionId => "invalid session id", - ErrorStatus::JavascriptError => "javascript error", - ErrorStatus::MoveTargetOutOfBounds => "move target out of bounds", - ErrorStatus::NoSuchAlert => "no such alert", - ErrorStatus::NoSuchCookie => "no such cookie", - ErrorStatus::NoSuchElement => "no such element", - ErrorStatus::NoSuchFrame => "no such frame", - ErrorStatus::NoSuchWindow => "no such window", - ErrorStatus::ScriptTimeout => "script timeout", - ErrorStatus::SessionNotCreated => "session not created", - ErrorStatus::StaleElementReference => "stale element reference", - ErrorStatus::Timeout => "timeout", - ErrorStatus::UnableToCaptureScreen => "unable to capture screen", - ErrorStatus::UnableToSetCookie => "unable to set cookie", - ErrorStatus::UnexpectedAlertOpen => "unexpected alert open", - ErrorStatus::UnknownCommand | - ErrorStatus::UnknownError => "unknown error", - ErrorStatus::UnknownMethod => "unknown method", - ErrorStatus::UnknownPath => "unknown command", - ErrorStatus::UnsupportedOperation => "unsupported operation", - } - } - - pub fn http_status(&self) -> StatusCode { - match *self { - ErrorStatus::ElementClickIntercepted => StatusCode::BadRequest, - ErrorStatus::ElementNotInteractable => StatusCode::BadRequest, - ErrorStatus::ElementNotSelectable => StatusCode::BadRequest, - ErrorStatus::InsecureCertificate => StatusCode::BadRequest, - ErrorStatus::InvalidArgument => StatusCode::BadRequest, - ErrorStatus::InvalidCookieDomain => StatusCode::BadRequest, - ErrorStatus::InvalidCoordinates => StatusCode::BadRequest, - ErrorStatus::InvalidElementState => StatusCode::BadRequest, - ErrorStatus::InvalidSelector => StatusCode::BadRequest, - ErrorStatus::InvalidSessionId => StatusCode::NotFound, - ErrorStatus::JavascriptError => StatusCode::InternalServerError, - ErrorStatus::MoveTargetOutOfBounds => StatusCode::InternalServerError, - ErrorStatus::NoSuchAlert => StatusCode::BadRequest, - ErrorStatus::NoSuchCookie => StatusCode::NotFound, - ErrorStatus::NoSuchElement => StatusCode::NotFound, - ErrorStatus::NoSuchFrame => StatusCode::BadRequest, - ErrorStatus::NoSuchWindow => StatusCode::BadRequest, - ErrorStatus::ScriptTimeout => StatusCode::RequestTimeout, - ErrorStatus::SessionNotCreated => StatusCode::InternalServerError, - ErrorStatus::StaleElementReference => StatusCode::BadRequest, - ErrorStatus::Timeout => StatusCode::RequestTimeout, - ErrorStatus::UnableToCaptureScreen => StatusCode::BadRequest, - ErrorStatus::UnableToSetCookie => StatusCode::InternalServerError, - ErrorStatus::UnexpectedAlertOpen => StatusCode::InternalServerError, - ErrorStatus::UnknownCommand => StatusCode::NotFound, - ErrorStatus::UnknownError => StatusCode::InternalServerError, - ErrorStatus::UnknownMethod => StatusCode::MethodNotAllowed, - ErrorStatus::UnknownPath => StatusCode::NotFound, - ErrorStatus::UnsupportedOperation => StatusCode::InternalServerError, - } - } -} - -pub type WebDriverResult = Result; - -#[derive(Debug)] -pub struct WebDriverError { - pub error: ErrorStatus, - pub message: Cow<'static, str>, - pub stack: Cow<'static, str>, - pub delete_session: bool, -} - -impl WebDriverError { - pub fn new(error: ErrorStatus, message: S) -> WebDriverError - where S: Into> - { - WebDriverError { - error: error, - message: message.into(), - stack: format!("{:?}", Backtrace::new()).into(), - delete_session: false, - } - } - - pub fn new_with_stack(error: ErrorStatus, message: S, stack: S) -> WebDriverError - where S: Into> - { - WebDriverError { - error: error, - message: message.into(), - stack: stack.into(), - delete_session: false, - } - } - - pub fn error_code(&self) -> &'static str { - self.error.error_code() - } - - pub fn http_status(&self) -> StatusCode { - self.error.http_status() - } - - pub fn to_json_string(&self) -> String { - self.to_json().to_string() - } -} - -impl ToJson for WebDriverError { - fn to_json(&self) -> Json { - let mut data = BTreeMap::new(); - data.insert("error".into(), self.error_code().to_json()); - data.insert("message".into(), self.message.to_json()); - data.insert("stacktrace".into(), self.stack.to_json()); - - let mut wrapper = BTreeMap::new(); - wrapper.insert("value".into(), Json::Object(data)); - Json::Object(wrapper) - } -} - -impl Error for WebDriverError { - fn description(&self) -> &str { - self.error_code() - } - - fn cause(&self) -> Option<&Error> { - None - } -} - -impl fmt::Display for WebDriverError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.message.fmt(f) - } -} - -impl From for WebDriverError { - fn from(err: ParserError) -> WebDriverError { - WebDriverError::new(ErrorStatus::UnknownError, err.description().to_string()) - } -} - -impl From for WebDriverError { - fn from(err: io::Error) -> WebDriverError { - WebDriverError::new(ErrorStatus::UnknownError, err.description().to_string()) - } -} - -impl From for WebDriverError { - fn from(err: DecoderError) -> WebDriverError { - WebDriverError::new(ErrorStatus::UnknownError, err.description().to_string()) - } -} - -impl From for WebDriverError { - fn from(err: FromBase64Error) -> WebDriverError { - WebDriverError::new(ErrorStatus::UnknownError, err.description().to_string()) - } -} - -impl From> for WebDriverError { - fn from(err: Box) -> WebDriverError { - WebDriverError::new(ErrorStatus::UnknownError, err.description().to_string()) - } -} diff --git a/third_party/rust/webdriver/src/httpapi.rs b/third_party/rust/webdriver/src/httpapi.rs deleted file mode 100644 index f16a440acfda..000000000000 --- a/third_party/rust/webdriver/src/httpapi.rs +++ /dev/null @@ -1,245 +0,0 @@ -use regex::{Regex, Captures}; -use rustc_serialize::json::Json; - -use hyper::method::Method; -use hyper::method::Method::{Get, Post, Delete}; - -use command::{WebDriverCommand, WebDriverMessage, WebDriverExtensionCommand, - VoidWebDriverExtensionCommand}; -use error::{WebDriverResult, WebDriverError, ErrorStatus}; - -fn standard_routes() -> Vec<(Method, &'static str, Route)> { - return vec![(Post, "/session", Route::NewSession), - (Delete, "/session/{sessionId}", Route::DeleteSession), - (Post, "/session/{sessionId}/url", Route::Get), - (Get, "/session/{sessionId}/url", Route::GetCurrentUrl), - (Post, "/session/{sessionId}/back", Route::GoBack), - (Post, "/session/{sessionId}/forward", Route::GoForward), - (Post, "/session/{sessionId}/refresh", Route::Refresh), - (Get, "/session/{sessionId}/title", Route::GetTitle), - (Get, "/session/{sessionId}/source", Route::GetPageSource), - (Get, "/session/{sessionId}/window", Route::GetWindowHandle), - (Get, "/session/{sessionId}/window/handles", Route::GetWindowHandles), - (Delete, "/session/{sessionId}/window", Route::CloseWindow), - (Get, "/session/{sessionId}/window/size", Route::GetWindowSize), - (Post, "/session/{sessionId}/window/size", Route::SetWindowSize), - (Get, "/session/{sessionId}/window/position", Route::GetWindowPosition), - (Post, "/session/{sessionId}/window/position", Route::SetWindowPosition), - (Get, "/session/{sessionId}/window/rect", Route::GetWindowRect), - (Post, "/session/{sessionId}/window/rect", Route::SetWindowRect), - (Post, "/session/{sessionId}/window/minimize", Route::MinimizeWindow), - (Post, "/session/{sessionId}/window/maximize", Route::MaximizeWindow), - (Post, "/session/{sessionId}/window/fullscreen", Route::FullscreenWindow), - (Post, "/session/{sessionId}/window", Route::SwitchToWindow), - (Post, "/session/{sessionId}/frame", Route::SwitchToFrame), - (Post, "/session/{sessionId}/frame/parent", Route::SwitchToParentFrame), - (Post, "/session/{sessionId}/element", Route::FindElement), - (Post, "/session/{sessionId}/elements", Route::FindElements), - (Post, "/session/{sessionId}/element/{elementId}/element", Route::FindElementElement), - (Post, "/session/{sessionId}/element/{elementId}/elements", Route::FindElementElements), - (Get, "/session/{sessionId}/element/active", Route::GetActiveElement), - (Get, "/session/{sessionId}/element/{elementId}/displayed", Route::IsDisplayed), - (Get, "/session/{sessionId}/element/{elementId}/selected", Route::IsSelected), - (Get, "/session/{sessionId}/element/{elementId}/attribute/{name}", Route::GetElementAttribute), - (Get, "/session/{sessionId}/element/{elementId}/property/{name}", Route::GetElementProperty), - (Get, "/session/{sessionId}/element/{elementId}/css/{propertyName}", Route::GetCSSValue), - (Get, "/session/{sessionId}/element/{elementId}/text", Route::GetElementText), - (Get, "/session/{sessionId}/element/{elementId}/name", Route::GetElementTagName), - (Get, "/session/{sessionId}/element/{elementId}/rect", Route::GetElementRect), - (Get, "/session/{sessionId}/element/{elementId}/enabled", Route::IsEnabled), - (Post, "/session/{sessionId}/execute/sync", Route::ExecuteScript), - (Post, "/session/{sessionId}/execute/async", Route::ExecuteAsyncScript), - (Get, "/session/{sessionId}/cookie", Route::GetCookies), - (Get, "/session/{sessionId}/cookie/{name}", Route::GetNamedCookie), - (Post, "/session/{sessionId}/cookie", Route::AddCookie), - (Delete, "/session/{sessionId}/cookie", Route::DeleteCookies), - (Delete, "/session/{sessionId}/cookie/{name}", Route::DeleteCookie), - (Get, "/session/{sessionId}/timeouts", Route::GetTimeouts), - (Post, "/session/{sessionId}/timeouts", Route::SetTimeouts), - (Post, "/session/{sessionId}/element/{elementId}/click", Route::ElementClick), - (Post, "/session/{sessionId}/element/{elementId}/tap", Route::ElementTap), - (Post, "/session/{sessionId}/element/{elementId}/clear", Route::ElementClear), - (Post, "/session/{sessionId}/element/{elementId}/value", Route::ElementSendKeys), - (Post, "/session/{sessionId}/alert/dismiss", Route::DismissAlert), - (Post, "/session/{sessionId}/alert/accept", Route::AcceptAlert), - (Get, "/session/{sessionId}/alert/text", Route::GetAlertText), - (Post, "/session/{sessionId}/alert/text", Route::SendAlertText), - (Get, "/session/{sessionId}/screenshot", Route::TakeScreenshot), - (Get, "/session/{sessionId}/element/{elementId}/screenshot", Route::TakeElementScreenshot), - (Post, "/session/{sessionId}/actions", Route::PerformActions), - (Delete, "/session/{sessionId}/actions", Route::ReleaseActions), - (Get, "/status", Route::Status),] -} - -#[derive(Clone, Copy, Debug)] -pub enum Route { - NewSession, - DeleteSession, - Get, - GetCurrentUrl, - GoBack, - GoForward, - Refresh, - GetTitle, - GetPageSource, - GetWindowHandle, - GetWindowHandles, - CloseWindow, - GetWindowSize, // deprecated - SetWindowSize, // deprecated - GetWindowPosition, // deprecated - SetWindowPosition, // deprecated - GetWindowRect, - SetWindowRect, - MinimizeWindow, - MaximizeWindow, - FullscreenWindow, - SwitchToWindow, - SwitchToFrame, - SwitchToParentFrame, - FindElement, - FindElements, - FindElementElement, - FindElementElements, - GetActiveElement, - IsDisplayed, - IsSelected, - GetElementAttribute, - GetElementProperty, - GetCSSValue, - GetElementText, - GetElementTagName, - GetElementRect, - IsEnabled, - ExecuteScript, - ExecuteAsyncScript, - GetCookies, - GetNamedCookie, - AddCookie, - DeleteCookies, - DeleteCookie, - GetTimeouts, - SetTimeouts, - ElementClick, - ElementTap, - ElementClear, - ElementSendKeys, - PerformActions, - ReleaseActions, - DismissAlert, - AcceptAlert, - GetAlertText, - SendAlertText, - TakeScreenshot, - TakeElementScreenshot, - Status, - Extension(U), -} - -pub trait WebDriverExtensionRoute : Clone + Send + PartialEq { - type Command: WebDriverExtensionCommand + 'static; - - fn command(&self, &Captures, &Json) -> WebDriverResult>; -} - -#[derive(Clone, Debug, PartialEq)] -pub struct VoidWebDriverExtensionRoute; - -impl WebDriverExtensionRoute for VoidWebDriverExtensionRoute { - type Command = VoidWebDriverExtensionCommand; - - fn command(&self, _:&Captures, _:&Json) -> WebDriverResult> { - panic!("No extensions implemented"); - } -} - -#[derive(Clone, Debug)] -struct RequestMatcher { - method: Method, - path_regexp: Regex, - match_type: Route -} - -impl RequestMatcher { - pub fn new(method: Method, path: &str, match_type: Route) -> RequestMatcher { - let path_regexp = RequestMatcher::::compile_path(path); - RequestMatcher { - method: method, - path_regexp: path_regexp, - match_type: match_type - } - } - - pub fn get_match<'t>(&'t self, method: Method, path: &'t str) -> (bool, Option) { - let captures = self.path_regexp.captures(path); - (method == self.method, captures) - } - - fn compile_path(path: &str) -> Regex { - let mut rv = String::new(); - rv.push_str("^"); - let components = path.split('/'); - for component in components { - if component.starts_with("{") { - if !component.ends_with("}") { - panic!("Invalid url pattern") - } - rv.push_str(&format!("(?P<{}>[^/]+)/", &component[1..component.len()-1])[..]); - } else { - rv.push_str(&format!("{}/", component)[..]); - } - } - //Remove the trailing / - rv.pop(); - rv.push_str("$"); - //This will fail at runtime if the regexp is invalid - Regex::new(&rv[..]).unwrap() - } -} - -#[derive(Debug)] -pub struct WebDriverHttpApi { - routes: Vec<(Method, RequestMatcher)>, -} - -impl WebDriverHttpApi { - pub fn new(extension_routes: &[(Method, &str, U)]) -> WebDriverHttpApi { - let mut rv = WebDriverHttpApi:: { - routes: vec![], - }; - debug!("Creating routes"); - for &(ref method, ref url, ref match_type) in standard_routes::().iter() { - rv.add(method.clone(), *url, (*match_type).clone()); - }; - for &(ref method, ref url, ref extension_route) in extension_routes.iter() { - rv.add(method.clone(), *url, Route::Extension(extension_route.clone())); - }; - rv - } - - fn add(&mut self, method: Method, path: &str, match_type: Route) { - let http_matcher = RequestMatcher::new(method.clone(), path, match_type); - self.routes.push((method, http_matcher)); - } - - pub fn decode_request(&self, method: Method, path: &str, body: &str) -> WebDriverResult> { - let mut error = ErrorStatus::UnknownPath; - for &(ref match_method, ref matcher) in self.routes.iter() { - if method == *match_method { - let (method_match, captures) = matcher.get_match(method.clone(), path); - if captures.is_some() { - if method_match { - return WebDriverMessage::from_http(matcher.match_type.clone(), - &captures.unwrap(), - body, - method == Post) - } else { - error = ErrorStatus::UnknownMethod; - } - } - } - } - Err(WebDriverError::new(error, - format!("{} {} did not match a known command", method, path))) - } -} diff --git a/third_party/rust/webdriver/src/lib.rs b/third_party/rust/webdriver/src/lib.rs deleted file mode 100644 index d8ed3f8a6279..000000000000 --- a/third_party/rust/webdriver/src/lib.rs +++ /dev/null @@ -1,43 +0,0 @@ -#![allow(non_snake_case)] - -extern crate backtrace; -#[macro_use] -extern crate log; -extern crate rustc_serialize; -extern crate hyper; -extern crate regex; -extern crate cookie; -extern crate time; -extern crate url; - -#[macro_use] pub mod macros; -pub mod httpapi; -pub mod capabilities; -pub mod command; -pub mod common; -pub mod error; -pub mod server; -pub mod response; - -#[cfg(test)] -mod nullable_tests { - use super::common::Nullable; - - #[test] - fn test_nullable_map() { - let mut test = Nullable::Value(21); - - assert_eq!(test.map(|x| x << 1), Nullable::Value(42)); - - test = Nullable::Null; - - assert_eq!(test.map(|x| x << 1), Nullable::Null); - } - - #[test] - fn test_nullable_into() { - let test: Option = Nullable::Value(42).into(); - - assert_eq!(test, Some(42)); - } -} diff --git a/third_party/rust/webdriver/src/macros.rs b/third_party/rust/webdriver/src/macros.rs deleted file mode 100644 index 46e97ae39ede..000000000000 --- a/third_party/rust/webdriver/src/macros.rs +++ /dev/null @@ -1,8 +0,0 @@ -macro_rules! try_opt { - ($expr:expr, $err_type:expr, $err_msg:expr) => ({ - match $expr { - Some(x) => x, - None => return Err(WebDriverError::new($err_type, $err_msg)) - } - }) -} diff --git a/third_party/rust/webdriver/src/response.rs b/third_party/rust/webdriver/src/response.rs deleted file mode 100644 index 5159891bb241..000000000000 --- a/third_party/rust/webdriver/src/response.rs +++ /dev/null @@ -1,336 +0,0 @@ -use common::{Date, Nullable, WindowState}; -use cookie; -use rustc_serialize::json::{self, Json, ToJson}; -use std::collections::BTreeMap; -use time; - -#[derive(Debug)] -pub enum WebDriverResponse { - CloseWindow(CloseWindowResponse), - Cookie(CookieResponse), - Cookies(CookiesResponse), - DeleteSession, - ElementRect(ElementRectResponse), - Generic(ValueResponse), - NewSession(NewSessionResponse), - Timeouts(TimeoutsResponse), - Void, - WindowRect(WindowRectResponse), -} - -impl WebDriverResponse { - pub fn to_json_string(self) -> String { - use response::WebDriverResponse::*; - - let obj = match self { - CloseWindow(ref x) => json::encode(&x.to_json()), - Cookie(ref x) => json::encode(x), - Cookies(ref x) => json::encode(x), - DeleteSession => Ok("{}".to_string()), - ElementRect(ref x) => json::encode(x), - Generic(ref x) => json::encode(x), - NewSession(ref x) => json::encode(x), - Timeouts(ref x) => json::encode(x), - Void => Ok("{}".to_string()), - WindowRect(ref x) => json::encode(&x.to_json()), - }.unwrap(); - - match self { - Generic(_) | Cookie(_) | Cookies(_) => obj, - _ => { - let mut data = String::with_capacity(11 + obj.len()); - data.push_str("{\"value\": "); - data.push_str(&*obj); - data.push_str("}"); - data - } - } - } -} - -#[derive(Debug, RustcEncodable)] -pub struct CloseWindowResponse { - pub window_handles: Vec, -} - -impl CloseWindowResponse { - pub fn new(handles: Vec) -> CloseWindowResponse { - CloseWindowResponse { window_handles: handles } - } -} - -impl ToJson for CloseWindowResponse { - fn to_json(&self) -> Json { - Json::Array(self.window_handles - .iter() - .map(|x| Json::String(x.clone())) - .collect::>()) - } -} - -#[derive(Debug, RustcEncodable)] -pub struct NewSessionResponse { - pub sessionId: String, - pub capabilities: json::Json -} - -impl NewSessionResponse { - pub fn new(session_id: String, capabilities: json::Json) -> NewSessionResponse { - NewSessionResponse { - capabilities: capabilities, - sessionId: session_id - } - } -} - -#[derive(Debug, RustcEncodable)] -pub struct TimeoutsResponse { - pub script: u64, - pub pageLoad: u64, - pub implicit: u64, -} - -impl TimeoutsResponse { - pub fn new(script: u64, page_load: u64, implicit: u64) -> TimeoutsResponse { - TimeoutsResponse { - script: script, - pageLoad: page_load, - implicit: implicit, - } - } -} - -#[derive(Debug, RustcEncodable)] -pub struct ValueResponse { - pub value: json::Json -} - -impl ValueResponse { - pub fn new(value: json::Json) -> ValueResponse { - ValueResponse { - value: value - } - } -} - -#[derive(Debug, RustcEncodable)] -pub struct ElementRectResponse { - /// X axis position of the top-left corner of the element relative - // to the current browsing context’s document element in CSS reference - // pixels. - pub x: f64, - - /// Y axis position of the top-left corner of the element relative - // to the current browsing context’s document element in CSS reference - // pixels. - pub y: f64, - - /// Height of the element’s [bounding rectangle] in CSS reference - /// pixels. - /// - /// [bounding rectangle]: https://drafts.fxtf.org/geometry/#rectangle - pub width: f64, - - /// Width of the element’s [bounding rectangle] in CSS reference - /// pixels. - /// - /// [bounding rectangle]: https://drafts.fxtf.org/geometry/#rectangle - pub height: f64, -} - -#[derive(Debug)] -pub struct WindowRectResponse { - /// `WindowProxy`’s [screenX] attribute. - /// - /// [screenX]: https://drafts.csswg.org/cssom-view/#dom-window-screenx - pub x: f64, - - /// `WindowProxy`’s [screenY] attribute. - /// - /// [screenY]: https://drafts.csswg.org/cssom-view/#dom-window-screeny - pub y: f64, - - /// Width of the top-level browsing context’s outer dimensions, including - /// any browser chrome and externally drawn window decorations in CSS - /// reference pixels. - pub width: f64, - - /// Height of the top-level browsing context’s outer dimensions, including - /// any browser chrome and externally drawn window decorations in CSS - /// reference pixels. - pub height: f64, - - /// The top-level browsing context’s window state. - pub state: WindowState, -} - -impl ToJson for WindowRectResponse { - fn to_json(&self) -> Json { - let mut body = BTreeMap::new(); - body.insert("x".to_owned(), self.x.to_json()); - body.insert("y".to_owned(), self.y.to_json()); - body.insert("width".to_owned(), self.width.to_json()); - body.insert("height".to_owned(), self.height.to_json()); - body.insert("state".to_owned(), self.state.to_json()); - Json::Object(body) - } -} - -#[derive(Clone, Debug, PartialEq, RustcEncodable)] -pub struct Cookie { - pub name: String, - pub value: String, - pub path: Nullable, - pub domain: Nullable, - pub expiry: Nullable, - pub secure: bool, - pub httpOnly: bool, -} - -impl Into> for Cookie { - fn into(self) -> cookie::Cookie<'static> { - let cookie = cookie::Cookie::build(self.name, self.value) - .secure(self.secure) - .http_only(self.httpOnly); - let cookie = match self.domain { - Nullable::Value(domain) => cookie.domain(domain), - Nullable::Null => cookie, - }; - let cookie = match self.path { - Nullable::Value(path) => cookie.path(path), - Nullable::Null => cookie, - }; - let cookie = match self.expiry { - Nullable::Value(Date(expiry)) => { - cookie.expires(time::at(time::Timespec::new(expiry as i64, 0))) - } - Nullable::Null => cookie, - }; - cookie.finish() - } -} - -#[derive(Debug, RustcEncodable)] -pub struct CookieResponse { - pub value: Cookie, -} - -#[derive(Debug, RustcEncodable)] -pub struct CookiesResponse { - pub value: Vec, -} - -#[cfg(test)] -mod tests { - use super::{CloseWindowResponse, Cookie, CookieResponse, CookiesResponse, ElementRectResponse, - NewSessionResponse, Nullable, TimeoutsResponse, ValueResponse, WebDriverResponse, - WindowRectResponse}; - use common::WindowState; - use rustc_serialize::json::Json; - use std::collections::BTreeMap; - - fn test(resp: WebDriverResponse, expected_str: &str) { - let data = resp.to_json_string(); - let actual = Json::from_str(&*data).unwrap(); - let expected = Json::from_str(expected_str).unwrap(); - assert_eq!(actual, expected); - } - - #[test] - fn test_close_window() { - let resp = WebDriverResponse::CloseWindow( - CloseWindowResponse::new(vec!["test".into()])); - let expected = r#"{"value": ["test"]}"#; - test(resp, expected); - } - - #[test] - fn test_cookie() { - let cookie = Cookie { - name: "name".into(), - value: "value".into(), - path: Nullable::Value("/".into()), - domain: Nullable::Null, - expiry: Nullable::Null, - secure: true, - httpOnly: false, - }; - let resp = WebDriverResponse::Cookie(CookieResponse { value: cookie }); - let expected = r#"{"value": {"name": "name", "expiry": null, "value": "value", -"path": "/", "domain": null, "secure": true, "httpOnly": false}}"#; - test(resp, expected); - } - - #[test] - fn test_cookies() { - let resp = WebDriverResponse::Cookies(CookiesResponse { - value: vec![ - Cookie { - name: "name".into(), - value: "value".into(), - path: Nullable::Value("/".into()), - domain: Nullable::Null, - expiry: Nullable::Null, - secure: true, - httpOnly: false, - } - ]}); - let expected = r#"{"value": [{"name": "name", "value": "value", "path": "/", -"domain": null, "expiry": null, "secure": true, "httpOnly": false}]}"#; - test(resp, expected); - } - - #[test] - fn test_element_rect() { - let rect = ElementRectResponse { - x: 0f64, - y: 1f64, - width: 2f64, - height: 3f64, - }; - let resp = WebDriverResponse::ElementRect(rect); - let expected = r#"{"value": {"x": 0.0, "y": 1.0, "width": 2.0, "height": 3.0}}"#; - test(resp, expected); - } - - #[test] - fn test_window_rect() { - let rect = WindowRectResponse { - x: 0f64, - y: 1f64, - width: 2f64, - height: 3f64, - state: WindowState::Normal, - }; - let resp = WebDriverResponse::WindowRect(rect); - let expected = r#"{"value": {"x": 0.0, "y": 1.0, "width": 2.0, "height": 3.0, "state": "normal"}}"#; - test(resp, expected); - } - - #[test] - fn test_new_session() { - let resp = WebDriverResponse::NewSession( - NewSessionResponse::new("test".into(), - Json::Object(BTreeMap::new()))); - let expected = r#"{"value": {"sessionId": "test", "capabilities": {}}}"#; - test(resp, expected); - } - - #[test] - fn test_timeouts() { - let resp = WebDriverResponse::Timeouts(TimeoutsResponse::new( - 1, 2, 3)); - let expected = r#"{"value": {"script": 1, "pageLoad": 2, "implicit": 3}}"#; - test(resp, expected); - } - - #[test] - fn test_value() { - let mut value = BTreeMap::new(); - value.insert("example".into(), Json::Array(vec![Json::String("test".into())])); - let resp = WebDriverResponse::Generic(ValueResponse::new( - Json::Object(value))); - let expected = r#"{"value": {"example": ["test"]}}"#; - test(resp, expected); - } -} diff --git a/third_party/rust/webdriver/src/server.rs b/third_party/rust/webdriver/src/server.rs deleted file mode 100644 index f4e892510353..000000000000 --- a/third_party/rust/webdriver/src/server.rs +++ /dev/null @@ -1,263 +0,0 @@ -use std::io::Read; -use std::marker::PhantomData; -use std::net::SocketAddr; -use std::sync::mpsc::{channel, Receiver, Sender}; -use std::sync::Mutex; -use std::thread; - -use hyper::header::{ContentType, CacheControl, CacheDirective}; -use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value}; -use hyper::method::Method; -use hyper::Result; -use hyper::server::{Handler, Listening, Request, Response, Server}; -use hyper::status::StatusCode; -use hyper::uri::RequestUri::AbsolutePath; - -use command::{WebDriverMessage, WebDriverCommand}; -use error::{WebDriverResult, WebDriverError, ErrorStatus}; -use httpapi::{WebDriverHttpApi, WebDriverExtensionRoute, VoidWebDriverExtensionRoute}; -use response::{CloseWindowResponse, WebDriverResponse}; - -enum DispatchMessage { - HandleWebDriver(WebDriverMessage, Sender>), - Quit -} - -#[derive(Clone, Debug, PartialEq)] -pub struct Session { - id: String -} - -impl Session { - fn new(id: String) -> Session { - Session { - id: id - } - } -} - -pub trait WebDriverHandler : Send { - fn handle_command(&mut self, session: &Option, msg: WebDriverMessage) -> WebDriverResult; - fn delete_session(&mut self, session: &Option); -} - -#[derive(Debug)] -struct Dispatcher, - U: WebDriverExtensionRoute> { - handler: T, - session: Option, - extension_type: PhantomData, -} - -impl, U: WebDriverExtensionRoute> Dispatcher { - fn new(handler: T) -> Dispatcher { - Dispatcher { - handler: handler, - session: None, - extension_type: PhantomData, - } - } - - fn run(&mut self, msg_chan: Receiver>) { - loop { - match msg_chan.recv() { - Ok(DispatchMessage::HandleWebDriver(msg, resp_chan)) => { - let resp = match self.check_session(&msg) { - Ok(_) => self.handler.handle_command(&self.session, msg), - Err(e) => Err(e), - }; - - match resp { - Ok(WebDriverResponse::NewSession(ref new_session)) => { - self.session = Some(Session::new(new_session.sessionId.clone())); - } - Ok(WebDriverResponse::CloseWindow(CloseWindowResponse { ref window_handles })) => { - if window_handles.len() == 0 { - debug!("Last window was closed, deleting session"); - self.delete_session(); - } - } - Ok(WebDriverResponse::DeleteSession) => self.delete_session(), - Err(ref x) if x.delete_session => self.delete_session(), - _ => {} - } - - if resp_chan.send(resp).is_err() { - error!("Sending response to the main thread failed"); - }; - } - Ok(DispatchMessage::Quit) => break, - Err(_) => panic!("Error receiving message in handler"), - } - } - } - - fn delete_session(&mut self) { - debug!("Deleting session"); - self.handler.delete_session(&self.session); - self.session = None; - } - - fn check_session(&self, msg: &WebDriverMessage) -> WebDriverResult<()> { - match msg.session_id { - Some(ref msg_session_id) => { - match self.session { - Some(ref existing_session) => { - if existing_session.id != *msg_session_id { - Err(WebDriverError::new( - ErrorStatus::InvalidSessionId, - format!("Got unexpected session id {}", - msg_session_id))) - } else { - Ok(()) - } - }, - None => Ok(()) - } - }, - None => { - match self.session { - Some(_) => { - match msg.command { - WebDriverCommand::Status => Ok(()), - WebDriverCommand::NewSession(_) => { - Err(WebDriverError::new( - ErrorStatus::SessionNotCreated, - "Session is already started")) - }, - _ => { - //This should be impossible - error!("Got a message with no session id"); - Err(WebDriverError::new( - ErrorStatus::UnknownError, - "Got a command with no session?!")) - } - } - }, - None => { - match msg.command { - WebDriverCommand::NewSession(_) => Ok(()), - WebDriverCommand::Status => Ok(()), - _ => Err(WebDriverError::new( - ErrorStatus::InvalidSessionId, - "Tried to run a command before creating a session")) - } - } - } - } - } - } -} - -#[derive(Debug)] -struct HttpHandler { - chan: Mutex>>, - api: Mutex> -} - -impl HttpHandler { - fn new(api: WebDriverHttpApi, chan: Sender>) -> HttpHandler { - HttpHandler { - chan: Mutex::new(chan), - api: Mutex::new(api) - } - } -} - -impl Handler for HttpHandler { - fn handle(&self, req: Request, res: Response) { - let mut req = req; - let mut res = res; - - let mut body = String::new(); - if let Method::Post = req.method { - req.read_to_string(&mut body).unwrap(); - } - - debug!("-> {} {} {}", req.method, req.uri, body); - - match req.uri { - AbsolutePath(path) => { - let msg_result = { - // The fact that this locks for basically the whole request doesn't - // matter as long as we are only handling one request at a time. - match self.api.lock() { - Ok(ref api) => api.decode_request(req.method, &path[..], &body[..]), - Err(_) => return, - } - }; - let (status, resp_body) = match msg_result { - Ok(message) => { - let (send_res, recv_res) = channel(); - match self.chan.lock() { - Ok(ref c) => { - let res = - c.send(DispatchMessage::HandleWebDriver(message, send_res)); - match res { - Ok(x) => x, - Err(_) => { - error!("Something terrible happened"); - return; - } - } - } - Err(_) => { - error!("Something terrible happened"); - return; - } - } - match recv_res.recv() { - Ok(data) => { - match data { - Ok(response) => (StatusCode::Ok, response.to_json_string()), - Err(err) => (err.http_status(), err.to_json_string()), - } - } - Err(e) => panic!("Error reading response: {:?}", e), - } - } - Err(err) => (err.http_status(), err.to_json_string()), - }; - - debug!("<- {} {}", status, resp_body); - - { - let resp_status = res.status_mut(); - *resp_status = status; - } - res.headers_mut() - .set(ContentType(Mime(TopLevel::Application, - SubLevel::Json, - vec![(Attr::Charset, Value::Utf8)]))); - res.headers_mut() - .set(CacheControl(vec![CacheDirective::NoCache])); - - res.send(&resp_body.as_bytes()).unwrap(); - } - _ => {} - } - } -} - -pub fn start(address: SocketAddr, - handler: T, - extension_routes: &[(Method, &str, U)]) - -> Result - where T: 'static + WebDriverHandler, - U: 'static + WebDriverExtensionRoute -{ - let (msg_send, msg_recv) = channel(); - - let api = WebDriverHttpApi::new(extension_routes); - let http_handler = HttpHandler::new(api, msg_send); - let mut server = try!(Server::http(address)); - server.keep_alive(None); - - let builder = thread::Builder::new().name("webdriver dispatcher".to_string()); - try!(builder.spawn(move || { - let mut dispatcher = Dispatcher::new(handler); - dispatcher.run(msg_recv); - })); - - server.handle(http_handler) -} diff --git a/toolkit/components/extensions/Extension.jsm b/toolkit/components/extensions/Extension.jsm index aadd93426ebf..d838d880141d 100644 --- a/toolkit/components/extensions/Extension.jsm +++ b/toolkit/components/extensions/Extension.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Extension", "ExtensionData"]; +this.EXPORTED_SYMBOLS = ["Extension", "ExtensionData", "Langpack"]; /* exported Extension, ExtensionData */ /* globals Extension ExtensionData */ @@ -40,15 +40,19 @@ Cu.importGlobalProperties(["TextEncoder"]); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); +Cu.importGlobalProperties(["fetch"]); XPCOMUtils.defineLazyModuleGetters(this, { AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManagerPrivate: "resource://gre/modules/AddonManager.jsm", + AppConstants: "resource://gre/modules/AppConstants.jsm", AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm", ExtensionCommon: "resource://gre/modules/ExtensionCommon.jsm", ExtensionPermissions: "resource://gre/modules/ExtensionPermissions.jsm", ExtensionStorage: "resource://gre/modules/ExtensionStorage.jsm", ExtensionTestCommon: "resource://testing-common/ExtensionTestCommon.jsm", + FileSource: "resource://gre/modules/L10nRegistry.jsm", + L10nRegistry: "resource://gre/modules/L10nRegistry.jsm", Log: "resource://gre/modules/Log.jsm", MessageChannel: "resource://gre/modules/MessageChannel.jsm", NetUtil: "resource://gre/modules/NetUtil.jsm", @@ -63,6 +67,11 @@ XPCOMUtils.defineLazyGetter( () => Cc["@mozilla.org/webextensions/extension-process-script;1"] .getService().wrappedJSObject); +XPCOMUtils.defineLazyGetter( + this, "resourceProtocol", + () => Services.io.getProtocolHandler("resource") + .QueryInterface(Ci.nsIResProtocolHandler)); + Cu.import("resource://gre/modules/ExtensionParent.jsm"); Cu.import("resource://gre/modules/ExtensionUtils.jsm"); @@ -295,6 +304,7 @@ this.ExtensionData = class { this.resourceURL = rootURI.spec; this.manifest = null; + this.type = null; this.id = null; this.uuid = null; this.localeData = null; @@ -453,6 +463,10 @@ this.ExtensionData = class { // of the permissions attribute, if we add things like url_overrides, // they should also be added here. get userPermissions() { + if (this.type !== "extension") { + return null; + } + let result = { origins: this.whiteListedHosts.patterns.map(matcher => matcher.pattern), apis: [...this.apiNames], @@ -508,7 +522,10 @@ this.ExtensionData = class { preprocessors: {}, }; + let manifestType = "manifest.WebExtensionManifest"; if (this.manifest.theme) { + this.type = "theme"; + // XXX create a separate manifest type for themes let invalidProps = validateThemeManifest(Object.getOwnPropertyNames(this.manifest)); if (invalidProps.length) { @@ -517,13 +534,18 @@ this.ExtensionData = class { `(the invalid properties found are: ${invalidProps})`; this.manifestError(message); } + } else if (this.manifest.langpack_id) { + this.type = "langpack"; + manifestType = "manifest.WebExtensionLangpackManifest"; + } else { + this.type = "extension"; } if (this.localeData) { context.preprocessors.localize = (value, context) => this.localize(value); } - let normalized = Schemas.normalize(this.manifest, "manifest.WebExtensionManifest", context); + let normalized = Schemas.normalize(this.manifest, manifestType, context); if (normalized.error) { this.manifestError(normalized.error); return null; @@ -548,54 +570,59 @@ this.ExtensionData = class { let dependencies = new Set(); let originPermissions = new Set(); let permissions = new Set(); + let webAccessibleResources = []; - for (let perm of manifest.permissions) { - if (perm === "geckoProfiler") { - const acceptedExtensions = Services.prefs.getStringPref("extensions.geckoProfiler.acceptedExtensionIds", ""); - if (!acceptedExtensions.split(",").includes(id)) { - this.manifestError("Only whitelisted extensions are allowed to access the geckoProfiler."); - continue; + if (this.type === "extension") { + for (let perm of manifest.permissions) { + if (perm === "geckoProfiler") { + const acceptedExtensions = Services.prefs.getStringPref("extensions.geckoProfiler.acceptedExtensionIds", ""); + if (!acceptedExtensions.split(",").includes(id)) { + this.manifestError("Only whitelisted extensions are allowed to access the geckoProfiler."); + continue; + } + } + + let type = classifyPermission(perm); + if (type.origin) { + let matcher = new MatchPattern(perm, {ignorePath: true}); + + perm = matcher.pattern; + originPermissions.add(perm); + } else if (type.api) { + apiNames.add(type.api); + } + + permissions.add(perm); + } + + if (this.id) { + // An extension always gets permission to its own url. + let matcher = new MatchPattern(this.getURL(), {ignorePath: true}); + originPermissions.add(matcher.pattern); + + // Apply optional permissions + let perms = await ExtensionPermissions.get(this); + for (let perm of perms.permissions) { + permissions.add(perm); + } + for (let origin of perms.origins) { + originPermissions.add(origin); } } - let type = classifyPermission(perm); - if (type.origin) { - let matcher = new MatchPattern(perm, {ignorePath: true}); - - perm = matcher.pattern; - originPermissions.add(perm); - } else if (type.api) { - apiNames.add(type.api); + for (let api of apiNames) { + dependencies.add(`${api}@experiments.addons.mozilla.org`); } - permissions.add(perm); - } - - if (this.id) { - // An extension always gets permission to its own url. - let matcher = new MatchPattern(this.getURL(), {ignorePath: true}); - originPermissions.add(matcher.pattern); - - // Apply optional permissions - let perms = await ExtensionPermissions.get(this); - for (let perm of perms.permissions) { - permissions.add(perm); - } - for (let origin of perms.origins) { - originPermissions.add(origin); + // Normalize all patterns to contain a single leading / + if (manifest.web_accessible_resources) { + webAccessibleResources = manifest.web_accessible_resources + .map(path => path.replace(/^\/*/, "/")); } } - for (let api of apiNames) { - dependencies.add(`${api}@experiments.addons.mozilla.org`); - } - - // Normalize all patterns to contain a single leading / - let webAccessibleResources = (manifest.web_accessible_resources || []) - .map(path => path.replace(/^\/*/, "/")); - return {apiNames, dependencies, originPermissions, id, manifest, permissions, - webAccessibleResources}; + webAccessibleResources, type: this.type}; } // Reads the extension's |manifest.json| file, and stores its @@ -619,6 +646,7 @@ this.ExtensionData = class { this.apiNames = manifestData.apiNames; this.dependencies = manifestData.dependencies; this.permissions = manifestData.permissions; + this.type = manifestData.type; this.webAccessibleResources = manifestData.webAccessibleResources.map(res => new MatchGlob(res)); this.whiteListedHosts = new MatchPatternSet(manifestData.originPermissions); @@ -798,6 +826,21 @@ XPCOMUtils.defineLazyGetter(BootstrapScope.prototype, "BOOTSTRAP_REASON_TO_STRIN }); }); +class LangpackBootstrapScope { + install(data, reason) {} + uninstall(data, reason) {} + + startup(data, reason) { + this.langpack = new Langpack(data); + return this.langpack.startup(); + } + + shutdown(data, reason) { + this.langpack.shutdown(); + this.langpack = null; + } +} + // We create one instance of this class per extension. |addonData| // comes directly from bootstrap.js when initializing. this.Extension = class extends ExtensionData { @@ -1407,3 +1450,127 @@ this.Extension = class extends ExtensionData { return this._optionalOrigins; } }; + +this.Langpack = class extends ExtensionData { + constructor(addonData, startupReason) { + super(addonData.resourceURI); + } + + static getBootstrapScope(id, file) { + return new LangpackBootstrapScope(); + } + + async promiseLocales(locale) { + let locales = await StartupCache.locales + .get([this.id, "@@all_locales"], () => this._promiseLocaleMap()); + + return this._setupLocaleData(locales); + } + + readLocaleFile(locale) { + return StartupCache.locales.get([this.id, this.version, locale], + () => super.readLocaleFile(locale)) + .then(result => { + this.localeData.messages.set(locale, result); + }); + } + + get manifestCacheKey() { + return [this.id, this.version, Services.locale.getAppLocaleAsLangTag()]; + } + + async _parseManifest() { + let data = await super.parseManifest(); + + const productCodeName = AppConstants.MOZ_BUILD_APP.replace("/", "-"); + + // The result path looks like this: + // Firefox - `langpack-pl-browser` + // Fennec - `langpack-pl-mobile-android` + data.langpackId = + `langpack-${data.manifest.langpack_id}-${productCodeName}`; + + const l10nRegistrySources = {}; + + // Check if there's a root directory `/localization` in the langpack. + // If there is one, add it with the name `toolkit` as a FileSource. + const entries = await this.readDirectory("./localization"); + if (entries.length > 0) { + l10nRegistrySources.toolkit = ""; + } + + // Add any additional sources listed in the manifest + if (data.manifest.sources) { + for (const [sourceName, {base_path}] of Object.entries(data.manifest.sources)) { + l10nRegistrySources[sourceName] = base_path; + } + } + + data.l10nRegistrySources = l10nRegistrySources; + data.chromeResources = this.getChromeResources(data.manifest); + + return data; + } + + parseManifest() { + return StartupCache.manifests.get(this.manifestCacheKey, + () => this._parseManifest()); + } + + async startup(reason) { + const data = await this.parseManifest(); + this.langpackId = data.langpackId; + this.l10nRegistrySources = data.l10nRegistrySources; + + const languages = Object.keys(data.manifest.languages); + const manifestURI = Services.io.newURI("manifest.json", null, this.rootURI); + + this.chromeRegistryHandle = null; + if (data.chromeResources.length > 0) { + this.chromeRegistryHandle = + aomStartup.registerChrome(manifestURI, data.chromeResources); + } + + resourceProtocol.setSubstitution(this.langpackId, this.rootURI); + + for (const [sourceName, basePath] of Object.entries(this.l10nRegistrySources)) { + L10nRegistry.registerSource(new FileSource( + `${sourceName}-${this.langpackId}`, + languages, + `resource://${this.langpackId}/${basePath}localization/{locale}/` + )); + } + } + + async shutdown(reason) { + for (const sourceName of Object.keys(this.l10nRegistrySources)) { + L10nRegistry.removeSource(`${sourceName}-${this.langpackId}`); + } + if (this.chromeRegistryHandle) { + this.chromeRegistryHandle.destruct(); + this.chromeRegistryHandle = null; + } + + resourceProtocol.setSubstitution(this.langpackId, null); + } + + getChromeResources(manifest) { + const chromeEntries = []; + for (const [language, entry] of Object.entries(manifest.languages)) { + for (const [alias, path] of Object.entries(entry.chrome_resources || {})) { + if (typeof path === "string") { + chromeEntries.push(["locale", alias, language, path]); + } else { + // If the path is not a string, it's an object with path per platform + // where the keys are taken from AppConstants.platform + const platform = AppConstants.platform; + if (platform in path) { + chromeEntries.push(["locale", alias, language, path[platform]]); + } + } + + } + } + return chromeEntries; + } +}; diff --git a/toolkit/components/extensions/Schemas.jsm b/toolkit/components/extensions/Schemas.jsm index 14282829f937..461c5ed464d4 100644 --- a/toolkit/components/extensions/Schemas.jsm +++ b/toolkit/components/extensions/Schemas.jsm @@ -250,11 +250,8 @@ function getValueBaseType(value) { if (value === null) { return "null"; } - switch (ChromeUtils.getClassName(value, true)) { - case "Array": - return "array"; - case "ArrayBuffer": - return "binary"; + if (Array.isArray(value)) { + return "array"; } break; diff --git a/toolkit/components/extensions/schemas/manifest.json b/toolkit/components/extensions/schemas/manifest.json index d85afd8c1de9..10cd6f9ae1be 100644 --- a/toolkit/components/extensions/schemas/manifest.json +++ b/toolkit/components/extensions/schemas/manifest.json @@ -211,6 +211,138 @@ "additionalProperties": { "$ref": "UnrecognizedProperty" } }, + { + "id": "WebExtensionLangpackManifest", + "type": "object", + "description": "Represents a WebExtension language pack manifest.json file", + "properties": { + "manifest_version": { + "type": "integer", + "minimum": 2, + "maximum": 2 + }, + + "applications": { + "type": "object", + "optional": true, + "properties": { + "gecko": { + "$ref": "FirefoxSpecificProperties", + "optional": true + } + } + }, + + "browser_specific_settings": { + "type": "object", + "optional": true, + "properties": { + "gecko": { + "$ref": "FirefoxSpecificProperties", + "optional": true + } + } + }, + + "name": { + "type": "string", + "optional": false, + "preprocess": "localize" + }, + + "short_name": { + "type": "string", + "optional": true, + "preprocess": "localize" + }, + + "description": { + "type": "string", + "optional": true, + "preprocess": "localize" + }, + + "author": { + "type": "string", + "optional": true, + "preprocess": "localize", + "onError": "warn" + }, + + "version": { + "type": "string", + "optional": false + }, + + "homepage_url": { + "type": "string", + "format": "url", + "optional": true, + "preprocess": "localize" + }, + + "langpack_id": { + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z-]+$" + }, + + "languages": { + "type": "object", + "patternProperties": { + "^[a-z]{2}[a-zA-Z-]*$": { + "type": "object", + "properties": { + "chrome_resources": { + "type": "object", + "patternProperties": { + "^[a-zA-Z-.]+$": { + "choices": [ + { + "$ref": "ExtensionURL" + }, + { + "type": "object", + "patternProperties": { + "^[a-z]+$": { + "$ref": "ExtensionURL" + } + } + } + ] + } + } + }, + "version": { + "type": "string" + } + } + } + } + }, + "sources": { + "type": "object", + "optional": true, + "patternProperties": { + "^[a-z]+$": { + "type": "object", + "properties": { + "base_path": { + "$ref": "ExtensionURL" + }, + "paths": { + "type": "array", + "items": { + "type": "string", + "format": "strictRelativeUrl" + }, + "optional": true + } + } + } + } + } + } + }, { "id": "ThemeIcons", "type": "object", diff --git a/toolkit/components/extensions/test/mochitest/test_ext_redirect_jar.html b/toolkit/components/extensions/test/mochitest/test_ext_redirect_jar.html index ce2edc89cbee..beb72bcbd909 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_redirect_jar.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_redirect_jar.html @@ -59,7 +59,6 @@ function getExtension() { s.onload = () => resolve(['loaded', s.contentWindow.location.href]); s.onerror = () => resolve(['error']); document.documentElement.appendChild(s); - setTimeout(() => resolve(['timed_out']), 5000); });`, }); return result; diff --git a/toolkit/components/extensions/test/mochitest/test_ext_unload_frame.html b/toolkit/components/extensions/test/mochitest/test_ext_unload_frame.html index 56fe1744f2c1..4d5b84e5690f 100644 --- a/toolkit/components/extensions/test/mochitest/test_ext_unload_frame.html +++ b/toolkit/components/extensions/test/mochitest/test_ext_unload_frame.html @@ -60,8 +60,19 @@ function connect_background() { }); } function connect_contentScript(testType) { + let isUnloading = false; + addEventListener("pagehide", () => { isUnloading = true; }, {once: true}); + let port = browser.runtime.connect({name: "port from frame"}); port.onMessage.addListener(msg => { + // The background page sends a reply as soon as we call runtime.connect(). + // It is possible that the reply reaches this frame before the + // window.close() request has been processed. + if (!isUnloading) { + browser.test.log(`Ignorting unexpected reply ("${msg}") because the page is not being unloaded.`); + return; + } + // The frame has been removed, so we should not get a reply. browser.test.fail(`Unexpected reply: ${msg}`); }); diff --git a/toolkit/components/places/PlacesTransactions.jsm b/toolkit/components/places/PlacesTransactions.jsm index a936effbbbbd..0de052a13885 100644 --- a/toolkit/components/places/PlacesTransactions.jsm +++ b/toolkit/components/places/PlacesTransactions.jsm @@ -804,9 +804,15 @@ DefineTransaction.defineArrayInputProp = function(name, basePropertyName) { if (!Array.isArray(aValue)) throw new Error(`${name} input property value must be an array`); - // This also takes care of abandoning the global scope of the input - // array (through Array.prototype). - return aValue.map(baseProp.validateValue); + // We must create a new array in the local scope to avoid a memory leak due + // to the array global object. We can't use Cu.cloneInto as that doesn't + // handle the URIs. Slice & map also aren't good enough, so we start off + // with a clean array and insert what we need into it. + let newArray = []; + for (let item of aValue) { + newArray.push(baseProp.validateValue(item)); + } + return newArray; }, // We allow setting either the array property itself (e.g. urls), or a diff --git a/toolkit/components/places/nsNavHistoryResult.cpp b/toolkit/components/places/nsNavHistoryResult.cpp index 368299b48bdb..016abe06cbd0 100644 --- a/toolkit/components/places/nsNavHistoryResult.cpp +++ b/toolkit/components/places/nsNavHistoryResult.cpp @@ -2460,7 +2460,10 @@ nsNavHistoryQueryResultNode::OnVisit(nsIURI* aURI, int64_t aVisitId, nsresult rv = history->VisitIdToResultNode(aVisitId, mOptions, getter_AddRefs(addition)); NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_STATE(addition); + if (!addition) { + // Certain result types manage the nodes by themselves. + return NS_OK; + } addition->mTransitionType = aTransitionType; if (!history->EvaluateQueryForNode(mQueries, mOptions, addition)) return NS_OK; // don't need to include in our query @@ -3854,7 +3857,10 @@ nsNavHistoryFolderResultNode::OnItemVisited(int64_t aItemId, rv = history->VisitIdToResultNode(aVisitId, mOptions, getter_AddRefs(visitNode)); NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_STATE(visitNode); + if (!visitNode) { + // Certain result types manage the nodes by themselves. + return NS_OK; + } node->mFrecency = visitNode->mFrecency; if (AreChildrenVisible()) { diff --git a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp index 074bfc583b93..6476b8d546f3 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp @@ -1783,6 +1783,18 @@ nsUrlClassifierDBService::AsyncClassifyLocalWithTables(nsIURI *aURI, MOZ_ASSERT(NS_IsMainThread(), "AsyncClassifyLocalWithTables must be called " "on main thread"); + // We do this check no matter what process we are in to return + // error as early as possible. + nsCOMPtr uri = NS_GetInnermostURI(aURI); + NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE); + + nsAutoCString key; + // Canonicalize the url + nsCOMPtr utilsService = + do_GetService(NS_URLCLASSIFIERUTILS_CONTRACTID); + nsresult rv = utilsService->GetKeyForURI(uri, key); + NS_ENSURE_SUCCESS(rv, rv); + if (XRE_IsContentProcess()) { using namespace mozilla::dom; using namespace mozilla::ipc; @@ -1815,16 +1827,6 @@ nsUrlClassifierDBService::AsyncClassifyLocalWithTables(nsIURI *aURI, using namespace mozilla::Telemetry; auto startTime = TimeStamp::Now(); // For telemetry. - nsCOMPtr uri = NS_GetInnermostURI(aURI); - NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE); - - nsAutoCString key; - // Canonicalize the url - nsCOMPtr utilsService = - do_GetService(NS_URLCLASSIFIERUTILS_CONTRACTID); - nsresult rv = utilsService->GetKeyForURI(uri, key); - NS_ENSURE_SUCCESS(rv, rv); - auto worker = mWorker; nsCString tables(aTables); diff --git a/toolkit/components/url-classifier/tests/jar.mn b/toolkit/components/url-classifier/tests/jar.mn deleted file mode 100644 index 2264c289654d..000000000000 --- a/toolkit/components/url-classifier/tests/jar.mn +++ /dev/null @@ -1,2 +0,0 @@ -toolkit.jar: - content/global/url-classifier/unittests.xul (unittests.xul) diff --git a/toolkit/components/url-classifier/tests/moz.build b/toolkit/components/url-classifier/tests/moz.build index bcd0269cacdc..974fb43f5e9a 100644 --- a/toolkit/components/url-classifier/tests/moz.build +++ b/toolkit/components/url-classifier/tests/moz.build @@ -9,8 +9,6 @@ MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini'] XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini'] BROWSER_CHROME_MANIFESTS += ['browser/browser.ini'] -JAR_MANIFESTS += ['jar.mn'] - TESTING_JS_MODULES += [ 'UrlClassifierTestUtils.jsm', ] diff --git a/toolkit/components/url-classifier/tests/unittests.xul b/toolkit/components/url-classifier/tests/unittests.xul deleted file mode 100644 index bdfdfdb7a921..000000000000 --- a/toolkit/components/url-classifier/tests/unittests.xul +++ /dev/null @@ -1,188 +0,0 @@ - - - - - diff --git a/toolkit/content/aboutTelemetry.xhtml b/toolkit/content/aboutTelemetry.xhtml index 2c5793cbb6d2..41f9676770b4 100644 --- a/toolkit/content/aboutTelemetry.xhtml +++ b/toolkit/content/aboutTelemetry.xhtml @@ -28,13 +28,13 @@
- Home + &aboutTelemetry.homeSection;
&aboutTelemetry.generalDataSection; diff --git a/toolkit/content/tests/widgets/mochitest.ini b/toolkit/content/tests/widgets/mochitest.ini index 2676c0307f3c..544086530345 100644 --- a/toolkit/content/tests/widgets/mochitest.ini +++ b/toolkit/content/tests/widgets/mochitest.ini @@ -50,4 +50,4 @@ skip-if = toolkit == 'android' [test_bug898940.html] [test_videocontrols_error.html] [test_videocontrols_orientation.html] -skip-if = toolkit != 'android' \ No newline at end of file +run-if = toolkit == 'android' \ No newline at end of file diff --git a/toolkit/content/tests/widgets/test_videocontrols_orientation.html b/toolkit/content/tests/widgets/test_videocontrols_orientation.html index 6fade1583556..7d9ecf4ab637 100644 --- a/toolkit/content/tests/widgets/test_videocontrols_orientation.html +++ b/toolkit/content/tests/widgets/test_videocontrols_orientation.html @@ -21,7 +21,9 @@ var video = document.getElementById("video"); let onLoaded = event => { SpecialPowers.pushPrefEnv( - {"set": [["full-screen-api.allow-trusted-requests-only", false]]}, + {"set": [["full-screen-api.allow-trusted-requests-only", false], + ["full-screen-api.unprefix.enabled", true], + ["media.videocontrols.lock-video-orientation", true]]}, startMediaLoad); } window.addEventListener("load", onLoaded); diff --git a/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd b/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd index 2735d5fe16fc..eba7c8d0e23b 100644 --- a/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd +++ b/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd @@ -13,6 +13,11 @@ + + + @@ -22,6 +27,7 @@ + diff --git a/toolkit/locales/l10n.mk b/toolkit/locales/l10n.mk index 185d5eb1b89d..d73f76ffd293 100644 --- a/toolkit/locales/l10n.mk +++ b/toolkit/locales/l10n.mk @@ -207,7 +207,7 @@ package-langpack-%: AB_CD=$* package-langpack-%: $(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH) ifdef WEBEXT_LANGPACKS - $(call py_action,langpack_manifest,--locales $(AB_CD) --appver $(MOZ_APP_VERSION) --defines $(NEW_APP_DEFINES) --input $(DIST)/xpi-stage/locale-$(AB_CD)) + $(call py_action,langpack_manifest,--locales $(AB_CD) --min-app-ver $(MOZ_APP_VERSION) --max-app-ver $(MOZ_APP_MAXVERSION) --defines $(NEW_APP_DEFINES) --input $(DIST)/xpi-stage/locale-$(AB_CD)) $(call py_action,zip,-C $(DIST)/xpi-stage/locale-$(AB_CD) -x **/*.manifest -x **/*.js -x **/*.ini $(LANGPACK_FILE) $(PKG_ZIP_DIRS) manifest.json) else $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) \ diff --git a/toolkit/mozapps/extensions/internal/XPIInstall.jsm b/toolkit/mozapps/extensions/internal/XPIInstall.jsm index 815120600449..86f190b547e4 100644 --- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm +++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm @@ -334,8 +334,6 @@ async function loadManifestFromWebManifest(aUri) { throw new Error("Extension is invalid"); } - let theme = Boolean(manifest.theme); - let bss = (manifest.browser_specific_settings && manifest.browser_specific_settings.gecko) || (manifest.applications && manifest.applications.gecko) || {}; if (manifest.browser_specific_settings && manifest.applications) { @@ -350,7 +348,8 @@ async function loadManifestFromWebManifest(aUri) { let addon = new AddonInternal(); addon.id = bss.id; addon.version = manifest.version; - addon.type = "webextension" + (theme ? "-theme" : ""); + addon.type = extension.type === "extension" ? + "webextension" : `webextension-${extension.type}`; addon.unpack = false; addon.strictCompatibility = true; addon.bootstrap = true; @@ -435,7 +434,7 @@ async function loadManifestFromWebManifest(aUri) { addon.targetPlatforms = []; // Themes are disabled by default, except when they're installed from a web page. - addon.userDisabled = theme; + addon.userDisabled = (extension.type === "theme"); addon.softDisabled = addon.blocklistState == nsIBlocklistService.STATE_SOFTBLOCKED; return addon; diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 23817d375975..eb64e8f388dc 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -23,6 +23,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { AppConstants: "resource://gre/modules/AppConstants.jsm", ChromeManifestParser: "resource://gre/modules/ChromeManifestParser.jsm", Extension: "resource://gre/modules/Extension.jsm", + Langpack: "resource://gre/modules/Extension.jsm", LightweightThemeManager: "resource://gre/modules/LightweightThemeManager.jsm", FileUtils: "resource://gre/modules/FileUtils.jsm", ZipUtils: "resource://gre/modules/ZipUtils.jsm", @@ -207,6 +208,7 @@ const TYPE_ALIASES = { "apiextension": "extension", "webextension": "extension", "webextension-theme": "theme", + "webextension-langpack": "locale", }; const CHROME_TYPES = new Set([ @@ -4213,6 +4215,8 @@ this.XPIProvider = { if (isWebExtension(aType)) { activeAddon.bootstrapScope = Extension.getBootstrapScope(aId, aFile); + } else if (aType === "webextension-langpack") { + activeAddon.bootstrapScope = Langpack.getBootstrapScope(aId, aFile); } else { let uri = getURIForResourceInFile(aFile, "bootstrap.js").spec; if (aType == "dictionary")