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
parent 6fde3bd4ad
commit c49da48965
21 changed files with 27 additions and 23 deletions

View File

@ -111,6 +111,7 @@ CSS_KEY(-moz-groupbox, _moz_groupbox)
CSS_KEY(-moz-gujarati, _moz_gujarati)
CSS_KEY(-moz-gurmukhi, _moz_gurmukhi)
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-hyperlinktext, _moz_hyperlinktext)
CSS_KEY(-moz-info, _moz_info)

View File

@ -84,7 +84,7 @@ nsStyleStructID_Length /* one past the end; length of 0-based list */
#define NS_RULE_NODE_GC_MARK 0x02000000
#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())

View File

@ -625,11 +625,12 @@ const PRInt32 nsCSSProps::kOutlineColorKTable[] = {
const PRInt32 nsCSSProps::kOverflowKTable[] = {
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__moz_scrollbars_none, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL,
eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL,
eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_HIDDEN,
-1,-1
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -111,6 +111,7 @@ CSS_KEY(-moz-groupbox, _moz_groupbox)
CSS_KEY(-moz-gujarati, _moz_gujarati)
CSS_KEY(-moz-gurmukhi, _moz_gurmukhi)
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-hyperlinktext, _moz_hyperlinktext)
CSS_KEY(-moz-info, _moz_info)

View File

@ -625,11 +625,12 @@ const PRInt32 nsCSSProps::kOutlineColorKTable[] = {
const PRInt32 nsCSSProps::kOverflowKTable[] = {
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__moz_scrollbars_none, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL,
eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL,
eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_HIDDEN,
-1,-1
};

View File

@ -84,7 +84,7 @@ nsStyleStructID_Length /* one past the end; length of 0-based list */
#define NS_RULE_NODE_GC_MARK 0x02000000
#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())

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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