-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assertion may fail when repainting the RenderView of an SVGImage
https://bugs.webkit.org/show_bug.cgi?id=273803 rdar://127102474 Reviewed by Chris Dumez. Sometimes repainting the RenderView of an SVGImage is associated with changing the SVGImage source. This would delete the SVGImage and all its render tree which includes the repainted RenderView itself. RenderLayer::recursiveUpdateLayerPositions() should not hold a CheckedPtr to the repainted renderer because the renderer might be physically deleted while calling RenderElement::repaintAfterLayoutIfNeeded() which happens before deleting the CheckedPtr itself. The fix is make RenderObject::repaintUsingContainer() take a WeakPtr to the repainted renderer. So this WeakPtr pointer is nullified once it is deleted. It also can be checked before it is referenced. * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::repaintAfterLayoutIfNeeded): * Source/WebCore/rendering/RenderElement.h: * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::recursiveUpdateLayerPositions): * Source/WebCore/rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer const): * Source/WebCore/rendering/RenderObject.h: Canonical link: https://commits.webkit.org/278734@main
- Loading branch information
Showing
5 changed files
with
25 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters