w3c/csswg-drafts

[cssom-view] Screen interface has extra stuff in browsers

Open

#1 753 ouverte le 23 août 2017

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)HTML (545 forks)batch import
Help Wantedcssom-view-1

Métriques du dépôt

Stars
 (3 546 stars)
Métriques de merge PR
 (Merge moyen 87j 7h) (24 PRs mergées en 30 j)

Description

In adding IDL tests for CSSOM View in https://github.com/w3c/web-platform-tests/pull/6982 I noticed that Gecko failed just two tests, because it has Screen inheriting from EventTarget. Which made me curious.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5324

In Gecko (Firefox Nightly), iterating screen gives:

log: mozLockOrientation: function mozLockOrientation() {
    [native code]
}
log: mozUnlockOrientation: function mozUnlockOrientation() {
    [native code]
}
log: availWidth: 1680
log: availHeight: 1024
log: width: 1680
log: height: 1050
log: colorDepth: 24
log: pixelDepth: 24
log: top: 0
log: left: 0
log: availTop: 22
log: availLeft: 0
log: mozOrientation: landscape-primary
log: onmozorientationchange: null
log: orientation: [object ScreenOrientation]
log: addEventListener: function addEventListener() {
    [native code]
}
log: removeEventListener: function removeEventListener() {
    [native code]
}
log: dispatchEvent: function dispatchEvent() {
    [native code]
}

Chromium (Chrome Canary):

log: availWidth: 1680
log: availHeight: 1024
log: width: 1680
log: height: 1050
log: colorDepth: 24
log: pixelDepth: 24
log: availLeft: 0
log: availTop: 22
log: orientation: [object ScreenOrientation]
log: keepAwake: false

WebKit (Safari TP) has just the specified members:

log: height: 1050
log: width: 1680
log: colorDepth: 24
log: pixelDepth: 24
log: availLeft: 0
log: availTop: 22
log: availHeight: 1024
log: availWidth: 1680

EdgeHTML 15 (via browserstack):

log: availHeight: 950
log: availWidth: 1680
log: bufferDepth: 0
log: colorDepth: 0
log: deviceXDPI: 96
log: deviceYDPI: 96
log: fontSmoothingEnabled: true
log: height: 1536
log: logicalXDPI: 96
log: logicalYDPI: 96
log: msOrientation: landscape-primary
log: onmsorientationchange: null
log: pixelDepth: 24
log: systemXDPI: 96
log: systemYDPI: 96
log: width: 2048
log: msLockOrientation: function msLockOrientation() { [native code] }
log: msUnlockOrientation: function msUnlockOrientation() { [native code] }
log: addEventListener: function addEventListener() { [native code] }
log: dispatchEvent: function dispatchEvent() { [native code] }
log: removeEventListener: function removeEventListener() { [native code] }

screen.orientation is https://w3c.github.io/screen-orientation/

What do we want to do with the other stuff? Standardize? Try to remove from browsers?

Guide contributeur