Bug 170229 - MathML: layout is unstable on page zoom
Summary: MathML: layout is unstable on page zoom
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 161126 180029
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-28 22:19 PDT by Minsheng Liu
Modified: 2018-01-13 04:17 PST (History)
5 users (show)

See Also:


Attachments
An example involving stretchy operator. (720 bytes, text/html)
2017-03-28 22:19 PDT, Minsheng Liu
no flags Details
Minimal unstable example (247 bytes, text/html)
2017-03-31 09:35 PDT, Minsheng Liu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Minsheng Liu 2017-03-28 22:19:17 PDT
Created attachment 305707 [details]
An example involving stretchy operator.

In the given attachment, if one scales the webpage (via Command + or trackpad), then scales it back (via Command 0, or just press refresh), the layout of the equation changes. Scaling a page and scaling back should not change rendering results in any event. I am not familiar with WebKit’s structure; hopefully this bug does not imply some deep semantics issue around scaling in general and is specific to MathML only.

The issue exists in Safari 10, TP, and nightly builds. Changing font from default old STIX one shipped with Mac to STIX two does not help.
Comment 1 Frédéric Wang (:fredw) 2017-03-30 01:00:23 PDT
Thanks for the report. IIUC, this happens with stretchy operators (parenthesis here)? Maybe we can narrow down the report and reduce the test case?
Comment 2 Minsheng Liu 2017-03-31 09:35:11 PDT
Created attachment 305974 [details]
Minimal unstable example

This examples involves only a stretchy operator (an triple integral symbol) and a identifier 'x'. It is also unstable on page zoom.
Comment 3 Frédéric Wang (:fredw) 2017-04-03 02:08:46 PDT
Thanks for the reduced test case. I guess the code involved is the same as in bug 170272, so you should be able to debug and narrow down the issues?
Comment 4 Frédéric Wang (:fredw) 2017-11-27 01:22:52 PST
@Minsheng Were you able to work on this? Maybe you could start with bug 180029, which is somewhat simple to test.
Comment 5 Minsheng Liu 2017-11-27 10:11:35 PST
I am interested, but I might have only ten hours or less every week—still a full time student and the final week is approaching. I will take a serious look after we finish the stretchy case.
Comment 6 Minsheng Liu 2018-01-13 04:17:43 PST
It appears that the issue is gone, but I am not sure which patch resolves it. I suspect it is @fred’s previous refactoring of RenderMathMLRow which eliminates some dirty states. I plan to add a test as a part of my new proposal of combining the layout code for RenderMathMLRow, RenderMathMLEnclose, and RenderMathMLRoot.

In any event, note that in the first example, the parentheses are a bit off. Something seems wrong with the vertical stretching.