Changeset 139798 in webkit


Ignore:
Timestamp:
Jan 15, 2013 3:21:34 PM (11 years ago)
Author:
eae@chromium.org
Message:

REGRESSION (r121599): incorrect border scaling when zoomed
https://bugs.webkit.org/show_bug.cgi?id=106944

Source/WebCore:

Reviewed by Levi Weintraub.

Fix bug in ApplyPropertyComputeLength::applyValue where zooming
of non-pixel values was incorrect.

Test: fast/sub-pixel/zoomed-em-border.html

  • css/StyleBuilder.cpp:

(WebCore::ApplyPropertyComputeLength::applyValue):

LayoutTests:

Reviewed by Levi Weintraub.

Add test for zoomed em border and restore expectations for
zoom-replaced-intrinsic-ratio-001 to the pre r121599 state.

  • fast/sub-pixel/zoomed-em-border-expected.html: Added.
  • fast/sub-pixel/zoomed-em-border.html: Added.
  • platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png:
  • platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt:
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r139794 r139798  
     12013-01-15  Emil A Eklund  <eae@chromium.org>
     2
     3        REGRESSION (r121599): incorrect border scaling when zoomed
     4        https://bugs.webkit.org/show_bug.cgi?id=106944
     5
     6        Reviewed by Levi Weintraub.
     7       
     8        Add test for zoomed em border and restore expectations for
     9        zoom-replaced-intrinsic-ratio-001 to the pre r121599 state.
     10
     11        * fast/sub-pixel/zoomed-em-border-expected.html: Added.
     12        * fast/sub-pixel/zoomed-em-border.html: Added.
     13        * platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png:
     14        * platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt:
     15
    1162013-01-15  Alexandru Chiculita  <achicu@adobe.com>
    217
  • trunk/LayoutTests/platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt

    r132135 r139798  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x454
    4   RenderBlock {HTML} at (0,0) size 800x454
    5     RenderBody {BODY} at (4,4) size 142x442 [border: (1px dashed #C0C0C0)]
     3layer at (0,0) size 800x474
     4  RenderBlock {HTML} at (0,0) size 800x474
     5    RenderBody {BODY} at (4,4) size 142x462 [border: (1px dashed #C0C0C0)]
    66      RenderBlock {P} at (1,10) size 139x28
    77        RenderText {#text} at (0,-2) size 133x30
     
    99          text run at (0,7) width 133: "be of the same width. There must be"
    1010          text run at (0,16) width 26: "no red."
    11       RenderBlock {P} at (10,46) size 121x20 [bgcolor=#008000] [border: (5px solid #0000FF)]
    12         RenderText {#text} at (5,3) size 2x12
    13           text run at (5,3) width 2: " "
    14       RenderBlock {P} at (1,121) size 139x10
     11      RenderBlock {P} at (10,46) size 121x28 [bgcolor=#008000] [border: (9px solid #0000FF)]
     12        RenderText {#text} at (9,7) size 2x12
     13          text run at (9,7) width 2: " "
     14      RenderBlock {P} at (1,129) size 139x10
    1515        RenderText {#text} at (0,-2) size 12x12
    1616          text run at (0,-2) width 12: "      "
    1717        RenderText {#text} at (0,0) size 0x0
    18         RenderEmbeddedObject {OBJECT} at (9,-1) size 121x39 [bgcolor=#FF0000] [border: (5px solid #0000FF)]
    19           layer at (0,0) size 110x28
    20             RenderView at (0,0) size 110x28
    21           layer at (0,0) size 110x28
    22             RenderSVGRoot {svg} at (0,0) size 110x28
    23               RenderSVGRect {rect} at (0,0) size 110x28 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
    24               RenderSVGPath {path} at (16,5) size 78x17 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
    25       RenderBlock {P} at (1,186) size 139x10
    26         RenderEmbeddedObject {OBJECT} at (9,0) size 121x38 [bgcolor=#FF0000] [border: (5px solid #0000FF)]
    27           layer at (0,0) size 110x28
    28             RenderView at (0,0) size 110x28
    29           layer at (0,0) size 110x28
    30             RenderSVGRoot {svg} at (0,0) size 110x28
    31               RenderSVGRect {rect} at (0,0) size 110x28 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
    32               RenderSVGPath {path} at (16,5) size 78x17 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
    33       RenderTable at (1,250) size 139x40
    34         RenderTableSection (anonymous) at (0,0) size 139x39
    35           RenderTableRow (anonymous) at (0,0) size 139x39
    36             RenderTableCell {P} at (0,0) size 139x39 [r=0 c=0 rs=1 cs=1]
    37               RenderEmbeddedObject {OBJECT} at (9,0) size 121x38 [bgcolor=#FF0000] [border: (5px solid #0000FF)]
    38                 layer at (0,0) size 110x28
    39                   RenderView at (0,0) size 110x28
    40                 layer at (0,0) size 110x28
    41                   RenderSVGRoot {svg} at (0,0) size 110x28
    42                     RenderSVGRect {rect} at (0,0) size 110x28 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
    43                     RenderSVGPath {path} at (16,5) size 78x17 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
    44       RenderTable {TABLE} at (1,345) size 139x40
    45         RenderTableSection {TBODY} at (0,0) size 139x39
    46           RenderTableRow {TR} at (0,0) size 139x39
    47             RenderTableCell {TD} at (0,0) size 139x39 [r=0 c=0 rs=1 cs=1]
    48               RenderEmbeddedObject {OBJECT} at (9,0) size 121x38 [bgcolor=#FF0000] [border: (5px solid #0000FF)]
    49                 layer at (0,0) size 110x28
    50                   RenderView at (0,0) size 110x28
    51                 layer at (0,0) size 110x28
    52                   RenderSVGRoot {svg} at (0,0) size 110x28
    53                     RenderSVGRect {rect} at (0,0) size 110x28 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
    54                     RenderSVGPath {path} at (16,5) size 78x17 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
    55       RenderBlock (floating) {P} at (1,439) size 139x11
    56         RenderEmbeddedObject {OBJECT} at (9,0) size 121x38 [bgcolor=#FF0000] [border: (5px solid #0000FF)]
    57           layer at (0,0) size 110x28
    58             RenderView at (0,0) size 110x28
    59           layer at (0,0) size 110x28
    60             RenderSVGRoot {svg} at (0,0) size 110x28
    61               RenderSVGRect {rect} at (0,0) size 110x28 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
    62               RenderSVGPath {path} at (16,5) size 78x17 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
     18        RenderEmbeddedObject {OBJECT} at (9,-1) size 121x45 [bgcolor=#FF0000] [border: (9px solid #0000FF)]
     19          layer at (0,0) size 102x26
     20            RenderView at (0,0) size 102x26
     21          layer at (0,0) size 102x26
     22            RenderSVGRoot {svg} at (0,0) size 102x26
     23              RenderSVGRect {rect} at (0,0) size 102x26 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
     24              RenderSVGPath {path} at (15,5) size 72x16 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
     25      RenderBlock {P} at (1,194) size 139x10
     26        RenderEmbeddedObject {OBJECT} at (9,0) size 121x44 [bgcolor=#FF0000] [border: (9px solid #0000FF)]
     27          layer at (0,0) size 102x26
     28            RenderView at (0,0) size 102x26
     29          layer at (0,0) size 102x26
     30            RenderSVGRoot {svg} at (0,0) size 102x26
     31              RenderSVGRect {rect} at (0,0) size 102x26 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
     32              RenderSVGPath {path} at (15,5) size 72x16 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
     33      RenderTable at (1,258) size 139x46
     34        RenderTableSection (anonymous) at (0,0) size 139x45
     35          RenderTableRow (anonymous) at (0,0) size 139x45
     36            RenderTableCell {P} at (0,0) size 139x45 [r=0 c=0 rs=1 cs=1]
     37              RenderEmbeddedObject {OBJECT} at (9,0) size 121x44 [bgcolor=#FF0000] [border: (9px solid #0000FF)]
     38                layer at (0,0) size 102x26
     39                  RenderView at (0,0) size 102x26
     40                layer at (0,0) size 102x26
     41                  RenderSVGRoot {svg} at (0,0) size 102x26
     42                    RenderSVGRect {rect} at (0,0) size 102x26 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
     43                    RenderSVGPath {path} at (15,5) size 72x16 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
     44      RenderTable {TABLE} at (1,359) size 139x46
     45        RenderTableSection {TBODY} at (0,0) size 139x45
     46          RenderTableRow {TR} at (0,0) size 139x45
     47            RenderTableCell {TD} at (0,0) size 139x45 [r=0 c=0 rs=1 cs=1]
     48              RenderEmbeddedObject {OBJECT} at (9,0) size 121x44 [bgcolor=#FF0000] [border: (9px solid #0000FF)]
     49                layer at (0,0) size 102x26
     50                  RenderView at (0,0) size 102x26
     51                layer at (0,0) size 102x26
     52                  RenderSVGRoot {svg} at (0,0) size 102x26
     53                    RenderSVGRect {rect} at (0,0) size 102x26 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
     54                    RenderSVGPath {path} at (15,5) size 72x16 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
     55      RenderBlock (floating) {P} at (1,459) size 139x11
     56        RenderEmbeddedObject {OBJECT} at (9,0) size 121x44 [bgcolor=#FF0000] [border: (9px solid #0000FF)]
     57          layer at (0,0) size 102x26
     58            RenderView at (0,0) size 102x26
     59          layer at (0,0) size 102x26
     60            RenderSVGRoot {svg} at (0,0) size 102x26
     61              RenderSVGRect {rect} at (0,0) size 102x26 [stroke={[type=SOLID] [color=#008000] [stroke width=12.00]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=1000.00] [height=250.00]
     62              RenderSVGPath {path} at (15,5) size 72x16 [fill={[type=SOLID] [color=#008000]}] [data="M 500 50 L 150 200 L 850 200 Z"]
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r139770 r139798  
    43804380webkit.org/b/106858 [ SnowLeopard Debug ] scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html [ ImageOnlyFailure ]
    43814381webkit.org/b/106875 [ XP ] svg/dynamic-updates/SVGFESpecularLightingElement-remove-lightSource.html [ ImageOnlyFailure ]
     4382
     4383# Needs rebaseline after https://bugs.webkit.org/show_bug.cgi?id=106822
     4384webkit.org/b/106822 svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm [ Failure Pass ]
  • trunk/LayoutTests/platform/mac/TestExpectations

    r139617 r139798  
    12881288webkit.org/b/103955 fast/repaint/selection-rl.html [ ImageOnlyFailure ]
    12891289webkit.org/b/103955 fast/repaint/caret-with-transformation.html [ Missing ]
     1290
     1291# Needs rebaseline after https://bugs.webkit.org/show_bug.cgi?id=106822
     1292webkit.org/b/106822 svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm [ Failure Pass ]
  • trunk/Source/WebCore/ChangeLog

    r139797 r139798  
     12013-01-15  Emil A Eklund  <eae@chromium.org>
     2
     3        REGRESSION (r121599): incorrect border scaling when zoomed
     4        https://bugs.webkit.org/show_bug.cgi?id=106944
     5
     6        Reviewed by Levi Weintraub.
     7       
     8        Fix bug in ApplyPropertyComputeLength::applyValue where zooming
     9        of non-pixel values was incorrect.
     10
     11        Test: fast/sub-pixel/zoomed-em-border.html
     12
     13        * css/StyleBuilder.cpp:
     14        (WebCore::ApplyPropertyComputeLength::applyValue):
     15
    1162013-01-15  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/Source/WebCore/css/StyleBuilder.cpp

    r139734 r139798  
    607607            // Any original result that was >= 1 should not be allowed to fall below 1.
    608608            // This keeps border lines from vanishing.
    609             length = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), 1.0);
    610             T zoomedLength = length * zoom;
    611             if (zoom < 1.0f && zoomedLength < 1.0 && length >= 1.0)
    612                 length = 1.0;
    613             else
    614                 length = zoomedLength;
     609            length = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), zoom);
     610            if (zoom < 1.0f && length < 1.0) {
     611                T originalLength = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), 1.0);
     612                if (originalLength >= 1.0)
     613                    length = 1.0;
     614            }
    615615
    616616        } else {
Note: See TracChangeset for help on using the changeset viewer.