Changeset 168575 in webkit


Ignore:
Timestamp:
May 10, 2014 12:23:01 AM (10 years ago)
Author:
Alan Bujtas
Message:

Subpixel rendering: Empty rects should remain empty after integrally enclosing them.
https://bugs.webkit.org/show_bug.cgi?id=132753
<rdar://problem/16846801>

Reviewed by Simon Fraser.

This patch ensures that empty LayoutRects remain empty after converting to integral enclosing rect.
LayoutRects with fractional position get expanded even if they are empty. This makes rectangle
operations unreliable and can result in undesired side effects.

Source/WebCore:
No testable/covered by existing tests.

  • platform/graphics/LayoutRect.cpp:

(WebCore::enclosingIntRect):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::integralEnclosingRectForSelection): Deleted.

LayoutTests:
1px -> 0px progressions.

  • platform/mac-mountainlion/fast/forms/fieldset-align-expected.txt:
  • platform/mac-mountainlion/fast/forms/textAreaLineHeight-expected.txt:
  • platform/mac/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:
  • platform/mac/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt:
  • platform/mac/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt:
  • platform/mac/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt:
  • platform/mac/fast/css/css1_forward_compatible_parsing-expected.txt:
  • platform/mac/fast/css/first-line-text-decoration-expected.txt:
  • platform/mac/fast/css/h1-in-section-elements-expected.txt:
  • platform/mac/fast/css/word-space-extra-expected.txt:
  • platform/mac/fast/encoding/utf-16-big-endian-expected.txt:
  • platform/mac/fast/encoding/utf-16-little-endian-expected.txt:
  • platform/mac/fast/forms/fieldset-align-expected.txt:
  • platform/mac/fast/forms/textAreaLineHeight-expected.txt:
  • platform/mac/fast/inline/continuation-outlines-expected.txt:
  • platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt:
  • platform/mac/fast/inline/outline-continuations-expected.txt:
  • platform/mac/fast/invalid/nestedh3s-expected.txt:
  • platform/mac/fast/multicol/client-rects-expected.txt:
  • platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt:
  • platform/mac/fast/multicol/client-rects-spanners-expected.txt:
  • platform/mac/fast/multicol/newmulticol/client-rects-expected.txt:
  • platform/mac/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
  • platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
  • platform/mac/fast/multicol/span/span-margin-collapsing-expected.txt:
  • platform/mac/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
  • platform/mac/fast/table/014-expected.txt:
  • platform/mac/fast/text/international/bidi-LDB-2-HTML-expected.txt:
  • platform/mac/mathml/presentation/mo-stretch-expected.txt:
  • platform/mac/svg/custom/use-font-face-crash-expected.txt:
  • platform/mac/svg/wicd/rightsizing-grid-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug113235-1-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug113235-2-expected.txt:
  • platform/mac/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
  • platform/mac/tables/mozilla/other/wa_table_tr_align-expected.txt:
Location:
trunk
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r168554 r168575  
     12014-05-10  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Empty rects should remain empty after integrally enclosing them.
     4        https://bugs.webkit.org/show_bug.cgi?id=132753
     5        <rdar://problem/16846801>
     6
     7        Reviewed by Simon Fraser.
     8
     9        This patch ensures that empty LayoutRects remain empty after converting to integral enclosing rect.
     10        LayoutRects with fractional position get expanded even if they are empty. This makes rectangle
     11        operations unreliable and can result in undesired side effects.
     12
     13        1px -> 0px progressions.
     14
     15        * platform/mac-mountainlion/fast/forms/fieldset-align-expected.txt:
     16        * platform/mac-mountainlion/fast/forms/textAreaLineHeight-expected.txt:
     17        * platform/mac/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:
     18        * platform/mac/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt:
     19        * platform/mac/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt:
     20        * platform/mac/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt:
     21        * platform/mac/fast/css/css1_forward_compatible_parsing-expected.txt:
     22        * platform/mac/fast/css/first-line-text-decoration-expected.txt:
     23        * platform/mac/fast/css/h1-in-section-elements-expected.txt:
     24        * platform/mac/fast/css/word-space-extra-expected.txt:
     25        * platform/mac/fast/encoding/utf-16-big-endian-expected.txt:
     26        * platform/mac/fast/encoding/utf-16-little-endian-expected.txt:
     27        * platform/mac/fast/forms/fieldset-align-expected.txt:
     28        * platform/mac/fast/forms/textAreaLineHeight-expected.txt:
     29        * platform/mac/fast/inline/continuation-outlines-expected.txt:
     30        * platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt:
     31        * platform/mac/fast/inline/outline-continuations-expected.txt:
     32        * platform/mac/fast/invalid/nestedh3s-expected.txt:
     33        * platform/mac/fast/multicol/client-rects-expected.txt:
     34        * platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt:
     35        * platform/mac/fast/multicol/client-rects-spanners-expected.txt:
     36        * platform/mac/fast/multicol/newmulticol/client-rects-expected.txt:
     37        * platform/mac/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
     38        * platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
     39        * platform/mac/fast/multicol/span/span-margin-collapsing-expected.txt:
     40        * platform/mac/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
     41        * platform/mac/fast/table/014-expected.txt:
     42        * platform/mac/fast/text/international/bidi-LDB-2-HTML-expected.txt:
     43        * platform/mac/mathml/presentation/mo-stretch-expected.txt:
     44        * platform/mac/svg/custom/use-font-face-crash-expected.txt:
     45        * platform/mac/svg/wicd/rightsizing-grid-expected.txt:
     46        * platform/mac/tables/mozilla/bugs/bug113235-1-expected.txt:
     47        * platform/mac/tables/mozilla/bugs/bug113235-2-expected.txt:
     48        * platform/mac/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
     49        * platform/mac/tables/mozilla/other/wa_table_tr_align-expected.txt:
     50
    1512014-05-09  Alexey Proskuryakov  <ap@apple.com>
    252
  • trunk/LayoutTests/platform/mac-mountainlion/fast/forms/fieldset-align-expected.txt

    r161906 r168575  
    3939        RenderText {#text} at (0,0) size 147x18
    4040          text run at (0,0) width 147: "Legend align test, RTL"
    41       RenderBlock (anonymous) at (0,328) size 769x1
     41      RenderBlock (anonymous) at (0,328) size 769x0
    4242        RenderInline {SPAN} at (0,0) size 0x0
    4343          RenderText {#text} at (0,0) size 0x0
     
    7171            RenderTextControl {INPUT} at (612,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7272            RenderText {#text} at (0,0) size 0x0
    73       RenderBlock (anonymous) at (0,562) size 769x1
     73      RenderBlock (anonymous) at (0,562) size 769x0
    7474        RenderInline {SPAN} at (0,0) size 0x0
    7575        RenderText {#text} at (0,0) size 0x0
     
    110110        RenderText {#text} at (0,0) size 309x18
    111111          text run at (0,0) width 309: "Legend align test with margin and padding, RTL"
    112       RenderBlock (anonymous) at (0,1026) size 769x1
     112      RenderBlock (anonymous) at (0,1026) size 769x0
    113113        RenderInline {SPAN} at (0,0) size 0x0
    114114          RenderText {#text} at (0,0) size 0x0
     
    142142            RenderTextControl {INPUT} at (580,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    143143            RenderText {#text} at (0,0) size 0x0
    144       RenderBlock (anonymous) at (0,1378) size 769x1
     144      RenderBlock (anonymous) at (0,1378) size 769x0
    145145        RenderInline {SPAN} at (0,0) size 0x0
    146146        RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac-mountainlion/fast/forms/textAreaLineHeight-expected.txt

    r161906 r168575  
    5252        RenderBR {BR} at (213,188) size 0x18
    5353        RenderText {#text} at (0,0) size 0x0
    54       RenderBlock {P} at (0,1199) size 769x1
     54      RenderBlock {P} at (0,1199) size 769x0
    5555layer at (8,60) size 406x206 clip at (9,61) size 404x204
    5656  RenderTextControl {TEXTAREA} at (0,18) size 406x206 [bgcolor=#FFFFFF] [border: (1px dotted #C0C0C0)]
  • trunk/LayoutTests/platform/mac/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt

    r161884 r168575  
    1414          RenderText {#text} at (25,28) size 23x107
    1515            text run at (25,28) width 107 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
    16       RenderBlock {PRE} at (0,182) size 784x1
     16      RenderBlock {PRE} at (0,182) size 784x0
    1717selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
    1818selection end:   position 5 of child 2 {#text} of child 1 {P} of child 3 {DIV} of body
  • trunk/LayoutTests/platform/mac/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt

    r161884 r168575  
    1414          RenderText {#text} at (1,28) size 23x107
    1515            text run at (1,28) width 107 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
    16       RenderBlock {PRE} at (0,182) size 784x1
     16      RenderBlock {PRE} at (0,182) size 784x0
    1717selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
    1818selection end:   position 5 of child 0 {#text} of child 2 {P} of child 3 {DIV} of body
  • trunk/LayoutTests/platform/mac/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt

    r161884 r168575  
    1414          RenderText {#text} at (25,28) size 23x107
    1515            text run at (25,28) width 107 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
    16       RenderBlock {PRE} at (0,182) size 784x1
     16      RenderBlock {PRE} at (0,182) size 784x0
    1717selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
    1818selection end:   position 6 of child 2 {#text} of child 1 {P} of child 3 {DIV} of body
  • trunk/LayoutTests/platform/mac/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt

    r161884 r168575  
    1414          RenderText {#text} at (1,28) size 23x107
    1515            text run at (1,28) width 107 RTL: "\x{5D0}\x{5D9}\x{5DF} \x{5DC}\x{5D9} \x{5E9}\x{5DD}."
    16       RenderBlock {PRE} at (0,182) size 784x1
     16      RenderBlock {PRE} at (0,182) size 784x0
    1717selection start: position 5 of child 0 {#text} of child 1 {P} of child 3 {DIV} of body
    1818selection end:   position 6 of child 0 {#text} of child 2 {P} of child 3 {DIV} of body
  • trunk/LayoutTests/platform/mac/fast/css/css1_forward_compatible_parsing-expected.txt

    r161884 r168575  
    3838          RenderText {#text} at (98,0) size 4x18
    3939            text run at (98,0) width 4: "."
    40       RenderBlock (anonymous) at (0,385) size 784x1
     40      RenderBlock (anonymous) at (0,385) size 784x0
    4141        RenderInline {A} at (0,0) size 0x0
    4242          RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/css/first-line-text-decoration-expected.txt

    r161884 r168575  
    2121      RenderBlock (anonymous) at (0,165) size 784x19
    2222        RenderBR {BR} at (0,0) size 0x18
    23       RenderBlock {P} at (0,199) size 784x1
     23      RenderBlock {P} at (0,199) size 784x0
    2424      RenderBlock {P} at (0,199) size 784x19
    2525        RenderText {#text} at (0,0) size 485x18
     
    3636      RenderBlock (anonymous) at (0,317) size 784x19
    3737        RenderBR {BR} at (0,0) size 0x18
    38       RenderBlock {P} at (0,351) size 784x1
     38      RenderBlock {P} at (0,351) size 784x0
    3939      RenderBlock {P} at (0,351) size 784x19
    4040        RenderText {#text} at (0,0) size 559x18
     
    5151      RenderBlock (anonymous) at (0,469) size 784x19
    5252        RenderBR {BR} at (0,0) size 0x18
    53       RenderBlock {P} at (0,503) size 784x1
     53      RenderBlock {P} at (0,503) size 784x0
  • trunk/LayoutTests/platform/mac/fast/css/h1-in-section-elements-expected.txt

    r161884 r168575  
    8585                              text run at (1,1) width 30: "MMM"
    8686                          RenderBlock {HR} at (0,66) size 71x3 [border: (1px inset #000000)]
    87                   RenderBlock {DIV} at (0,68) size 71x1
     87                  RenderBlock {DIV} at (0,68) size 71x0
    8888            RenderTableCell {TD} at (77,289) size 73x71 [r=4 c=1 rs=1 cs=1]
    8989              RenderBlock {HR} at (1,1) size 71x2 [border: (1px inset #000000)]
     
    169169                              text run at (1,1) width 30: "MMM"
    170170                          RenderBlock {HR} at (66,0) size 3x71 [border: (1px inset #000000)]
    171                   RenderBlock {DIV} at (68,0) size 1x71
     171                  RenderBlock {DIV} at (68,0) size 0x71
    172172            RenderTableCell {TD} at (289,77) size 71x73 [r=4 c=1 rs=1 cs=1]
    173173              RenderBlock {HR} at (1,1) size 2x71 [border: (1px inset #000000)]
  • trunk/LayoutTests/platform/mac/fast/css/word-space-extra-expected.txt

    r161884 r168575  
    285285            text run at (596,105) width 492: ". (with monospace font from elements to too)"
    286286            text run at (1108,105) width 0: " "
    287       RenderBlock (anonymous) at (0,421) size 769x1
     287      RenderBlock (anonymous) at (0,421) size 769x0
    288288        RenderInline {SPAN} at (0,0) size 0x0
    289289          RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/encoding/utf-16-big-endian-expected.txt

    r161884 r168575  
    7171              RenderBR {BR} at (130,15) size 0x0
    7272            RenderText {#text} at (0,0) size 0x0
    73       RenderBlock (anonymous) at (0,277) size 769x1
     73      RenderBlock (anonymous) at (0,277) size 769x0
    7474        RenderInline {SPAN} at (0,0) size 0x0
    7575          RenderInline {SPAN} at (0,0) size 0x0
     
    111111                RenderText {#text} at (1,37) size 416x17
    112112                  text run at (1,37) width 416: "Comments: -** TICKETLESS CONF CODE IS WHGNSO**"
    113       RenderBlock (anonymous) at (0,374) size 769x1
     113      RenderBlock (anonymous) at (0,374) size 769x0
    114114        RenderInline {SPAN} at (0,0) size 0x0
    115115          RenderInline {SPAN} at (0,0) size 0x0
     
    119119      RenderBlock (anonymous) at (0,380) size 769x3
    120120        RenderBlock {HR} at (0,0) size 769x2 [border: (1px inset #000000)]
    121       RenderBlock (anonymous) at (0,389) size 769x1
     121      RenderBlock (anonymous) at (0,389) size 769x0
    122122        RenderInline {SPAN} at (0,0) size 0x0
    123123          RenderInline {SPAN} at (0,0) size 0x0
     
    207207                    RenderInline {SPACE} at (0,0) size 0x17
    208208                      RenderBR {BR} at (0,0) size 0x17
    209       RenderBlock (anonymous) at (0,585) size 769x1
     209      RenderBlock (anonymous) at (0,585) size 769x0
    210210        RenderInline {SPAN} at (0,0) size 0x0
    211211          RenderInline {SPAN} at (0,0) size 0x0
     
    215215      RenderBlock (anonymous) at (0,592) size 769x3
    216216        RenderBlock {HR} at (0,0) size 769x2 [border: (1px inset #000000)]
    217       RenderBlock (anonymous) at (0,600) size 769x1
     217      RenderBlock (anonymous) at (0,600) size 769x0
    218218        RenderInline {SPAN} at (0,0) size 0x0
    219219          RenderInline {SPAN} at (0,0) size 0x0
     
    303303                    RenderInline {SPACE} at (0,0) size 0x17
    304304                      RenderBR {BR} at (0,0) size 0x17
    305       RenderBlock (anonymous) at (0,796) size 769x1
     305      RenderBlock (anonymous) at (0,796) size 769x0
    306306        RenderInline {SPAN} at (0,0) size 0x0
    307307          RenderInline {SPAN} at (0,0) size 0x0
     
    311311      RenderBlock (anonymous) at (0,803) size 769x3
    312312        RenderBlock {HR} at (0,0) size 769x2 [border: (1px inset #000000)]
    313       RenderBlock (anonymous) at (0,812) size 769x1
     313      RenderBlock (anonymous) at (0,812) size 769x0
    314314        RenderInline {SPAN} at (0,0) size 0x0
    315315          RenderInline {SPAN} at (0,0) size 0x0
     
    356356                      text run at (241,91) width 4: " "
    357357                    RenderBR {BR} at (245,105) size 0x0
    358       RenderBlock (anonymous) at (0,926) size 769x1
     358      RenderBlock (anonymous) at (0,926) size 769x0
    359359        RenderInline {SPAN} at (0,0) size 0x0
    360360          RenderInline {SPAN} at (0,0) size 0x0
     
    428428              text run at (204,0) width 163: "Click here for latest updates"
    429429          RenderText {#text} at (0,0) size 0x0
    430       RenderBlock (anonymous) at (0,1113) size 769x1
     430      RenderBlock (anonymous) at (0,1113) size 769x0
    431431        RenderInline {SPAN} at (0,0) size 0x0
    432432          RenderInline {SPAN} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/encoding/utf-16-little-endian-expected.txt

    r161884 r168575  
    7171              RenderBR {BR} at (130,15) size 0x0
    7272            RenderText {#text} at (0,0) size 0x0
    73       RenderBlock (anonymous) at (0,277) size 769x1
     73      RenderBlock (anonymous) at (0,277) size 769x0
    7474        RenderInline {SPAN} at (0,0) size 0x0
    7575          RenderInline {SPAN} at (0,0) size 0x0
     
    111111                RenderText {#text} at (1,37) size 416x17
    112112                  text run at (1,37) width 416: "Comments: -** TICKETLESS CONF CODE IS WHGNSO**"
    113       RenderBlock (anonymous) at (0,374) size 769x1
     113      RenderBlock (anonymous) at (0,374) size 769x0
    114114        RenderInline {SPAN} at (0,0) size 0x0
    115115          RenderInline {SPAN} at (0,0) size 0x0
     
    119119      RenderBlock (anonymous) at (0,380) size 769x3
    120120        RenderBlock {HR} at (0,0) size 769x2 [border: (1px inset #000000)]
    121       RenderBlock (anonymous) at (0,389) size 769x1
     121      RenderBlock (anonymous) at (0,389) size 769x0
    122122        RenderInline {SPAN} at (0,0) size 0x0
    123123          RenderInline {SPAN} at (0,0) size 0x0
     
    207207                    RenderInline {SPACE} at (0,0) size 0x17
    208208                      RenderBR {BR} at (0,0) size 0x17
    209       RenderBlock (anonymous) at (0,585) size 769x1
     209      RenderBlock (anonymous) at (0,585) size 769x0
    210210        RenderInline {SPAN} at (0,0) size 0x0
    211211          RenderInline {SPAN} at (0,0) size 0x0
     
    215215      RenderBlock (anonymous) at (0,592) size 769x3
    216216        RenderBlock {HR} at (0,0) size 769x2 [border: (1px inset #000000)]
    217       RenderBlock (anonymous) at (0,600) size 769x1
     217      RenderBlock (anonymous) at (0,600) size 769x0
    218218        RenderInline {SPAN} at (0,0) size 0x0
    219219          RenderInline {SPAN} at (0,0) size 0x0
     
    303303                    RenderInline {SPACE} at (0,0) size 0x17
    304304                      RenderBR {BR} at (0,0) size 0x17
    305       RenderBlock (anonymous) at (0,796) size 769x1
     305      RenderBlock (anonymous) at (0,796) size 769x0
    306306        RenderInline {SPAN} at (0,0) size 0x0
    307307          RenderInline {SPAN} at (0,0) size 0x0
     
    311311      RenderBlock (anonymous) at (0,803) size 769x3
    312312        RenderBlock {HR} at (0,0) size 769x2 [border: (1px inset #000000)]
    313       RenderBlock (anonymous) at (0,812) size 769x1
     313      RenderBlock (anonymous) at (0,812) size 769x0
    314314        RenderInline {SPAN} at (0,0) size 0x0
    315315          RenderInline {SPAN} at (0,0) size 0x0
     
    356356                      text run at (241,91) width 4: " "
    357357                    RenderBR {BR} at (245,105) size 0x0
    358       RenderBlock (anonymous) at (0,926) size 769x1
     358      RenderBlock (anonymous) at (0,926) size 769x0
    359359        RenderInline {SPAN} at (0,0) size 0x0
    360360          RenderInline {SPAN} at (0,0) size 0x0
     
    428428              text run at (204,0) width 163: "Click here for latest updates"
    429429          RenderText {#text} at (0,0) size 0x0
    430       RenderBlock (anonymous) at (0,1113) size 769x1
     430      RenderBlock (anonymous) at (0,1113) size 769x0
    431431        RenderInline {SPAN} at (0,0) size 0x0
    432432          RenderInline {SPAN} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/forms/fieldset-align-expected.txt

    r161884 r168575  
    3939        RenderText {#text} at (0,0) size 147x18
    4040          text run at (0,0) width 147: "Legend align test, RTL"
    41       RenderBlock (anonymous) at (0,328) size 769x1
     41      RenderBlock (anonymous) at (0,328) size 769x0
    4242        RenderInline {SPAN} at (0,0) size 0x0
    4343          RenderText {#text} at (0,0) size 0x0
     
    7171            RenderTextControl {INPUT} at (589,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7272            RenderText {#text} at (0,0) size 0x0
    73       RenderBlock (anonymous) at (0,562) size 769x1
     73      RenderBlock (anonymous) at (0,562) size 769x0
    7474        RenderInline {SPAN} at (0,0) size 0x0
    7575        RenderText {#text} at (0,0) size 0x0
     
    110110        RenderText {#text} at (0,0) size 309x18
    111111          text run at (0,0) width 309: "Legend align test with margin and padding, RTL"
    112       RenderBlock (anonymous) at (0,1026) size 769x1
     112      RenderBlock (anonymous) at (0,1026) size 769x0
    113113        RenderInline {SPAN} at (0,0) size 0x0
    114114          RenderText {#text} at (0,0) size 0x0
     
    142142            RenderTextControl {INPUT} at (557,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    143143            RenderText {#text} at (0,0) size 0x0
    144       RenderBlock (anonymous) at (0,1378) size 769x1
     144      RenderBlock (anonymous) at (0,1378) size 769x0
    145145        RenderInline {SPAN} at (0,0) size 0x0
    146146        RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/forms/textAreaLineHeight-expected.txt

    r161884 r168575  
    5252        RenderBR {BR} at (213,188) size 0x18
    5353        RenderText {#text} at (0,0) size 0x0
    54       RenderBlock {P} at (0,1199) size 769x1
     54      RenderBlock {P} at (0,1199) size 769x0
    5555layer at (8,60) size 406x206 clip at (9,61) size 404x204
    5656  RenderTextControl {TEXTAREA} at (0,18) size 406x206 [bgcolor=#FFFFFF] [border: (1px dotted #C0C0C0)]
  • trunk/LayoutTests/platform/mac/fast/inline/continuation-outlines-expected.txt

    r161884 r168575  
    4040            RenderText {#text} at (0,0) size 177x22
    4141              text run at (0,0) width 177: "But No Content After"
    42         RenderBlock (anonymous) at (0,77) size 784x1
     42        RenderBlock (anonymous) at (0,77) size 784x0
    4343          RenderInline {SPAN} at (0,0) size 0x0
    4444      RenderBlock {DIV} at (0,300) size 784x23
     
    4949            RenderText {#text} at (0,0) size 216x22
    5050              text run at (0,0) width 216: "No content before or after."
    51         RenderBlock (anonymous) at (0,40) size 784x1
     51        RenderBlock (anonymous) at (0,40) size 784x0
    5252          RenderInline {SPAN} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt

    r161884 r168575  
    1515      RenderBlock {DIV} at (0,222) size 784x60
    1616        RenderBlock (anonymous) at (0,0) size 784x18
    17         RenderBlock (anonymous) at (0,77) size 784x1
     17        RenderBlock (anonymous) at (0,77) size 784x0
    1818      RenderBlock {DIV} at (0,300) size 784x23
    1919        RenderBlock (anonymous) at (0,0) size 784x0
    20         RenderBlock (anonymous) at (0,40) size 784x1
     20        RenderBlock (anonymous) at (0,40) size 784x0
    2121layer at (8,50) size 98x18
    2222  RenderInline (relative positioned) {SPAN} at (0,0) size 98x18
  • trunk/LayoutTests/platform/mac/fast/inline/outline-continuations-expected.txt

    r161884 r168575  
    1010            RenderText {#text} at (0,0) size 50x22
    1111              text run at (0,0) width 50: "TEXT"
    12       RenderBlock (anonymous) at (0,41) size 784x1
     12      RenderBlock (anonymous) at (0,41) size 784x0
    1313        RenderBlock {P} at (0,0) size 784x0
    14       RenderBlock (anonymous) at (0,41) size 784x1
     14      RenderBlock (anonymous) at (0,41) size 784x0
    1515        RenderInline {BIG} at (0,0) size 0x0
    1616          RenderInline {PARSERERROR} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/invalid/nestedh3s-expected.txt

    r161884 r168575  
    2929                      RenderText {#text} at (4,4) size 64x36
    3030                        text run at (4,4) width 64: "Four"
    31                 RenderBlock (anonymous) at (4,138) size 760x1
     31                RenderBlock (anonymous) at (4,138) size 760x0
    3232                  RenderInline {I} at (0,0) size 0x0
    33             RenderBlock (anonymous) at (4,224) size 768x1
     33            RenderBlock (anonymous) at (4,224) size 768x0
    3434              RenderInline {I} at (0,0) size 0x0
    35         RenderBlock (anonymous) at (4,297) size 776x1
     35        RenderBlock (anonymous) at (4,297) size 776x0
    3636          RenderInline {I} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/multicol/client-rects-expected.txt

    r168380 r168575  
    116116      RenderSlider {INPUT} at (2,27) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    117117        RenderFlexibleBox {DIV} at (0,0) size 25x25
    118           RenderBlock {DIV} at (0,12) size 25x1
     118          RenderBlock {DIV} at (0,12) size 25x0
    119119            RenderBlock {DIV} at (0,0) size 25x0
    120120layer at (608,63) size 116x66
     
    191191      RenderSlider {INPUT} at (27,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    192192        RenderFlexibleBox {DIV} at (0,0) size 25x25
    193           RenderBlock {DIV} at (0,12) size 25x1
     193          RenderBlock {DIV} at (0,12) size 25x0
    194194            RenderBlock {DIV} at (0,0) size 25x0
    195195layer at (588,143) size 66x116
     
    266266      RenderSlider {INPUT} at (27,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    267267        RenderFlexibleBox {DIV} at (0,0) size 25x25
    268           RenderBlock {DIV} at (0,12) size 25x1
     268          RenderBlock {DIV} at (0,12) size 25x0
    269269            RenderBlock {DIV} at (0,0) size 25x0
    270270layer at (468,263) size 66x116
  • trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt

    r168380 r168575  
    137137      RenderSlider {INPUT} at (2,32) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    138138        RenderFlexibleBox {DIV} at (0,0) size 25x25
    139           RenderBlock {DIV} at (0,12) size 25x1
     139          RenderBlock {DIV} at (0,12) size 25x0
    140140            RenderBlock {DIV} at (0,0) size 25x0
    141141layer at (608,81) size 116x106
     
    242242      RenderSlider {INPUT} at (32,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    243243        RenderFlexibleBox {DIV} at (0,0) size 25x25
    244           RenderBlock {DIV} at (0,12) size 25x1
     244          RenderBlock {DIV} at (0,12) size 25x0
    245245            RenderBlock {DIV} at (0,0) size 25x0
    246246layer at (18,327) size 106x116
     
    347347      RenderSlider {INPUT} at (32,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    348348        RenderFlexibleBox {DIV} at (0,0) size 25x25
    349           RenderBlock {DIV} at (0,12) size 25x1
     349          RenderBlock {DIV} at (0,12) size 25x0
    350350            RenderBlock {DIV} at (0,0) size 25x0
    351351layer at (148,447) size 106x116
  • trunk/LayoutTests/platform/mac/fast/multicol/client-rects-spanners-expected.txt

    r168380 r168575  
    129129      RenderSlider {INPUT} at (2,27) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    130130        RenderFlexibleBox {DIV} at (0,0) size 25x25
    131           RenderBlock {DIV} at (0,12) size 25x1
     131          RenderBlock {DIV} at (0,12) size 25x0
    132132            RenderBlock {DIV} at (0,0) size 25x0
    133133layer at (608,63) size 116x76
     
    220220      RenderSlider {INPUT} at (27,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    221221        RenderFlexibleBox {DIV} at (0,0) size 25x25
    222           RenderBlock {DIV} at (0,12) size 25x1
     222          RenderBlock {DIV} at (0,12) size 25x0
    223223            RenderBlock {DIV} at (0,0) size 25x0
    224224layer at (638,153) size 76x116
     
    311311      RenderSlider {INPUT} at (27,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    312312        RenderFlexibleBox {DIV} at (0,0) size 25x25
    313           RenderBlock {DIV} at (0,12) size 25x1
     313          RenderBlock {DIV} at (0,12) size 25x0
    314314            RenderBlock {DIV} at (0,0) size 25x0
    315315layer at (618,273) size 76x116
  • trunk/LayoutTests/platform/mac/fast/multicol/newmulticol/client-rects-expected.txt

    r168380 r168575  
    116116      RenderSlider {INPUT} at (2,27) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    117117        RenderFlexibleBox {DIV} at (0,0) size 25x25
    118           RenderBlock {DIV} at (0,12) size 25x1
     118          RenderBlock {DIV} at (0,12) size 25x0
    119119            RenderBlock {DIV} at (0,0) size 25x0
    120120layer at (608,63) size 116x66
     
    191191      RenderSlider {INPUT} at (27,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    192192        RenderFlexibleBox {DIV} at (0,0) size 25x25
    193           RenderBlock {DIV} at (0,12) size 25x1
     193          RenderBlock {DIV} at (0,12) size 25x0
    194194            RenderBlock {DIV} at (0,0) size 25x0
    195195layer at (588,143) size 66x116
     
    266266      RenderSlider {INPUT} at (27,2) size 25x25 [color=#909090] [bgcolor=#ADD8E6]
    267267        RenderFlexibleBox {DIV} at (0,0) size 25x25
    268           RenderBlock {DIV} at (0,12) size 25x1
     268          RenderBlock {DIV} at (0,12) size 25x0
    269269            RenderBlock {DIV} at (0,0) size 25x0
    270270layer at (468,263) size 66x116
  • trunk/LayoutTests/platform/mac/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt

    r168076 r168575  
    5757      RenderText {#text} at (0,0) size 276x28
    5858        text run at (0,0) width 276: "This is a spanning element."
    59     RenderMultiColumnSet at (5,378) size 750x1
     59    RenderMultiColumnSet at (5,378) size 750x0
    6060layer at (13,421) size 367x612
    6161  RenderMultiColumnFlowThread at (5,5) size 367x612
  • trunk/LayoutTests/platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt

    r168076 r168575  
    5757      RenderText {#text} at (0,0) size 600x28
    5858        text run at (0,0) width 600: "This is a spanning element at the end of the columns block."
    59     RenderMultiColumnSet at (5,378) size 750x1
     59    RenderMultiColumnSet at (5,378) size 750x0
    6060layer at (13,421) size 367x612
    6161  RenderMultiColumnFlowThread at (5,5) size 367x612
     
    305305        text run at (0,0) width 707: "This is a spanning element at the end of the columns block with block"
    306306        text run at (0,28) width 83: "siblings."
    307     RenderMultiColumnSet at (5,438) size 750x1
     307    RenderMultiColumnSet at (5,438) size 750x0
    308308layer at (13,2480) size 367x658
    309309  RenderMultiColumnFlowThread at (5,5) size 367x658
  • trunk/LayoutTests/platform/mac/fast/multicol/span/span-margin-collapsing-expected.txt

    r168076 r168575  
    6161        text run at (606,0) width 90: "It should"
    6262        text run at (0,28) width 504: "collapse its margins with the h2 in the next block."
    63     RenderMultiColumnSet at (0,401) size 750x1
     63    RenderMultiColumnSet at (0,401) size 750x0
    6464layer at (8,434) size 367x612
    6565  RenderMultiColumnFlowThread at (0,0) size 367x612
     
    160160        text run at (640,0) width 90: "It should"
    161161        text run at (0,28) width 569: "collapse its margins with the spanning element below it."
    162     RenderMultiColumnSet at (0,293) size 750x1
     162    RenderMultiColumnSet at (0,293) size 750x0
    163163    RenderBlock {H2} at (0,293) size 750x57 [bgcolor=#CCCCCC]
    164164      RenderText {#text} at (0,0) size 730x56
  • trunk/LayoutTests/platform/mac/fast/overflow/clip-rects-fixed-ancestor-expected.txt

    r161884 r168575  
    77        RenderText {#text} at (0,0) size 287x18
    88          text run at (0,0) width 287: "Safari Fixed / Overflow Hidden Scroll Bug"
    9       RenderBlock {PRE} at (0,39) size 769x1
     9      RenderBlock {PRE} at (0,39) size 769x0
    1010      RenderBlock {PRE} at (0,39) size 769x496
    1111        RenderText {#text} at (0,0) size 264x495
  • trunk/LayoutTests/platform/mac/fast/table/014-expected.txt

    r161884 r168575  
    77        RenderImage {IMG} at (0,0) size 132x86
    88        RenderText {#text} at (0,0) size 0x0
    9       RenderBlock {H2} at (0,105) size 784x1
     9      RenderBlock {H2} at (0,105) size 784x0
    1010      RenderTable {TABLE} at (0,105) size 132x37
    1111        RenderTableSection {TBODY} at (0,0) size 132x36
  • trunk/LayoutTests/platform/mac/fast/text/international/bidi-LDB-2-HTML-expected.txt

    r161884 r168575  
    2525        RenderText {#text} at (499,0) size 4x18
    2626          text run at (499,0) width 4: "."
    27       RenderBlock {PRE} at (0,92) size 784x1
     27      RenderBlock {PRE} at (0,92) size 784x0
    2828      RenderBlock {P} at (0,92) size 784x19
    2929        RenderText {#text} at (0,0) size 281x18
  • trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt

    r165461 r168575  
    151151                RenderText at (0,-5) size 8x24
    152152                  text run at (0,-5) width 8: "\x{2225}"
    153           RenderMathMLSpace {mspace} at (123,0) size 1x76
     153          RenderMathMLSpace {mspace} at (123,0) size 0x76
    154154      RenderText {#text} at (125,85) size 5x18
    155155        text run at (125,85) width 5: " "
     
    226226                RenderText at (0,-5) size 8x24
    227227                  text run at (0,-5) width 8: "\x{2225}"
    228           RenderMathMLSpace {mspace} at (123,0) size 1x51
     228          RenderMathMLSpace {mspace} at (123,0) size 0x51
    229229      RenderText {#text} at (254,85) size 5x18
    230230        text run at (254,85) width 5: " "
     
    301301                RenderText at (0,-5) size 8x24
    302302                  text run at (0,-5) width 8: "\x{2225}"
    303           RenderMathMLSpace {mspace} at (123,0) size 1x21
     303          RenderMathMLSpace {mspace} at (123,0) size 0x21
    304304      RenderText {#text} at (383,85) size 5x18
    305305        text run at (383,85) width 5: " "
     
    378378                  RenderText at (0,-5) size 8x24
    379379                    text run at (0,-5) width 8: "\x{2225}"
    380             RenderMathMLSpace {mspace} at (123,0) size 1x41
     380            RenderMathMLSpace {mspace} at (123,0) size 0x41
    381381      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/svg/custom/use-font-face-crash-expected.txt

    r168350 r168575  
    2020            RenderSVGInlineText {#text} at (0,0) size 335x18
    2121              chunk 1 text run 1 at (0.00,20.00) startOffset 0 endOffset 53 width 335.00: "This should not crash, but display an error document."
    22           RenderSVGContainer {use} at (8,168) size 0x1
     22          RenderSVGContainer {use} at (8,168) size 0x0
  • trunk/LayoutTests/platform/mac/svg/wicd/rightsizing-grid-expected.txt

    r168350 r168575  
    1111          RenderText {#text} at (0,0) size 149x18
    1212            text run at (0,0) width 149: "WICD Core 1.0 #20-3"
    13         RenderBlock {p} at (0,119) size 769x1
     13        RenderBlock {p} at (0,119) size 769x0
    1414          RenderEmbeddedObject {object} at (0,0) size 385x128
    1515            layer at (0,0) size 385x128
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug113235-1-expected.txt

    r161884 r168575  
    42534253                        RenderText {#text} at (1,1) size 8x17
    42544254                          text run at (1,1) width 8: "x"
    4255               RenderBlock (anonymous) at (2,11376) size 715x1
     4255              RenderBlock (anonymous) at (2,11376) size 715x0
    42564256                RenderInline {FONT} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug113235-2-expected.txt

    r161884 r168575  
    1919          RenderTableSection {TBODY} at (0,0) size 4x4
    2020            RenderTableRow {TR} at (0,2) size 4x0
    21       RenderBlock (anonymous) at (0,74) size 784x1
     21      RenderBlock (anonymous) at (0,74) size 784x0
    2222        RenderInline {FONT} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt

    r161884 r168575  
    482482                RenderText {#text} at (2,2) size 31x18
    483483                  text run at (2,2) width 31: "col 9"
    484       RenderBlock {P} at (0,1090) size 769x1
     484      RenderBlock {P} at (0,1090) size 769x0
    485485      RenderBlock {HR} at (0,1090) size 769x3 [border: (1px inset #000000)]
    486486      RenderBlock {P} at (0,1108) size 769x62
     
    873873                RenderText {#text} at (2,2) size 31x18
    874874                  text run at (2,2) width 31: "col 9"
    875       RenderBlock {P} at (0,1667) size 769x1
     875      RenderBlock {P} at (0,1667) size 769x0
    876876      RenderBlock {HR} at (0,1667) size 769x3 [border: (1px inset #000000)]
    877877      RenderBlock {P} at (0,1685) size 769x62
     
    13181318                  text run at (2,2) width 19: "col"
    13191319                  text run at (2,20) width 8: "9"
    1320       RenderBlock {P} at (0,2272) size 769x1
     1320      RenderBlock {P} at (0,2272) size 769x0
    13211321      RenderBlock {HR} at (0,2272) size 769x3 [border: (1px inset #000000)]
    13221322      RenderBlock (anonymous) at (0,2282) size 769x19
  • trunk/LayoutTests/platform/mac/tables/mozilla/other/wa_table_tr_align-expected.txt

    r161884 r168575  
    309309                RenderText {#text} at (43,2) size 67x18
    310310                  text run at (43,2) width 67: "row data 3"
    311       RenderBlock {P} at (0,1222) size 769x1
     311      RenderBlock {P} at (0,1222) size 769x0
    312312      RenderBlock {HR} at (0,1222) size 769x3 [border: (1px inset #000000)]
    313313      RenderBlock (anonymous) at (0,1232) size 769x19
     
    321321      RenderBlock {P} at (0,1266) size 769x19
    322322        RenderBR {BR} at (0,0) size 0x18
    323       RenderBlock {P} at (0,1300) size 769x1
     323      RenderBlock {P} at (0,1300) size 769x0
  • trunk/Source/WebCore/ChangeLog

    r168570 r168575  
     12014-05-10  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Empty rects should remain empty after integrally enclosing them.
     4        https://bugs.webkit.org/show_bug.cgi?id=132753
     5        <rdar://problem/16846801>
     6
     7        Reviewed by Simon Fraser.
     8
     9        This patch ensures that empty LayoutRects remain empty after converting to integral enclosing rect.
     10        LayoutRects with fractional position get expanded even if they are empty. This makes rectangle
     11        operations unreliable and can result in undesired side effects.
     12
     13        No testable/covered by existing tests.
     14
     15        * platform/graphics/LayoutRect.cpp:
     16        (WebCore::enclosingIntRect):
     17        * rendering/InlineTextBox.cpp:
     18        (WebCore::InlineTextBox::localSelectionRect):
     19        (WebCore::InlineTextBox::paintDocumentMarker):
     20        (WebCore::InlineTextBox::paintTextMatchMarker):
     21        (WebCore::InlineTextBox::computeRectForReplacementMarker):
     22        (WebCore::integralEnclosingRectForSelection): Deleted.
     23
    1242014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
    225
  • trunk/Source/WebCore/platform/graphics/LayoutRect.cpp

    r164449 r168575  
    130130IntRect enclosingIntRect(const LayoutRect& rect)
    131131{
     132    // Empty rects with fractional x, y values turn into non-empty rects when converting to enclosing.
     133    // We need to ensure that empty rects stay empty after the conversion, because the selection code expects them to be empty.
    132134    IntPoint location = flooredIntPoint(rect.minXMinYCorner());
    133     IntPoint maxPoint = ceiledIntPoint(rect.maxXMaxYCorner());
    134 
     135    IntPoint maxPoint = IntPoint(rect.width() ? rect.maxX().ceil() : location.x(), rect.height() ? rect.maxY().ceil() : location.y());
    135136    return IntRect(location, maxPoint - location);
    136137}
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r168528 r168575  
    266266}
    267267
    268 // FIXME: remove this function, when switching to directional pixel snapping.
    269 static IntRect integralEnclosingRectForSelection(const LayoutRect& rect)
    270 {
    271     // Empty rects with fractional x, y values turn into non-empty rects when converting to enclosing.
    272     // We need to ensure that empty rects stay empty after the conversion, because the selection code expects them to be empty.
    273     IntPoint location = flooredIntPoint(rect.minXMinYCorner());
    274     IntPoint maxPoint = IntPoint(rect.width() ? rect.maxX().ceil() : location.x(), rect.height() ? rect.maxY().ceil() : location.y());
    275     return IntRect(location, maxPoint - location);
    276 }
    277 
    278268LayoutRect InlineTextBox::localSelectionRect(int startPos, int endPos) const
    279269{
     
    301291    if (sPos || ePos != static_cast<int>(m_len))
    302292        font.adjustSelectionRectForText(textRun, selectionRect, sPos, ePos);
    303     IntRect snappedSelectionRect = integralEnclosingRectForSelection(selectionRect);
     293    IntRect snappedSelectionRect = enclosingIntRect(selectionRect);
    304294    LayoutUnit logicalWidth = snappedSelectionRect.width();
    305295    if (snappedSelectionRect.x() > logicalRight())
     
    11891179        LayoutRect selectionRect = LayoutRect(startPoint, FloatSize(0, selHeight));
    11901180        font.adjustSelectionRectForText(run, selectionRect, startPosition, endPosition);
    1191         IntRect markerRect = integralEnclosingRectForSelection(selectionRect);
     1181        IntRect markerRect = enclosingIntRect(selectionRect);
    11921182        start = markerRect.x() - startPoint.x();
    11931183        width = markerRect.width();
     
    12341224    LayoutRect renderedRect = LayoutRect(LayoutPoint(x(), selectionTop()), FloatSize(0, selectionHeight));
    12351225    font.adjustSelectionRectForText(run, renderedRect, sPos, ePos);
    1236     IntRect markerRect = integralEnclosingRectForSelection(renderedRect);
     1226    IntRect markerRect = enclosingIntRect(renderedRect);
    12371227    markerRect = renderer().localToAbsoluteQuad(FloatQuad(markerRect)).enclosingBoundingBox();
    12381228    toRenderedDocumentMarker(marker)->setRenderedRect(markerRect);
     
    12661256    LayoutRect selectionRect = LayoutRect(LayoutPoint(x(), top), LayoutSize(0, h));
    12671257    font.adjustSelectionRectForText(run, selectionRect, sPos, ePos);
    1268     IntRect markerRect = integralEnclosingRectForSelection(selectionRect);
     1258    IntRect markerRect = enclosingIntRect(selectionRect);
    12691259    markerRect = renderer().localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
    12701260    toRenderedDocumentMarker(marker)->setRenderedRect(markerRect);
Note: See TracChangeset for help on using the changeset viewer.