Bug 1340022 - Implement "handled for descendants" tracking for RestyleDamage. r=emilio

MozReview-Commit-ID: Bbk99ogILXC

--HG--
extra : rebase_source : 2998f39a67c39073ea66e3e12815e1a7a25f7c9d
This commit is contained in:
Bobby Holley 2017-02-15 19:36:57 -08:00
parent 6e333b6944
commit eaee1dbb37
3 changed files with 9 additions and 0 deletions

View File

@ -319,6 +319,8 @@ inline nsChangeHint operator^=(nsChangeHint& aLeft, nsChangeHint aRight)
nsChangeHint_UpdateUsesOpacity | \
nsChangeHint_UpdateBackgroundPosition)
// NB: Once we drop support for the old style system, this logic should be
// inlined in the Servo style system to eliminate the FFI call.
inline nsChangeHint NS_HintsNotHandledForDescendantsIn(nsChangeHint aChangeHint) {
nsChangeHint result = nsChangeHint(aChangeHint & (
nsChangeHint_UpdateTransformLayer |

View File

@ -310,6 +310,12 @@ Gecko_CalcStyleDifference(nsStyleContext* aOldStyleContext,
return result;
}
nsChangeHint
Gecko_HintsHandledForDescendants(nsChangeHint aHint)
{
return aHint & ~NS_HintsNotHandledForDescendantsIn(aHint);
}
ServoElementSnapshotOwned
Gecko_CreateElementSnapshot(RawGeckoElementBorrowed aElement)
{

View File

@ -243,6 +243,7 @@ nsStyleContext* Gecko_GetStyleContext(RawGeckoNodeBorrowed node,
nsIAtom* aPseudoTagOrNull);
nsChangeHint Gecko_CalcStyleDifference(nsStyleContext* oldstyle,
ServoComputedValuesBorrowed newstyle);
nsChangeHint Gecko_HintsHandledForDescendants(nsChangeHint aHint);
// Element snapshot.
ServoElementSnapshotOwned Gecko_CreateElementSnapshot(RawGeckoElementBorrowed element);