This patch does the following in addition to a simple move:
* change the type of the pointers from RefPtr to nsCOMPtr
* move it from mozilla::css namespace to mozilla
MozReview-Commit-ID: 72MYq6kWm4s
--HG--
extra : rebase_source : 400fe0d7cc422f22592c302cfd4e457830b77e3e
If nsStyleImageRequest::Resolve() has been called, we cache the DocGroup and
use it for dispatching events for the clean up task. Otherwise, it's safe to
do clean up task on non-main thread.
MozReview-Commit-ID: BXalEkc6dBm
--HG--
extra : rebase_source : ccc7c43a385f3149b53763030419561fc64efbfa
The "default" case in EnumerationToLength() is not needed anymore because
StyleShapeRadius is an enum class, which cannot have other values.
MozReview-Commit-ID: GHkPAXXxqGZ
--HG--
extra : rebase_source : 8bc51d6f21cd70688d3b968bcd0a5ef12a6e3f47
This patch was written with the help of the following script. Also, manually
add mozilla qualifier to the enum values in nsStyleCoord.h, gfxRect.h, and
Types.h to make it build.
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 "NS_SIDE_TOP" "eSideTop"
rename "NS_SIDE_RIGHT" "eSideRight"
rename "NS_SIDE_BOTTOM" "eSideBottom"
rename "NS_SIDE_LEFT" "eSideLeft"
MozReview-Commit-ID: 9T0ORsqM6nP
--HG--
extra : rebase_source : 884ad96104c6e9cf6c8b3145d2d3a071ecccfe6a
"For each leaf in the calc() expression, ComputeCalc will call either
ComputeNumber (when the leaf is the left side of a Times_L or the right
side of a Times_R or Divided) or ComputeLeafValue (otherwise)."
A future patch in this series adds support for evaluating pure-integer calc()s.
We rename ComputeNumber to ComputeCoefficient and introduce a coefficient_type
typedef so that coefficients can be integers. We don't want to leave it as
'number' because that is confusing (e.g. CSS <number>s are float values).
We also rename NumbersAlreadyNormalizedCalcOps to
FloatCoeffsAlreadyNormalizedCalcOps, and expect AppendCoefficient in the
template given to SerializeCalc instead of AppendNumber.
This requires some renames in nsCSSValue and nsRuleNode.
I would split this into a separate 'fully-automated' patch, except that it's so
few renames and it feels bad to add the comments separately.
We also have to add |typedef float coeff_type| to two CalcOps implementations
in nsRuleNode because they multiply-inherit from two classes that define
coeff_type as float.
MozReview-Commit-ID: 1ZmBLsGr6hK
--HG--
extra : rebase_source : 219b97c65794c404680a36607506dde66b11e4f4
If the color is fully opaque, omit the 'a' suffix of color function name (e.g. just use 'rgb' or 'hsl').
Otherwise, show the original author-specified function name for serialization.
MozReview-Commit-ID: 4XgkvV2jDRC
--HG--
extra : rebase_source : 01151bc71e1158e206f924c7a1a51429a7d7f321
extra : histedit_source : 99cd9c8145a4166daba76b985417c2c22dff1fbf
It is a preparation for later patch which moves functions from those
classes into StyleSheet. Some of the functions are better defined in
StyleSheetInlines.h.
This commit is generated by the following command:
find . \( -name '*.h' -or -name '*.cpp' \) -not -name '*StyleSheet*' -exec sed -i -b \
-e '/^#include/ s_/\(CSS\|Servo\)StyleSheet\.h_/StyleSheetInlines.h_' \
-e '1,\_^#include "mozilla/StyleSheetInlines.h"_ ! { \_^#include "mozilla/StyleSheetInlines.h"_d }' {} +
MozReview-Commit-ID: 54H5x27Pmso
--HG--
extra : source : e4fe253a8f82c3c58e5191d6af66fb0e85f2df19
The css::ImageValue destructor does things only safe from the main
thread. Let's assert so that we don't accidentally start releasing them
from style worker threads during restyle.
MozReview-Commit-ID: DTkFcx185L
--HG--
extra : rebase_source : 3cec1f7504f89bc19cac27d3665452114e0c7b7e
This is a complete rewrite of the original part 8. Instead of storing
the ratio in mValueExtra, all values are stored in a struct in heap,
so that we support range outside [0.0, 1.0] in computation.
MozReview-Commit-ID: 7xUZSgQE5vA
--HG--
extra : rebase_source : 722d2aee06e59cdf061d0daae43d8dbc0a9641b4
This struct will be used as part of the storage type of ComplexColor in
nsCSSValue. Also this will be used to help unifying color calculation in
StyleAnimationValue.
MozReview-Commit-ID: C5UUI5DNnRM
--HG--
extra : rebase_source : b76c7d39ca21e4316a09524bbbc918a12ab81194