Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
REGRESSION (r193857): Text selection causes text to disappear.
https://bugs.webkit.org/show_bug.cgi?id=156448 rdar://problem/25578952 Reviewed by Simon Fraser. Apparently when the end position of the selection range is smaller than the start position, we need to repaint the entire text as it indicates selection clearing. Source/WebCore: Test: fast/text/text-disappear-on-deselect.html * rendering/TextPainter.cpp: (WebCore::TextPainter::paintText): LayoutTests: * fast/text/text-disappear-on-deselect-expected.html: Added. * fast/text/text-disappear-on-deselect.html: Added. Canonical link: https://commits.webkit.org/174563@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
6 changed files
with
87 additions
and
4 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
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that deselecting text over multiple lines does not make the text disappear.</title> | ||
<style> | ||
div { | ||
font-family: Ahem; | ||
font-size: 10px; | ||
} | ||
|
||
.red { | ||
color: red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div><span class=red>foobar</span><br> | ||
<span class=red>f</span>oobar foobar</div> | ||
</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
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that deselecting text over multiple lines does not make the text disappear.</title> | ||
<style> | ||
div { | ||
font-family: Ahem; | ||
font-size: 10px; | ||
} | ||
|
||
::selection { | ||
color: red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id=foobar>foobar<br> | ||
foobar foobar</div> | ||
<script> | ||
var target = document.getElementById("foobar"); | ||
if (window.eventSender) { | ||
window.eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop); | ||
window.eventSender.mouseDown(); | ||
window.eventSender.mouseMoveTo(target.offsetLeft + 10, target.offsetTop + target.offsetHeight + 15); | ||
window.eventSender.mouseMoveTo(target.offsetLeft + 10, target.offsetTop + target.offsetHeight - 5); | ||
window.eventSender.mouseUp(); | ||
} | ||
</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
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