Example #1
0
RenderWidget* HTMLEmbedElement::renderWidgetForJSBindings() const
{
    FrameView* view = document().view();
    if (!view || (!view->isInLayout() && !view->isPainting()))
        document().updateLayoutIgnorePendingStylesheets();
    return findWidgetRenderer(this);
}
RenderWidget* HTMLEmbedElement::renderWidgetLoadingPlugin() const
{
    FrameView* view = document().view();
    if (!view || (!view->isInLayout() && !view->isPainting())) {
        // Needs to load the plugin immediatedly because this function is called
        // when JavaScript code accesses the plugin.
        // FIXME: <rdar://16893708> Check if dispatching events here is safe.
        document().updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks::Synchronously);
    }
    return findWidgetRenderer(this);
}