Overflow of formulas is hidden for display mathematics
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jan 2018 06:35:57 +0000 (06:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jan 2018 06:35:57 +0000 (06:35 +0000)
commit4b2dd210c02ffb3e7a0b18d8f22597c0920f934a
treec2f92867dbddfe768b218a6d604fb9c80e0fbb24
parent268d7686650a3a16169f477c85e385ab43ccecab
Overflow of formulas is hidden for display mathematics
https://bugs.webkit.org/show_bug.cgi?id=160547

Patch by Minsheng Liu <lambda@liu.ms> on 2018-01-28
Reviewed by Frédéric Wang.

Source/WebCore:

Previously, <math> with display="block" uses its container's logical width as logical width.
However, that behavior will truncate overflowed contents. The patch fixes it by setting
the logical width as its content width rather than its container's logical width
if the former is wider than the latter.

Test: mathml/presentation/display-math-horizontal-overflow.html

* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layoutBlock):

LayoutTests:

Add a test to ensure <math> with display="block" will not truncate overflowed contents.

* mathml/presentation/display-math-horizontal-overflow-expected.txt: Added.
* mathml/presentation/display-math-horizontal-overflow.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/mathml/presentation/math-inline-display-width-expected.txt [new file with mode: 0644]
LayoutTests/mathml/presentation/math-inline-display-width.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/mathml/RenderMathMLMath.cpp
Source/WebCore/rendering/mathml/RenderMathMLMath.h
Source/WebCore/rendering/mathml/RenderMathMLRow.cpp