com.sun.org.apache.xerces.internal.dom.events.MutationEventImpl Java Examples

The following examples show how to use com.sun.org.apache.xerces.internal.dom.events.MutationEventImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DocumentImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #2
Source File: DocumentImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #3
Source File: DocumentImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #4
Source File: DocumentImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #5
Source File: DocumentImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #6
Source File: DocumentImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #7
Source File: DocumentImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #8
Source File: DocumentImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #9
Source File: DocumentImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #10
Source File: DocumentImpl.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #11
Source File: DocumentImpl.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #12
Source File: DocumentImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #13
Source File: DocumentImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #14
Source File: DocumentImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #15
Source File: DocumentImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #16
Source File: DocumentImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #17
Source File: DocumentImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #18
Source File: DocumentImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #19
Source File: DocumentImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #20
Source File: DocumentImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when an attribute node has been removed
 */
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
    // We can't use the standard dispatchAggregate, since it assumes
    // that the Attr is still attached to an owner. This code is
    // similar but dispatches to the previous owner, "element".
    if (mutationEvents) {
        // If we have to send DOMAttrModified (determined earlier),
        // do so.
        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
        if (lc.total > 0) {
            MutationEventImpl me= new MutationEventImpl();
            me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
                                 true, false, attr,
                                 attr.getNodeValue(), null, name,
                                 MutationEvent.REMOVAL);
            dispatchEvent(oldOwner, me);
        }

        // We can hand off to process DOMSubtreeModified, though.
        // Note that only the Element needs to be informed; the
        // Attr's subtree has not been changed by this operation.
        dispatchAggregateEvents(oldOwner, null, null, (short) 0);
    }
}
 
Example #21
Source File: DocumentImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #22
Source File: DocumentImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * A method to be called when a character data node has been modified
 */
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
    if (mutationEvents) {
            if (!replace) {
                    // MUTATION POST-EVENTS:
                    LCount lc =
                            LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
                    if (lc.total > 0) {
                            MutationEvent me = new MutationEventImpl();
                            me.initMutationEvent(
                                    MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
                                    true, false, null,
                                                                            oldvalue, value, null, (short) 0);
                            dispatchEvent(node, me);
                    }

                    // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
                    // if required. (Common to most kinds of mutation)
                    dispatchAggregateEvents(node, savedEnclosingAttr);
            } // End mutation postprocessing
    }
}
 
Example #23
Source File: DocumentImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Pre-mutation context check, in
 * preparation for later generating DOMAttrModified events.
 * Determines whether this node is within an Attr
 * @param node node to get enclosing attribute for
 * @return either a description of that Attr, or null if none such.
 */
protected void saveEnclosingAttr(NodeImpl node) {
    savedEnclosingAttr = null;
    // MUTATION PREPROCESSING AND PRE-EVENTS:
    // If we're within the scope of an Attr and DOMAttrModified
    // was requested, we need to preserve its previous value for
    // that event.
    LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
    if (lc.total > 0) {
        NodeImpl eventAncestor = node;
        while (true) {
            if (eventAncestor == null)
                return;
            int type = eventAncestor.getNodeType();
            if (type == Node.ATTRIBUTE_NODE) {
                EnclosingAttr retval = new EnclosingAttr();
                retval.node = (AttrImpl) eventAncestor;
                retval.oldvalue = retval.node.getNodeValue();
                savedEnclosingAttr = retval;
                return;
            }
            else if (type == Node.ENTITY_REFERENCE_NODE)
                eventAncestor = eventAncestor.parentNode();
            else if (type == Node.TEXT_NODE)
                eventAncestor = eventAncestor.parentNode();
            else
                return;
            // Any other parent means we're not in an Attr
        }
    }
}
 
Example #24
Source File: DocumentImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Pre-mutation context check, in
 * preparation for later generating DOMAttrModified events.
 * Determines whether this node is within an Attr
 * @param node node to get enclosing attribute for
 * @return either a description of that Attr, or null if none such.
 */
protected void saveEnclosingAttr(NodeImpl node) {
    savedEnclosingAttr = null;
    // MUTATION PREPROCESSING AND PRE-EVENTS:
    // If we're within the scope of an Attr and DOMAttrModified
    // was requested, we need to preserve its previous value for
    // that event.
    LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
    if (lc.total > 0) {
        NodeImpl eventAncestor = node;
        while (true) {
            if (eventAncestor == null)
                return;
            int type = eventAncestor.getNodeType();
            if (type == Node.ATTRIBUTE_NODE) {
                EnclosingAttr retval = new EnclosingAttr();
                retval.node = (AttrImpl) eventAncestor;
                retval.oldvalue = retval.node.getNodeValue();
                savedEnclosingAttr = retval;
                return;
            }
            else if (type == Node.ENTITY_REFERENCE_NODE)
                eventAncestor = eventAncestor.parentNode();
            else if (type == Node.TEXT_NODE)
                eventAncestor = eventAncestor.parentNode();
            else
                return;
            // Any other parent means we're not in an Attr
        }
    }
}
 
Example #25
Source File: DocumentImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Pre-mutation context check, in
 * preparation for later generating DOMAttrModified events.
 * Determines whether this node is within an Attr
 * @param node node to get enclosing attribute for
 * @return either a description of that Attr, or null if none such.
 */
protected void saveEnclosingAttr(NodeImpl node) {
    savedEnclosingAttr = null;
    // MUTATION PREPROCESSING AND PRE-EVENTS:
    // If we're within the scope of an Attr and DOMAttrModified
    // was requested, we need to preserve its previous value for
    // that event.
    LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
    if (lc.total > 0) {
        NodeImpl eventAncestor = node;
        while (true) {
            if (eventAncestor == null)
                return;
            int type = eventAncestor.getNodeType();
            if (type == Node.ATTRIBUTE_NODE) {
                EnclosingAttr retval = new EnclosingAttr();
                retval.node = (AttrImpl) eventAncestor;
                retval.oldvalue = retval.node.getNodeValue();
                savedEnclosingAttr = retval;
                return;
            }
            else if (type == Node.ENTITY_REFERENCE_NODE)
                eventAncestor = eventAncestor.parentNode();
            else if (type == Node.TEXT_NODE)
                eventAncestor = eventAncestor.parentNode();
            else
                return;
            // Any other parent means we're not in an Attr
        }
    }
}
 
Example #26
Source File: DocumentImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Pre-mutation context check, in
 * preparation for later generating DOMAttrModified events.
 * Determines whether this node is within an Attr
 * @param node node to get enclosing attribute for
 * @return either a description of that Attr, or null if none such.
 */
protected void saveEnclosingAttr(NodeImpl node) {
    savedEnclosingAttr = null;
    // MUTATION PREPROCESSING AND PRE-EVENTS:
    // If we're within the scope of an Attr and DOMAttrModified
    // was requested, we need to preserve its previous value for
    // that event.
    LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
    if (lc.total > 0) {
        NodeImpl eventAncestor = node;
        while (true) {
            if (eventAncestor == null)
                return;
            int type = eventAncestor.getNodeType();
            if (type == Node.ATTRIBUTE_NODE) {
                EnclosingAttr retval = new EnclosingAttr();
                retval.node = (AttrImpl) eventAncestor;
                retval.oldvalue = retval.node.getNodeValue();
                savedEnclosingAttr = retval;
                return;
            }
            else if (type == Node.ENTITY_REFERENCE_NODE)
                eventAncestor = eventAncestor.parentNode();
            else if (type == Node.TEXT_NODE)
                eventAncestor = eventAncestor.parentNode();
            else
                return;
            // Any other parent means we're not in an Attr
        }
    }
}
 
Example #27
Source File: DocumentImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Pre-mutation context check, in
 * preparation for later generating DOMAttrModified events.
 * Determines whether this node is within an Attr
 * @param node node to get enclosing attribute for
 * @return either a description of that Attr, or null if none such.
 */
protected void saveEnclosingAttr(NodeImpl node) {
    savedEnclosingAttr = null;
    // MUTATION PREPROCESSING AND PRE-EVENTS:
    // If we're within the scope of an Attr and DOMAttrModified
    // was requested, we need to preserve its previous value for
    // that event.
    LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
    if (lc.total > 0) {
        NodeImpl eventAncestor = node;
        while (true) {
            if (eventAncestor == null)
                return;
            int type = eventAncestor.getNodeType();
            if (type == Node.ATTRIBUTE_NODE) {
                EnclosingAttr retval = new EnclosingAttr();
                retval.node = (AttrImpl) eventAncestor;
                retval.oldvalue = retval.node.getNodeValue();
                savedEnclosingAttr = retval;
                return;
            }
            else if (type == Node.ENTITY_REFERENCE_NODE)
                eventAncestor = eventAncestor.parentNode();
            else if (type == Node.TEXT_NODE)
                eventAncestor = eventAncestor.parentNode();
            else
                return;
            // Any other parent means we're not in an Attr
        }
    }
}
 
Example #28
Source File: DocumentImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Pre-mutation context check, in
 * preparation for later generating DOMAttrModified events.
 * Determines whether this node is within an Attr
 * @param node node to get enclosing attribute for
 * @return either a description of that Attr, or null if none such.
 */
protected void saveEnclosingAttr(NodeImpl node) {
    savedEnclosingAttr = null;
    // MUTATION PREPROCESSING AND PRE-EVENTS:
    // If we're within the scope of an Attr and DOMAttrModified
    // was requested, we need to preserve its previous value for
    // that event.
    LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
    if (lc.total > 0) {
        NodeImpl eventAncestor = node;
        while (true) {
            if (eventAncestor == null)
                return;
            int type = eventAncestor.getNodeType();
            if (type == Node.ATTRIBUTE_NODE) {
                EnclosingAttr retval = new EnclosingAttr();
                retval.node = (AttrImpl) eventAncestor;
                retval.oldvalue = retval.node.getNodeValue();
                savedEnclosingAttr = retval;
                return;
            }
            else if (type == Node.ENTITY_REFERENCE_NODE)
                eventAncestor = eventAncestor.parentNode();
            else if (type == Node.TEXT_NODE)
                eventAncestor = eventAncestor.parentNode();
            else
                return;
            // Any other parent means we're not in an Attr
        }
    }
}
 
Example #29
Source File: DocumentImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Pre-mutation context check, in
 * preparation for later generating DOMAttrModified events.
 * Determines whether this node is within an Attr
 * @param node node to get enclosing attribute for
 * @return either a description of that Attr, or null if none such.
 */
protected void saveEnclosingAttr(NodeImpl node) {
    savedEnclosingAttr = null;
    // MUTATION PREPROCESSING AND PRE-EVENTS:
    // If we're within the scope of an Attr and DOMAttrModified
    // was requested, we need to preserve its previous value for
    // that event.
    LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
    if (lc.total > 0) {
        NodeImpl eventAncestor = node;
        while (true) {
            if (eventAncestor == null)
                return;
            int type = eventAncestor.getNodeType();
            if (type == Node.ATTRIBUTE_NODE) {
                EnclosingAttr retval = new EnclosingAttr();
                retval.node = (AttrImpl) eventAncestor;
                retval.oldvalue = retval.node.getNodeValue();
                savedEnclosingAttr = retval;
                return;
            }
            else if (type == Node.ENTITY_REFERENCE_NODE)
                eventAncestor = eventAncestor.parentNode();
            else if (type == Node.TEXT_NODE)
                eventAncestor = eventAncestor.parentNode();
            else
                return;
            // Any other parent means we're not in an Attr
        }
    }
}
 
Example #30
Source File: DocumentImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Pre-mutation context check, in
 * preparation for later generating DOMAttrModified events.
 * Determines whether this node is within an Attr
 * @param node node to get enclosing attribute for
 * @return either a description of that Attr, or null if none such.
 */
protected void saveEnclosingAttr(NodeImpl node) {
    savedEnclosingAttr = null;
    // MUTATION PREPROCESSING AND PRE-EVENTS:
    // If we're within the scope of an Attr and DOMAttrModified
    // was requested, we need to preserve its previous value for
    // that event.
    LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
    if (lc.total > 0) {
        NodeImpl eventAncestor = node;
        while (true) {
            if (eventAncestor == null)
                return;
            int type = eventAncestor.getNodeType();
            if (type == Node.ATTRIBUTE_NODE) {
                EnclosingAttr retval = new EnclosingAttr();
                retval.node = (AttrImpl) eventAncestor;
                retval.oldvalue = retval.node.getNodeValue();
                savedEnclosingAttr = retval;
                return;
            }
            else if (type == Node.ENTITY_REFERENCE_NODE)
                eventAncestor = eventAncestor.parentNode();
            else if (type == Node.TEXT_NODE)
                eventAncestor = eventAncestor.parentNode();
            else
                return;
            // Any other parent means we're not in an Attr
        }
    }
}