Closed Bug 1325038 Opened 8 years ago Closed 8 years ago

Hit NS_ASSERTION in PreEffectsVisualOverflowCollector::GetPreEffectsVisualOverflowRect

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: u459114, Assigned: u459114)

References

Details

Attachments

(2 files)

1. Visit https://jsfiddle.net/u7v4waq2/1/ 2. Hover text that says "Wrapped sentence" static nsRect GetPreEffectsVisualOverflowRect(nsIFrame* aFrame) { //... NS_ASSERTION(aFrame->GetParent()->StyleContext()->GetPseudo() == nsCSSAnonBoxes::mozAnonymousBlock, "How did we getting here, then?"); } Actual results: the first assertion in GetPreEffectsVisualOverflowRect failed. Expect results: No assertion failed.
See Also: → 1324809
We won't see this assertion by by replace filter by mask, this is because this if statement: https://hg.mozilla.org/mozilla-central/file/39ca4e6d2eb2/layout/svg/nsSVGIntegrationUtils.cpp#l279
Attachment #8825424 - Flags: review?(cam)
Attachment #8825425 - Flags: review?(cam)
Comment on attachment 8825424 [details] Bug 1325038 - Part 1. Correct assertion logic. https://reviewboard.mozilla.org/r/103590/#review104450 ::: layout/svg/nsSVGIntegrationUtils.cpp:113 (Diff revision 1) > // With image masks, there is one more exception. > // Can you adjust this to say there are two exceptions. ::: layout/svg/nsSVGIntegrationUtils.cpp:121 (Diff revision 1) > + // Bug 1325038 show us another exception. For continuation siblings, > + // except the first one, you can not guarantee each of them carry > + // a PreEffectsBBoxProperty property. Nit: no need to mention the bug number here. (Usually we leave bug numbers in the source for bugs which are still open and need to be fixed.) Someone interested can see which bug we added this comment from by looking at the blame. ::: layout/svg/nsSVGIntegrationUtils.cpp:124 (Diff revision 1) > + DebugOnly<nsIFrame*> firstFrame = > + nsLayoutUtils::FirstContinuationOrIBSplitSibling(aFrame); Using DebugOnly<> like this won't avoid FirstContinuationOrIBSplitSibling from being called in non-DEBUG builds. So, put this in an #ifdef DEBUG block and drop the DebugOnly<>. Or: make the assertion just call nsLayoutUtils::IsFirstContinuationOrIBSplitSibling directly.
Attachment #8825424 - Flags: review?(cam) → review+
Comment on attachment 8825425 [details] Bug 1325038 - Part 2. Reftest for bug 1324809. https://reviewboard.mozilla.org/r/103592/#review104452 ::: layout/reftests/svg/filter-on-continuation-box-01.html:17 (Diff revision 2) > + document.getElementById("myspan").style.filter = "opacity(100%)"; > + document.documentElement.classList.remove("reftest-wait"); Is it worth making the test cause a change in appearance, e.g. use opacity(50%) and set |opacity: 0.5| in the reference? Otherwise, we could just make this a crashtest.
Attachment #8825425 - Flags: review?(cam) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: