Package org.htmlunit.javascript.host.css
Class ComputedCSSStyleDeclaration
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.css.CSSStyleDeclaration
-
- org.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,org.htmlunit.corejs.javascript.ConstProperties
,org.htmlunit.corejs.javascript.debug.DebuggableObject
,org.htmlunit.corejs.javascript.Scriptable
,org.htmlunit.corejs.javascript.SymbolScriptable
public class ComputedCSSStyleDeclaration extends CSSStyleDeclaration
An object for a CSSStyleDeclaration, which is computed.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TO_STRING_TAG
Symbol.toStringTag support.
-
Constructor Summary
Constructors Constructor Description ComputedCSSStyleDeclaration()
Creates an instance.ComputedCSSStyleDeclaration(Element element, ComputedCssStyleDeclaration cssStyleDeclaration)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBackgroundAttachment()
Gets thebackgroundAttachment
style attribute.java.lang.String
getBackgroundColor()
Gets thebackgroundColor
style attribute.java.lang.String
getBackgroundImage()
Gets thebackgroundImage
style attribute.java.lang.String
getBackgroundPosition()
Gets thebackgroundPosition
style attribute.java.lang.String
getBackgroundRepeat()
Gets thebackgroundRepeat
style attribute.java.lang.String
getBorderBottomColor()
Gets theborderBottomColor
style attribute.java.lang.String
getBorderBottomStyle()
Gets theborderBottomStyle
style attribute.java.lang.String
getBorderBottomWidth()
Gets theborderBottomWidth
style attribute.java.lang.String
getBorderLeftColor()
Gets theborderLeftColor
style attribute.java.lang.String
getBorderLeftStyle()
Gets theborderLeftStyle
style attribute.java.lang.String
getBorderLeftWidth()
Gets theborderLeftWidth
style attribute.java.lang.String
getBorderRightColor()
Gets theborderRightColor
style attribute.java.lang.String
getBorderRightStyle()
Gets theborderRightStyle
style attribute.java.lang.String
getBorderRightWidth()
Gets theborderRightWidth
style attribute.java.lang.String
getBorderTopColor()
Gets theborderTopColor
style attribute.java.lang.String
getBorderTopStyle()
Gets theborderTopStyle
style attribute.java.lang.String
getBorderTopWidth()
Gets theborderTopWidth
style attribute.java.lang.String
getBottom()
Gets thebottom
style attribute.java.lang.String
getColor()
Gets thecolor
style attribute.java.lang.String
getCssFloat()
Gets thecssFloat
style attribute.protected ComputedCssStyleDeclaration
getCssStyleDeclaration()
java.lang.String
getDisplay()
Gets thedisplay
style attribute.java.lang.String
getFont()
Gets thefont
style attribute.java.lang.String
getFontFamily()
Gets thefontFamily
style attribute.java.lang.String
getFontSize()
Gets thefontSize
style attribute.java.lang.String
getHeight()
Gets theheight
style attribute.java.lang.String
getLeft()
Gets theleft
style attribute.java.lang.String
getLetterSpacing()
Gets theletterSpacing
style attribute.java.lang.String
getLineHeight()
Gets thelineHeight
style attribute.java.lang.String
getMargin()
Gets themargin
style attribute.java.lang.String
getMarginBottom()
Gets themarginBottom
style attribute.java.lang.String
getMarginLeft()
Gets themarginLeft
style attribute.java.lang.String
getMarginRight()
Gets themarginRight
style attribute.java.lang.String
getMarginTop()
Gets themarginTop
style attribute.java.lang.String
getMaxHeight()
Gets themaxHeight
style attribute.java.lang.String
getMaxWidth()
Gets themaxWidth
style attribute.java.lang.String
getMinHeight()
Gets theminHeight
style attribute.java.lang.String
getMinWidth()
Gets theminWidth
style attribute.java.lang.String
getOpacity()
Gets theopacity
style attribute.java.lang.String
getOrphans()
Gets theorphans
style attribute.java.lang.String
getOutlineWidth()
Gets theoutlineWidth
style attribute.java.lang.String
getPadding()
Gets thepadding
style attribute.java.lang.String
getPaddingBottom()
Gets thepaddingBottom
style attribute.java.lang.String
getPaddingLeft()
Gets thepaddingLeft
style attribute.java.lang.String
getPaddingRight()
Gets thepaddingRight
style attribute.java.lang.String
getPaddingTop()
Gets thepaddingTop
style attribute.java.lang.String
getPosition()
Gets theposition
style attribute.java.lang.String
getPropertyValue(java.lang.String name)
Gets the value of the specified property of the style.java.lang.String
getRight()
Gets theright
style attribute.java.lang.String
getTextIndent()
Gets thetextIndent
style attribute.java.lang.String
getTop()
Gets thetop
style attribute.java.lang.String
getVerticalAlign()
Gets theverticalAlign
style attribute.java.lang.String
getWidows()
Gets thewidows
style attribute.java.lang.String
getWordSpacing()
Gets thewordSpacing
style attribute.java.lang.Object
getZIndex()
Gets thezIndex
style attribute.void
jsConstructor()
JavaScript constructor.protected void
setStyleAttribute(java.lang.String name, java.lang.String newValue)
Sets the specified style attribute.org.htmlunit.corejs.javascript.Scriptable
values()
Returns an Iterator allowing to go through all keys contained in this object.-
Methods inherited from class org.htmlunit.javascript.host.css.CSSStyleDeclaration
get, get, getBorderTop, getCssText, getIds, getLength, getOutline, getParentRule, getPropertyPriority, getRubyAlign, getSize, getStyleAttribute, getStyleAttribute, getStylePriority, getWidth, has, isLength, item, jsConstructor, put, removeProperty, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderTop, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBottom, setColor, setCssFloat, setCssText, setDisplay, setFont, setFontFamily, setFontSize, setHeight, setLeft, setLetterSpacing, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOpacity, setOrphans, setOutline, setOutlineWidth, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setParentRule, setPosition, setProperty, setRight, setRubyAlign, setSize, setStyleAttribute, setTextIndent, setTop, setVerticalAlign, setWidows, setWidth, setWordSpacing, setZIndex, toString
-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
-
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
-
-
-
Field Detail
-
TO_STRING_TAG
public static final java.lang.String TO_STRING_TAG
Symbol.toStringTag support.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ComputedCSSStyleDeclaration
public ComputedCSSStyleDeclaration()
Creates an instance.
-
ComputedCSSStyleDeclaration
public ComputedCSSStyleDeclaration(Element element, ComputedCssStyleDeclaration cssStyleDeclaration)
Creates an instance.- Parameters:
element
- the element this belongs tocssStyleDeclaration
- theComputedCssStyleDeclaration
this is base on
-
-
Method Detail
-
jsConstructor
public void jsConstructor()
JavaScript constructor.
-
getCssStyleDeclaration
protected ComputedCssStyleDeclaration getCssStyleDeclaration()
- Overrides:
getCssStyleDeclaration
in classCSSStyleDeclaration
-
values
public org.htmlunit.corejs.javascript.Scriptable values()
Returns an Iterator allowing to go through all keys contained in this object. This method does nothing as the object is read-only.- Overrides:
values
in classCSSStyleDeclaration
- Returns:
- a NativeArrayIterator
-
setStyleAttribute
protected void setStyleAttribute(java.lang.String name, java.lang.String newValue)
Sets the specified style attribute. This method does nothing as the object is read-only.- Overrides:
setStyleAttribute
in classCSSStyleDeclaration
- Parameters:
name
- the attribute name (camel-cased)newValue
- the attribute value
-
getBackgroundAttachment
public java.lang.String getBackgroundAttachment()
Gets thebackgroundAttachment
style attribute.- Overrides:
getBackgroundAttachment
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBackgroundColor
public java.lang.String getBackgroundColor()
Gets thebackgroundColor
style attribute.- Overrides:
getBackgroundColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBackgroundImage
public java.lang.String getBackgroundImage()
Gets thebackgroundImage
style attribute.- Overrides:
getBackgroundImage
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBackgroundPosition
public java.lang.String getBackgroundPosition()
Gets thebackgroundPosition
style attribute.- Overrides:
getBackgroundPosition
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBackgroundRepeat
public java.lang.String getBackgroundRepeat()
Gets thebackgroundRepeat
style attribute.- Overrides:
getBackgroundRepeat
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderBottomColor
public java.lang.String getBorderBottomColor()
Gets theborderBottomColor
style attribute.- Overrides:
getBorderBottomColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderBottomStyle
public java.lang.String getBorderBottomStyle()
Gets theborderBottomStyle
style attribute.- Overrides:
getBorderBottomStyle
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderBottomWidth
public java.lang.String getBorderBottomWidth()
Gets theborderBottomWidth
style attribute.- Overrides:
getBorderBottomWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderLeftColor
public java.lang.String getBorderLeftColor()
Gets theborderLeftColor
style attribute.- Overrides:
getBorderLeftColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderLeftStyle
public java.lang.String getBorderLeftStyle()
Gets theborderLeftStyle
style attribute.- Overrides:
getBorderLeftStyle
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderLeftWidth
public java.lang.String getBorderLeftWidth()
Gets theborderLeftWidth
style attribute.- Overrides:
getBorderLeftWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderRightColor
public java.lang.String getBorderRightColor()
Gets theborderRightColor
style attribute.- Overrides:
getBorderRightColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderRightStyle
public java.lang.String getBorderRightStyle()
Gets theborderRightStyle
style attribute.- Overrides:
getBorderRightStyle
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderRightWidth
public java.lang.String getBorderRightWidth()
Gets theborderRightWidth
style attribute.- Overrides:
getBorderRightWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderTopColor
public java.lang.String getBorderTopColor()
Gets theborderTopColor
style attribute.- Overrides:
getBorderTopColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderTopStyle
public java.lang.String getBorderTopStyle()
Gets theborderTopStyle
style attribute.- Overrides:
getBorderTopStyle
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderTopWidth
public java.lang.String getBorderTopWidth()
Gets theborderTopWidth
style attribute.- Overrides:
getBorderTopWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBottom
public java.lang.String getBottom()
Gets thebottom
style attribute.- Overrides:
getBottom
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getColor
public java.lang.String getColor()
Gets thecolor
style attribute.- Overrides:
getColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getCssFloat
public java.lang.String getCssFloat()
Gets thecssFloat
style attribute.- Overrides:
getCssFloat
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getDisplay
public java.lang.String getDisplay()
Gets thedisplay
style attribute.- Overrides:
getDisplay
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getFont
public java.lang.String getFont()
Gets thefont
style attribute.- Overrides:
getFont
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getFontFamily
public java.lang.String getFontFamily()
Gets thefontFamily
style attribute.- Overrides:
getFontFamily
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getFontSize
public java.lang.String getFontSize()
Gets thefontSize
style attribute.- Overrides:
getFontSize
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getLineHeight
public java.lang.String getLineHeight()
Gets thelineHeight
style attribute.- Overrides:
getLineHeight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getHeight
public java.lang.String getHeight()
Gets theheight
style attribute.- Overrides:
getHeight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getLeft
public java.lang.String getLeft()
Gets theleft
style attribute.- Overrides:
getLeft
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getLetterSpacing
public java.lang.String getLetterSpacing()
Gets theletterSpacing
style attribute.- Overrides:
getLetterSpacing
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMargin
public java.lang.String getMargin()
Gets themargin
style attribute.- Overrides:
getMargin
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMarginBottom
public java.lang.String getMarginBottom()
Gets themarginBottom
style attribute.- Overrides:
getMarginBottom
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMarginLeft
public java.lang.String getMarginLeft()
Gets themarginLeft
style attribute.- Overrides:
getMarginLeft
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMarginRight
public java.lang.String getMarginRight()
Gets themarginRight
style attribute.- Overrides:
getMarginRight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMarginTop
public java.lang.String getMarginTop()
Gets themarginTop
style attribute.- Overrides:
getMarginTop
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMaxHeight
public java.lang.String getMaxHeight()
Gets themaxHeight
style attribute.- Overrides:
getMaxHeight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMaxWidth
public java.lang.String getMaxWidth()
Gets themaxWidth
style attribute.- Overrides:
getMaxWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMinHeight
public java.lang.String getMinHeight()
Gets theminHeight
style attribute.- Overrides:
getMinHeight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMinWidth
public java.lang.String getMinWidth()
Gets theminWidth
style attribute.- Overrides:
getMinWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getOpacity
public java.lang.String getOpacity()
Gets theopacity
style attribute.- Overrides:
getOpacity
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getOutlineWidth
public java.lang.String getOutlineWidth()
Gets theoutlineWidth
style attribute.- Overrides:
getOutlineWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPadding
public java.lang.String getPadding()
Gets thepadding
style attribute.- Overrides:
getPadding
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPaddingBottom
public java.lang.String getPaddingBottom()
Gets thepaddingBottom
style attribute.- Overrides:
getPaddingBottom
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPaddingLeft
public java.lang.String getPaddingLeft()
Gets thepaddingLeft
style attribute.- Overrides:
getPaddingLeft
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPaddingRight
public java.lang.String getPaddingRight()
Gets thepaddingRight
style attribute.- Overrides:
getPaddingRight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPaddingTop
public java.lang.String getPaddingTop()
Gets thepaddingTop
style attribute.- Overrides:
getPaddingTop
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getRight
public java.lang.String getRight()
Gets theright
style attribute.- Overrides:
getRight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getTextIndent
public java.lang.String getTextIndent()
Gets thetextIndent
style attribute.- Overrides:
getTextIndent
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getTop
public java.lang.String getTop()
Gets thetop
style attribute.- Overrides:
getTop
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getVerticalAlign
public java.lang.String getVerticalAlign()
Gets theverticalAlign
style attribute.- Overrides:
getVerticalAlign
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getWidows
public java.lang.String getWidows()
Gets thewidows
style attribute.- Overrides:
getWidows
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getOrphans
public java.lang.String getOrphans()
Gets theorphans
style attribute.- Overrides:
getOrphans
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPosition
public java.lang.String getPosition()
Gets theposition
style attribute.- Overrides:
getPosition
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getWordSpacing
public java.lang.String getWordSpacing()
Gets thewordSpacing
style attribute.- Overrides:
getWordSpacing
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getZIndex
public java.lang.Object getZIndex()
Gets thezIndex
style attribute.- Overrides:
getZIndex
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPropertyValue
public java.lang.String getPropertyValue(java.lang.String name)
Gets the value of the specified property of the style.- Overrides:
getPropertyValue
in classCSSStyleDeclaration
- Parameters:
name
- the style property name- Returns:
- empty string if nothing found
-
-