Closed Bug 1455535 Opened 6 years ago Closed 6 years ago

Shape editor: unable to Rotate or Resize correctly when shape declaration uses vmin units

Categories

(DevTools :: Inspector, defect)

All
Unspecified
defect
Not set
normal

Tracking

(firefox61 verified)

VERIFIED FIXED
Firefox 61
Tracking Status
firefox61 --- verified

People

(Reporter: rdoghi, Assigned: rcaliman)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image ScaleRotate.png
[Affected versions]: 
Nightly 61.0a1

[Affected platforms]:
Platforms: Windows 10 x 64, Windows 7 x 32, Mac OS X 10.12 and Ubuntu 16.04 x64.

[Steps to reproduce]:
1. Go to about:config and set "layout.css.shape-outside.enabled" to true.
2. Go to https://bug1282716.bmoattachments.org/attachment.cgi?id=8867096
3. Right click on the image and then click on "Inspect Element".
4. CTRL+Click on the button displayed next to clip-path to toggle the shape tool on
5. Use any of the Left side Points to Shrink or Enlarge the shape.
6. Use the Middle points to Rotate or Move the entire shape frame.

[Expected result]:
- The User should be able to resize the shape using all of the Highlighter points.
- The User should be able to rotate and move the entire shape using the middle button

[Actual result]:
- Using the Left side Points will distort the entire shape.
- Using the Rotate or Move Points will distort the entire shape.

Please check the Attachment:
Depends on: 1242029
Blocks: 1242029
No longer depends on: 1242029
This likely has to do with the vmin unit type used in this shape declaration. Other, more common units (px, %, em, rem) do not exhibit this issue.

Even dragging individual points for this shape yields unexpected results.
Assignee: nobody → rcaliman
Summary: The User is unable to Rotate or Resize the entire shape using the left side Highlighter points → Shape editor: unable to Rotate or Resize correctly when shape declaration uses vmin units
Comment on attachment 8969683 [details]
Bug 1455535 - Add support for vmin/vmax units. Ensure vh/vw are computed against actual host window.

https://reviewboard.mozilla.org/r/238480/#review244244

Looks great to me, using the node's window instead of the parent window. And adding support for vmin/max. Pretty straightforward changes it seems.
It would be really cool to add some sort of test for this. Not sure if you can think of a way to do that. I don't know how detailed our shapes tests are at the moment.
I won't block R+ on this.
Attachment #8969683 - Flags: review?(pbrosset) → review+
Latest try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=70664a017ba905329140e41acedb896ab428ae59

We have reasonable shapes tests, but none for exotic unit types like these.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/22a1e2529011
Add support for vmin/vmax units. Ensure vh/vw are computed against actual host window. r=pbro
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/22a1e2529011
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Hello, i have retested this issue on Windows 10 , Mac OS X and Ubuntu using the latest version of nightly 61.0a1 (2018-05-03) and it no longer reproduces.

I can Confirm it as fixed and mark it as Verified.
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.