Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 272448.251@safari-7618-branch (9baf717). https://bugs.web…
…kit.org/show_bug.cgi?id=267297 "NULL Object : Crash under WebCore::RenderObject::~RenderObject; WebCore::RenderText::~RenderText; WebCore::RenderTreeBuilder::destroy" https://bugs.webkit.org/show_bug.cgi?id=267297 rdar://119186861. Reviewed by Alan Baradlay. Document::caretPositionFromPoint API is using CheckPtr to get RenderObject even though the Object is already destroyed. In order to make sure CheckedPtr is valid the render needs to be destroyed earlier not after. Using updateLayoutIgnorePendingStylesheets API for uptodate renderer tree. * LayoutTests/dom/html/document-renderobject-null-crash-expected.txt: Added test expected file. * LayoutTests/dom/html/document-renderobject-null-crash.html: Added test case. * Source/WebCore/dom/Document.cpp: (WebCore::Document::caretPositionFromPoint): Added updateLayoutIgnorePendingStylesheets to get updated renderer tree before using CheckedPtr. Canonical link: https://commits.webkit.org/272448.251@safari-7618-branch Canonical link: https://commits.webkit.org/266719.396@webkitglib/2.42
- Loading branch information