gecko-dev/layout/style/nsComputedDOMStyle.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

395 строки
14 KiB
C
Исходник Обычный вид История

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
2012-05-21 15:12:37 +04: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/. */
/* DOM object returned from element.getComputedStyle() */
#ifndef nsComputedDOMStyle_h__
#define nsComputedDOMStyle_h__
#include "mozilla/Attributes.h"
#include "mozilla/StyleColorInlines.h"
#include "mozilla/UniquePtr.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
#include "nscore.h"
#include "nsDOMCSSDeclaration.h"
#include "mozilla/ComputedStyle.h"
#include "nsIWeakReferenceUtils.h"
#include "mozilla/gfx/Types.h"
#include "nsCoord.h"
#include "nsColor.h"
#include "nsStubMutationObserver.h"
#include "nsStyleStruct.h"
#include "mozilla/WritingModes.h"
// XXX Avoid including this here by moving function bodies to the cpp file
#include "mozilla/dom/Element.h"
namespace mozilla {
enum class FlushType : uint8_t;
namespace dom {
class DocGroup;
class Element;
} // namespace dom
class PresShell;
struct ComputedGridTrackInfo;
} // namespace mozilla
struct ComputedStyleMap;
struct nsCSSKTableEntry;
class nsIFrame;
class nsDOMCSSValueList;
struct nsMargin;
class nsROCSSPrimitiveValue;
class nsStyleGradient;
class nsComputedDOMStyle final : public nsDOMCSSDeclaration,
public nsStubMutationObserver {
private:
// Convenience typedefs:
Bug 1519958 - Refactor grid types to preserve repeat() at computed value time and use cbindgen. r=mats,boris I'm _really_ sorry for the size of the patch. I tried to do this in two steps but it was a lot of work and pretty ugly. This patch makes us use cbindgen for grid-template-{rows,columns}, in order to: * Make us preserve repeat() at computed-value time. This is per spec since interpolation needs to know about repeat(). Except for subgrid, which did the repeat expansion at parse-time and was a bit more annoying (plus it doesn't really animate yet so we don't need it to comply with the spec). * Tweaks the WPT tests for interpolation to adopt the resolution at: https://github.com/w3c/csswg-drafts/issues/3503. Trade-off here, as this patch stands, is that this change makes us use less long-living memory, since we expand repeat() during layout, but at the cost of a bit of CPU time during layout (conditional on the property applying though, which wasn't the case before). It should be very easy to store a cached version of the template, should this be too hot (I expect it isn't), or to change the representation in other ways to optimize grid layout code if it's worth it. Another trade-off: I've used SmallPointerArray to handle line-name merging, pointing to the individual arrays in the style data, rather than actually heap-allocating the merged lists. This would also be pretty easy to change should we measure and see that it's not worth it. This patch also opens the gate to potentially improving memory usage in some other ways, by reference-counting line-name lists for example, though I don't have data that suggests it is worth it. In general, this patch makes much easier to tweak the internal representation of the grid style data structures. Overall, I think it's a win, the amount of magic going on in that mako code was a bit huge; it took a bit to wrap my head around it. This patch comments out the style struct size assertions. They will be uncommented in a follow-up patch which contains some improvements for this type, which are worth getting reviewed separately. Also, this patch doesn't remove as much code as I would've hoped for because of I tried not to change most of the dom/grid code for inspector, but I think a fair bit of the nsGridContainerFrame.cpp code that collects information for it can be simplified / de-copy-pasted to some extent. But that was a pre-existing problem and this patch is already quite massive. Differential Revision: https://phabricator.services.mozilla.com/D36598
2019-06-28 14:27:19 +03:00
template <typename T>
using Span = mozilla::Span<T>;
using KTableEntry = nsCSSKTableEntry;
using CSSValue = mozilla::dom::CSSValue;
using StyleGeometryBox = mozilla::StyleGeometryBox;
using Element = mozilla::dom::Element;
using Document = mozilla::dom::Document;
using LengthPercentage = mozilla::LengthPercentage;
using LengthPercentageOrAuto = mozilla::LengthPercentageOrAuto;
using ComputedStyle = mozilla::ComputedStyle;
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(
nsComputedDOMStyle, nsICSSDeclaration)
NS_DECL_NSIDOMCSSSTYLEDECLARATION_HELPER
nsresult GetPropertyValue(const nsCSSPropertyID aPropID,
nsACString& aValue) override;
void SetPropertyValue(const nsCSSPropertyID aPropID, const nsACString& aValue,
nsIPrincipal* aSubjectPrincipal,
mozilla::ErrorResult& aRv) override;
void IndexedGetter(uint32_t aIndex, bool& aFound,
nsACString& aPropName) final;
enum StyleType {
eDefaultOnly, // Only includes UA and user sheets
eAll // Includes all stylesheets
};
nsComputedDOMStyle(Element* aElement, const nsAString& aPseudoElt,
Document* aDocument, StyleType aStyleType);
nsINode* GetAssociatedNode() const override { return mElement; }
nsINode* GetParentObject() const override { return mElement; }
static already_AddRefed<ComputedStyle> GetComputedStyle(
Element* aElement, nsAtom* aPseudo, StyleType aStyleType = eAll);
static already_AddRefed<ComputedStyle> GetComputedStyleNoFlush(
const Element* aElement, nsAtom* aPseudo, StyleType aStyleType = eAll) {
return DoGetComputedStyleNoFlush(
aElement, aPseudo, nsContentUtils::GetPresShellForContent(aElement),
aStyleType);
}
static already_AddRefed<ComputedStyle> GetUnanimatedComputedStyleNoFlush(
Element* aElement, nsAtom* aPseudo);
// Helper for nsDOMWindowUtils::GetVisitedDependentComputedStyle
void SetExposeVisitedStyle(bool aExpose) {
NS_ASSERTION(aExpose != mExposeVisitedStyle, "should always be changing");
mExposeVisitedStyle = aExpose;
}
void GetCSSImageURLs(const nsACString& aPropertyName,
nsTArray<nsCString>& aImageURLs,
mozilla::ErrorResult& aRv) final;
// nsDOMCSSDeclaration abstract methods which should never be called
// on a nsComputedDOMStyle object, but must be defined to avoid
// compile errors.
Bug 1428246 - The attributeChangedCallback is fired twice for the *first* style attribute change, r=peterv The idea with this patch is that style code will first call InlineStyleDeclarationWillChange before style declaration has changed, and SetInlineStyleDeclaration once it has changed. In order to be able to report old attribute value, InlineStyleDeclarationWillChange reads the value and also calls AttributeWillChange (so that DOMMutationObserser can grab the old value). Later SetInlineStyleDeclaration passes the old value to SetAttrAndNotify so that mutation events and attributeChanged callbacks are handled correctly. Because of performance, declaration can't be cloned for reading the old value. And that is why the recently-added callback is used to detect when declaration is about to change (bug 1466963 and followup bug 1468665). To keep the expected existing behavior, even if declaration isn't changed, but just a new declaration was created (since there wasn't any), we need to still run all these willchange/set calls. That is when the code has 'if (created)' checks. Since there are several declaration implementation and only nsDOMCSSAttributeDeclaration needs the about-to-change callback, GetPropertyChangeClosure is the one to initialize the callback closure, and the struct which is then passes as data to the closure. Apparently we lost mutation event testing on style attribute when the pref was added, so test_style_attr_listener.html is modified to test both pref values. --HG-- extra : rebase_source : 9e605d43f22e650ac3912fbfb41abb8d5a2a0c8f
2018-06-26 12:54:00 +03:00
mozilla::DeclarationBlock* GetOrCreateCSSDeclaration(
Operation aOperation, mozilla::DeclarationBlock** aCreated) final;
virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock*,
mozilla::MutationClosureData*) override;
virtual mozilla::dom::Document* DocToUpdate() override;
nsDOMCSSDeclaration::ParsingEnvironment GetParsingEnvironment(
nsIPrincipal* aSubjectPrincipal) const final;
static already_AddRefed<nsROCSSPrimitiveValue> MatrixToCSSValue(
const mozilla::gfx::Matrix4x4& aMatrix);
static void SetToRGBAColor(nsROCSSPrimitiveValue* aValue, nscolor aColor);
static void RegisterPrefChangeCallbacks();
static void UnregisterPrefChangeCallbacks();
// nsIMutationObserver
NS_DECL_NSIMUTATIONOBSERVER_PARENTCHAINCHANGED
private:
nsresult GetPropertyValue(const nsCSSPropertyID aPropID,
const nsACString& aMaybeCustomPropertyNme,
nsACString& aValue);
virtual ~nsComputedDOMStyle();
void AssertFlushedPendingReflows() {
NS_ASSERTION(mFlushedPendingReflows,
"property getter should have been marked layout-dependent");
}
nsMargin GetAdjustedValuesForBoxSizing();
// This indicates error by leaving mComputedStyle null.
void UpdateCurrentStyleSources(nsCSSPropertyID);
void ClearCurrentStyleSources();
// Helper functions called by UpdateCurrentStyleSources.
void ClearComputedStyle();
void SetResolvedComputedStyle(RefPtr<ComputedStyle>&& aContext,
uint64_t aGeneration);
void SetFrameComputedStyle(ComputedStyle* aStyle, uint64_t aGeneration);
static already_AddRefed<ComputedStyle> DoGetComputedStyleNoFlush(
const Element* aElement, nsAtom* aPseudo, mozilla::PresShell* aPresShell,
StyleType aStyleType);
#define STYLE_STRUCT(name_) \
const nsStyle##name_* Style##name_() { \
return mComputedStyle->Style##name_(); \
}
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
/**
* A method to get a percentage base for a percentage value. Returns true
* if a percentage base value was determined, false otherwise.
*/
typedef bool (nsComputedDOMStyle::*PercentageBaseGetter)(nscoord&);
already_AddRefed<CSSValue> GetOffsetWidthFor(mozilla::Side);
already_AddRefed<CSSValue> GetAbsoluteOffset(mozilla::Side);
nscoord GetUsedAbsoluteOffset(mozilla::Side);
already_AddRefed<CSSValue> GetNonStaticPositionOffset(
mozilla::Side aSide, bool aResolveAuto, PercentageBaseGetter aWidthGetter,
PercentageBaseGetter aHeightGetter);
already_AddRefed<CSSValue> GetStaticOffset(mozilla::Side aSide);
already_AddRefed<CSSValue> GetPaddingWidthFor(mozilla::Side aSide);
already_AddRefed<CSSValue> GetBorderWidthFor(mozilla::Side aSide);
already_AddRefed<CSSValue> GetMarginWidthFor(mozilla::Side aSide);
already_AddRefed<CSSValue> GetTransformValue(const mozilla::StyleTransform&);
Bug 1519958 - Refactor grid types to preserve repeat() at computed value time and use cbindgen. r=mats,boris I'm _really_ sorry for the size of the patch. I tried to do this in two steps but it was a lot of work and pretty ugly. This patch makes us use cbindgen for grid-template-{rows,columns}, in order to: * Make us preserve repeat() at computed-value time. This is per spec since interpolation needs to know about repeat(). Except for subgrid, which did the repeat expansion at parse-time and was a bit more annoying (plus it doesn't really animate yet so we don't need it to comply with the spec). * Tweaks the WPT tests for interpolation to adopt the resolution at: https://github.com/w3c/csswg-drafts/issues/3503. Trade-off here, as this patch stands, is that this change makes us use less long-living memory, since we expand repeat() during layout, but at the cost of a bit of CPU time during layout (conditional on the property applying though, which wasn't the case before). It should be very easy to store a cached version of the template, should this be too hot (I expect it isn't), or to change the representation in other ways to optimize grid layout code if it's worth it. Another trade-off: I've used SmallPointerArray to handle line-name merging, pointing to the individual arrays in the style data, rather than actually heap-allocating the merged lists. This would also be pretty easy to change should we measure and see that it's not worth it. This patch also opens the gate to potentially improving memory usage in some other ways, by reference-counting line-name lists for example, though I don't have data that suggests it is worth it. In general, this patch makes much easier to tweak the internal representation of the grid style data structures. Overall, I think it's a win, the amount of magic going on in that mako code was a bit huge; it took a bit to wrap my head around it. This patch comments out the style struct size assertions. They will be uncommented in a follow-up patch which contains some improvements for this type, which are worth getting reviewed separately. Also, this patch doesn't remove as much code as I would've hoped for because of I tried not to change most of the dom/grid code for inspector, but I think a fair bit of the nsGridContainerFrame.cpp code that collects information for it can be simplified / de-copy-pasted to some extent. But that was a pre-existing problem and this patch is already quite massive. Differential Revision: https://phabricator.services.mozilla.com/D36598
2019-06-28 14:27:19 +03:00
already_AddRefed<nsROCSSPrimitiveValue> GetGridTrackSize(
const mozilla::StyleTrackSize&);
already_AddRefed<nsROCSSPrimitiveValue> GetGridTrackBreadth(
const mozilla::StyleTrackBreadth&);
void SetValueToTrackBreadth(nsROCSSPrimitiveValue*,
const mozilla::StyleTrackBreadth&);
already_AddRefed<CSSValue> GetGridTemplateColumnsRows(
Bug 1519958 - Refactor grid types to preserve repeat() at computed value time and use cbindgen. r=mats,boris I'm _really_ sorry for the size of the patch. I tried to do this in two steps but it was a lot of work and pretty ugly. This patch makes us use cbindgen for grid-template-{rows,columns}, in order to: * Make us preserve repeat() at computed-value time. This is per spec since interpolation needs to know about repeat(). Except for subgrid, which did the repeat expansion at parse-time and was a bit more annoying (plus it doesn't really animate yet so we don't need it to comply with the spec). * Tweaks the WPT tests for interpolation to adopt the resolution at: https://github.com/w3c/csswg-drafts/issues/3503. Trade-off here, as this patch stands, is that this change makes us use less long-living memory, since we expand repeat() during layout, but at the cost of a bit of CPU time during layout (conditional on the property applying though, which wasn't the case before). It should be very easy to store a cached version of the template, should this be too hot (I expect it isn't), or to change the representation in other ways to optimize grid layout code if it's worth it. Another trade-off: I've used SmallPointerArray to handle line-name merging, pointing to the individual arrays in the style data, rather than actually heap-allocating the merged lists. This would also be pretty easy to change should we measure and see that it's not worth it. This patch also opens the gate to potentially improving memory usage in some other ways, by reference-counting line-name lists for example, though I don't have data that suggests it is worth it. In general, this patch makes much easier to tweak the internal representation of the grid style data structures. Overall, I think it's a win, the amount of magic going on in that mako code was a bit huge; it took a bit to wrap my head around it. This patch comments out the style struct size assertions. They will be uncommented in a follow-up patch which contains some improvements for this type, which are worth getting reviewed separately. Also, this patch doesn't remove as much code as I would've hoped for because of I tried not to change most of the dom/grid code for inspector, but I think a fair bit of the nsGridContainerFrame.cpp code that collects information for it can be simplified / de-copy-pasted to some extent. But that was a pre-existing problem and this patch is already quite massive. Differential Revision: https://phabricator.services.mozilla.com/D36598
2019-06-28 14:27:19 +03:00
const mozilla::StyleGridTemplateComponent& aTrackList,
const mozilla::ComputedGridTrackInfo& aTrackInfo);
bool GetLineHeightCoord(nscoord& aCoord);
bool ShouldHonorMinSizeAutoInAxis(mozilla::PhysicalAxis aAxis);
/* Properties queryable as CSSValues.
* To avoid a name conflict with nsIDOM*CSS2Properties, these are all
* DoGetXXX instead of GetXXX.
*/
/* Box properties */
already_AddRefed<CSSValue> DoGetWidth();
already_AddRefed<CSSValue> DoGetHeight();
already_AddRefed<CSSValue> DoGetMaxHeight();
already_AddRefed<CSSValue> DoGetMaxWidth();
already_AddRefed<CSSValue> DoGetMinHeight();
already_AddRefed<CSSValue> DoGetMinWidth();
already_AddRefed<CSSValue> DoGetLeft();
already_AddRefed<CSSValue> DoGetTop();
already_AddRefed<CSSValue> DoGetRight();
already_AddRefed<CSSValue> DoGetBottom();
/* Font properties */
already_AddRefed<CSSValue> DoGetOsxFontSmoothing();
/* Grid properties */
already_AddRefed<CSSValue> DoGetGridTemplateColumns();
already_AddRefed<CSSValue> DoGetGridTemplateRows();
/* StyleImageLayer properties */
already_AddRefed<CSSValue> DoGetImageLayerPosition(
const nsStyleImageLayers& aLayers);
/* Mask properties */
already_AddRefed<CSSValue> DoGetMask();
/* Padding properties */
already_AddRefed<CSSValue> DoGetPaddingTop();
already_AddRefed<CSSValue> DoGetPaddingBottom();
already_AddRefed<CSSValue> DoGetPaddingLeft();
already_AddRefed<CSSValue> DoGetPaddingRight();
/* Table Properties */
already_AddRefed<CSSValue> DoGetBorderSpacing();
/* Border Properties */
already_AddRefed<CSSValue> DoGetBorderTopWidth();
already_AddRefed<CSSValue> DoGetBorderBottomWidth();
already_AddRefed<CSSValue> DoGetBorderLeftWidth();
already_AddRefed<CSSValue> DoGetBorderRightWidth();
/* Margin Properties */
already_AddRefed<CSSValue> DoGetMarginTopWidth();
already_AddRefed<CSSValue> DoGetMarginBottomWidth();
already_AddRefed<CSSValue> DoGetMarginLeftWidth();
already_AddRefed<CSSValue> DoGetMarginRightWidth();
/* Text Properties */
already_AddRefed<CSSValue> DoGetLineHeight();
already_AddRefed<CSSValue> DoGetTextDecoration();
/* Display properties */
already_AddRefed<CSSValue> DoGetTransform();
already_AddRefed<CSSValue> DoGetTransformOrigin();
already_AddRefed<CSSValue> DoGetPerspectiveOrigin();
/* Column properties */
already_AddRefed<CSSValue> DoGetColumnRuleWidth();
// For working around a MSVC bug. See related comment in
// GenerateComputedDOMStyleGenerated.py.
already_AddRefed<CSSValue> DummyGetter();
/* Helper functions */
void SetValueFromComplexColor(nsROCSSPrimitiveValue* aValue,
const mozilla::StyleColor& aColor);
void SetValueToPosition(const mozilla::Position& aPosition,
nsDOMCSSValueList* aValueList);
Bug 1552708 - Use cbindgen for URIs. r=heycam This doesn't clean up as much as a whole, but it's a step in the right direction. In particular, it allows us to start using simple bindings for: * Filters * Shapes and images, almost. Need to: * Get rid of the complex -moz- gradient parsing (let layout.css.simple-moz-gradient.enabled get to release). * Counters, almost. Need to: * Share the Attr representation with Gecko, by not using Option<>. * Just another variant should be enough (ContentItem::{Attr,Prefixedattr}, maybe). Which in turn allows us to remove a whole lot of bindings in followups to this. The setup changes a bit. This also removes the double pointer I complained about while reviewing the shared UA sheet patches. The old setup is: ``` SpecifiedUrl * CssUrl * Arc<CssUrlData> * String * UrlExtraData * UrlValueSource * Arc<CssUrlData> * load id * resolved uri * CORS mode. * ... ``` The new one removes the double reference to the url data via URLValue, and looks like: ``` SpecifiedUrl * CssUrl * Arc<CssUrlData> * String * UrlExtraData * CorsMode * LoadData * load id * resolved URI ``` The LoadData is the only mutable bit that C++ can change, and is not used from Rust. Ideally, in the future, we could just use rust-url to resolve the URL after parsing or something, and make it all immutable. Maybe. I've verified that this approach still works with the UA sheet patches (via the LoadDataSource::Lazy). The reordering of mWillChange is to avoid nsStyleDisplay from going over the size limit. We want to split it up anyway in bug 1552587, but mBinding gains a tag member, which means that we were having a bit of extra padding. One thing I want to explore is to see if we can abuse rustc's non-zero optimizations to predict the layout from C++, but that's something to explore at some other point in time and with a lot of care and help from Michael (who sits next to me and works on rustc ;)). Differential Revision: https://phabricator.services.mozilla.com/D31742
2019-05-27 14:45:12 +03:00
void SetValueToURLValue(const mozilla::StyleComputedUrl* aURL,
nsROCSSPrimitiveValue* aValue);
void SetValueToSize(nsROCSSPrimitiveValue* aValue, const mozilla::StyleSize&);
void SetValueToLengthPercentageOrAuto(nsROCSSPrimitiveValue* aValue,
const LengthPercentageOrAuto&,
bool aClampNegativeCalc);
void SetValueToLengthPercentage(nsROCSSPrimitiveValue* aValue,
const LengthPercentage&,
bool aClampNegativeCalc);
void SetValueToMaxSize(nsROCSSPrimitiveValue* aValue,
const mozilla::StyleMaxSize&);
bool GetCBContentWidth(nscoord& aWidth);
bool GetCBContentHeight(nscoord& aHeight);
bool GetCBPaddingRectWidth(nscoord& aWidth);
bool GetCBPaddingRectHeight(nscoord& aHeight);
bool GetScrollFrameContentWidth(nscoord& aWidth);
bool GetScrollFrameContentHeight(nscoord& aHeight);
bool GetFrameBorderRectWidth(nscoord& aWidth);
bool GetFrameBorderRectHeight(nscoord& aHeight);
// Find out if we can safely skip flushing (i.e. pending restyles do not
// affect our element).
bool NeedsToFlushStyle(nsCSSPropertyID) const;
// Find out if we need to flush layout of the document, depending on the
// property that was requested.
bool NeedsToFlushLayout(nsCSSPropertyID) const;
// Flushes the given document, which must be our document, and potentially the
// mElement's document.
void Flush(Document&, mozilla::FlushType);
nsIFrame* GetOuterFrame() const;
static ComputedStyleMap* GetComputedStyleMap();
// We don't really have a good immutable representation of "presentation".
// Given the way GetComputedStyle is currently used, we should just grab the
// presshell, if any, from the document.
nsWeakPtr mDocumentWeak;
RefPtr<Element> mElement;
/**
* Strong reference to the ComputedStyle we access data from. This can be
* either a ComputedStyle we resolved ourselves or a ComputedStyle we got
* from our frame.
*
* If we got the ComputedStyle from the frame, we clear out mComputedStyle
* in ClearCurrentStyleSources. If we resolved one ourselves, then
* ClearCurrentStyleSources leaves it in mComputedStyle for use the next
* time this nsComputedDOMStyle object is queried. UpdateCurrentStyleSources
* in this case will check that the ComputedStyle is still valid to be used,
* by checking whether flush styles results in any restyles having been
* processed.
*/
RefPtr<ComputedStyle> mComputedStyle;
RefPtr<nsAtom> mPseudo;
/*
* While computing style data, the primary frame for mContent --- named
* "outer" because we should use it to compute positioning data. Null
* otherwise.
*/
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;
/*
* While computing style data, the presshell we're working with. Null
* otherwise.
*/
mozilla::PresShell* mPresShell;
/*
* The kind of styles we should be returning.
*/
StyleType mStyleType;
/**
* The nsComputedDOMStyle generation at the time we last resolved a style
* context and stored it in mComputedStyle, and the pres shell we got the
* style from. Should only be used together.
*/
uint64_t mComputedStyleGeneration = 0;
uint32_t mPresShellId = 0;
bool mExposeVisitedStyle;
/**
* Whether we resolved a ComputedStyle last time we called
* UpdateCurrentStyleSources. Initially false.
*/
bool mResolvedComputedStyle;
#ifdef DEBUG
bool mFlushedPendingReflows = false;
#endif
friend struct ComputedStyleMap;
};
already_AddRefed<nsComputedDOMStyle> NS_NewComputedDOMStyle(
mozilla::dom::Element* aElement, const nsAString& aPseudoElt,
mozilla::dom::Document* aDocument,
nsComputedDOMStyle::StyleType aStyleType = nsComputedDOMStyle::eAll);
#endif /* nsComputedDOMStyle_h__ */