[CSS Container Queries] Support CSSOM
https://bugs.webkit.org/show_bug.cgi?id=238500
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
* web-platform-tests/css/css-contain/container-queries/at-container-serialization-expected.txt:
* web-platform-tests/css/css-contain/container-queries/idlharness-expected.txt:
Source/WebCore:
Add CSSContainerRule interface.
https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
* css/CSSContainerRule.cpp: Added.
(WebCore::CSSContainerRule::CSSContainerRule):
(WebCore::CSSContainerRule::create):
(WebCore::CSSContainerRule::styleRuleContainer const):
(WebCore::CSSContainerRule::cssText const):
(WebCore::CSSContainerRule::conditionText const):
Implementation, the only real functionality is serialization.
* css/CSSContainerRule.h: Added.
* css/CSSContainerRule.idl: Added.
Interface.
* css/ContainerQuery.cpp:
(WebCore::CQ::serialize):
(WebCore::serialize):
Query syntax serialization support.
* css/ContainerQuery.h:
* css/ContainerQueryParser.cpp:
(WebCore::ContainerQueryParser::consumeContainerQuery):
Remember the text of unknown queries.
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper const):
LayoutTests:
* TestExpectations:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@292045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/css/StyleRule.cpp b/Source/WebCore/css/StyleRule.cpp
index ea3fa1f..831ea30 100644
--- a/Source/WebCore/css/StyleRule.cpp
+++ b/Source/WebCore/css/StyleRule.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "StyleRule.h"
+#include "CSSContainerRule.h"
#include "CSSCounterStyleRule.h"
#include "CSSDeferredParser.h"
#include "CSSFontFaceRule.h"
@@ -194,7 +195,7 @@
rule = CSSLayerStatementRule::create(downcast<StyleRuleLayer>(self), parentSheet);
break;
case StyleRuleType::Container:
- // FIXME: Implement CSSOM.
+ rule = CSSContainerRule::create(downcast<StyleRuleContainer>(self), parentSheet);
break;
case StyleRuleType::Unknown:
case StyleRuleType::Charset: