Closed Bug 1444032 Opened 6 years ago Closed 6 years ago

Flex line highlighter isn't displayed correctly when justify-content is highlighted

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: pbro, Assigned: pbro)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached file flex-line.html
STR:
- open the attached test case
- open the inspector
- select the flex container and click in the rule-view to highlight the flexbox layout

--> Notice that the line that is normally displayed to indicate the existence of a flex line is partly hidden because of the justify-content areas.
Attached image missing-line.PNG
See the screenshot. I've highlighted in yellow where the line is missing.
This can most probably be addressed simply by making reordering how we draw to the canvas. Indeed, we draw everything to just one canvas, and we clear some areas at times. So drawing in the right order should help.
The other option is to just never clear. Clear once before redrawing everything, and then just draw where needed.
The renderJustifyContent function can probably be changed to avoid clearing.
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
Comment on attachment 8957157 [details]
Bug 1444032 - Avoid clearing canvas when drawing justify-content areas;

https://reviewboard.mozilla.org/r/226092/#review232076

::: devtools/server/actors/highlighters/flexbox.js
(Diff revision 1)
> -    }
> -
> -    // Then, cut all the items out of this content area.
> -    for (let flexLine of flexLines) {
>        let flexItems = flexLine.getItems();
> -

Don't remove this new line. I prefer to keep the new lines to separate new if/for statement blocks.

::: devtools/server/actors/highlighters/flexbox.js
(Diff revision 1)
> -
>        for (let flexItem of flexItems) {
>          let { node } = flexItem;
>  
>          let quads = getAdjustedQuads(this.win, node, "margin");
> -

Don't remove this new line
Attachment #8957157 - Flags: review?(gl) → review+
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/91b5d3f7409f
Avoid clearing canvas when drawing justify-content areas; r=gl
https://hg.mozilla.org/mozilla-central/rev/91b5d3f7409f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: