Skip to content

Commit 17b52a6

Browse files
committed
media_query: Treat unknown media type as none
According to https://www.w3.org/TR/mediaqueries-5/ section 3.2, Error Handling, an unknown media-type must be treated as not matching.
1 parent ef0a2cd commit 17b52a6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/media_query.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ litehtml::media_query::ptr litehtml::media_query::create_from_string(const strin
8888
}
8989
} else
9090
{
91-
query->m_media_type = (media_type) value_index(token, media_type_strings, media_type_all);
92-
91+
query->m_media_type = (media_type) value_index(token, media_type_strings, media_type_none);
9392
}
9493
}
9594

0 commit comments

Comments
 (0)