Bug 126302

Summary: RenderButton should store its text renderer in a RenderPtr.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: RESOLVED INVALID    
Severity: Normal CC: ahmad.saleem792, commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Andreas Kling
Reported 2013-12-30 12:52:49 PST
RenderButton should store its text renderer in a RenderPtr.
Attachments
Patch (2.24 KB, patch)
2013-12-30 12:54 PST, Andreas Kling
no flags
Andreas Kling
Comment 1 2013-12-30 12:54:02 PST
Ahmad Saleem
Comment 2 2023-05-09 12:07:28 PDT
https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderButton.cpp#101 _____ void RenderButton::setText(const String& str) { if (!m_buttonText && str.isEmpty()) return; if (!m_buttonText) { auto newButtonText = createRenderer<RenderTextFragment>(document(), str); m_buttonText = *newButtonText; // FIXME: This mutation should go through the normal RenderTreeBuilder path. if (RenderTreeBuilder::current()) RenderTreeBuilder::current()->attach(*this, WTFMove(newButtonText)); else RenderTreeBuilder(*document().renderView()).attach(*this, WTFMove(newButtonText)); return; } if (!str.isEmpty()) { m_buttonText->setText(str.impl()); return; } if (RenderTreeBuilder::current()) RenderTreeBuilder::current()->destroy(*m_buttonText); else RenderTreeBuilder(*document().renderView()).destroy(*m_buttonText); } _______ The obsolete patch was modify this above function.
alan
Comment 3 2023-05-10 07:32:22 PDT
This has already been dealt with by switching over to WeakPtr<RenderTextFragment>.
Note You need to log in before you can comment on or make changes to this bug.