Closed Bug 1304780 Opened 8 years ago Closed 5 months ago

Computed styles of width/height contain size of rendered scroll bars

Categories

(Core :: CSS Parsing and Computation, defect, P3)

48 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: que.etc, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160823121617

Steps to reproduce:

Take a look at this example: http://jsbin.com/sarozi/edit?console,output


Actual results:

Computed styles of width/height contain size of rendered scroll bars.


Expected results:

Scroll bars size shouldn't be added to computed CSS width & height properties as they are meant to represent content dimensions.
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
Component: Untriaged → Layout
Product: Firefox → Core
Component: Layout → DOM: CSS Object Model
Component: DOM: CSS Object Model → CSS Parsing and Computation
Priority: -- → P3
Severity: normal → S3

Taking a look at the linked example, this doesn't appear to be an issue anymore in Firefox 120. The computed width and height is unaffected by the size of rendered scrollbars.

I'm new(ish) here and am not sure what the process is for closing bugs, so I am requesting information from :emilio

Flags: needinfo?(emilio)

It happens if you have overlay scrollbars disabled, but it's invalid. width should round-trip. div.style.width = getComputedStyle(div).width shouldn't change rendering.

So our behavior is correct.

Status: UNCONFIRMED → RESOLVED
Closed: 5 months ago
Flags: needinfo?(emilio)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.