2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* DOM object returned from element.getComputedStyle() */
|
|
|
|
|
|
|
|
#ifndef nsComputedDOMStyle_h__
|
|
|
|
#define nsComputedDOMStyle_h__
|
|
|
|
|
2013-03-02 16:31:48 -08:00
|
|
|
#include "nsAutoPtr.h"
|
2012-09-14 09:10:08 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsCOMPtr.h"
|
2013-03-02 16:31:48 -08:00
|
|
|
#include "nscore.h"
|
2013-09-23 06:28:55 -07:00
|
|
|
#include "nsCSSProps.h"
|
2013-03-02 16:31:48 -08:00
|
|
|
#include "nsDOMCSSDeclaration.h"
|
2012-08-05 20:00:56 -07:00
|
|
|
#include "nsStyleContext.h"
|
2013-03-02 16:31:48 -08:00
|
|
|
#include "nsIWeakReferenceUtils.h"
|
2013-09-15 18:06:52 -07:00
|
|
|
#include "mozilla/gfx/Types.h"
|
|
|
|
#include "nsCoord.h"
|
|
|
|
#include "nsColor.h"
|
2013-03-17 00:55:15 -07:00
|
|
|
#include "nsIContent.h"
|
2013-03-02 16:31:48 -08:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class Element;
|
|
|
|
}
|
|
|
|
}
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-10-03 03:58:01 -07:00
|
|
|
struct nsComputedStyleMap;
|
2012-08-05 20:00:56 -07:00
|
|
|
class nsIFrame;
|
2010-04-10 13:09:38 -07:00
|
|
|
class nsIPresShell;
|
2012-10-01 09:49:41 -07:00
|
|
|
class nsDOMCSSValueList;
|
2014-06-18 17:57:51 -07:00
|
|
|
struct nsMargin;
|
2012-10-01 09:49:41 -07:00
|
|
|
class nsROCSSPrimitiveValue;
|
2014-06-18 17:57:51 -07:00
|
|
|
struct nsStyleBackground;
|
|
|
|
struct nsStyleBorder;
|
|
|
|
struct nsStyleContent;
|
|
|
|
struct nsStyleColumn;
|
|
|
|
struct nsStyleColor;
|
2013-09-15 18:06:52 -07:00
|
|
|
class nsStyleCoord;
|
|
|
|
class nsStyleCorners;
|
2014-06-18 17:57:51 -07:00
|
|
|
struct nsStyleDisplay;
|
|
|
|
struct nsStyleFilter;
|
|
|
|
struct nsStyleFont;
|
2013-09-15 18:06:52 -07:00
|
|
|
class nsStyleGradient;
|
2014-06-18 17:57:51 -07:00
|
|
|
struct nsStyleImage;
|
|
|
|
struct nsStyleList;
|
|
|
|
struct nsStyleMargin;
|
|
|
|
struct nsStyleOutline;
|
|
|
|
struct nsStylePadding;
|
|
|
|
struct nsStylePosition;
|
|
|
|
struct nsStyleQuotes;
|
2013-09-15 18:06:52 -07:00
|
|
|
class nsStyleSides;
|
2014-06-18 17:57:51 -07:00
|
|
|
struct nsStyleSVG;
|
|
|
|
struct nsStyleSVGReset;
|
|
|
|
struct nsStyleTable;
|
|
|
|
struct nsStyleText;
|
|
|
|
struct nsStyleTextReset;
|
2013-09-15 18:06:52 -07:00
|
|
|
class nsStyleTimingFunction;
|
2014-06-18 17:57:51 -07:00
|
|
|
struct nsStyleUIReset;
|
|
|
|
struct nsStyleVisibility;
|
|
|
|
struct nsStyleXUL;
|
|
|
|
struct nsTimingFunction;
|
2013-08-14 04:33:03 -07:00
|
|
|
class gfx3DMatrix;
|
2010-04-10 13:09:38 -07:00
|
|
|
|
2012-08-23 21:08:08 -07:00
|
|
|
class nsComputedDOMStyle MOZ_FINAL : public nsDOMCSSDeclaration
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2014-02-05 03:10:44 -08:00
|
|
|
typedef nsCSSProps::KTableValue KTableValue;
|
|
|
|
|
2008-11-27 09:44:26 -08:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2012-08-05 19:16:30 -07:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsComputedDOMStyle,
|
|
|
|
nsICSSDeclaration)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_DECL_NSICSSDECLARATION
|
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
NS_DECL_NSIDOMCSSSTYLEDECLARATION_HELPER
|
|
|
|
virtual already_AddRefed<mozilla::dom::CSSValue>
|
|
|
|
GetPropertyCSSValue(const nsAString& aProp, mozilla::ErrorResult& aRv)
|
|
|
|
MOZ_OVERRIDE;
|
2012-12-14 09:40:38 -08:00
|
|
|
using nsICSSDeclaration::GetPropertyCSSValue;
|
2013-05-14 09:33:23 -07:00
|
|
|
virtual void IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aPropName) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-17 14:01:56 -07:00
|
|
|
enum StyleType {
|
|
|
|
eDefaultOnly, // Only includes UA and user sheets
|
|
|
|
eAll // Includes all stylesheets
|
|
|
|
};
|
|
|
|
|
2012-07-06 05:28:33 -07:00
|
|
|
nsComputedDOMStyle(mozilla::dom::Element* aElement,
|
|
|
|
const nsAString& aPseudoElt,
|
2012-10-17 14:01:56 -07:00
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
StyleType aStyleType);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-09-14 09:10:08 -07:00
|
|
|
virtual nsINode *GetParentObject() MOZ_OVERRIDE
|
2009-07-13 04:14:57 -07:00
|
|
|
{
|
|
|
|
return mContent;
|
|
|
|
}
|
|
|
|
|
2009-08-10 15:52:29 -07:00
|
|
|
static already_AddRefed<nsStyleContext>
|
2010-04-30 06:12:06 -07:00
|
|
|
GetStyleContextForElement(mozilla::dom::Element* aElement, nsIAtom* aPseudo,
|
2012-10-17 14:01:56 -07:00
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
StyleType aStyleType = eAll);
|
2009-08-10 15:52:29 -07:00
|
|
|
|
2009-08-20 14:52:47 -07:00
|
|
|
static already_AddRefed<nsStyleContext>
|
2010-04-30 06:12:06 -07:00
|
|
|
GetStyleContextForElementNoFlush(mozilla::dom::Element* aElement,
|
|
|
|
nsIAtom* aPseudo,
|
2012-10-17 14:01:56 -07:00
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
StyleType aStyleType = eAll);
|
2009-08-20 14:52:47 -07:00
|
|
|
|
|
|
|
static nsIPresShell*
|
|
|
|
GetPresShellForContent(nsIContent* aContent);
|
|
|
|
|
2010-04-02 18:58:25 -07:00
|
|
|
// Helper for nsDOMWindowUtils::GetVisitedDependentComputedStyle
|
2011-09-28 23:19:26 -07:00
|
|
|
void SetExposeVisitedStyle(bool aExpose) {
|
2010-04-02 18:58:25 -07:00
|
|
|
NS_ASSERTION(aExpose != mExposeVisitedStyle, "should always be changing");
|
|
|
|
mExposeVisitedStyle = aExpose;
|
|
|
|
}
|
|
|
|
|
2010-07-14 13:58:56 -07:00
|
|
|
// nsDOMCSSDeclaration abstract methods which should never be called
|
|
|
|
// on a nsComputedDOMStyle object, but must be defined to avoid
|
|
|
|
// compile errors.
|
2012-09-14 09:10:08 -07:00
|
|
|
virtual mozilla::css::Declaration* GetCSSDeclaration(bool) MOZ_OVERRIDE;
|
|
|
|
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration*) MOZ_OVERRIDE;
|
|
|
|
virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE;
|
|
|
|
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE;
|
2010-07-14 13:58:56 -07:00
|
|
|
|
2013-05-29 17:38:27 -07:00
|
|
|
static nsROCSSPrimitiveValue* MatrixToCSSValue(gfx3DMatrix& aMatrix);
|
2013-05-23 01:41:40 -07:00
|
|
|
|
2013-10-03 03:58:01 -07:00
|
|
|
static void RegisterPrefChangeCallbacks();
|
|
|
|
static void UnregisterPrefChangeCallbacks();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
private:
|
2014-06-26 09:29:06 -07:00
|
|
|
virtual ~nsComputedDOMStyle();
|
|
|
|
|
2009-02-24 16:14:45 -08:00
|
|
|
void AssertFlushedPendingReflows() {
|
|
|
|
NS_ASSERTION(mFlushedPendingReflows,
|
|
|
|
"property getter should have been marked layout-dependent");
|
|
|
|
}
|
2010-04-27 09:15:01 -07:00
|
|
|
|
2013-04-04 07:00:07 -07:00
|
|
|
nsMargin GetAdjustedValuesForBoxSizing();
|
|
|
|
|
2013-10-27 13:56:32 -07:00
|
|
|
// Helper method for DoGetTextAlign[Last].
|
|
|
|
mozilla::dom::CSSValue* CreateTextAlignValue(uint8_t aAlign,
|
|
|
|
bool aAlignTrue,
|
2014-02-05 03:10:44 -08:00
|
|
|
const KTableValue aTable[]);
|
2013-12-11 18:09:45 -08:00
|
|
|
// This indicates error by leaving mStyleContextHolder null.
|
|
|
|
void UpdateCurrentStyleSources(bool aNeedsLayoutFlush);
|
|
|
|
void ClearCurrentStyleSources();
|
2013-10-27 13:56:32 -07:00
|
|
|
|
2013-04-01 18:45:48 -07:00
|
|
|
#define STYLE_STRUCT(name_, checkdata_cb_) \
|
2013-02-16 13:51:02 -08:00
|
|
|
const nsStyle##name_ * Style##name_() { \
|
|
|
|
return mStyleContextHolder->Style##name_(); \
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
#include "nsStyleStructList.h"
|
|
|
|
#undef STYLE_STRUCT
|
|
|
|
|
2011-03-04 09:28:57 -08:00
|
|
|
// All of the property getters below return a pointer to a refcounted object
|
|
|
|
// that has just been created, but the refcount is still 0. Caller must take
|
|
|
|
// ownership.
|
2008-09-30 22:50:52 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetEllipseRadii(const nsStyleCorners& aRadius,
|
|
|
|
uint8_t aFullCorner,
|
|
|
|
bool aIsBorder); // else outline
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetOffsetWidthFor(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetAbsoluteOffset(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetRelativeOffset(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-08-15 17:31:32 -07:00
|
|
|
mozilla::dom::CSSValue* GetStickyOffset(mozilla::css::Side aSide);
|
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetStaticOffset(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetPaddingWidthFor(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetBorderColorsFor(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetBorderStyleFor(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetBorderWidthFor(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetBorderColorFor(mozilla::css::Side aSide);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetMarginWidthFor(mozilla::css::Side aSide);
|
2011-03-04 09:28:57 -08:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetSVGPaintFor(bool aFill);
|
2010-07-14 13:58:55 -07:00
|
|
|
|
2014-03-10 15:54:13 -07:00
|
|
|
mozilla::dom::CSSValue* GetGridLineNames(const nsTArray<nsString>& aLineNames);
|
|
|
|
mozilla::dom::CSSValue* GetGridTrackSize(const nsStyleCoord& aMinSize,
|
|
|
|
const nsStyleCoord& aMaxSize);
|
2014-03-27 08:54:40 -07:00
|
|
|
mozilla::dom::CSSValue* GetGridTemplateColumnsRows(const nsStyleGridTemplate& aTrackList);
|
2014-03-10 15:54:17 -07:00
|
|
|
mozilla::dom::CSSValue* GetGridLine(const nsStyleGridLine& aGridLine);
|
2014-03-10 15:54:13 -07:00
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool GetLineHeightCoord(nscoord& aCoord);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetCSSShadowArray(nsCSSShadowArray* aArray,
|
|
|
|
const nscolor& aDefaultColor,
|
|
|
|
bool aIsBoxShadow);
|
2008-07-07 17:56:52 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* GetBackgroundList(uint8_t nsStyleBackground::Layer::* aMember,
|
|
|
|
uint32_t nsStyleBackground::* aCount,
|
2014-02-05 03:10:44 -08:00
|
|
|
const KTableValue aTable[]);
|
2009-02-19 21:29:21 -08:00
|
|
|
|
2011-03-04 09:28:57 -08:00
|
|
|
void GetCSSGradientString(const nsStyleGradient* aGradient,
|
|
|
|
nsAString& aString);
|
|
|
|
void GetImageRectString(nsIURI* aURI,
|
|
|
|
const nsStyleSides& aCropRect,
|
|
|
|
nsString& aString);
|
2011-04-11 23:18:42 -07:00
|
|
|
void AppendTimingFunction(nsDOMCSSValueList *aValueList,
|
|
|
|
const nsTimingFunction& aTimingFunction);
|
2009-08-01 08:53:40 -07:00
|
|
|
|
2010-07-14 13:58:55 -07:00
|
|
|
/* Properties queryable as CSSValues.
|
|
|
|
* To avoid a name conflict with nsIDOM*CSS2Properties, these are all
|
|
|
|
* DoGetXXX instead of GetXXX.
|
|
|
|
*/
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetAppearance();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Box properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBoxAlign();
|
2014-05-05 10:55:53 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBoxDecorationBreak();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBoxDirection();
|
|
|
|
mozilla::dom::CSSValue* DoGetBoxFlex();
|
|
|
|
mozilla::dom::CSSValue* DoGetBoxOrdinalGroup();
|
|
|
|
mozilla::dom::CSSValue* DoGetBoxOrient();
|
|
|
|
mozilla::dom::CSSValue* DoGetBoxPack();
|
|
|
|
mozilla::dom::CSSValue* DoGetBoxSizing();
|
|
|
|
|
|
|
|
mozilla::dom::CSSValue* DoGetWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetHeight();
|
|
|
|
mozilla::dom::CSSValue* DoGetMaxHeight();
|
|
|
|
mozilla::dom::CSSValue* DoGetMaxWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetMinHeight();
|
|
|
|
mozilla::dom::CSSValue* DoGetMinWidth();
|
2013-08-07 00:59:10 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetMixBlendMode();
|
2014-10-15 05:13:00 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetIsolation();
|
2014-09-09 18:09:32 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetObjectFit();
|
2014-09-09 18:09:32 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetObjectPosition();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetLeft();
|
|
|
|
mozilla::dom::CSSValue* DoGetTop();
|
|
|
|
mozilla::dom::CSSValue* DoGetRight();
|
|
|
|
mozilla::dom::CSSValue* DoGetBottom();
|
|
|
|
mozilla::dom::CSSValue* DoGetStackSizing();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Font properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontFamily();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontFeatureSettings();
|
2013-05-19 19:59:20 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetFontKerning();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetFontLanguageOverride();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontSize();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontSizeAdjust();
|
2013-07-29 13:01:14 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetOSXFontSmoothing();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetFontStretch();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontStyle();
|
2013-05-19 19:59:20 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetFontSynthesis();
|
2013-05-19 11:23:19 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetFontVariant();
|
2013-05-19 19:59:20 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetFontVariantAlternates();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontVariantCaps();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontVariantEastAsian();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontVariantLigatures();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontVariantNumeric();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontVariantPosition();
|
|
|
|
mozilla::dom::CSSValue* DoGetFontWeight();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-03-10 15:54:13 -07:00
|
|
|
/* Grid properties */
|
2014-03-10 15:54:16 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetGridAutoFlow();
|
2014-03-10 15:54:15 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetGridAutoColumns();
|
|
|
|
mozilla::dom::CSSValue* DoGetGridAutoRows();
|
2014-03-10 15:54:14 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetGridTemplateAreas();
|
2014-03-10 15:54:13 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetGridTemplateColumns();
|
|
|
|
mozilla::dom::CSSValue* DoGetGridTemplateRows();
|
2014-03-10 15:54:17 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetGridColumnStart();
|
|
|
|
mozilla::dom::CSSValue* DoGetGridColumnEnd();
|
|
|
|
mozilla::dom::CSSValue* DoGetGridRowStart();
|
|
|
|
mozilla::dom::CSSValue* DoGetGridRowEnd();
|
2014-03-10 15:54:13 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/* Background properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundAttachment();
|
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundImage();
|
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundPosition();
|
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundRepeat();
|
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundClip();
|
2013-11-08 07:07:36 -08:00
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundBlendMode();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundOrigin();
|
|
|
|
mozilla::dom::CSSValue* DoGetBackgroundSize();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Padding properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetPaddingTop();
|
|
|
|
mozilla::dom::CSSValue* DoGetPaddingBottom();
|
|
|
|
mozilla::dom::CSSValue* DoGetPaddingLeft();
|
|
|
|
mozilla::dom::CSSValue* DoGetPaddingRight();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Table Properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBorderCollapse();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderSpacing();
|
|
|
|
mozilla::dom::CSSValue* DoGetCaptionSide();
|
|
|
|
mozilla::dom::CSSValue* DoGetEmptyCells();
|
|
|
|
mozilla::dom::CSSValue* DoGetTableLayout();
|
|
|
|
mozilla::dom::CSSValue* DoGetVerticalAlign();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Border Properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBorderTopStyle();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderBottomStyle();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderLeftStyle();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderRightStyle();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderTopWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderBottomWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderLeftWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderRightWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderTopColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderBottomColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderLeftColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderRightColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderBottomColors();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderLeftColors();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderRightColors();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderTopColors();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderBottomLeftRadius();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderBottomRightRadius();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderTopLeftRadius();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderTopRightRadius();
|
|
|
|
mozilla::dom::CSSValue* DoGetFloatEdge();
|
2011-12-22 15:34:45 -08:00
|
|
|
|
|
|
|
/* Border Image */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBorderImageSource();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderImageSlice();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderImageWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderImageOutset();
|
|
|
|
mozilla::dom::CSSValue* DoGetBorderImageRepeat();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2008-07-07 17:56:52 -07:00
|
|
|
/* Box Shadow */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBoxShadow();
|
2008-07-07 17:56:52 -07:00
|
|
|
|
2008-10-14 07:44:25 -07:00
|
|
|
/* Window Shadow */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetWindowShadow();
|
2008-10-14 07:44:25 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/* Margin Properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetMarginTopWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetMarginBottomWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetMarginLeftWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetMarginRightWidth();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Outline Properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetOutlineWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetOutlineStyle();
|
|
|
|
mozilla::dom::CSSValue* DoGetOutlineColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetOutlineOffset();
|
|
|
|
mozilla::dom::CSSValue* DoGetOutlineRadiusBottomLeft();
|
|
|
|
mozilla::dom::CSSValue* DoGetOutlineRadiusBottomRight();
|
|
|
|
mozilla::dom::CSSValue* DoGetOutlineRadiusTopLeft();
|
|
|
|
mozilla::dom::CSSValue* DoGetOutlineRadiusTopRight();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Content Properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetContent();
|
|
|
|
mozilla::dom::CSSValue* DoGetCounterIncrement();
|
|
|
|
mozilla::dom::CSSValue* DoGetCounterReset();
|
|
|
|
mozilla::dom::CSSValue* DoGetMarkerOffset();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-07-22 10:58:37 -07:00
|
|
|
/* Quotes Properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetQuotes();
|
2007-07-22 10:58:37 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/* z-index */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetZIndex();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* List properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetListStyleImage();
|
|
|
|
mozilla::dom::CSSValue* DoGetListStylePosition();
|
|
|
|
mozilla::dom::CSSValue* DoGetListStyleType();
|
|
|
|
mozilla::dom::CSSValue* DoGetImageRegion();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Text Properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetLineHeight();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextAlign();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextAlignLast();
|
2014-04-16 17:15:18 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetTextCombineUpright();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetTextDecoration();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextDecorationColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextDecorationLine();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextDecorationStyle();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextIndent();
|
2013-08-19 03:26:44 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetTextOrientation();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetTextOverflow();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextTransform();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextShadow();
|
|
|
|
mozilla::dom::CSSValue* DoGetLetterSpacing();
|
|
|
|
mozilla::dom::CSSValue* DoGetWordSpacing();
|
|
|
|
mozilla::dom::CSSValue* DoGetWhiteSpace();
|
|
|
|
mozilla::dom::CSSValue* DoGetWordBreak();
|
|
|
|
mozilla::dom::CSSValue* DoGetWordWrap();
|
|
|
|
mozilla::dom::CSSValue* DoGetHyphens();
|
|
|
|
mozilla::dom::CSSValue* DoGetTabSize();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextSizeAdjust();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Visibility properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetOpacity();
|
|
|
|
mozilla::dom::CSSValue* DoGetPointerEvents();
|
|
|
|
mozilla::dom::CSSValue* DoGetVisibility();
|
2013-05-28 09:00:49 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetWritingMode();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Direction properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetDirection();
|
|
|
|
mozilla::dom::CSSValue* DoGetUnicodeBidi();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Display properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetBinding();
|
|
|
|
mozilla::dom::CSSValue* DoGetClear();
|
2013-03-25 09:24:21 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetFloat();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetDisplay();
|
|
|
|
mozilla::dom::CSSValue* DoGetPosition();
|
|
|
|
mozilla::dom::CSSValue* DoGetClip();
|
2013-08-28 15:39:06 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetImageOrientation();
|
2013-11-22 08:48:27 -08:00
|
|
|
mozilla::dom::CSSValue* DoGetWillChange();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetOverflow();
|
|
|
|
mozilla::dom::CSSValue* DoGetOverflowX();
|
|
|
|
mozilla::dom::CSSValue* DoGetOverflowY();
|
2014-02-21 17:18:23 -08:00
|
|
|
mozilla::dom::CSSValue* DoGetOverflowClipBox();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetResize();
|
|
|
|
mozilla::dom::CSSValue* DoGetPageBreakAfter();
|
|
|
|
mozilla::dom::CSSValue* DoGetPageBreakBefore();
|
|
|
|
mozilla::dom::CSSValue* DoGetPageBreakInside();
|
2014-01-15 07:03:15 -08:00
|
|
|
mozilla::dom::CSSValue* DoGetTouchAction();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetTransform();
|
|
|
|
mozilla::dom::CSSValue* DoGetTransformOrigin();
|
|
|
|
mozilla::dom::CSSValue* DoGetPerspective();
|
|
|
|
mozilla::dom::CSSValue* DoGetBackfaceVisibility();
|
|
|
|
mozilla::dom::CSSValue* DoGetPerspectiveOrigin();
|
|
|
|
mozilla::dom::CSSValue* DoGetTransformStyle();
|
|
|
|
mozilla::dom::CSSValue* DoGetOrient();
|
2014-09-15 12:29:58 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetScrollBehavior();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* User interface properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetCursor();
|
|
|
|
mozilla::dom::CSSValue* DoGetForceBrokenImageIcon();
|
|
|
|
mozilla::dom::CSSValue* DoGetIMEMode();
|
|
|
|
mozilla::dom::CSSValue* DoGetUserFocus();
|
|
|
|
mozilla::dom::CSSValue* DoGetUserInput();
|
|
|
|
mozilla::dom::CSSValue* DoGetUserModify();
|
|
|
|
mozilla::dom::CSSValue* DoGetUserSelect();
|
2014-09-18 01:52:25 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetWindowDragging();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Column properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetColumnCount();
|
|
|
|
mozilla::dom::CSSValue* DoGetColumnFill();
|
|
|
|
mozilla::dom::CSSValue* DoGetColumnWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetColumnGap();
|
|
|
|
mozilla::dom::CSSValue* DoGetColumnRuleWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetColumnRuleStyle();
|
|
|
|
mozilla::dom::CSSValue* DoGetColumnRuleColor();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-08-20 14:52:47 -07:00
|
|
|
/* CSS Transitions */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetTransitionProperty();
|
|
|
|
mozilla::dom::CSSValue* DoGetTransitionDuration();
|
|
|
|
mozilla::dom::CSSValue* DoGetTransitionDelay();
|
|
|
|
mozilla::dom::CSSValue* DoGetTransitionTimingFunction();
|
2009-08-20 14:52:47 -07:00
|
|
|
|
2011-04-11 23:18:42 -07:00
|
|
|
/* CSS Animations */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetAnimationName();
|
|
|
|
mozilla::dom::CSSValue* DoGetAnimationDuration();
|
|
|
|
mozilla::dom::CSSValue* DoGetAnimationDelay();
|
|
|
|
mozilla::dom::CSSValue* DoGetAnimationTimingFunction();
|
|
|
|
mozilla::dom::CSSValue* DoGetAnimationDirection();
|
|
|
|
mozilla::dom::CSSValue* DoGetAnimationFillMode();
|
|
|
|
mozilla::dom::CSSValue* DoGetAnimationIterationCount();
|
|
|
|
mozilla::dom::CSSValue* DoGetAnimationPlayState();
|
2011-04-11 23:18:42 -07:00
|
|
|
|
2012-07-06 17:06:19 -07:00
|
|
|
/* CSS Flexbox properties */
|
2013-12-05 10:57:50 -08:00
|
|
|
mozilla::dom::CSSValue* DoGetAlignContent();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetAlignItems();
|
|
|
|
mozilla::dom::CSSValue* DoGetAlignSelf();
|
|
|
|
mozilla::dom::CSSValue* DoGetFlexBasis();
|
|
|
|
mozilla::dom::CSSValue* DoGetFlexDirection();
|
|
|
|
mozilla::dom::CSSValue* DoGetFlexGrow();
|
|
|
|
mozilla::dom::CSSValue* DoGetFlexShrink();
|
2013-12-05 10:57:50 -08:00
|
|
|
mozilla::dom::CSSValue* DoGetFlexWrap();
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetOrder();
|
|
|
|
mozilla::dom::CSSValue* DoGetJustifyContent();
|
2012-07-06 17:06:19 -07:00
|
|
|
|
2007-07-21 07:20:25 -07:00
|
|
|
/* SVG properties */
|
2012-10-01 09:49:41 -07:00
|
|
|
mozilla::dom::CSSValue* DoGetFill();
|
|
|
|
mozilla::dom::CSSValue* DoGetStroke();
|
|
|
|
mozilla::dom::CSSValue* DoGetMarkerEnd();
|
|
|
|
mozilla::dom::CSSValue* DoGetMarkerMid();
|
|
|
|
mozilla::dom::CSSValue* DoGetMarkerStart();
|
|
|
|
mozilla::dom::CSSValue* DoGetStrokeDasharray();
|
|
|
|
|
|
|
|
mozilla::dom::CSSValue* DoGetStrokeDashoffset();
|
|
|
|
mozilla::dom::CSSValue* DoGetStrokeWidth();
|
|
|
|
mozilla::dom::CSSValue* DoGetVectorEffect();
|
|
|
|
|
|
|
|
mozilla::dom::CSSValue* DoGetFillOpacity();
|
|
|
|
mozilla::dom::CSSValue* DoGetFloodOpacity();
|
|
|
|
mozilla::dom::CSSValue* DoGetStopOpacity();
|
|
|
|
mozilla::dom::CSSValue* DoGetStrokeMiterlimit();
|
|
|
|
mozilla::dom::CSSValue* DoGetStrokeOpacity();
|
|
|
|
|
|
|
|
mozilla::dom::CSSValue* DoGetClipRule();
|
|
|
|
mozilla::dom::CSSValue* DoGetFillRule();
|
|
|
|
mozilla::dom::CSSValue* DoGetStrokeLinecap();
|
|
|
|
mozilla::dom::CSSValue* DoGetStrokeLinejoin();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextAnchor();
|
|
|
|
|
|
|
|
mozilla::dom::CSSValue* DoGetColorInterpolation();
|
|
|
|
mozilla::dom::CSSValue* DoGetColorInterpolationFilters();
|
|
|
|
mozilla::dom::CSSValue* DoGetDominantBaseline();
|
|
|
|
mozilla::dom::CSSValue* DoGetImageRendering();
|
|
|
|
mozilla::dom::CSSValue* DoGetShapeRendering();
|
|
|
|
mozilla::dom::CSSValue* DoGetTextRendering();
|
|
|
|
|
|
|
|
mozilla::dom::CSSValue* DoGetFloodColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetLightingColor();
|
|
|
|
mozilla::dom::CSSValue* DoGetStopColor();
|
|
|
|
|
|
|
|
mozilla::dom::CSSValue* DoGetClipPath();
|
|
|
|
mozilla::dom::CSSValue* DoGetFilter();
|
|
|
|
mozilla::dom::CSSValue* DoGetMask();
|
2012-12-20 16:15:22 -08:00
|
|
|
mozilla::dom::CSSValue* DoGetMaskType();
|
2013-01-12 15:27:53 -08:00
|
|
|
mozilla::dom::CSSValue* DoGetPaintOrder();
|
2007-07-21 07:20:25 -07:00
|
|
|
|
2013-12-11 18:09:45 -08:00
|
|
|
/* Custom properties */
|
|
|
|
mozilla::dom::CSSValue* DoGetCustomProperty(const nsAString& aPropertyName);
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
nsDOMCSSValueList* GetROCSSValueList(bool aCommaDelimited);
|
2014-09-09 11:40:17 -07:00
|
|
|
|
|
|
|
/* Helper functions */
|
2011-03-04 09:28:57 -08:00
|
|
|
void SetToRGBAColor(nsROCSSPrimitiveValue* aValue, nscolor aColor);
|
2011-03-04 09:28:57 -08:00
|
|
|
void SetValueToStyleImage(const nsStyleImage& aStyleImage,
|
|
|
|
nsROCSSPrimitiveValue* aValue);
|
2014-09-09 11:40:17 -07:00
|
|
|
void SetValueToPositionCoord(
|
|
|
|
const nsStyleBackground::Position::PositionCoord& aCoord,
|
|
|
|
nsROCSSPrimitiveValue* aValue);
|
|
|
|
void SetValueToPosition(const nsStyleBackground::Position& aPosition,
|
|
|
|
nsDOMCSSValueList* aValueList);
|
2010-04-27 09:15:01 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
2011-10-17 07:59:28 -07:00
|
|
|
* A method to get a percentage base for a percentage value. Returns true
|
|
|
|
* if a percentage base value was determined, false otherwise.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
typedef bool (nsComputedDOMStyle::*PercentageBaseGetter)(nscoord&);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Method to set aValue to aCoord. If aCoord is a percentage value and
|
|
|
|
* aPercentageBaseGetter is not null, aPercentageBaseGetter is called. If it
|
2011-10-17 07:59:28 -07:00
|
|
|
* returns true, the percentage base it outputs in its out param is used
|
|
|
|
* to compute an nscoord value. If the getter is null or returns false,
|
2007-03-22 10:30:00 -07:00
|
|
|
* the percent value of aCoord is set as a percent value on aValue. aTable,
|
|
|
|
* if not null, is the keyword table to handle eStyleUnit_Enumerated. When
|
|
|
|
* calling SetAppUnits on aValue (for coord or percent values), the value
|
2011-10-28 11:33:28 -07:00
|
|
|
* passed in will be clamped to be no less than aMinAppUnits and no more than
|
|
|
|
* aMaxAppUnits.
|
2007-03-22 10:30:00 -07:00
|
|
|
*
|
|
|
|
* XXXbz should caller pass in some sort of bitfield indicating which units
|
|
|
|
* can be expected or something?
|
|
|
|
*/
|
2007-04-23 00:04:33 -07:00
|
|
|
void SetValueToCoord(nsROCSSPrimitiveValue* aValue,
|
|
|
|
const nsStyleCoord& aCoord,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aClampNegativeCalc,
|
2012-07-30 07:20:58 -07:00
|
|
|
PercentageBaseGetter aPercentageBaseGetter = nullptr,
|
2014-02-05 03:10:44 -08:00
|
|
|
const KTableValue aTable[] = nullptr,
|
2007-04-23 00:04:33 -07:00
|
|
|
nscoord aMinAppUnits = nscoord_MIN,
|
|
|
|
nscoord aMaxAppUnits = nscoord_MAX);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If aCoord is a eStyleUnit_Coord returns the nscoord. If it's
|
2007-04-23 00:04:33 -07:00
|
|
|
* eStyleUnit_Percent, attempts to resolve the percentage base and returns
|
|
|
|
* the resulting nscoord. If it's some other unit or a percentge base can't
|
|
|
|
* be determined, returns aDefaultValue.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2007-04-23 00:04:33 -07:00
|
|
|
nscoord StyleCoordToNSCoord(const nsStyleCoord& aCoord,
|
|
|
|
PercentageBaseGetter aPercentageBaseGetter,
|
2010-09-09 08:21:46 -07:00
|
|
|
nscoord aDefaultValue,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aClampNegativeCalc);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool GetCBContentWidth(nscoord& aWidth);
|
|
|
|
bool GetCBContentHeight(nscoord& aWidth);
|
2013-08-15 17:31:32 -07:00
|
|
|
bool GetScrollFrameContentWidth(nscoord& aWidth);
|
|
|
|
bool GetScrollFrameContentHeight(nscoord& aHeight);
|
2011-09-28 23:19:26 -07:00
|
|
|
bool GetFrameBoundsWidthForTransform(nscoord &aWidth);
|
|
|
|
bool GetFrameBoundsHeightForTransform(nscoord &aHeight);
|
|
|
|
bool GetFrameBorderRectWidth(nscoord& aWidth);
|
|
|
|
bool GetFrameBorderRectHeight(nscoord& aHeight);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-07-22 15:08:33 -07:00
|
|
|
/* Helper functions for computing the filter property style. */
|
|
|
|
void SetCssTextToCoord(nsAString& aCssText, const nsStyleCoord& aCoord);
|
2013-08-05 00:02:27 -07:00
|
|
|
mozilla::dom::CSSValue* CreatePrimitiveValueForStyleFilter(
|
2013-07-22 15:08:33 -07:00
|
|
|
const nsStyleFilter& aStyleFilter);
|
|
|
|
|
2014-09-27 16:56:00 -07:00
|
|
|
// Helper function for computing basic shape styles.
|
|
|
|
mozilla::dom::CSSValue* CreatePrimitiveValueForClipPath(
|
|
|
|
const nsStyleBasicShape* aStyleBasicShape, uint8_t aSizingBox);
|
|
|
|
|
2013-10-03 03:58:01 -07:00
|
|
|
static nsComputedStyleMap* GetComputedStyleMap();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// We don't really have a good immutable representation of "presentation".
|
|
|
|
// Given the way GetComputedStyle is currently used, we should just grab the
|
|
|
|
// 0th presshell, if any, from the document.
|
|
|
|
nsWeakPtr mDocumentWeak;
|
|
|
|
nsCOMPtr<nsIContent> mContent;
|
|
|
|
|
|
|
|
/*
|
2007-05-04 22:30:10 -07:00
|
|
|
* Strong reference to the style context while we're accessing the data from
|
|
|
|
* it. This can be either a style context we resolved ourselves or a style
|
|
|
|
* context we got from our frame.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
nsRefPtr<nsStyleContext> mStyleContextHolder;
|
|
|
|
nsCOMPtr<nsIAtom> mPseudo;
|
|
|
|
|
|
|
|
/*
|
2008-01-29 13:53:09 -08:00
|
|
|
* While computing style data, the primary frame for mContent --- named "outer"
|
|
|
|
* because we should use it to compute positioning data. Null
|
2007-03-22 10:30:00 -07:00
|
|
|
* otherwise.
|
|
|
|
*/
|
2008-01-29 13:53:09 -08:00
|
|
|
nsIFrame* mOuterFrame;
|
|
|
|
/*
|
|
|
|
* While computing style data, the "inner frame" for mContent --- the frame
|
|
|
|
* which we should use to compute margin, border, padding and content data. Null
|
|
|
|
* otherwise.
|
|
|
|
*/
|
|
|
|
nsIFrame* mInnerFrame;
|
2007-05-04 22:30:10 -07:00
|
|
|
/*
|
|
|
|
* While computing style data, the presshell we're working with. Null
|
|
|
|
* otherwise.
|
|
|
|
*/
|
|
|
|
nsIPresShell* mPresShell;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-17 14:01:56 -07:00
|
|
|
/*
|
|
|
|
* The kind of styles we should be returning.
|
|
|
|
*/
|
|
|
|
StyleType mStyleType;
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mExposeVisitedStyle;
|
2010-04-02 18:58:25 -07:00
|
|
|
|
2009-02-24 16:14:45 -08:00
|
|
|
#ifdef DEBUG
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mFlushedPendingReflows;
|
2009-02-24 16:14:45 -08:00
|
|
|
#endif
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2012-07-06 05:28:33 -07:00
|
|
|
already_AddRefed<nsComputedDOMStyle>
|
|
|
|
NS_NewComputedDOMStyle(mozilla::dom::Element* aElement,
|
|
|
|
const nsAString& aPseudoElt,
|
2012-10-17 14:01:56 -07:00
|
|
|
nsIPresShell* aPresShell,
|
|
|
|
nsComputedDOMStyle::StyleType aStyleType =
|
|
|
|
nsComputedDOMStyle::eAll);
|
2009-07-13 04:14:57 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif /* nsComputedDOMStyle_h__ */
|
|
|
|
|