diff --git a/xml/xml-psi-api/resources/messages/XmlPsiBundle.properties b/xml/xml-psi-api/resources/messages/XmlPsiBundle.properties
index 77b87444b8ce..2943c72001f9 100644
--- a/xml/xml-psi-api/resources/messages/XmlPsiBundle.properties
+++ b/xml/xml-psi-api/resources/messages/XmlPsiBundle.properties
@@ -49,50 +49,4 @@ element.is.not.closed=Element is not closed
# suppress inspection "UnusedProperty"
rename.start.tag.name.intention=Rename start tag ''{0}'' to ''{1}''
# suppress inspection "UnusedProperty"
-rename.end.tag.name.intention=Rename end tag ''{0}'' to ''{1}''
-
-# Dynamic usage in MdnSymbolDocumentationAdapter
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.browser_compatibility=Supported by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.flex_context=Supported in
Flex context by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.grid_context=Supported in
Grid context by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.multicol_context=Supported in
Multi-column Layout by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.paged_context=Supported in
Paged Media by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.supported_in_grid_layout="Supported in
Grid Layout by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.support_of_multi-keyword_values=Multiple values
supported by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.supported_for_width_and_other_sizing_properties=Sizing properties
supported by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.support_of_ruby_values=ruby-* supported by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.support_of_table_values=table-* supported by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.support_of_WOFF=WOFF supported by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.support_of_WOFF_2=WOFF 2 supported by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.2d_context=Supported in
2D context by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.3d_context=Supported in
3D context by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.bitmaprenderer_context=Supported inbitmaprenderer context by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.webgl2_context=Supported in
WebGL 2 context by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.webgl_context=Supported in
WebGL context by
-# suppress inspection "UnusedProperty"
-mdn.documentation.section.compat.webgpu_context=Supported in
Web GPU context by
-
-mdn.documentation.section.compat.support_of={0} supported by
-mdn.documentation.section.compat.supported_by.none=none
-mdn.documentation.section.parameters=Params
-mdn.documentation.section.returns=Returns
-mdn.documentation.section.throws=Throws
-mdn.documentation.section.syntax=Syntax
-mdn.documentation.section.values=Values
+rename.end.tag.name.intention=Rename end tag ''{0}'' to ''{1}''
\ No newline at end of file
diff --git a/xml/xml-psi-impl/mdn-doc-gen/intellij.documenation.mdn.gen.iml b/xml/xml-psi-impl/mdn-doc-gen/intellij.documenation.mdn.gen.iml
index 84ba3bcb1019..ffbea2b5380d 100644
--- a/xml/xml-psi-impl/mdn-doc-gen/intellij.documenation.mdn.gen.iml
+++ b/xml/xml-psi-impl/mdn-doc-gen/intellij.documenation.mdn.gen.iml
@@ -17,10 +17,15 @@
See [a-z0-9_\\-]+\\.
\\s+"), "
") .replace(Regex("(^
\\s*)|(\\s*
)|(\\s*{0} supported by
+mdn.documentation.section.compat.supported_by.none=none
+mdn.documentation.section.parameters=Params
+mdn.documentation.section.returns=Returns
+mdn.documentation.section.throws=Throws
+mdn.documentation.section.syntax=Syntax
+mdn.documentation.section.values=Values
+
+# Dynamic usage in MdnSymbolDocumentationAdapter
+mdn.documentation.section.compat.browser_compatibility=Supported by
+mdn.documentation.section.compat.flex_context=Supported inbitmaprenderer context by
+mdn.documentation.section.compat.webgl2_context=Supported inWOFF supported by
+mdn.documentation.section.compat.support_of_WOFF_2=WOFF 2 supported by
+mdn.documentation.section.compat.support_of_dialog_elements=beforetoggle event fires at dialog elements
+mdn.documentation.section.compat.support_of_details_elements=toggle event fires at details elements
+mdn.documentation.section.compat.support_of_-webkit-scrollbar=::-webkit-scrollbar
+mdn.documentation.section.compat.support_of_-webkit-scrollbar-button=::-webkit-scrollbar-button
+mdn.documentation.section.compat.support_of_-webkit-scrollbar-thumb=::-webkit-scrollbar-thumb
+mdn.documentation.section.compat.support_of_-webkit-scrollbar-track=::-webkit-scrollbar-track
+mdn.documentation.section.compat.support_of_-webkit-scrollbar-track-piece=::-webkit-scrollbar-track-piece
+mdn.documentation.section.compat.support_of_-webkit-scrollbar-corner=::-webkit-scrollbar-corner
+mdn.documentation.section.compat.support_of_-webkit-resizer=::-webkit-resizer
+mdn.documentation.section.compat.support_of_fit-content=fit-content()
+mdn.documentation.section.compat.support_of_fit-content_function=fit-content()
+mdn.documentation.section.compat.support_of_hsl=hsl() (HSL color model)
+mdn.documentation.section.compat.support_of_hwb=hwb() (HWB color model)
+mdn.documentation.section.compat.support_of_lch=lch() (LCH color model)
+mdn.documentation.section.compat.support_of_oklch=oklch() (OKLCH color model)
\ No newline at end of file
diff --git a/xml/xml-psi-impl/src/com/intellij/documentation/mdn/MdnBundle.java b/xml/xml-psi-impl/src/com/intellij/documentation/mdn/MdnBundle.java
new file mode 100644
index 000000000000..2991822a6e93
--- /dev/null
+++ b/xml/xml-psi-impl/src/com/intellij/documentation/mdn/MdnBundle.java
@@ -0,0 +1,30 @@
+// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
+package com.intellij.documentation.mdn;
+
+import com.intellij.DynamicBundle;
+import org.jetbrains.annotations.Nls;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.PropertyKey;
+
+import java.util.function.Supplier;
+
+public final class MdnBundle {
+ private static final @NonNls String BUNDLE = "messages.MdnBundle";
+ private static final DynamicBundle INSTANCE = new DynamicBundle(MdnBundle.class, BUNDLE);
+
+ private MdnBundle() {
+ }
+
+ public static @NotNull @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
+ return INSTANCE.getMessage(key, params);
+ }
+
+ public static @NotNull Supplier<@Nls String> messagePointer(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
+ return INSTANCE.getLazyMessage(key, params);
+ }
+
+ public static boolean hasKey(String key) {
+ return INSTANCE.containsKey(key);
+ }
+}
diff --git a/xml/xml-psi-impl/src/com/intellij/documentation/mdn/MdnDocumentation.kt b/xml/xml-psi-impl/src/com/intellij/documentation/mdn/MdnDocumentation.kt
index 860c1931f6b3..9bcd98f6d7c6 100644
--- a/xml/xml-psi-impl/src/com/intellij/documentation/mdn/MdnDocumentation.kt
+++ b/xml/xml-psi-impl/src/com/intellij/documentation/mdn/MdnDocumentation.kt
@@ -26,7 +26,6 @@ import com.intellij.psi.xml.*
import com.intellij.util.asSafely
import com.intellij.webSymbols.WebSymbolApiStatus
import com.intellij.webSymbols.WebSymbolsBundle
-import com.intellij.xml.psi.XmlPsiBundle
import com.intellij.xml.util.HtmlUtil
import org.jetbrains.annotations.Nls
import java.util.*
@@ -225,15 +224,15 @@ class MdnSymbolDocumentationAdapter(override val name: String,
doc.compatibility!!.entries.forEach { (id, map) ->
val actualId = if (id == defaultBcdContext) "browser_compatibility" else id
val bundleKey = "mdn.documentation.section.compat.$actualId"
- val sectionName: String = if (actualId.startsWith("support_of_") && !XmlPsiBundle.hasKey(bundleKey)) {
- XmlPsiBundle.message("mdn.documentation.section.compat.support_of", actualId.substring("support_of_".length))
+ val sectionName: String = if (actualId.startsWith("support_of_") && !MdnBundle.hasKey(bundleKey)) {
+ MdnBundle.message("mdn.documentation.section.compat.support_of", actualId.substring("support_of_".length))
}
else {
- XmlPsiBundle.message(bundleKey)
+ MdnBundle.message(bundleKey)
}
result[sectionName] = map.entries
.joinToString(", ") { it.key.displayName + (if (it.value.isNotEmpty()) " " + it.value else "") }
- .ifBlank { XmlPsiBundle.message("mdn.documentation.section.compat.supported_by.none") }
+ .ifBlank { MdnBundle.message("mdn.documentation.section.compat.supported_by.none") }
}
}
doc.status?.asSequence()
@@ -329,11 +328,11 @@ data class MdnJsSymbolDocumentation(override val url: String?,
get() {
val result = mutableMapOf$it")
+ result.put(MdnBundle.message("mdn.documentation.section.syntax"), "$it")
}
return result
}
@@ -366,7 +365,7 @@ data class MdnCssAtRuleSymbolDocumentation(override val url: String?,
get() {
val result = mutableMapOf$it")
+ result.put(MdnBundle.message("mdn.documentation.section.syntax"), "$it")
}
return result
}
@@ -383,10 +382,10 @@ data class MdnCssPropertySymbolDocumentation(override val url: String?,
get() {
val result = mutableMapOf$it")
+ result.put(MdnBundle.message("mdn.documentation.section.syntax"), "$it")
}
values?.takeIf { it.isNotEmpty() }?.let {
- result.put(XmlPsiBundle.message("mdn.documentation.section.values"), buildSubSection(values))
+ result.put(MdnBundle.message("mdn.documentation.section.values"), buildSubSection(values))
}
return result
}