From: <rb...@us...> - 2013-12-20 20:46:51
|
Revision: 8885 http://sourceforge.net/p/htmlunit/code/8885 Author: rbri Date: 2013-12-20 20:46:46 +0000 (Fri, 20 Dec 2013) Log Message: ----------- first IE11 fixes (Frank Danek) Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HTMLParser.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlScript.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Node.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NodeList.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributes.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLStyleElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLElementsTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2DTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration3Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclarationTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenListTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection2Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWriteTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement3Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement2Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameElementTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElementTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionElementTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocumentTest.java Added Paths: ----------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -80,26 +80,32 @@ CSS_FONT_STRECH_DEFAULT_NORMAL, /** Indicates that the browser can surrounds image url's with quotes. */ - @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME) }) + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, minVersion = 11) }) CSS_IMAGE_URL_QUOTED, - /** The default value of the display property for the 'keygen' tag is 'inline-block' - * instead of 'inline'. */ + /** The default value of the display property for the 'keygen' tag is 'inline-block' instead of the default one. */ @BrowserFeature(@WebBrowser(value = FF, minVersion = 24)) - CSS_KEYGEN_INLINE_BLOCK, + CSS_KEYGEN_DISPLAY_INLINE_BLOCK, + /** The default value of the display property for the 'noscript' tag is 'inline' instead of the default one. */ + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 8)) + CSS_NOSCRIPT_DISPLAY_INLINE, + /** Indicates that only integers are allowed for pixel value. */ @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) CSS_PIXEL_VALUES_INT_ONLY, + /** The default value of the display property for the 'script' tag is 'inline' instead of the default one. */ + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 8)) + CSS_SCRIPT_DISPLAY_INLINE, + /** Indicates that the :lang(..) selector is supported. */ @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, minVersion = 11) }) CSS_SELECTOR_LANG, - /** The default value of the display property for the 'select' tag is 'inline' - * instead of 'inline-block'. */ + /** The default value of the display property for the 'select' tag is 'inline' instead of the default one. */ @BrowserFeature({ @WebBrowser(value = FF, maxVersion = 17), @WebBrowser(CHROME) }) - CSS_SELECT_INLINE, + CSS_SELECT_DISPLAY_INLINE, /** Throws exception on setting a CSS style value to null. */ @BrowserFeature(@WebBrowser(IE)) @@ -181,7 +187,7 @@ EVENT_ONERROR_EXTERNAL_JAVASCRIPT, /** Triggers "onload" event if external javascript successfully loaded. */ - @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME) }) + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, minVersion = 11) }) EVENT_ONLOAD_EXTERNAL_JAVASCRIPT, /** Triggers "onload" event of the frameset before the one from the frames. */ @@ -209,7 +215,7 @@ EVENT_ONMOUSEUP_NOT_FOR_SELECT_OPTION, /** Triggers "onreadystatechange" event. */ - @BrowserFeature(@WebBrowser(IE)) + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) EVENT_ONREADY_STATE_CHANGE, /** Triggers "propertychange" event. */ @@ -334,10 +340,6 @@ /** Was originally .isIE(). */ @BrowserFeature(@WebBrowser(IE)) - GENERATED_48, - - /** Was originally .isIE(). */ - @BrowserFeature(@WebBrowser(IE)) GENERATED_49, /** Was originally .isIE(). */ @@ -464,8 +466,12 @@ @BrowserFeature({ @WebBrowser(IE), @WebBrowser(FF), @WebBrowser(CHROME) }) HTMLCOLLECTION_IDENTICAL_IDS, + /** HtmlCollection returns null instead of undefined if an element was not found. */ + @BrowserFeature(@WebBrowser(IE)) + HTMLCOLLECTION_NULL_IF_NOT_FOUND, + /** Allow detection of object type for collection elements. */ - @BrowserFeature(@WebBrowser(IE)) + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) HTMLCOLLECTION_OBJECT_DETECTION, /** @@ -564,6 +570,10 @@ @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME) }) HTMLTEXTAREA_SET_DEFAULT_VALUE_UPDATES_VALUE, + /** HTML attributes are always lower case. */ + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, maxVersion = 10) }) + HTML_ATTRIBUTE_LOWER_CASE, + /** Adds CData nodes as Comment elements to the DOM. */ @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, minVersion = 11) }) HTML_CDATA_AS_COMMENT, @@ -714,7 +724,7 @@ JS_DEFERRED, /** Object prototype supports <tt>__defineGetter__</tt> and similar properties. */ - @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME) }) + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, minVersion = 11) }) JS_DEFINE_GETTER, /** Indicates that HTMLDefinition...Elements returning 'HTMLElement' @@ -742,7 +752,7 @@ @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) JS_DOCUMENT_APPEND_CHILD_SUPPORTED, - /** Document instead of HTMLDocument or XMLDocument. */ + /** Document instead of HTMLDocument. */ @BrowserFeature(@WebBrowser(value = IE, minVersion = 11)) JS_DOCUMENT_CLASS_NAME, @@ -783,7 +793,7 @@ JS_DOMIMPLEMENTATION_FEATURE_CORE_1, /** If document.implementation.hasFeature() supports 'CSS2 2.0'. */ - @BrowserFeature(@WebBrowser(FF)) + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(value = IE, minVersion = 11) }) JS_DOMIMPLEMENTATION_FEATURE_CSS2_2, /** If document.implementation.hasFeature() supports 'CSS 2.0'. */ @@ -928,7 +938,7 @@ JS_GET_ATTRIBUTE_SUPPORTS_FLAGS_IN_QUIRKS_MODE, /** Javascript function getBackgroundColor of computed styles returns the color as rgb. */ - @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME) }) + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, minVersion = 11) }) JS_GET_BACKGROUND_COLOR_FOR_COMPUTED_STYLE_AS_RGB, /** Javascript function getElementsByName returns an empty collection if called with empty string. */ @@ -1003,7 +1013,7 @@ JS_INNER_HTML_REDUCE_WHITESPACES, /** Javascript function returning a length (e.g. getWidth) without 'px' at the end. */ - @BrowserFeature(@WebBrowser(IE)) + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 10)) JS_LENGTH_WITHOUT_PX, /** @@ -1110,7 +1120,7 @@ JS_SCRIPT_SUPPORTS_FOR_AND_EVENT, /** Javascript script object supports the onreadystatechange event (IE). */ - @BrowserFeature(@WebBrowser(IE)) + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) JS_SCRIPT_SUPPORTS_ONREADYSTATECHANGE, /** If true the content of a selection is it's default value instead of toString. */ @@ -1150,6 +1160,14 @@ @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) JS_STYLE_GET_ATTRIBUTE_SUPPORTS_FLAGS, + /** Indicates if style.removeAttribute supports a (second) flags argument. */ + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) + JS_STYLE_REMOVE_ATTRIBUTE_SUPPORTS_FLAGS, + + /** Indicates if style.setAttribute supports a (second) flags argument. */ + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) + JS_STYLE_SET_ATTRIBUTE_SUPPORTS_FLAGS, + /** IE supports accessing unsupported style elements via getter * like val = elem.style.htmlunit;. */ @@ -1270,14 +1288,18 @@ JS_XML, /** Indicates that new XMLSerializer().serializeToString(..) adds the xhtml namespace to the root element. */ - @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME) }) + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, minVersion = 11) }) JS_XML_SERIALIZER_ADD_XHTML_NAMESPACE, /** Indicates that new XMLSerializer().serializeToString(..) always appends a CRLF at the end * of the produced string. */ - @BrowserFeature(@WebBrowser(IE)) + @BrowserFeature(@WebBrowser(value = IE, maxVersion = 9)) JS_XML_SERIALIZER_APPENDS_CRLF, + /** Indicates that new XMLSerializer().serializeToString(..) inserts a blank before self-closing a tag. */ + @BrowserFeature(@WebBrowser(value = IE, minVersion = 11)) + JS_XML_SERIALIZER_BLANK_BEFORE_SELF_CLOSING, + /** Indicates that new XMLSerializer().serializeToString(..) respects the XHTML definition for non empty tags. */ @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME) }) JS_XML_SERIALIZER_NON_EMPTY_TAGS, @@ -1438,15 +1460,16 @@ XHR_IGNORE_SAME_ORIGIN_TO_ABOUT, /** Indicates that the onreadystatechange handler is triggered for sync requests for COMPLETED (4). */ - @BrowserFeature({ @WebBrowser(value = FF, minVersion = 10), @WebBrowser(CHROME) }) + @BrowserFeature({ @WebBrowser(value = FF, minVersion = 10), @WebBrowser(CHROME), + @WebBrowser(value = IE, minVersion = 11) }) XHR_ONREADYSTATECANGE_SYNC_REQUESTS_COMPLETED, /** Indicates that the onreadystatechange handler is not triggered for sync requests. */ - @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME) }) + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(CHROME), @WebBrowser(value = IE, minVersion = 11) }) XHR_ONREADYSTATECANGE_SYNC_REQUESTS_NOT_TRIGGERED, /** Indicates that the onreadystatechange handler is triggered with an event parameter (FF). */ - @BrowserFeature(@WebBrowser(FF)) + @BrowserFeature({ @WebBrowser(FF), @WebBrowser(value = IE, minVersion = 11) }) XHR_ONREADYSTATECHANGE_WITH_EVENT_PARAM, /** Indicates if an empty url is allowed as url param for the open method. */ Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -67,7 +67,7 @@ HtmlDivision.TAG_NAME, HtmlDefinitionList.TAG_NAME, HtmlDefinitionTerm.TAG_NAME, HtmlEmbed.TAG_NAME, HtmlEmphasis.TAG_NAME, - HtmlFieldSet.TAG_NAME, HtmlFigure.TAG_NAME, + HtmlFieldSet.TAG_NAME, HtmlFigureCaption.TAG_NAME, HtmlFigure.TAG_NAME, HtmlFont.TAG_NAME, HtmlForm.TAG_NAME, HtmlFooter.TAG_NAME, HtmlFrame.TAG_NAME, HtmlFrameSet.TAG_NAME, HtmlHead.TAG_NAME, HtmlHeader.TAG_NAME, @@ -301,6 +301,14 @@ return UnknownElementFactory.instance.createElementNS(page, namespaceURI, qualifiedName, attributes); } } + else if (tagName.equals(HtmlFigureCaption.TAG_NAME)) { + if (page.getWebClient().getBrowserVersion().hasFeature(HTML5_TAGS)) { + element = new HtmlFigureCaption(namespaceURI, qualifiedName, page, attributeMap); + } + else { + return UnknownElementFactory.instance.createElementNS(page, namespaceURI, qualifiedName, attributes); + } + } else if (tagName.equals(HtmlFont.TAG_NAME)) { element = new HtmlFont(namespaceURI, qualifiedName, page, attributeMap); } Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HTMLParser.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HTMLParser.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HTMLParser.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -15,6 +15,7 @@ package com.gargoylesoftware.htmlunit.html; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.DOCTYPE_IS_COMMENT; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTML_ATTRIBUTE_LOWER_CASE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTML_CDATA_AS_COMMENT; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLCONDITIONAL_COMMENTS; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLIFRAME_IGNORE_SELFCLOSING; @@ -446,6 +447,9 @@ try { setFeature(FEATURE_AUGMENTATIONS, true); setProperty("http://cyberneko.org/html/properties/names/elems", "default"); + if (!webClient.getBrowserVersion().hasFeature(HTML_ATTRIBUTE_LOWER_CASE)) { + setProperty("http://cyberneko.org/html/properties/names/attrs", "no-change"); + } setFeature("http://cyberneko.org/html/features/report-errors", reportErrors); setFeature(FEATURE_PARSE_NOSCRIPT, !webClient.getOptions().isJavaScriptEnabled()); setFeature(HTMLScanner.ALLOW_SELFCLOSING_IFRAME, Added: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java (rev 0) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2013 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.html; + +import java.util.Map; + +import com.gargoylesoftware.htmlunit.SgmlPage; + +/** + * Wrapper for the HTML element "figcaption". + * + * @version $Revision$ + * @author Frank Danek + */ +public class HtmlFigureCaption extends HtmlElement { + + /** The HTML tag represented by this element. */ + public static final String TAG_NAME = "figcaption"; + + /** + * Creates a new instance. + * + * @param namespaceURI the URI that identifies an XML namespace + * @param qualifiedName the qualified name of the element type to instantiate + * @param page the page that contains this element + * @param attributes the initial attributes + */ + HtmlFigureCaption(final String namespaceURI, final String qualifiedName, final SgmlPage page, + final Map<String, DomAttr> attributes) { + super(namespaceURI, qualifiedName, page, attributes); + } +} Property changes on: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Author Date Id Revision \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -14,7 +14,7 @@ */ package com.gargoylesoftware.htmlunit.html; -import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_DISPLAY_DEFAULT; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_NOSCRIPT_DISPLAY_INLINE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.NOSCRIPT_BODY_AS_TEXT; import java.util.Map; @@ -33,6 +33,7 @@ * @author <a href="mailto:cs...@dy...">Christian Sell</a> * @author Ahmed Ashour * @author Ronald Brill + * @author Frank Danek */ public class HtmlNoScript extends HtmlElement { @@ -74,9 +75,9 @@ if (!getPage().getWebClient().getOptions().isJavaScriptEnabled()) { return DisplayStyle.BLOCK; } - if (hasFeature(CSS_DISPLAY_DEFAULT)) { - return DisplayStyle.NONE; + if (hasFeature(CSS_NOSCRIPT_DISPLAY_INLINE)) { + return DisplayStyle.INLINE; } - return DisplayStyle.INLINE; + return DisplayStyle.NONE; } } Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlScript.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlScript.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlScript.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -14,7 +14,7 @@ */ package com.gargoylesoftware.htmlunit.html; -import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_DISPLAY_DEFAULT; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_SCRIPT_DISPLAY_INLINE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_ONERROR_EXTERNAL_JAVASCRIPT; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_ONLOAD_EXTERNAL_JAVASCRIPT; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_ONREADY_STATE_CHANGE; @@ -72,6 +72,7 @@ * @author Sudhan Moghe * @author Ronald Brill * @author Daniel Wagner-Hall + * @author Frank Danek * @see <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-81598695">DOM Level 1</a> * @see <a href="http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-81598695">DOM Level 2</a> */ @@ -619,9 +620,9 @@ */ @Override public DisplayStyle getDefaultStyleDisplay() { - if (hasFeature(CSS_DISPLAY_DEFAULT)) { - return DisplayStyle.NONE; + if (hasFeature(CSS_SCRIPT_DISPLAY_INLINE)) { + return DisplayStyle.INLINE; } - return DisplayStyle.INLINE; + return DisplayStyle.NONE; } } Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -14,7 +14,7 @@ */ package com.gargoylesoftware.htmlunit.html; -import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_DISPLAY_DEFAULT; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.CSS_SELECT_DISPLAY_INLINE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.SELECT_DESELECT_ALL_IF_SWITCHING_UNKNOWN; import java.util.ArrayList; @@ -46,6 +46,7 @@ * @author Daniel Gredler * @author Ahmed Ashour * @author Ronald Brill + * @author Frank Danek */ public class HtmlSelect extends HtmlElement implements DisabledElement, SubmittableElement, FormFieldWithNameHistory { @@ -630,7 +631,7 @@ */ @Override public DisplayStyle getDefaultStyleDisplay() { - if (hasFeature(CSS_DISPLAY_DEFAULT)) { + if (hasFeature(CSS_SELECT_DISPLAY_INLINE)) { return DisplayStyle.INLINE; } return DisplayStyle.INLINE_BLOCK; Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Node.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Node.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Node.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -663,7 +663,7 @@ * @see <a href="http://msdn.microsoft.com/en-us/library/ms536343.aspx">MSDN documentation</a> * @see #addEventListener(String, Function, boolean) */ - @JsxFunction(@WebBrowser(IE)) + @JsxFunction(@WebBrowser(value = IE, maxVersion = 9)) public boolean attachEvent(final String type, final Function listener) { return getEventListenersContainer().addEventListener(StringUtils.substring(type, 2), listener, false); } @@ -968,7 +968,7 @@ * Represents the xml content of the node and its descendants. * @return the xml content of the node and its descendants */ - @JsxGetter(@WebBrowser(IE)) + @JsxGetter(@WebBrowser(value = IE, maxVersion = 9)) public Object getXml() { final DomNode node = getDomNodeOrDie(); if (node.getPage() instanceof XmlPage) { Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NodeList.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NodeList.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NodeList.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -14,7 +14,7 @@ */ package com.gargoylesoftware.htmlunit.javascript.host; -import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.GENERATED_48; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLCOLLECTION_NULL_IF_NOT_FOUND; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.GENERATED_49; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.GENERATED_50; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLCOLLECTION_COMMENT_IS_ELEMENT; @@ -60,6 +60,7 @@ * @author Marc Guillemot * @author Chris Erskine * @author Ahmed Ashour + * @author Frank Danek */ @JsxClass public class NodeList extends SimpleScriptable implements Function, org.w3c.dom.NodeList { @@ -372,7 +373,7 @@ */ private Object nullIfNotFound(final Object object) { if (object == NOT_FOUND) { - if (getBrowserVersion().hasFeature(GENERATED_48)) { + if (getBrowserVersion().hasFeature(HTMLCOLLECTION_NULL_IF_NOT_FOUND)) { return null; } return Context.getUndefinedValue(); Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -14,6 +14,7 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.canvas; +import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.IE; import net.sourceforge.htmlunit.corejs.javascript.Context; import net.sourceforge.htmlunit.corejs.javascript.Function; import net.sourceforge.htmlunit.corejs.javascript.Scriptable; @@ -23,6 +24,7 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter; +import com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser; /** * A JavaScript object for a CanvasRenderingContext2D. @@ -30,6 +32,7 @@ * @version $Revision$ * @author Ahmed Ashour * @author Marc Guillemot + * @author Frank Danek */ @JsxClass public class CanvasRenderingContext2D extends SimpleScriptable { @@ -44,26 +47,6 @@ } /** - * Changes the transformation matrix to apply a translation transformation with the given characteristics. - * @param x the translation distance in the horizontal direction - * @param y the translation distance in the vertical direction - */ - @JsxFunction - public void translate(final Object x, final Object y) { - // empty - } - - /** - * Changes the transformation matrix to apply a scaling transformation with the given characteristics. - * @param x the scale factor in the horizontal direction - * @param y the scale factor in the vertical direction - */ - @JsxFunction - public void scale(final Object x, final Object y) { - //empty - } - - /** * Sets the "fillStyle" property. * @param fillStyle the "fillStyle" property */ @@ -127,42 +110,35 @@ } /** - * Clears the specified rectangular area. + * Draws an arc. * @param x the x * @param y the y - * @param w the width - * @param h the height + * @param radius the radius + * @param startAngle the start angle + * @param endAngle the end angle + * @param anticlockwise is anti-clockwise */ @JsxFunction - public void clearRect(final double x, final double y, final double w, final double h) { + public void arc(final double x, final double y, final double radius, final double startAngle, + final double endAngle, final boolean anticlockwise) { //empty } /** - * Paints the specified rectangular area. - * @param x the x - * @param y the y - * @param w the width - * @param h the height + * Draws an arc. + * @param x1 the x1 + * @param y1 the y1 + * @param x2 the x2 + * @param y2 the y2 + * @param radius the radius */ @JsxFunction - public void fillRect(final double x, final double y, final double w, final double h) { + public void arcTo(final double x1, final double y1, final double x2, final double y2, + final double radius) { //empty } /** - * Strokes the specified rectangular area. - * @param x the x - * @param y the y - * @param w the width - * @param h the height - */ - @JsxFunction - public void strokeRect(final double x, final double y, final double w, final double h) { - //empty - } - - /** * Begins the subpaths. */ @JsxFunction @@ -171,46 +147,53 @@ } /** - * Closes the subpaths. + * Draws a cubic Bézier curve. + * @param cp1x the cp1x + * @param cp1y the cp1y + * @param cp2x the cp2x + * @param cp2y the cp2y + * @param x the x + * @param y the y */ @JsxFunction - public void closePath() { + public void bezierCurveTo(final double cp1x, final double cp1y, final double cp2x, final double cp2y, + final double x, final double y) { //empty } /** - * Creates a new subpath. + * Clears the specified rectangular area. * @param x the x * @param y the y + * @param w the width + * @param h the height */ @JsxFunction - public void moveTo(final double x, final double y) { + public void clearRect(final double x, final double y, final double w, final double h) { //empty } /** - * Connect the last point to the given point. - * @param x the x - * @param y the y + * Creates a new clipping region. */ @JsxFunction - public void lineTo(final double x, final double y) { + public void clip() { //empty } /** - * Pushes state on state stack. + * Closes the subpaths. */ @JsxFunction - public void save() { + public void closePath() { //empty } /** - * Pops state stack and restore state. + * Creates a new, blank ImageData object with the specified dimensions. */ @JsxFunction - public void restore() { + public void createImageData() { //empty } @@ -230,120 +213,101 @@ } /** - * Draws an arc. - * @param x the x - * @param y the y - * @param radius the radius - * @param startAngle the start angle - * @param endAngle the end angle - * @param anticlockwise is anti-clockwise + * Creates a pattern. */ @JsxFunction - public void arc(final double x, final double y, final double radius, final double startAngle, - final double endAngle, final boolean anticlockwise) { + public void createPattern() { //empty } /** - * Draws an arc. - * @param x1 the x1 - * @param y1 the y1 - * @param x2 the x2 - * @param y2 the y2 - * @param radius the radius + * Creates a gradient. */ @JsxFunction - public void arcTo(final double x1, final double y1, final double x2, final double y2, - final double radius) { + public void createRadialGradient() { //empty } /** - * Draws a cubic Bézier curve. - * @param cp1x the cp1x - * @param cp1y the cp1y - * @param cp2x the cp2x - * @param cp2y the cp2y - * @param x the x - * @param y the y + * Draws images onto the canvas. + * @param context the JavaScript context + * @param thisObj the scriptable + * @param args the arguments passed into the method + * @param function the function */ @JsxFunction - public void bezierCurveTo(final double cp1x, final double cp1y, final double cp2x, final double cp2y, - final double x, final double y) { + public static void drawImage( + final Context context, final Scriptable thisObj, final Object[] args, final Function function) { //empty } /** - * Draws a quadratic Bézier curve. - * @param controlPointX the x-coordinate of the control point - * @param controlPointY the y-coordinate of the control point - * @param endPointX the x-coordinate of the end point - * @param endPointY the y-coordinate of the end point + * Fills the shape. */ @JsxFunction - public void quadraticCurveTo(final double controlPointX, final double controlPointY, - final double endPointX, final double endPointY) { + public void fill() { //empty } /** - * Fills the shape. + * Paints the specified rectangular area. + * @param x the x + * @param y the y + * @param w the width + * @param h the height */ @JsxFunction - public void fill() { + public void fillRect(final double x, final double y, final double w, final double h) { //empty } /** - * Calculates the strokes of all the subpaths of the current path. + * Dummy placeholder. */ @JsxFunction - public void stroke() { + public void fillText() { //empty } /** - * Creates a new clipping region. + * Dummy placeholder. */ @JsxFunction - public void clip() { + public void getImageData() { //empty } /** - * Draws images onto the canvas. - * @param context the JavaScript context - * @param thisObj the scriptable - * @param args the arguments passed into the method - * @param function the function + * Dummy placeholder. */ - @JsxFunction - public static void drawImage( - final Context context, final Scriptable thisObj, final Object[] args, final Function function) { + @JsxFunction(@WebBrowser(IE)) + public void getLineDash() { //empty } /** - * Creates a new, blank ImageData object with the specified dimensions. + * Dummy placeholder. */ @JsxFunction - public void createImageData() { + public void getLineData() { //empty } /** - * Creates a pattern. + * Dummy placeholder. */ @JsxFunction - public void createPattern() { + public void isPointInPath() { //empty } /** - * Creates a gradient. + * Connect the last point to the given point. + * @param x the x + * @param y the y */ @JsxFunction - public void createRadialGradient() { + public void lineTo(final double x, final double y) { //empty } @@ -351,15 +315,17 @@ * Dummy placeholder. */ @JsxFunction - public void fillText() { + public void measureText() { //empty } /** - * Dummy placeholder. + * Creates a new subpath. + * @param x the x + * @param y the y */ @JsxFunction - public void getImageData() { + public void moveTo(final double x, final double y) { //empty } @@ -367,15 +333,20 @@ * Dummy placeholder. */ @JsxFunction - public void getLineData() { + public void putImageData() { //empty } /** - * Dummy placeholder. + * Draws a quadratic Bézier curve. + * @param controlPointX the x-coordinate of the control point + * @param controlPointY the y-coordinate of the control point + * @param endPointX the x-coordinate of the end point + * @param endPointY the y-coordinate of the end point */ @JsxFunction - public void isPointInPath() { + public void quadraticCurveTo(final double controlPointX, final double controlPointY, + final double endPointX, final double endPointY) { //empty } @@ -383,15 +354,15 @@ * Dummy placeholder. */ @JsxFunction - public void measureText() { + public void rect() { //empty } /** - * Dummy placeholder. + * Pops state stack and restore state. */ @JsxFunction - public void putImageData() { + public void restore() { //empty } @@ -399,27 +370,65 @@ * Dummy placeholder. */ @JsxFunction - public void rect() { + public void rotate() { //empty } /** - * Dummy placeholder. + * Pushes state on state stack. */ @JsxFunction - public void rotate() { + public void save() { //empty } /** + * Changes the transformation matrix to apply a scaling transformation with the given characteristics. + * @param x the scale factor in the horizontal direction + * @param y the scale factor in the vertical direction + */ + @JsxFunction + public void scale(final Object x, final Object y) { + //empty + } + + /** * Dummy placeholder. */ + @JsxFunction(@WebBrowser(IE)) + public void setLineDash() { + //empty + } + + /** + * Dummy placeholder. + */ @JsxFunction public void setTransform() { //empty } /** + * Calculates the strokes of all the subpaths of the current path. + */ + @JsxFunction + public void stroke() { + //empty + } + + /** + * Strokes the specified rectangular area. + * @param x the x + * @param y the y + * @param w the width + * @param h the height + */ + @JsxFunction + public void strokeRect(final double x, final double y, final double w, final double h) { + //empty + } + + /** * Dummy placeholder. */ @JsxFunction @@ -434,4 +443,14 @@ public void transform() { //empty } + + /** + * Changes the transformation matrix to apply a translation transformation with the given characteristics. + * @param x the translation distance in the horizontal direction + * @param y the translation distance in the vertical direction + */ + @JsxFunction + public void translate(final Object x, final Object y) { + // empty + } } Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -24,6 +24,8 @@ import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_GET_BACKGROUND_COLOR_FOR_COMPUTED_STYLE_AS_RGB; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_OPACITY_ACCEPTS_ARBITRARY_VALUES; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_STYLE_GET_ATTRIBUTE_SUPPORTS_FLAGS; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_STYLE_REMOVE_ATTRIBUTE_SUPPORTS_FLAGS; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_STYLE_SET_ATTRIBUTE_SUPPORTS_FLAGS; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_STYLE_UNSUPPORTED_PROPERTY_GETTER; import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.FF; @@ -942,7 +944,7 @@ * Gets the object's behavior (IE only). * @return the object's behavior */ - @JsxGetter(@WebBrowser(IE)) + @JsxGetter(@WebBrowser(value = IE, maxVersion = 10)) public String getBehavior() { return getStyleAttribute(BEHAVIOR); } @@ -951,7 +953,7 @@ * Sets the object's behavior (IE only). * @param behavior the new behavior */ - @JsxSetter(@WebBrowser(IE)) + @JsxSetter(@WebBrowser(value = IE, maxVersion = 10)) public void setBehavior(final String behavior) { setStyleAttribute(BEHAVIOR, behavior); @@ -2896,6 +2898,24 @@ } /** + * Gets the "pixelHeight" style attribute. + * @return the style attribute + */ + @JsxGetter(@WebBrowser(value = IE, minVersion = 11)) + public int getPixelHeight() { + return pixelValue(getHeight()); + } + + /** + * Sets the "pixelHeight" style attribute. + * @param pixelHeight the new attribute + */ + @JsxSetter(@WebBrowser(value = IE, minVersion = 11)) + public void setPixelHeight(final int pixelHeight) { + setHeight(pixelHeight + "px"); + } + + /** * Gets the "pixelLeft" style attribute. * @return the style attribute */ @@ -2950,6 +2970,24 @@ } /** + * Gets the "pixelWidth" style attribute. + * @return the style attribute + */ + @JsxGetter(@WebBrowser(value = IE, minVersion = 11)) + public int getPixelWidth() { + return pixelValue(getWidth()); + } + + /** + * Sets the "pixelWidth" style attribute. + * @param pixelWidth the new attribute + */ + @JsxSetter(@WebBrowser(value = IE, minVersion = 11)) + public void setPixelWidth(final int pixelWidth) { + setWidth(pixelWidth + "px"); + } + + /** * Gets the "posBottom" style attribute. * @return the style attribute */ @@ -4071,13 +4109,15 @@ */ @JsxFunction(@WebBrowser(IE)) public void setAttribute(final String name, final String value, final Object flag) { - int flagInt; - if (flag == Undefined.instance) { - flagInt = 1; + int flagInt = 0; + if (getBrowserVersion().hasFeature(JS_STYLE_SET_ATTRIBUTE_SUPPORTS_FLAGS)) { + if (flag == Undefined.instance) { + flagInt = 1; + } + else { + flagInt = (int) Context.toNumber(flag); + } } - else { - flagInt = (int) Context.toNumber(flag); - } if (flagInt == 0) { // Case-insensitive. final StyleElement style = getStyleElementCaseInSensitive(name); @@ -4103,13 +4143,15 @@ */ @JsxFunction(@WebBrowser(IE)) public boolean removeAttribute(final String name, final Object flag) { - int flagInt; - if (flag == Undefined.instance) { - flagInt = 1; + int flagInt = 0; + if (getBrowserVersion().hasFeature(JS_STYLE_REMOVE_ATTRIBUTE_SUPPORTS_FLAGS)) { + if (flag == Undefined.instance) { + flagInt = 1; + } + else { + flagInt = (int) Context.toNumber(flag); + } } - else { - flagInt = (int) Context.toNumber(flag); - } if (flagInt == 0) { // Case-insensitive. final StyleElement style = getStyleElementCaseInSensitive(name); Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributes.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributes.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributes.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -16,6 +16,7 @@ import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ff; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ff17up; +import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ff24up; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ffBelow17; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ie11up; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ie8up; @@ -249,6 +250,9 @@ /** The style property -moz-column-count. */ MOZ_COLUMN_COUNT("MozColumnCount", "-moz-column-count", ff("auto")), + /** The style property -moz-column-fill. */ + MOZ_COLUMN_FILL("MozColumnFill", "-moz-column-fill", ff24up("balance")), + /** The style property -moz-column-gap. */ MOZ_COLUMN_GAP("MozColumnGap", "-moz-column-gap", ff("16px")), @@ -304,7 +308,7 @@ MOZ_OPACITY("MozOpacity", "-moz-opacity", ffBelow17("1")), /** The style property -moz-orient. */ - MOZ_ORIENT("MozOrient", "-moz-orient", ff17up("horizontal")), + MOZ_ORIENT("MozOrient", "-moz-orient", ff24up("auto"), ff17up("horizontal")), /** The style property -moz-outline. */ MOZ_OUTLINE("MozOutline", "-moz-outline", ffBelow17("")), @@ -511,7 +515,7 @@ "-ms-content-zooming", ie11up("none")), /** The style property -ms-flex. */ - MS_FLEX("msFlex", "-ms-flex", ie11up("0 0 auto")), + MS_FLEX("msFlex", "-ms-flex", ie11up("0 1 auto")), /** The style property -ms-flex-align. */ MS_FLEX_ALIGN("msFlexAlign", "-ms-flex-align", ie11up("stretch")), @@ -529,7 +533,7 @@ MS_FLEX_LINE_PACK("msFlexLinePack", "-ms-flex-line-pack", ie11up("stretch")), /** The style property -ms-flex-negative. */ - MS_FLEX_NEGATIVE("msFlexNegative", "-ms-flex-negative", ie11up("0")), + MS_FLEX_NEGATIVE("msFlexNegative", "-ms-flex-negative", ie11up("1")), /** The style property -ms-flex-order. */ MS_FLEX_ORDER("msFlexOrder", "-ms-flex-order", ie11up("0")), @@ -595,6 +599,9 @@ /** The style property -ms-hyphens. */ MS_HYPHENS("msHyphens", "-ms-hyphens", ie11up("manual")), + /** The style property -ms-ime-align. */ + MS_IME_ALIGN("msImeAlign", "-ms-ime-align", ie11up("")), + /** The style property -ms-interpolation-mode. */ MS_INTERPOLATION_MODE("msInterpolationMode", "-ms-interpolation-mode", ie11up("undefined")), @@ -647,6 +654,9 @@ /** The style property -ms-scroll-translation. */ MS_SCROLL_TRANSLATION("msScrollTranslation", "-ms-scroll-translation", ie11up("none")), + /** The style property -ms-text-combine-horizontal. */ + MS_TEXT_COMBINE_HORIZONTAL("msTextCombineHorizontal", "-ms-text-combine-horizontal", ie11up("none")), + /** The style property -ms-touch-action. */ MS_TOUCH_ACTION("msTouchAction", "-ms-touch-action", ie11up("auto")), @@ -696,6 +706,15 @@ /** The style property -ms-wrap-through. */ MS_WRAP_THROUGH("msWrapThrough", "-ms-wrap-through", ie11up("wrap")), + /** The style property alignment-content. */ + ALIGN_CONTENT("alignContent", "align-content", ie11up("stretch")), + + /** The style property alignment-items. */ + ALIGN_ITEMS("alignItems", "align-items", ff24up("stretch"), ie11up("stretch")), + + /** The style property alignment-self. */ + ALIGN_SELF("alignSelf", "align-self", ff24up("stretch"), ie11up("auto")), + /** The style property alignment-baseline. */ ALIGNMENT_BASELINE("alignmentBaseline", "alignment-baseline", ie11up("auto")), @@ -765,7 +784,7 @@ BASELINE_SHIFT("baselineShift", "baseline-shift", ie11up("baseline")), /** The style property behavior. */ - BEHAVIOR("behavior", "behavior", ie11up("undefined")), + BEHAVIOR("behavior", "behavior"), /** The style property border-bottom-left-radius. */ BORDER_BOTTOM_LEFT_RADIUS("borderBottomLeftRadius", @@ -776,27 +795,27 @@ "border-bottom-right-radius", ff17up("0px"), ie11up("0px")), /** The style property border-image. */ - BORDER_IMAGE("borderImage", "border-image", ff17up("")), + BORDER_IMAGE("borderImage", "border-image", ff17up(""), ie11up("")), /** The style property border-image-outset. */ BORDER_IMAGE_OUTSET("borderImageOutset", "border-image-outset", - ff17up("0 0 0 0")), + ff17up("0 0 0 0"), ie11up("0")), /** The style property border-image-repeat. */ BORDER_IMAGE_REPEAT("borderImageRepeat", "border-image-repeat", - ff17up("stretch stretch")), + ff17up("stretch stretch"), ie11up("stretch")), /** The style property border-image-slice. */ BORDER_IMAGE_SLICE("borderImageSlice", "border-image-slice", - ff17up("100% 100% 100% 100%")), + ff17up("100% 100% 100% 100%"), ie11up("100%")), /** The style property border-image-source. */ BORDER_IMAGE_SOURCE("borderImageSource", "border-image-source", - ff17up("none")), + ff17up("none"), ie11up("none")), /** The style property border-image-width. */ BORDER_IMAGE_WIDTH("borderImageWidth", "border-image-width", - ff17up("1 1 1 1")), + ff17up("1 1 1 1"), ie11up("1")), /** The style property border-radius. */ BORDER_RADIUS("borderRadius", "border-radius", ff17up(""), ie11up("")), @@ -905,6 +924,27 @@ /** The style property filter. */ FILTER("filter", "filter", ff17up("none"), ieBelow11(""), ie11up("none")), + /** The style property flex. */ + FLEX("flex", "flex", ff24up(""), ie11up("0 1 auto")), + + /** The style property flex-basis. */ + FLEX_BASIS("flexBasis", "flex-basis", ff24up("auto"), ie11up("auto")), + + /** The style property flex-direction. */ + FLEX_DIRECTION("flexDirection", "flex-direction", ff24up("row"), ie11up("row")), + + /** The style property flex-flow. */ + FLEX_FLOW("flexFlow", "flex-flow", ie11up("row nowrap")), + + /** The style property flex-grow. */ + FLEX_GROW("flexGrow", "flex-grow", ff24up("0"), ie11up("0")), + + /** The style property flex-shrink. */ + FLEX_SHRINK("flexShrink", "flex-shrink", ff24up("1"), ie11up("1")), + + /** The style property flex-wrap. */ + FLEX_WRAP("flexWrap", "flex-wrap", ie11up("nowrap")), + /** The style property flood-color. */ FLOOD_COLOR("floodColor", "flood-color", ff17up("rgb(0, 0, 0)"), ie11up("")), @@ -929,6 +969,9 @@ /** The style property ime-mode. */ IME_MODE("imeMode", "ime-mode", ie11up("undefined")), + /** The style property ime-mode. */ + JUSTIFY_CONTENT("justifyContent", "justify-content", ff24up("flex-start"), ie11up("flex-start")), + /** The style property kerning. */ KERNING("kerning", "kerning", ie11up("auto")), @@ -976,6 +1019,9 @@ /** The style property mask. */ MASK("mask", "mask", ff17up("none"), ie11up("none")), + /** The style property order. */ + ORDER("order", "order", ff24up("0"), ie11up("0")), + /** The style property page-break-inside. */ ORPHANS("orphans", "orphans", ie11up("2")), @@ -983,7 +1029,7 @@ OUTLINE_COLOR("outlineColor", "outline-color", ie11up("transparent")), /** The style property page-break-inside. */ - PAGE_BREAK_INSIDE("pageBreakInside", "page-break-inside", ie11up("auto")), + PAGE_BREAK_INSIDE("pageBreakInside", "page-break-inside", ff24up("auto"), ie11up("auto")), /** The style property pause. */ PAUSE("pause", "pause", ffBelow17("")), @@ -1021,7 +1067,7 @@ RICHNESS("richness", "richness", ffBelow17("")), /** The style property ruby-align. */ - RUBY_ALIGN("rubyAlign", "ruby-align", ie11up("auto")), + RUBY_ALIGN("rubyAlign", "ruby-align"), /** The style property ruby-overhang. */ RUBY_OVERHANG("rubyOverhang", "ruby-overhang", ie11up("auto")), @@ -1142,6 +1188,9 @@ /** The style property text-underline-position. */ TEXT_UNDERLINE_POSITION("textUnderlinePosition", "text-underline-position", ie11up("auto")), + /** The style property touch-action. */ + TOUCH_ACTION("touchAction", "touch-action", ie11up("auto")), + /** The style property transform. */ TRANSFORM("transform", "transform", ff17up("none"), ie11up("none")), Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -14,7 +14,7 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.html; -import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.GENERATED_48; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLCOLLECTION_NULL_IF_NOT_FOUND; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.GENERATED_50; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLCOLLECTION_COMMENT_IS_ELEMENT; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLCOLLECTION_IDENTICAL_IDS; @@ -54,6 +54,7 @@ * @author Marc Guillemot * @author Chris Erskine * @author Ahmed Ashour + * @author Frank Danek */ @JsxClass public class HTMLCollection extends NodeList { @@ -254,7 +255,7 @@ */ private Object nullIfNotFound(final Object object) { if (object == NOT_FOUND) { - if (getBrowserVersion().hasFeature(GENERATED_48)) { + if (getBrowserVersion().hasFeature(HTMLCOLLECTION_NULL_IF_NOT_FOUND)) { return null; } return Context.getUndefinedValue(); Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -1274,7 +1274,7 @@ * @param index where to insert the sheet in the collection * @return the newly created stylesheet */ - @JsxFunction(@WebBrowser(IE)) + @JsxFunction(@WebBrowser(value = IE, maxVersion = 9)) public CSSStyleSheet createStyleSheet(final String url, final Object index) { final HTMLLinkElement link = (HTMLLinkElement) createElement("link"); link.setHref(url); Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -96,6 +96,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlDivision; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlFigure; +import com.gargoylesoftware.htmlunit.html.HtmlFigureCaption; import com.gargoylesoftware.htmlunit.html.HtmlFooter; import com.gargoylesoftware.htmlunit.html.HtmlFrameSet; import com.gargoylesoftware.htmlunit.html.HtmlHeader; @@ -164,6 +165,7 @@ @JsxClass(domClass = HtmlAside.class), @JsxClass(domClass = HtmlElement.class), @JsxClass(domClass = HtmlFigure.class), + @JsxClass(domClass = HtmlFigureCaption.class), @JsxClass(domClass = HtmlFooter.class), @JsxClass(domClass = HtmlHeader.class), @JsxClass(domClass = HtmlMark.class), @@ -407,7 +409,7 @@ * Returns the value of the "all" property. * @return the value of the "all" property */ - @JsxGetter(@WebBrowser(IE)) + @JsxGetter(@WebBrowser(value = IE, maxVersion = 9)) public HTMLCollection getAll() { if (all_ == null) { all_ = new HTMLCollection(getDomNodeOrDie(), false, "HTMLElement.all") { @@ -508,7 +510,7 @@ * Returns the document. * @return the document */ - @JsxGetter(@WebBrowser(IE)) + @JsxGetter(@WebBrowser(value = IE, maxVersion = 9)) public DocumentProxy getDocument() { return getWindow().getDocument_js(); } @@ -1303,7 +1305,7 @@ * @param behavior the URL of the behavior to add, or a default behavior name * @return an identifier that can be user later to detach the behavior from the element */ - @JsxFunction(@WebBrowser(IE)) + @JsxFunction(@WebBrowser(value = IE, maxVersion = 9)) public int addBehavior(final String behavior) { // if behavior already defined, then nothing to do if (behaviors_.contains(behavior)) { @@ -2226,7 +2228,7 @@ * Simulates a click on a scrollbar component (IE only). * @param scrollAction the type of scroll action to simulate */ - @JsxFunction(@WebBrowser(IE)) + @JsxFunction(@WebBrowser(value = IE, maxVersion = 9)) public void doScroll(final String scrollAction) { if (((HtmlPage) getDomNodeOrDie().getPage()).isBeingParsed()) { throw Context.reportRuntimeError("The data necessary to complete this operation is not yet available."); @@ -2849,7 +2851,8 @@ * Returns the "dataset" attribute. * @return the "dataset" attribute */ - @JsxGetter({ @WebBrowser(value = FF, minVersion = 10), @WebBrowser(CHROME) }) + @JsxGetter({ @WebBrowser(value = FF, minVersion = 10), @WebBrowser(CHROME), + @WebBrowser(value = IE, minVersion = 11) }) public DOMStringMap getDataset() { return new DOMStringMap(this); } Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLStyleElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLStyleElement.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLStyleElement.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -77,7 +77,7 @@ * Gets the associated sheet (IE). * @return the sheet */ - @JsxGetter(@WebBrowser(IE)) + @JsxGetter(@WebBrowser(value = IE, maxVersion = 9)) public CSSStyleSheet getStyleSheet() { return getSheet(); } Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java 2013-12-20 19:52:06 UTC (rev 8884) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java 2013-12-20 20:46:46 UTC (rev 8885) @@ -250,7 +250,7 @@ * @see <a href="http://msdn2.microsoft.com/en-us/library/ms536687.aspx"> * MSDN Documentation</a> */ - @JsxFunction(@WebBrowser(IE)) + @JsxFunction(@W... [truncated message content] |