Closed Bug 2023383 Opened 4 months ago Closed 4 months ago

use image::SurfaceCache::IsLegalSize over gfx::Factory::AllowedSurfaceSize in SourceSurfaceSharedDataWrapper

Categories

(Core :: Graphics, defect)

defect

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox-esr140 149+ fixed
firefox149 --- fixed
firefox150 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(3 files)

No description provided.
See Also: → large-canvas

SurfaceCache::IsLegalSize is what is used to determine if imgFrame's are valid, and that is what is on the content process side of this parent process code. So using the same function is what we want.

Pratically, on trunk SurfaceCache::IsLegalSize and Factory::AllowedSurfaceSize are basically identical (reject if one dimension is over 64k or total area can't fit in an int32_t), but that is only true after bug 1911583 which expanded that from 32k to 64k. But on esr140, that doesn't have bug 1911583, so these functions are different and we want to uplift the AllowedSurfaceSize check there.

Pushed by tnikkel@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2f89d2a7dbe4 https://hg.mozilla.org/integration/autoland/rev/b6d62fe0693f Use image::SurfaceCache::IsLegalSize over gfx::Factory::AllowedSurfaceSize in SourceSurfaceSharedDataWrapper. r=gfx-reviewers,lsalzman
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch

Please nominate this for Beta and ESR140 uplift when you get a chance.

Flags: needinfo?(tnikkel)

SurfaceCache::IsLegalSize is what is used to determine if imgFrame's are valid, and that is what is on the content process side of this parent process code. So using the same function is what we want.

Pratically, on trunk SurfaceCache::IsLegalSize and Factory::AllowedSurfaceSize are basically identical (reject if one dimension is over 64k or total area can't fit in an int32_t), but that is only true after bug 1911583 which expanded that from 32k to 64k. But on esr140, that doesn't have bug 1911583, so these functions are different and we want to uplift the AllowedSurfaceSize check there.

Attachment #9553152 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: fix needed for esr140 but keeping trunk, beta, and esr140 all in sync is best practice
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: uses the same check on parent side as client side uses to validate images
  • String changes made/needed?: none
  • Is Android affected?: yes

SurfaceCache::IsLegalSize is what is used to determine if imgFrame's are valid, and that is what is on the content process side of this parent process code. So using the same function is what we want.

Pratically, on trunk SurfaceCache::IsLegalSize and Factory::AllowedSurfaceSize are basically identical (reject if one dimension is over 64k or total area can't fit in an int32_t), but that is only true after bug 1911583 which expanded that from 32k to 64k. But on esr140, that doesn't have bug 1911583, so these functions are different and we want to uplift the AllowedSurfaceSize check there.

Attachment #9553175 - Flags: approval-mozilla-esr140?
Flags: needinfo?(tnikkel)

firefox-esr140 Uplift Approval Request

  • User impact if declined/Reason for urgency: fix needed to make sec bug bug 2018113 work properly on esr140
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: uses the same check on parent side as client side uses to validate images
  • String changes made/needed?: none
  • Is Android affected?: yes
Attachment #9553152 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9553175 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: