本文整理汇总了C++中RenderStyle::flowThread方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderStyle::flowThread方法的具体用法?C++ RenderStyle::flowThread怎么用?C++ RenderStyle::flowThread使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderStyle
的用法示例。
在下文中一共展示了RenderStyle::flowThread方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: determineChange
Change determineChange(const RenderStyle& s1, const RenderStyle& s2)
{
if (s1.display() != s2.display())
return Detach;
if (s1.hasPseudoStyle(FIRST_LETTER) != s2.hasPseudoStyle(FIRST_LETTER))
return Detach;
// We just detach if a renderer acquires or loses a column-span, since spanning elements
// typically won't contain much content.
if (s1.columnSpan() != s2.columnSpan())
return Detach;
if (!s1.contentDataEquivalent(&s2))
return Detach;
// When text-combine property has been changed, we need to prepare a separate renderer object.
// When text-combine is on, we use RenderCombineText, otherwise RenderText.
// https://bugs.webkit.org/show_bug.cgi?id=55069
if (s1.hasTextCombine() != s2.hasTextCombine())
return Detach;
// We need to reattach the node, so that it is moved to the correct RenderFlowThread.
if (s1.flowThread() != s2.flowThread())
return Detach;
// When the region thread has changed, we need to prepare a separate render region object.
if (s1.regionThread() != s2.regionThread())
return Detach;
// FIXME: Multicolumn regions not yet supported (http://dev.w3.org/csswg/css-regions/#multi-column-regions)
// When the node has region style and changed its multicol style, we have to prepare
// a separate render region object.
if (s1.hasFlowFrom() && (s1.specifiesColumns() != s2.specifiesColumns()))
return Detach;
if (s1 != s2) {
if (s1.inheritedNotEqual(&s2))
return Inherit;
return NoInherit;
}
// If the pseudoStyles have changed, we want any StyleChange that is not NoChange
// because setStyle will do the right thing with anything else.
if (s1.hasAnyPublicPseudoStyles()) {
for (PseudoId pseudoId = FIRST_PUBLIC_PSEUDOID; pseudoId < FIRST_INTERNAL_PSEUDOID; pseudoId = static_cast<PseudoId>(pseudoId + 1)) {
if (s1.hasPseudoStyle(pseudoId)) {
RenderStyle* ps2 = s2.getCachedPseudoStyle(pseudoId);
if (!ps2)
return NoInherit;
RenderStyle* ps1 = s1.getCachedPseudoStyle(pseudoId);
if (!ps1 || *ps1 != *ps2)
return NoInherit;
}
}
}
return NoChange;
}
示例2: createStyle
RenderStyle RenderNamedFlowFragment::createStyle(const RenderStyle& parentStyle)
{
auto style = RenderStyle::createAnonymousStyleWithDisplay(parentStyle, BLOCK);
style.setFlowThread(parentStyle.flowThread());
style.setRegionThread(parentStyle.regionThread());
style.setRegionFragment(parentStyle.regionFragment());
return style;
}
示例3: ENABLE
PassRef<RenderStyle> RenderNamedFlowFragment::createStyle(const RenderStyle& parentStyle)
{
auto style = RenderStyle::createAnonymousStyleWithDisplay(&parentStyle, BLOCK);
style.get().setFlowThread(parentStyle.flowThread());
style.get().setRegionThread(parentStyle.regionThread());
style.get().setRegionFragment(parentStyle.regionFragment());
#if ENABLE(CSS_SHAPES) && ENABLE(CSS_SHAPE_INSIDE)
style.get().setShapeInside(parentStyle.shapeInside());
#endif
return style;
}