Bug 196123 - With async scrolling enabled, this MathML test asserts
Summary: With async scrolling enabled, this MathML test asserts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-21 18:04 PDT by Simon Fraser (smfr)
Modified: 2019-04-24 10:19 PDT (History)
7 users (show)

See Also:


Attachments
Testcase (459 bytes, text/html)
2019-03-21 18:04 PDT, Simon Fraser (smfr)
no flags Details
Another testcase (232 bytes, text/html)
2019-03-26 03:18 PDT, Frédéric Wang (:fredw)
no flags Details
Patch (13.27 KB, patch)
2019-03-26 08:00 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Patch (13.26 KB, patch)
2019-04-24 09:12 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-03-21 18:04:16 PDT
Created attachment 365660 [details]
Testcase

Test triggers an assertion which only happens with an "mn" element when overflow: -webkit-paged-y is applied:

ASSERTION FAILED: !m_scrollDimensionsDirty
./rendering/RenderLayer.cpp(3439) : bool WebCore::RenderLayer::hasHorizontalOverflow() const
1   0x13cb83fc9 WTFCrash
2   0x1411f497b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x144524d53 WebCore::RenderLayer::hasHorizontalOverflow() const
4   0x14451d6a9 WebCore::RenderLayer::hasScrollableHorizontalOverflow() const
5   0x14451d656 WebCore::RenderLayer::hasCompositedScrollableOverflow() const
6   0x144558e0f WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling(WebCore::RenderLayer const&, WebCore::RenderLayerCompositor::RequiresCompositingData&) const
7   0x1445533f2 WebCore::RenderLayerCompositor::requiresCompositingLayer(WebCore::RenderLayer const&, WebCore::RenderLayerCompositor::RequiresCompositingData&) const
8   0x1445526ba WebCore::RenderLayerCompositor::needsToBeComposited(WebCore::RenderLayer const&, WebCore::RenderLayerCompositor::RequiresCompositingData&) const
9   0x144550440 WebCore::RenderLayerCompositor::computeCompositingRequirements(WebCore::RenderLayer*, WebCore::RenderLayer&, WebCore::RenderLayerCompositor::OverlapMap&, WebCore::RenderLayerCompositor::CompositingState&, bool&)
10  0x144550835 WebCore::RenderLayerCompositor::computeCompositingRequirements(WebCore::RenderLayer*, WebCore::RenderLayer&, WebCore::RenderLayerCompositor::OverlapMap&, WebCore::RenderLayerCompositor::CompositingState&, bool&)
11  0x1445508db WebCore::RenderLayerCompositor::computeCompositingRequirements(WebCore::RenderLayer*, WebCore::RenderLayer&, WebCore::RenderLayerCompositor::OverlapMap&, WebCore::RenderLayerCompositor::CompositingState&, bool&)
12  0x144520bc7 WebCore::RenderLayerCompositor::updateCompositingLayers(WebCore::CompositingUpdateType, WebCore::RenderLayer*)
13  0x143d4a6d3 WebCore::FrameView::updateCompositingLayersAfterLayout()
14  0x143d4ce07 WebCore::FrameView::didLayout(WTF::WeakPtr<WebCore::RenderElement>)
15  0x143d86cb0 WebCore::FrameViewLayoutContext::layout()
16  0x143297094 WebCore::Document::implicitClose()
17  0x143b78ccb WebCore::FrameLoader::checkCallImplicitClose()
18  0x143b787a8 WebCore::FrameLoader::checkCompleted()
19  0x143b76b65 WebCore::FrameLoader::finishedParsing()
20  0x1432af60c WebCore::Document::finishedParsing()
21  0x1438513d8 WebCore::HTMLConstructionSite::finishedParsing()
22  0x143896285 WebCore::HTMLTreeBuilder::finished()
23  0x143858728 WebCore::HTMLDocumentParser::end()
24  0x143856668 WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd()
25  0x143856384 WebCore::HTMLDocumentParser::prepareToStopParsing()
26  0x14385878f WebCore::HTMLDocumentParser::attemptToEnd()
27  0x143858864 WebCore::HTMLDocumentParser::finish()
28  0x143b24eba WebCore::DocumentWriter::end()
29  0x143b23ddf WebCore::DocumentLoader::finishedLoading()
30  0x143b23a1d WebCore::DocumentLoader::notifyFinished(WebCore::CachedResource&)
31  0x143c6e78f WebCore::CachedResource::checkNotify()
Comment 1 Radar WebKit Bug Importer 2019-03-21 18:11:18 PDT
<rdar://problem/49133917>
Comment 2 Frédéric Wang (:fredw) 2019-03-26 03:18:21 PDT
Created attachment 365955 [details]
Another testcase

Same as attachment 365660 [details] without using dynamic stuff or -webkit prefixed property.
Comment 3 Frédéric Wang (:fredw) 2019-03-26 03:30:51 PDT
Just took a quick look now, it seems enough to call updateScrollInfoAfterLayout() in layoutBlock like what is done in RenderBlock::simplifiedLayout().

diff --git a/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp b/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
index 8e356b6b696..e9b1118e956 100644
--- a/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
+++ b/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
@@ -252,6 +252,8 @@ void RenderMathMLBlock::layoutBlock(bool relayoutChildren, LayoutUnit)
 
     repainter.repaintAfterLayout();
 
+    updateScrollInfoAfterLayout();
+
     clearNeedsLayout();
 }
 
However, we need to do that in all implementations and add test for each case. Would be similar to bug 178865 I guess.
Comment 4 Frédéric Wang (:fredw) 2019-03-26 08:00:34 PDT
Created attachment 365965 [details]
Patch
Comment 5 Frédéric Wang (:fredw) 2019-04-24 09:12:14 PDT
Created attachment 368130 [details]
Patch
Comment 6 WebKit Commit Bot 2019-04-24 10:19:24 PDT
Comment on attachment 368130 [details]
Patch

Clearing flags on attachment: 368130

Committed r244595: <https://trac.webkit.org/changeset/244595>
Comment 7 WebKit Commit Bot 2019-04-24 10:19:25 PDT
All reviewed patches have been landed.  Closing bug.