LibWeb: Move window.open TokenizedFeature parsing into its own file

This commit is contained in:
Andrew Kaster
2024-05-27 15:54:11 -06:00
committed by Tim Flynn
parent 79143833b6
commit e2d50dc5dd
5 changed files with 216 additions and 177 deletions

View File

@@ -6,6 +6,9 @@
#pragma once
#include <AK/HashMap.h>
#include <AK/String.h>
namespace Web::HTML::TokenizedFeature {
#define TOKENIZED_FEATURE(Feature) \
@@ -24,4 +27,16 @@ TOKENIZED_FEATURE(Scrollbars);
TOKENIZED_FEATURE(Status);
TOKENIZED_FEATURE(Toolbar);
using Map = OrderedHashMap<String, String>;
}
namespace Web::HTML {
TokenizedFeature::Map tokenize_open_features(StringView features);
TokenizedFeature::Popup check_if_a_popup_window_is_requested(TokenizedFeature::Map const&);
template<Enum T>
T parse_boolean_feature(StringView value);
}