Bug 20569 - document.height is inconsistent with other browsers
Summary: document.height is inconsistent with other browsers
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2008-08-29 11:39 PDT by Eric Roman
Modified: 2022-07-30 13:36 PDT (History)
4 users (show)

See Also:


Attachments
In strict mode, only document.height differs between Firefox and Safari (3.21 KB, text/html)
2008-08-29 11:41 PDT, Eric Roman
no flags Details
In quirks mode, there are other differences between WebKit and Gecko. However document.height is still different in the same way (3.08 KB, text/html)
2008-08-29 11:42 PDT, Eric Roman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Roman 2008-08-29 11:39:57 PDT
document.height is inconsistent with Gecko (and other browsers don't support it)

In Firefox, it looks like:
  document.height = document.body.clientHeight

Whereas in Safari it looks like:
 document.height = max{window.innerHeight, document.body.clientHeight}

Since other browsers don't support document.height, I think WebKit should just match Gecko.

Note that the behavior of document.height is consistent in both strict and quirks mode (unfortunately the same can't be said for other document/body measurements).
Comment 1 Eric Roman 2008-08-29 11:41:02 PDT
Created attachment 23073 [details]
In strict mode, only document.height differs between Firefox and Safari
Comment 2 Eric Roman 2008-08-29 11:42:18 PDT
Created attachment 23074 [details]
In quirks mode, there are other differences between WebKit and Gecko. However document.height is still different in the same way
Comment 3 Ahmad Saleem 2022-07-30 05:45:58 PDT
In all browsers now both below are same: 

document.height = undefined
document.width = undefined

I tested it in Safari 15.6, Chrome Canary 106 and Firefox Nightly 105. I think it might have been changed in Firefox or support was dropped but just wanted to share updated results. Since it is now same across all browsers, I think this can be marked as "RESOLVED CONFIGURATION CHANGED". Thanks!