Bug 1696505 - check for reflow properly in SVGObserverUtils try: -b d -p linux64 -u reftest,crashtest,mochitests,web-platform-tests -t none draft bug1696505
authorlongsonr <longsonr@gmail.com>
Sat, 13 Mar 2021 22:24:04 +0000
changeset 3602056 8abfbf6e9b6b33663ba2dbac291b68aa44c3890a
parent 3576733 8d43bd9291a5ff0f2d9c3a204c03fe26826e5d61
child 3706672 9fa5066657aa96f9d76957ad38cac3b10bc5faa4
push id667687
push userlongsonr@gmail.com
push dateSun, 14 Mar 2021 08:52:20 +0000
treeherdertry@8abfbf6e9b6b [default view] [failures only]
bugs1696505
milestone88.0a1
Bug 1696505 - check for reflow properly in SVGObserverUtils try: -b d -p linux64 -u reftest,crashtest,mochitests,web-platform-tests -t none Reviewers: dholbert Tags: #secure-revision Bug #: 1696505 Differential Revision: https://phabricator.services.mozilla.com/D108331
layout/svg/SVGObserverUtils.cpp
layout/svg/crashtests/1696505.html
layout/svg/crashtests/crashtests.list
--- a/layout/svg/SVGObserverUtils.cpp
+++ b/layout/svg/SVGObserverUtils.cpp
@@ -518,23 +518,16 @@ void SVGMarkerObserver::OnRenderingChang
 
   nsIFrame* frame = mFrameReference.Get();
   if (!frame) {
     return;
   }
 
   MOZ_ASSERT(frame->IsFrameOfType(nsIFrame::eSVG), "SVG frame expected");
 
-  // Don't need to request ReflowFrame if we're being reflowed.
-  if (!frame->HasAnyStateBits(NS_FRAME_IN_REFLOW)) {
-    // XXXjwatt: We need to unify SVG into standard reflow so we can just use
-    // nsChangeHint_NeedReflow | nsChangeHint_NeedDirtyReflow here.
-    // XXXSDL KILL THIS!!!
-    SVGUtils::ScheduleReflowSVG(frame);
-  }
   frame->PresContext()->RestyleManager()->PostRestyleEvent(
       frame->GetContent()->AsElement(), RestyleHint{0},
       nsChangeHint_RepaintFrame);
 }
 
 class SVGPaintingProperty : public SVGRenderingObserverProperty {
  public:
   SVGPaintingProperty(URLAndReferrerInfo* aURI, nsIFrame* aFrame,
new file mode 100644
--- /dev/null
+++ b/layout/svg/crashtests/1696505.html
@@ -0,0 +1,9 @@
+<script>
+document.addEventListener("DOMContentLoaded", () => {
+    document.getElementById('a').style.cssText += "grid-row-end:auto"
+})
+</script>
+<svg>
+<polyline marker-mid='url(#a)'/>
+<marker id='a'>
+<text/>
--- a/layout/svg/crashtests/crashtests.list
+++ b/layout/svg/crashtests/crashtests.list
@@ -233,8 +233,9 @@ load invalidation-of-opacity-0.html
 load 1563779.html
 load 1600855.html
 load 1601824.html
 load 1605223-1.html
 load 1609663.html
 load 1671950.html
 load 1678947.html
 load 1693032.html
+load 1696505.html