[cssom-view] Step one of client{Width,Height} should be moved.
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
The following pages:
<!doctype html><html style="display: none"><script>alert(document.documentElement.clientWidth)</script>
<html style="display: none"><body><script>alert(document.body.clientWidth)</script>
Don't alert 0 in any case in neither Gecko, Blink or WebKit, even though per spec they should given the first point. https://drafts.csswg.org/cssom-view/#dom-element-clientwidth says:
If the element has no associated CSS layout box or if the CSS layout box is inline, return zero.
We should probably move it to be the step 2 to match implementations.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CSSOM View specification's Element clientWidth and clientHeight definitions linked in the issue, and compare the current algorithm with the reported Gecko, Blink, and WebKit behavior. Move the no-layout-box or inline-layout-box check to step 2, then verify that the examples no longer conflict with the stated behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation, web-dev
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100