Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MathML element in "display: flex" is not repainted on content change.
https://bugs.webkit.org/show_bug.cgi?id=254722 Reviewed by Antti Koivisto. 1. RenderMathMLBlock::layoutItems -> this is similar to what other FCs do on first layout (i.e. full repaint) -see RenderFlexibleBox::layoutAndPlaceChildren, RenderBlockflow::layoutBlockChild. 2. RenderMathMLMath::centerChildren/layoutRowItems -> introduce some generic repaint logic when things get moved around. * LayoutTests/fast/repaint/mathm-gains-new-content-blank-expected.txt: Added. * LayoutTests/fast/repaint/mathm-gains-new-content-blank.html: Added. * Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::layoutItems): Canonical link: https://commits.webkit.org/262674@main
- Loading branch information
1 parent
ac46799
commit 63e18b5
Showing
5 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
LayoutTests/fast/repaint/mathm-gains-new-content-blank-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
PASS if | ||
this is visible. | ||
(repaint rects | ||
(rect 470 24 320 20) | ||
(rect 470 24 320 20) | ||
(rect 8 8 462 20) | ||
(rect 148 8 642 36) | ||
(rect 8 8 302 20) | ||
(rect 148 8 482 20) | ||
) | ||
|
38 changes: 38 additions & 0 deletions
38
LayoutTests/fast/repaint/mathm-gains-new-content-blank.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<style> | ||
math { | ||
font-family: Ahem; | ||
font-size: 20px; | ||
} | ||
</style> | ||
<!-- This is a bit flaky, but repros in Safari after a few attempts --> | ||
<math style="display: block" xmlns="http://www.w3.org/1998/Math/MathML"> | ||
<mn>PASS if</mn> | ||
<mn id=change_this></mn> | ||
</math> | ||
<pre id=repaints></pre> | ||
<script src="../../resources/ui-helper.js"></script> | ||
<script> | ||
if (window.testRunner) { | ||
testRunner.dumpAsText(); | ||
testRunner.waitUntilDone(); | ||
} | ||
async function runTest() { | ||
|
||
if (window.internals) | ||
internals.startTrackingRepaints(); | ||
|
||
change_this.textContent = 'this is visible.'; | ||
|
||
await UIHelper.renderingUpdate(); | ||
|
||
if (window.internals) { | ||
repaints.innerHTML = window.internals.repaintRectsAsText(); | ||
internals.stopTrackingRepaints(); | ||
} | ||
|
||
if (window.testRunner) | ||
testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener('load', runTest); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters