Closed Bug 1936259 Opened 8 months ago Closed 8 months ago

yandex.com - Images are not loaded when accessed from image search

Categories

(Core :: Layout: Flexbox, defect, P1)

defect

Tracking

()

VERIFIED FIXED
135 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox133 --- unaffected
firefox134 + verified
firefox135 + fixed

People

(Reporter: rbucata, Assigned: TYLin)

References

(Regression, )

Details

(Keywords: regression, webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline])

User Story

platform:windows,mac,linux,android
impact:content-missing
configuration:general
affects:all
branch:release
diagnosis-team:layout

Attachments

(6 files)

Environment:
Operating system: Windows 11
Firefox version: Firefox 135.0

Steps to reproduce:

  1. Navigate to: https://yandex.com/images/search?img_url=https%3A%2F%2Fdiscovery55.ru%2Fwp-content%2Fuploads%2F2016%2F03%2F36542_original.jpg&lr=87&nl=1&pos=2&rpt=simage&source=morda&text=Altai
  2. Open an image from the list of image searches and observe

Expected Behavior:
The image loads

Actual Behavior:
The image does not load

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly
  • Does not reproduce in firefox-release, and chrome
  • Sometimes navigation through the image slider is needed to replicate the issue

Created from https://github.com/webcompat/web-bugs/issues/144934

Attached video release vs nightly โ€”
See Also: → 1919215
Whiteboard: [webcompat-source:web-bugs] → [webcompat-source:web-bugs][webcompat:sightline]
Regressed by: 1926015

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

:TYLin, since you are the author of the regressor, bug 1926015, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(aethanyc)
Severity: -- → S2
User Story: (updated)

(In reply to Alice0775 White from comment #2)

Work around:
.MMImage-Origin {
opacity: 1 !important;
}

This happens to be a workaround but it's not quite hitting the right element. In e.g. Chrome, this .MMImage-Origin element has opacity:0 as well, so that's not actually the element that's supposed to paint here.

Really, the site has two copies of the img for some reason -- this .MMImage-Origin one that Alice0775's workaround found (which is supposed to be opacity:0 and hence hidden), and another copy with class="MMImage-Preview" which is supposed to show up.

It's the MMImage-Preview one that we're sizing to be 0x0 for some reason now (and hence not painting).

Attachment #9443021 - Attachment description: reduced testcase 3 (expected to rernder a wide lime area → reduced testcase 3 (expected to render a wide lime area)

I'm morphing this into a regularly-classified regression bug rather than a webcompat site-report, because this was an actual regression that we'd ideally like to avoid shipping rather than a webcompat bug that's downstream of some known/longstanding platform issue.

Component: Site Reports → Layout: Flexbox
OS: Windows 11 → All
Product: Web Compatibility → Core
Hardware: Desktop → All
See Also: → 1934719

In testcase 3 (comment 7), I notice that the issue only happens when both width and height properties are specified as percentages on the lime canvas. If either of those is removed, or changed to specify some other units (px, em, vh, whatever...) it works as expected -- and the percentage in the other axis then works, too.

[Tracking Requested - why for this release]: The severity is high, though it derives from the webcompat report, maybe for a platform bug it is too high?

Flags: needinfo?(dholbert)

I think it's accurate to consider it high-severity; and we're pretty sure this the same as bug 1934719. TYLin is investigating.

Flags: needinfo?(dholbert)

The bug is marked as tracked for firefox134 (beta). However, the bug still isn't assigned.

:fgriffith, could you please find an assignee for this tracked bug? Given that it is a regression and we know the cause, we could also simply backout the regressor. If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit BugBot documentation.

Flags: needinfo?(fgriffith)

I'm looking into this.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Flags: needinfo?(fgriffith)
Flags: needinfo?(aethanyc)

Thanks Ting-Yu!

Use "percentage" in the variable name since other member variables use it.
Introduce usePercentageAwareCache in Get() to ensure consistency with
Set().

In Get(), when the percentage-aware cache is used, we always reject the cache
whenever the percentage basis changes. Therefore, in Set() we should clear
mCacheWithPercentageBasis after mLastPercentageBasis is assigned to a new
value. Otherwise, if the out-of-line cache is already allocated, not clearing
mCacheWithPercentageBasis can result in a stale PrefISize cache after
MinISize cache is updated, and vice versa.

I didn't add a new wpt based on the reduced testcase 3 in the bug because I
failed to reduced it to a simple enough state that I can describe it clearly.
However, this patch fixed two existing WPTs that have a dynamic update to an
absolute element containing a aspect-ratio child. I feel it's enough for
covering this patch.

Duplicate of this bug: 1934719
See Also: 1934719
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5159e4a66b19 Part 1 - Make Set() and Get() in IntrinsicISizesCache consistent in the logic. r=dshin https://hg.mozilla.org/integration/autoland/rev/e8772f6333f5 Part 2 - Clear mCacheWithPercentageBasis whenever mLastPercentageBasis is changed. r=dshin,dholbert
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch

Comment on attachment 9444189 [details]
Bug 1936259 Part 1 - Make Set() and Get() in IntrinsicISizesCache consistent in the logic. r?#layout

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: No user impact because this doesn't change behavior.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This patch doesn't change behavior. It is a preparation for Bug 1936259 Part 2.
  • String changes made/needed: None.
  • Is Android affected?: Yes

Comment on attachment 9444190 [details]
Bug 1936259 Part 2 - Clear mCacheWithPercentageBasis whenever mLastPercentageBasis is changed. r?#layout

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: The images on yandex.com (this bug) and Kanopy.com (Bug 1934719) are missing or distorted.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch invalidate a stale size cache, and it doesn't change how the size is computed.
  • String changes made/needed: None.
  • Is Android affected?: Yes
Attachment #9444190 - Flags: approval-mozilla-beta?

Comment on attachment 9444189 [details]
Bug 1936259 Part 1 - Make Set() and Get() in IntrinsicISizesCache consistent in the logic. r?#layout

Approved for 134 RC1.

Attachment #9444189 - Flags: approval-mozilla-beta+
Attachment #9444190 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: in-testsuite+

Verified as fixed on the latest Firefox RC Build 134.0. Images are loading when accessed from an image search. Navigation through the image slider also loads the images as expected.

Tested with:

Browser / Version: Firefox 134.0 Candidate
Operating System: Windows 10 PRO x64
Operating System: Ubuntu 22.4 LTS x64
Operating System: Mac Ventura 13.1

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: