Closed Bug 2087787 Opened 24 days ago Closed 19 days ago

store.google.com - When clicking a link of navigation menus on that page, it takes a very long time for the linked page to load.

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 161
Desktop
Windows 11
defect

Tracking

()

VERIFIED FIXED
162 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr153 --- verified
firefox160 --- verified
firefox161 --- verified
firefox162 --- verified

People

(Reporter: alice0775, Assigned: emilio)

References

Details

(Keywords: nightly-community, perf)

Attachments

(6 external files)

After Bug 2087354 was fixed, There is an issue where the linked page takes a very long time to load.

Steps to reproduce:

  1. Open https://store.google.com/us/?hl=en-US
  2. Clicking on link(such as header menu) in the page

Phones Fi Wireles Watches & Trackers ...

Actual results:
The link could not be loaded.
For an unusually long time, the screen turns white, and a progress bar at the top of the page remains animated.

Interestingly,
ctrl+click the link(such as header menu), the page loads immediately.
And when accessed directly from urlbar with the following url, the page loads immediately.
https://store.google.com/us/category/phones?hl=en-US
https://store.google.com/us/magazine/google_fi?hl=en-US
https://store.google.com/us/category/watches_trackers?hl=en-US

Expected results:
The link could should be loaded.

Depends on: 2087354
Assignee: nobody → dshin
Status: NEW → ASSIGNED

Two issues that, upon directly addressing, seems to resolve the loading issue.

  1. DOM mutation handling: Right, this wasn't handled from Bug 2087354. This change likely fixes Bug 2086739.
  2. For selectors inside :has, we seem to queue multiple the same dependency?

Timing is bad for me (About to go on PTO), so above will need double-checking in the WIP patch.

See Also: → 2088020

They are injecting a bunch of media queries with selectors like:

  :root:has(
      [data-request-navbar-position="overlap"]:not([style*="display: none"]):not([style*="display: none"] *):not([style*="display:none"]):not(
          [style*="display:none"] *
        )
    )
    .r1micc {
    top: 72px;
    opacity: 0;
    height: 0;
    transition: opacity 0.3s ease-in-out;
  }

Wtf.

Attachment #9672164 - Attachment description: Bug 2087787: WIP: Run compound check for DOM mutation + duplicate dependencies for normal selectors inside has. r=#style → Bug 2087787 - Run compound check for DOM mutation + duplicate dependencies for normal selectors inside has. r=#style

This is the kind of dedup the original version of the patch was trying to do
but at what I think is a better place (that also doesn't depend on rule
placement), and without the correctness error that it introduces.

The WPT covers that correctness issue.

The patches here change :has() invalidation in servo/components/style, which servo/moz.build maps to CSS Parsing and Computation, so moving it there (like bug 2087354).

(AI-assisted triage, with review.)

Component: DOM: Navigation → CSS Parsing and Computation
Status: ASSIGNED → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch

The patch landed in nightly and beta is affected, along with ESR.

:dshin, please make an uplift decision for beta and ESR:

  • For beta, nominate the patch for beta uplift approval if the fix should be included in this release, or set status-firefox161 to wontfix if the fix can wait for the next release.
  • For ESR, nominate the patch for the appropriate ESR uplift approval if the fix should be included in ESR, or set the ESR status flag(s) to wontfix if an uplift isn't needed. Each affected ESR release needs a decision.

Uplift requests can be submitted from Lando: D338585, D338722, D338723.

See Requesting an Uplift for documentation on how to request an uplift.

For more information, please visit BugBot documentation.

Flags: needinfo?(dshin)
Assignee: dshin → emilio
Flags: needinfo?(dshin) → needinfo?(emilio)

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: High profile website perf issue.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: comment 0
  • Risk associated with taking this patch: low
  • Explanation of risk level: Targeted fix.
  • String changes made/needed?: none
  • Is Android affected?: yes
Attachment #9675601 - Flags: approval-mozilla-beta?
Flags: qe-verify+

This is the kind of dedup the original version of the patch was trying
to do but at what I think is a better place (that also doesn't depend on
rule placement), and without the correctness error that it introduced.

The WPT covers that correctness issue (passes both with and without the
patch).

Original Revision: https://phabricator.services.mozilla.com/D338722

firefox-esr153 Uplift Approval Request

  • User impact if declined/Reason for urgency: High profile website perf issue.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: comment 0
  • Risk associated with taking this patch: low
  • Explanation of risk level: Targeted fix.
  • String changes made/needed?: none
  • Is Android affected?: yes
Attachment #9675602 - Flags: approval-mozilla-esr153?

This is the kind of dedup the original version of the patch was trying
to do but at what I think is a better place (that also doesn't depend on
rule placement), and without the correctness error that it introduced.

The WPT covers that correctness issue (passes both with and without the
patch).

Original Revision: https://phabricator.services.mozilla.com/D338722

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

Flags: needinfo?(emilio)

@emilio, could you consider adding a release uplift request? We could take in the planned Fx160 dot release

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: see above
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: comment 0
  • Risk associated with taking this patch: low
  • Explanation of risk level: targeted fix
  • String changes made/needed?: none
  • Is Android affected?: yes
Attachment #9675660 - Flags: approval-mozilla-release?

This is the kind of dedup the original version of the patch was trying
to do but at what I think is a better place (that also doesn't depend on
rule placement), and without the correctness error that it introduced.

The WPT covers that correctness issue (passes both with and without the
patch).

Original Revision: https://phabricator.services.mozilla.com/D338722

Upstream PR merged by moz-wptsync-bot

See Also: → 2090083
Attachment #9675601 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [uplift][qa-ver-needed-c162/b161]

I was able to reproduce the issue on Win11x64 using FF build 161.0a1(20261031202918) and steps from description.
Verified as fixed on Win11x64 /Mac 15.5 using Firefox build 162.0a1. Waiting for next Beta to check on 161.0b2.

QA Contact: mchiorean
Regressions: 2090961
Regressions: 2091389

Verified as fixed on Win11x64 /Mac 15.5 / Ubuntu 24.04 using Firefox build 161.0b1-build2(20261109153532)

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift][qa-ver-needed-c162/b161] → [uplift][qa-ver-done-c162/b161]
Flags: qe-verify+
Attachment #9675602 - Flags: approval-mozilla-esr153? → approval-mozilla-esr153+

Backed out changeset 4c9981a1d2c2 (Bug 2087787) from esr153 because it broke the build.
https://github.com/mozilla-firefox/firefox/commit/673a4a26662396ac79304e57f43f8fa228b5bd95

Failure log: https://treeherder.mozilla.org/logviewer?job_id=607033388&repo=mozilla-esr153&task=E-4myu-kThi8TbbW7VcShw.0&lineNumber=41406

Claude analysis:

error[E0432]: unresolved imports crate::FxHashMap, crate::FxHashSet
--> servo/components/style/invalidation/element/relative_selector.rs:30:13
30 | use crate::{FxHashMap, FxHashSet};
| ^^^^^^^^^ ^^^^^^^^^ no FxHashSet in the root

The esr153 style crate root doesn't re-export FxHashMap/FxHashSet like main does, and this file already imports rustc_hash::FxHashMap. Importing both from rustc_hash should be enough to fix it (use rustc_hash::{FxHashMap, FxHashSet};).

Emilio, could you attach a rebased esr153 patch and confirm it builds?

Thanks


Flags: needinfo?(emilio)
Flags: needinfo?(emilio) → needinfo?(pascalc)
Attachment #9675660 - Flags: approval-mozilla-release? → approval-mozilla-release+
Flags: needinfo?(pascalc)

Verified as fixed on Win11x64/Mac 15.5 using FF build 160.0.1(20261116130455).

Verified as fixed on Win11x64/Mac 15.5 using FF build 153.8.0esr.

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

Attachment

General

Created:
Updated:
Size: