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.StringTO_STRING_TAGSymbol.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.StringgetBackgroundAttachment()Gets thebackgroundAttachmentstyle attribute.java.lang.StringgetBackgroundColor()Gets thebackgroundColorstyle attribute.java.lang.StringgetBackgroundImage()Gets thebackgroundImagestyle attribute.java.lang.StringgetBackgroundPosition()Gets thebackgroundPositionstyle attribute.java.lang.StringgetBackgroundRepeat()Gets thebackgroundRepeatstyle attribute.java.lang.StringgetBorderBottomColor()Gets theborderBottomColorstyle attribute.java.lang.StringgetBorderBottomStyle()Gets theborderBottomStylestyle attribute.java.lang.StringgetBorderBottomWidth()Gets theborderBottomWidthstyle attribute.java.lang.StringgetBorderLeftColor()Gets theborderLeftColorstyle attribute.java.lang.StringgetBorderLeftStyle()Gets theborderLeftStylestyle attribute.java.lang.StringgetBorderLeftWidth()Gets theborderLeftWidthstyle attribute.java.lang.StringgetBorderRightColor()Gets theborderRightColorstyle attribute.java.lang.StringgetBorderRightStyle()Gets theborderRightStylestyle attribute.java.lang.StringgetBorderRightWidth()Gets theborderRightWidthstyle attribute.java.lang.StringgetBorderTopColor()Gets theborderTopColorstyle attribute.java.lang.StringgetBorderTopStyle()Gets theborderTopStylestyle attribute.java.lang.StringgetBorderTopWidth()Gets theborderTopWidthstyle attribute.java.lang.StringgetBottom()Gets thebottomstyle attribute.java.lang.StringgetColor()Gets thecolorstyle attribute.java.lang.StringgetCssFloat()Gets thecssFloatstyle attribute.protected ComputedCssStyleDeclarationgetCssStyleDeclaration()java.lang.StringgetDisplay()Gets thedisplaystyle attribute.java.lang.StringgetFont()Gets thefontstyle attribute.java.lang.StringgetFontFamily()Gets thefontFamilystyle attribute.java.lang.StringgetFontSize()Gets thefontSizestyle attribute.java.lang.StringgetHeight()Gets theheightstyle attribute.java.lang.StringgetLeft()Gets theleftstyle attribute.java.lang.StringgetLetterSpacing()Gets theletterSpacingstyle attribute.java.lang.StringgetLineHeight()Gets thelineHeightstyle attribute.java.lang.StringgetMargin()Gets themarginstyle attribute.java.lang.StringgetMarginBottom()Gets themarginBottomstyle attribute.java.lang.StringgetMarginLeft()Gets themarginLeftstyle attribute.java.lang.StringgetMarginRight()Gets themarginRightstyle attribute.java.lang.StringgetMarginTop()Gets themarginTopstyle attribute.java.lang.StringgetMaxHeight()Gets themaxHeightstyle attribute.java.lang.StringgetMaxWidth()Gets themaxWidthstyle attribute.java.lang.StringgetMinHeight()Gets theminHeightstyle attribute.java.lang.StringgetMinWidth()Gets theminWidthstyle attribute.java.lang.StringgetOpacity()Gets theopacitystyle attribute.java.lang.StringgetOrphans()Gets theorphansstyle attribute.java.lang.StringgetOutlineWidth()Gets theoutlineWidthstyle attribute.java.lang.StringgetPadding()Gets thepaddingstyle attribute.java.lang.StringgetPaddingBottom()Gets thepaddingBottomstyle attribute.java.lang.StringgetPaddingLeft()Gets thepaddingLeftstyle attribute.java.lang.StringgetPaddingRight()Gets thepaddingRightstyle attribute.java.lang.StringgetPaddingTop()Gets thepaddingTopstyle attribute.java.lang.StringgetPosition()Gets thepositionstyle attribute.java.lang.StringgetPropertyValue(java.lang.String name)Gets the value of the specified property of the style.java.lang.StringgetRight()Gets therightstyle attribute.java.lang.StringgetTextIndent()Gets thetextIndentstyle attribute.java.lang.StringgetTop()Gets thetopstyle attribute.java.lang.StringgetVerticalAlign()Gets theverticalAlignstyle attribute.java.lang.StringgetWidows()Gets thewidowsstyle attribute.java.lang.StringgetWordSpacing()Gets thewordSpacingstyle attribute.java.lang.ObjectgetZIndex()Gets thezIndexstyle attribute.voidjsConstructor()JavaScript constructor.protected voidsetStyleAttribute(java.lang.String name, java.lang.String newValue)Sets the specified style attribute.org.htmlunit.corejs.javascript.Scriptablevalues()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- theComputedCssStyleDeclarationthis is base on
-
-
Method Detail
-
jsConstructor
public void jsConstructor()
JavaScript constructor.
-
getCssStyleDeclaration
protected ComputedCssStyleDeclaration getCssStyleDeclaration()
- Overrides:
getCssStyleDeclarationin 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:
valuesin 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:
setStyleAttributein classCSSStyleDeclaration- Parameters:
name- the attribute name (camel-cased)newValue- the attribute value
-
getBackgroundAttachment
public java.lang.String getBackgroundAttachment()
Gets thebackgroundAttachmentstyle attribute.- Overrides:
getBackgroundAttachmentin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBackgroundColor
public java.lang.String getBackgroundColor()
Gets thebackgroundColorstyle attribute.- Overrides:
getBackgroundColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBackgroundImage
public java.lang.String getBackgroundImage()
Gets thebackgroundImagestyle attribute.- Overrides:
getBackgroundImagein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBackgroundPosition
public java.lang.String getBackgroundPosition()
Gets thebackgroundPositionstyle attribute.- Overrides:
getBackgroundPositionin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBackgroundRepeat
public java.lang.String getBackgroundRepeat()
Gets thebackgroundRepeatstyle attribute.- Overrides:
getBackgroundRepeatin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomColor
public java.lang.String getBorderBottomColor()
Gets theborderBottomColorstyle attribute.- Overrides:
getBorderBottomColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomStyle
public java.lang.String getBorderBottomStyle()
Gets theborderBottomStylestyle attribute.- Overrides:
getBorderBottomStylein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomWidth
public java.lang.String getBorderBottomWidth()
Gets theborderBottomWidthstyle attribute.- Overrides:
getBorderBottomWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftColor
public java.lang.String getBorderLeftColor()
Gets theborderLeftColorstyle attribute.- Overrides:
getBorderLeftColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftStyle
public java.lang.String getBorderLeftStyle()
Gets theborderLeftStylestyle attribute.- Overrides:
getBorderLeftStylein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftWidth
public java.lang.String getBorderLeftWidth()
Gets theborderLeftWidthstyle attribute.- Overrides:
getBorderLeftWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderRightColor
public java.lang.String getBorderRightColor()
Gets theborderRightColorstyle attribute.- Overrides:
getBorderRightColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderRightStyle
public java.lang.String getBorderRightStyle()
Gets theborderRightStylestyle attribute.- Overrides:
getBorderRightStylein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderRightWidth
public java.lang.String getBorderRightWidth()
Gets theborderRightWidthstyle attribute.- Overrides:
getBorderRightWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderTopColor
public java.lang.String getBorderTopColor()
Gets theborderTopColorstyle attribute.- Overrides:
getBorderTopColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderTopStyle
public java.lang.String getBorderTopStyle()
Gets theborderTopStylestyle attribute.- Overrides:
getBorderTopStylein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderTopWidth
public java.lang.String getBorderTopWidth()
Gets theborderTopWidthstyle attribute.- Overrides:
getBorderTopWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBottom
public java.lang.String getBottom()
Gets thebottomstyle attribute.- Overrides:
getBottomin classCSSStyleDeclaration- Returns:
- the style attribute
-
getColor
public java.lang.String getColor()
Gets thecolorstyle attribute.- Overrides:
getColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getCssFloat
public java.lang.String getCssFloat()
Gets thecssFloatstyle attribute.- Overrides:
getCssFloatin classCSSStyleDeclaration- Returns:
- the style attribute
-
getDisplay
public java.lang.String getDisplay()
Gets thedisplaystyle attribute.- Overrides:
getDisplayin classCSSStyleDeclaration- Returns:
- the style attribute
-
getFont
public java.lang.String getFont()
Gets thefontstyle attribute.- Overrides:
getFontin classCSSStyleDeclaration- Returns:
- the style attribute
-
getFontFamily
public java.lang.String getFontFamily()
Gets thefontFamilystyle attribute.- Overrides:
getFontFamilyin classCSSStyleDeclaration- Returns:
- the style attribute
-
getFontSize
public java.lang.String getFontSize()
Gets thefontSizestyle attribute.- Overrides:
getFontSizein classCSSStyleDeclaration- Returns:
- the style attribute
-
getLineHeight
public java.lang.String getLineHeight()
Gets thelineHeightstyle attribute.- Overrides:
getLineHeightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getHeight
public java.lang.String getHeight()
Gets theheightstyle attribute.- Overrides:
getHeightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getLeft
public java.lang.String getLeft()
Gets theleftstyle attribute.- Overrides:
getLeftin classCSSStyleDeclaration- Returns:
- the style attribute
-
getLetterSpacing
public java.lang.String getLetterSpacing()
Gets theletterSpacingstyle attribute.- Overrides:
getLetterSpacingin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMargin
public java.lang.String getMargin()
Gets themarginstyle attribute.- Overrides:
getMarginin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMarginBottom
public java.lang.String getMarginBottom()
Gets themarginBottomstyle attribute.- Overrides:
getMarginBottomin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMarginLeft
public java.lang.String getMarginLeft()
Gets themarginLeftstyle attribute.- Overrides:
getMarginLeftin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMarginRight
public java.lang.String getMarginRight()
Gets themarginRightstyle attribute.- Overrides:
getMarginRightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMarginTop
public java.lang.String getMarginTop()
Gets themarginTopstyle attribute.- Overrides:
getMarginTopin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMaxHeight
public java.lang.String getMaxHeight()
Gets themaxHeightstyle attribute.- Overrides:
getMaxHeightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMaxWidth
public java.lang.String getMaxWidth()
Gets themaxWidthstyle attribute.- Overrides:
getMaxWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMinHeight
public java.lang.String getMinHeight()
Gets theminHeightstyle attribute.- Overrides:
getMinHeightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMinWidth
public java.lang.String getMinWidth()
Gets theminWidthstyle attribute.- Overrides:
getMinWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getOpacity
public java.lang.String getOpacity()
Gets theopacitystyle attribute.- Overrides:
getOpacityin classCSSStyleDeclaration- Returns:
- the style attribute
-
getOutlineWidth
public java.lang.String getOutlineWidth()
Gets theoutlineWidthstyle attribute.- Overrides:
getOutlineWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPadding
public java.lang.String getPadding()
Gets thepaddingstyle attribute.- Overrides:
getPaddingin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPaddingBottom
public java.lang.String getPaddingBottom()
Gets thepaddingBottomstyle attribute.- Overrides:
getPaddingBottomin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPaddingLeft
public java.lang.String getPaddingLeft()
Gets thepaddingLeftstyle attribute.- Overrides:
getPaddingLeftin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPaddingRight
public java.lang.String getPaddingRight()
Gets thepaddingRightstyle attribute.- Overrides:
getPaddingRightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPaddingTop
public java.lang.String getPaddingTop()
Gets thepaddingTopstyle attribute.- Overrides:
getPaddingTopin classCSSStyleDeclaration- Returns:
- the style attribute
-
getRight
public java.lang.String getRight()
Gets therightstyle attribute.- Overrides:
getRightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getTextIndent
public java.lang.String getTextIndent()
Gets thetextIndentstyle attribute.- Overrides:
getTextIndentin classCSSStyleDeclaration- Returns:
- the style attribute
-
getTop
public java.lang.String getTop()
Gets thetopstyle attribute.- Overrides:
getTopin classCSSStyleDeclaration- Returns:
- the style attribute
-
getVerticalAlign
public java.lang.String getVerticalAlign()
Gets theverticalAlignstyle attribute.- Overrides:
getVerticalAlignin classCSSStyleDeclaration- Returns:
- the style attribute
-
getWidows
public java.lang.String getWidows()
Gets thewidowsstyle attribute.- Overrides:
getWidowsin classCSSStyleDeclaration- Returns:
- the style attribute
-
getOrphans
public java.lang.String getOrphans()
Gets theorphansstyle attribute.- Overrides:
getOrphansin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPosition
public java.lang.String getPosition()
Gets thepositionstyle attribute.- Overrides:
getPositionin classCSSStyleDeclaration- Returns:
- the style attribute
-
getWordSpacing
public java.lang.String getWordSpacing()
Gets thewordSpacingstyle attribute.- Overrides:
getWordSpacingin classCSSStyleDeclaration- Returns:
- the style attribute
-
getZIndex
public java.lang.Object getZIndex()
Gets thezIndexstyle attribute.- Overrides:
getZIndexin 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:
getPropertyValuein classCSSStyleDeclaration- Parameters:
name- the style property name- Returns:
- empty string if nothing found
-
-