Change our implementation of 'overflow: hidden' to be more compatible with other browsers, as CSS 2.1 now allows. b=69355 r+sr=bzbarsky

This commit is contained in:
dbaron%dbaron.org 2003-09-16 22:09:18 +00:00
Родитель 7e5446f82d
Коммит b57afa4a19
21 изменённых файлов: 27 добавлений и 23 удалений

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

@ -111,6 +111,7 @@ CSS_KEY(-moz-groupbox, _moz_groupbox)
CSS_KEY(-moz-gujarati, _moz_gujarati) CSS_KEY(-moz-gujarati, _moz_gujarati)
CSS_KEY(-moz-gurmukhi, _moz_gurmukhi) CSS_KEY(-moz-gurmukhi, _moz_gurmukhi)
CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant) CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant)
CSS_KEY(-moz-hidden-unscrollable, _moz_hidden_unscrollable)
CSS_KEY(-moz-hangul, _moz_hangul) CSS_KEY(-moz-hangul, _moz_hangul)
CSS_KEY(-moz-hyperlinktext, _moz_hyperlinktext) CSS_KEY(-moz-hyperlinktext, _moz_hyperlinktext)
CSS_KEY(-moz-info, _moz_info) CSS_KEY(-moz-info, _moz_info)

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

@ -84,7 +84,7 @@ nsStyleStructID_Length /* one past the end; length of 0-based list */
#define NS_RULE_NODE_GC_MARK 0x02000000 #define NS_RULE_NODE_GC_MARK 0x02000000
#define NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(the_sid) \ #define NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(the_sid) \
static const nsStyleStructID GetStyleStructID() {return the_sid;} static nsStyleStructID GetStyleStructID() {return the_sid;}
#define NS_GET_STYLESTRUCTID(type) (type::GetStyleStructID()) #define NS_GET_STYLESTRUCTID(type) (type::GetStyleStructID())

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

@ -625,11 +625,12 @@ const PRInt32 nsCSSProps::kOutlineColorKTable[] = {
const PRInt32 nsCSSProps::kOverflowKTable[] = { const PRInt32 nsCSSProps::kOverflowKTable[] = {
eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE, eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE,
eCSSKeyword_hidden, NS_STYLE_OVERFLOW_HIDDEN, eCSSKeyword_hidden, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL, eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL,
eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_SCROLLBARS_NONE, eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL, eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL,
eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL, eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL,
eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_HIDDEN,
-1,-1 -1,-1
}; };

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

@ -51,7 +51,7 @@ html|p#brownFoxLabel {
border: 1px solid black; border: 1px solid black;
margin: 0px; margin: 0px;
padding: 2px; padding: 2px;
overflow: hidden; overflow: -moz-hidden-unscrollable;
height: 70px; height: 70px;
max-height: 70px; max-height: 70px;
line-height: 70px; line-height: 70px;

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

@ -226,7 +226,7 @@ textarea > scrollbar {
} }
*|*::-moz-singleline-textcontrol-frame { *|*::-moz-singleline-textcontrol-frame {
overflow: hidden; overflow: -moz-hidden-unscrollable;
white-space: nowrap; white-space: nowrap;
background-color: inherit; background-color: inherit;
text-align: inherit; text-align: inherit;

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

@ -657,8 +657,8 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState,
// XXXldb What should really matter is whether there exist non- // XXXldb What should really matter is whether there exist non-
// empty frames in the block (with appropriate whitespace munging). // empty frames in the block (with appropriate whitespace munging).
// Consider the case where we clip off the overflow with // Consider the case where we clip off the overflow with
// 'overflow: hidden' (which doesn't currently affect mOverflowArea, // 'overflow: -moz-hidden-unscrollable' (which doesn't currently
// but probably should. // affect mOverflowArea, but probably should.
if ((0 == mMetrics.height) && (0 == mMetrics.mOverflowArea.height)) if ((0 == mMetrics.height) && (0 == mMetrics.mOverflowArea.height))
{ {
// Collapse the bottom margin with the top margin that was already // Collapse the bottom margin with the top margin that was already

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

@ -657,8 +657,8 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState,
// XXXldb What should really matter is whether there exist non- // XXXldb What should really matter is whether there exist non-
// empty frames in the block (with appropriate whitespace munging). // empty frames in the block (with appropriate whitespace munging).
// Consider the case where we clip off the overflow with // Consider the case where we clip off the overflow with
// 'overflow: hidden' (which doesn't currently affect mOverflowArea, // 'overflow: -moz-hidden-unscrollable' (which doesn't currently
// but probably should. // affect mOverflowArea, but probably should.
if ((0 == mMetrics.height) && (0 == mMetrics.mOverflowArea.height)) if ((0 == mMetrics.height) && (0 == mMetrics.mOverflowArea.height))
{ {
// Collapse the bottom margin with the top margin that was already // Collapse the bottom margin with the top margin that was already

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

@ -120,7 +120,7 @@ textarea > scrollbar {
} }
*|*::-moz-singleline-textcontrol-frame { *|*::-moz-singleline-textcontrol-frame {
overflow: hidden; overflow: -moz-hidden-unscrollable;
white-space: nowrap; white-space: nowrap;
background-color: inherit; background-color: inherit;
text-align: inherit; text-align: inherit;
@ -185,7 +185,7 @@ select::-moz-dummy-option {
} }
*|*::-moz-display-comboboxcontrol-frame { *|*::-moz-display-comboboxcontrol-frame {
overflow: hidden; overflow: -moz-hidden-unscrollable;
/* This top/bottom padding plus the combobox top/bottom border need to /* This top/bottom padding plus the combobox top/bottom border need to
add up to the top/bottom borderpadding of text inputs and buttons */ add up to the top/bottom borderpadding of text inputs and buttons */
padding: 1px 0 1px 4px; padding: 1px 0 1px 4px;

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

@ -392,7 +392,7 @@ object, embed, applet {
frameset { frameset {
display: block ! important; display: block ! important;
overflow: hidden; overflow: -moz-hidden-unscrollable;
} }
frame { frame {

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

@ -226,7 +226,7 @@ textarea > scrollbar {
} }
*|*::-moz-singleline-textcontrol-frame { *|*::-moz-singleline-textcontrol-frame {
overflow: hidden; overflow: -moz-hidden-unscrollable;
white-space: nowrap; white-space: nowrap;
background-color: inherit; background-color: inherit;
text-align: inherit; text-align: inherit;

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

@ -120,7 +120,7 @@ textarea > scrollbar {
} }
*|*::-moz-singleline-textcontrol-frame { *|*::-moz-singleline-textcontrol-frame {
overflow: hidden; overflow: -moz-hidden-unscrollable;
white-space: nowrap; white-space: nowrap;
background-color: inherit; background-color: inherit;
text-align: inherit; text-align: inherit;
@ -185,7 +185,7 @@ select::-moz-dummy-option {
} }
*|*::-moz-display-comboboxcontrol-frame { *|*::-moz-display-comboboxcontrol-frame {
overflow: hidden; overflow: -moz-hidden-unscrollable;
/* This top/bottom padding plus the combobox top/bottom border need to /* This top/bottom padding plus the combobox top/bottom border need to
add up to the top/bottom borderpadding of text inputs and buttons */ add up to the top/bottom borderpadding of text inputs and buttons */
padding: 1px 0 1px 4px; padding: 1px 0 1px 4px;

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

@ -392,7 +392,7 @@ object, embed, applet {
frameset { frameset {
display: block ! important; display: block ! important;
overflow: hidden; overflow: -moz-hidden-unscrollable;
} }
frame { frame {

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

@ -111,6 +111,7 @@ CSS_KEY(-moz-groupbox, _moz_groupbox)
CSS_KEY(-moz-gujarati, _moz_gujarati) CSS_KEY(-moz-gujarati, _moz_gujarati)
CSS_KEY(-moz-gurmukhi, _moz_gurmukhi) CSS_KEY(-moz-gurmukhi, _moz_gurmukhi)
CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant) CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant)
CSS_KEY(-moz-hidden-unscrollable, _moz_hidden_unscrollable)
CSS_KEY(-moz-hangul, _moz_hangul) CSS_KEY(-moz-hangul, _moz_hangul)
CSS_KEY(-moz-hyperlinktext, _moz_hyperlinktext) CSS_KEY(-moz-hyperlinktext, _moz_hyperlinktext)
CSS_KEY(-moz-info, _moz_info) CSS_KEY(-moz-info, _moz_info)

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

@ -625,11 +625,12 @@ const PRInt32 nsCSSProps::kOutlineColorKTable[] = {
const PRInt32 nsCSSProps::kOverflowKTable[] = { const PRInt32 nsCSSProps::kOverflowKTable[] = {
eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE, eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE,
eCSSKeyword_hidden, NS_STYLE_OVERFLOW_HIDDEN, eCSSKeyword_hidden, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL, eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL,
eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_SCROLLBARS_NONE, eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL, eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL,
eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL, eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL,
eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_HIDDEN,
-1,-1 -1,-1
}; };

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

@ -84,7 +84,7 @@ nsStyleStructID_Length /* one past the end; length of 0-based list */
#define NS_RULE_NODE_GC_MARK 0x02000000 #define NS_RULE_NODE_GC_MARK 0x02000000
#define NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(the_sid) \ #define NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(the_sid) \
static const nsStyleStructID GetStyleStructID() {return the_sid;} static nsStyleStructID GetStyleStructID() {return the_sid;}
#define NS_GET_STYLESTRUCTID(type) (type::GetStyleStructID()) #define NS_GET_STYLESTRUCTID(type) (type::GetStyleStructID())

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

@ -277,7 +277,7 @@ tree.list {
max-height : 52px; max-height : 52px;
min-height : 52px; min-height : 52px;
margin : 6px 5px 6px 5px; margin : 6px 5px 6px 5px;
overflow : hidden; overflow : -moz-hidden-unscrollable;
} }
#preview-image-holder { #preview-image-holder {

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

@ -67,7 +67,7 @@
#structToolbar { #structToolbar {
min-width: 1px; min-width: 1px;
overflow: hidden; overflow: -moz-hidden-unscrollable;
} }
#structSpacer { #structSpacer {

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

@ -276,7 +276,7 @@ tree.list {
min-height: 52px; min-height: 52px;
max-width: 82px; max-width: 82px;
max-height: 52px; max-height: 52px;
overflow: hidden; overflow: -moz-hidden-unscrollable;
} }
#preview-image-holder { #preview-image-holder {

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

@ -67,7 +67,7 @@
#structToolbar { #structToolbar {
min-width: 1px; min-width: 1px;
overflow: hidden; overflow: -moz-hidden-unscrollable;
} }
#structSpacer { #structSpacer {

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

@ -85,7 +85,7 @@ radio {
window, window,
page { page {
overflow: hidden; overflow: -moz-hidden-unscrollable;
-moz-box-orient: vertical; -moz-box-orient: vertical;
} }

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

@ -98,7 +98,7 @@ radio {
window, window,
page { page {
overflow: hidden; overflow: -moz-hidden-unscrollable;
-moz-box-orient: vertical; -moz-box-orient: vertical;
} }