mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
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:
parent
413cf6b329
commit
06154b87dd
Notes:
github-actions[bot]
2024-11-06 09:57:52 +00:00
Author: https://github.com/pbrw
Commit: 06154b87dd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2174
Reviewed-by: https://github.com/rmg-x
13 changed files with 172 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue