From: <rb...@us...> - 2018-06-23 09:50:53
|
Revision: 15380 http://sourceforge.net/p/htmlunit/code/15380 Author: rbri Date: 2018-06-23 09:50:50 +0000 (Sat, 23 Jun 2018) Log Message: ----------- ff60 support (wip) Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnknownElement.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2018-06-21 19:22:38 UTC (rev 15379) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2018-06-23 09:50:50 UTC (rev 15380) @@ -67,7 +67,7 @@ CSS_COMPUTED_NO_Z_INDEX, /** Is display style of HtmlDialog is 'none'. */ - @BrowserFeature(CHROME) + @BrowserFeature({CHROME, FF60}) CSS_DIALOG_NONE, /** Is display style 'block'. */ @@ -115,7 +115,7 @@ CSS_RP_DISPLAY_NONE, /** The default value of the display property for the 'rt' tag is always 'ruby-text'. */ - @BrowserFeature({IE, FF}) + @BrowserFeature({IE, FF60}) CSS_RT_DISPLAY_RUBY_TEXT_ALWAYS, /** The default value of the display property for the 'ruby' tag is 'inline'. */ @@ -1466,7 +1466,7 @@ RESETINPUT_DEFAULT_VALUE_IF_VALUE_NOT_DEFINED, /** The default display style of slot is 'content'. */ - @BrowserFeature(CHROME) + @BrowserFeature({CHROME, FF60}) SLOT_CONTENTS, /** Indicates that string.includes() is supported. */ Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnknownElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnknownElement.java 2018-06-21 19:22:38 UTC (rev 15379) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnknownElement.java 2018-06-23 09:50:50 UTC (rev 15380) @@ -14,10 +14,12 @@ */ package com.gargoylesoftware.htmlunit.html; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_DIALOG_NONE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_RP_DISPLAY_NONE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_RT_DISPLAY_RUBY_TEXT_ALWAYS; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_RUBY_DISPLAY_INLINE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.MULTICOL_BLOCK; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.SLOT_CONTENTS; import java.util.Map; @@ -98,18 +100,26 @@ } break; case HtmlRt.TAG_NAME: - if (wasCreatedByJavascript() && getParentNode() == null) { + if (!hasFeature(CSS_RT_DISPLAY_RUBY_TEXT_ALWAYS) + && wasCreatedByJavascript() && getParentNode() == null) { return DisplayStyle.BLOCK; } - if (hasFeature(CSS_RT_DISPLAY_RUBY_TEXT_ALWAYS)) { - return DisplayStyle.RUBY_TEXT; - } - break; + return DisplayStyle.RUBY_TEXT; case HtmlMultiColumn.TAG_NAME: if (hasFeature(MULTICOL_BLOCK)) { return DisplayStyle.BLOCK; } break; + case HtmlDialog.TAG_NAME: + if (hasFeature(CSS_DIALOG_NONE)) { + return DisplayStyle.NONE; + } + break; + case HtmlSlot.TAG_NAME: + if (getPage().getWebClient().getBrowserVersion().hasFeature(SLOT_CONTENTS)) { + return DisplayStyle.CONTENTS; + } + break; default: } return DisplayStyle.INLINE; |