From 7701b7046f9a0adf8eca00878d19e217ee457514 Mon Sep 17 00:00:00 2001 From: Ronald Brill Date: Sat, 14 Oct 2023 19:54:29 +0200 Subject: [PATCH] ie fix --- src/main/java/org/htmlunit/WebWindowImpl.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/htmlunit/WebWindowImpl.java b/src/main/java/org/htmlunit/WebWindowImpl.java index ce918bebad2..e88638b2391 100644 --- a/src/main/java/org/htmlunit/WebWindowImpl.java +++ b/src/main/java/org/htmlunit/WebWindowImpl.java @@ -14,7 +14,6 @@ */ package org.htmlunit; -import static org.htmlunit.BrowserVersionFeatures.JS_STYLESHEETLIST_ACTIVE_ONLY; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_COMPUTED_STYLE_PSEUDO_ACCEPT_WITHOUT_COLON; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_131; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_139; @@ -413,8 +412,6 @@ else if (getWebClient().getBrowserVersion().hasFeature(JS_WINDOW_COMPUTED_STYLE_ final WebClient webClient = getWebClient(); if (webClient.getOptions().isCssEnabled()) { - final boolean onlyActive = webClient.getBrowserVersion().hasFeature(JS_STYLESHEETLIST_ACTIVE_ONLY); - final boolean trace = LOG.isTraceEnabled(); for (final HtmlElement htmlElement : htmlPage.getHtmlElementDescendants()) { CssStyleSheet cssStyleSheet = null; @@ -425,8 +422,9 @@ else if (htmlElement instanceof HtmlLink) { cssStyleSheet = ((HtmlLink) htmlElement).getSheet(); } - if (cssStyleSheet != null && cssStyleSheet.isEnabled() - && (!onlyActive || cssStyleSheet.isActive())) { + if (cssStyleSheet != null + && cssStyleSheet.isEnabled() + && cssStyleSheet.isActive()) { if (trace) { LOG.trace("modifyIfNecessary: " + cssStyleSheet + ", " + computedsStyleDeclaration + ", " + element);