mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibWeb: Switch to new CSS Parser :^)
Change all the places that were including the deprecated parser, to include the new one instead, and then delete the old parser code. `ParentNode::query_selector[_all]()` now treat their input as a comma-separated list of selectors, instead of just one, and return elements that match any of the selectors in that list. This is according to these specs: - querySelector/querySelectorAll: https://dom.spec.whatwg.org/#ref-for-dom-parentnode-queryselector%E2%91%A0 - selector matching algorithm: https://www.w3.org/TR/selectors-4/#match-against-tree
This commit is contained in:
parent
4065eb169c
commit
3bd14941c7
13 changed files with 37 additions and 2074 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <LibWeb/Bindings/CSSStyleDeclarationWrapper.h>
|
||||
#include <LibWeb/CSS/Parser/DeprecatedCSSParser.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
@ -48,7 +48,7 @@ bool CSSStyleDeclarationWrapper::internal_set(JS::PropertyName const& name, JS::
|
|||
if (vm().exception())
|
||||
return false;
|
||||
|
||||
auto new_value = parse_css_value(CSS::DeprecatedParsingContext {}, css_text, property_id);
|
||||
auto new_value = parse_css_value(CSS::ParsingContext {}, css_text, property_id);
|
||||
// FIXME: What are we supposed to do if we can't parse it?
|
||||
if (!new_value)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue