View | Details | Raw Unified | Return to bug 9432
Collapse All | Expand All

(-)LayoutTests/ChangeLog (+12 lines)
Lines 1-3 Link Here
1
2006-06-##  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9432
6
          REGRESSION: crash in capitalization code due to empty-string generated content
7
8
        * fast/text/capitalize-empty-generated-string-expected.checksum: Added.
9
        * fast/text/capitalize-empty-generated-string-expected.png: Added.
10
        * fast/text/capitalize-empty-generated-string-expected.txt: Added.
11
        * fast/text/capitalize-empty-generated-string.html: Added.
12
1
2006-06-15  Justin Garcia  <justin.garcia@apple.com>
13
2006-06-15  Justin Garcia  <justin.garcia@apple.com>
2
14
3
        Reviewed by harrison
15
        Reviewed by harrison
(-)LayoutTests/fast/text/capitalize-empty-generated-string-expected.checksum (+1 lines)
Line 0 Link Here
1
78d93ecc7e5b6b28c2b95fdea2d74046
(-)LayoutTests/fast/text/capitalize-empty-generated-string-expected.txt (+51 lines)
Line 0 Link Here
1
layer at (0,0) size 800x600
2
  RenderView at (0,0) size 800x600
3
layer at (0,0) size 800x600
4
  RenderBlock {HTML} at (0,0) size 800x600
5
    RenderBody {BODY} at (8,8) size 784x576
6
      RenderBlock {P} at (0,0) size 784x36
7
        RenderText {#text} at (0,0) size 172x18
8
          text run at (0,0) width 172: "This is a regression test for "
9
        RenderInline {I} at (0,0) size 769x36
10
          RenderInline {A} at (0,0) size 348x18 [color=#0000EE]
11
            RenderText {#text} at (172,0) size 348x18
12
              text run at (172,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=9432"
13
          RenderText {#text} at (520,0) size 769x36
14
            text run at (520,0) width 4: " "
15
            text run at (524,0) width 245: "REGRESSION: crash in capitalization"
16
            text run at (0,18) width 273: "code due to empty-string generated content"
17
        RenderText {#text} at (273,18) size 4x18
18
          text run at (273,18) width 4: "."
19
      RenderBlock {HR} at (0,52) size 784x2 [border: (1px inset #000000)]
20
      RenderBlock {P} at (0,70) size 784x18
21
        RenderInline {SPAN} at (0,0) size 85x18
22
          RenderText {#text} at (0,0) size 46x18
23
            text run at (0,0) width 46: "Lorem "
24
          RenderInline {SPAN} at (0,0) size 39x18
25
            RenderInline (generated) at (0,0) size 0x18
26
              RenderText at (0,0) size 0x0
27
            RenderText {#text} at (46,0) size 39x18
28
              text run at (46,0) width 39: "Ipsum"
29
        RenderText {#text} at (85,0) size 4x18
30
          text run at (85,0) width 4: " "
31
        RenderInline {I} at (0,0) size 61x18
32
          RenderText {#text} at (89,0) size 61x18
33
            text run at (89,0) width 61: "should be"
34
        RenderText {#text} at (150,0) size 89x18
35
          text run at (150,0) width 89: " Lorem Ipsum"
36
      RenderBlock {P} at (0,104) size 784x18
37
        RenderInline {SPAN} at (0,0) size 85x18
38
          RenderText {#text} at (0,0) size 23x18
39
            text run at (0,0) width 23: "Lor"
40
          RenderInline {SPAN} at (0,0) size 62x18
41
            RenderInline (generated) at (0,0) size 0x18
42
              RenderText at (0,0) size 0x0
43
            RenderText {#text} at (23,0) size 62x18
44
              text run at (23,0) width 62: "em Ipsum"
45
        RenderText {#text} at (85,0) size 4x18
46
          text run at (85,0) width 4: " "
47
        RenderInline {I} at (0,0) size 61x18
48
          RenderText {#text} at (89,0) size 61x18
49
            text run at (89,0) width 61: "should be"
50
        RenderText {#text} at (150,0) size 89x18
51
          text run at (150,0) width 89: " Lorem Ipsum"
(-)LayoutTests/fast/text/capitalize-empty-generated-string.html (+23 lines)
Line 0 Link Here
1
<html>
2
<head>
3
    <title></title>
4
    <style type="text/css">
5
        span.cap { text-transform: capitalize; }
6
        span.gen:before { content: ""; }
7
    </style>
8
</head>
9
<body>
10
    <p>
11
        This is a regression test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=9432">http://bugzilla.opendarwin.org/show_bug.cgi?id=9432</a>
12
        REGRESSION: crash in capitalization code due to empty-string generated content</i>.
13
    </p>
14
    <hr>
15
    <p>
16
        <span class="cap">lorem <span class="gen">ipsum</span></span>
17
        <i>should be</i> Lorem Ipsum
18
    </p>
19
    <p>
20
        <span class="cap">lor<span class="gen">em ipsum</span></span>
21
        <i>should be</i> Lorem Ipsum
22
    </p>
23
</body>
(-)WebCore/ChangeLog (+13 lines)
Lines 1-3 Link Here
1
2006-06-##  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9432
6
          REGRESSION: crash in capitalization code due to empty-string generated content
7
8
        Test: fast/text/capitalize-empty-generated-string.html
9
10
        * rendering/RenderText.cpp:
11
        (WebCore::RenderText::setText): Skip empty-string text renderers when
12
        looking for the previous character.
13
1
2006-06-15  Justin Garcia  <justin.garcia@apple.com>
14
2006-06-15  Justin Garcia  <justin.garcia@apple.com>
2
15
3
        Reviewed by harrison
16
        Reviewed by harrison
(-)WebCore/rendering/RenderText.cpp (-1 / +1 lines)
Lines 888-894 void RenderText::setText(StringImpl *tex Link Here
888
                    // find previous text renderer if one exists
888
                    // find previous text renderer if one exists
889
                    RenderObject* o;
889
                    RenderObject* o;
890
                    UChar previous = ' ';
890
                    UChar previous = ' ';
891
                    for (o = previousInPreOrder(); o && o->isInlineFlow(); o = o->previousInPreOrder())
891
                    for (o = previousInPreOrder(); o && (o->isInlineFlow() || o->isText() && static_cast<RenderText*>(o)->string()->length() == 0); o = o->previousInPreOrder())
892
                        ;
892
                        ;
893
                    if (o && o->isText()) {
893
                    if (o && o->isText()) {
894
                        StringImpl* prevStr = static_cast<RenderText*>(o)->string();
894
                        StringImpl* prevStr = static_cast<RenderText*>(o)->string();
(-)LayoutTests/fast/text/capitalize-empty-generated-string-expected.png (+1 lines)
Line 2 Link Here
1
PHjUalSJYfLb926FZ06dYJGo8GwYcNQrlw5F2RZPL6+vli9ejWCg4Nx69YtzJ8/Hz169EDbtm1L
Line 8 Link Here

Return to bug 9432