mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb: Handle http-equiv pragmas without insertion requirements
These pragmas are either ignored or handled elsewhere
This commit is contained in:
committed by
Andreas Kling
parent
d828d80b75
commit
77610db58c
@@ -90,6 +90,11 @@ void HTMLMetaElement::inserted()
|
||||
auto http_equiv = http_equiv_state();
|
||||
if (http_equiv.has_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: {
|
||||
// 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.
|
||||
@@ -105,6 +110,17 @@ void HTMLMetaElement::inserted()
|
||||
document().shared_declarative_refresh_steps(input, this);
|
||||
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:
|
||||
dbgln("FIXME: Implement '{}' http-equiv state", get_attribute_value(AttributeNames::http_equiv));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user