Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r222539 - Fall back to normal line layout position, when simple…
… line layout fails to find one. https://bugs.webkit.org/show_bug.cgi?id=176220 <rdar://problem/34205774> Reviewed by Brent Fulgham. Source/WebCore: In case of empty content, let's just fall back to normal line layout and try to find the visually correct one. Test: fast/text/invalid-positionForPoint-offset.html * rendering/RenderText.cpp: (WebCore::RenderText::positionForPoint): * rendering/SimpleLineLayoutResolver.cpp: (WebCore::SimpleLineLayout::RunResolver::runForPoint const): LayoutTests: * fast/text/invalid-positionForPoint-offset-expected.txt: Added. * fast/text/invalid-positionForPoint-offset.html: Added.
- Loading branch information
1 parent
50d3b7e
commit b82882b
Showing
6 changed files
with
62 additions
and
1 deletion.
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
1 change: 1 addition & 0 deletions
1
LayoutTests/fast/text/invalid-positionForPoint-offset-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 @@ | ||
|
25 changes: 25 additions & 0 deletions
25
LayoutTests/fast/text/invalid-positionForPoint-offset.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,25 @@ | ||
<style> | ||
* { | ||
border-bottom: green solid; | ||
margin: 0px; | ||
} | ||
</style> | ||
<script> | ||
if (window.testRunner) { | ||
testRunner.dumpAsText(); | ||
testRunner.waitUntilDone(); | ||
} | ||
function eventhandler() { | ||
dd.before(a); | ||
document.caretRangeFromPoint(0,0); | ||
if (window.testRunner) | ||
testRunner.notifyDone(); | ||
} | ||
</script> | ||
<h6> | ||
<a id="a"></a> | ||
</h6> | ||
<dd id="dd"></dd> | ||
<svg> | ||
PASS if no crash. | ||
<set attributeName="dominant-baseline" onbegin="eventhandler()" /> |
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