mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 970647 patch 1: Remove some null-checks and simplify control flow in nsIFrame::HasPerspective and nsIFrame::ChildrenHavePerspective. r=mattwoodrow
This commit is contained in:
parent
28f1ae0664
commit
5a1494a9c2
@ -1051,30 +1051,21 @@ nsIFrame::HasPerspective() const
|
||||
if (!IsTransformed()) {
|
||||
return false;
|
||||
}
|
||||
const nsStyleDisplay* parentDisp = nullptr;
|
||||
nsStyleContext* parentStyleContext = StyleContext()->GetParent();
|
||||
if (parentStyleContext) {
|
||||
parentDisp = parentStyleContext->StyleDisplay();
|
||||
if (!parentStyleContext) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (parentDisp &&
|
||||
parentDisp->mChildPerspective.GetUnit() == eStyleUnit_Coord &&
|
||||
parentDisp->mChildPerspective.GetCoordValue() > 0.0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
const nsStyleDisplay* parentDisp = parentStyleContext->StyleDisplay();
|
||||
return parentDisp->mChildPerspective.GetUnit() == eStyleUnit_Coord &&
|
||||
parentDisp->mChildPerspective.GetCoordValue() > 0.0;
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::ChildrenHavePerspective() const
|
||||
{
|
||||
const nsStyleDisplay *disp = StyleDisplay();
|
||||
if (disp &&
|
||||
disp->mChildPerspective.GetUnit() == eStyleUnit_Coord &&
|
||||
disp->mChildPerspective.GetCoordValue() > 0.0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return disp->mChildPerspective.GetUnit() == eStyleUnit_Coord &&
|
||||
disp->mChildPerspective.GetCoordValue() > 0.0;
|
||||
}
|
||||
|
||||
nsRect
|
||||
|
Loading…
Reference in New Issue
Block a user