Closed Bug 488702 Opened 15 years ago Closed 3 years ago

Invalidation of containers is broken if the container or a descendant is filtered

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: jwatt, Assigned: longsonr)

Details

(Keywords: testcase)

Attachments

(4 files)

When we invalidate a container frame, we are not taking account of filters or the container or its children. I noticed the latter from looking at the code, and discovered the former from testing.
The reason that filters on children of a changed container are not taken into account during invalidation is that nsSVGOuterSVGFrame::UpdateAndInvalidateCoveredRegion calls GetCoveredRegion on the container, which does not take account of filters, and then calls FindFilterInvalidation, which only takes account of filters on the container (supposedly) and its descendants.

I'm not sure yet why a filter on the changed container itself is not taken into account. FindFilterInvalidation *should* be taking it into account, but an initial walkthrough in the debugger while running the first testcase shows that GetPropertyInternal isn't finding the filter property.

  nsPropertyTable::GetPropertyInternal
  nsPropertyTable::GetProperty
  nsIFrame::GetProperty
  nsSVGEffects::GetFilterProperty
  nsSVGEffects::GetFilterFrame
  nsSVGUtils::FindFilterInvalidation
  nsSVGOuterSVGFrame::UpdateAndInvalidateCoveredRegion
  DoApplyRenderingChangeToTree
  ApplyRenderingChangeToTree
  nsCSSFrameConstructor::ProcessRestyledFrames
  nsCSSFrameConstructor::RestyleElement
  nsCSSFrameConstructor::ProcessOneRestyle
  nsCSSFrameConstructor::ProcessPendingRestyles
  PresShell::DoFlushPendingNotifications
  PresShell::FlushPendingNotifications
  nsCSSFrameConstructor::RestyleEvent::Run
Does this work for you now? I think bug 536677 may have improved things.
Strangely it works if the mouse is in the content window when the invalidation occurs, but not if the mouse is outside it.
This is fixed for real by bug 738192, but I'll leave this open for now until I can get round to landing the tests.
Assignee: jwatt → nobody
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c0a915fbd132
Add tests for dynamic filter invalidation r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: