From 032ee988a6a1900c42f93f30c24a891afef5f27c Mon Sep 17 00:00:00 2001 From: Sandor Molnar Date: Thu, 8 Feb 2024 18:49:48 +0200 Subject: [PATCH] Backed out changeset 0cf3688e2bcf (bug 1879286) for causing mochitest failures at layout/inspector/tests/test_getRegisteredCustomProperties.html CLOSED TREE --- dom/chrome-webidl/InspectorUtils.webidl | 3 - layout/inspector/InspectorUtils.cpp | 5 -- layout/inspector/tests/at_property.css | 4 -- .../inspector/tests/css_register_property.js | 12 ---- layout/inspector/tests/mochitest.toml | 2 - .../test_getRegisteredCustomProperties.html | 66 ++++++++----------- servo/ports/geckolib/glue.rs | 6 -- 7 files changed, 28 insertions(+), 70 deletions(-) delete mode 100644 layout/inspector/tests/at_property.css delete mode 100644 layout/inspector/tests/css_register_property.js diff --git a/dom/chrome-webidl/InspectorUtils.webidl b/dom/chrome-webidl/InspectorUtils.webidl index 4eae9e65513a..5d785e8051b2 100644 --- a/dom/chrome-webidl/InspectorUtils.webidl +++ b/dom/chrome-webidl/InspectorUtils.webidl @@ -156,9 +156,6 @@ dictionary InspectorCSSPropertyDefinition { required boolean inherits; required UTF8String? initialValue; required boolean fromJS; - required unsigned long line; - required unsigned long column; - required DOMString uri; }; [Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled", diff --git a/layout/inspector/InspectorUtils.cpp b/layout/inspector/InspectorUtils.cpp index 06cac78d6fe2..acebb863066c 100644 --- a/layout/inspector/InspectorUtils.cpp +++ b/layout/inspector/InspectorUtils.cpp @@ -898,11 +898,6 @@ void InspectorUtils::GetCSSRegisteredProperties( property.mInitialValue.SetIsVoid(true); } property.mFromJS = propDef.from_js; - - NS_MakeAbsoluteURI(property.mUri, property.mUri, - propDef.url_data->BaseURI()); - property.mLine = propDef.line; - property.mColumn = propDef.column; } } diff --git a/layout/inspector/tests/at_property.css b/layout/inspector/tests/at_property.css deleted file mode 100644 index db4e6406bd95..000000000000 --- a/layout/inspector/tests/at_property.css +++ /dev/null @@ -1,4 +0,0 @@ -@property --color-2 { - syntax: "*"; - inherits: false; -} \ No newline at end of file diff --git a/layout/inspector/tests/css_register_property.js b/layout/inspector/tests/css_register_property.js deleted file mode 100644 index 4101d6dff2e9..000000000000 --- a/layout/inspector/tests/css_register_property.js +++ /dev/null @@ -1,12 +0,0 @@ -CSS.registerProperty({ - name: "--length-3", - syntax: "*", - inherits: false, -}); - -CSS.registerProperty({ - name: "--length-4", - syntax: "*", - initialValue: "", - inherits: false, -}); diff --git a/layout/inspector/tests/mochitest.toml b/layout/inspector/tests/mochitest.toml index a29279b81c4b..9c9ba8e60a57 100644 --- a/layout/inspector/tests/mochitest.toml +++ b/layout/inspector/tests/mochitest.toml @@ -6,11 +6,9 @@ prefs = [ "dom.customHighlightAPI.enabled=true", ] support-files = [ - "at_property.css", "bug1202095.css", "bug1202095-2.css", "bug856317.css", - "css_register_property.js", "file_bug522601.html", ] diff --git a/layout/inspector/tests/test_getRegisteredCustomProperties.html b/layout/inspector/tests/test_getRegisteredCustomProperties.html index 3ef2711341cc..10eaba992d5f 100644 --- a/layout/inspector/tests/test_getRegisteredCustomProperties.html +++ b/layout/inspector/tests/test_getRegisteredCustomProperties.html @@ -4,29 +4,17 @@ Test InspectorUtils.getCSSRegisteredProperties - - - InspectorUtils.getCSSRegisteredProperties @@ -41,15 +29,35 @@ const { Assert } = SpecialPowers.ChromeUtils.importESModule( ); const InspectorUtils = SpecialPowers.InspectorUtils; +CSS.registerProperty({ + name: "--length-1", + syntax: "", + initialValue: "10px", + inherits: true, +}); +CSS.registerProperty({ + name: "--length-2", + syntax: "foo | + | | # | auto", + initialValue: "100vw", + inherits: true +}); +CSS.registerProperty({ + name: "--length-3", + syntax: "*", + inherits: false +}); +CSS.registerProperty({ + name: "--length-4", + syntax: "*", + initialValue: "", + inherits: false +}); + // The order isn't guaranteed, so sort variable by their name. // We get a Proxy, so build another array to properly sort it. const results = Array.from(InspectorUtils.getCSSRegisteredProperties(document)); results.sort((a,b) => a.name < b.name ? -1 : 1) -const TEST_FOLDER = "http://mochi.test:8888/tests/layout/inspector/tests/"; -const TEST_URL = TEST_FOLDER + "test_getRegisteredCustomProperties.html"; -const CSS_TEST_FILE_URL = TEST_FOLDER + "at_property.css"; - Assert.deepEqual( results, [{ @@ -58,54 +66,36 @@ Assert.deepEqual( inherits: true, initialValue: "blue", fromJS: false, - uri :TEST_URL, - line: 1, - column: 5, },{ name: "--color-2", syntax: "*", inherits: false, initialValue: null, fromJS: false, - uri :CSS_TEST_FILE_URL, - line: 0, - column: 1, },{ name: "--length-1", syntax: "", inherits: true, initialValue: "10px", fromJS: true, - uri :TEST_URL, - line: 0, - column: 0, }, { name: "--length-2", syntax: "foo | + | | # | auto", inherits: true, initialValue: "100vw", fromJS: true, - uri :TEST_URL, - line: 0, - column: 0, }, { name: "--length-3", syntax: "*", inherits: false, initialValue: null, fromJS: true, - uri :TEST_URL, - line: 0, - column: 0, }, { name: "--length-4", syntax: "*", inherits: false, initialValue: "", fromJS: true, - uri :TEST_URL, - line: 0, - column: 0, }], `Got registered CSS properties` ); diff --git a/servo/ports/geckolib/glue.rs b/servo/ports/geckolib/glue.rs index 10992df68921..a6c4ef126257 100644 --- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -8837,9 +8837,6 @@ pub struct PropDef { pub initial_value: nsCString, // True if the property was set with CSS.registerProperty pub from_js: bool, - pub url_data: *mut URLExtraData, - pub line: u32, - pub column: u32, } impl PropDef { @@ -8865,9 +8862,6 @@ impl PropDef { has_initial_value: property_registration.data.initial_value.is_some(), initial_value, from_js, - url_data: property_registration.url_data.ptr(), - line: property_registration.source_location.line, - column: property_registration.source_location.column, } } }