From: <rb...@us...> - 2016-07-03 13:05:37
|
Revision: 12835 http://sourceforge.net/p/htmlunit/code/12835 Author: rbri Date: 2016-07-03 13:05:34 +0000 (Sun, 03 Jul 2016) Log Message: ----------- remove todo Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2016-07-03 12:45:40 UTC (rev 12834) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2016-07-03 13:05:34 UTC (rev 12835) @@ -2076,7 +2076,6 @@ public void postMessage(final String message, final String targetOrigin, final Object transfer) { final URL currentURL = getWebWindow().getEnclosedPage().getUrl(); - // TODO: do the same origin check for '/' also if (!"*".equals(targetOrigin) && !"/".equals(targetOrigin)) { URL targetURL = null; try { |
From: <asa...@us...> - 2016-12-03 17:57:26
|
Revision: 13136 http://sourceforge.net/p/htmlunit/code/13136 Author: asashour Date: 2016-12-03 17:57:24 +0000 (Sat, 03 Dec 2016) Log Message: ----------- trivial Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2016-12-03 17:56:24 UTC (rev 13135) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2016-12-03 17:57:24 UTC (rev 13136) @@ -1476,13 +1476,13 @@ final String s = (String) code; final JavaScriptJob job = BackgroundJavaScriptFactory.theFactory(). createJavaScriptJob(timeout, Integer.valueOf(timeout), description, w, s); - id = getWebWindow().getJobManager().addJob(job, page); + id = w.getJobManager().addJob(job, page); } else if (code instanceof Function) { final Function f = (Function) code; final JavaScriptJob job = BackgroundJavaScriptFactory.theFactory(). createJavaScriptJob(timeout, Integer.valueOf(timeout), description, w, f); - id = getWebWindow().getJobManager().addJob(job, page); + id = w.getJobManager().addJob(job, page); } else { throw Context.reportRuntimeError("Unknown type for function."); |
From: <asa...@us...> - 2017-05-30 06:55:47
|
Revision: 14493 http://sourceforge.net/p/htmlunit/code/14493 Author: asashour Date: 2017-05-30 06:55:44 +0000 (Tue, 30 May 2017) Log Message: ----------- Window: fix onclick Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2017-05-30 06:47:30 UTC (rev 14492) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2017-05-30 06:55:44 UTC (rev 14493) @@ -1147,7 +1147,7 @@ */ @JsxGetter public Object getOnclick() { - return getEventHandler(Event.TYPE_LOAD); + return getEventHandler(MouseEvent.TYPE_CLICK); } /** |
From: <asa...@us...> - 2017-05-30 06:58:43
|
Revision: 14494 http://sourceforge.net/p/htmlunit/code/14494 Author: asashour Date: 2017-05-30 06:58:41 +0000 (Tue, 30 May 2017) Log Message: ----------- window handlers (IE) Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2017-05-30 06:55:44 UTC (rev 14493) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2017-05-30 06:58:41 UTC (rev 14494) @@ -3069,7 +3069,7 @@ * Returns the {@code onafterprint} event handler. * @return the {@code onafterprint} event handler */ - @JsxGetter(FF) + @JsxGetter({FF, IE}) public Function getOnafterprint() { return getEventHandler("afterprint"); } @@ -3078,7 +3078,7 @@ * Sets the {@code onafterprint} event handler. * @param onafterprint the {@code onafterprint} event handler */ - @JsxSetter(FF) + @JsxSetter({FF, IE}) public void setOnafterprint(final Object onafterprint) { setHandlerForJavaScript("afterprint", onafterprint); } @@ -3645,7 +3645,7 @@ * Returns the {@code onbeforeprint} event handler. * @return the {@code onbeforeprint} event handler */ - @JsxGetter(FF) + @JsxGetter({FF, IE}) public Function getOnbeforeprint() { return getEventHandler("beforeprint"); } @@ -3654,7 +3654,7 @@ * Sets the {@code onbeforeprint} event handler. * @param onbeforeprint the {@code onbeforeprint} event handler */ - @JsxSetter(FF) + @JsxSetter({FF, IE}) public void setOnbeforeprint(final Object onbeforeprint) { setHandlerForJavaScript("beforeprint", onbeforeprint); } @@ -3807,7 +3807,7 @@ * Returns the {@code onabort} event handler. * @return the {@code onabort} event handler */ - @JsxGetter({CHROME, FF}) + @JsxGetter public Function getOnabort() { return getEventHandler("abort"); } @@ -3816,7 +3816,7 @@ * Sets the {@code onabort} event handler. * @param onabort the {@code onabort} event handler */ - @JsxSetter({CHROME, FF}) + @JsxSetter public void setOnabort(final Object onabort) { setHandlerForJavaScript("abort", onabort); } |
From: <rb...@us...> - 2017-06-27 16:39:46
|
Revision: 14637 http://sourceforge.net/p/htmlunit/code/14637 Author: rbri Date: 2017-06-27 16:39:43 +0000 (Tue, 27 Jun 2017) Log Message: ----------- fix NPE from last commit Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2017-06-27 16:29:37 UTC (rev 14636) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2017-06-27 16:39:43 UTC (rev 14637) @@ -1621,13 +1621,15 @@ final Element e = (Element) element; String normalizedPseudo = pseudoElement; - if (normalizedPseudo != null && normalizedPseudo.startsWith("::")) { - normalizedPseudo = normalizedPseudo.substring(1); + if (normalizedPseudo != null) { + if (normalizedPseudo.startsWith("::")) { + normalizedPseudo = normalizedPseudo.substring(1); + } + else if (getBrowserVersion().hasFeature(JS_WINDOW_COMPUTED_STYLE_PSEUDO_ACCEPT_WITHOUT_COLON) + && !normalizedPseudo.startsWith(":")) { + normalizedPseudo = ":" + normalizedPseudo; + } } - if (getBrowserVersion().hasFeature(JS_WINDOW_COMPUTED_STYLE_PSEUDO_ACCEPT_WITHOUT_COLON) - && !normalizedPseudo.startsWith(":")) { - normalizedPseudo = ":" + normalizedPseudo; - } synchronized (computedStyles_) { final Map<String, CSS2Properties> elementMap = computedStyles_.get(e); |
From: <rb...@us...> - 2018-02-26 20:38:41
|
Revision: 15144 http://sourceforge.net/p/htmlunit/code/15144 Author: rbri Date: 2018-02-26 20:38:37 +0000 (Mon, 26 Feb 2018) Log Message: ----------- try to make the code more robust Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-02-25 16:55:56 UTC (rev 15143) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-02-26 20:38:37 UTC (rev 15144) @@ -2141,7 +2141,8 @@ */ @JsxFunction public void postMessage(final String message, final String targetOrigin, final Object transfer) { - final URL currentURL = getWebWindow().getEnclosedPage().getUrl(); + final Page page = getWebWindow().getEnclosedPage(); + final URL currentURL = page.getUrl(); if (!"*".equals(targetOrigin) && !"/".equals(targetOrigin)) { URL targetURL = null; @@ -2165,6 +2166,7 @@ return; } } + final MessageEvent event = new MessageEvent(); final String origin = currentURL.getProtocol() + "://" + currentURL.getHost() + ':' + currentURL.getPort(); event.initMessageEvent(Event.TYPE_MESSAGE, false, false, message, origin, "", this, transfer); @@ -2171,9 +2173,8 @@ event.setParentScope(this); event.setPrototype(getPrototype(event.getClass())); - final JavaScriptEngine jsEngine - = (JavaScriptEngine) getWebWindow().getWebClient().getJavaScriptEngine(); - final PostponedAction action = new PostponedAction(getDomNodeOrDie().getPage()) { + final JavaScriptEngine jsEngine = (JavaScriptEngine) getWebWindow().getWebClient().getJavaScriptEngine(); + final PostponedAction action = new PostponedAction(page) { @Override public void execute() throws Exception { final ContextAction contextAction = new ContextAction() { |
From: <rb...@us...> - 2018-06-30 13:13:02
|
Revision: 15422 http://sourceforge.net/p/htmlunit/code/15422 Author: rbri Date: 2018-06-30 13:12:59 +0000 (Sat, 30 Jun 2018) Log Message: ----------- fix javadoc Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-06-30 12:06:58 UTC (rev 15421) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-06-30 13:12:59 UTC (rev 15422) @@ -576,9 +576,11 @@ } /** - * Cancels a time-out previously set with the {@link #setTimeout(Object, int, Object)} method. + * Cancels a time-out previously set with the + * {@link #setTimeout(Context, Scriptable, Object[], Function)} method. * - * @param timeoutId identifier for the timeout to clear (returned by {@link #setTimeout(Object, int, Object)}) + * @param timeoutId identifier for the timeout to clear + * as returned by {@link #setTimeout(Context, Scriptable, Object[], Function)} */ @JsxFunction public void clearTimeout(final int timeoutId) { @@ -589,10 +591,11 @@ } /** - * Cancels the interval previously started using the {@link #setInterval(Object, int, Object)} method. + * Cancels the interval previously started using the + * {@link #setInterval(Context, Scriptable, Object[], Function)} method. * Current implementation does nothing. * @param intervalID specifies the interval to cancel as returned by the - * {@link #setInterval(Object, int, Object)} method + * {@link #setInterval(Context, Scriptable, Object[], Function)} method * @see <a href="http://msdn.microsoft.com/en-us/library/ms536353.aspx">MSDN documentation</a> */ @JsxFunction |
From: <rb...@us...> - 2018-07-21 14:40:58
|
Revision: 15492 http://sourceforge.net/p/htmlunit/code/15492 Author: rbri Date: 2018-07-21 14:40:55 +0000 (Sat, 21 Jul 2018) Log Message: ----------- code style Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-07-21 12:36:53 UTC (rev 15491) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-07-21 14:40:55 UTC (rev 15492) @@ -624,7 +624,7 @@ } /** - * special setter for IE to ignore this call. + * Special setter for IE to ignore this call. * @param ignore parame gets ignored */ @JsxSetter(IE) |
From: <rb...@us...> - 2018-07-29 17:50:47
|
Revision: 15503 http://sourceforge.net/p/htmlunit/code/15503 Author: rbri Date: 2018-07-29 17:50:44 +0000 (Sun, 29 Jul 2018) Log Message: ----------- code cleanup Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-07-29 12:22:48 UTC (rev 15502) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-07-29 17:50:44 UTC (rev 15503) @@ -29,6 +29,7 @@ import java.io.IOException; import java.io.ObjectInputStream; +import java.io.Serializable; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; @@ -102,7 +103,6 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter; import com.gargoylesoftware.htmlunit.javascript.host.crypto.Crypto; import com.gargoylesoftware.htmlunit.javascript.host.css.CSS2Properties; -import com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration; import com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleSheet; import com.gargoylesoftware.htmlunit.javascript.host.css.MediaQueryList; import com.gargoylesoftware.htmlunit.javascript.host.css.StyleMedia; @@ -160,6 +160,54 @@ @JsxClass public class Window extends EventTarget implements Function, AutoCloseable { + /** + * Cache computed styles when possible, because their calculation is very expensive. + * We use a weak hash map because we don't want this cache to be the only reason + * nodes are kept around in the JVM, if all other references to them are gone. + */ + private static final class CSSPropertiesCache implements Serializable { + private transient WeakHashMap<Element, Map<String, CSS2Properties>> computedStyles_ = new WeakHashMap<>(); + + public synchronized CSS2Properties get(final Element element, final String normalizedPseudo) { + final Map<String, CSS2Properties> elementMap = computedStyles_.get(element); + if (elementMap != null) { + return elementMap.get(normalizedPseudo); + } + return null; + } + + public synchronized void put(final Element element, final String normalizedPseudo, final CSS2Properties style) { + Map<String, CSS2Properties> elementMap = computedStyles_.get(element); + if (elementMap == null) { + elementMap = new WeakHashMap<>(); + computedStyles_.put(element, elementMap); + } + elementMap.put(normalizedPseudo, style); + } + + public synchronized void nodeChanged(final DomNode changed, final boolean clearParents) { + for (final Iterator<Map.Entry<Element, Map<String, CSS2Properties>>> i + = computedStyles_.entrySet().iterator(); i.hasNext();) { + final Map.Entry<Element, Map<String, CSS2Properties>> entry = i.next(); + final DomNode node = entry.getKey().getDomNodeOrDie(); + if (changed == node + || changed.getParentNode() == node.getParentNode() + || changed.isAncestorOf(node) + || clearParents && node.isAncestorOf(changed)) { + i.remove(); + } + } + } + + public synchronized void clear() { + computedStyles_.clear(); + } + + public synchronized Map<String, CSS2Properties> remove(final Element element) { + return computedStyles_.remove(element); + } + } + private static final Log LOG = LogFactory.getLog(Window.class); /** To be documented. */ @@ -197,12 +245,7 @@ private Object top_ = NOT_FOUND; // top can be set from JS to any value! private Crypto crypto_; - /** - * Cache computed styles when possible, because their calculation is very expensive. - * We use a weak hash map because we don't want this cache to be the only reason - * nodes are kept around in the JVM, if all other references to them are gone. - */ - private transient WeakHashMap<Element, Map<String, CSS2Properties>> computedStyles_ = new WeakHashMap<>(); + private CSSPropertiesCache cssPropertiesCache_ = new CSSPropertiesCache(); private final EnumMap<Type, Storage> storages_ = new EnumMap<>(Type.class); @@ -228,7 +271,7 @@ } /** - * Restores the transient {@link #computedStyles_} map during deserialization. + * Restores the transient {@link #cssPropertiesCache_} map during deserialization. * @param stream the stream to read the object from * @throws IOException if an IO error occurs * @throws ClassNotFoundException if a class is not found @@ -235,7 +278,7 @@ */ private void readObject(final ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); - computedStyles_ = new WeakHashMap<>(); + cssPropertiesCache_ = new CSSPropertiesCache(); } /** @@ -1699,19 +1742,12 @@ } } - synchronized (computedStyles_) { - final Map<String, CSS2Properties> elementMap = computedStyles_.get(e); - if (elementMap != null) { - final CSS2Properties style = elementMap.get(normalizedPseudo); - if (style != null) { - return style; - } - } + final CSS2Properties styleFromCache = cssPropertiesCache_.get(e, normalizedPseudo); + if (styleFromCache != null) { + return styleFromCache; } - final CSSStyleDeclaration original = e.getStyle(); - final CSS2Properties style = new CSS2Properties(original); - + final CSS2Properties style = new CSS2Properties(e.getStyle()); final Object ownerDocument = e.getOwnerDocument(); if (ownerDocument instanceof HTMLDocument) { final StyleSheetList sheets = ((HTMLDocument) ownerDocument).getStyleSheets(); @@ -1726,14 +1762,7 @@ } } - synchronized (computedStyles_) { - Map<String, CSS2Properties> elementMap = computedStyles_.get(element); - if (elementMap == null) { - elementMap = new WeakHashMap<>(); - computedStyles_.put(e, elementMap); - } - elementMap.put(normalizedPseudo, style); - } + cssPropertiesCache_.put(e, normalizedPseudo, style); } return style; } @@ -1902,9 +1931,7 @@ * Clears the computed styles. */ public void clearComputedStyles() { - synchronized (computedStyles_) { - computedStyles_.clear(); - } + cssPropertiesCache_.clear(); } /** @@ -1912,9 +1939,7 @@ * @param element the element to clear its cache */ public void clearComputedStyles(final Element element) { - synchronized (computedStyles_) { - computedStyles_.remove(element); - } + cssPropertiesCache_.remove(element); } /** @@ -2005,21 +2030,10 @@ return; } } + // Apparently it wasn't a stylesheet that changed; be semi-smart about what we evict and when. - synchronized (computedStyles_) { - final boolean clearParents = ATTRIBUTES_AFFECTING_PARENT.contains(attribName); - for (final Iterator<Map.Entry<Element, Map<String, CSS2Properties>>> i - = computedStyles_.entrySet().iterator(); i.hasNext();) { - final Map.Entry<Element, Map<String, CSS2Properties>> entry = i.next(); - final DomNode node = entry.getKey().getDomNodeOrDie(); - if (changed == node - || changed.getParentNode() == node.getParentNode() - || changed.isAncestorOf(node) - || clearParents && node.isAncestorOf(changed)) { - i.remove(); - } - } - } + final boolean clearParents = ATTRIBUTES_AFFECTING_PARENT.contains(attribName); + cssPropertiesCache_.nodeChanged(changed, clearParents); } } |
From: <rb...@us...> - 2018-08-02 17:53:16
|
Revision: 15507 http://sourceforge.net/p/htmlunit/code/15507 Author: rbri Date: 2018-08-02 17:53:13 +0000 (Thu, 02 Aug 2018) Log Message: ----------- revert last change i have to think about this a bit more Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-08-01 20:20:01 UTC (rev 15506) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-08-02 17:53:13 UTC (rev 15507) @@ -168,10 +168,6 @@ private static final class CSSPropertiesCache implements Serializable { private transient WeakHashMap<Element, Map<String, CSS2Properties>> computedStyles_ = new WeakHashMap<>(); - // Dummy value to associate with an Object in the backing Map - private static final Object PRESENT = new Object(); - private transient WeakHashMap<DomNode, Object> cleanedNodes_ = new WeakHashMap<>(); - public synchronized CSS2Properties get(final Element element, final String normalizedPseudo) { final Map<String, CSS2Properties> elementMap = computedStyles_.get(element); if (elementMap != null) { @@ -185,18 +181,13 @@ if (elementMap == null) { elementMap = new WeakHashMap<>(); computedStyles_.put(element, elementMap); - cleanedNodes_.remove(element.getDomNodeOrDie()); } elementMap.put(normalizedPseudo, style); } public synchronized void nodeChanged(final DomNode changed, final boolean clearParents) { - if (cleanedNodes_.containsKey(changed)) { - return; - } - - for (final Iterator<Map.Entry<Element, Map<String, CSS2Properties>>> i - = computedStyles_.entrySet().iterator(); i.hasNext();) { + final Iterator<Map.Entry<Element, Map<String, CSS2Properties>>> i = computedStyles_.entrySet().iterator(); + while (i.hasNext()) { final Map.Entry<Element, Map<String, CSS2Properties>> entry = i.next(); final DomNode node = entry.getKey().getDomNodeOrDie(); if (changed == node @@ -203,7 +194,6 @@ || changed.getParentNode() == node.getParentNode() || changed.isAncestorOf(node) || clearParents && node.isAncestorOf(changed)) { - cleanedNodes_.put(node, PRESENT); i.remove(); } } |
From: <rb...@us...> - 2018-08-03 18:37:39
|
Revision: 15510 http://sourceforge.net/p/htmlunit/code/15510 Author: rbri Date: 2018-08-03 18:37:34 +0000 (Fri, 03 Aug 2018) Log Message: ----------- some experiments Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-08-02 19:25:49 UTC (rev 15509) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-08-03 18:37:34 UTC (rev 15510) @@ -197,6 +197,34 @@ i.remove(); } } + + // maybe this is a better solution but i have to think a bit more about this + // + // if (computedStyles_.isEmpty()) { + // return; + // } + // + // // remove all siblings + // DomNode parent = changed.getParentNode(); + // if (parent != null) { + // for (DomNode sibling : parent.getChildNodes()) { + // computedStyles_.remove(sibling.getScriptableObject()); + // } + // + // if (clearParents) { + // // remove all parents + // while (parent != null) { + // computedStyles_.remove(parent.getScriptableObject()); + // parent = parent.getParentNode(); + // } + // } + // } + // + // // remove changed itself and all descendants + // computedStyles_.remove(changed.getScriptableObject()); + // for (DomNode descendant : changed.getDescendants()) { + // computedStyles_.remove(descendant.getScriptableObject()); + // } } public synchronized void clear() { |