本文整理汇总了C++中StyleResolver::appendAuthorStyleSheets方法的典型用法代码示例。如果您正苦于以下问题:C++ StyleResolver::appendAuthorStyleSheets方法的具体用法?C++ StyleResolver::appendAuthorStyleSheets怎么用?C++ StyleResolver::appendAuthorStyleSheets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StyleResolver
的用法示例。
在下文中一共展示了StyleResolver::appendAuthorStyleSheets方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateActiveStyleSheets
bool DocumentStyleSheetCollection::updateActiveStyleSheets(UpdateFlag updateFlag)
{
if (m_document->inStyleRecalc()) {
// SVG <use> element may manage to invalidate style selector in the middle of a style recalc.
// https://bugs.webkit.org/show_bug.cgi?id=54344
// FIXME: This should be fixed in SVG and the call site replaced by ASSERT(!m_inStyleRecalc).
m_needsUpdateActiveStylesheetsOnStyleRecalc = true;
m_document->scheduleForcedStyleRecalc();
return false;
}
if (!m_document->renderer() || !m_document->attached())
return false;
Vector<RefPtr<StyleSheet> > activeStyleSheets;
collectActiveStyleSheets(activeStyleSheets);
Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets;
activeCSSStyleSheets.append(injectedAuthorStyleSheets());
activeCSSStyleSheets.append(documentAuthorStyleSheets());
collectActiveCSSStyleSheetsFromSeamlessParents(activeCSSStyleSheets, m_document);
filterEnabledCSSStyleSheets(activeCSSStyleSheets, activeStyleSheets);
StyleResolverUpdateType styleResolverUpdateType;
bool requiresFullStyleRecalc;
analyzeStyleSheetChange(updateFlag, activeCSSStyleSheets, styleResolverUpdateType, requiresFullStyleRecalc);
if (styleResolverUpdateType == Reconstruct)
m_document->clearStyleResolver();
else {
StyleResolver* styleResolver = m_document->styleResolver();
if (styleResolverUpdateType == Reset) {
styleResolver->ruleSets().resetAuthorStyle();
styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets);
} else {
ASSERT(styleResolverUpdateType == Additive);
styleResolver->appendAuthorStyleSheets(m_activeAuthorStyleSheets.size(), activeCSSStyleSheets);
}
resetCSSFeatureFlags();
}
m_activeAuthorStyleSheets.swap(activeCSSStyleSheets);
m_styleSheetsForStyleSheetList.swap(activeStyleSheets);
m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets);
m_needsUpdateActiveStylesheetsOnStyleRecalc = false;
m_document->notifySeamlessChildDocumentsOfStylesheetUpdate();
return requiresFullStyleRecalc;
}