Issue metadata
Sign in to add a comment
|
Should getComputedStyle( dom ).overflow return empty string when overflowX/Y = 'scroll'?
Reported by
zemzh...@gmail.com,
Jun 14 2017
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36
Steps to reproduce the problem:
1. create a dom
2. set dom.style to be "overflow-x :hidden; overflow-y:scroll;"
3. use getComputedStyle( dom ).overflow
What is the expected behavior?
* In the earlier version it return "scroll"
* I test this case in Chrome v58, v58, MSIE9, FireFox v54, the new version of FireFox and Chrome return empty string
What went wrong?
what getComputedStyle should return in this case/
Did this work before? Yes Chrome/58.0.3029.110
Chrome version: 59.0.3071.86 Channel: stable
OS Version: 10.0
Flash Version:
following is the test code:
```javascript
(function(){
function check( style, list ){
var d = document.createElement( 'div' ),
id = d.id = 't-' +( +new Date );
d.innerHTML = '<style>#' + id + ' div{' + style + '}</style><div/>';
document.body.appendChild( d );
var ii = list.length,
s = getComputedStyle( d.querySelector( 'div' ) );
console.log( '' );
console.log( 'style : ' + style );
while( ii-- ){
console.log( list[ ii ] + ' : ' + s[ list[ ii ] ] );
}
document.body.removeChild( d );
}
console.log( navigator.userAgent );
check(
'overflow-x :hidden; overflow-y:scroll;',
'overflow,overflowX,overflowY'.split( ',' )
);
check(
'overflow-x :visible; overflow-y:scroll;',
'overflow,overflowX,overflowY'.split( ',' )
);
check(
'overflow :hidden;',
'overflow,overflowX,overflowY'.split( ',' )
);
})();
```
Following is the result:
```
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
style : overflow-x :hidden; overflow-y:scroll;
overflowY : scroll
overflowX : hidden
overflow : scroll
style : overflow-x :visible; overflow-y:scroll;
overflowY : scroll
overflowX : auto
overflow : auto
style : overflow :hidden;
overflowY : hidden
overflowX : hidden
overflow : hidden
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
style : overflow-x :hidden; overflow-y:scroll;
overflowY : scroll
overflowX : hidden
overflow : scroll
style : overflow-x :visible; overflow-y:scroll;
overflowY : scroll
overflowX : visible
overflow : scroll
style : overflow :hidden;
overflowY : hidden
overflowX : hidden
overflow : hidden
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
style : overflow-x :hidden; overflow-y:scroll;
overflowY : scroll
overflowX : hidden
overflow :
style : overflow-x :visible; overflow-y:scroll;
overflowY : scroll
overflowX : auto
overflow :
style : overflow :hidden;
overflowY : hidden
overflowX : hidden
overflow : hidden
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36
style : overflow-x :hidden; overflow-y:scroll;
overflowY : scroll
overflowX : hidden
overflow :
style : overflow-x :visible; overflow-y:scroll;
overflowY : scroll
overflowX : auto
overflow :
style : overflow :hidden;
overflowY : hidden
overflowX : hidden
overflow : hidden
```
,
Jun 15 2017
,
Jun 15 2017
Thank you for providing more feedback. Adding requester "brajkumar@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 15 2017
,
Jun 16 2017
,
Jun 16 2017
Confirmed there's no value for overflow for the first two sections in Chrome 59, 60 and 61 on Linux. Requesting bisect.
,
Jun 21 2017
Able to reproduce the issue using latest stable #59.0.3071.109 on Mac 10.12.4, Win 10 and Linux Ubuntu 14.04 Below is the bisect information ============================== Using the per-revision bisect providing the bisect results Good build: 59.0.3060.0 (Revision: 461328). Bad build : 59.0.3061.0 (Revision: 461353). You are probably looking for a change made after 461351 (known good), but no later than 461352 (first known bad) CL: https://chromium.googlesource.com/chromium/src/+/02c25323de5c3f16bb47d5dc6fc6c7b9a939b784 @shend: Could you please look into the issue, pardon me if it has nothing to do with your changes and if possible please assign it to concern owner. Note: 1. Issue is seen in M61 as well 2. Adding RBS since it's broken in M59 only, please feel free to undo if someone feels otherwise. Thanks!!.
,
Jun 21 2017
,
Jun 21 2017
,
Jun 26 2017
cc candrada@ and amineer@ to evaluate impact of this for Android.
,
Jun 26 2017
It looks like this change was made by shend@ (CL in #8) to match the spec. It also seems like the latest version of Firefox follows the spec. I am not sure if this is a bug (and a release blocker), but shend@, could you please comment on what our plan is here? This is currently tagged as a Stable release blocker for M59.
,
Jun 26 2017
Sorry for the slow response. Yes, according to the spec, returning the empty string is the correct behaviour (see the explanation in https://chromium.googlesource.com/chromium/src/+/02c25323de5c3f16bb47d5dc6fc6c7b9a939b784). This is what Firefox does as well. Closing this issue since it's working as intended. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by brajkumar@chromium.org
, Jun 15 2017Labels: Needs-Feedback