Commit c92d1283 authored by mitz@apple.com's avatar mitz@apple.com

WebCore:

        Reviewed by John Sullivan.

        - fix <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear

        Test: fast/text/soft-hyphen-2.html

        * rendering/bidi.cpp:
        (WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so
        that if there are two midpoints at the given position, only the last one
        will be chopped off.

LayoutTests:

        Reviewed by John Sullivan.

        - test for <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear

        * fast/text/soft-hyphen-2.html: Added.
        * platform/mac/fast/text/soft-hyphen-2-expected.checksum: Added.
        * platform/mac/fast/text/soft-hyphen-2-expected.png: Added.
        * platform/mac/fast/text/soft-hyphen-2-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 673612d8
2008-02-27 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
- test for <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
* fast/text/soft-hyphen-2.html: Added.
* platform/mac/fast/text/soft-hyphen-2-expected.checksum: Added.
* platform/mac/fast/text/soft-hyphen-2-expected.png: Added.
* platform/mac/fast/text/soft-hyphen-2-expected.txt: Added.
2008-02-27 Brady Eidson <beidson@apple.com>
Updated resource used in the layout test I landed yesterday.
<style>
div { font-family: Ahem; font-size: 20px; width: 100px; background-color: red; color: green; }
</style>
<div>
hen&shy;a&shy;tion.
</div>
<div>
hena&shy;tion.
</div>
<div>
5x5sq
</div>
ddd99d7fcf5910569482a0d5bd143be2
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 100x40 [color=#008000] [bgcolor=#FF0000]
RenderText {#text} at (0,0) size 100x40
text run at (0,0) width 60: "hen"
text run at (60,0) width 40: "a\x{AD}"
text run at (0,20) width 100: "tion."
RenderBlock {DIV} at (0,40) size 100x40 [color=#008000] [bgcolor=#FF0000]
RenderText {#text} at (0,0) size 100x40
text run at (0,0) width 100: "hena\x{AD}"
text run at (0,20) width 100: "tion."
RenderBlock {DIV} at (0,80) size 100x20 [color=#008000] [bgcolor=#FF0000]
RenderText {#text} at (0,0) size 100x20
text run at (0,0) width 100: "5x5sq"
2008-02-27 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
- fix <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
Test: fast/text/soft-hyphen-2.html
* rendering/bidi.cpp:
(WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so
that if there are two midpoints at the given position, only the last one
will be chopped off.
2008-02-27 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
......@@ -325,7 +325,7 @@ static void chopMidpointsAt(RenderObject* obj, unsigned pos)
if (!sNumMidpoints)
return;
BidiIterator* midpoints = smidpoints->data();
for (unsigned i = 0; i < sNumMidpoints; i++) {
for (int i = sNumMidpoints - 1; i >= 0; i--) {
const BidiIterator& point = midpoints[i];
if (point.obj == obj && point.pos == pos) {
sNumMidpoints = i;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment