summaryrefslogtreecommitdiffstats
path: root/layout/inspector/InspectorUtils.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /layout/inspector/InspectorUtils.cpp
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/inspector/InspectorUtils.cpp')
-rw-r--r--layout/inspector/InspectorUtils.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/layout/inspector/InspectorUtils.cpp b/layout/inspector/InspectorUtils.cpp
index f1886a0dd0..d174c16424 100644
--- a/layout/inspector/InspectorUtils.cpp
+++ b/layout/inspector/InspectorUtils.cpp
@@ -415,6 +415,7 @@ static uint32_t CollectAtRules(ServoCSSRuleList& aRuleList,
case StyleCssRuleType::Media:
case StyleCssRuleType::Supports:
case StyleCssRuleType::LayerBlock:
+ case StyleCssRuleType::Property:
case StyleCssRuleType::Container: {
Unused << aResult.AppendElement(OwningNonNull(*rule), fallible);
break;
@@ -425,7 +426,6 @@ static uint32_t CollectAtRules(ServoCSSRuleList& aRuleList,
case StyleCssRuleType::LayerStatement:
case StyleCssRuleType::FontFace:
case StyleCssRuleType::Page:
- case StyleCssRuleType::Property:
case StyleCssRuleType::Keyframes:
case StyleCssRuleType::Keyframe:
case StyleCssRuleType::Margin:
@@ -433,6 +433,8 @@ static uint32_t CollectAtRules(ServoCSSRuleList& aRuleList,
case StyleCssRuleType::CounterStyle:
case StyleCssRuleType::FontFeatureValues:
case StyleCssRuleType::FontPaletteValues:
+ case StyleCssRuleType::Scope:
+ case StyleCssRuleType::StartingStyle:
break;
}
@@ -1000,22 +1002,19 @@ void InspectorUtils::GetCSSRegisteredProperties(
}
/* static */
-void InspectorUtils::GetRuleBodyTextOffsets(
- GlobalObject&, const nsACString& aInitialText,
- Nullable<InspectorGetRuleBodyTextResult>& aResult) {
- uint32_t resultStartOffset;
- uint32_t resultEndOffset;
-
- if (!Servo_GetRuleBodyTextOffsets(&aInitialText, &resultStartOffset,
- &resultEndOffset)) {
- aResult.SetNull();
- return;
- }
-
- InspectorGetRuleBodyTextResult& offsets = aResult.SetValue();
- offsets.mStartOffset = resultStartOffset;
- offsets.mEndOffset = resultEndOffset;
+void InspectorUtils::GetRuleBodyText(GlobalObject&,
+ const nsACString& aInitialText,
+ nsACString& aBodyText) {
+ Servo_GetRuleBodyText(&aInitialText, &aBodyText);
}
+/* static */
+void InspectorUtils::ReplaceBlockRuleBodyTextInStylesheet(
+ GlobalObject&, const nsACString& aStyleSheetText, uint32_t aLine,
+ uint32_t aColumn, const nsACString& aNewBodyText,
+ nsACString& aNewStyleSheetText) {
+ Servo_ReplaceBlockRuleBodyTextInStylesheetText(
+ &aStyleSheetText, aLine, aColumn, &aNewBodyText, &aNewStyleSheetText);
+}
} // namespace dom
} // namespace mozilla