Bug 1734476 - Don't run on compositor when content may contain non-scaling-stroke r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D227400
This commit is contained in:
longsonr
2024-11-07 11:03:46 +00:00
parent 2da64c6ff1
commit e1526d9b0e
12 changed files with 87 additions and 1 deletions

View File

@@ -22,6 +22,7 @@
#include "mozilla/ScrollContainerFrame.h"
#include "mozilla/StaticPrefs_browser.h"
#include "mozilla/StaticPrefs_layout.h"
#include "mozilla/SVGUtils.h"
#include "mozilla/ToString.h"
#include "mozilla/UniquePtr.h"
@@ -6681,6 +6682,14 @@ static bool EstablishesBFC(const nsBlockFrame* aFrame) {
void nsBlockFrame::DidSetComputedStyle(ComputedStyle* aOldStyle) {
nsContainerFrame::DidSetComputedStyle(aOldStyle);
if (IsInSVGTextSubtree() &&
(StyleSVGReset()->HasNonScalingStroke() &&
(!aOldStyle || !aOldStyle->StyleSVGReset()->HasNonScalingStroke()))) {
nsIFrame* textFrame =
nsLayoutUtils::GetClosestFrameOfType(this, LayoutFrameType::SVGText);
MOZ_ASSERT(textFrame, "Expecting to find an SVG text frame");
SVGUtils::UpdateNonScalingStrokeStateBit(textFrame);
}
if (!aOldStyle) {
return;
}