forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not update selection rect on dirty lineboxes.
https://bugs.webkit.org/show_bug.cgi?id=163862 <rdar://problem/28813156> Reviewed by Simon Fraser. Source/WebCore: In certain cases RenderBlock::updateFirstLetter() triggers unwanted render tree mutation while the caller assumes intact renderers. This patch ensures that no renderers gets destroyed while computing the preferred widths when we are outside of layout context. Test: fast/css-generated-content/dynamic-first-letter-selection-clear-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computePreferredLogicalWidths): (WebCore::RenderBlock::updateFirstLetter): * rendering/RenderBlock.h: * rendering/RenderListItem.cpp: (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::updateFirstLetter): * rendering/RenderRubyRun.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::updateFirstLetter): * rendering/RenderTable.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::updateFirstLetter): * rendering/svg/RenderSVGText.h: LayoutTests: * fast/css-generated-content/dynamic-first-letter-selection-clear-crash-expected.txt: Added. * fast/css-generated-content/dynamic-first-letter-selection-clear-crash.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@207804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
102bf8e
commit 6fe0acd
Showing
13 changed files
with
91 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
2016-10-24 Zalan Bujtas <[email protected]> | ||
|
||
Do not update selection rect on dirty lineboxes. | ||
https://bugs.webkit.org/show_bug.cgi?id=163862 | ||
<rdar://problem/28813156> | ||
|
||
Reviewed by Simon Fraser. | ||
|
||
* fast/css-generated-content/dynamic-first-letter-selection-clear-crash-expected.txt: Added. | ||
* fast/css-generated-content/dynamic-first-letter-selection-clear-crash.html: Added. | ||
|
||
2016-10-24 Ryan Haddad <[email protected]> | ||
|
||
Unreviewed, rolling out r207795. | ||
|
2 changes: 2 additions & 0 deletions
2
...tTests/fast/css-generated-content/dynamic-first-letter-selection-clear-crash-expected.txt
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,2 @@ | ||
Pass if | ||
no crash. |
32 changes: 32 additions & 0 deletions
32
LayoutTests/fast/css-generated-content/dynamic-first-letter-selection-clear-crash.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that we can clear selection properly on dynamic content with first letter.</title> | ||
<style> | ||
.floatClass::first-letter { | ||
float: right; | ||
} | ||
|
||
#innerBody { | ||
column-count: 2; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<li id=li style="float: right;">Pass if<span style="float: right;"></span></li><body id=innerBody style="height: 100px"><span id=span style="display: none;"></span>no crash.</body> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
innerBody.style.webkitWritingMode = "vertical-rl"; | ||
innerBody.className = "floatClass"; | ||
|
||
document.getSelection().setBaseAndExtent(span, 0, innerBody, innerBody.childNodes.length); | ||
window.getSelection().modify("extend", "left", "documentboundary"); | ||
innerBody.scrollIntoViewIfNeeded(true); | ||
li.style.cssText = "float: right; height: 40px; width: 40px;"; | ||
document.body.offsetHeight; | ||
li.style.cssText = ""; | ||
</script> | ||
</body> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
2016-10-24 Zalan Bujtas <[email protected]> | ||
|
||
Do not update selection rect on dirty lineboxes. | ||
https://bugs.webkit.org/show_bug.cgi?id=163862 | ||
<rdar://problem/28813156> | ||
|
||
Reviewed by Simon Fraser. | ||
|
||
In certain cases RenderBlock::updateFirstLetter() triggers | ||
unwanted render tree mutation while the caller assumes intact renderers. | ||
This patch ensures that no renderers gets destroyed while computing the preferred widths | ||
when we are outside of layout context. | ||
|
||
Test: fast/css-generated-content/dynamic-first-letter-selection-clear-crash.html | ||
|
||
* rendering/RenderBlock.cpp: | ||
(WebCore::RenderBlock::computePreferredLogicalWidths): | ||
(WebCore::RenderBlock::updateFirstLetter): | ||
* rendering/RenderBlock.h: | ||
* rendering/RenderListItem.cpp: | ||
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded): | ||
* rendering/RenderRubyRun.cpp: | ||
(WebCore::RenderRubyRun::updateFirstLetter): | ||
* rendering/RenderRubyRun.h: | ||
* rendering/RenderTable.cpp: | ||
(WebCore::RenderTable::updateFirstLetter): | ||
* rendering/RenderTable.h: | ||
* rendering/svg/RenderSVGText.cpp: | ||
(WebCore::RenderSVGText::updateFirstLetter): | ||
* rendering/svg/RenderSVGText.h: | ||
|
||
2016-10-24 Ryan Haddad <[email protected]> | ||
|
||
Unreviewed, rolling out r207795. | ||
|
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
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