mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1187851 patch 2 - Cleanup to prepare for making dynamic changes to filter and perspective change fixed position containing block for descendants. r=roc
--HG-- extra : commitid : BOKbXL5V3Bw
This commit is contained in:
parent
d38d0ae93d
commit
8109f0861d
@ -776,10 +776,9 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
||||
// that we can't coalesce nsChangeHint_AddOrRemoveTransform hints up
|
||||
// to ancestors (i.e. it can't be an inherited change hint).
|
||||
if (cont->IsAbsPosContaininingBlock()) {
|
||||
// If a transform has been added, we'll be taking this path,
|
||||
// but we may be taking this path even if a transform has been
|
||||
// removed. It's OK to add the bit even if it's not needed.
|
||||
cont->AddStateBits(NS_FRAME_MAY_BE_TRANSFORMED);
|
||||
if (cont->StyleDisplay()->HasTransform(cont)) {
|
||||
cont->AddStateBits(NS_FRAME_MAY_BE_TRANSFORMED);
|
||||
}
|
||||
if (!cont->IsAbsoluteContainer() &&
|
||||
(cont->GetStateBits() & NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN)) {
|
||||
cont->MarkAsAbsoluteContainingBlock();
|
||||
|
@ -2133,7 +2133,7 @@ struct nsStyleDisplay {
|
||||
uint8_t mTransformBox; // [reset] see nsStyleConsts.h
|
||||
nsRefPtr<nsCSSValueSharedList> mSpecifiedTransform; // [reset]
|
||||
nsStyleCoord mTransformOrigin[3]; // [reset] percent, coord, calc, 3rd param is coord, calc only
|
||||
nsStyleCoord mChildPerspective; // [reset] coord
|
||||
nsStyleCoord mChildPerspective; // [reset] none, coord
|
||||
nsStyleCoord mPerspectiveOrigin[2]; // [reset] percent, coord, calc
|
||||
|
||||
nsAutoTArray<mozilla::StyleTransition, 1> mTransitions; // [reset]
|
||||
@ -3175,7 +3175,7 @@ struct nsStyleSVGReset {
|
||||
}
|
||||
|
||||
bool HasFilters() const {
|
||||
return mFilters.Length() > 0;
|
||||
return !mFilters.IsEmpty();
|
||||
}
|
||||
|
||||
bool HasNonScalingStroke() const {
|
||||
|
@ -138,8 +138,10 @@ nsStyleDisplay::HasTransform(const nsIFrame* aContextFrame) const
|
||||
bool
|
||||
nsStyleDisplay::IsFixedPosContainingBlock(const nsIFrame* aContextFrame) const
|
||||
{
|
||||
NS_ASSERTION(aContextFrame->StyleDisplay() == this,
|
||||
"unexpected aContextFrame");
|
||||
return (HasTransform(aContextFrame) || HasPerspectiveStyle() ||
|
||||
!aContextFrame->StyleSVGReset()->mFilters.IsEmpty()) &&
|
||||
aContextFrame->StyleSVGReset()->HasFilters()) &&
|
||||
!aContextFrame->IsSVGText();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user