summaryrefslogtreecommitdiffstats
path: root/layout/style/ServoStyleSet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/style/ServoStyleSet.cpp')
-rw-r--r--layout/style/ServoStyleSet.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp
index cfc38849b8..22359fa82d 100644
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -34,6 +34,7 @@
#include "mozilla/dom/CSSContainerRule.h"
#include "mozilla/dom/CSSLayerBlockRule.h"
#include "mozilla/dom/CSSLayerStatementRule.h"
+#include "mozilla/dom/CSSMarginRule.h"
#include "mozilla/dom/CSSMediaRule.h"
#include "mozilla/dom/CSSMozDocumentRule.h"
#include "mozilla/dom/CSSKeyframesRule.h"
@@ -41,7 +42,9 @@
#include "mozilla/dom/CSSNamespaceRule.h"
#include "mozilla/dom/CSSPageRule.h"
#include "mozilla/dom/CSSPropertyRule.h"
+#include "mozilla/dom/CSSScopeRule.h"
#include "mozilla/dom/CSSSupportsRule.h"
+#include "mozilla/dom/CSSStartingStyleRule.h"
#include "mozilla/dom/FontFaceSet.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ElementInlines.h"
@@ -764,7 +767,7 @@ bool ServoStyleSet::GeneratedContentPseudoExists(
if (!aPseudoStyle.StyleContent()->mContent.IsItems()) {
return false;
}
- MOZ_ASSERT(aPseudoStyle.StyleContent()->ContentCount() > 0,
+ MOZ_ASSERT(!aPseudoStyle.StyleContent()->NonAltContentItems().IsEmpty(),
"IsItems() implies we have at least one item");
// display:none is equivalent to not having a pseudo at all.
if (aPseudoStyle.StyleDisplay()->mDisplay == StyleDisplay::None) {
@@ -992,6 +995,7 @@ void ServoStyleSet::RuleChangedInternal(StyleSheet& aSheet, css::Rule& aRule,
CASE_FOR(Import, Import)
CASE_FOR(Media, Media)
CASE_FOR(Keyframes, Keyframes)
+ CASE_FOR(Margin, Margin)
CASE_FOR(FontFeatureValues, FontFeatureValues)
CASE_FOR(FontPaletteValues, FontPaletteValues)
CASE_FOR(FontFace, FontFace)
@@ -1002,6 +1006,8 @@ void ServoStyleSet::RuleChangedInternal(StyleSheet& aSheet, css::Rule& aRule,
CASE_FOR(LayerBlock, LayerBlock)
CASE_FOR(LayerStatement, LayerStatement)
CASE_FOR(Container, Container)
+ CASE_FOR(Scope, Scope)
+ CASE_FOR(StartingStyle, StartingStyle)
// @namespace can only be inserted / removed when there are only other
// @namespace and @import rules, and can't be mutated.
case StyleCssRuleType::Namespace:
@@ -1010,9 +1016,6 @@ void ServoStyleSet::RuleChangedInternal(StyleSheet& aSheet, css::Rule& aRule,
// FIXME: We should probably just forward to the parent @keyframes rule? I
// think that'd do the right thing, but meanwhile...
return MarkOriginsDirty(ToOriginFlags(aSheet.GetOrigin()));
- case StyleCssRuleType::Margin:
- // Margin rules not implemented yet, see bug 1864737
- break;
}
#undef CASE_FOR
@@ -1394,6 +1397,13 @@ void ServoStyleSet::MaybeInvalidateRelativeSelectorClassDependency(
mRawData.get(), &aElement, &aSnapshots);
}
+void ServoStyleSet::MaybeInvalidateRelativeSelectorCustomStateDependency(
+ const Element& aElement, nsAtom* state,
+ const ServoElementSnapshotTable& aSnapshots) {
+ Servo_StyleSet_MaybeInvalidateRelativeSelectorCustomStateDependency(
+ mRawData.get(), &aElement, state, &aSnapshots);
+}
+
void ServoStyleSet::MaybeInvalidateRelativeSelectorAttributeDependency(
const Element& aElement, nsAtom* aAttribute,
const ServoElementSnapshotTable& aSnapshots) {
@@ -1465,6 +1475,12 @@ bool ServoStyleSet::HasNthOfStateDependency(const Element& aElement,
aState.GetInternalValue());
}
+bool ServoStyleSet::HasNthOfCustomStateDependency(const Element& aElement,
+ nsAtom* aState) const {
+ return Servo_StyleSet_HasNthOfCustomStateDependency(mRawData.get(), &aElement,
+ aState);
+}
+
void ServoStyleSet::RestyleSiblingsForNthOf(const Element& aElement,
uint32_t aFlags) const {
Servo_StyleSet_RestyleSiblingsForNthOf(&aElement, aFlags);