Adds another restyle generation which represents the dirty state of raw
style changes, so that getComputedStyle() wont be confused by optimizations
made by style engines.
MozReview-Commit-ID: 7RYeNCzFygO
--HG--
extra : rebase_source : e2a6bd73f4b2b71115abe68b5cce95be57cbd9b2
It was inconsistent with gecko side and also we needed to pass nsCompatibility enum along with URLExtraData.
MozReview-Commit-ID: 2ceutBfqBrg
--HG--
extra : rebase_source : f342774ed349c65f377cf85865f5905520784ca5
In this patch, we implement nsIDOMWindowUtils::GetUnanimatedComputedStyle
which returns computed value of given CSS property without animation rule. This
method is used from the DevTools animation inspector to fill in keyframe values
when the property value is null (indicating that the underlying/base value is
being used).
In order to implement this, we extend nsComputedDOMStyle constructor to fetch
the computed style minus animation style (i.e. the base style). This is somewhat
complicated by the fact that for discrete animation.
StyleAnimationValue::ExtractComputedValue may return ‘unset’, ‘initial’ or
‘inherit’. For example, if the author uses the 'unset' 'initial' or 'inherit'
keyword for a discrete property (e.g. 'align-content’), ExtractComputedValue
returns the keywords as-is. Furthermore, if the user does not set any specific
keyword, ExtractComputedValue returns ‘unset’. We use this new
nsComputedDOMStyle mechanism to resolve these keywords into a valid keyword for
computed style in the same way as other properties (e.g. ‘opacity’).
MozReview-Commit-ID: HffJ9SCDf2k
--HG--
extra : rebase_source : 64df3850b862dada5f8e0767d47dc478d454ba31
There are currently no call sites of GetStyleContextWithoutAnimation
but there are a couple of places (including this patch series) where we would
like to use such a method, but without the flushing behavior.
This patch drops the flushing from GetStyleContextWithoutAnimation and
renames it to GetUnanimatedStyleContextNoFlush. It also makes a few other minor
tweaks:
* Adds the aStyleType parameter for consistency with GetStyleContextNoFlush and
GetStyleContext
* Moves the implementation of this method and GetStyleContextNoFlush to the
header file since they simply wrap DoGetStyleContextNoFlush.
* Changes the order of these declarations so that the more specialized method
comes later.
* Drops the comment describing the method since both the method name and the
inline definition should now make it obvious what it is doing.
(Actually making this method not return animation styles when it re-uses an
existing style context will happen in the next patch.)
MozReview-Commit-ID: JYeim4A9Imr
--HG--
extra : rebase_source : abf7c27c52dd6b0c20a2710d6d56f2fb3e146ccf
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.
MozReview-Commit-ID: JQKaEuCKV2F
--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
We need another variant of GetStyleContextForElement() that does not consider
animation rules at all to get the base styles of the target element (i.e.
styles without animations).
In subsequent patches we also skip nsAnimationManager::UpdateAnimations() and
EffectCompositor::UpdateEffectProperties() to avoid (indirect) recursive calls
for resolving style of the same element.
MozReview-Commit-ID: G5olgXIMtvY
--HG--
extra : rebase_source : 1d08e649a4355262e2d83102c7b2de22cd7a67a1
Because the new function checks types, we need to change the fullCorner type
in nsComputedDOMStyle::GetEllipseRadii() and
StyleAnimationValue::ExtractComputedValue() from uint8_t to |Corner| to fix
build error.
MozReview-Commit-ID: 5NuFE3yA2QD
--HG--
extra : rebase_source : 8f94209b24bd909839358cd502f462edb9ce3116
This patch is written with the help of the following script.
function rename() {
find .\
-type f\
! -path "./obj*"\
! -path "./.git"\
! -path "./.hg"\
\( -name "*.cpp" -or\
-name "*.h" \)\
-exec sed -i -e "s/$1/$2/g" "{}" \;
}
rename "css::Side" "Side"
MozReview-Commit-ID: DPV6vivpPUp
--HG--
extra : rebase_source : 9c4f66dc9d2b26c89a4517fba4ff9c5db413411b
I have to move the definition of StyleBasicShape and StyleShapeSource prior to
where nsStyleDisplay::mShapeOutside is defined since the template struct need to
be fully defined before using as a member variable.
Use SetIdent() in CreatePrimitiveValueForBasicShapeOrURL() in
nsComputedDOMStyle.cpp per bug 1288626 comment 6.
MozReview-Commit-ID: 1KZS299CFul
--HG--
extra : rebase_source : d96276a1d514e1e42e1daf6f23e6bbfcb92d3bec
Change to geometry box to match the name in the spec.
https://drafts.fxtf.org/css-masking-1/#the-clip-path
MozReview-Commit-ID: 8jDTynCkJ4A
--HG--
extra : rebase_source : c2e165e320c1341012b32b48bfb03b3c9b4f56c5