mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
WEB-61632 WEB-61853 WebSymbols: add Obsolete API status; MDN: set obsolete symbols API status to obsolete.
GitOrigin-RevId: 5fd6970549cb591951c55331d9275ef519736f9c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f0cdf9cd61
commit
36a13f562e
@@ -28,6 +28,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
"since",
|
||||
"deprecated",
|
||||
"deprecated-since",
|
||||
"obsolete",
|
||||
"obsolete-since",
|
||||
"experimental",
|
||||
"priority",
|
||||
"proximity",
|
||||
@@ -89,11 +91,11 @@ public abstract class BaseContribution implements GenericContributionsHost
|
||||
@JsonPropertyDescription("Version since this symbol is available.")
|
||||
private String since;
|
||||
/**
|
||||
* Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.
|
||||
* Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("deprecated")
|
||||
@JsonPropertyDescription("Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.")
|
||||
@JsonPropertyDescription("Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.")
|
||||
private Deprecated deprecated = null;
|
||||
/**
|
||||
* Version in which this symbol was first deprecated.
|
||||
@@ -102,6 +104,20 @@ public abstract class BaseContribution implements GenericContributionsHost
|
||||
@JsonProperty("deprecated-since")
|
||||
@JsonPropertyDescription("Version in which this symbol was first deprecated.")
|
||||
private String deprecatedSince;
|
||||
/**
|
||||
* Specifies whether the symbol is obsolete. Obsolete symbols are no longer supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("obsolete")
|
||||
@JsonPropertyDescription("Specifies whether the symbol is obsolete. Obsolete symbols are no longer supported. Value can be a boolean or a string message with explanation and migration information.")
|
||||
private Obsolete obsolete = null;
|
||||
/**
|
||||
* Version in which this symbol was first made obsolete.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("obsolete-since")
|
||||
@JsonPropertyDescription("Version in which this symbol was first made obsolete.")
|
||||
private String obsoleteSince;
|
||||
/**
|
||||
* Specifies whether the symbol is experimental. Value can be a boolean or a string message with explanation. Experimental symbols should be used with caution as the API might change.
|
||||
*
|
||||
@@ -292,7 +308,7 @@ public abstract class BaseContribution implements GenericContributionsHost
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.
|
||||
* Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("deprecated")
|
||||
@@ -301,7 +317,7 @@ public abstract class BaseContribution implements GenericContributionsHost
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.
|
||||
* Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("deprecated")
|
||||
@@ -327,6 +343,42 @@ public abstract class BaseContribution implements GenericContributionsHost
|
||||
this.deprecatedSince = deprecatedSince;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the symbol is obsolete. Obsolete symbols are no longer supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("obsolete")
|
||||
public Obsolete getObsolete() {
|
||||
return obsolete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the symbol is obsolete. Obsolete symbols are no longer supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("obsolete")
|
||||
public void setObsolete(Obsolete obsolete) {
|
||||
this.obsolete = obsolete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Version in which this symbol was first made obsolete.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("obsolete-since")
|
||||
public String getObsoleteSince() {
|
||||
return obsoleteSince;
|
||||
}
|
||||
|
||||
/**
|
||||
* Version in which this symbol was first made obsolete.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("obsolete-since")
|
||||
public void setObsoleteSince(String obsoleteSince) {
|
||||
this.obsoleteSince = obsoleteSince;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the symbol is experimental. Value can be a boolean or a string message with explanation. Experimental symbols should be used with caution as the API might change.
|
||||
*
|
||||
|
||||
@@ -43,11 +43,11 @@ public class NamePatternDefault
|
||||
@JsonPropertyDescription("A reference to an element in Web-Types model.")
|
||||
private Reference delegate;
|
||||
/**
|
||||
* Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.
|
||||
* Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("deprecated")
|
||||
@JsonPropertyDescription("Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.")
|
||||
@JsonPropertyDescription("Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.")
|
||||
private Deprecated deprecated = null;
|
||||
@JsonProperty("priority")
|
||||
private com.intellij.webSymbols.webTypes.json.BaseContribution.Priority priority;
|
||||
@@ -130,7 +130,7 @@ public class NamePatternDefault
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.
|
||||
* Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("deprecated")
|
||||
@@ -139,7 +139,7 @@ public class NamePatternDefault
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.
|
||||
* Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.
|
||||
*
|
||||
*/
|
||||
@JsonProperty("deprecated")
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.webSymbols.webTypes.json;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
||||
@JsonDeserialize(using = Obsolete.MyDeserializer.class)
|
||||
public class Obsolete {
|
||||
|
||||
/**
|
||||
* Type: {@code Boolean | String}
|
||||
*
|
||||
*/
|
||||
private Object value;
|
||||
|
||||
/**
|
||||
* Type: {@code Boolean | String}
|
||||
*
|
||||
*/
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type: {@code Boolean | String}
|
||||
*
|
||||
*/
|
||||
public void setValue(Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static class MyDeserializer
|
||||
extends JsonDeserializer<Obsolete>
|
||||
{
|
||||
|
||||
|
||||
@Override
|
||||
public Obsolete deserialize(JsonParser parser, DeserializationContext deserializationContext)
|
||||
throws IOException
|
||||
{
|
||||
Obsolete result = new Obsolete();
|
||||
JsonToken token = parser.currentToken();
|
||||
if ((token == JsonToken.VALUE_TRUE)||(token == JsonToken.VALUE_FALSE)) {
|
||||
result.value = parser.readValueAs(Boolean.class);
|
||||
} else {
|
||||
if (token == JsonToken.VALUE_STRING) {
|
||||
result.value = parser.readValueAs(String.class);
|
||||
} else {
|
||||
deserializationContext.handleUnexpectedToken(Object.class, parser);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,11 +8,15 @@ web.inspection.message.segment.default-subject=name
|
||||
web.inspection.message.deprecated.symbol.explanation=consult docs for better alternative
|
||||
web.inspection.message.deprecated.symbol.since=#ref is deprecated since {0},
|
||||
web.inspection.message.deprecated.symbol.message=#ref is deprecated,
|
||||
web.inspection.message.obsolete.symbol.since=#ref is obsolete since {0},
|
||||
web.inspection.message.obsolete.symbol.message=#ref is obsolete,
|
||||
|
||||
mdn.documentation.section.status.Since=Since
|
||||
mdn.documentation.section.status.DeprecatedSince=Deprecated since
|
||||
mdn.documentation.section.status.ObsoleteSince=Obsolete since
|
||||
mdn.documentation.section.status.Experimental=Experimental
|
||||
mdn.documentation.section.status.Deprecated=Deprecated
|
||||
mdn.documentation.section.status.Obsolete=Obsolete
|
||||
mdn.documentation.section.isRequired=Required
|
||||
mdn.documentation.section.defaultValue=Default
|
||||
mdn.documentation.section.library=Library
|
||||
|
||||
@@ -129,9 +129,10 @@ interface WebSymbol : WebSymbolsScope, Symbol, NavigatableSymbol {
|
||||
|
||||
/**
|
||||
* Documents API status of the symbol. It is one of the sub-interfaces of [WebSymbolApiStatus]:
|
||||
* [WebSymbolApiStatus.Stable], [WebSymbolApiStatus.Experimental] or [WebSymbolApiStatus.Deprecated].
|
||||
* [WebSymbolApiStatus.Stable], [WebSymbolApiStatus.Experimental], [WebSymbolApiStatus.Deprecated]
|
||||
* or [WebSymbolApiStatus.Obsolete].
|
||||
*
|
||||
* Deprecated symbols are appropriately highlighted in the code editor, code completion and
|
||||
* Deprecated and obsolete symbols are appropriately highlighted in the code editor, code completion and
|
||||
* quick documentation.
|
||||
*/
|
||||
val apiStatus: WebSymbolApiStatus
|
||||
|
||||
@@ -5,13 +5,26 @@ import org.jetbrains.annotations.Nls
|
||||
|
||||
sealed interface WebSymbolApiStatus {
|
||||
|
||||
/**
|
||||
* Version of the library, in which the symbol API status was updated
|
||||
*/
|
||||
val since: @Nls String?
|
||||
|
||||
/**
|
||||
* Stable symbols are not expected to change in backward incompatible way
|
||||
* and are fit for production code.
|
||||
*/
|
||||
interface Stable : WebSymbolApiStatus {
|
||||
/**
|
||||
* Version of the library, in which the stable symbol was first available
|
||||
*/
|
||||
val since: @Nls String? get() = null
|
||||
override val since: @Nls String? get() = null
|
||||
}
|
||||
|
||||
/**
|
||||
* Usage of deprecated symbols is discouraged, but such symbols are still supported.
|
||||
* Usages of deprecated symbols should be migrated as soon as possible.
|
||||
*/
|
||||
interface Deprecated : WebSymbolApiStatus {
|
||||
/**
|
||||
* Message with HTML markup
|
||||
@@ -21,9 +34,29 @@ sealed interface WebSymbolApiStatus {
|
||||
/**
|
||||
* Version of the library, in which symbol was first deprecated
|
||||
*/
|
||||
val since: @Nls String? get() = null
|
||||
override val since: @Nls String? get() = null
|
||||
}
|
||||
|
||||
/**
|
||||
* Obsolete symbols are no longer supported.
|
||||
* Such symbols should not be used at all.
|
||||
*/
|
||||
interface Obsolete : WebSymbolApiStatus {
|
||||
/**
|
||||
* Message with HTML markup
|
||||
*/
|
||||
val message: @Nls String? get() = null
|
||||
|
||||
/**
|
||||
* Version of the library, in which symbol was first deprecated
|
||||
*/
|
||||
override val since: @Nls String? get() = null
|
||||
}
|
||||
|
||||
/**
|
||||
* Experimental symbols are expected to be changed, or even removed.
|
||||
* Such symbols should not be used in production code.
|
||||
*/
|
||||
interface Experimental : WebSymbolApiStatus {
|
||||
/**
|
||||
* Message with HTML markup
|
||||
@@ -33,23 +66,31 @@ sealed interface WebSymbolApiStatus {
|
||||
/**
|
||||
* Version of the library, in which the experimental symbol was first available
|
||||
*/
|
||||
val since: @Nls String? get() = null
|
||||
override val since: @Nls String? get() = null
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmField
|
||||
val Stable: Stable = object : Stable {}
|
||||
|
||||
@JvmField
|
||||
val Experimental: Experimental = object : Experimental {}
|
||||
|
||||
@JvmField
|
||||
val Deprecated: Deprecated = object : Deprecated {}
|
||||
|
||||
@JvmField
|
||||
val Obsolete: Obsolete = object : Obsolete {}
|
||||
|
||||
@JvmStatic
|
||||
fun Stable(since: @Nls String? = null): Stable =
|
||||
object : Stable {
|
||||
override val since: String?
|
||||
get() = since
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun Experimental(message: @Nls String? = null, since: @Nls String? = null): Experimental =
|
||||
object : Experimental {
|
||||
override val message: String?
|
||||
@@ -58,6 +99,7 @@ sealed interface WebSymbolApiStatus {
|
||||
get() = since
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun Deprecated(message: @Nls String? = null, since: @Nls String? = null): Deprecated =
|
||||
object : Deprecated {
|
||||
override val message: String?
|
||||
@@ -65,5 +107,27 @@ sealed interface WebSymbolApiStatus {
|
||||
override val since: String?
|
||||
get() = since
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun Obsolete(message: @Nls String? = null, since: @Nls String? = null): Obsolete =
|
||||
object : Obsolete {
|
||||
override val message: String?
|
||||
get() = message
|
||||
override val since: String?
|
||||
get() = since
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun WebSymbolApiStatus?.isDeprecatedOrObsolete(): Boolean =
|
||||
this is Deprecated || this is Obsolete
|
||||
|
||||
fun WebSymbolApiStatus.getMessage(): @Nls String? =
|
||||
when (this) {
|
||||
is Deprecated -> message
|
||||
is Experimental -> message
|
||||
is Obsolete -> message
|
||||
is Stable -> null
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -34,8 +34,7 @@ interface WebSymbolCodeCompletionItem {
|
||||
val priority: WebSymbol.Priority?
|
||||
val proximity: Int?
|
||||
|
||||
@get:JvmName("isDeprecated")
|
||||
val deprecated: Boolean
|
||||
val apiStatus: WebSymbolApiStatus
|
||||
val aliases: Set<String>
|
||||
val symbol: WebSymbol?
|
||||
val insertHandler: WebSymbolCodeCompletionItemInsertHandler?
|
||||
@@ -60,7 +59,7 @@ interface WebSymbolCodeCompletionItem {
|
||||
|
||||
fun withProximity(proximity: Int): WebSymbolCodeCompletionItem
|
||||
|
||||
fun withDeprecated(deprecated: Boolean): WebSymbolCodeCompletionItem
|
||||
fun withApiStatus(apiStatus: WebSymbolApiStatus): WebSymbolCodeCompletionItem
|
||||
|
||||
fun withAliasesReplaced(aliases: Set<String>): WebSymbolCodeCompletionItem
|
||||
|
||||
@@ -93,7 +92,7 @@ interface WebSymbolCodeCompletionItem {
|
||||
symbol: WebSymbol? = this.symbol,
|
||||
priority: WebSymbol.Priority? = this.priority,
|
||||
proximity: Int? = this.proximity,
|
||||
deprecated: Boolean = this.deprecated,
|
||||
apiStatus: WebSymbolApiStatus = this.apiStatus,
|
||||
icon: Icon? = this.icon,
|
||||
typeText: String? = this.typeText,
|
||||
tailText: String? = this.tailText): WebSymbolCodeCompletionItem
|
||||
@@ -108,7 +107,7 @@ interface WebSymbolCodeCompletionItem {
|
||||
symbol: WebSymbol? = null,
|
||||
priority: WebSymbol.Priority? = symbol?.priority,
|
||||
proximity: Int? = symbol?.proximity,
|
||||
deprecated: Boolean = symbol?.apiStatus is WebSymbolApiStatus.Deprecated,
|
||||
apiStatus: WebSymbolApiStatus = symbol?.apiStatus ?: WebSymbolApiStatus.Stable,
|
||||
aliases: Set<String> = emptySet(),
|
||||
icon: Icon? = symbol?.let {
|
||||
it.icon
|
||||
@@ -120,7 +119,7 @@ interface WebSymbolCodeCompletionItem {
|
||||
insertHandler: WebSymbolCodeCompletionItemInsertHandler? = null): WebSymbolCodeCompletionItem =
|
||||
WebSymbolCodeCompletionItemImpl(name, offset, completeAfterInsert, if (!completeAfterInsert) completeAfterChars else emptySet(),
|
||||
displayName, symbol, priority, proximity,
|
||||
deprecated, aliases, icon, typeText, tailText, insertHandler)
|
||||
apiStatus, aliases, icon, typeText, tailText, insertHandler)
|
||||
|
||||
@JvmStatic
|
||||
fun getPsiElement(lookupElement: LookupElement): PsiElement? =
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.intellij.codeInsight.lookup.LookupElement
|
||||
import com.intellij.codeInsight.lookup.LookupElementBuilder
|
||||
import com.intellij.webSymbols.PsiSourcedWebSymbol
|
||||
import com.intellij.webSymbols.WebSymbol
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus.Companion.isDeprecatedOrObsolete
|
||||
import com.intellij.webSymbols.completion.WebSymbolCodeCompletionItem
|
||||
import com.intellij.webSymbols.completion.WebSymbolCodeCompletionItemInsertHandler
|
||||
import com.intellij.webSymbols.impl.scaleToHeight
|
||||
@@ -21,7 +23,7 @@ internal data class WebSymbolCodeCompletionItemImpl(override val name: String,
|
||||
override val symbol: WebSymbol? = null,
|
||||
override val priority: WebSymbol.Priority? = null,
|
||||
override val proximity: Int? = null,
|
||||
override val deprecated: Boolean = false,
|
||||
override val apiStatus: WebSymbolApiStatus = WebSymbolApiStatus.Stable,
|
||||
override val aliases: Set<String> = emptySet(),
|
||||
override val icon: Icon? = null,
|
||||
override val typeText: String? = null,
|
||||
@@ -39,14 +41,15 @@ internal data class WebSymbolCodeCompletionItemImpl(override val name: String,
|
||||
completionPrefix.substring(offset) == name)
|
||||
return
|
||||
val priorityOffset = baselinePriorityValue - WebSymbol.Priority.NORMAL.value
|
||||
val deprecatedOrObsolete = apiStatus.isDeprecatedOrObsolete()
|
||||
LookupElementBuilder
|
||||
.create(wrapSymbolForDocumentation(symbol)?.createPointer() ?: name, name)
|
||||
.withLookupStrings(aliases)
|
||||
.withIcon(icon?.scaleToHeight(16))
|
||||
.withTypeText(typeText, true)
|
||||
.withTailText(tailText, true)
|
||||
.withBoldness(!deprecated && priority == WebSymbol.Priority.HIGHEST)
|
||||
.withStrikeoutness(deprecated)
|
||||
.withBoldness(!deprecatedOrObsolete && priority == WebSymbol.Priority.HIGHEST)
|
||||
.withStrikeoutness(deprecatedOrObsolete)
|
||||
.let {
|
||||
if (displayName != null)
|
||||
it.withPresentableText(displayName)
|
||||
@@ -66,7 +69,7 @@ internal data class WebSymbolCodeCompletionItemImpl(override val name: String,
|
||||
it.withAutoCompletionPolicy(AutoCompletionPolicy.NEVER_AUTOCOMPLETE)
|
||||
else it
|
||||
}.let {
|
||||
val priorityValue = if (deprecated) WebSymbol.Priority.LOWEST.value
|
||||
val priorityValue = if (deprecatedOrObsolete) WebSymbol.Priority.LOWEST.value
|
||||
else (priority ?: WebSymbol.Priority.NORMAL).value + priorityOffset
|
||||
PrioritizedLookupElement.withPriority(it, priorityValue)
|
||||
}.let {
|
||||
@@ -77,7 +80,7 @@ internal data class WebSymbolCodeCompletionItemImpl(override val name: String,
|
||||
}
|
||||
}
|
||||
|
||||
private fun wrapSymbolForDocumentation(symbol: WebSymbol?)=
|
||||
private fun wrapSymbolForDocumentation(symbol: WebSymbol?) =
|
||||
when (symbol) {
|
||||
is PsiSourcedWebSymbol -> PsiSourcedCodeCompletionWebSymbolWithDocumentation(symbol)
|
||||
is WebSymbol -> CodeCompletionWebSymbolWithDocumentation(symbol)
|
||||
@@ -116,8 +119,8 @@ internal data class WebSymbolCodeCompletionItemImpl(override val name: String,
|
||||
override fun withProximity(proximity: Int): WebSymbolCodeCompletionItem =
|
||||
copy(proximity = proximity)
|
||||
|
||||
override fun withDeprecated(deprecated: Boolean): WebSymbolCodeCompletionItem =
|
||||
copy(deprecated = deprecated)
|
||||
override fun withApiStatus(apiStatus: WebSymbolApiStatus): WebSymbolCodeCompletionItem =
|
||||
copy(apiStatus = apiStatus)
|
||||
|
||||
override fun withAliasesReplaced(aliases: Set<String>): WebSymbolCodeCompletionItem =
|
||||
copy(aliases = aliases)
|
||||
@@ -161,13 +164,13 @@ internal data class WebSymbolCodeCompletionItemImpl(override val name: String,
|
||||
symbol: WebSymbol?,
|
||||
priority: WebSymbol.Priority?,
|
||||
proximity: Int?,
|
||||
deprecated: Boolean,
|
||||
apiStatus: WebSymbolApiStatus,
|
||||
icon: Icon?,
|
||||
typeText: String?,
|
||||
tailText: String?): WebSymbolCodeCompletionItem =
|
||||
copy(name = name, offset = offset, completeAfterInsert = completeAfterInsert,
|
||||
completeAfterChars = if (!completeAfterInsert) completeAfterChars else emptySet(),
|
||||
displayName = displayName, symbol = symbol, priority = priority, proximity = proximity,
|
||||
deprecated = deprecated, icon = icon, typeText = typeText, tailText = tailText)
|
||||
apiStatus = apiStatus, icon = icon, typeText = typeText, tailText = tailText)
|
||||
|
||||
}
|
||||
@@ -112,6 +112,10 @@ internal class WebSymbolDocumentationTargetImpl(override val symbol: WebSymbol,
|
||||
sections[WebSymbolsBundle.message("mdn.documentation.section.status.Deprecated")] = status.message ?: ""
|
||||
status.since?.let { sections[WebSymbolsBundle.message("mdn.documentation.section.status.DeprecatedSince")] = it }
|
||||
}
|
||||
is WebSymbolApiStatus.Obsolete -> {
|
||||
sections[WebSymbolsBundle.message("mdn.documentation.section.status.Obsolete")] = status.message ?: ""
|
||||
status.since?.let { sections[WebSymbolsBundle.message("mdn.documentation.section.status.ObsoleteSince")] = it }
|
||||
}
|
||||
is WebSymbolApiStatus.Experimental -> {
|
||||
sections[WebSymbolsBundle.message("mdn.documentation.section.status.Experimental")] = status.message ?: ""
|
||||
status.since?.let { sections[WebSymbolsBundle.message("mdn.documentation.section.status.Since")] = it }
|
||||
|
||||
@@ -185,6 +185,7 @@ internal class WebSymbolsInspectionsPass(private val file: PsiFile, document: Do
|
||||
get() =
|
||||
when (this) {
|
||||
ProblemKind.DeprecatedSymbol -> HighlightSeverity.WEAK_WARNING
|
||||
ProblemKind.ObsoleteSymbol -> HighlightSeverity.WARNING
|
||||
ProblemKind.UnknownSymbol -> HighlightSeverity.WARNING
|
||||
ProblemKind.MissingRequiredPart -> HighlightSeverity.WARNING
|
||||
ProblemKind.DuplicatedPart -> HighlightSeverity.WARNING
|
||||
@@ -198,6 +199,9 @@ internal class WebSymbolsInspectionsPass(private val file: PsiFile, document: Do
|
||||
ProblemKind.DeprecatedSymbol -> return WebSymbolsBundle.message("web.inspection.message.deprecated.symbol.message") +
|
||||
" " +
|
||||
WebSymbolsBundle.message("web.inspection.message.deprecated.symbol.explanation")
|
||||
ProblemKind.ObsoleteSymbol -> return WebSymbolsBundle.message("web.inspection.message.obsolete.symbol.message") +
|
||||
" " +
|
||||
WebSymbolsBundle.message("web.inspection.message.deprecated.symbol.explanation")
|
||||
ProblemKind.UnknownSymbol -> "web.inspection.message.segment.unrecognized-identifier"
|
||||
ProblemKind.MissingRequiredPart -> "web.inspection.message.segment.missing"
|
||||
ProblemKind.DuplicatedPart -> "web.inspection.message.segment.duplicated"
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.intellij.webSymbols.WebSymbolApiStatus
|
||||
|
||||
data class ComplexPatternOptions(
|
||||
val additionalScope: WebSymbol? = null,
|
||||
val deprecation: WebSymbolApiStatus.Deprecated? = null,
|
||||
val apiStatus: WebSymbolApiStatus? = null,
|
||||
val isRequired: Boolean = true,
|
||||
val priority: WebSymbol.Priority? = null,
|
||||
val proximity: Int? = null,
|
||||
|
||||
@@ -7,11 +7,13 @@ import com.intellij.util.containers.Stack
|
||||
import com.intellij.util.text.CharSequenceSubSequence
|
||||
import com.intellij.webSymbols.WebSymbol
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus.Companion.isDeprecatedOrObsolete
|
||||
import com.intellij.webSymbols.WebSymbolNameSegment
|
||||
import com.intellij.webSymbols.WebSymbolsScope
|
||||
import com.intellij.webSymbols.impl.selectBest
|
||||
import com.intellij.webSymbols.patterns.WebSymbolsPattern
|
||||
import com.intellij.webSymbols.patterns.WebSymbolsPatternSymbolsResolver
|
||||
import com.intellij.webSymbols.utils.coalesceWith
|
||||
import com.intellij.webSymbols.utils.isCritical
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
@@ -39,7 +41,7 @@ internal class ComplexPattern(private val configProvider: ComplexPatternConfigPr
|
||||
params: MatchParameters,
|
||||
start: Int,
|
||||
end: Int): List<MatchResult> =
|
||||
process(scopeStack, params) { patterns, newSymbolsResolver, deprecation,
|
||||
process(scopeStack, params) { patterns, newSymbolsResolver, apiStatus,
|
||||
isRequired, priority, proximity, repeats, unique ->
|
||||
performPatternMatch(params, start, end, patterns, repeats, unique, scopeStack, newSymbolsResolver)
|
||||
.let { matchResults ->
|
||||
@@ -72,8 +74,8 @@ internal class ComplexPattern(private val configProvider: ComplexPatternConfigPr
|
||||
}, { false })
|
||||
}
|
||||
.let { matchResults ->
|
||||
if (matchResults.isNotEmpty() && (deprecation != null || priority != null || proximity != null))
|
||||
matchResults.map { it.applyToSegments(apiStatus = deprecation, priority = priority, proximity = proximity) }
|
||||
if (matchResults.isNotEmpty() && (apiStatus.isDeprecatedOrObsolete() || priority != null || proximity != null))
|
||||
matchResults.map { it.applyToSegments(apiStatus = apiStatus, priority = priority, proximity = proximity) }
|
||||
else matchResults
|
||||
}
|
||||
.let { matchResults ->
|
||||
@@ -92,7 +94,7 @@ internal class ComplexPattern(private val configProvider: ComplexPatternConfigPr
|
||||
params: CompletionParameters,
|
||||
start: Int,
|
||||
end: Int): CompletionResults =
|
||||
process(scopeStack, params) { patterns, newSymbolsResolver, deprecation,
|
||||
process(scopeStack, params) { patterns, newSymbolsResolver, apiStatus,
|
||||
isRequired, priority, proximity, repeats, unique ->
|
||||
var staticPrefixes: Set<String> = emptySet()
|
||||
|
||||
@@ -129,7 +131,7 @@ internal class ComplexPattern(private val configProvider: ComplexPatternConfigPr
|
||||
item.with(
|
||||
priority = priority ?: item.priority,
|
||||
proximity = proximity?.let { (item.proximity ?: 0) + proximity } ?: item.proximity,
|
||||
deprecated = deprecation != null || item.deprecated,
|
||||
apiStatus = apiStatus.coalesceWith(item.apiStatus),
|
||||
symbol = item.symbol ?: defaultSource,
|
||||
completeAfterChars = (if (repeats) getStaticPrefixes().mapNotNull { it.getOrNull(0) }.toSet() else emptySet())
|
||||
+ item.completeAfterChars
|
||||
@@ -146,7 +148,7 @@ internal class ComplexPattern(private val configProvider: ComplexPatternConfigPr
|
||||
params: MatchParameters,
|
||||
action: (patterns: List<WebSymbolsPattern>,
|
||||
symbolsResolver: WebSymbolsPatternSymbolsResolver?,
|
||||
patternDeprecation: WebSymbolApiStatus.Deprecated?,
|
||||
patternApiStatus: WebSymbolApiStatus?,
|
||||
patternRequired: Boolean,
|
||||
patternPriority: WebSymbol.Priority?,
|
||||
patternProximity: Int?,
|
||||
@@ -159,7 +161,7 @@ internal class ComplexPattern(private val configProvider: ComplexPatternConfigPr
|
||||
scopeStack.push(additionalScope)
|
||||
}
|
||||
try {
|
||||
return action(patterns, options.symbolsResolver, options.deprecation, options.isRequired, options.priority,
|
||||
return action(patterns, options.symbolsResolver, options.apiStatus, options.isRequired, options.priority,
|
||||
options.proximity, options.repeats, options.unique)
|
||||
}
|
||||
finally {
|
||||
|
||||
@@ -4,13 +4,17 @@ package com.intellij.webSymbols.patterns.impl
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.util.containers.Stack
|
||||
import com.intellij.util.text.CharSequenceSubSequence
|
||||
import com.intellij.webSymbols.*
|
||||
import com.intellij.webSymbols.WebSymbol
|
||||
import com.intellij.webSymbols.WebSymbolNameSegment
|
||||
import com.intellij.webSymbols.WebSymbolOrigin
|
||||
import com.intellij.webSymbols.WebSymbolsScope
|
||||
import com.intellij.webSymbols.completion.WebSymbolCodeCompletionItem
|
||||
import com.intellij.webSymbols.completion.impl.CompoundInsertHandler
|
||||
import com.intellij.webSymbols.patterns.WebSymbolsPattern
|
||||
import com.intellij.webSymbols.patterns.WebSymbolsPatternSymbolsResolver
|
||||
import com.intellij.webSymbols.query.WebSymbolMatch
|
||||
import com.intellij.webSymbols.utils.asSingleSymbol
|
||||
import com.intellij.webSymbols.utils.coalesceWith
|
||||
import com.intellij.webSymbols.utils.nameSegments
|
||||
import com.intellij.webSymbols.utils.withOffset
|
||||
|
||||
@@ -342,7 +346,7 @@ internal class SequencePattern(private val patternsProvider: () -> List<WebSymbo
|
||||
symbol = symbol,
|
||||
proximity = proximity,
|
||||
priority = priority,
|
||||
deprecated = required.deprecated || new.deprecated,
|
||||
apiStatus = required.apiStatus.coalesceWith(new.apiStatus),
|
||||
icon = new.icon ?: required.icon
|
||||
)
|
||||
else
|
||||
@@ -355,7 +359,7 @@ internal class SequencePattern(private val patternsProvider: () -> List<WebSymbo
|
||||
symbol = symbol,
|
||||
proximity = proximity,
|
||||
priority = priority,
|
||||
deprecated = required.deprecated || new.deprecated,
|
||||
apiStatus = required.apiStatus.coalesceWith(new.apiStatus),
|
||||
icon = new.icon ?: required.icon,
|
||||
insertHandler = CompoundInsertHandler.merge(required.insertHandler, new.insertHandler)
|
||||
)
|
||||
|
||||
@@ -12,6 +12,7 @@ data class WebSymbolReferenceProblem(
|
||||
|
||||
enum class ProblemKind {
|
||||
DeprecatedSymbol,
|
||||
ObsoleteSymbol,
|
||||
UnknownSymbol,
|
||||
MissingRequiredPart,
|
||||
DuplicatedPart
|
||||
|
||||
@@ -16,15 +16,17 @@ import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.util.CachedValueProvider
|
||||
import com.intellij.psi.util.CachedValuesManager
|
||||
import com.intellij.psi.util.PsiModificationTracker
|
||||
import com.intellij.util.asSafely
|
||||
import com.intellij.util.containers.MultiMap
|
||||
import com.intellij.webSymbols.WebSymbol
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus.Companion.getMessage
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus.Companion.isDeprecatedOrObsolete
|
||||
import com.intellij.webSymbols.WebSymbolNameSegment
|
||||
import com.intellij.webSymbols.WebSymbolsBundle
|
||||
import com.intellij.webSymbols.inspections.WebSymbolsInspectionsPass.Companion.getDefaultProblemMessage
|
||||
import com.intellij.webSymbols.inspections.impl.WebSymbolsInspectionToolMappingEP
|
||||
import com.intellij.webSymbols.query.WebSymbolMatch
|
||||
import com.intellij.webSymbols.references.WebSymbolReferenceProblem.ProblemKind
|
||||
import com.intellij.webSymbols.utils.asSingleSymbol
|
||||
import com.intellij.webSymbols.utils.getProblemKind
|
||||
import com.intellij.webSymbols.utils.hasOnlyExtensions
|
||||
@@ -116,10 +118,11 @@ abstract class WebSymbolReferenceProvider<T : PsiExternalReferenceHost> : PsiSym
|
||||
.mapNotNull { (range, segments) ->
|
||||
val problemOnly = problemOnlyRanges[range] ?: false
|
||||
val deprecation = segments.mapNotNull mapSegments@{ segment ->
|
||||
segment.apiStatus.asSafely<WebSymbolApiStatus.Deprecated>()
|
||||
segment.apiStatus.takeIf { it.isDeprecatedOrObsolete() }
|
||||
?.let { return@mapSegments it }
|
||||
val declarations = segment.symbols.filter { !it.extension }
|
||||
declarations.mapNotNull { it.apiStatus as? WebSymbolApiStatus.Deprecated }
|
||||
declarations
|
||||
.mapNotNull { decl -> decl.apiStatus.takeIf { it.isDeprecatedOrObsolete() } }
|
||||
.takeIf { it.size == declarations.size }
|
||||
?.firstOrNull()
|
||||
}.takeIf { it.size == segments.size }?.firstOrNull()
|
||||
@@ -164,7 +167,7 @@ abstract class WebSymbolReferenceProvider<T : PsiExternalReferenceHost> : PsiSym
|
||||
private class NameSegmentReferenceWithProblem(element: PsiElement,
|
||||
rangeInElement: TextRange,
|
||||
nameSegments: Collection<WebSymbolNameSegment>,
|
||||
private val deprecation: WebSymbolApiStatus.Deprecated?,
|
||||
private val apiStatus: WebSymbolApiStatus?,
|
||||
private val problemOnly: Boolean)
|
||||
: NameSegmentReference(element, rangeInElement, nameSegments) {
|
||||
|
||||
@@ -191,28 +194,43 @@ abstract class WebSymbolReferenceProvider<T : PsiExternalReferenceHost> : PsiSym
|
||||
)
|
||||
)
|
||||
}.firstOrNull()
|
||||
val deprecationProblem = if (deprecation != null) {
|
||||
val deprecationProblem = if (apiStatus.isDeprecatedOrObsolete()) {
|
||||
val isDeprecated = apiStatus is WebSymbolApiStatus.Deprecated
|
||||
val symbolTypes = nameSegments.flatMapTo(LinkedHashSet()) { it.symbolKinds }
|
||||
val toolMapping = symbolTypes.map {
|
||||
WebSymbolsInspectionToolMappingEP.get(it.namespace, it.kind, WebSymbolReferenceProblem.ProblemKind.DeprecatedSymbol)
|
||||
if (apiStatus is WebSymbolApiStatus.Obsolete)
|
||||
WebSymbolsInspectionToolMappingEP.get(it.namespace, it.kind, ProblemKind.ObsoleteSymbol)
|
||||
?.let { mapping -> return@map mapping }
|
||||
WebSymbolsInspectionToolMappingEP.get(it.namespace, it.kind, ProblemKind.DeprecatedSymbol)
|
||||
}.firstOrNull()
|
||||
val cause = deprecation.message
|
||||
|
||||
val cause = apiStatus?.getMessage()
|
||||
?.takeIf { it.isNotBlank() }
|
||||
?.sanitizeHtmlOutputForProblemMessage()
|
||||
?: WebSymbolsBundle.message("web.inspection.message.deprecated.symbol.explanation")
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
val prefix = toolMapping?.getProblemMessage(null)?.trim()?.removeSuffix(".")?.let { if (!it.endsWith(",")) "$it," else it }
|
||||
?: deprecation.since?.let { WebSymbolsBundle.message("web.inspection.message.deprecated.symbol.since", it) }
|
||||
?: WebSymbolsBundle.message("web.inspection.message.deprecated.symbol.message")
|
||||
val prefix = toolMapping
|
||||
?.getProblemMessage(null)
|
||||
?.trim()
|
||||
?.removeSuffix(".")
|
||||
?.let { if (!it.endsWith(",")) "$it," else it }
|
||||
?: apiStatus?.since
|
||||
?.let {
|
||||
WebSymbolsBundle.message(if (isDeprecated) "web.inspection.message.deprecated.symbol.since"
|
||||
else "web.inspection.message.obsolete.symbol.since", it)
|
||||
}
|
||||
?: WebSymbolsBundle.message(if (isDeprecated) "web.inspection.message.deprecated.symbol.message"
|
||||
else "web.inspection.message.obsolete.symbol.message")
|
||||
|
||||
WebSymbolReferenceProblem(
|
||||
symbolTypes,
|
||||
WebSymbolReferenceProblem.ProblemKind.DeprecatedSymbol,
|
||||
if (isDeprecated) ProblemKind.DeprecatedSymbol else ProblemKind.ObsoleteSymbol,
|
||||
inspectionManager.createProblemDescriptor(
|
||||
element, rangeInElement,
|
||||
"$prefix ${StringUtil.decapitalize(cause)}",
|
||||
ProblemHighlightType.LIKE_DEPRECATED, true
|
||||
if (isDeprecated) ProblemHighlightType.LIKE_DEPRECATED else ProblemHighlightType.LIKE_MARKED_FOR_REMOVAL,
|
||||
true
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
@@ -231,12 +231,18 @@ fun List<WebSymbolNameSegment>.withOffset(offset: Int): List<WebSymbolNameSegmen
|
||||
fun WebSymbolApiStatus?.coalesceWith(other: WebSymbolApiStatus?): WebSymbolApiStatus =
|
||||
when (this) {
|
||||
null -> other ?: WebSymbolApiStatus.Stable
|
||||
is WebSymbolApiStatus.Deprecated -> this
|
||||
is WebSymbolApiStatus.Obsolete -> this
|
||||
is WebSymbolApiStatus.Deprecated -> when (other) {
|
||||
is WebSymbolApiStatus.Obsolete -> other
|
||||
else -> this
|
||||
}
|
||||
is WebSymbolApiStatus.Experimental -> when (other) {
|
||||
is WebSymbolApiStatus.Obsolete,
|
||||
is WebSymbolApiStatus.Deprecated -> other
|
||||
else -> this
|
||||
}
|
||||
is WebSymbolApiStatus.Stable -> when (other) {
|
||||
is WebSymbolApiStatus.Obsolete,
|
||||
is WebSymbolApiStatus.Deprecated,
|
||||
is WebSymbolApiStatus.Experimental -> other
|
||||
else -> this
|
||||
|
||||
@@ -289,7 +289,7 @@ abstract class WebTypesJsonContributionAdapter private constructor(protected val
|
||||
override val jsonPattern: NamePatternRoot? get() = null
|
||||
|
||||
override fun createPointer(): Pointer<Static> =
|
||||
object : WebTypesJsonContributionWrapperPointer<Static>(this) {
|
||||
object : WebTypesJsonContributionAdapterPointer<Static>(this) {
|
||||
override fun dereference(): Static? =
|
||||
rootScope.dereference()?.let {
|
||||
Static(contribution, jsonContext, cacheHolder, it, namespace, kind)
|
||||
@@ -316,7 +316,7 @@ abstract class WebTypesJsonContributionAdapter private constructor(protected val
|
||||
"$kind/${jsonPattern?.wrap("", jsonOrigin)?.getStaticPrefixes()?.toSet() ?: "[]"}... <pattern>"
|
||||
|
||||
override fun createPointer(): Pointer<Pattern> =
|
||||
object : WebTypesJsonContributionWrapperPointer<Pattern>(this) {
|
||||
object : WebTypesJsonContributionAdapterPointer<Pattern>(this) {
|
||||
|
||||
override fun dereference(): Pattern? =
|
||||
rootScope.dereference()?.let {
|
||||
@@ -346,7 +346,7 @@ abstract class WebTypesJsonContributionAdapter private constructor(protected val
|
||||
override val jsonPattern: NamePatternRoot? get() = null
|
||||
|
||||
override fun createPointer(): Pointer<LegacyVueDirective> =
|
||||
object : WebTypesJsonContributionWrapperPointer<LegacyVueDirective>(this) {
|
||||
object : WebTypesJsonContributionAdapterPointer<LegacyVueDirective>(this) {
|
||||
|
||||
override fun dereference(): LegacyVueDirective? =
|
||||
rootScope.dereference()?.let {
|
||||
@@ -381,7 +381,7 @@ abstract class WebTypesJsonContributionAdapter private constructor(protected val
|
||||
?: (contribution as HtmlElement).convertToComponentContribution().also { _contributionForQuery = it }
|
||||
|
||||
override fun createPointer(): Pointer<LegacyVueComponent> =
|
||||
object : WebTypesJsonContributionWrapperPointer<LegacyVueComponent>(this) {
|
||||
object : WebTypesJsonContributionAdapterPointer<LegacyVueComponent>(this) {
|
||||
|
||||
override fun dereference(): LegacyVueComponent? =
|
||||
rootScope.dereference()?.let {
|
||||
@@ -458,7 +458,7 @@ abstract class WebTypesJsonContributionAdapter private constructor(protected val
|
||||
}
|
||||
}
|
||||
|
||||
private abstract class WebTypesJsonContributionWrapperPointer<T : WebTypesJsonContributionAdapter>(wrapper: T) : Pointer<T> {
|
||||
private abstract class WebTypesJsonContributionAdapterPointer<T : WebTypesJsonContributionAdapter>(wrapper: T) : Pointer<T> {
|
||||
|
||||
val contribution = wrapper.contribution
|
||||
val jsonContext = wrapper.jsonOrigin
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.webSymbols.webTypes.impl
|
||||
|
||||
import com.intellij.util.asSafely
|
||||
import com.intellij.util.containers.Stack
|
||||
import com.intellij.webSymbols.WebSymbol
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus.Companion.isDeprecatedOrObsolete
|
||||
import com.intellij.webSymbols.WebSymbolQualifiedKind
|
||||
import com.intellij.webSymbols.WebSymbolsScope
|
||||
import com.intellij.webSymbols.completion.WebSymbolCodeCompletionItem
|
||||
@@ -81,8 +80,8 @@ private class WebTypesComplexPatternConfigProvider(private val pattern: NamePatt
|
||||
val delegate = pattern.delegate?.resolve(null, scopeStack, queryParams.queryExecutor)?.firstOrNull()
|
||||
|
||||
// Allow delegate pattern to override settings
|
||||
val deprecation = delegate?.apiStatus?.asSafely<WebSymbolApiStatus.Deprecated>()
|
||||
?: pattern.toApiStatus(origin)?.asSafely<WebSymbolApiStatus.Deprecated>()
|
||||
val apiStatus = delegate?.apiStatus?.takeIf { it.isDeprecatedOrObsolete() }
|
||||
?: pattern.toApiStatus(origin)?.takeIf { it.isDeprecatedOrObsolete() }
|
||||
val isRequired = (delegate?.required ?: pattern.required) != false
|
||||
val priority = delegate?.priority ?: pattern.priority?.wrap()
|
||||
val proximity = delegate?.proximity ?: pattern.proximity
|
||||
@@ -90,7 +89,7 @@ private class WebTypesComplexPatternConfigProvider(private val pattern: NamePatt
|
||||
val unique = pattern.unique != false
|
||||
|
||||
val symbolsResolver = createSymbolsResolver(delegate)
|
||||
return ComplexPatternOptions(delegate, deprecation, isRequired, priority, proximity, repeats, unique, symbolsResolver)
|
||||
return ComplexPatternOptions(delegate, apiStatus, isRequired, priority, proximity, repeats, unique, symbolsResolver)
|
||||
}
|
||||
|
||||
private fun createSymbolsResolver(delegate: WebSymbol?) =
|
||||
|
||||
@@ -491,7 +491,9 @@ private fun parseWebTypesPath(path: List<String>, context: WebSymbol?): List<Web
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
internal fun BaseContribution.toApiStatus(origin: WebTypesJsonOrigin): WebSymbolApiStatus =
|
||||
deprecated?.value?.takeIf { it != false }
|
||||
obsolete?.value?.takeIf { it != false }
|
||||
?.let { msg -> WebSymbolApiStatus.Obsolete((msg as? String)?.let { origin.renderDescription(it) }, obsoleteSince) }
|
||||
?: deprecated?.value?.takeIf { it != false }
|
||||
?.let { msg -> WebSymbolApiStatus.Deprecated((msg as? String)?.let { origin.renderDescription(it) }, deprecatedSince) }
|
||||
?: experimental?.value?.takeIf { it != false }
|
||||
?.let { msg -> WebSymbolApiStatus.Experimental((msg as? String)?.let { origin.renderDescription(it) }, since) }
|
||||
|
||||
@@ -111,6 +111,9 @@ open class WebSymbolsDebugOutputPrinter : DebugOutputPrinter() {
|
||||
is WebSymbolApiStatus.Deprecated -> append("deprecated")
|
||||
.applyIf(apiStatus.since != null) { append(" in ").append(apiStatus.since) }
|
||||
.applyIf(apiStatus.message != null) { append(" (").append(apiStatus.message).append(")") }
|
||||
is WebSymbolApiStatus.Obsolete -> append("obsolete")
|
||||
.applyIf(apiStatus.since != null) { append(" in ").append(apiStatus.since) }
|
||||
.applyIf(apiStatus.message != null) { append(" (").append(apiStatus.message).append(")") }
|
||||
is WebSymbolApiStatus.Experimental -> append("experimental")
|
||||
.applyIf(apiStatus.since != null) { append(" since ").append(apiStatus.since) }
|
||||
.applyIf(apiStatus.message != null) { append(" (").append(apiStatus.message).append(")") }
|
||||
|
||||
@@ -335,6 +335,12 @@
|
||||
"deprecated-since": {
|
||||
"$ref": "#/definitions/deprecated-since"
|
||||
},
|
||||
"obsolete": {
|
||||
"$ref": "#/definitions/obsolete"
|
||||
},
|
||||
"obsolete-since": {
|
||||
"$ref": "#/definitions/obsolete-since"
|
||||
},
|
||||
"experimental": {
|
||||
"$ref": "#/definitions/experimental"
|
||||
},
|
||||
@@ -746,7 +752,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"deprecated": {
|
||||
"description": "Specifies whether the symbol is deprecated. Value can be a boolean or a string message with explanation and migration information.",
|
||||
"description": "Specifies whether the symbol is deprecated. Deprecated symbol usage is discouraged, but still supported. Value can be a boolean or a string message with explanation and migration information.",
|
||||
"type": [
|
||||
"boolean",
|
||||
"string"
|
||||
@@ -757,6 +763,18 @@
|
||||
"description": "Version in which this symbol was first deprecated.",
|
||||
"type": "string"
|
||||
},
|
||||
"obsolete": {
|
||||
"description": "Specifies whether the symbol is obsolete. Obsolete symbols are no longer supported. Value can be a boolean or a string message with explanation and migration information.",
|
||||
"type": [
|
||||
"boolean",
|
||||
"string"
|
||||
],
|
||||
"default": false
|
||||
},
|
||||
"obsolete-since": {
|
||||
"description": "Version in which this symbol was first made obsolete.",
|
||||
"type": "string"
|
||||
},
|
||||
"experimental": {
|
||||
"description": "Specifies whether the symbol is experimental. Value can be a boolean or a string message with explanation. Experimental symbols should be used with caution as the API might change.",
|
||||
"type": [
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="intellij.xml.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.webSymbols" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.images" />
|
||||
<orderEntry type="module" module-name="intellij.platform.core.ui" />
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.intellij.xml.util.HtmlUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static com.intellij.documentation.mdn.MdnDocumentationKt.getHtmlMdnDocumentation;
|
||||
import static com.intellij.webSymbols.WebSymbolApiStatus.isDeprecatedOrObsolete;
|
||||
|
||||
public class HtmlDeprecatedAttributeInspection extends HtmlLocalInspectionTool {
|
||||
|
||||
@@ -32,7 +33,7 @@ public class HtmlDeprecatedAttributeInspection extends HtmlLocalInspectionTool {
|
||||
StringUtil.toLowerCase(attribute.getName());
|
||||
MdnSymbolDocumentation documentation = getHtmlMdnDocumentation(attribute, null);
|
||||
boolean deprecatedInHtml5 = "align".equals(name)
|
||||
|| (documentation != null && documentation.isDeprecated());
|
||||
|| (documentation != null && isDeprecatedOrObsolete(documentation.getApiStatus()));
|
||||
if (!deprecatedInHtml5) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.documentation.mdn.MdnDocumentationKt.getHtmlMdnDocumentation;
|
||||
import static com.intellij.webSymbols.WebSymbolApiStatus.isDeprecatedOrObsolete;
|
||||
|
||||
public class HtmlDeprecatedTagInspection extends HtmlLocalInspectionTool {
|
||||
@NonNls private static final Set<String> ourHtmlReplaceableTags;
|
||||
@@ -91,7 +92,7 @@ public class HtmlDeprecatedTagInspection extends HtmlLocalInspectionTool {
|
||||
}
|
||||
|
||||
MdnSymbolDocumentation documentation = getHtmlMdnDocumentation(tag, null);
|
||||
boolean deprecatedInHtml5 = documentation != null && documentation.isDeprecated();
|
||||
boolean deprecatedInHtml5 = documentation != null && isDeprecatedOrObsolete(documentation.getApiStatus());
|
||||
boolean inHtml5 = HtmlUtil.isHtml5Context(tag);
|
||||
if (!inHtml5 && !deprecatedInHtml5 && !HtmlUtil.hasNonHtml5Doctype(tag)) {
|
||||
fixes = ArrayUtil.append(fixes, new SwitchToHtml5Action());
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
"viewport": {
|
||||
"url": "$MDN_URL$/web/CSS/@viewport",
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<div class=\"notecard note\">\n<p><strong>Note:</strong> See <a href=\"https://github.com/w3c/csswg-drafts/issues/4766\" class=\"external\" rel=\" noopener\">https://github.com/w3c/csswg-drafts/issues/4766</a> for discussion around @viewport's removal from the standards track.</p>\n</div>\n<p>The <strong><code>@viewport</code></strong> <a href=\"$MDN_URL$/Web/CSS\" data-flaw=\"link1\">CSS</a> <a href=\"$MDN_URL$/Web/CSS/At-rule\" data-flaw=\"link2\">at-rule</a> lets you configure the <a href=\"$MDN_URL$/Glossary/Viewport\">viewport</a> through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like \"snap to edge\" (such as Microsoft Edge).</p>\n<p>Lengths specified as percentages are calculated relative to the <strong>initial viewport</strong>, which is the viewport before any user agent or authored styles have had an opportunity to adjust the viewport. This is typically based on the size of the window on desktop browsers that aren't in full screen mode.</p>\n<p>On mobile devices (or desktop devices that are in full screen mode), the initial viewport is usually the portion of a device's screen that is available for application use. This may be either the full screen or the full screen area minus areas controlled by the operating system (such as a taskbar) or the application-available screen area (either the full screen or the screen minus any areas owned by the operating system or other applications).</p>\n<div class=\"code-example\"><pre class=\"brush: css no-line-numbers notranslate\"><code>@viewport {\n width: 100vw; /*Sets the width of the actual viewport to the device width*/\n}\n</code></pre></div>\n<div class=\"notecard note\">\n<p><strong>Note:</strong> The use of <code><meta name=\"viewport\"></code> tag overrides <code>@viewport</code></p>\n</div>"
|
||||
"doc": "<div class=\"notecard note\">\n<p><strong>Note:</strong> See <a href=\"https://github.com/w3c/csswg-drafts/issues/4766\" class=\"external\" rel=\" noopener\">https://github.com/w3c/csswg-drafts/issues/4766</a> for discussion around @viewport's removal from the standards track.</p>\n</div>\n<p>The <strong><code>@viewport</code></strong> <a href=\"$MDN_URL$/Web/CSS\" data-flaw=\"link1\">CSS</a> <a href=\"$MDN_URL$/Web/CSS/At-rule\" data-flaw=\"link2\">at-rule</a> lets you configure the <a href=\"$MDN_URL$/Glossary/Viewport\">viewport</a> through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like \"snap to edge\" (such as Microsoft Edge).</p>\n<p>Lengths specified as percentages are calculated relative to the <strong>initial viewport</strong>, which is the viewport before any user agent or authored styles have had an opportunity to adjust the viewport. This is typically based on the size of the window on desktop browsers that aren't in full screen mode.</p>\n<p>On mobile devices (or desktop devices that are in full screen mode), the initial viewport is usually the portion of a device's screen that is available for application use. This may be either the full screen or the full screen area minus areas controlled by the operating system (such as a taskbar) or the application-available screen area (either the full screen or the screen minus any areas owned by the operating system or other applications).</p>\n<div class=\"code-example\"><pre class=\"brush: css no-line-numbers notranslate\"><code>@viewport {\n width: 100vw; /*Sets the width of the actual viewport to the device width*/\n}\n</code></pre></div>\n<div class=\"notecard note\">\n<p><strong>Note:</strong> The use of <code><meta name=\"viewport\"></code> tag overrides <code>@viewport</code></p>\n</div>"
|
||||
}
|
||||
},
|
||||
"dataTypes": {},
|
||||
@@ -24,12 +24,12 @@
|
||||
"ime-mode": {
|
||||
"url": "$MDN_URL$/web/CSS/ime-mode",
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": "3"
|
||||
},
|
||||
"doc": "<div> <div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code>ime-mode</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property controls the state of the input method editor (IME) for text fields. This property is obsolete.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* Keyword values */\nime-mode: auto;\nime-mode: normal;\nime-mode: active;\nime-mode: inactive;\nime-mode: disabled;\n/* Global values */\nime-mode: inherit;\nime-mode: initial;\nime-mode: revert;\nime-mode: unset;\n</code></pre></div>\n<p>The <code>ime-mode</code> property is only partially and inconsistently implemented in browsers. It was introduced by Microsoft with Internet Explorer 5 as a proprietary extension: <a href=\"https://msdn.microsoft.com/library/ms530767(VS.85).aspx\" class=\"external\" rel=\" noopener\">-ms-ime-mode Attribute | imeMode Property</a>.</p>\n<div class=\"note notecard\">\n<p><strong>Note:</strong> In general, it's not appropriate for a public web site to change the IME mode. This property should only be used for private web applications or to undo the property if it was previously set by legacy code.</p>\n</div>",
|
||||
"doc": "The <strong><code>ime-mode</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property controls the state of the input method editor (IME) for text fields. This property is obsolete.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* Keyword values */\nime-mode: auto;\nime-mode: normal;\nime-mode: active;\nime-mode: inactive;\nime-mode: disabled;\n/* Global values */\nime-mode: inherit;\nime-mode: initial;\nime-mode: revert;\nime-mode: unset;\n</code></pre></div>\n<p>The <code>ime-mode</code> property is only partially and inconsistently implemented in browsers. It was introduced by Microsoft with Internet Explorer 5 as a proprietary extension: <a href=\"https://msdn.microsoft.com/library/ms530767(VS.85).aspx\" class=\"external\" rel=\" noopener\">-ms-ime-mode Attribute | imeMode Property</a>.</p>\n<div class=\"note notecard\">\n<p><strong>Note:</strong> In general, it's not appropriate for a public web site to change the IME mode. This property should only be used for private web applications or to undo the property if it was previously set by legacy code.</p>\n</div>",
|
||||
"formalSyntax": "auto | normal | active | inactive | disabled",
|
||||
"values": {
|
||||
"auto": "No change is made to the current input method editor state. This is the default.",
|
||||
@@ -42,10 +42,10 @@
|
||||
"scroll-snap-coordinate": {
|
||||
"url": "$MDN_URL$/web/CSS/scroll-snap-coordinate",
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code>scroll-snap-coordinate</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's <a href=\"$MDN_URL$/Web/CSS/scroll-snap-destination\"><code>scroll-snap-destination</code></a> for each respective axis.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* Keyword value */\nscroll-snap-coordinate: none;\n/* <position> values */\nscroll-snap-coordinate: 50px 50px; /* Single coordinate */\nscroll-snap-coordinate: 100px 100px, 100px bottom; /* Multiple coordinates */\n/* Global values */\nscroll-snap-coordinate: inherit;\nscroll-snap-coordinate: initial;\nscroll-snap-coordinate: unset;</code></pre></div>\n<p>If the element has been transformed, the snap coordinates are likewise transformed, thus aligning the snap points with the element as it is displayed.</p>",
|
||||
"doc": "The <strong><code>scroll-snap-coordinate</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's <a href=\"$MDN_URL$/Web/CSS/scroll-snap-destination\"><code>scroll-snap-destination</code></a> for each respective axis.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* Keyword value */\nscroll-snap-coordinate: none;\n/* <position> values */\nscroll-snap-coordinate: 50px 50px; /* Single coordinate */\nscroll-snap-coordinate: 100px 100px, 100px bottom; /* Multiple coordinates */\n/* Global values */\nscroll-snap-coordinate: inherit;\nscroll-snap-coordinate: initial;\nscroll-snap-coordinate: unset;</code></pre></div>\n<p>If the element has been transformed, the snap coordinates are likewise transformed, thus aligning the snap points with the element as it is displayed.</p>",
|
||||
"formalSyntax": "none | <position>#\n <position> = [ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]\n <length-percentage> = <length> | <percentage>",
|
||||
"values": {
|
||||
"none": "Specifies that the element does not contribute to a snap point.",
|
||||
@@ -55,10 +55,10 @@
|
||||
"scroll-snap-destination": {
|
||||
"url": "$MDN_URL$/web/CSS/scroll-snap-destination",
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code>scroll-snap-destination</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines the position in x and y coordinates within the scroll container's visual <a href=\"$MDN_URL$/Glossary/Viewport\">viewport</a> which element snap points align with.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* <position> value */\nscroll-snap-destination: 400px 600px;\n/* Global values */\nscroll-snap-destination: inherit;\nscroll-snap-destination: initial;\nscroll-snap-destination: unset;\n</code></pre></div>",
|
||||
"doc": "The <strong><code>scroll-snap-destination</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines the position in x and y coordinates within the scroll container's visual <a href=\"$MDN_URL$/Glossary/Viewport\">viewport</a> which element snap points align with.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* <position> value */\nscroll-snap-destination: 400px 600px;\n/* Global values */\nscroll-snap-destination: inherit;\nscroll-snap-destination: initial;\nscroll-snap-destination: unset;\n</code></pre></div>",
|
||||
"formalSyntax": "<position>\n <position> = [ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]\n <length-percentage> = <length> | <percentage>",
|
||||
"values": {
|
||||
"<position>": "Specifies the offset of the snap destination from the start edge of the scroll container’s visual viewport. The first value gives the x coordinate of the snap destination, the second value its y coordinate."
|
||||
@@ -67,10 +67,10 @@
|
||||
"scroll-snap-points-x": {
|
||||
"url": "$MDN_URL$/web/CSS/scroll-snap-points-x",
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code>scroll-snap-points-x</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines the horizontal positioning of snap points within the content of the scroll container they are applied to.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* Keyword value */\nscroll-snap-points-x: none;\n/* Repeating snap points */\nscroll-snap-points-x: repeat(400px);\n/* Global values */\nscroll-snap-points-x: inherit;\nscroll-snap-points-x: initial;\nscroll-snap-points-x: unset;\n</code></pre></div>",
|
||||
"doc": "The <strong><code>scroll-snap-points-x</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines the horizontal positioning of snap points within the content of the scroll container they are applied to.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* Keyword value */\nscroll-snap-points-x: none;\n/* Repeating snap points */\nscroll-snap-points-x: repeat(400px);\n/* Global values */\nscroll-snap-points-x: inherit;\nscroll-snap-points-x: initial;\nscroll-snap-points-x: unset;\n</code></pre></div>",
|
||||
"formalSyntax": "none | repeat( <length-percentage> )\n <length-percentage> = <length> | <percentage>",
|
||||
"values": {
|
||||
"none": "The scroll container does not define any snap points. Elements within the scroll container may still define snap points on behalf of the scroll container.",
|
||||
@@ -80,10 +80,10 @@
|
||||
"scroll-snap-points-y": {
|
||||
"url": "$MDN_URL$/web/CSS/scroll-snap-points-y",
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code>scroll-snap-points-y</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines the vertical positioning of snap points within the content of the scroll container they are applied to.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* Keyword value */\nscroll-snap-points-y: none;\n/* Repeated snap points */\nscroll-snap-points-y: repeat(400px);\n/* Global values */\nscroll-snap-points-y: inherit;\nscroll-snap-points-y: initial;\nscroll-snap-points-y: unset;\n</code></pre></div>",
|
||||
"doc": "The <strong><code>scroll-snap-points-y</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines the vertical positioning of snap points within the content of the scroll container they are applied to.</p>\n<div class=\"code-example\"><pre class=\"brush:css no-line-numbers notranslate\"><code>/* Keyword value */\nscroll-snap-points-y: none;\n/* Repeated snap points */\nscroll-snap-points-y: repeat(400px);\n/* Global values */\nscroll-snap-points-y: inherit;\nscroll-snap-points-y: initial;\nscroll-snap-points-y: unset;\n</code></pre></div>",
|
||||
"formalSyntax": "none | repeat( <length-percentage> )\n <length-percentage> = <length> | <percentage>",
|
||||
"values": {
|
||||
"none": "The scroll container does not define any snap points. Elements within the scroll container may still define snap points on behalf of the scroll container.",
|
||||
@@ -93,13 +93,13 @@
|
||||
"scroll-snap-type-x": {
|
||||
"url": "$MDN_URL$/web/CSS/scroll-snap-type-x",
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": "9",
|
||||
"SafariIOS": "9"
|
||||
},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code>scroll-snap-type-x</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one.</p>\n<p>Specifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent.</p>\n<div class=\"code-example\"><pre class=\"brush: css no-line-numbers notranslate\"><code>/* Keyword values */\nscroll-snap-type-x: none;\nscroll-snap-type-x: mandatory;\nscroll-snap-type-x: proximity;\n/* Global values */\nscroll-snap-type-x: inherit;\nscroll-snap-type-x: initial;\nscroll-snap-type-x: unset;\n</code></pre></div>",
|
||||
"doc": "The <strong><code>scroll-snap-type-x</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one.</p>\n<p>Specifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent.</p>\n<div class=\"code-example\"><pre class=\"brush: css no-line-numbers notranslate\"><code>/* Keyword values */\nscroll-snap-type-x: none;\nscroll-snap-type-x: mandatory;\nscroll-snap-type-x: proximity;\n/* Global values */\nscroll-snap-type-x: inherit;\nscroll-snap-type-x: initial;\nscroll-snap-type-x: unset;\n</code></pre></div>",
|
||||
"formalSyntax": "none | mandatory | proximity",
|
||||
"values": {
|
||||
"none": "When the visual <a href=\"$MDN_URL$/Glossary/Viewport\">viewport</a> of this scroll container is scrolled horizontally, it must ignore snap points.",
|
||||
@@ -110,10 +110,10 @@
|
||||
"scroll-snap-type-y": {
|
||||
"url": "$MDN_URL$/web/CSS/scroll-snap-type-y",
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code>scroll-snap-type-y</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one.</p>\n<p>Specifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent.</p>\n<div class=\"code-example\"><pre class=\"brush: css no-line-numbers notranslate\"><code>/* Keyword values */\nscroll-snap-type-y: none;\nscroll-snap-type-y: mandatory;\nscroll-snap-type-y: proximity;\n/* Global values */\nscroll-snap-type-y: inherit;\nscroll-snap-type-y: initial;\nscroll-snap-type-y: unset;\n</code></pre></div>",
|
||||
"doc": "The <strong><code>scroll-snap-type-y</code></strong> <a href=\"$MDN_URL$/Web/CSS\">CSS</a> property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one.</p>\n<p>Specifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent.</p>\n<div class=\"code-example\"><pre class=\"brush: css no-line-numbers notranslate\"><code>/* Keyword values */\nscroll-snap-type-y: none;\nscroll-snap-type-y: mandatory;\nscroll-snap-type-y: proximity;\n/* Global values */\nscroll-snap-type-y: inherit;\nscroll-snap-type-y: initial;\nscroll-snap-type-y: unset;\n</code></pre></div>",
|
||||
"formalSyntax": "none | mandatory | proximity",
|
||||
"values": {
|
||||
"none": "When the visual <a href=\"$MDN_URL$/Glossary/Viewport\">viewport</a> of this scroll container is scrolled vertically, it must ignore snap points.",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"events": {
|
||||
"overflow": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": ""
|
||||
@@ -21,7 +21,7 @@
|
||||
"show": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": ""
|
||||
@@ -30,7 +30,7 @@
|
||||
},
|
||||
"underflow": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": ""
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
"applet": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
},
|
||||
"doc": "<div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div>\n<div class=\"notecard warning\">\n<p>The <strong><code><applet></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element was removed in <a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=1279218\" class=\"external\" rel=\" noopener\">Gecko 56</a> and <a href=\"https://bugs.chromium.org/p/chromium/issues/detail?id=470301\" class=\"external\" rel=\" noopener\">Chrome 47</a>.</p>\n<p>Removal is being considered in <a href=\"https://bugs.webkit.org/show_bug.cgi?id=157926\" class=\"external\" rel=\" noopener\">WebKit</a> and <a href=\"https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11946645/\" class=\"external\" rel=\" noopener\">Edge</a>.</p>\n</div>\n<p><span class=\"seoSummary\">The obsolete <strong>HTML Applet Element</strong> (<strong><code><applet></code></strong>) embeds a Java applet into the document; this element has been deprecated in favor of <a href=\"$MDN_URL$/Web/HTML/Element/object\"><code><object></code></a>.</span></p>\n<p>Use of Java applets on the Web is deprecated; most browsers no longer support use of plug-ins, including the Java plug-in.</p>",
|
||||
"doc": "\n<div class=\"notecard warning\">\n<p>The <strong><code><applet></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element was removed in <a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=1279218\" class=\"external\" rel=\" noopener\">Gecko 56</a> and <a href=\"https://bugs.chromium.org/p/chromium/issues/detail?id=470301\" class=\"external\" rel=\" noopener\">Chrome 47</a>.</p>\n<p>Removal is being considered in <a href=\"https://bugs.webkit.org/show_bug.cgi?id=157926\" class=\"external\" rel=\" noopener\">WebKit</a> and <a href=\"https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11946645/\" class=\"external\" rel=\" noopener\">Edge</a>.</p>\n</div>\n<p><span class=\"seoSummary\">The obsolete <strong>HTML Applet Element</strong> (<strong><code><applet></code></strong>) embeds a Java applet into the document; this element has been deprecated in favor of <a href=\"$MDN_URL$/Web/HTML/Element/object\"><code><object></code></a>.</span></p>\n<p>Use of Java applets on the Web is deprecated; most browsers no longer support use of plug-ins, including the Java plug-in.</p>",
|
||||
"details": {
|
||||
"<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories\">Content categories</a>": "<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#flow_content\">Flow content</a>\n,\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#phrasing_content\">phrasing content</a>\n,\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#embedded_content\">embedded content</a>\n, interactive content, palpable content.\n",
|
||||
"Permitted content": "Zero or more\n<a href=\"$MDN_URL$/Web/HTML/Element/param\"><code><param></code></a>\nelements, then\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#transparent_content_model\">transparent</a>\n.\n",
|
||||
@@ -30,7 +30,7 @@
|
||||
"align": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -40,7 +40,7 @@
|
||||
"alt": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -50,7 +50,7 @@
|
||||
"archive": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -60,7 +60,7 @@
|
||||
"code": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -70,7 +70,7 @@
|
||||
"codebase": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -80,7 +80,7 @@
|
||||
"datafld": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -90,7 +90,7 @@
|
||||
"datasrc": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -100,7 +100,7 @@
|
||||
"height": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -110,7 +110,7 @@
|
||||
"hspace": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -120,7 +120,7 @@
|
||||
"mayscript": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -130,7 +130,7 @@
|
||||
"name": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -140,7 +140,7 @@
|
||||
"object": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -150,7 +150,7 @@
|
||||
"src": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -160,7 +160,7 @@
|
||||
"vspace": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -170,7 +170,7 @@
|
||||
"width": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Safari": ""
|
||||
@@ -182,11 +182,11 @@
|
||||
"basefont": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code><basefont></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element is deprecated. It sets a default font face, size, and color for the other elements which are descended from its parent element. With this set, the font's size can then be varied relative to the base size using the <a href=\"$MDN_URL$/Web/HTML/Element/font\"><code><font></code></a> element.</p>\n<p>You should not use this element; instead, you should use CSS properties such as <a href=\"$MDN_URL$/Web/CSS/font\"><code>font</code></a>, <a href=\"$MDN_URL$/Web/CSS/font-family\"><code>font-family</code></a>, <a href=\"$MDN_URL$/Web/CSS/font-size\"><code>font-size</code></a>, and <a href=\"$MDN_URL$/Web/CSS/color\"><code>color</code></a> to change the font configuration for an element and its contents.</p>",
|
||||
"doc": "The <strong><code><basefont></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element is deprecated. It sets a default font face, size, and color for the other elements which are descended from its parent element. With this set, the font's size can then be varied relative to the base size using the <a href=\"$MDN_URL$/Web/HTML/Element/font\"><code><font></code></a> element.</p>\n<p>You should not use this element; instead, you should use CSS properties such as <a href=\"$MDN_URL$/Web/CSS/font\"><code>font</code></a>, <a href=\"$MDN_URL$/Web/CSS/font-family\"><code>font-family</code></a>, <a href=\"$MDN_URL$/Web/CSS/font-size\"><code>font-size</code></a>, and <a href=\"$MDN_URL$/Web/CSS/color\"><code>color</code></a> to change the font configuration for an element and its contents.</p>",
|
||||
"attrs": {
|
||||
"color": {
|
||||
"doc": "This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format."
|
||||
@@ -201,11 +201,11 @@
|
||||
},
|
||||
"bgsound": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div><div class=\"notecard warning\">\n<h4 id=\"non-standard\">Non-standard</h4>\n<p>This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.</p>\n</div></div>\n<p>The <strong><code><bgsound></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element is deprecated. It sets up a sound file to play in the background while the page is used; use <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a> instead.</p>\n<div class=\"note notecard\">\n<p><strong>Do not use this! </strong>In order to embed audio in a Web page, you should be using the <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a> element.</p>\n</div>",
|
||||
"doc": "<div><div class=\"notecard warning\">\n<h4 id=\"non-standard\">Non-standard</h4>\n<p>This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.</p>\n</div></div>\n<p>The <strong><code><bgsound></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element is deprecated. It sets up a sound file to play in the background while the page is used; use <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a> instead.</p>\n<div class=\"note notecard\">\n<p><strong>Do not use this! </strong>In order to embed audio in a Web page, you should be using the <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a> element.</p>\n</div>",
|
||||
"attrs": {
|
||||
"balance": {
|
||||
"doc": "This attribute defines a number between -10,000 and +10,000 that determines how the volume will be divided between the speakers."
|
||||
@@ -223,17 +223,17 @@
|
||||
},
|
||||
"blink": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code><blink></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element is a non-standard element which causes the enclosed text to flash slowly.</p>\n<div class=\"warning notecard\">Do not use this element as it is <strong>obsolete</strong> and is bad design practice. Blinking text is frowned upon by several accessibility standards and the CSS specification allows browsers to ignore the <code><blink></code> element.</div>"
|
||||
"doc": "The <strong><code><blink></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element is a non-standard element which causes the enclosed text to flash slowly.</p>\n<div class=\"warning notecard\">Do not use this element as it is <strong>obsolete</strong> and is bad design practice. Blinking text is frowned upon by several accessibility standards and the CSS specification allows browsers to ignore the <code><blink></code> element.</div>"
|
||||
},
|
||||
"content": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code><content></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element—an obsolete part of the <a href=\"$MDN_URL$/Web/Web_Components\">Web Components</a> suite of technologies—was used inside of <a href=\"$MDN_URL$/Web/Web_Components/Using_shadow_DOM\">Shadow DOM</a> as an <a class=\"page-not-created\" >insertion point</a>, and wasn't meant to be used in ordinary HTML. It has now been replaced by the <a href=\"$MDN_URL$/Web/HTML/Element/slot\"><code><slot></code></a> element, which creates a point in the DOM at which a shadow DOM can be inserted.</p>\n<div class=\"note notecard\">\n<p><strong>Note:</strong> Though present in early draft of the specifications and implemented in several browsers, this element has been removed in later versions of the spec, and should not be used. It is documented here to assist in adapting code written during the time it was included in the spec to work with newer versions of the specification.</p>\n</div>",
|
||||
"doc": "The <strong><code><content></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element—an obsolete part of the <a href=\"$MDN_URL$/Web/Web_Components\">Web Components</a> suite of technologies—was used inside of <a href=\"$MDN_URL$/Web/Web_Components/Using_shadow_DOM\">Shadow DOM</a> as an <a class=\"page-not-created\" >insertion point</a>, and wasn't meant to be used in ordinary HTML. It has now been replaced by the <a href=\"$MDN_URL$/Web/HTML/Element/slot\"><code><slot></code></a> element, which creates a point in the DOM at which a shadow DOM can be inserted.</p>\n<div class=\"note notecard\">\n<p><strong>Note:</strong> Though present in early draft of the specifications and implemented in several browsers, this element has been removed in later versions of the spec, and should not be used. It is documented here to assist in adapting code written during the time it was included in the spec to work with newer versions of the specification.</p>\n</div>",
|
||||
"details": {
|
||||
"<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories\">Content categories</a>": "<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#transparent_content_model\">Transparent content</a>\n.\n",
|
||||
"Permitted content": "<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#flow_content\">Flow content</a>\n.\n",
|
||||
@@ -250,13 +250,13 @@
|
||||
"keygen": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Opera": "3",
|
||||
"Safari": "1.2"
|
||||
},
|
||||
"doc": "<div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div>\n<p>The <strong><code><keygen></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element exists to facilitate generation of key material, and submission of the public key as part of an <a href=\"$MDN_URL$/Learn/Forms\">HTML form</a>. This mechanism is designed for use with Web-based certificate management systems. It is expected that the <code><keygen></code> element will be used in an HTML form along with other information needed to construct a certificate request, and that the result of the process will be a signed certificate.</p>",
|
||||
"doc": "The <strong><code><keygen></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element exists to facilitate generation of key material, and submission of the public key as part of an <a href=\"$MDN_URL$/Learn/Forms\">HTML form</a>. This mechanism is designed for use with Web-based certificate management systems. It is expected that the <code><keygen></code> element will be used in an HTML form along with other information needed to construct a certificate request, and that the result of the process will be a signed certificate.</p>",
|
||||
"details": {
|
||||
"<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories\">Content categories</a>": "<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#flow_content\">Flow content</a>\n,\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#phrasing_content\">phrasing content</a>\n, interactive content,\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#form_listed\">listed</a>\n,\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#form_labelable\">labelable</a>\n,\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#form_submittable\">submittable</a>\n,\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#form_resettable\">resettable</a>\n<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#form-associated_content\">form-associated element</a>\n, palpable content.\n",
|
||||
"Permitted content": "None, it is an\n<a href=\"$MDN_URL$/Glossary/Empty_element\">empty element</a>\n.\n",
|
||||
@@ -288,10 +288,10 @@
|
||||
},
|
||||
"menuitem": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div>\n<p>The <strong><code><menuitem></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element represents a command that a user is able to invoke through a popup menu. This includes context menus, as well as menus that might be attached to a menu button.</p>\n<p>A command can either be defined explicitly, with a textual label and optional icon to describe its appearance, or alternatively as an <em>indirect command</em> whose behavior is defined by a separate element. Commands can also optionally include a checkbox or be grouped to share radio buttons. (Menu items for indirect commands gain checkboxes or radio buttons when defined against elements <code><input type=\"checkbox\"></code> and <code><input type=\"radio\"></code>.)</p>",
|
||||
"doc": "The <strong><code><menuitem></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element represents a command that a user is able to invoke through a popup menu. This includes context menus, as well as menus that might be attached to a menu button.</p>\n<p>A command can either be defined explicitly, with a textual label and optional icon to describe its appearance, or alternatively as an <em>indirect command</em> whose behavior is defined by a separate element. Commands can also optionally include a checkbox or be grouped to share radio buttons. (Menu items for indirect commands gain checkboxes or radio buttons when defined against elements <code><input type=\"checkbox\"></code> and <code><input type=\"radio\"></code>.)</p>",
|
||||
"details": {
|
||||
"<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories\">Content categories</a>": "None.\n",
|
||||
"Permitted content": "None, it is an\n<a href=\"$MDN_URL$/Glossary/Empty_element\">empty element</a>\n.\n",
|
||||
@@ -303,7 +303,7 @@
|
||||
"attrs": {
|
||||
"checked": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": "8"
|
||||
@@ -312,7 +312,7 @@
|
||||
},
|
||||
"command": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": "8"
|
||||
@@ -321,7 +321,7 @@
|
||||
},
|
||||
"default": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": "8"
|
||||
@@ -330,7 +330,7 @@
|
||||
},
|
||||
"disabled": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": "8"
|
||||
@@ -339,7 +339,7 @@
|
||||
},
|
||||
"icon": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": "8"
|
||||
@@ -351,7 +351,7 @@
|
||||
},
|
||||
"radiogroup": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": "8"
|
||||
@@ -360,7 +360,7 @@
|
||||
},
|
||||
"type": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Firefox": "8"
|
||||
@@ -371,10 +371,10 @@
|
||||
},
|
||||
"shadow": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div>\n<p>The <strong><code><shadow></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element—an obsolete part of the <a href=\"$MDN_URL$/Web/Web_Components\">Web Components</a> technology suite—was intended to be used as a shadow DOM <a class=\"page-not-created\" >insertion point</a>. You might have used it if you have created multiple shadow roots under a shadow host. It is not useful in ordinary HTML.</p>",
|
||||
"doc": "The <strong><code><shadow></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element—an obsolete part of the <a href=\"$MDN_URL$/Web/Web_Components\">Web Components</a> technology suite—was intended to be used as a shadow DOM <a class=\"page-not-created\" >insertion point</a>. You might have used it if you have created multiple shadow roots under a shadow host. It is not useful in ordinary HTML.</p>",
|
||||
"details": {
|
||||
"<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories\">Content categories</a>": "<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#transparent_content_model\">Transparent content</a>\n",
|
||||
"Permitted content": "<a href=\"$MDN_URL$/Web/Guide/HTML/Content_categories#flow_content\">Flow content</a>\n",
|
||||
@@ -386,10 +386,10 @@
|
||||
},
|
||||
"spacer": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard warning\">\n<h4 id=\"non-standard\">Non-standard</h4>\n<p>This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.</p>\n</div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code><spacer></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element is an obsolete HTML element which allowed insertion of empty spaces on pages. It was devised by Netscape to accomplish the same effect as a single-pixel layout image, which was something web designers used to use to add white spaces to web pages without actually using an image. However, <code><spacer></code> no longer supported by any major browser and the same effects can now be achieved using simple CSS.</p>\n<p>Firefox, which is the descendant of Netscape's browsers, removed support for <code><spacer></code> in version 4.</p>",
|
||||
"doc": "<div><div class=\"notecard warning\">\n<h4 id=\"non-standard\">Non-standard</h4>\n<p>This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.</p>\n</div></div>\n<p>The <strong><code><spacer></code></strong> <a href=\"$MDN_URL$/Web/HTML\">HTML</a> element is an obsolete HTML element which allowed insertion of empty spaces on pages. It was devised by Netscape to accomplish the same effect as a single-pixel layout image, which was something web designers used to use to add white spaces to web pages without actually using an image. However, <code><spacer></code> no longer supported by any major browser and the same effects can now be achieved using simple CSS.</p>\n<p>Firefox, which is the descendant of Netscape's browsers, removed support for <code><spacer></code> in version 4.</p>",
|
||||
"attrs": {
|
||||
"align": {
|
||||
"doc": "This attribute determines alignment of spacer. Possible values are\n<code>left</code>\n,\n<code>right</code>\nand\n<code>center</code>\n."
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.psi.impl.source.html.dtd.HtmlSymbolDeclaration
|
||||
import com.intellij.psi.util.PsiTreeUtil
|
||||
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
|
||||
@@ -175,8 +176,7 @@ private fun innerGetEventDoc(eventName: String): Pair<MdnDocumentation, MdnDomEv
|
||||
interface MdnSymbolDocumentation {
|
||||
val name: String
|
||||
val url: String?
|
||||
val isDeprecated: Boolean
|
||||
val isExperimental: Boolean
|
||||
val apiStatus: WebSymbolApiStatus
|
||||
val description: String
|
||||
val sections: Map<@Nls String, @Nls String>
|
||||
val footnote: @Nls String?
|
||||
@@ -196,11 +196,15 @@ class MdnSymbolDocumentationAdapter(override val name: String,
|
||||
override val url: String?
|
||||
get() = doc.url?.let { fixMdnUrls(it, source.lang) }
|
||||
|
||||
override val isDeprecated: Boolean
|
||||
get() = doc.status?.contains(MdnApiStatus.Deprecated) == true
|
||||
|
||||
override val isExperimental: Boolean
|
||||
get() = doc.status?.contains(MdnApiStatus.Experimental) == true
|
||||
override val apiStatus: WebSymbolApiStatus
|
||||
get() = doc.status?.let {
|
||||
when {
|
||||
it.contains(MdnApiStatus.Obsolete) -> WebSymbolApiStatus.Obsolete
|
||||
it.contains(MdnApiStatus.Deprecated) -> WebSymbolApiStatus.Deprecated
|
||||
it.contains(MdnApiStatus.Experimental) -> WebSymbolApiStatus.Experimental
|
||||
else -> null
|
||||
}
|
||||
} ?: WebSymbolApiStatus.Stable
|
||||
|
||||
override val description: String
|
||||
get() = capitalize(doc.doc ?: "").fixUrls()
|
||||
@@ -331,7 +335,7 @@ data class MdnCssBasicSymbolDocumentation(override val url: String?,
|
||||
@JsonDeserialize(using = CompatibilityMapDeserializer::class)
|
||||
override val compatibility: CompatibilityMap?,
|
||||
override val doc: String?,
|
||||
val formalSyntax: String?) : MdnRawSymbolDocumentation{
|
||||
val formalSyntax: String?) : MdnRawSymbolDocumentation {
|
||||
override val sections: Map<String, String>
|
||||
get() {
|
||||
val result = mutableMapOf<String, String>()
|
||||
@@ -348,7 +352,7 @@ data class MdnCssAtRuleSymbolDocumentation(override val url: String?,
|
||||
override val compatibility: CompatibilityMap?,
|
||||
override val doc: String?,
|
||||
val properties: Map<String, MdnCssPropertySymbolDocumentation>?,
|
||||
val formalSyntax: String?) : MdnRawSymbolDocumentation{
|
||||
val formalSyntax: String?) : MdnRawSymbolDocumentation {
|
||||
override val sections: Map<String, String>
|
||||
get() {
|
||||
val result = mutableMapOf<String, String>()
|
||||
@@ -392,7 +396,8 @@ enum class MdnApiNamespace {
|
||||
enum class MdnApiStatus {
|
||||
Experimental,
|
||||
StandardTrack,
|
||||
Deprecated
|
||||
Deprecated,
|
||||
Obsolete
|
||||
}
|
||||
|
||||
enum class MdnJavaScriptRuntime(displayName: String? = null, mdnId: String? = null, val firstVersion: String = "1") {
|
||||
|
||||
@@ -15,11 +15,7 @@ abstract class MdnDocumentedSymbol : WebSymbol {
|
||||
protected abstract fun getMdnDocumentation(): MdnSymbolDocumentation?
|
||||
|
||||
override val apiStatus: WebSymbolApiStatus
|
||||
get() = when {
|
||||
mdnDoc?.isDeprecated == true -> WebSymbolApiStatus.Deprecated
|
||||
mdnDoc?.isExperimental == true -> WebSymbolApiStatus.Experimental
|
||||
else -> WebSymbolApiStatus.Stable
|
||||
}
|
||||
get() = mdnDoc?.apiStatus ?: WebSymbolApiStatus.Stable
|
||||
|
||||
override val description: String?
|
||||
get() = mdnDoc?.description
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"altglyph": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {
|
||||
"Chrome": "",
|
||||
@@ -23,12 +23,12 @@
|
||||
"Safari": "4",
|
||||
"SafariIOS": "4"
|
||||
},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code><altGlyph></code></strong> SVG element allows sophisticated selection of the glyphs used to render its child character data.</p>",
|
||||
"doc": "The <strong><code><altGlyph></code></strong> SVG element allows sophisticated selection of the glyphs used to render its child character data.</p>",
|
||||
"attrs": {
|
||||
"dx": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "This attribute indicates a shift along the x-axis on the position of the element.\n<br>\n<small><em>Value type</em>: <a href=\"$MDN_URL$/Web/SVG/Content_type#list-of-ts\"><strong><list-of-coordinates></strong></a> ; <em>Default value</em>: Relative x-coordinate of ancestor <a href=\"$MDN_URL$/Web/SVG/Element/text\"><code><text></code></a> or <a href=\"$MDN_URL$/Web/SVG/Element/tspan\"><code><tspan></code></a>; <em>Animatable</em>: <strong>yes</strong></small>"
|
||||
@@ -36,7 +36,7 @@
|
||||
"dy": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "This attribute indicates a shift along the x-axis on the position of the element.\n<br>\n<small><em>Value type</em>: <a href=\"$MDN_URL$/Web/SVG/Content_type#list-of-ts\"><strong><list-of-coordinates></strong></a> ; <em>Default value</em>: Relative y-coordinate of ancestor <a href=\"$MDN_URL$/Web/SVG/Element/text\"><code><text></code></a> or <a href=\"$MDN_URL$/Web/SVG/Element/tspan\"><code><tspan></code></a>; <em>Animatable</em>: <strong>yes</strong></small>"
|
||||
@@ -44,7 +44,7 @@
|
||||
"format": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "The format of the given font.\n<br>\n<small><em>Value type</em>: <strong><string</strong><a href=\"$MDN_URL$/Web/SVG/Content_type#percentage\"><strong>></strong></a> ; <em>Default value</em>: <em>none</em>; <em>Animatable</em>: <strong>no</strong></small>"
|
||||
@@ -52,14 +52,14 @@
|
||||
"glyphref": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {}
|
||||
},
|
||||
"rotate": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "This attribute defines the supplemental rotation that will be applied to the element.\n<br>\n<small><em>Value type</em>: <a href=\"$MDN_URL$/Web/SVG/Content_type#list-of-ts\"><strong><list-of-numbers></strong></a> ; <em>Default value</em>: <em>none</em>; <em>Animatable</em>: <strong>yes (non-additive)</strong></small>"
|
||||
@@ -67,7 +67,7 @@
|
||||
"x": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "This attribute defines the corresponding absolute x-coordinates for rendering the element.\n<br>\n<small><em>Value type</em>: <a href=\"$MDN_URL$/Web/SVG/Content_type#list-of-ts\"><strong><list-of-coordinates></strong></a> ; <em>Default value</em>: Absolute x-coordinate of ancestor <a href=\"$MDN_URL$/Web/SVG/Element/text\"><code><text></code></a> or <a href=\"$MDN_URL$/Web/SVG/Element/tspan\"><code><tspan></code></a>; <em>Animatable</em>: <strong>yes</strong></small>"
|
||||
@@ -78,7 +78,7 @@
|
||||
"y": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "This attribute defines the corresponding absolute y-coordinates for rendering the element.\n<br>\n<small><em>Value type</em>: <a href=\"$MDN_URL$/Web/SVG/Content_type#list-of-ts\"><strong><list-of-coordinates></strong></a> ; <em>Default value</em>: Absolute y-coordinate of ancestor <a href=\"$MDN_URL$/Web/SVG/Element/text\"><code><text></code></a> or <a href=\"$MDN_URL$/Web/SVG/Element/tspan\"><code><tspan></code></a>; <em>Animatable</em>: <strong>yes</strong></small>"
|
||||
@@ -88,44 +88,44 @@
|
||||
"altglyphdef": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code><altGlyphDef></code></strong> <a href=\"$MDN_URL$/Web/SVG\">SVG</a> element defines a substitution representation for glyphs.</p>"
|
||||
"doc": "The <strong><code><altGlyphDef></code></strong> <a href=\"$MDN_URL$/Web/SVG\">SVG</a> element defines a substitution representation for glyphs.</p>"
|
||||
},
|
||||
"altglyphitem": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<p>The <strong><code><altGlyphItem></code></strong> element provides a set of candidates for glyph substitution by the <a href=\"$MDN_URL$/Web/SVG/Element/altGlyph\"><code><altGlyph></code></a> element.</p>"
|
||||
"doc": "The <strong><code><altGlyphItem></code></strong> element provides a set of candidates for glyph substitution by the <a href=\"$MDN_URL$/Web/SVG/Element/altGlyph\"><code><altGlyph></code></a> element.</p>"
|
||||
},
|
||||
"animatecolor": {
|
||||
"status": [
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {},
|
||||
"doc": "<div><div class=\"notecard deprecated\">\n<h4 id=\"deprecated\">Deprecated</h4>\n<p>This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</p>\n</div></div>\n<div class=\"warning notecard\">\n<p>This element has been deprecated in SVG 1.1 Second Edition and may be removed in a future version of SVG. It provides no features not already available by using the <a href=\"$MDN_URL$/Web/SVG/Element/animate\"><code><animate></code></a> element. So, authors should use the <code><animate></code> element instead.</p>\n</div>\n<p>The <strong><code><animateColor></code></strong> <a href=\"$MDN_URL$/Web/SVG\">SVG</a> element specifies a color transformation over time.</p>",
|
||||
"doc": "<div></div>\n<div class=\"warning notecard\">\n<p>This element has been deprecated in SVG 1.1 Second Edition and may be removed in a future version of SVG. It provides no features not already available by using the <a href=\"$MDN_URL$/Web/SVG/Element/animate\"><code><animate></code></a> element. So, authors should use the <code><animate></code> element instead.</p>\n</div>\n<p>The <strong><code><animateColor></code></strong> <a href=\"$MDN_URL$/Web/SVG\">SVG</a> element specifies a color transformation over time.</p>",
|
||||
"attrs": {
|
||||
"by": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {}
|
||||
},
|
||||
"from": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {}
|
||||
},
|
||||
"to": {
|
||||
"status": [
|
||||
"StandardTrack",
|
||||
"Deprecated"
|
||||
"Obsolete"
|
||||
],
|
||||
"compatibility": {}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.webSymbols.WebSymbolApiStatus;
|
||||
import com.intellij.xml.XmlAttributeDescriptor;
|
||||
import com.intellij.xml.XmlDeprecationOwnerDescriptor;
|
||||
import com.intellij.xml.XmlElementDescriptor;
|
||||
@@ -250,7 +251,8 @@ public class HtmlElementDescriptorImpl extends BaseXmlElementDescriptorImpl impl
|
||||
boolean html4Deprecated = ourHtml4DeprecatedTags.contains(myDelegate.getName());
|
||||
MdnSymbolDocumentation documentation = doIfNotNull(
|
||||
myDelegate.getDeclaration(), declaration -> MdnDocumentationKt.getHtmlMdnDocumentation(declaration, null));
|
||||
boolean html5Deprecated = documentation != null && documentation.isDeprecated() || ourHtml5DeprecatedTags.contains(myDelegate.getName());
|
||||
boolean html5Deprecated = documentation != null && WebSymbolApiStatus.isDeprecatedOrObsolete(documentation.getApiStatus())
|
||||
|| ourHtml5DeprecatedTags.contains(myDelegate.getName());
|
||||
if (!html4Deprecated && !html5Deprecated) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user