Changeset 54536 in webkit


Ignore:
Timestamp:
Feb 9, 2010 1:16:36 AM (14 years ago)
Author:
yuzo@google.com
Message:

2010-02-07 Yuzo Fujishima <yuzo@google.com>

Reviewed by Dan Bernstein.

Fix the following bugs:
https://bugs.webkit.org/show_bug.cgi?id=18926 - dt:after generate a line break. Boost documentation page renders poorly
https://bugs.webkit.org/show_bug.cgi?id=7276 - Most W3C padding related tests fail

css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.html and css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.html have been rebaselined
because the original expected values are incorrect, judging from the test description and how IE 8.0, Firefox 3.6, and Opera 10.10 render the pages.
fast/dom/clone-node-dynamic-style-expected.html have been also rebaselined because the original expected values assumes a line break.
Expected values under platform/qt need not be updated because the tests are in the Skipped file for the platform.

  • fast/css/inline-element-line-break.html: Added.
  • fast/css/pseudo-element-line-break.html: Added.
  • platform/mac/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.checksum:
  • platform/mac/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.png:
  • platform/mac/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.txt:
  • platform/mac/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.checksum:
  • platform/mac/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.png:
  • platform/mac/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.txt:
  • platform/mac/fast/css/inline-element-line-break-expected.checksum: Added.
  • platform/mac/fast/css/inline-element-line-break-expected.png: Added.
  • platform/mac/fast/css/inline-element-line-break-expected.txt: Added.
  • platform/mac/fast/css/pseudo-element-line-break-expected.checksum: Added.
  • platform/mac/fast/css/pseudo-element-line-break-expected.png: Added.
  • platform/mac/fast/css/pseudo-element-line-break-expected.txt: Added.
  • platform/mac/fast/dom/clone-node-dynamic-style-expected.checksum:
  • platform/mac/fast/dom/clone-node-dynamic-style-expected.png:
  • platform/mac/fast/dom/clone-node-dynamic-style-expected.txt:

2010-02-07 Yuzo Fujishima <yuzo@google.com>

Reviewed by Dan Bernstein.

Fix the following bugs:
https://bugs.webkit.org/show_bug.cgi?id=18926 - dt:after generate a line break. Boost documentation page renders poorly
https://bugs.webkit.org/show_bug.cgi?id=7276 - Most W3C padding related tests fail

Tests: fast/css/inline-element-line-break.html

fast/css/pseudo-element-line-break.html

findNextLineBreak() unconditionally allowed lines to break between elements when no other line breaking opportunity had been found,
but that was unnecessary and led to incorrect layout. Disallow that kind of line breaks.

  • rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::findNextLineBreak):
Location:
trunk
Files:
8 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r54535 r54536  
     12010-02-07  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Fix the following bugs:
     6        https://bugs.webkit.org/show_bug.cgi?id=18926 - dt:after generate a line break. Boost documentation page renders poorly
     7        https://bugs.webkit.org/show_bug.cgi?id=7276 - Most W3C padding related tests fail
     8
     9        css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.html and css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.html have been rebaselined
     10        because the original expected values are incorrect, judging from the test description and how IE 8.0, Firefox 3.6, and Opera 10.10 render the pages.
     11        fast/dom/clone-node-dynamic-style-expected.html have been also rebaselined because the original expected values assumes a line break.
     12        Expected values under platform/qt need not be updated because the tests are in the Skipped file for the platform.
     13
     14        * fast/css/inline-element-line-break.html: Added.
     15        * fast/css/pseudo-element-line-break.html: Added.
     16        * platform/mac/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.checksum:
     17        * platform/mac/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.png:
     18        * platform/mac/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.txt:
     19        * platform/mac/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.checksum:
     20        * platform/mac/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.png:
     21        * platform/mac/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.txt:
     22        * platform/mac/fast/css/inline-element-line-break-expected.checksum: Added.
     23        * platform/mac/fast/css/inline-element-line-break-expected.png: Added.
     24        * platform/mac/fast/css/inline-element-line-break-expected.txt: Added.
     25        * platform/mac/fast/css/pseudo-element-line-break-expected.checksum: Added.
     26        * platform/mac/fast/css/pseudo-element-line-break-expected.png: Added.
     27        * platform/mac/fast/css/pseudo-element-line-break-expected.txt: Added.
     28        * platform/mac/fast/dom/clone-node-dynamic-style-expected.checksum:
     29        * platform/mac/fast/dom/clone-node-dynamic-style-expected.png:
     30        * platform/mac/fast/dom/clone-node-dynamic-style-expected.txt:
     31
    1322010-02-09  Avi Drissman  <avi@chromium.org>
    233
  • trunk/LayoutTests/platform/mac/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.checksum

    r38122 r54536  
    1 9b380eea177552acd80bb610071d6434
     1e8c79031e275259171fdca5f1232e144
  • trunk/LayoutTests/platform/mac/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.txt

    r25970 r54536  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x125
    4   RenderBlock {HTML} at (0,0) size 800x125
    5     RenderBody {BODY} at (8,16) size 784x94
     3layer at (0,0) size 800x110
     4  RenderBlock {HTML} at (0,0) size 800x110
     5    RenderBody {BODY} at (8,16) size 784x79
    66      RenderBlock {P} at (0,0) size 784x18
    77        RenderText {#text} at (0,0) size 313x18
    88          text run at (0,0) width 313: "There should be a small light green square below:"
    9       RenderBlock {DIV} at (15,34) size 754x60
    10         RenderBlock {P} at (0,0) size 75x60 [color=#FFFFFF]
     9      RenderBlock {DIV} at (15,34) size 754x45
     10        RenderBlock {P} at (0,0) size 75x45 [color=#FFFFFF]
    1111          RenderText {#text} at (0,0) size 30x30
    1212            text run at (0,0) width 30: "xx"
    1313            text run at (0,15) width 30: "xx"
    1414          RenderInline {SPAN} at (0,0) size 15x15 [color=#00FF00] [bgcolor=#FF0000]
    15             RenderText {#text} at (60,30) size 15x15
    16               text run at (60,30) width 15: "x"
    17           RenderText {#text} at (0,45) size 75x15
    18             text run at (0,45) width 75: "xx xx"
     15            RenderText {#text} at (90,15) size 15x15
     16              text run at (90,15) width 15: "x"
     17          RenderText {#text} at (0,30) size 75x15
     18            text run at (0,30) width 75: "xx xx"
  • trunk/LayoutTests/platform/mac/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.checksum

    r38122 r54536  
    1 9b380eea177552acd80bb610071d6434
     1e8c79031e275259171fdca5f1232e144
  • trunk/LayoutTests/platform/mac/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.txt

    r25970 r54536  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x125
    4   RenderBlock {HTML} at (0,0) size 800x125
    5     RenderBody {BODY} at (8,16) size 784x94
     3layer at (0,0) size 800x110
     4  RenderBlock {HTML} at (0,0) size 800x110
     5    RenderBody {BODY} at (8,16) size 784x79
    66      RenderBlock {P} at (0,0) size 784x18
    77        RenderText {#text} at (0,0) size 313x18
    88          text run at (0,0) width 313: "There should be a small light green square below:"
    9       RenderBlock {DIV} at (15,34) size 754x60
    10         RenderBlock {P} at (0,0) size 75x60 [color=#FFFFFF]
     9      RenderBlock {DIV} at (15,34) size 754x45
     10        RenderBlock {P} at (0,0) size 75x45 [color=#FFFFFF]
    1111          RenderText {#text} at (0,0) size 30x30
    1212            text run at (0,0) width 30: "xx"
    1313            text run at (0,15) width 30: "xx"
    1414          RenderInline {SPAN} at (0,0) size 75x15 [color=#00FF00]
    15             RenderText {#text} at (60,30) size 15x15
    16               text run at (60,30) width 15: "x"
    17           RenderText {#text} at (0,45) size 75x15
    18             text run at (0,45) width 75: "xx xx"
     15            RenderText {#text} at (90,15) size 15x15
     16              text run at (90,15) width 15: "x"
     17          RenderText {#text} at (0,30) size 75x15
     18            text run at (0,30) width 75: "xx xx"
  • trunk/LayoutTests/platform/mac/fast/dom/clone-node-dynamic-style-expected.checksum

    r38121 r54536  
    1 1e5b0de6598cbfc4d28634c8a683a0b5
     156e71a9e9e102b316f725da95e673d58
  • trunk/LayoutTests/platform/mac/fast/dom/clone-node-dynamic-style-expected.txt

    r25970 r54536  
    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 784x584
     1layer at (0,0) size 838x585
     2  RenderView at (0,0) size 800x585
     3layer at (0,0) size 838x585
     4  RenderBlock {HTML} at (0,0) size 800x585
     5    RenderBody {BODY} at (8,8) size 784x569
    66      RenderBlock {H1} at (0,0) size 784x37
    77        RenderText {#text} at (0,0) size 195x37
    88          text run at (0,0) width 195: "Cloning nodes"
    9       RenderBlock {DIV} at (0,58) size 784x76 [bgcolor=#FFFF00] [border: (2px ridge #000000)]
    10         RenderInline {SPAN} at (0,0) size 768x72
     9      RenderBlock {DIV} at (0,58) size 784x40 [bgcolor=#FFFF00] [border: (2px ridge #000000)]
     10        RenderInline {SPAN} at (0,0) size 828x36
    1111          RenderText {#text} at (2,2) size 60x36
    1212            text run at (2,2) width 60: "Bold"
     
    1919            RenderText {#text} at (548,2) size 222x36
    2020              text run at (548,2) width 222: "Bold+Uunderline"
    21           RenderText {#text} at (2,38) size 60x36
    22             text run at (2,38) width 60: "Bold"
     21          RenderText {#text} at (770,2) size 60x36
     22            text run at (770,2) width 60: "Bold"
    2323        RenderText {#text} at (0,0) size 0x0
    24       RenderBlock (anonymous) at (0,134) size 784x18
     24      RenderBlock (anonymous) at (0,98) size 784x18
    2525        RenderText {#text} at (0,0) size 189x18
    2626          text run at (0,0) width 189: "Cloned Node with deep=false"
    27       RenderBlock {DIV} at (0,152) size 784x40 [bgcolor=#FFFF00] [border: (2px ridge #000000)]
     27      RenderBlock {DIV} at (0,116) size 784x40 [bgcolor=#FFFF00] [border: (2px ridge #000000)]
    2828        RenderBR {BR} at (2,2) size 0x36
    29       RenderBlock (anonymous) at (0,192) size 784x18
     29      RenderBlock (anonymous) at (0,156) size 784x18
    3030        RenderText {#text} at (0,0) size 184x18
    3131          text run at (0,0) width 184: "Cloned Node with deep=true"
    32       RenderBlock {DIV} at (0,210) size 784x76 [bgcolor=#FFFF00] [border: (2px ridge #000000)]
    33         RenderInline {SPAN} at (0,0) size 768x72
     32      RenderBlock {DIV} at (0,174) size 784x40 [bgcolor=#FFFF00] [border: (2px ridge #000000)]
     33        RenderInline {SPAN} at (0,0) size 828x36
    3434          RenderText {#text} at (2,2) size 60x36
    3535            text run at (2,2) width 60: "Bold"
     
    4242            RenderText {#text} at (548,2) size 222x36
    4343              text run at (548,2) width 222: "Bold+Uunderline"
    44           RenderText {#text} at (2,38) size 60x36
    45             text run at (2,38) width 60: "Bold"
     44          RenderText {#text} at (770,2) size 60x36
     45            text run at (770,2) width 60: "Bold"
    4646        RenderText {#text} at (0,0) size 0x0
  • trunk/WebCore/ChangeLog

    r54533 r54536  
     12010-02-07  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Fix the following bugs:
     6        https://bugs.webkit.org/show_bug.cgi?id=18926 - dt:after generate a line break. Boost documentation page renders poorly
     7        https://bugs.webkit.org/show_bug.cgi?id=7276 - Most W3C padding related tests fail
     8
     9        Tests: fast/css/inline-element-line-break.html
     10               fast/css/pseudo-element-line-break.html
     11
     12        findNextLineBreak() unconditionally allowed lines to break between elements when no other line breaking opportunity had been found,
     13        but that was unnecessary and led to incorrect layout. Disallow that kind of line breaks.
     14
     15        * rendering/RenderBlockLineLayout.cpp:
     16        (WebCore::RenderBlock::findNextLineBreak):
     17
    1182010-02-09  Shinichiro Hamaji  <hamaji@chromium.org>
    219
  • trunk/WebCore/rendering/RenderBlockLineLayout.cpp

    r53432 r54536  
    21592159            }
    21602160        } else if (lBreak.obj) {
    2161             if (last != o && !last->isListMarker()) {
    2162                 // better to break between object boundaries than in the middle of a word (except for list markers)
    2163                 lBreak.obj = o;
    2164                 lBreak.pos = 0;
    2165                 lBreak.nextBreakablePosition = -1;
    2166             } else {
    2167                 // Don't ever break in the middle of a word if we can help it.
    2168                 // There's no room at all. We just have to be on this line,
    2169                 // even though we'll spill out.
    2170                 lBreak.obj = o;
    2171                 lBreak.pos = pos;
    2172                 lBreak.nextBreakablePosition = -1;
    2173             }
     2161            // Don't ever break in the middle of a word if we can help it.
     2162            // There's no room at all. We just have to be on this line,
     2163            // even though we'll spill out.
     2164            lBreak.obj = o;
     2165            lBreak.pos = pos;
     2166            lBreak.nextBreakablePosition = -1;
    21742167        }
    21752168    }
Note: See TracChangeset for help on using the changeset viewer.