LibWeb: Support for "content-language" http-equiv state

Implemented support for setting the pragma-set default language in the
`<meta/>` tag with an `http-equiv` attribute `content-language`.
This commit is contained in:
Piotr 2024-11-05 09:12:11 +01:00 committed by Andreas Kling
commit 06154b87dd
Notes: github-actions[bot] 2024-11-06 09:57:52 +00:00
13 changed files with 172 additions and 0 deletions

View file

@ -2934,6 +2934,10 @@ Optional<String> Element::lang() const
// 5. Otherwise
// - If there is a pragma-set default language set, then that is the language of the node.
if (document().pragma_set_default_language().has_value()) {
return document().pragma_set_default_language();
}
// - If there is no pragma-set default language set, then language information from a higher-level protocol (such as HTTP),
// if any, must be used as the final fallback language instead.
// - In the absence of any such language information, and in cases where the higher-level protocol reports multiple languages,