Open
Bug 1396673
Opened 8 years ago
Updated 11 months ago
Proper stacking of positive and negative numbers
Categories
(DevTools :: Inspector, defect, P3)
DevTools
Inspector
Tracking
(firefox57 fix-optional)
NEW
Tracking | Status | |
---|---|---|
firefox57 | --- | fix-optional |
People
(Reporter: micah, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Stacking negative line numbers looks off in some cases. Please see attachment.
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → tigleym
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Updated•8 years ago
|
status-firefox57:
--- → fix-optional
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8906338 [details]
Bug 1396673 - Negative line numbers are stacking incorrectly.
https://reviewboard.mozilla.org/r/178070/#review186992
::: devtools/server/actors/highlighters/css-grid.js:1250
(Diff revision 1)
> const { breadth } = gridLine;
>
> if (breadth === 0) {
> stackedLines.push(negativeLineNumber);
>
> - if (stackedLines.length > 0) {
> + if (stackedLines.length > 0 && stackedIndex === 0) {
I notice now that this approach basically considers just one line per dimension where the number are stacked, but I believe that this is not necessary the case.
See for example this grid, provided by Jen:
https://s.codepen.io/jensimmons/debug/pWvNXa
(test also with different zoom level and viewport size).
There are empty boxes, and also misplaced (because they're considered the "back" of the stack).
That of course, is applying on both positive and negative numbers. We should probably rename this bug something like "stack properly positive and negative numbers", and it should have an higher priority too.
::: devtools/server/actors/highlighters/css-grid.js:1648
(Diff revision 1)
>
> [x, y] = apply(this.currentMatrix, [x, y]);
>
> if (stackedLineIndex) {
> - // Offset the stacked line number by half of the box's width/height
> - const xOffset = boxWidth / 4;
> + // Offset the stacked line number by a quarter of the box's width/height
> + const boxOffset = boxHeight / 4;
You should keep both `boxWidth` and `boxHeight`, and therefore `xOffset` and `yOffset`, since one of them could be different from the other. They're equals *only* if the content is not bigger than the minium size.
Attachment #8906338 -
Flags: review?(zer0) → review-
Reporter | ||
Comment 3•8 years ago
|
||
Drawing the number for every stacked line reveals some issues with how negative line numbers are displayed. Notice how "the lowest number of the stack" is brought to the front, however in Jen's example ends up incorrectly showing the sequence of negative line numbers instead.
Reporter | ||
Updated•8 years ago
|
Summary: Negative line numbers are stacking incorrectly → Proper stacking of positive and negative numbers
Updated•8 years ago
|
Priority: -- → P2
Updated•7 years ago
|
Assignee: tigleym → nobody
Status: ASSIGNED → NEW
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•3 years ago
|
Severity: normal → S3
Updated•11 months ago
|
Priority: P2 → P3
You need to log in
before you can comment on or make changes to this bug.
Description
•