Bug 1403259 - TextDrawTarget: fallback on -webrender-text-stroke. r?jrmuizel
MozReview-Commit-ID: 9taTLk0RLQq
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -7257,16 +7257,20 @@ DrawTextRun(const gfxTextRun* aTextRun,
if (NS_GET_A(aParams.textColor) != 0 || textDrawer) {
aParams.context->SetColor(Color::FromABGR(aParams.textColor));
} else {
params.drawMode = DrawMode::GLYPH_STROKE;
}
if ((NS_GET_A(aParams.textStrokeColor) != 0 || textDrawer) &&
aParams.textStrokeWidth != 0.0f) {
+ if (textDrawer) {
+ textDrawer->FoundUnsupportedFeature();
+ return;
+ }
StrokeOptions strokeOpts;
params.drawMode |= DrawMode::GLYPH_STROKE;
params.textStrokeColor = aParams.textStrokeColor;
strokeOpts.mLineWidth = aParams.textStrokeWidth;
params.strokeOpts = &strokeOpts;
aTextRun->Draw(aRange, aTextBaselinePt, params);
} else {
aTextRun->Draw(aRange, aTextBaselinePt, params);