Bug 809328 - Stop using nsChangeHint_UpdateEffects in nsSVGRenderingObserver::DoUpdate overrides. r=roc.

--HG--
extra : rebase_source : 79d032ea6ad6275882ab675004d2e02b932d56d5
This commit is contained in:
Jonathan Watt 2012-11-07 13:54:55 +00:00
parent d974f62ce4
commit 1a92bc6ab1
3 changed files with 21 additions and 11 deletions

View File

@ -43,13 +43,12 @@ enum nsChangeHint {
nsChangeHint_UpdateCursor = 0x40,
/**
* SVG filter/mask/clip effects need to be recomputed because the URI
* in the filter/mask/clip-path property has changed. This wipes
* out cached nsSVGPropertyBase and subclasses which hold a reference to
* the element referenced by the URI, and a mutation observer for
* the DOM subtree rooted at that element. Also, for filters they store a
* bounding-box for the filter result so that if the filter changes we can
* invalidate the old covered area.
* Used when the computed value (a URI) of one or more of an element's
* filter/mask/clip/etc CSS properties changes, causing the element's frame
* to start/stop referencing (or reference different) SVG resource elements.
* (_Not_ used to handle changes to referenced resource elements.) Using this
* hint results in nsSVGEffects::UpdateEffects being called on the element's
* frame.
*/
nsChangeHint_UpdateEffects = 0x80,

View File

@ -253,7 +253,7 @@ nsSVGFilterProperty::DoUpdate()
// Repaint asynchronously in case the filter frame is being torn down
nsChangeHint changeHint =
nsChangeHint(nsChangeHint_RepaintFrame | nsChangeHint_UpdateEffects);
nsChangeHint(nsChangeHint_RepaintFrame);
// Don't need to request UpdateOverflow if we're being reflowed.
if (!(mFrame->GetStateBits() & NS_FRAME_IN_REFLOW)) {
@ -274,7 +274,7 @@ nsSVGMarkerProperty::DoUpdate()
// Repaint asynchronously in case the marker frame is being torn down
nsChangeHint changeHint =
nsChangeHint(nsChangeHint_RepaintFrame | nsChangeHint_UpdateEffects);
nsChangeHint(nsChangeHint_RepaintFrame);
// Don't need to request ReflowFrame if we're being reflowed.
if (!(mFrame->GetStateBits() & NS_FRAME_IN_REFLOW)) {

View File

@ -338,11 +338,22 @@ public:
* @param aFrame should be the first continuation
*/
static EffectProperties GetEffectProperties(nsIFrame *aFrame);
/**
* Called by nsCSSFrameConstructor when style changes require the
* effect properties on aFrame to be updated
* Called when changes to an element (e.g. CSS property changes) cause its
* frame to start/stop referencing (or reference different) SVG resource
* elements. (_Not_ called for changes to referenced resource elements.)
*
* This function handles such changes by discarding _all_ the frame's SVG
* effects frame properties (causing those properties to stop watching their
* target element). It also synchronously (re)creates the filter and marker
* frame properties (XXX why not the other properties?), which makes it
* useful for initializing those properties during first reflow.
*
* XXX rename to something more meaningful like RefreshResourceReferences?
*/
static void UpdateEffects(nsIFrame *aFrame);
/**
* @param aFrame should be the first continuation
*/