| Summary: | RenderButton should store its text renderer in a RenderPtr. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||
| Component: | Layout and Rendering | Assignee: | 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
Andreas Kling
2013-12-30 12:52:49 PST
Created attachment 220122 [details]
Patch
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. This has already been dealt with by switching over to WeakPtr<RenderTextFragment>. |