コード例 #1
0
void attachTextRenderer(Text& textNode)
{
    createTextRendererIfNeeded(textNode);

    textNode.setAttached(true);
    textNode.clearNeedsStyleRecalc();
}
コード例 #2
0
static void updateTextStyle(Text& text, RenderStyle* parentElementStyle, Style::Change change)
{
    RenderText* renderer = toRenderText(text.renderer());

    if (change != Style::NoChange && renderer)
        renderer->setStyle(parentElementStyle);

    if (!text.needsStyleRecalc())
        return;
    if (renderer)
        renderer->setText(text.dataImpl());
    else
        attachTextRenderer(text);
    text.clearNeedsStyleRecalc();
}