Bug 1072758 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The cause is here: https://dxr.mozilla.org/mozilla-central/source/layout/svg/SVGTextFrame.cpp#2980

For a non-display element like mask, we rely on the the DidSetComputedStyle() hook to notify the closest ancestor that is not a non-display to schedule a reflow. This works for normal style change, but doesn't work when the style changes to "display:none". Because then the frame is gone and won't receive a SetComputedStyle from RestyleManager, thus DidSetComputedStyle won't be called.

So we will miss the opportunity to schedule a reflow when the style changes to "display:none", leaving the anon block dirty.

Do you know how to hook the style change to "display:none"? If such a hook exists, we can easily fix this bug by calling ScheduleReflowSVGNonDisplayText there.
The cause is here: https://dxr.mozilla.org/mozilla-central/source/layout/generic/nsFrame.cpp#1062

For a non-display element like mask, we rely on the the DidSetComputedStyle() hook to notify the closest ancestor that is not a non-display to schedule a reflow. This works for normal style change, but doesn't work when the style changes to "display:none". Because then the frame is gone and won't receive a SetComputedStyle from RestyleManager, thus DidSetComputedStyle won't be called.

So we will miss the opportunity to schedule a reflow when the style changes to "display:none", leaving the anon block dirty.

Do you know how to hook the style change to "display:none"? If such a hook exists, we can easily fix this bug by calling ScheduleReflowSVGNonDisplayText there.

Back to Bug 1072758 Comment 2