All the instances are converted as follows.
- nsSubstring --> nsAString
- nsCSubstring --> nsACString
--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
This change does the following:
* Introduce a new smart pointer called CounterStylePtr which either
holds an AnonymousCounterStyle strongly, or a named CounterStyle
managed by CounterStyleManager weakly, and use it to replace all
RefPtr<CounterStyle> around the codebase.
* Rename CounterStyleManager::mCacheTable to mStyles to reflect the
fact that it is used to manage all styles, not just for caching.
* Add a retired styles list which collect all named CounterStyle
evicted from mStyles, and post a PostRefreshObserver to destroy
objects in that list after next flush.
* Remove helper functions for counter style in nsStyleList and expose
mCounterStyle directly, to make code simpler with the new pointer.
Reason for adding a new smart pointer type rather than making their
AddRef/Release behave like BuiltinCounterStyle is that, it is possible
that after a flush, some stale style structs may still be alive. They
can contain pointer to destroyed CounterStyle objects. Although the
actual content may never be accessed anymore, RefPtr may still access
the object for refcounting during destruction.
MozReview-Commit-ID: xxegwSDhNb
--HG--
extra : rebase_source : bb5443f0eb56eee51cbdfd08e0400335648610e8
This patch implement several things:
1. Implement a new constructor for nsStyleImageRequest to receive an existing
ImageValue from the caller.
2. Implement Gecko_ImageValue_Create to allow stylo to create a gecko::ImageValue
object.
3. Implement Gecko_SetXXXXImageValue to allow stylo to pass a created ImageValue
back to gecko.
MozReview-Commit-ID: 1SbW5w8FSV2
--HG--
extra : source : 63777ecf4c7138a0ce5847753a41efcbfc8e2b20
extra : intermediate-source : dced488c119da7e3ae27c903c0dcc76593d8a06d
This patch implement several things:
1. Implement a new constructor for nsStyleImageRequest to receive an existing
ImageValue from the caller.
2. Implement Gecko_ImageValue_Create to allow stylo to create a gecko::ImageValue
object.
3. Implement Gecko_SetXXXXImageValue to allow stylo to pass a created ImageValue
back to gecko.
MozReview-Commit-ID: 1SbW5w8FSV2
--HG--
extra : rebase_source : f3ce46922ded8414dabb70ef0e58177f48c4bb14
extra : intermediate-source : c146e6dcac12ed597e785dbf4f3d9c1ad323023e
extra : source : 63777ecf4c7138a0ce5847753a41efcbfc8e2b20
We need an FFI, Gecko_StyleTransition_SetUnsupportedProperty, to set the
mProperty and mUnknownProperty of StyleTransition. In Servo, we put
non-animatable, custom, and unrecognized property together, so this FFI
should look up the nsCSSPropertyID of the input string, and then store the
value and the unknown property string (if any) back to StyleTransition.
MozReview-Commit-ID: 4iZNKXNSrzj
--HG--
extra : rebase_source : 088daa620133418afdc6b1c97b6e90ceb7cf3b75
This patch doesn't change our behavior -- we won't actually act on the new flag
until the next patch in this series.
MozReview-Commit-ID: EONsLM54eG1
--HG--
extra : rebase_source : cabd4a140d575794a8a656c47692bb9d3a02de88
1. add binding functions for -moz-border-*-colors support.
In Gecko, we use double pointers to nsBorderColors to store -moz-border-*-colors.
The computed values of -moz-border-*-colors are set by couple member functions.
To pass the computed value from Servo to Gecko, we need support for these member
functions as well. So, I'm adding some binding functions in this patch. The
actual use of these bindings to pass/store the computed values is separated
in the following patch, which should be a pure Servo change. See servo PR:
https://github.com/servo/servo/pull/16586.
2. update test expectations for -moz-border-*-colors support.
Note that with the support of -moz-border-*-colors, 165 mochitests and 17 reftests
could be fixed.
MozReview-Commit-ID: KDbp8C6Aoqd
--HG--
extra : rebase_source : 7d9675d9ece091ea6957dcae7d28c39066e69035
This switches over from using nsStringBuffer to nsString for URLValueData's
|mString| member. This avoids various tedious conversions and can provide
potential performance improvements by avoiding length calculations.
MozReview-Commit-ID: 5eRifUZrAso
Now, remove Layer::mSourceURI, there are several benefit of doing this:
1. Reduce the size of nsStyleImage::Layer.
2. By storing style image and url information in nsStyleImage, we can remove
many verbose comments. That is becasue there is no need to explain why we use
mSourceURI here, or why we use nsStyleImage there anymore.
3. Since all inforamtion is stored in on place, nsStyleImage, we can setup image
request or URLs by one single Gecko_SetUrlImageValue call.
MozReview-Commit-ID: 7aTQobddTB1
--HG--
extra : rebase_source : 247e3b66c727a9116c58d3d6ff3ae0f7a58f2338
This patch implements two things:
1. Add one extra type, nsStyleImageType::eStyleImageType_Url, and puts data of
this type in nsStyleImage::mUrlData.
2. Export SetURLValueData and GetURLValueData from nsStyleImage
With these chnages, we can simply use nsStyleImage::mUrlData to replace
Layer::mSourceURI in the next patch.
MozReview-Commit-ID: E20MEzXv8cg
--HG--
extra : rebase_source : 5461edacb28676e9d3a12068f330b5db7b9fe32c
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
Implement this unil function to improve readability
MozReview-Commit-ID: FLKOGyq180W
--HG--
extra : rebase_source : db8dbc67dbc63c19df806e79ea36016d3d5fc8b6
extra : source : 47fa0a1f03acd6007e2d40e4ec5bc0ddba221361
nsStyleContext::CalcDifference had an optimization where, when we knew
that the old and new style context have the same rule node, we knew that
the only change hints that would need to be handled are those in the
"not handled for descendants" category, generated due to explicit
'inherit' values on reset properties. This was because any changes due
to differences in inherited properties should only have generated
"handled for descendants" change hints (and thus would already have been
handled on an ancestor).
Before bug 931668, this let us avoid calling CalcDifference on structs
that only would have generated hints that we knew we already would have
handled. However, after bug 931668, we compare all structs anyway so
that we can set the aEqualStructs outparam, so we don't gain anything
from this optimization. We can still return these change hints we know
will not need to be handled, and rely on ElementRestyler::CaptureChange
to filter them out.
MozReview-Commit-ID: Ld1s2Js0i6r
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