Update emulated device presets [devtools/devtools-frontend : main]

1 view
Skip to first unread message

Ben Zhou (Gerrit)

unread,
Jun 9, 2026, 8:02:01 PM (5 days ago) Jun 9
to Bramus Van Damme, Danil Somsikov, Philip Pfaffe, Guangyue Xu, Sulekha Kulkarni, Leah Tu, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
Attention needed from Bramus Van Damme, Danil Somsikov and Philip Pfaffe

Ben Zhou added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Ben Zhou . resolved

Hi all! Could you please review this CL?

Context:
This is part of the Device Mode safe-area simulation work for DevTools.
Design doc: https://docs.google.com/document/d/1llC1BYEwqzt7S4edq6bMQdVpCdiTGaICC8gh_82ROSw/edit?tab=t.0#heading=h.7nki9mck5t64
Tracking bug: crbug.com/40718410

This CL:

  • Adds newer iPhone and Pixel device presets to EmulatedDevices.ts.
  • Verifies viewport dimensions and DPR values against official Apple/Google specs.
  • Updates show-by-default so each iPhone/Pixel generation exposes one default device.
  • Adds the corresponding Visual Elements context values for the default-visible presets.

Validation:

  • CQ Dry Run passed.
  • Ran presubmit during git cl upload.
  • Ran `git diff --check -- front_end/ui/visual_logging/KnownContextValues.ts`.
  • Verified new iPhone dimensions against Apple HIG device screen dimensions.
  • Verified new Pixel display resolutions against official Google Pixel specs.

Planned CL sequence:
1. Back-end support for safe-area emulation: https://crrev.com/c/6253279
2. Device preset updates for DevTools Device Mode: this CL, already done.
3. Front-end safe-area support:
- Let DevTools use safe-area values when emulating a selected device.
4. Safe-area and cutout data:
- Add sourced safe-area and display-cutout data for supported iPhone and Pixel presets.
5. Display-cutout visualization:
- Show the device notch, Dynamic Island, hole-punch, or other cutout shape in Device Mode.
6. Custom device support:
- Allow custom devices to define their own safe-area and cutout values.
Open in Gerrit

Related details

Attention is currently required from:
  • Bramus Van Damme
  • Danil Somsikov
  • Philip Pfaffe
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I8925c42e781c208a7b8ff54d1d6f77bf3a842fbe
Gerrit-Change-Number: 7907936
Gerrit-PatchSet: 6
Gerrit-Owner: Ben Zhou <t-be...@microsoft.com>
Gerrit-Reviewer: Ben Zhou <t-be...@microsoft.com>
Gerrit-Reviewer: Bramus Van Damme <bra...@bram.us>
Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
Gerrit-CC: Guangyue Xu <guang...@microsoft.com>
Gerrit-CC: Leah Tu <lea...@microsoft.com>
Gerrit-CC: Sulekha Kulkarni <Sulekha....@microsoft.com>
Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
Gerrit-Attention: Bramus Van Damme <bra...@bram.us>
Gerrit-Attention: Danil Somsikov <d...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 00:01:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Danil Somsikov (Gerrit)

unread,
Jun 10, 2026, 2:42:36 AM (4 days ago) Jun 10
to Ben Zhou, Bramus Van Damme, Philip Pfaffe, Guangyue Xu, Sulekha Kulkarni, Leah Tu, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
Attention needed from Ben Zhou, Bramus Van Damme and Philip Pfaffe

Danil Somsikov added 3 comments

File front_end/models/emulation/EmulatedDevices.ts
Line 1131, Patchset 6 (Latest): 'show-by-default': true,
Danil Somsikov . unresolved

The commit message states that each iPhone/Pixel generation exposes *one* default device. However, both `Pixel 9` and `Pixel 9 Pro XL` (line 1175) are marked as `show-by-default: true`. Did you mean to only enable one of them?

Line 1140, Patchset 6 (Latest): 'width': 360,
Danil Somsikov . unresolved

Pixel 9's physical resolution is 1080x2424. Using a viewport width of `360` with a DPR of `3` correctly maps to this, but `360px` is a very narrow logical width that does not match Android's standard scaling for modern devices. For example, the `Pixel 8` preset (added above) uses a logical width of `412` and a DPR of `2.625`. Consider updating Pixel 9 to use `412x924` (with DPR `2.625`) to accurately reflect the real device's CSS viewport.

Line 1206, Patchset 6 (Latest): 'width': 360,
Danil Somsikov . unresolved

Similar to Pixel 9, this results in an unrealistically narrow 360px logical viewport. Consider updating this to `412x924` with DPR `2.625` to match standard Android viewport scaling for 1080p displays.

Open in Gerrit

Related details

Attention is currently required from:
  • Ben Zhou
  • Bramus Van Damme
  • Philip Pfaffe
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I8925c42e781c208a7b8ff54d1d6f77bf3a842fbe
    Gerrit-Change-Number: 7907936
    Gerrit-PatchSet: 6
    Gerrit-Owner: Ben Zhou <t-be...@microsoft.com>
    Gerrit-Reviewer: Ben Zhou <t-be...@microsoft.com>
    Gerrit-Reviewer: Bramus Van Damme <bra...@bram.us>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-CC: Guangyue Xu <guang...@microsoft.com>
    Gerrit-CC: Leah Tu <lea...@microsoft.com>
    Gerrit-CC: Sulekha Kulkarni <Sulekha....@microsoft.com>
    Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Attention: Bramus Van Damme <bra...@bram.us>
    Gerrit-Attention: Ben Zhou <t-be...@microsoft.com>
    Gerrit-Comment-Date: Wed, 10 Jun 2026 06:42:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Ben Zhou (Gerrit)

    unread,
    Jun 10, 2026, 5:38:13 PM (4 days ago) Jun 10
    to Guangyue Xu, Bramus Van Damme, Danil Somsikov, Philip Pfaffe, Sulekha Kulkarni, Leah Tu, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
    Attention needed from Bramus Van Damme, Danil Somsikov and Philip Pfaffe

    Ben Zhou added 4 comments

    Patchset-level comments
    File-level comment, Patchset 8 (Latest):
    Ben Zhou . resolved

    Replies to all comments. Thank you for the clarification!

    File front_end/models/emulation/EmulatedDevices.ts
    Line 1131, Patchset 6: 'show-by-default': true,
    Danil Somsikov . unresolved

    The commit message states that each iPhone/Pixel generation exposes *one* default device. However, both `Pixel 9` and `Pixel 9 Pro XL` (line 1175) are marked as `show-by-default: true`. Did you mean to only enable one of them?

    Ben Zhou

    Yes, in keeping with the CL's description, I only meant to enable the Pixel 9. The Pixel 9 Pro XL is no longer shown by default, so only Pixel 9 is default-visible for the Pixel 9 generation.

    Danil Somsikov . unresolved

    Pixel 9's physical resolution is 1080x2424. Using a viewport width of `360` with a DPR of `3` correctly maps to this, but `360px` is a very narrow logical width that does not match Android's standard scaling for modern devices. For example, the `Pixel 8` preset (added above) uses a logical width of `412` and a DPR of `2.625`. Consider updating Pixel 9 to use `412x924` (with DPR `2.625`) to accurately reflect the real device's CSS viewport.

    Ben Zhou

    Thanks for the clarification! Updated the Pixel 9 to use a 412x924 viewport with DPR 2.625.

    Danil Somsikov . unresolved

    Similar to Pixel 9, this results in an unrealistically narrow 360px logical viewport. Consider updating this to `412x924` with DPR `2.625` to match standard Android viewport scaling for 1080p displays.

    Ben Zhou

    Updated Pixel 10 to use a 412x924 viewport with DPR 2.625.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bramus Van Damme
    • Danil Somsikov
    • Philip Pfaffe
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I8925c42e781c208a7b8ff54d1d6f77bf3a842fbe
    Gerrit-Change-Number: 7907936
    Gerrit-PatchSet: 8
    Gerrit-Owner: Ben Zhou <t-be...@microsoft.com>
    Gerrit-Reviewer: Ben Zhou <t-be...@microsoft.com>
    Gerrit-Reviewer: Bramus Van Damme <bra...@bram.us>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Guangyue Xu <guang...@microsoft.com>
    Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-CC: Leah Tu <lea...@microsoft.com>
    Gerrit-CC: Sulekha Kulkarni <Sulekha....@microsoft.com>
    Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Attention: Bramus Van Damme <bra...@bram.us>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Comment-Date: Wed, 10 Jun 2026 21:38:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Danil Somsikov <d...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Danil Somsikov (Gerrit)

    unread,
    Jun 11, 2026, 2:32:48 AM (3 days ago) Jun 11
    to Ben Zhou, Guangyue Xu, Bramus Van Damme, Philip Pfaffe, Sulekha Kulkarni, Leah Tu, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
    Attention needed from Ben Zhou, Bramus Van Damme and Philip Pfaffe

    Danil Somsikov voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ben Zhou
    • Bramus Van Damme
    • Philip Pfaffe
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I8925c42e781c208a7b8ff54d1d6f77bf3a842fbe
    Gerrit-Change-Number: 7907936
    Gerrit-PatchSet: 8
    Gerrit-Owner: Ben Zhou <t-be...@microsoft.com>
    Gerrit-Reviewer: Ben Zhou <t-be...@microsoft.com>
    Gerrit-Reviewer: Bramus Van Damme <bra...@bram.us>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Guangyue Xu <guang...@microsoft.com>
    Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-CC: Leah Tu <lea...@microsoft.com>
    Gerrit-CC: Sulekha Kulkarni <Sulekha....@microsoft.com>
    Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Attention: Bramus Van Damme <bra...@bram.us>
    Gerrit-Attention: Ben Zhou <t-be...@microsoft.com>
    Gerrit-Comment-Date: Thu, 11 Jun 2026 06:32:40 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ben Zhou (Gerrit)

    unread,
    Jun 12, 2026, 3:36:37 PM (2 days ago) Jun 12
    to Danil Somsikov, Guangyue Xu, Bramus Van Damme, Philip Pfaffe, Sulekha Kulkarni, Leah Tu, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
    Attention needed from Bramus Van Damme and Philip Pfaffe

    Ben Zhou added 4 comments

    Patchset-level comments
    Ben Zhou . resolved

    Hey Philip and Bramus, could you take a look at this CL please and review it so this CL can potentially land this? Thanks!

    File front_end/models/emulation/EmulatedDevices.ts
    Line 1131, Patchset 6: 'show-by-default': true,
    Danil Somsikov . resolved

    The commit message states that each iPhone/Pixel generation exposes *one* default device. However, both `Pixel 9` and `Pixel 9 Pro XL` (line 1175) are marked as `show-by-default: true`. Did you mean to only enable one of them?

    Ben Zhou

    Yes, in keeping with the CL's description, I only meant to enable the Pixel 9. The Pixel 9 Pro XL is no longer shown by default, so only Pixel 9 is default-visible for the Pixel 9 generation.

    Ben Zhou

    Done

    Danil Somsikov . resolved

    Pixel 9's physical resolution is 1080x2424. Using a viewport width of `360` with a DPR of `3` correctly maps to this, but `360px` is a very narrow logical width that does not match Android's standard scaling for modern devices. For example, the `Pixel 8` preset (added above) uses a logical width of `412` and a DPR of `2.625`. Consider updating Pixel 9 to use `412x924` (with DPR `2.625`) to accurately reflect the real device's CSS viewport.

    Ben Zhou

    Thanks for the clarification! Updated the Pixel 9 to use a 412x924 viewport with DPR 2.625.

    Ben Zhou

    Done

    Danil Somsikov . resolved

    Similar to Pixel 9, this results in an unrealistically narrow 360px logical viewport. Consider updating this to `412x924` with DPR `2.625` to match standard Android viewport scaling for 1080p displays.

    Ben Zhou

    Updated Pixel 10 to use a 412x924 viewport with DPR 2.625.

    Ben Zhou

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bramus Van Damme
    • Philip Pfaffe
    Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: I8925c42e781c208a7b8ff54d1d6f77bf3a842fbe
      Gerrit-Change-Number: 7907936
      Gerrit-PatchSet: 8
      Gerrit-Owner: Ben Zhou <t-be...@microsoft.com>
      Gerrit-Reviewer: Ben Zhou <t-be...@microsoft.com>
      Gerrit-Reviewer: Bramus Van Damme <bra...@bram.us>
      Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
      Gerrit-Reviewer: Guangyue Xu <guang...@microsoft.com>
      Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
      Gerrit-CC: Leah Tu <lea...@microsoft.com>
      Gerrit-CC: Sulekha Kulkarni <Sulekha....@microsoft.com>
      Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
      Gerrit-Attention: Bramus Van Damme <bra...@bram.us>
      Gerrit-Comment-Date: Fri, 12 Jun 2026 19:36:28 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Ben Zhou <t-be...@microsoft.com>
      Comment-In-Reply-To: Danil Somsikov <d...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages