Example #1
0
void WEXPORT WPopupMenu::attachMenu( WWindow *win, int idx ) {
/************************************************************/

    setOwner( win );
    attachItem( win, idx );
    attachChildren( win );
}
Example #2
0
void WEXPORT WPopupMenu::attachMenu( WWindow *win, gui_ctl_idx position )
/***********************************************************************/
{
    setOwner( win );
    attachItem( win, position );
    attachChildren( win );
}
Example #3
0
void WEXPORT WPopupMenu::track( WWindow *owner ) {
/************************************************/

    gui_point   p;

    GUIGetMousePosn( owner->handle(), &p );
    setFloatingPopup( TRUE );
    attachChildren( owner );
    GUITrackFloatingPopup( owner->handle(), &p, GUI_TRACK_BOTH, NULL );
    setFloatingPopup( FALSE );
}
Example #4
0
static void attachShadowRoot(ShadowRoot& shadowRoot)
{
    if (shadowRoot.attached())
        return;
    StyleResolver& styleResolver = shadowRoot.document().ensureStyleResolver();
    styleResolver.pushParentShadowRoot(&shadowRoot);

    attachChildren(shadowRoot);

    styleResolver.popParentShadowRoot(&shadowRoot);

    shadowRoot.clearNeedsStyleRecalc();
    shadowRoot.setAttached(true);
}
Example #5
0
void attachRenderTree(Element* current, const AttachContext& context)
{
    PostAttachCallbackDisabler callbackDisabler(current);
    WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;

    if (current->hasCustomStyleResolveCallbacks())
        current->willAttachRenderers();

    createRendererIfNeeded(current, context);

    if (current->parentElement() && current->parentElement()->isInCanvasSubtree())
        current->setIsInCanvasSubtree(true);

    current->updateBeforePseudoElement(NoChange);

    StyleResolverParentPusher parentPusher(current);

    // When a shadow root exists, it does the work of attaching the children.
    if (ShadowRoot* shadowRoot = current->shadowRoot()) {
        parentPusher.push();
        attachShadowRoot(shadowRoot, context);
    } else if (current->firstChild())
        parentPusher.push();

    attachChildren(current, context);

    Node* sibling = current->nextSibling();
    if (current->renderer() && sibling && !sibling->renderer() && sibling->attached())
        Text::createTextRenderersForSiblingsAfterAttachIfNeeded(sibling);

    current->setAttached(true);
    current->clearNeedsStyleRecalc();

    if (Document* document = current->document()) {
        if (AXObjectCache* cache = document->axObjectCache())
            cache->updateCacheAfterNodeIsAttached(current);
    }

    current->updateAfterPseudoElement(NoChange);

    current->updateFocusAppearanceAfterAttachIfNeeded();
    
    if (current->hasCustomStyleResolveCallbacks())
        current->didAttachRenderers();
}
Example #6
0
void ContainerNode::attach()
{
    attachChildren();
    Node::attach();
}