org.w3c.dom.events.MutationEvent Java Examples

The following examples show how to use org.w3c.dom.events.MutationEvent. 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 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 #2
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 #3
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 #4
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 #5
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 #6
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 #7
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 #8
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 #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 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 #10
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 #11
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 #12
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 #13
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 #14
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 #15
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 #16
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 #17
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 #18
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 #19
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 #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 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 #21
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 #22
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 #23
Source File: DocumentImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * A method to be called when an attribute value has been modified
 */
void modifiedAttrValue(AttrImpl attr, String oldvalue) {
    if (mutationEvents) {
        // MUTATION POST-EVENTS:
        dispatchAggregateEvents(attr, attr, oldvalue,
                                MutationEvent.MODIFICATION);
    }
}
 
Example #24
Source File: DocumentImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * A method to be called when an attribute value has been modified
 */
void modifiedAttrValue(AttrImpl attr, String oldvalue) {
    if (mutationEvents) {
        // MUTATION POST-EVENTS:
        dispatchAggregateEvents(attr, attr, oldvalue,
                                MutationEvent.MODIFICATION);
    }
}
 
Example #25
Source File: DocumentImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Convenience wrapper for calling
 * dispatchAggregateEvents when the context was established
 * by <code>savedEnclosingAttr</code>.
 * @param node node to dispatch to
 * @param ea description of Attr affected by current operation
 */
protected void dispatchAggregateEvents(NodeImpl node, EnclosingAttr ea) {
    if (ea != null)
        dispatchAggregateEvents(node, ea.node, ea.oldvalue,
                                MutationEvent.MODIFICATION);
    else
        dispatchAggregateEvents(node, null, null, (short) 0);

}
 
Example #26
Source File: DocumentImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * A method to be called when an attribute node has been set
 */
void setAttrNode(AttrImpl attr, AttrImpl previous) {
    if (mutationEvents) {
        // MUTATION POST-EVENTS:
        if (previous == null) {
            dispatchAggregateEvents(attr.ownerNode, attr, null,
                                    MutationEvent.ADDITION);
        }
        else {
            dispatchAggregateEvents(attr.ownerNode, attr,
                                    previous.getNodeValue(),
                                    MutationEvent.MODIFICATION);
        }
    }
}
 
Example #27
Source File: DocumentImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Convenience wrapper for calling
 * dispatchAggregateEvents when the context was established
 * by <code>savedEnclosingAttr</code>.
 * @param node node to dispatch to
 * @param ea description of Attr affected by current operation
 */
protected void dispatchAggregateEvents(NodeImpl node, EnclosingAttr ea) {
    if (ea != null)
        dispatchAggregateEvents(node, ea.node, ea.oldvalue,
                                MutationEvent.MODIFICATION);
    else
        dispatchAggregateEvents(node, null, null, (short) 0);

}
 
Example #28
Source File: DocumentImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * NON-DOM INTERNAL: Convenience wrapper for calling
 * dispatchAggregateEvents when the context was established
 * by <code>savedEnclosingAttr</code>.
 * @param node node to dispatch to
 * @param ea description of Attr affected by current operation
 */
protected void dispatchAggregateEvents(NodeImpl node, EnclosingAttr ea) {
    if (ea != null)
        dispatchAggregateEvents(node, ea.node, ea.oldvalue,
                                MutationEvent.MODIFICATION);
    else
        dispatchAggregateEvents(node, null, null, (short) 0);

}
 
Example #29
Source File: DocumentImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * A method to be called when an attribute node has been set
 */
void setAttrNode(AttrImpl attr, AttrImpl previous) {
    if (mutationEvents) {
        // MUTATION POST-EVENTS:
        if (previous == null) {
            dispatchAggregateEvents(attr.ownerNode, attr, null,
                                    MutationEvent.ADDITION);
        }
        else {
            dispatchAggregateEvents(attr.ownerNode, attr,
                                    previous.getNodeValue(),
                                    MutationEvent.MODIFICATION);
        }
    }
}
 
Example #30
Source File: DocumentImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * A method to be called when an attribute value has been modified
 */
void modifiedAttrValue(AttrImpl attr, String oldvalue) {
    if (mutationEvents) {
        // MUTATION POST-EVENTS:
        dispatchAggregateEvents(attr, attr, oldvalue,
                                MutationEvent.MODIFICATION);
    }
}