Skip to content

Commit

Permalink
ie fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 14, 2023
1 parent 3de6aae commit 7701b70
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/org/htmlunit/WebWindowImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 7701b70

Please sign in to comment.