Grid: Skip line labels to avoid overlap

When a grid container has narrow tracks, the labels draw in the overlay may
overlap.
To avoid this, this change introduce a minimum distance from the last label that
has to be respected for the next label to be draw too, otherwise it is skipped.
Only the first and last labels in any given direction are drawn every time.

The distance was chosen to avoid overlap between 2 consecutive 2-digits labels.

Before: https://i.imgur.com/2RHqi5M.jpg
After: https://i.imgur.com/AgHwPSZ.jpg

Bug: 1098673
Change-Id: Ib5ae09ef8c212707d45e7c0b602599c3a8011454
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2263293
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
4 files changed
tree: 993ee665a6b4b3111e9b37ea293439a9dc17f54d
  1. back_end/
  2. build_overrides/
  3. docs/
  4. front_end/
  5. node_modules/
  6. scripts/
  7. test/
  8. third_party/
  9. v8/
  10. .clang-format
  11. .editorconfig
  12. .eslintignore
  13. .eslintrc.js
  14. .gitattributes
  15. .gitignore
  16. .gn
  17. .npmignore
  18. .npmrc
  19. .style.yapf
  20. .stylelintignore
  21. .stylelintrc.json
  22. AUTHORS
  23. BUILD.gn
  24. COMMON_OWNERS
  25. DEPS
  26. ENG_REVIEW_OWNERS
  27. INFRA_OWNERS
  28. LICENSE
  29. LIGHTHOUSE_OWNERS
  30. OWNERS
  31. package-lock.json
  32. package.json
  33. PRESUBMIT.py
  34. protocol.json
  35. README.md
  36. tsconfig.base.json
  37. tsconfig.json
  38. WATCHLISTS
README.md

Chrome DevTools frontend

npm package

The client-side of the Chrome DevTools, including all JS & CSS to run the DevTools webapp.

Source code

The frontend is available on chromium.googlesource.com.

Design guidelines

Please be aware that DevTools follows additional development guidelines.

Issue triage

The issue triage guidelines can be found here.

Workflows

Instructions to set up, use, and maintain a DevTools frontend checkout can be found here.

Additional references

Source mirrors

DevTools frontend repository is mirrored on GitHub.

DevTools frontend is also available on NPM as the chrome-devtools-frontend package. It's not currently available via CJS or ES modules, so consuming this package in other tools may require some effort.

The version number of the npm package (e.g. 1.0.373466) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.

Getting in touch