Closed Bug 2048495 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 60703 - [Fonts] Remove [LegacyNoInterfaceObject] from FontFaceSet IDL

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 60703 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/60703
Details from upstream follow.

Dileep Maurya <dileepmaurya@microsoft.com> wrote:

[Fonts] Remove [LegacyNoInterfaceObject] from FontFaceSet IDL

The CSS Font Loading spec defines FontFaceSet as a regular interface
without [LegacyNoInterfaceObject] and without a constructor. Chromium's
IDL incorrectly used [LegacyNoInterfaceObject], which prevented
FontFaceSet from being exposed as a global property and deleted the
"constructor" property from the prototype.

This caused the WPT historical.html test to fail because:

  1. "FontFaceSet" in self was false (not globally exposed), so the test
    fell back to document.fonts.constructor.
  2. The deleted "constructor" property caused prototype chain traversal
    to EventTarget's constructor, which is callable.
  3. new document.fonts.constructor() succeeded instead of throwing
    TypeError.

By removing [LegacyNoInterfaceObject], FontFaceSet is now properly
exposed globally. Since no constructor() is defined in the IDL, V8's
IsValidConstructorMode callback correctly throws "Illegal constructor"
(TypeError) when new FontFaceSet([]) is called from JavaScript, which
is the expected spec behavior.

This also fixes 18 FontFaceSet-related failures in the idlharness
test that were caused by the interface not being globally accessible.

Spec: https://drafts.csswg.org/css-font-loading/#fontfaceset
CSSWG Resolution: https://github.com/w3c/csswg-drafts/issues/10390

Bug: 477568263
Change-Id: I55caaf27e2bbb93918eb27b9a159dc8d92dd92b1

Reviewed-on: https://chromium-review.googlesource.com/7664980
WPT-Export-Revision: 60ff06b73fc3be2fbff80b9ddff9b0a10be4fccd

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 29 tests and 1 subtests

Status Summary

Firefox

OK : 1[GitHub] 21[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 1[GitHub] 2[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 169[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 174[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 56[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 57[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
FAIL: 1

Safari

OK : 1
PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-font-loading/fontface-override-descriptors.html [wpt.fyi]: FAIL
  • /css/css-font-loading/fontface-descriptor-updates-2.html [wpt.fyi]
    • Font matching uses updated style and family name: FAIL
  • /css/css-font-loading/fontface-invalid-family.tentative.html [wpt.fyi]
    • family: a b: FAIL
    • family: a b: FAIL
    • family: a b : FAIL
  • /css/css-font-loading/fontfaceset-has.html [wpt.fyi]
    • fontfaceset-has: FAIL
  • /css/css-font-loading/fontfaceset-load-css-wide-keywords.html [wpt.fyi]
    • Loading value with CSS-wide keyword "revert-layer" causes SyntaxError (document): FAIL
    • Loading value with CSS-wide keyword "revert-layer" causes SyntaxError (worker): FAIL
  • /css/css-font-loading/idlharness.https.html [wpt.fyi]
    • FontFace interface: attribute features: FAIL
    • FontFace interface: attribute variations: FAIL
    • FontFace interface: attribute palettes: FAIL
    • FontFace interface: fontFace must inherit property "features" with the proper type: FAIL
    • FontFace interface: fontFace must inherit property "variations" with the proper type: FAIL
    • FontFace interface: fontFace must inherit property "palettes" with the proper type: FAIL
    • FontFaceFeatures interface: existence and properties of interface object: FAIL
    • FontFaceFeatures interface object length: FAIL
    • FontFaceFeatures interface object name: FAIL
    • FontFaceFeatures interface: existence and properties of interface prototype object: FAIL
    • FontFaceFeatures interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • FontFaceFeatures interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • FontFaceVariationAxis interface: existence and properties of interface object: FAIL
    • FontFaceVariationAxis interface object length: FAIL
    • FontFaceVariationAxis interface object name: FAIL
    • FontFaceVariationAxis interface: existence and properties of interface prototype object: FAIL
    • FontFaceVariationAxis interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • FontFaceVariationAxis interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • FontFaceVariationAxis interface: attribute name: FAIL
    • FontFaceVariationAxis interface: attribute axisTag: FAIL
    • FontFaceVariationAxis interface: attribute minimumValue: FAIL
    • FontFaceVariationAxis interface: attribute maximumValue: FAIL
    • FontFaceVariationAxis interface: attribute defaultValue: FAIL
    • FontFaceVariations interface: existence and properties of interface object: FAIL
    • FontFaceVariations interface object length: FAIL
    • FontFaceVariations interface object name: FAIL
    • FontFaceVariations interface: existence and properties of interface prototype object: FAIL
    • FontFaceVariations interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • FontFaceVariations interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • FontFaceVariations interface: setlike<FontFaceVariationAxis>: FAIL
    • FontFacePalette interface: existence and properties of interface object: FAIL
    • FontFacePalette interface object length: FAIL
    • FontFacePalette interface object name: FAIL
    • FontFacePalette interface: existence and properties of interface prototype object: FAIL
    • FontFacePalette interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • FontFacePalette interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • FontFacePalette interface: iterable<DOMString>: FAIL
    • FontFacePalette interface: attribute length: FAIL
    • FontFacePalette interface: attribute usableWithLightBackground: FAIL
    • FontFacePalette interface: attribute usableWithDarkBackground: FAIL
    • FontFacePalettes interface: existence and properties of interface object: FAIL
    • FontFacePalettes interface object length: FAIL
    • FontFacePalettes interface object name: FAIL
    • FontFacePalettes interface: existence and properties of interface prototype object: FAIL
    • FontFacePalettes interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • FontFacePalettes interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • FontFacePalettes interface: iterable<FontFacePalette>: FAIL
    • FontFacePalettes interface: attribute length: FAIL
    • FontFaceSet interface: setlike<FontFace>: FAIL
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1f95bb37918f https://hg.mozilla.org/integration/autoland/rev/f6e6a39ca17c [wpt PR 60703] - [Fonts] Remove [LegacyNoInterfaceObject] from FontFaceSet IDL, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
You need to log in before you can comment on or make changes to this bug.