1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

LibWeb: Remove checking for AllowedDataUrlType

CSS shouldn't probably check if a MIME type in the 'data:' URL is
correct or not. Every URL gets sent to a ResourceLoader so a client can
just validate if got file with correct media type.

This also makes loading 'data:' URLs in @import work now, as we didn't
have AllowedDataUrlType for stylesheets.
This commit is contained in:
Karol Kosek 2023-07-06 15:29:33 +02:00 committed by Andreas Kling
parent 58017a0581
commit 16836e7e62
2 changed files with 12 additions and 36 deletions

View file

@ -266,13 +266,8 @@ private:
Optional<ExplicitGridTrack> parse_track_sizing_function(ComponentValue const&);
Optional<PositionValue> parse_position(TokenStream<ComponentValue>&, PositionValue initial_value = PositionValue::center());
enum class AllowedDataUrlType {
None,
Image,
Font,
};
Optional<AK::URL> parse_url_function(ComponentValue const&, AllowedDataUrlType = AllowedDataUrlType::None);
ErrorOr<RefPtr<StyleValue>> parse_url_value(ComponentValue const&, AllowedDataUrlType = AllowedDataUrlType::None);
Optional<AK::URL> parse_url_function(ComponentValue const&);
ErrorOr<RefPtr<StyleValue>> parse_url_value(ComponentValue const&);
Optional<Vector<LinearColorStopListElement>> parse_linear_color_stop_list(TokenStream<ComponentValue>&);
Optional<Vector<AngularColorStopListElement>> parse_angular_color_stop_list(TokenStream<ComponentValue>&);