Open Bug 1666613 Opened 5 years ago Updated 1 month ago

Display XML error pages in the browser directionality while force LTRing the XML code itself, without the use of intl.css

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

People

(Reporter: itiel_yn8, Assigned: pierov)

References

(Blocks 2 open bugs)

Details

(Keywords: rtl)

Attachments

(2 files)

Attached image Screenshot

For Hebrew the <parsererror> element is currently being forced to RTL, but ideally this should be done without the use of intl.css:
https://hg.mozilla.org/l10n-central/he/file/tip/toolkit/chrome/global/intl.css#l34

Currently this makes the XML code itself also appear as RTL, which should never really happen. See attached.

After this is fixed, the hack above can be removed.

Blocks: 1588797

be aware of RFP's spoof english: see Bug 1954813

Assignee: nobody → pierov
Attachment #9477530 - Attachment description: Bug 1666613 - Do not rely on intl.css for text direction in parsererror. r?#platform-i18n-reviewers → Bug 1666613 - Do not rely on intl.css for text direction in parsererror. r?#dom-core!
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/68fb4087ca48 Do not rely on intl.css for text direction in parsererror. r=dom-core,hsivonen

Backed out for causing mochitest failures @ test_bug1666613.html

Flags: needinfo?(pierov)

I think I will have to delete the test that checks that everything is fine in RFP because of some test harness problems.
Otherwise, we can block this Bug on Bug 1869821, but I'd rather opening a new Bug.
Regarding the Android problems, I don't have a clue.
It seems the iframe data isn't available to the test?
I will have to check better.

Flags: needinfo?(pierov)

Hi!
Could you please review the patch again?
I had to send a few changes, so I had to re-ask for a review.
Thanks in advance!

Flags: needinfo?(hsivonen)
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e330be1c9774 Do not rely on intl.css for text direction in parsererror. r=dom-core,hsivonen
Pushed by amarc@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c2f5e53a6967 Revert "Bug 1666613 - Do not rely on intl.css for text direction in parsererror. r=dom-core,hsivonen" for causing mochitest failures @ test_bug1666613.html

Backed out for causing mochitest failures @ test_bug1666613.html

Flags: needinfo?(pierov)

I tried to add some information messages, and while checking for them I noticed this.
This is from a test that passed the build (in the same nofis-ship configuration):

05-21 15:54:40.862 17449 17449 D GeckoSession: handleMessage GeckoView:LocationChange uri=http://mochi.test:8888/tests/dom/xml/test/test_bug1666613.html
05-21 15:54:40.933 17483 17575 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008caa
05-21 15:54:40.974 17483 17575 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008caa
05-21 15:54:40.988 17498 17532 E Web Content: [JavaScript Error: "XML Parsing Error: unclosed token
05-21 15:54:40.988 17498 17532 E Web Content: Location: http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml
05-21 15:54:40.988 17498 17532 E Web Content: Line Number 1, Column 1:" {file: "http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml" line: 1}]
05-21 15:54:40.994 17449 17449 D GeckoSession: handleMessage GeckoView:LocationChange uri=http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml
05-21 15:54:41.010 17483 17575 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008caa
05-21 15:54:41.016 17498 17532 I GeckoDump: ⰲ겿{"action":"log","time":1747842881016,"thread":null,"pid":null,"source":"mochitest","level":"INFO","message":"iframe ready, doing the ltr test immediately","js_source":"TestRunner.js"}ⰲ겿
05-21 15:54:41.018 17498 17532 I GeckoDump: ⰲ겿{"action":"test_status","time":1747842881018,"thread":null,"pid":null,"source":"mochitest","test":"/tests/dom/xml/test/test_bug1666613.html","subtest":"undefined assertion name","status":"PASS","js_source":"TestRunner.js"}ⰲ겿
05-21 15:54:41.041 17483 17575 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008caa
05-21 15:54:41.093 17449 17449 D GeckoSession: handleMessage GeckoView:LocationChange uri=http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml
05-21 15:54:41.096 17498 17532 E Web Content: [JavaScript Error: "XML Parsing Error: unclosed token
05-21 15:54:41.096 17498 17532 E Web Content: Location: http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml
05-21 15:54:41.096 17498 17532 E Web Content: Line Number 1, Column 1:" {file: "http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml" line: 1}]
05-21 15:54:41.111 17498 17532 I GeckoDump: ⰲ겿{"action":"log","time":1747842881111,"thread":null,"pid":null,"source":"mochitest","level":"INFO","message":"iframe ready, doing the rtl test immediately","js_source":"TestRunner.js"}ⰲ겿
05-21 15:54:41.113 17498 17532 I GeckoDump: ⰲ겿{"action":"test_status","time":1747842881112,"thread":null,"pid":null,"source":"mochitest","test":"/tests/dom/xml/test/test_bug1666613.html","subtest":"undefined assertion name","status":"PASS","js_source":"TestRunner.js"}ⰲ겿

This is from the failing run:

05-20 12:38:51.286 17529 17529 D GeckoSession: handleMessage GeckoView:LocationChange uri=http://mochi.test:8888/tests/dom/xml/test/test_bug1666613.html
05-20 12:38:51.356 17563 17655 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008caa
05-20 12:38:51.381 17529 17529 D GeckoSession: handleMessage GeckoView:LocationChange uri=about:blank
05-20 12:38:51.390 17563 17655 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008caa
05-20 12:38:51.396 17575 17615 I GeckoDump: ⰲ겿{"action":"test_status","time":1747744731395,"thread":null,"pid":null,"source":"mochitest","test":"/tests/dom/xml/test/test_bug1666613.html","subtest":"undefined assertion name","status":"FAIL","expected":"PASS","message":"got null, expected \"ltr\"","stack":"    SimpleTest.is@SimpleTest/SimpleTest.js:509:14\n    checkDir@dom/xml/test/test_bug1666613.html:20:5\n    sanityTest/iframe.onload@dom/xml/test/test_bug1666613.html:25:13\n    EventHandlerNonNull*sanityTest@dom/xml/test/test_bug1666613.html:24:3\n    @dom/xml/test/test_bug1666613.html:42:1\n","js_source":"TestRunner.js"}ⰲ겿
05-20 12:38:51.424 17563 17655 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008caa
05-20 12:38:51.460 17529 17529 D GeckoSession: handleMessage GeckoView:LocationChange uri=about:blank
05-20 12:38:51.471 17563 17655 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008caa
05-20 12:38:51.473 17575 17615 I GeckoDump: ⰲ겿{"action":"test_status","time":1747744731473,"thread":null,"pid":null,"source":"mochitest","test":"/tests/dom/xml/test/test_bug1666613.html","subtest":"undefined assertion name","status":"FAIL","expected":"PASS","message":"got null, expected \"rtl\"","stack":"    SimpleTest.is@SimpleTest/SimpleTest.js:509:14\n    checkDir@dom/xml/test/test_bug1666613.html:20:5\n    pseudoBidiTest/iframe.onload@dom/xml/test/test_bug1666613.html:36:13\n    EventHandlerNonNull*pseudoBidiTest@dom/xml/test/test_bug1666613.html:35:3\n    async*sanityTest/iframe.onload@dom/xml/test/test_bug1666613.html:26:5\n    EventHandlerNonNull*sanityTest@dom/xml/test/test_bug1666613.html:24:3\n    @dom/xml/test/test_bug1666613.html:42:1\n","js_source":"TestRunner.js"}ⰲ겿

For some reason, the load event handler is called after loading about:blank rather than the XML file.
However, I don't have a clue about why this happens.

Flags: needinfo?(hsivonen)

Following up from General triage due to needinfo for 22 days. Looks like this may have gotten dropped. Any suggestions on how to fix the backout?

Component: General → DOM: Core & HTML
Flags: needinfo?(pierov) → needinfo?(hsivonen)
Product: Toolkit → Core

Sorry, I didn't mean to drop this, I just haven't had time to get back to this.
However, I'd be happy to get any help to understand why the GeckoView:LocationChange message with about:blank is sent, rather than the message with the correct URI.

Perhaps m_kato can answer or redirect the GeckoView question.

Flags: needinfo?(hsivonen) → needinfo?(m_kato)

As long as looking adb logcat's log, is(parserError.getAttribute("dir"), expected); seems to be failed due to no dir attribute. This test runs into iframe, so I guess that this issue is into iframe only?

5-20 12:38:51.396 17575 17615 I GeckoDump: {"action":"test_status","time":1747744731395,"thread":null,"pid":null,"source":"mochitest","test":"/tests/dom/xml/test/test_bug1666613.html","subtest":"undefined assertion name","status":"FAIL","expected":"PASS","message":"got null, expected \"ltr\"","stack":"    SimpleTest.is@SimpleTest/SimpleTest.js:509:14\n    checkDir@dom/xml/test/test_bug1666613.html:20:5\n    sanityTest/iframe.onload@dom/xml/test/test_bug1666613.html:25:13\n    EventHandlerNonNull*sanityTest@dom/xml/test/test_bug1666613.html:24:3\n    @dom/xml/test/test_bug1666613.html:42:1\n","js_source":"TestRunner.js"}

If this issue is noship (no SHiP) build only, I guess that browser history management bugs. We are turning on SHiP in release, but not yet.

Flags: needinfo?(m_kato)

(In reply to Makoto Kato [:m_kato] from comment #14)

As long as looking adb logcat's log, is(parserError.getAttribute("dir"), expected); seems to be failed due to no dir attribute. This test runs into iframe, so I guess that this issue is into iframe only?

I think that the dir attribute is not found because the test is run on about:blank, rather than being run on the actual page.

When the test fails, the last GeckoView:LocationChange message has uri=about:blank, whereas when the test succeeds, uri=http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml.
Also, test failures are missing this (expected) error:

05-21 15:54:41.096 17498 17532 E Web Content: [JavaScript Error: "XML Parsing Error: unclosed token
05-21 15:54:41.096 17498 17532 E Web Content: Location: http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml
05-21 15:54:41.096 17498 17532 E Web Content: Line Number 1, Column 1:" {file: "http://mochi.test:8888/tests/dom/xml/test/file_bug1666613.xml" line: 1}]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: