New issue
Advanced search Search tips
Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

[css-logical] Logical size properties compute to old value

Project Member Reported by obru...@igalia.com, Jun 5

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce the problem:
Run this code in the console:

  document.body.style.width = "10px";
  document.body.offsetLeft;
  document.body.style.width = "50px";
  console.log(getComputedStyle(document.body).inlineSize); // 10px
  console.log(getComputedStyle(document.body).width); // 50px

What is the expected behavior?
Both "inline-size" and "width" compute to "50px".

What went wrong?
The computed value of "inline-size" is "10px".

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 68.0.3437.0  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 29.0 r0

It's the same for block-size. But min and max sizing properties don't seem affected.
 
testcase.htm
313 bytes View Download
Labels: Needs-Triage-M68
Cc: r...@igalia.com
Summary: [css-logical] Logical size properties compute to old value (was: Logical size properties compute to old value)
Cc: obru...@igalia.com
Labels: -OS-Linux -Needs-Triage-M68
Status: Available (was: Unconfirmed)
This is causing failures in:
https://chromium.googlesource.com/chromium/src/+/beeed8b10734f1c616ef2846134c98fbbf7ed674/third_party/WebKit/LayoutTests/external/wpt/css/css-logical/logical-box-size-expected.txt
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/79cd1eee97e64e7f08dd4cc8ed846b73c7bb5859

commit 79cd1eee97e64e7f08dd4cc8ed846b73c7bb5859
Author: Oriol Brufau <obrufau@igalia.com>
Date: Tue Jun 26 20:55:48 2018

[css-logical] Fix computed style of logical size properties

Unlike 'width' and 'height', 'inline-size' and 'block-size' were not
considered to be layout dependent, and thus getComputedStyle could
provide a wrong value.

BUG= 849855 

TEST=external/wpt/css/css-logical/logical-box-size.html

The test still has some failures because sideways writing modes have not
been implemented yet (http://crbug.com/680331).

Change-Id: I4ee8ed8b2cd575fb3ddd5226b23c6a4bb843b81f
Reviewed-on: https://chromium-review.googlesource.com/1114966
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570527}
[modify] https://crrev.com/79cd1eee97e64e7f08dd4cc8ed846b73c7bb5859/third_party/WebKit/LayoutTests/external/wpt/css/css-logical/logical-box-size-expected.txt
[modify] https://crrev.com/79cd1eee97e64e7f08dd4cc8ed846b73c7bb5859/third_party/blink/renderer/core/css/CSSProperties.json5
[modify] https://crrev.com/79cd1eee97e64e7f08dd4cc8ed846b73c7bb5859/third_party/blink/renderer/core/css/properties/longhands/block_size_custom.cc
[modify] https://crrev.com/79cd1eee97e64e7f08dd4cc8ed846b73c7bb5859/third_party/blink/renderer/core/css/properties/longhands/inline_size_custom.cc

Owner: obru...@igalia.com
Status: Fixed (was: Available)

Sign in to add a comment