зеркало из https://github.com/mozilla/pjs.git
Land bug 72747 in pieces: add functions for common overflow tests to nsStyleDisplay. b=72747 r+sr=roc
This commit is contained in:
Родитель
40fe460f45
Коммит
2be757b76e
|
@ -747,6 +747,18 @@ struct nsStyleDisplay : public nsStyleStruct {
|
|||
|
||||
PRBool IsPositioned() const {return IsAbsolutelyPositioned() ||
|
||||
(NS_STYLE_POSITION_RELATIVE == mPosition);}
|
||||
|
||||
PRBool IsScrollableOverflow() const {
|
||||
return mOverflow != NS_STYLE_OVERFLOW_VISIBLE &&
|
||||
mOverflow != NS_STYLE_OVERFLOW_CLIP;
|
||||
}
|
||||
|
||||
// For table elements that don't support scroll frame creation, we
|
||||
// support 'overflow: hidden' to mean 'overflow: -moz-hidden-unscrollable'.
|
||||
PRBool IsTableClip() const {
|
||||
return mOverflow == NS_STYLE_OVERFLOW_CLIP ||
|
||||
mOverflow == NS_STYLE_OVERFLOW_HIDDEN;
|
||||
}
|
||||
};
|
||||
|
||||
struct nsStyleTable: public nsStyleStruct {
|
||||
|
|
|
@ -747,6 +747,18 @@ struct nsStyleDisplay : public nsStyleStruct {
|
|||
|
||||
PRBool IsPositioned() const {return IsAbsolutelyPositioned() ||
|
||||
(NS_STYLE_POSITION_RELATIVE == mPosition);}
|
||||
|
||||
PRBool IsScrollableOverflow() const {
|
||||
return mOverflow != NS_STYLE_OVERFLOW_VISIBLE &&
|
||||
mOverflow != NS_STYLE_OVERFLOW_CLIP;
|
||||
}
|
||||
|
||||
// For table elements that don't support scroll frame creation, we
|
||||
// support 'overflow: hidden' to mean 'overflow: -moz-hidden-unscrollable'.
|
||||
PRBool IsTableClip() const {
|
||||
return mOverflow == NS_STYLE_OVERFLOW_CLIP ||
|
||||
mOverflow == NS_STYLE_OVERFLOW_HIDDEN;
|
||||
}
|
||||
};
|
||||
|
||||
struct nsStyleTable: public nsStyleStruct {
|
||||
|
|
Загрузка…
Ссылка в новой задаче