Edit Invalidation: User:SOFTowaha

Jump to navigation Jump to search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

Warning: This page already exists, but it does not use this form.

The Invalidation Problem[edit]

Gecko:Invalidation_Handling describes some rules about what should be invalidated, and when. This page is about a separate problem: *how* to implement invalidation, when views have been removed.

  • Invalidation must be fast, because we sometimes invalidate a lot.
  • We'd like to accumulate invalidation in regions, not just take the bounding rect of everything.
  • We need to handle cases like foreignObject where the area to be invalidated must be transformed in interesting ways.

Current Status[edit]

  • nsIFrame::Invalidate calls nsIFrame::InvalidateInternal, which is virtual
  • the standard nsIFrame implementation just computes the offset from this frame to its parent, adds it to rect (or region/offset pair), and calls its parent
  • nsHTML/XULScrollFrame::InvalidateInternal clips the invalidation before they pass it up
  • nsSVGForeignObjectFrame transforms the invalidation and pass it through the SVG invalidation mechanism
  • Invalidation goes all the way up to the root frame of the root document, where we invalidate widgets. Eventually there will only be one top-level widget to invalidate.

That's nice and simple, and it doesn't seem to be a problem for performance at the moment, with invalidation batching in place.



Cancel