author | Markus Stange <mstange@themasta.com> |
Wed, 23 Apr 2014 11:48:07 +0200 | |
changeset 179750 | 8d27ef04d88df0f289576441e2b8fdb759bffe13 |
parent 179749 | f5bd85e791c3f9d61e4da19de4a831f30cbe7c55 |
child 179751 | 90c23195ebb3c965b570fd736f058bb025f72d7e |
push id | 26639 |
push user | ryanvm@gmail.com |
push date | Wed, 23 Apr 2014 20:42:51 +0000 |
treeherder | mozilla-central@ed0236a51ed3 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | roc |
bugs | 997735 |
milestone | 31.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/svg/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/nsSVGForeignObjectFrame.cpp @@ -377,16 +377,22 @@ nsSVGForeignObjectFrame::ReflowSVG() if (mState & NS_FRAME_FIRST_REFLOW) { // Make sure we have our filter property (if any) before calling // FinishAndStoreOverflow (subsequent filter changes are handled off // nsChangeHint_UpdateEffects): nsSVGEffects::UpdateEffects(this); } + // If we have a filter, we need to invalidate ourselves because filter + // output can change even if none of our descendants need repainting. + if (StyleSVGReset()->HasFilters()) { + InvalidateFrame(); + } + // TODO: once we support |overflow:visible| on foreignObject, then we will // need to take account of our descendants here. nsRect overflow = nsRect(nsPoint(0,0), mRect.Size()); nsOverflowAreas overflowAreas(overflow, overflow); FinishAndStoreOverflow(overflowAreas, mRect.Size()); // Now unset the various reflow bits: mState &= ~(NS_FRAME_FIRST_REFLOW | NS_FRAME_IS_DIRTY |
--- a/layout/svg/nsSVGInnerSVGFrame.cpp +++ b/layout/svg/nsSVGInnerSVGFrame.cpp @@ -97,16 +97,23 @@ nsSVGInnerSVGFrame::ReflowSVG() // mRect must be set before FinishAndStoreOverflow is called in order // for our overflow areas to be clipped correctly. float x, y, width, height; static_cast<SVGSVGElement*>(mContent)-> GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); mRect = nsLayoutUtils::RoundGfxRectToAppRect( gfxRect(x, y, width, height), PresContext()->AppUnitsPerCSSPixel()); + + // If we have a filter, we need to invalidate ourselves because filter + // output can change even if none of our descendants need repainting. + if (StyleSVGReset()->HasFilters()) { + InvalidateFrame(); + } + nsSVGInnerSVGFrameBase::ReflowSVG(); } void nsSVGInnerSVGFrame::NotifySVGChanged(uint32_t aFlags) { NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED), "Invalidation logic may need adjusting");
--- a/layout/svg/nsSVGUseFrame.cpp +++ b/layout/svg/nsSVGUseFrame.cpp @@ -182,16 +182,23 @@ nsSVGUseFrame::ReflowSVG() // handled by the nsSVGOuterSVGFrame for the anonymous <svg> that will be // created for that purpose. float x, y; static_cast<SVGUseElement*>(mContent)-> GetAnimatedLengthValues(&x, &y, nullptr); mRect.MoveTo(nsLayoutUtils::RoundGfxRectToAppRect( gfxRect(x, y, 0.0, 0.0), PresContext()->AppUnitsPerCSSPixel()).TopLeft()); + + // If we have a filter, we need to invalidate ourselves because filter + // output can change even if none of our descendants need repainting. + if (StyleSVGReset()->HasFilters()) { + InvalidateFrame(); + } + nsSVGUseFrameBase::ReflowSVG(); } void nsSVGUseFrame::NotifySVGChanged(uint32_t aFlags) { if (aFlags & COORD_CONTEXT_CHANGED && !(aFlags & TRANSFORM_CHANGED)) {