Closed Bug 1923304 Opened 1 year ago Closed 1 year ago

www.icloud.com - The check icon for the to-do list inside the "Notes" section is broken

Categories

(Web Compatibility :: Site Reports, defect, P2)

Firefox 131
Desktop
Windows 10

Tracking

(Webcompat Priority:P2, Webcompat Score:7, firefox-esr140 fixed, firefox140 wontfix, firefox141 fixed)

RESOLVED FIXED
Webcompat Priority P2
Webcompat Score 7
Tracking Status
firefox-esr140 --- fixed
firefox140 --- wontfix
firefox141 --- fixed

People

(Reporter: rbucata, Unassigned)

References

()

Details

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

User Story

platform:windows,mac,linux,android
impact:feature-broken
configuration:general
affects:all
branch:release
diagnosis-team:graphics
user-impact-score:600

Attachments

(4 files)

Environment:
Operating system: Windows 10
Firefox version: Firefox 131.0

Steps to reproduce:

  1. Navigate to: https://www.icloud.com and perform account login
  2. Access the https://www.icloud.com/notes/ section
  3. Write a note and select all the entries
  4. Click on the "Make a checklist" option located at the top of the entries and observe

Expected Behavior:
Checklist bullets are added

Actual Behavior:
Black squares are added

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in Firefox Nightly, and Firefox Release
  • Does not reproduce in Chrome

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

Attached video 20241008_134731.mp4

This is one gigantic <canvas>. :(

Severity: -- → S3
User Story: (updated)
Priority: -- → P2
Duplicate of this bug: 1923783
Duplicate of this bug: 1925781

I am experiencing the same problem, as of November 4, 2024, with FireFox 132.0 on Windows 11 Pro 23H2 build 22631.4169. As noted in one of the duplicate bugs (1925781), another way to reproduce this problem is to create an Apple note on an iOS device using the checklist feature, check some items off and leave others unchecked, and then view it on iCloud.com in FireFox, where the expected checked or unchecked circles visible in the iOS notes app will instead appear in FireFox as opaque black boxes.

I am experiencing this same issue as of November 20, 2024 with Firefox 132.0.2 (64bit) running on Windows Pro (v. 23H2). Replicated issue via private browsing window with all extensions disabled.

Attached image 2024-11-20_09-55-05.jpg

Bug view generated:
Firefox version 132.0.2 (64-bit)
Windows Pro (Version 23H2, Installed on ‎9/‎19/‎2023, OS build, 22631.4460, Windows Feature Experience Pack 1000.22700.1047.0).
Processor: 12th Gen Intel(R) Core(TM) i9-12900 2.40 GHz
Installed RAM: 64.0 GB (63.6 GB usable)
System type: 64-bit operating system, x64-based processor
Pen and touch: No pen or touch input is available for this display

Whiteboard: [webcompat-source:web-bugs] → [webcompat-source:web-bugs][webcompat:sightline]

Kelsey, Nical thinks this involves WebGL canvas. Can you have a look when you get a chance?

Component: Site Reports → Graphics: CanvasWebGL
Flags: needinfo?(jgilbert)
Product: Web Compatibility → Core
Version: unspecified → Firefox 131
Assignee: nobody → jgilbert
Flags: needinfo?(jgilbert)

Any updates on this? still an issue.

I can repro. I'll look at a canvas-rr recording of this.

I am also experiencing this problem. In addition it seems that the lowercase letter x is rendered wrong too, but only in the "Body" font. It is displayed as an arrow pointing up right.

Webcompat Priority: --- → P2

I am narrowing down the issue still, but other work is competing for priority.

I tried userAgent spoofing and Firefox (pretending to be Chrome) didn't change, still broken in Firefox.

A diff between a recording in Chrome (renders correctly in both browsers) and Firefox (renders incorrectly in both browsers).

That diff inlined here, since it's short:

-// Chrome recording (6).json
+// Firefox recording(47).json
 ["$gl","bufferSubData",[34962,144,"=Float32Array:^AAAAAJrBwkEAAIA/AAAAAAAAAAAAAAAAAAAAAJrBwkEAAIA/msHCQQAAgD8AAAAA"]],
 ["$gl","createTexture",[],"$tex1"],
 ["$gl","bindTexture",[3553,"$tex1"]],
-["$gl","texImage2D",[3553,0,6408,150,150,0,6408,5121,null]],
+["$gl","texImage2D",[3553,0,6408,0,0,0,6408,5121,null]],
 ["$gl","texParameteri",[3553,10241,9729]],
 ["$gl","texParameteri",[3553,10240,9729]],
 ["$gl","texParameteri",[3553,10242,33071]],
 ["$gl","texParameteri",[3553,10243,33071]],
+["$gl","pixelStorei",[3317,4]],
+["$gl","texImage2D",[3553,0,6408,6408,5121,"@68"]],
 ["$gl","bufferSubData",[34962,192,"@0xa00560cd"]],
 ["$c2d.canvas","set width",[47]],
 ["$c2d.canvas","set height",[71]],
 ["$c2d","set textBaseline",["\"alphabetic"]],
 ["$c2d","set font",["\"17px ctSFUITextLight"]],
 ["$c2d","clearRect",[0,0,47,71]],
 ["$c2d","save",[]],
 ["$c2d","scale",[5,5]],
 ["$c2d","translate",[-1.0625,-3.43652]],
 ["$c2d","fillText",["\"b",0,16.1865]],
 ["$c2d","restore",[]],
 ["$c2d","getImageData",[0,0,47,71],"#ImageData"],
 ["$gl","bindTexture",[3553,"$tex2"]],
-["$gl","pixelStorei",[3317,1]],
-["$gl","texSubImage2D",[3553,0,142,128,47,71,6406,5121,"@0x13ad5fea"]],
+["$gl","texSubImage2D",[3553,0,142,128,47,71,6406,5121,"@0x111c3848"]],

This looks like a buggy website.

Chrome seems to do a 2-phase alloc+upload of what is probably a 150x150 image, whereas Firefox allocates a 0x0 texture and doesn't upload anything to it:

-["$gl","texImage2D",[3553,0,6408,150,150,0,6408,5121,null]],
+["$gl","texImage2D",[3553,0,6408,0,0,0,6408,5121,null]],
 ["$gl","texParameteri",[3553,10241,9729]],
 ["$gl","texParameteri",[3553,10240,9729]],
 ["$gl","texParameteri",[3553,10242,33071]],
 ["$gl","texParameteri",[3553,10243,33071]],
+["$gl","pixelStorei",[3317,4]],
+["$gl","texImage2D",[3553,0,6408,6408,5121,"@68"]],

This two-pass allocation+setting is fine, though the latter should ideally be texSubImage2D instead of texImage2D.

In Firefox it tries to allocate 0x0 instead of 150x150, and while it calls texParameteri, the website doesn't even make the second call to texImage2D that actually sets the data. (also Chrome sets pixelStorei before upload, but reasonably doesn't bother in Firefox because it's not going to upload anything)

Firefox and Chrome have different behavior for img.width and img.height for SVGs when they are not attached to the DOM.

Firefox gives width: 0, height: 0
Chrome gives width: 150, height: 150

I suspect this is what drives the differences here.

That SVG doesn't have a width or height, just an aspect ratio from its viewBox:

<svg viewBox="-5 -5 104.6099853515625 104.6572265625" version="1.1" xmlns="http://www.w3.org/2000/svg"><g fill="rgba(235,184,0,1)" transform="matrix(1 0 0 1 -8.740039062500045 85.05859375)"><path d="M58.5449 14.5508C85.791 14.5508 108.35-8.05664 108.35-35.2539C108.35-62.5 85.7422-85.0586 58.4961-85.0586C31.2988-85.0586 8.74023-62.5 8.74023-35.2539C8.74023-8.05664 31.3477 14.5508 58.5449 14.5508ZM53.0762-11.377C51.416-11.377 50.0488-12.0605 48.7793-13.7695L36.5234-28.8086C35.791-29.7852 35.3516-30.8594 35.3516-31.9824C35.3516-34.1797 37.0605-35.9863 39.2578-35.9863C40.6738-35.9863 41.748-35.5469 42.9688-33.9355L52.8809-21.1426L73.7305-54.6387C74.6582-56.1035 75.9277-56.8848 77.1973-56.8848C79.3457-56.8848 81.3477-55.4199 81.3477-53.125C81.3477-52.0508 80.7129-50.9277 80.127-49.9023L57.1777-13.7695C56.1523-12.1582 54.7363-11.377 53.0762-11.377Z" /></g></svg>

So I think this is https://issues.chromium.org/issues/41357911?

Injecting this intervention into the page causes it to work in Firefox again:

   if (true) {
      const proto = HTMLImageElement.prototype;
      const descs = Object.getOwnPropertyDescriptors(proto);
      const WAS = {};
      for (const k of ['width', 'height', 'naturalWidth', 'naturalHeight']) {
         const desc = descs[k];
         WAS[k] = desc.get;
      }
      for (const k of ['width', 'height', 'naturalWidth', 'naturalHeight']) {
         const desc = descs[k];
         desc.get = function() {
            let ret = WAS[k].call(this);
            if (!ret && this.src.startsWith('data:image/svg+xml')) {
               const nw = WAS.naturalWidth.call(this);
               const nh = WAS.naturalHeight.call(this);
               if (!nw && !nh) {
                  ret = 150;
                  console.log(this, `.${k} => 0 -> 150`);
               }
            }
            return ret;
         };
      }
      Object.defineProperties(proto, descs);
   }

If Chrome matches Firefox here, they should expect to regress on this page.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #20)

So I think this is https://issues.chromium.org/issues/41357911?

It looks like it, yes!

Depends on: 1935269

Over to Layout then!

Assignee: jgilbert → nobody
Component: Graphics: CanvasWebGL → Layout: Images, Video, and HTML Frames
Priority: P2 → --

(In reply to Kelsey Gilbert [:jgilbert] from comment #23)

Over to Layout then!

Rather, let's call this a Site Report bug with a dependency on the bug that Emilio noted (which is really tracking a case where we're spec-compliant and other browsers have a bug that they're taking steps towards solving).

Thanks for diagnosing!

Component: Layout: Images, Video, and HTML Frames → Site Reports
Product: Core → Web Compatibility

+cc karlcow -- hi karl! This seems to be a case where icloud.com is accidentally depending on a bug in Chromium/WebKit that you were recently looking at (and that Chromium folks are taking steps towards fixing) -- specifically, they're depending on getting a nonzero naturalWidth for a dimensionless SVG image, which is:
https://bugs.webkit.org/show_bug.cgi?id=284341
https://issues.chromium.org/issues/41357911

They're getting broken results in Firefox (and maybe soon Chrome and/or WebKit if those^ bugs are fixed) as a result.

Would you mind reporting this to the iCloud folks? They just need to either:

  • add some nonzero width & height attributes to their "checkmark" SVG image here (on the <svg> element that's inside their base64-data-URI-encoded graphic, markup quoted in comment 20 and data-URI-encoding quoted in comment 19's attachment);
  • ...or adjust their logic that checks the image's naturalWidth & naturalHeight to gracefully handle those returning 0.
Flags: needinfo?(karl+moz)

Hi Daniel.
Thanks for the heads up.
This is tracked by rdar://143937552.

Flags: needinfo?(karl+moz)
Webcompat Score: --- → 6
Depends on: 1965560

Like bug 1951871, this should be fixed in the latest Nightly due to bug 1965560 landing.

I can't test the iCloud website at the moment (I don't have my apple-account 2fa device handy) but I'll test it later on in Nightly to confirm that it's fixed.

OK, I was able to test and I confirmed this is fixed in Nightly 141.0a1 (2025-06-01) (64-bit)

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

--> Updating metadata to reflect that this affected Firefox on Android as well. I just tried there in latest Nightly on Android (which is a few days out of date due to regular play-store delays and hence doesn't have the fix yet), and I can reproduce there.

User Story: (updated)
Severity: S3 → S2
User Story: (updated)
Webcompat Score: 6 → 7
Priority: -- → P2

Verified, the issue is still reproducible on the RC build. @dholbert does this actually have the target milestone for 141?

Tested with:

  • Browser / Version: Firefox 140.0-candidate build 1
  • Operating System: Windows 10
Flags: needinfo?(dholbert)

This is expected to be fixed in 141, not 140.

Flags: needinfo?(dholbert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: