Closed Bug 728725 Opened 12 years ago Closed 12 years ago

Convert XHTML MathML pages into HTML5

Categories

(www.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fredw, Assigned: fredw)

References

Details

Attachments

(8 files, 2 obsolete files)

Follow-up of bug 445029 comment 113

Patches in bug 445029 convert XHTML pages into HTML5. When 602828 is fixed we will be able to insert code into the MDN wiki (which uses HTML5). For consistency and to make the migration straightforward, it would be best to have all the MathML pages converted into HTML5. We have to check carefully that bug 445029 doesn't regress, i.e. that the pages remain valid.
I tried to use svn copy, but that does not seem to be reflected when I create a patch with "svn diff".

I'm going to attach a couple of patch to convert pages to HTML5. Most of the changes are straightforward.

I guess it is best to keep a copy of the .xhtml page online (at least for the torture test) until redirections are settled.
Attached patch patch - part 1Splinter Review
Assignee: nobody → fred.wang
Attachment #599657 - Flags: review?(karlt)
Attached patch patch - part 2Splinter Review
Attachment #599658 - Flags: review?(karlt)
Attached patch patch - part 3Splinter Review
Attachment #599659 - Flags: review?(karlt)
Attached patch patch - part 4Splinter Review
Attachment #599660 - Flags: review?(karlt)
Attachment #599657 - Flags: review?(karlt) → review+
Attachment #599658 - Flags: review?(karlt) → review+
Attachment #599659 - Flags: review?(karlt) → review+
Attachment #599660 - Flags: review?(karlt) → review+
(In reply to Frédéric Wang from comment #5)
> Created attachment 599660 [details] [diff] [review]
> patch - part 4

FYI, I moved the links on the demo/index.xhtml page into
https://developer.mozilla.org/en/Mozilla_MathML_Project
Attached patch redirects (obsolete) — Splinter Review
Does this look right to you, Frédéric?

This includes redirects for bug 445029.
demos/index.html is redirected to https://developer.mozilla.org/en/Mozilla_MathML_Project
The existing rewrite rules are changed to permanent redirects, and rewrite processing can stop when these match.
Attachment #601488 - Flags: review?(fred.wang)
Comment on attachment 601488 [details] [diff] [review]
redirects

OK, I'm not really familiar with the regexp syntax of rewrite rules, but that looks good. In the rewrite rule and org-urls, "demos/" should be replaced by "demo/" (without "s"). Also, we should probably add redirections for demo/basics.xhtml and demo/extras.xhtml. All the .xhtml => .html redirections in org-urls can certainly be made in one rewrite rule in the .htaccess. Maybe you can ask to people in charge of the website.
Attachment #601488 - Flags: review?(fred.wang) → review+
I'm wondering if we will be able to add a mathjax.css to test MathJax fonts or whether it will be too late?
(In reply to Frédéric Wang from comment #8)
> In the rewrite rule and org-urls, "demos/" should be
> replaced by "demo/" (without "s"). Also, we should probably add redirections
> for demo/basics.xhtml and demo/extras.xhtml.

Thanks for spotting these.

> All the .xhtml => .html
> redirections in org-urls can certainly be made in one rewrite rule in the
> .htaccess.

I expect the rewrite map should be more efficient than using regular expressions as it can be implemented as a hash table lookup, but every regular expression needs to be checked against every URL requested.  The reason we can't use the rewrite map for the directory redirects is that at least some of the directories still exist and the rewrite map is used only when "RewriteCond %{REQUEST_FILENAME} !-d".
(In reply to Frédéric Wang from comment #9)
> I'm wondering if we will be able to add a mathjax.css to test MathJax fonts
> or whether it will be too late?

Sounds like a good idea.  I don't know the timeframe.
Depends on: 731876
Comment on attachment 601488 [details] [diff] [review]
redirects

Updated version in bug 731876
Attachment #601488 - Attachment is obsolete: true
Attachment #602007 - Flags: review?(karlt)
Attachment #602008 - Flags: review?(karlt)
Comment on attachment 602007 [details] [diff] [review]
mathjax fonts - part 1

Are the "!importants" necessary?
These already have a higher specificity than the math and mi element rules as well as the ::-moz-math-stretchy pseudo-element rule iiuc
http://www.w3.org/TR/CSS21/cascade.html#6.4.3
Attachment #602007 - Flags: review?(karlt) → review+
Attachment #602008 - Flags: review?(karlt) → review+
Added html files and updated demo index in r102423 and committed MathJax fonts patches r102424.

Still need to remove xhtml files once bug 731876 is fixed.
(In reply to Karl Tomlinson (:karlt) from comment #15)
> Comment on attachment 602007 [details] [diff] [review]
> mathjax fonts - part 1
> 
> Are the "!importants" necessary?
> These already have a higher specificity than the math and mi element rules
> as well as the ::-moz-math-stretchy pseudo-element rule iiuc
> http://www.w3.org/TR/CSS21/cascade.html#6.4.3

mmmh, so maybe I did something wrong in the patch that we didn't take for MathJax fonts:

https://github.com/fred-wang/MozillaCentralPatches/blob/master/MathJax-fonts.diff

I put !important to ensure it is stronger than mi and math. But now I also see it ::-moz-math-stretchy should be of higher specificity. I'll work on this again.
Attached patch mathjax fonts - part 3 (obsolete) — Splinter Review
Until we understand better bug 732834, here is a patch to remove the useless !important rules and "MathJax" in the demo descriptions.
Attachment #604109 - Flags: review?(karlt)
Attachment #604109 - Attachment is obsolete: true
Attachment #604109 - Flags: review?(karlt)
Attachment #604200 - Flags: review?(karlt)
Comment on attachment 604200 [details] [diff] [review]
mathjax fonts - part 3

r102708
Attachment #604200 - Flags: review?(karlt) → review+
(In reply to Karl Tomlinson (:karlt) from comment #16)
> Added html files and updated demo index in r102423 and committed MathJax
> fonts patches r102424.
> 
> Still need to remove xhtml files once bug 731876 is fixed.

Removed with demo/index.html in r103127.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
The animation for extra.html is not exactly what I wanted to do (it does not repeat well). This patch should fix this issue.
Attachment #606397 - Flags: review?(karlt)
Comment on attachment 606397 [details] [diff] [review]
fix animation for extrra.html

r103129
Attachment #606397 - Flags: review?(karlt) → review+
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: