This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24159 - Is returning a noninteger Window.innerWidth/innerHeight/outerWidth/outerHeight web-compatible?
Summary: Is returning a noninteger Window.innerWidth/innerHeight/outerWidth/outerHeigh...
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM View (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-23 05:16 UTC by Boris Zbarsky
Modified: 2015-02-12 10:26 UTC (History)
2 users (show)

See Also:


Attachments

Description Boris Zbarsky 2013-12-23 05:16:03 UTC
Do any UAs currently do that?  I realize that in practice they can be non-integral, but are callers OK with fractional values here?
Comment 1 Boris Zbarsky 2013-12-23 05:24:06 UTC
Similar for outerWidth/Height too.
Comment 2 Simon Pieters 2014-05-20 05:19:54 UTC
Some information from Rossen from Microsoft regarding MouseEvents:

[[
[13:56] <Rossen_> here's an example content that will break from sub-px values
[13:56] <Rossen_> for (var x = startX; x != (endX + xDir); x += xDir) ...
[13:57] <zcorpan> thanks. do you have a URL also=
[13:57] <Rossen_> In this case, xDir is a direction, so -1 or 1. startX is where the mouse clicked down, and the endX is where the mouse is currently, as reported in the offsetX to the mouseMove handler. The problem is, this script assumes you will only return integer values for offsetX and it does a != check rather than < or >. Chrome only reports integers, so there's no problem. They also have a special workaround for Firefox, who doesn't even define offsetX
[13:58] <Rossen_> http://goosecode.com/shapdar
[13:59] <Rossen_> If you were to return fractional values here, this for loop goes on forever and it would hang. I think the only thing to do here is outreach to the site.
[14:09] <zcorpan> is it ok if i make this information available in a public place?
[14:11] <Rossen_> for sure
]]
Comment 3 Rick Byers 2014-05-20 15:51:01 UTC
Note that we're attempting to ship at least sub-pixel scroll offsets (and also width/height) in blink in http://crbug.com/360889.  We'll record any other compat issues we find there.
Comment 4 Simon Pieters 2014-09-23 20:37:27 UTC
Current status for Blink: https://groups.google.com/a/chromium.org/d/msg/blink-dev/_Q7A4AQBFKY/iiOrm2c4TcEJ