Closed Bug 2038137 Opened 28 days ago Closed 8 hours ago

input type image sprite: full image is shown instead of the target part

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

Firefox 150
defect

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox151 --- wontfix
firefox152 --- fix-optional
firefox153 --- fixed

People

(Reporter: bzff, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files)

Attached image cartIconAndroid15.jpg

Steps to reproduce:

To remove one item from the shopping cart an input of the type image is used to visualise it. The used image is a sprite.

The shopping cart sidepanel is at first of width 0 until activated, by adding an item or pressing the cart button the width is changed, revealing all cart items.

Short version of what is used:
<input type="image" src="icons_sprite.png" class="carticon cart-remove" alt="position remove">
<style>
.carticon {width: 25px !important; height: 20px; object-fit: none; background: transparent;}
.cart-remove {object-position: 0 -21px;}
</style>

Actual results:

On

  • Windows 10 with Firefox 150.0.2
  • Android 15 (FP5.VT2Q.C.092) with Firefox 150.0.1
  • Android 16 with Firefox 150.0.1
    when input of type image is used for a sprite the full image is shown.

Expected results:

On

  • Windows 11 with Firefox 140.10.2esr
  • Windows 10 with Chrome
  • Android 15 with Chrome
    only the targeted part of the sprite is shown
Attached image cartIconWin11.jpg
Attached image cartIconAndroid15.jpg

The Bugbug bot thinks this bug should belong to the 'Firefox for Android::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → Firefox for Android
Attached file repro.zip

I can reproduce the bug with this small repro case (from the reporter's STR), on Firefox Desktop.

Product: Firefox for Android → Core

The severity field is not set for this bug.
:sdetar, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sdetar)
Flags: needinfo?(sdetar)

The severity field is not set for this bug.
:ghess, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(ghess)
Component: General → Layout: Images, Video, and HTML Frames
Flags: needinfo?(ghess)

Pretty sure this is a regression from bug 1999100. Chrome doesn't seem to show overflow even if you explicitly set overflow: visible.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Regressed by: 1999100

Set release status flags based on info from the regressing bug 1999100

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Thanks,
adding "overflow: hidden;" to the parent element alleviates the issue.
Now it seems to only paint over the padding & margin area.

Severity: -- → S3
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6bfa334da415 https://hg.mozilla.org/integration/autoland/rev/334867b729fb Include <input type=image> in elements always-clipped. r=firefox-style-system-reviewers,boris
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/309c685eb91b https://hg.mozilla.org/integration/autoland/rev/43db5e71191d Revert "Bug 2038137 - Include <input type=image> in elements always-clipped. r=firefox-style-system-reviewers,boris" for causing wpt failures.

Backed out for causing wpt failures.

Attachment #9589937 - Attachment description: Bug 2038137 - Include <input type=image> in elements always-clipped. r=#style! → Bug 2038137 - Include <input type=image> in elements always-clipped. r=firefox-style-system-reviewers,boris

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/60405 for changes under testing/web-platform/tests

Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/779757981da6 https://hg.mozilla.org/integration/autoland/rev/7ce8681aa688 Include <input type=image> in elements always-clipped. r=firefox-style-system-reviewers,boris

Upstream PR was closed without merging

Status: ASSIGNED → RESOLVED
Closed: 8 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch

Upstream PR merged by moz-wptsync-bot

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: