Bug 777672 - [b2g] |body { overflow: hidden }| do not hide scrollbars (css part). r=fabrice

This commit is contained in:
Vivien Nicolas 2012-08-03 12:35:14 +02:00
parent d0416d1328
commit 9d50bccae2
3 changed files with 19 additions and 21 deletions

View File

@ -11,23 +11,18 @@ xul|window xul|scrollbar {
}
html xul|scrollbar {
display: block;
}
xul|scrollbar[orient="vertical"] {
-moz-appearance: none !important;
position: relative;
margin-left: -8px;
min-width: 8px;
max-width: 8px;
background-color: transparent !important;
background-image: none !important;
border: 0px solid transparent !important;
z-index: 2147483647;
}
xul|scrollbar[orient="vertical"]:-moz-locale-dir(rtl) {
margin-left: 2px;
margin-right: -10px;
xul|scrollbar[orient="vertical"] {
-moz-margin-start: -8px;
min-width: 8px;
max-width: 8px;
}
xul|scrollbar[orient="vertical"] xul|thumb {
@ -36,14 +31,9 @@ xul|scrollbar[orient="vertical"] xul|thumb {
}
xul|scrollbar[orient="horizontal"] {
-moz-appearance: none !important;
position: relative;
margin-top: -8px;
min-height: 8px;
max-height: 8px;
margin-top: -8px;
background-color: transparent !important;
background-image: none !important;
border: 0px solid transparent !important;
}
xul|scrollbar[orient="horizontal"] xul|thumb {
@ -51,9 +41,8 @@ xul|scrollbar[orient="horizontal"] xul|thumb {
min-height: 6px !important;
}
xul|scrollbox {
overflow-y: scroll;
overflow-x: scroll;
xul|scrollbar[disabled] {
display: none;
}
xul|scrollbarbutton {

View File

@ -21,7 +21,7 @@ let whitelistedEvents = [
];
function debug(msg) {
//dump("BrowserElementChild - " + msg + "\n");
dump("BrowserElementChild - " + msg + "\n");
}
function sendAsyncMsg(msg, data) {

View File

@ -112,6 +112,13 @@ const ContentPanning = {
},
getPannable: function cp_getPannable(node) {
debug('getPannable');
let scrollable = docShell.QueryInterface(Ci.nsIScrollable);
let canHaveHorizontal = {};
let canHaveVertical = {};
scrollable.getScrollbarVisibility(canHaveHorizontal, canHaveVertical);
debug('horizontal: ' + canHaveHorizontal.value + ' vertical: ' + canHaveVertical.value);
if (!(node instanceof Ci.nsIDOMHTMLElement) || node.tagName == 'HTML')
return [null, null];
@ -129,8 +136,10 @@ const ContentPanning = {
rect.width < node.scrollWidth));
let isScroll = (overflow.indexOf('scroll') != -1);
if (isScroll || isAuto)
if (isScroll || isAuto) {
debug(node);
return [node, this._generateCallback(node)];
}
node = node.parentNode;
}