本文整理汇总了C++中RuleFeatureSet类的典型用法代码示例。如果您正苦于以下问题:C++ RuleFeatureSet类的具体用法?C++ RuleFeatureSet怎么用?C++ RuleFeatureSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RuleFeatureSet类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetCSSFeatureFlags
void StyleEngine::resetCSSFeatureFlags(const RuleFeatureSet& features)
{
m_usesSiblingRules = features.usesSiblingRules();
m_usesFirstLineRules = features.usesFirstLineRules();
m_usesWindowInactiveSelector = features.usesWindowInactiveSelector();
m_maxDirectAdjacentSelectors = features.maxDirectAdjacentSelectors();
}
示例2: combineCSSFeatureFlags
void StyleEngine::combineCSSFeatureFlags(const RuleFeatureSet& features)
{
// Delay resetting the flags until after next style recalc since unapplying the style may not work without these set (this is true at least with before/after).
m_usesSiblingRules = m_usesSiblingRules || features.usesSiblingRules();
m_usesFirstLineRules = m_usesFirstLineRules || features.usesFirstLineRules();
m_maxDirectAdjacentSelectors = max(m_maxDirectAdjacentSelectors, features.maxDirectAdjacentSelectors());
}
示例3: collectFeaturesTo
void ScopedStyleResolver::collectFeaturesTo(RuleFeatureSet& features, WillBeHeapHashSet<RawPtrWillBeMember<const StyleSheetContents>>& visitedSharedStyleSheetContents) const
{
for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) {
ASSERT(m_authorStyleSheets[i]->ownerNode());
StyleSheetContents* contents = m_authorStyleSheets[i]->contents();
if (contents->hasOneClient() || visitedSharedStyleSheetContents.add(contents).isNewEntry)
features.add(contents->ruleSet().features());
}
if (!m_treeBoundaryCrossingRuleSet)
return;
for (const auto& rules : *m_treeBoundaryCrossingRuleSet)
features.add(rules->m_ruleSet->features());
}
示例4: collectFeaturesTo
void ScopedStyleResolver::collectFeaturesTo(RuleFeatureSet& features, HashSet<const StyleSheetContents*>& visitedSharedStyleSheetContents)
{
for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) {
StyleSheetContents* contents = m_authorStyleSheets[i]->contents();
if (contents->hasOneClient() || visitedSharedStyleSheetContents.add(contents).isNewEntry)
features.add(contents->ruleSet().features());
}
}
示例5: collectFeaturesFromRuleData
static void collectFeaturesFromRuleData(RuleFeatureSet& features, const RuleData& ruleData)
{
bool hasSiblingSelector;
features.collectFeaturesFromSelector(*ruleData.selector(), hasSiblingSelector);
if (hasSiblingSelector)
features.siblingRules.append(RuleFeature(ruleData.rule(), ruleData.selectorIndex(), ruleData.hasDocumentSecurityOrigin()));
if (ruleData.containsUncommonAttributeSelector())
features.uncommonAttributeRules.append(RuleFeature(ruleData.rule(), ruleData.selectorIndex(), ruleData.hasDocumentSecurityOrigin()));
}
示例6: collectFeaturesFromRuleSubSet
void TreeBoundaryCrossingRules::collectFeaturesFromRuleSubSet(CSSStyleSheetRuleSubSet* ruleSubSet, RuleFeatureSet& features)
{
for (CSSStyleSheetRuleSubSet::iterator it = ruleSubSet->begin(); it != ruleSubSet->end(); ++it)
features.add(it->second->features());
}