/** * Removes an element from the ID and name maps, if necessary. * @param element the element to be removed from the ID and name maps */ void removeMappedElement(final HtmlElement element) { removeMappedElement(element, false, false); }
/** * Removes an element from the ID and name maps, if necessary. * @param element the element to be removed from the ID and name maps */ void removeMappedElement(final HtmlElement element) { removeMappedElement(element, false, false); }
/** * Removes an element from the ID and name maps, if necessary. * @param element the element to be removed from the ID and name maps */ void removeMappedElement(final HtmlElement element) { removeMappedElement(element, false, false); }
/** * Removes an element from the ID and name maps, if necessary. * @param element the element to be removed from the ID and name maps */ void removeMappedElement(final HtmlElement element) { removeMappedElement(element, false, false); }
/** * Removes an element from the ID and name maps, if necessary. * @param element the element to be removed from the ID and name maps */ void removeMappedElement(final HtmlElement element) { removeMappedElement(element, false, false); }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/> * * @param node the node that has just been removed from the tree */ void notifyNodeRemoved(final DomNode node) { if (node instanceof HtmlElement) { removeMappedElement((HtmlElement) node, true, true); if (node.getNodeName().equals("base")) { calculateBase(); } } }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/> * * @param node the node that has just been removed from the tree */ void notifyNodeRemoved(final DomNode node) { if (node instanceof HtmlElement) { removeMappedElement((HtmlElement) node, true, true); if (node.getNodeName().equals("base")) { calculateBase(); } } }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/> * * @param node the node that has just been removed from the tree */ void notifyNodeRemoved(final DomNode node) { if (node instanceof HtmlElement) { removeMappedElement((HtmlElement) node, true, true); if (node.getNodeName().equals("base")) { calculateBase(); } } }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br> * * @param node the node that has just been removed from the tree */ void notifyNodeRemoved(final DomNode node) { if (node instanceof HtmlElement) { removeMappedElement((HtmlElement) node, true, true); if (node instanceof BaseFrameElement) { frameElements_.remove(node); } for (final HtmlElement child : node.getHtmlElementDescendants()) { if (child instanceof BaseFrameElement) { frameElements_.remove(child); } } if ("base".equals(node.getNodeName())) { calculateBase(); } } }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br> * * @param node the node that has just been removed from the tree */ void notifyNodeRemoved(final DomNode node) { if (node instanceof HtmlElement) { removeMappedElement((HtmlElement) node, true, true); if (node instanceof BaseFrameElement) { frameElements_.remove(node); } for (final HtmlElement child : node.getHtmlElementDescendants()) { if (child instanceof BaseFrameElement) { frameElements_.remove(child); } } if ("base".equals(node.getNodeName())) { calculateBase(); } } }
/** * {@inheritDoc} * Override cloneNode to add cloned elements to the clone, not to the original. */ @Override public HtmlPage cloneNode(final boolean deep) { final HtmlPage result = (HtmlPage) super.cloneNode(deep); result.setScriptObject(getScriptObject()); if (deep) { // fix up idMap_ and result's idMap_s for (final HtmlElement child : result.getAllHtmlChildElements()) { removeMappedElement(child); result.addMappedElement(child); } } return result; }
/** * {@inheritDoc} * Override cloneNode to add cloned elements to the clone, not to the original. */ @Override public HtmlPage cloneNode(final boolean deep) { final HtmlPage result = (HtmlPage) super.cloneNode(deep); result.setScriptObject(getScriptObject()); if (deep) { // fix up idMap_ and result's idMap_s for (final HtmlElement child : result.getAllHtmlChildElements()) { removeMappedElement(child); result.addMappedElement(child); } } return result; }
/** * {@inheritDoc} * Override cloneNode to add cloned elements to the clone, not to the original. */ @Override public HtmlPage cloneNode(final boolean deep) { final HtmlPage result = (HtmlPage) super.cloneNode(deep); result.setScriptObject(getScriptObject()); if (deep) { // fix up idMap_ and result's idMap_s for (final HtmlElement child : result.getAllHtmlChildElements()) { removeMappedElement(child); result.addMappedElement(child); } } return result; }
/** * Removes an attribute specified by name from this element. * @param attributeName the attribute attributeName */ @Override public final void removeAttribute(final String attributeName) { final String value = getAttribute(attributeName); if (value == ATTRIBUTE_NOT_DEFINED) { return; } final HtmlPage htmlPage = getHtmlPageOrNull(); if (htmlPage != null) { htmlPage.removeMappedElement(this); } super.removeAttribute(attributeName); if (htmlPage != null) { htmlPage.addMappedElement(this); final HtmlAttributeChangeEvent event = new HtmlAttributeChangeEvent(this, attributeName, value); fireHtmlAttributeRemoved(event); htmlPage.fireHtmlAttributeRemoved(event); } }
/** * Removes an attribute specified by name from this element. * @param attributeName the attribute attributeName */ @Override public final void removeAttribute(final String attributeName) { final String value = getAttribute(attributeName); if (value == ATTRIBUTE_NOT_DEFINED) { return; } final HtmlPage htmlPage = getHtmlPageOrNull(); if (htmlPage != null) { htmlPage.removeMappedElement(this); } super.removeAttribute(attributeName); if (htmlPage != null) { htmlPage.addMappedElement(this); final HtmlAttributeChangeEvent event = new HtmlAttributeChangeEvent(this, attributeName, value); fireHtmlAttributeRemoved(event); htmlPage.fireHtmlAttributeRemoved(event); } }
/** * {@inheritDoc} */ @Override public void setTextContent(final String textContent) { final boolean mappedElement = HtmlPage.isMappedElement(getOwnerDocument(), getName()); if (mappedElement) { ((HtmlPage) getPage()).removeMappedElement((HtmlElement) getOwnerElement()); } setValue(textContent); if (mappedElement) { ((HtmlPage) getPage()).addMappedElement(getOwnerElement()); } } }
/** * {@inheritDoc} */ @Override public void setTextContent(final String textContent) { final boolean mappedElement = HtmlPage.isMappedElement(getOwnerDocument(), getName()); if (mappedElement) { ((HtmlPage) getPage()).removeMappedElement((HtmlElement) getOwnerElement()); } setValue(textContent); if (mappedElement) { ((HtmlPage) getPage()).addMappedElement(getOwnerElement()); } } }
/** * Removes an attribute specified by name from this element. * @param attributeName the attribute attributeName */ @Override public final void removeAttribute(final String attributeName) { final String value = getAttribute(attributeName); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).removeMappedElement(this); } super.removeAttribute(attributeName); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).addMappedElement(this); final HtmlAttributeChangeEvent event = new HtmlAttributeChangeEvent(this, attributeName, value); fireHtmlAttributeRemoved(event); ((HtmlPage) getPage()).fireHtmlAttributeRemoved(event); } }
/** * Removes an attribute specified by name from this element. * @param attributeName the attribute attributeName */ @Override public final void removeAttribute(final String attributeName) { final String value = getAttribute(attributeName); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).removeMappedElement(this); } super.removeAttribute(attributeName); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).addMappedElement(this); final HtmlAttributeChangeEvent event = new HtmlAttributeChangeEvent(this, attributeName, value); fireHtmlAttributeRemoved(event); ((HtmlPage) getPage()).fireHtmlAttributeRemoved(event); } }
/** * Removes an attribute specified by name from this element. * @param attributeName the attribute attributeName */ @Override public final void removeAttribute(final String attributeName) { final String value = getAttribute(attributeName); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).removeMappedElement(this); } super.removeAttribute(attributeName); if (getPage() instanceof HtmlPage) { ((HtmlPage) getPage()).addMappedElement(this); final HtmlAttributeChangeEvent event = new HtmlAttributeChangeEvent(this, attributeName, value); fireHtmlAttributeRemoved(event); ((HtmlPage) getPage()).fireHtmlAttributeRemoved(event); } }