Land bug 72747 in pieces: add functions for common overflow tests to nsStyleDisplay. b=72747 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2004-09-02 23:18:37 +00:00
Родитель 40fe460f45
Коммит 2be757b76e
2 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -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 {