[canvas-a11y] Add canvas accessibility browser tests and fix bugs. [chromium/src : main]

0 views
Skip to first unread message

Ramin Halavati (Gerrit)

unread,
Jul 22, 2026, 8:24:02 AM (5 days ago) Jul 22
to Ramin Halavati, Justin Novosad, Lucas Radaelli, Chromium LUCI CQ, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, nektar...@chromium.org, blink-...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, kyungjunle...@google.com, yuzo+...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, lucasrada...@google.com, blink-rev...@chromium.org, josiah...@chromium.org
Attention needed from Justin Novosad and Lucas Radaelli

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Justin Novosad
  • Lucas Radaelli
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I180c2fd1a226f74da5db77a699da5469415e132c
Gerrit-Change-Number: 8130938
Gerrit-PatchSet: 8
Gerrit-Owner: Ramin Halavati <rhal...@chromium.org>
Gerrit-Reviewer: Justin Novosad <ju...@chromium.org>
Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-Attention: Justin Novosad <ju...@chromium.org>
Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
Gerrit-Comment-Date: Wed, 22 Jul 2026 12:23:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Justin Novosad (Gerrit)

unread,
Jul 22, 2026, 4:16:27 PM (5 days ago) Jul 22
to Ramin Halavati, Justin Novosad, Lucas Radaelli, Chromium LUCI CQ, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, nektar...@chromium.org, blink-...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, kyungjunle...@google.com, yuzo+...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, lucasrada...@google.com, blink-rev...@chromium.org, josiah...@chromium.org
Attention needed from Justin Novosad, Lucas Radaelli and Ramin Halavati

Justin Novosad added 5 comments

File chrome/browser/accessibility/canvas_accessibility_browsertest.cc
Line 271, Patchset 8 (Latest):#if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS) && !BUILDFLAG(USE_FAKE_SCREEN_AI)
Justin Novosad . unresolved

Why is this buildflag combo important? Explain it in a comment.

Line 272, Patchset 8 (Latest): ::testing::Values(true, false),
Justin Novosad . unresolved

this param is for OCR, right? Since bool values are not self-documenting (unlike enums), it would be good to add a comment to document what this parameter is.

File chrome/test/data/accessibility/canvas_bitmap.html
Line 11, Patchset 8 (Latest): const ctx = canvas.getContext('2d', { willReadFrequently: true });
Justin Novosad . unresolved

Justify why you're using willReadFrequently: true here. I assume it's to get code coverage for the mojo pixel format issue you fixed, but it would be good to document that. Also it would be good to ensure that there is adequate coverage for canvas that don't have this option, which is the most common case. Also, I'm not sure this flag actually does anything when running on CQ bot. The main effect of this flag is to disable GPU acceleration, which is already disabled in most test suites.

File chrome/test/data/accessibility/canvas_bitmap_update.html
Line 11, Patchset 8 (Latest): const ctx = canvas.getContext('2d', { willReadFrequently: true });
Justin Novosad . unresolved

same here

Line 25, Patchset 8 (Latest): const ctx = canvas.getContext('2d', { willReadFrequently: true });
Justin Novosad . unresolved

and here

Open in Gerrit

Related details

Attention is currently required from:
  • Justin Novosad
  • Lucas Radaelli
  • Ramin Halavati
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I180c2fd1a226f74da5db77a699da5469415e132c
    Gerrit-Change-Number: 8130938
    Gerrit-PatchSet: 8
    Gerrit-Owner: Ramin Halavati <rhal...@chromium.org>
    Gerrit-Reviewer: Justin Novosad <ju...@chromium.org>
    Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Justin Novosad <ju...@google.com>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: Justin Novosad <ju...@chromium.org>
    Gerrit-Attention: Ramin Halavati <rhal...@chromium.org>
    Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 20:16:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ramin Halavati (Gerrit)

    unread,
    Jul 23, 2026, 4:25:42 AM (4 days ago) Jul 23
    to Ramin Halavati, Justin Novosad, Justin Novosad, Lucas Radaelli, Chromium LUCI CQ, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, nektar...@chromium.org, blink-...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, kyungjunle...@google.com, yuzo+...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, lucasrada...@google.com, blink-rev...@chromium.org, josiah...@chromium.org
    Attention needed from Justin Novosad, Justin Novosad and Lucas Radaelli

    Ramin Halavati voted and added 5 comments

    Votes added by Ramin Halavati

    Commit-Queue+1

    5 comments

    File chrome/browser/accessibility/canvas_accessibility_browsertest.cc
    Line 271, Patchset 8:#if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS) && !BUILDFLAG(USE_FAKE_SCREEN_AI)
    Justin Novosad . resolved

    Why is this buildflag combo important? Explain it in a comment.

    Ramin Halavati

    Done

    Line 272, Patchset 8: ::testing::Values(true, false),
    Justin Novosad . resolved

    this param is for OCR, right? Since bool values are not self-documenting (unlike enums), it would be good to add a comment to document what this parameter is.

    Ramin Halavati

    Done

    File chrome/test/data/accessibility/canvas_bitmap.html
    Line 11, Patchset 8: const ctx = canvas.getContext('2d', { willReadFrequently: true });
    Justin Novosad . unresolved

    Justify why you're using willReadFrequently: true here. I assume it's to get code coverage for the mojo pixel format issue you fixed, but it would be good to document that. Also it would be good to ensure that there is adequate coverage for canvas that don't have this option, which is the most common case. Also, I'm not sure this flag actually does anything when running on CQ bot. The main effect of this flag is to disable GPU acceleration, which is already disabled in most test suites.

    Ramin Halavati

    Gemini believes that this is only needed for headless browser tests, and I tried the same test cases locally without `withReadFrequently` and it worked. I added a comment, does it make sense?

    File chrome/test/data/accessibility/canvas_bitmap_update.html
    Line 11, Patchset 8: const ctx = canvas.getContext('2d', { willReadFrequently: true });
    Justin Novosad . resolved

    same here

    Ramin Halavati

    Done

    Line 25, Patchset 8: const ctx = canvas.getContext('2d', { willReadFrequently: true });
    Justin Novosad . resolved

    and here

    Ramin Halavati

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Novosad
    • Justin Novosad
    • Lucas Radaelli
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I180c2fd1a226f74da5db77a699da5469415e132c
    Gerrit-Change-Number: 8130938
    Gerrit-PatchSet: 11
    Gerrit-Owner: Ramin Halavati <rhal...@chromium.org>
    Gerrit-Reviewer: Justin Novosad <ju...@chromium.org>
    Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Justin Novosad <ju...@google.com>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: Justin Novosad <ju...@chromium.org>
    Gerrit-Attention: Justin Novosad <ju...@google.com>
    Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Comment-Date: Thu, 23 Jul 2026 08:25:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Justin Novosad <ju...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Justin Novosad (Gerrit)

    unread,
    Jul 24, 2026, 10:00:19 AM (3 days ago) Jul 24
    to Ramin Halavati, Justin Novosad, Lucas Radaelli, Chromium LUCI CQ, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, nektar...@chromium.org, blink-...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, kyungjunle...@google.com, yuzo+...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, lucasrada...@google.com, blink-rev...@chromium.org, josiah...@chromium.org
    Attention needed from Justin Novosad, Lucas Radaelli and Ramin Halavati

    Justin Novosad voted and added 4 comments

    Votes added by Justin Novosad

    Code-Review+1

    4 comments

    Patchset-level comments
    File-level comment, Patchset 11 (Latest):
    Justin Novosad . resolved

    LGTM with comments addressed.

    File chrome/test/data/accessibility/canvas_bitmap.html
    Line 11, Patchset 8: const ctx = canvas.getContext('2d', { willReadFrequently: true });
    Justin Novosad . unresolved

    Justify why you're using willReadFrequently: true here. I assume it's to get code coverage for the mojo pixel format issue you fixed, but it would be good to document that. Also it would be good to ensure that there is adequate coverage for canvas that don't have this option, which is the most common case. Also, I'm not sure this flag actually does anything when running on CQ bot. The main effect of this flag is to disable GPU acceleration, which is already disabled in most test suites.

    Ramin Halavati

    Gemini believes that this is only needed for headless browser tests, and I tried the same test cases locally without `withReadFrequently` and it worked. I added a comment, does it make sense?

    Justin Novosad

    I think you should remove it if it's not needed. It's an uncommon option and I'm concerned it could skew coverage.

    Line 13, Patchset 11 (Latest): // to ensure immediate frame presentation in static/headless browser
    Justin Novosad . unresolved

    This is not true. Frame finalization is driven by base::TaskObserver logic, which is independent of the async rendering pipeline and frame presentation flow. GPU acceleration has no impact on the triggering of frame finalization.

    File content/renderer/accessibility/annotations/ax_canvas_annotator.cc
    Line 173, Patchset 11 (Latest): if (bitmap.colorType() != kN32_SkColorType) {
    SkBitmap n32_bitmap;
    if (n32_bitmap.tryAllocPixels(
    bitmap.info().makeColorType(kN32_SkColorType)) &&
    bitmap.readPixels(n32_bitmap.info(), n32_bitmap.getPixels(),
    n32_bitmap.rowBytes(), 0, 0)) {
    bitmap = n32_bitmap;
    } else {
    return;
    }
    }
    Justin Novosad . unresolved

    According to the coverage analysis, this block is lacking test coverage. Would be important to get it covered I think.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Novosad
    • Lucas Radaelli
    • Ramin Halavati
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I180c2fd1a226f74da5db77a699da5469415e132c
    Gerrit-Change-Number: 8130938
    Gerrit-PatchSet: 11
    Gerrit-Owner: Ramin Halavati <rhal...@chromium.org>
    Gerrit-Reviewer: Justin Novosad <ju...@chromium.org>
    Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Justin Novosad <ju...@google.com>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: Ramin Halavati <rhal...@chromium.org>
    Gerrit-Attention: Justin Novosad <ju...@google.com>
    Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Comment-Date: Fri, 24 Jul 2026 13:59:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Ramin Halavati <rhal...@chromium.org>
    Comment-In-Reply-To: Justin Novosad <ju...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ramin Halavati (Gerrit)

    unread,
    Jul 24, 2026, 12:22:34 PM (3 days ago) Jul 24
    to Ramin Halavati, Justin Novosad, Justin Novosad, Lucas Radaelli, Chromium LUCI CQ, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, nektar...@chromium.org, blink-...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, kyungjunle...@google.com, yuzo+...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, lucasrada...@google.com, blink-rev...@chromium.org, josiah...@chromium.org
    Attention needed from Justin Novosad, Justin Novosad and Lucas Radaelli

    Ramin Halavati voted and added 4 comments

    Votes added by Ramin Halavati

    Commit-Queue+1

    4 comments

    Patchset-level comments
    File-level comment, Patchset 11:
    Ramin Halavati . resolved

    Gentle reminder

    File chrome/test/data/accessibility/canvas_bitmap.html
    Line 11, Patchset 8: const ctx = canvas.getContext('2d', { willReadFrequently: true });
    Justin Novosad . unresolved

    Justify why you're using willReadFrequently: true here. I assume it's to get code coverage for the mojo pixel format issue you fixed, but it would be good to document that. Also it would be good to ensure that there is adequate coverage for canvas that don't have this option, which is the most common case. Also, I'm not sure this flag actually does anything when running on CQ bot. The main effect of this flag is to disable GPU acceleration, which is already disabled in most test suites.

    Ramin Halavati

    Gemini believes that this is only needed for headless browser tests, and I tried the same test cases locally without `withReadFrequently` and it worked. I added a comment, does it make sense?

    Justin Novosad

    I think you should remove it if it's not needed. It's an uncommon option and I'm concerned it could skew coverage.

    Ramin Halavati

    The tests fail if this is removed, but I removed it and opened the HTML using a proper chromium and it works. So as the comment says, we only need it for tests. I don't know if we can somehow else fix the issue with the tests.

    Line 13, Patchset 11: // to ensure immediate frame presentation in static/headless browser
    Justin Novosad . unresolved

    This is not true. Frame finalization is driven by base::TaskObserver logic, which is independent of the async rendering pipeline and frame presentation flow. GPU acceleration has no impact on the triggering of frame finalization.

    Ramin Halavati

    Is it correct now?

    File content/renderer/accessibility/annotations/ax_canvas_annotator.cc
    Line 173, Patchset 11: if (bitmap.colorType() != kN32_SkColorType) {

    SkBitmap n32_bitmap;
    if (n32_bitmap.tryAllocPixels(
    bitmap.info().makeColorType(kN32_SkColorType)) &&
    bitmap.readPixels(n32_bitmap.info(), n32_bitmap.getPixels(),
    n32_bitmap.rowBytes(), 0, 0)) {
    bitmap = n32_bitmap;
    } else {
    return;
    }
    }
    Justin Novosad . unresolved

    According to the coverage analysis, this block is lacking test coverage. Would be important to get it covered I think.

    Ramin Halavati

    It seems that this cannot happen now as the call eventually arrives at `SkImage_Base::onAsLegacyBitmap` which makes an N32 bitmap. However I think having this block to protect future changes would be good. WDYT?

    I can also add a dump without crash instead to follow up if it happens in future, but it won't be enough to catch attention.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Novosad
    • Justin Novosad
    • Lucas Radaelli
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I180c2fd1a226f74da5db77a699da5469415e132c
    Gerrit-Change-Number: 8130938
    Gerrit-PatchSet: 12
    Gerrit-Owner: Ramin Halavati <rhal...@chromium.org>
    Gerrit-Reviewer: Justin Novosad <ju...@chromium.org>
    Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Justin Novosad <ju...@google.com>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: Justin Novosad <ju...@chromium.org>
    Gerrit-Attention: Justin Novosad <ju...@google.com>
    Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Comment-Date: Fri, 24 Jul 2026 16:22:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Justin Novosad <ju...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Justin Novosad (Gerrit)

    unread,
    Jul 24, 2026, 2:00:40 PM (3 days ago) Jul 24
    to Ramin Halavati, Justin Novosad, Lucas Radaelli, Chromium LUCI CQ, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, nektar...@chromium.org, blink-...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, kyungjunle...@google.com, yuzo+...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, lucasrada...@google.com, blink-rev...@chromium.org, josiah...@chromium.org
    Attention needed from Justin Novosad, Lucas Radaelli and Ramin Halavati

    Justin Novosad voted and added 4 comments

    Votes added by Justin Novosad

    Code-Review+1

    4 comments

    Patchset-level comments
    Justin Novosad . resolved

    LGTM

    File chrome/test/data/accessibility/canvas_bitmap.html
    Line 11, Patchset 8: const ctx = canvas.getContext('2d', { willReadFrequently: true });
    Justin Novosad . resolved

    Justify why you're using willReadFrequently: true here. I assume it's to get code coverage for the mojo pixel format issue you fixed, but it would be good to document that. Also it would be good to ensure that there is adequate coverage for canvas that don't have this option, which is the most common case. Also, I'm not sure this flag actually does anything when running on CQ bot. The main effect of this flag is to disable GPU acceleration, which is already disabled in most test suites.

    Ramin Halavati

    Gemini believes that this is only needed for headless browser tests, and I tried the same test cases locally without `withReadFrequently` and it worked. I added a comment, does it make sense?

    Justin Novosad

    I think you should remove it if it's not needed. It's an uncommon option and I'm concerned it could skew coverage.

    Ramin Halavati

    The tests fail if this is removed, but I removed it and opened the HTML using a proper chromium and it works. So as the comment says, we only need it for tests. I don't know if we can somehow else fix the issue with the tests.

    Justin Novosad

    Okay, got it.

    Line 13, Patchset 11: // to ensure immediate frame presentation in static/headless browser
    Justin Novosad . resolved

    This is not true. Frame finalization is driven by base::TaskObserver logic, which is independent of the async rendering pipeline and frame presentation flow. GPU acceleration has no impact on the triggering of frame finalization.

    Ramin Halavati

    Is it correct now?

    Justin Novosad

    Okay, this makes more sense. Would be nice to fix the issue at the source, b ut that's outside the scope of this CL.

    File content/renderer/accessibility/annotations/ax_canvas_annotator.cc
    Line 173, Patchset 11: if (bitmap.colorType() != kN32_SkColorType) {
    SkBitmap n32_bitmap;
    if (n32_bitmap.tryAllocPixels(
    bitmap.info().makeColorType(kN32_SkColorType)) &&
    bitmap.readPixels(n32_bitmap.info(), n32_bitmap.getPixels(),
    n32_bitmap.rowBytes(), 0, 0)) {
    bitmap = n32_bitmap;
    } else {
    return;
    }
    }
    Justin Novosad . unresolved

    According to the coverage analysis, this block is lacking test coverage. Would be important to get it covered I think.

    Ramin Halavati

    It seems that this cannot happen now as the call eventually arrives at `SkImage_Base::onAsLegacyBitmap` which makes an N32 bitmap. However I think having this block to protect future changes would be good. WDYT?

    I can also add a dump without crash instead to follow up if it happens in future, but it won't be enough to catch attention.

    Justin Novosad

    If you're confident it cannot happen anymore, this should probably just be a CHECK. IMHO, No need for a dump without crash if test coverage is sufficient to catch regressions in this area.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Novosad
    • Lucas Radaelli
    • Ramin Halavati
    Gerrit-Attention: Ramin Halavati <rhal...@chromium.org>
    Gerrit-Attention: Justin Novosad <ju...@google.com>
    Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
    Gerrit-Comment-Date: Fri, 24 Jul 2026 18:00:21 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ramin Halavati (Gerrit)

    unread,
    1:32 AM (3 hours ago) 1:32 AM
    to Ramin Halavati, Justin Novosad, Justin Novosad, Lucas Radaelli, Chromium LUCI CQ, Kevin Babbitt, (Julie)Jeongeun Kim, android-bu...@system.gserviceaccount.com, nektar...@chromium.org, blink-...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, kyungjunle...@google.com, yuzo+...@chromium.org, blink-rev...@chromium.org, francisjp...@google.com, lucasrada...@google.com, blink-rev...@chromium.org, josiah...@chromium.org
    Attention needed from Justin Novosad, Justin Novosad and Lucas Radaelli

    Ramin Halavati voted and added 1 comment

    Votes added by Ramin Halavati

    Commit-Queue+1

    1 comment

    File content/renderer/accessibility/annotations/ax_canvas_annotator.cc
    Line 173, Patchset 11: if (bitmap.colorType() != kN32_SkColorType) {
    SkBitmap n32_bitmap;
    if (n32_bitmap.tryAllocPixels(
    bitmap.info().makeColorType(kN32_SkColorType)) &&
    bitmap.readPixels(n32_bitmap.info(), n32_bitmap.getPixels(),
    n32_bitmap.rowBytes(), 0, 0)) {
    bitmap = n32_bitmap;
    } else {
    return;
    }
    }
    Justin Novosad . resolved

    According to the coverage analysis, this block is lacking test coverage. Would be important to get it covered I think.

    Ramin Halavati

    It seems that this cannot happen now as the call eventually arrives at `SkImage_Base::onAsLegacyBitmap` which makes an N32 bitmap. However I think having this block to protect future changes would be good. WDYT?

    I can also add a dump without crash instead to follow up if it happens in future, but it won't be enough to catch attention.

    Justin Novosad

    If you're confident it cannot happen anymore, this should probably just be a CHECK. IMHO, No need for a dump without crash if test coverage is sufficient to catch regressions in this area.

    Ramin Halavati

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Novosad
    • Justin Novosad
    • Lucas Radaelli
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • 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: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I180c2fd1a226f74da5db77a699da5469415e132c
      Gerrit-Change-Number: 8130938
      Gerrit-PatchSet: 14
      Gerrit-Owner: Ramin Halavati <rhal...@chromium.org>
      Gerrit-Reviewer: Justin Novosad <ju...@chromium.org>
      Gerrit-Reviewer: Lucas Radaelli <lucasr...@google.com>
      Gerrit-Reviewer: Ramin Halavati <rhal...@chromium.org>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Justin Novosad <ju...@google.com>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
      Gerrit-Attention: Justin Novosad <ju...@chromium.org>
      Gerrit-Attention: Justin Novosad <ju...@google.com>
      Gerrit-Attention: Lucas Radaelli <lucasr...@google.com>
      Gerrit-Comment-Date: Mon, 27 Jul 2026 05:32:05 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages