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
This is mostly copied from StyleSheetHandle which is being removed in
later patches. This is a temporary workaround to keep things working.
It should be removed soon when StyleSheet itself becomes a subclass
of nsISupports (which is expected to happen in bug 1292432).
MozReview-Commit-ID: Gqv0eRZgja5
--HG--
extra : source : 5d029c90a2e9187720bb21ef8329722a8fa3cae5
To match the behavior of StyleSheetHandle so that we can simply replace
uses of StyleSheetHandle with StyleSheet* in later patch.
MozReview-Commit-ID: LfGKrUmzC4h
--HG--
extra : source : bffc3be53b1c1142b3ab297a78fc6e7934719d2c
The methods are written in the same order as in StyleSheetHandle::Ptr.
MozReview-Commit-ID: 6b4311ailNj
--HG--
extra : source : 9cea4a56fc487dd21a8739d4d9be8f01d5fdc93c
1282076-1.html is a test case with a CSS animation.
1282076-2.html is a test case with a scripit animation.
Both of tests crashed before landing the fix for bug 1282076.
Although neither test does not crash currently any more with/without the fix,
it's worth adding them.
nsStyleImage::mImage is always set to a non-null object when its mType
is eStyleImageType_Image, so let's just assert that and stop null
checking in that case.
MozReview-Commit-ID: 2ect4coV0LV
--HG--
extra : rebase_source : 768b0c5989bc3e32d4d8ab803d85885f223bcb43
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
DETAILS ON THE CLEANUP:
* In nsFrameTraversal.cpp:
- Whitespace fix.
- Remove a useless nullptr assignment.
- Use "=" to initialize a nsCOMPtr, per coding style guideline ("initialize variables with nsFoo aFoo = bFoo and not nsFoo aFoo(bFoo)").
* In nsPresShell.cpp:
- Wrap a longish assignment to 2 lines (since next patch will make the first line longer, which would push the whole thing over 80 characters if it weren't wrapped).
- Add braces around "if" body.
* In nsTextFrame.cpp:
- Remove a useless nullptr assignment.
- Move the "metrics->GetThebesFontGroup()" call slightly earlier, so it happens *before* we've implicitly transferred ownership the object pointed to by "metrics".
- Add a code-comment.
MozReview-Commit-ID: LG6vgOmM9MK
--HG--
extra : rebase_source : 7754d4edefb09ae7992275b9dcb7e84371955d9c
Our transition/animation code uses "calc" to represent interpolated values between percent & pixel endpoints. But it only does that if the property has this CSS_PROPERTY_STORES_CALC flag. (This check is in StyleAnimationValue.cpp's static helper, GetCommonUnit().)
We do indeed store (& honor) calc() units for "clip-path" in its style struct, so we can & should add this flag.
MozReview-Commit-ID: 7eEEo9ROnpU
--HG--
extra : rebase_source : b2aa4887bf17048c7fe485f77302e4df91a20f1c