зеркало из https://github.com/mozilla/pjs.git
Introduce nsStyleCoord::HasCoordOrNonPercentCalc to check for either a coord value or a calc() value not containing a percent. (Bug 585715) r=bzbarsky a2.0=blocking+
This commit is contained in:
Родитель
a1eb2d9af9
Коммит
b6c00e2319
|
@ -143,6 +143,11 @@ public:
|
|||
(IsCalcUnit() && CalcHasPercent());
|
||||
}
|
||||
|
||||
PRBool ConvertsToLength() const {
|
||||
return mUnit == eStyleUnit_Coord ||
|
||||
(IsCalcUnit() && !CalcHasPercent());
|
||||
}
|
||||
|
||||
nscoord GetCoordValue() const;
|
||||
PRInt32 GetIntValue() const;
|
||||
float GetPercentValue() const;
|
||||
|
|
|
@ -480,10 +480,8 @@ DependsOnIntrinsicSize(const nsIFrame* aEmbeddingFrame)
|
|||
// XXX it would be nice to know if the size of aEmbeddingFrame's containing
|
||||
// block depends on aEmbeddingFrame, then we'd know if we can return false
|
||||
// for eStyleUnit_Percent too.
|
||||
return (width.GetUnit() != eStyleUnit_Coord &&
|
||||
(!width.IsCalcUnit() || width.CalcHasPercent())) ||
|
||||
(height.GetUnit() != eStyleUnit_Coord &&
|
||||
(!height.IsCalcUnit() || height.CalcHasPercent()));
|
||||
return !width.ConvertsToLength() ||
|
||||
!height.ConvertsToLength();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
Загрузка…
Ссылка в новой задаче