mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
LibWeb: Handle http-equiv pragmas without insertion requirements
These pragmas are either ignored or handled elsewhere
This commit is contained in:
parent
d828d80b75
commit
77610db58c
Notes:
github-actions[bot]
2024-09-13 10:11:57 +00:00
Author: https://github.com/skyrising
Commit: 77610db58c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1388
1 changed files with 16 additions and 0 deletions
|
@ -90,6 +90,11 @@ void HTMLMetaElement::inserted()
|
||||||
auto http_equiv = http_equiv_state();
|
auto http_equiv = http_equiv_state();
|
||||||
if (http_equiv.has_value()) {
|
if (http_equiv.has_value()) {
|
||||||
switch (http_equiv.value()) {
|
switch (http_equiv.value()) {
|
||||||
|
case HttpEquivAttributeState::EncodingDeclaration:
|
||||||
|
// https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-content-type
|
||||||
|
// The Encoding declaration state is just an alternative form of setting the charset attribute: it is a character encoding declaration.
|
||||||
|
// This state's user agent requirements are all handled by the parsing section of the specification.
|
||||||
|
break;
|
||||||
case HttpEquivAttributeState::Refresh: {
|
case HttpEquivAttributeState::Refresh: {
|
||||||
// https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
|
// https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
|
||||||
// 1. If the meta element has no content attribute, or if that attribute's value is the empty string, then return.
|
// 1. If the meta element has no content attribute, or if that attribute's value is the empty string, then return.
|
||||||
|
@ -105,6 +110,17 @@ void HTMLMetaElement::inserted()
|
||||||
document().shared_declarative_refresh_steps(input, this);
|
document().shared_declarative_refresh_steps(input, this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case HttpEquivAttributeState::SetCookie:
|
||||||
|
// https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-set-cookie
|
||||||
|
// This pragma is non-conforming and has no effect.
|
||||||
|
// User agents are required to ignore this pragma.
|
||||||
|
break;
|
||||||
|
case HttpEquivAttributeState::XUACompatible:
|
||||||
|
// https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-x-ua-compatible
|
||||||
|
// In practice, this pragma encourages Internet Explorer to more closely follow the specifications.
|
||||||
|
// For meta elements with an http-equiv attribute in the X-UA-Compatible state, the content attribute must have a value that is an ASCII case-insensitive match for the string "IE=edge".
|
||||||
|
// User agents are required to ignore this pragma.
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
dbgln("FIXME: Implement '{}' http-equiv state", get_attribute_value(AttributeNames::http_equiv));
|
dbgln("FIXME: Implement '{}' http-equiv state", get_attribute_value(AttributeNames::http_equiv));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue