Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r183538 - Fix crash in WebCore::LogicalSelectionOffsetCaches::C…
…ontainingBlockInfo::setBlock(). https://bugs.webkit.org/show_bug.cgi?id=140261 Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-04-29 Reviewed by Darin Adler. Source/WebCore: We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it. * rendering/RenderView.cpp: (WebCore::isValidObjectForNewSelection): (WebCore::RenderView::clearSubtreeSelection): (WebCore::RenderView::applySubtreeSelection): LayoutTests: * editing/execCommand/crash-140261-expected.txt: Added. * editing/execCommand/crash-140261.html: Added.
- Loading branch information
1 parent
96fc6f6
commit 43cd0f2
Showing
5 changed files
with
57 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
Test for crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock() | ||
|
||
This test passes if it doesn't crash. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html contenteditable> | ||
<body> | ||
<div></div> | ||
<abbr> | ||
<label> | ||
<textarea></textarea> | ||
</label> | ||
<embed></embed> | ||
</abbr> | ||
</body> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
|
||
document.execCommand("selectall", false, null); | ||
document.execCommand("insertorderedlist", false, null); | ||
document.write("<p>Test for crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock()</p>"); | ||
document.write("<p>This test passes if it doesn't crash.</p>"); | ||
</script> | ||
</html> |
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