Closed Bug 1391014 Opened 4 years ago Closed 4 years ago
CSS Grid Inspector: Bug, doesn't respect transformation on `html` element
59 bytes, text/x-review-board-request
If I apply a margin on a document's HTML element, the Grid Inspector miscalculates where to draw the boxes for a Grid. Here's an example: 1) Open this in Firefox Nightly: https://s.codepen.io/jensimmons/debug/GvyJWV, and open up the Grid Inspector 2) See that the Grid is drawn in the wrong place, https://monosnap.com/file/RJqv4iIr9QktnaPHAlRNmvJsyIPDVS.png 3) Remove the margin from the HTML element, and see that the Grid is now in the correct place. Here's the full code for the example so you can see the CSS: https://codepen.io/jensimmons/pen/GvyJWV?editors=1100#0 Note — it works *inside* CodePen itself, because the document structure is different.
Summary: CSS Grid Inspector: Bug, doesn't respect margin on `html` element → CSS Grid Inspector: Bug, doesn't respect transformation on `html` element
This patch should do the trick. Basically the matrix we applied to the grid was everything up to the `documentElement` (our ancestor), but it didn't consider any transformation - rotation, translation, scale, etc - applied to the `documentElement` itself (`margin` and `top`, `left` etc are considering a "translation" in the matrix).
Comment on attachment 8905989 [details] Bug 1391014 - take in account the ancestor's transformation too for the current matrix; https://reviewboard.mozilla.org/r/177746/#review182818
Attachment #8905989 - Flags: review?(gl) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/76eda7d1476e take in account the ancestor's transformation too for the current matrix; r=gl
This looks fixed to me: https://monosnap.com/file/6R4wxjbhmmW45Ise3f8aoERdqP7sTW.png Fantastic! Thank you.
I have reproduced this bug according to (2017-08-16) Fixing bug is verified on Latest Nightly-- Build ID :20170914220209 User Agent :Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0 Tested OS-- WIndows7 32bit
QA Whiteboard: [testday-20170915]
You need to log in before you can comment on or make changes to this bug.