Closed Bug 1700221 Opened 3 years ago Closed 3 years ago

Fix origin display in modal dialogs to account for IDN domains properly

Categories

(Toolkit Graveyard :: Notifications and Alerts, defect, P1)

Desktop
All

Tracking

(firefox89 fixed)

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Keywords: rtl, Whiteboard: [proton-modals])

Attachments

(1 file)

The patches in bug 1693008 use uri.hostPort, and should be using uri.displayHostPort instead.

The layout code then needs to ensure it uses the correct directionality for each of the elements to ensure that the display makes sense in both LTR and RTL browsers for both LTR and RTL hosts.

Further to a conversation with Itiel last night (thank you!), I spoke to UX today, and they confirmed:

  • the icon should be on the left or right depending on LTR/RTL-ness of the Firefox locale
  • the fade will need to happen based on the directionality of the domain
  • this will mean the fade sometimes doesn't happen on the same side as the icon. That is OK.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0f209464703b
fix IDN display in content prompts, r=Itiel

Backed out changeset 0f209464703b (bug 1700221) for browser_contentOrigins.js mochitest failures.

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&fromchange=fc68f9ca86aada5668e5e3679d07ae4f029e1468&tochange=786246f5c233c995a20fed77b24c1c6f5086c7dc&test_paths=browser%2Fbase%2Fcontent%2Ftest%2Ftabprompts&selectedTaskRun=MnFdlneXTnqwa9zcJgdE4Q.0

Backout link: https://hg.mozilla.org/integration/autoland/rev/7c5a45933f0148086734ce164412299f50366624

Failure log: https://treeherder.mozilla.org/logviewer?job_id=335241885&repo=autoland&lineNumber=2630

[task 2021-04-02T00:45:25.446Z] 00:45:25     INFO - TEST-START | browser/base/content/test/tabPrompts/browser_contentOrigins.js
[task 2021-04-02T00:45:27.131Z] 00:45:27     INFO - TEST-INFO | started process screentopng
[task 2021-04-02T00:45:27.395Z] 00:45:27     INFO - TEST-INFO | screentopng: exit 0
[task 2021-04-02T00:45:27.395Z] 00:45:27     INFO - Buffered messages logged at 00:45:25
[task 2021-04-02T00:45:27.395Z] 00:45:27     INFO - Entering test bound test_check_prompt_origin_display
[task 2021-04-02T00:45:27.395Z] 00:45:27     INFO - Buffered messages logged at 00:45:27
[task 2021-04-02T00:45:27.396Z] 00:45:27     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Title should match. - 
[task 2021-04-02T00:45:27.397Z] 00:45:27     INFO - Buffered messages finished
[task 2021-04-02T00:45:27.398Z] 00:45:27     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Title should fit without overflowing. - 
[task 2021-04-02T00:45:27.398Z] 00:45:27     INFO - Stack trace:
[task 2021-04-02T00:45:27.398Z] 00:45:27     INFO - chrome://mochikit/content/browser-test.js:test_ok:1334
[task 2021-04-02T00:45:27.399Z] 00:45:27     INFO - chrome://mochitests/content/browser/browser/base/content/test/tabPrompts/browser_contentOrigins.js:checkAlert/<:41
[task 2021-04-02T00:45:27.399Z] 00:45:27     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | New title should be shown. - 
[task 2021-04-02T00:45:27.399Z] 00:45:27     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Old title should be hidden. - 
[task 2021-04-02T00:45:27.400Z] 00:45:27     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Icon is as expected. - 
[task 2021-04-02T00:45:27.401Z] 00:45:27     INFO - Wait for the prompt title to update.
[task 2021-04-02T00:45:27.401Z] 00:45:27     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | The longer domain is reflected. - 
[task 2021-04-02T00:45:27.401Z] 00:45:27     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | The domain should overflow. - 
[task 2021-04-02T00:45:29.178Z] 00:45:29     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Title should match. - 
[task 2021-04-02T00:45:29.178Z] 00:45:29     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-04-02T00:45:29.179Z] 00:45:29     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Title should fit without overflowing. - 
[task 2021-04-02T00:45:29.179Z] 00:45:29     INFO - Stack trace:
[task 2021-04-02T00:45:29.179Z] 00:45:29     INFO - chrome://mochikit/content/browser-test.js:test_ok:1334
[task 2021-04-02T00:45:29.179Z] 00:45:29     INFO - chrome://mochitests/content/browser/browser/base/content/test/tabPrompts/browser_contentOrigins.js:checkAlert/<:41
[task 2021-04-02T00:45:29.187Z] 00:45:29     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | New title should be shown. - 
[task 2021-04-02T00:45:29.187Z] 00:45:29     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Old title should be hidden. - 
[task 2021-04-02T00:45:29.188Z] 00:45:29     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Icon is as expected. - 
[task 2021-04-02T00:45:29.188Z] 00:45:29     INFO - Wait for the prompt title to update.
[task 2021-04-02T00:45:29.285Z] 00:45:29     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | The longer domain is reflected. - 
[task 2021-04-02T00:45:29.286Z] 00:45:29     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | The domain should overflow. - 
[task 2021-04-02T00:45:30.013Z] 00:45:30     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "data:text/html,<body>" line: 0}]
[task 2021-04-02T00:45:30.737Z] 00:45:30     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Title l10n id should match. - 
[task 2021-04-02T00:45:30.737Z] 00:45:30     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-04-02T00:45:30.738Z] 00:45:30     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Title should fit without overflowing. - 
[task 2021-04-02T00:45:30.738Z] 00:45:30     INFO - Stack trace:
[task 2021-04-02T00:45:30.738Z] 00:45:30     INFO - chrome://mochikit/content/browser-test.js:test_ok:1334
[task 2021-04-02T00:45:30.738Z] 00:45:30     INFO - chrome://mochitests/content/browser/browser/base/content/test/tabPrompts/browser_contentOrigins.js:checkAlert/<:41
[task 2021-04-02T00:45:30.738Z] 00:45:30     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | New title should be shown. - 
[task 2021-04-02T00:45:30.739Z] 00:45:30     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Old title should be hidden. - 
[task 2021-04-02T00:45:30.739Z] 00:45:30     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Icon is as expected. - 
[task 2021-04-02T00:45:32.323Z] 00:45:32     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Title l10n id should match. - 
[task 2021-04-02T00:45:32.323Z] 00:45:32     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Title should fit without overflowing. - 
[task 2021-04-02T00:45:32.324Z] 00:45:32     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | New title should be shown. - 
[task 2021-04-02T00:45:32.324Z] 00:45:32     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Old title should be hidden. - 
[task 2021-04-02T00:45:32.325Z] 00:45:32     INFO - TEST-PASS | browser/base/content/test/tabPrompts/browser_contentOrigins.js | Icon is as expected. - 
[task 2021-04-02T00:45:32.546Z] 00:45:32     INFO - Leaving test bound test_check_prompt_origin_display
[task 2021-04-02T00:45:32.643Z] 00:45:32     INFO - GECKO(1994) | MEMORY STAT | vsize 130551045MB | residentFast 1859MB
[task 2021-04-02T00:45:32.643Z] 00:45:32     INFO - TEST-OK | browser/base/content/test/tabPrompts/browser_contentOrigins.js | took 7201ms
[task 2021-04-02T00:45:32.719Z] 00:45:32     INFO - checking window state
Flags: needinfo?(gijskruitbosch+bugs)
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/47b75ddc5ce4
fix IDN display in content prompts, r=Itiel
Flags: needinfo?(gijskruitbosch+bugs)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: