Title: [282548] releases/WebKitGTK/webkit-2.32/Source/WebCore
- Revision
- 282548
- Author
- [email protected]
- Date
- 2021-09-16 04:12:46 -0700 (Thu, 16 Sep 2021)
Log Message
Merge r279792 - SVGInlineTextBox::acquirePaintingResource() should return false if the resource can't be applied
https://bugs.webkit.org/show_bug.cgi?id=227826
<rdar://79662757>
Reviewed by Simon Fraser.
Ensure RenderSVGResource::postApplyResource() is called only if the
corresponding RenderSVGResource::applyResource() succeeds. Otherwise
the GraphicsContext stack state will be unbalanced.
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::acquirePaintingResource):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (282547 => 282548)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog 2021-09-16 11:03:55 UTC (rev 282547)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog 2021-09-16 11:12:46 UTC (rev 282548)
@@ -1,3 +1,18 @@
+2021-07-09 Said Abou-Hallawa <[email protected]>
+
+ SVGInlineTextBox::acquirePaintingResource() should return false if the resource can't be applied
+ https://bugs.webkit.org/show_bug.cgi?id=227826
+ <rdar://79662757>
+
+ Reviewed by Simon Fraser.
+
+ Ensure RenderSVGResource::postApplyResource() is called only if the
+ corresponding RenderSVGResource::applyResource() succeeds. Otherwise
+ the GraphicsContext stack state will be unbalanced.
+
+ * rendering/svg/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::acquirePaintingResource):
+
2021-07-07 Ryosuke Niwa <[email protected]>
Deploy smart pointers in DOMWindow
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (282547 => 282548)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2021-09-16 11:03:55 UTC (rev 282547)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2021-09-16 11:12:46 UTC (rev 282548)
@@ -353,12 +353,18 @@
return false;
if (!m_paintingResource->applyResource(renderer, style, context, paintingResourceMode())) {
- if (fallbackColor.isValid()) {
- RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::sharedSolidPaintingResource();
- fallbackResource->setColor(fallbackColor);
+ if (!fallbackColor.isValid()) {
+ m_paintingResource = nullptr;
+ return false;
+ }
+
+ RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::sharedSolidPaintingResource();
+ fallbackResource->setColor(fallbackColor);
- m_paintingResource = fallbackResource;
- m_paintingResource->applyResource(renderer, style, context, paintingResourceMode());
+ m_paintingResource = fallbackResource;
+ if (!m_paintingResource->applyResource(renderer, style, context, paintingResourceMode())) {
+ m_paintingResource = nullptr;
+ return false;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes