Changeset 122769 in webkit


Ignore:
Timestamp:
Jul 16, 2012 3:10:46 PM (12 years ago)
Author:
eae@chromium.org
Message:

Inconsistent rounding in table layout causes background color to bleed through
https://bugs.webkit.org/show_bug.cgi?id=91410

Reviewed by Eric Seidel.

Source/WebCore:

At certain zoom levels a rounding error in the table layout code cases
the table background color to bleed through between cells. Tables layout
happens on pixel bounds however the paint offset wasn't correctly rounded.

Test: fast/sub-pixel/table-rows-no-gaps.html

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::paintObject):
Round paintOffset before passing it to the paint method of the children.

LayoutTests:

Add test to ensure that the table background color doesn't bleed through
when the table and a cell are positioned on a subpixel bound.

  • fast/sub-pixel/table-rows-no-gaps-expected.html: Added.
  • fast/sub-pixel/table-rows-no-gaps.html: Added.
  • platform/chromium-linux/css1/basic/inheritance-expected.png:
  • platform/chromium-linux/plugins/embed-attributes-style-expected.png:
  • platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
  • platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png:
  • platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
  • platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
  • platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
  • platform/chromium-linux/tables/mozilla/bugs/bug73321-expected.png:

Updated expectations to match new rounding logic. The new results better
match the rendering prior to turning on subpixel layout.

  • platform/efl/Skipped:
  • platform/mac-lion/Skipped:
  • platform/mac-snowleopard/Skipped:
  • platform/mac-wk2/Skipped:
  • platform/mac/Skipped:
  • platform/qt-4.8/Skipped:
  • platform/qt/Skipped:
  • platform/win-wk2/Skipped:
  • platform/win-xp/Skipped:
  • platform/win/Skipped:
  • platform/wincairo/Skipped:
  • platform/wk2/Skipped:

Mark new test as skipped on platforms that have not enabled subpixel
layout.

Location:
trunk
Files:
2 added
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r122763 r122769  
     12012-07-16  Emil A Eklund  <eae@chromium.org>
     2
     3        Inconsistent rounding in table layout causes background color to bleed through
     4        https://bugs.webkit.org/show_bug.cgi?id=91410
     5
     6        Reviewed by Eric Seidel.
     7
     8        Add test to ensure that the table background color doesn't bleed through
     9        when the table and a cell are positioned on a subpixel bound.
     10
     11        * fast/sub-pixel/table-rows-no-gaps-expected.html: Added.
     12        * fast/sub-pixel/table-rows-no-gaps.html: Added.
     13        * platform/chromium-linux/css1/basic/inheritance-expected.png:
     14        * platform/chromium-linux/plugins/embed-attributes-style-expected.png:
     15        * platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
     16        * platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png:
     17        * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
     18        * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
     19        * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
     20        * platform/chromium-linux/tables/mozilla/bugs/bug73321-expected.png:
     21        Updated expectations to match new rounding logic. The new results better
     22        match the rendering prior to turning on subpixel layout.
     23       
     24        * platform/efl/Skipped:
     25        * platform/mac-lion/Skipped:
     26        * platform/mac-snowleopard/Skipped:
     27        * platform/mac-wk2/Skipped:
     28        * platform/mac/Skipped:
     29        * platform/qt-4.8/Skipped:
     30        * platform/qt/Skipped:
     31        * platform/win-wk2/Skipped:
     32        * platform/win-xp/Skipped:
     33        * platform/win/Skipped:
     34        * platform/wincairo/Skipped:
     35        * platform/wk2/Skipped:
     36        Mark new test as skipped on platforms that have not enabled subpixel
     37        layout.
     38
    1392012-07-16  W. James MacLean  <wjmaclean@chromium.org>
    240
  • trunk/LayoutTests/platform/efl/Skipped

    r122314 r122769  
    11121112fast/sub-pixel/client-rect-has-subpixel-precision.html
    11131113fast/sub-pixel/client-width-height-snapping.html
     1114fast/sub-pixel/file-upload-control-at-fractional-offset.html
    11141115fast/sub-pixel/float-containing-block-with-margin.html
    11151116fast/sub-pixel/float-with-right-margin-zoom.html
     
    11181119fast/sub-pixel/inline-block-with-padding.html
    11191120fast/sub-pixel/layout-boxes-with-zoom.html
     1121fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    11201122fast/sub-pixel/size-of-box-with-zoom.html
    1121 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    1122 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     1123fast/sub-pixel/table-rows-no-gaps.html
    11231124
    11241125# This should only be a layer change
  • trunk/LayoutTests/platform/mac-lion/Skipped

    r120357 r122769  
    105105fast/sub-pixel/client-rect-has-subpixel-precision.html
    106106fast/sub-pixel/client-width-height-snapping.html
     107fast/sub-pixel/file-upload-control-at-fractional-offset.html
    107108fast/sub-pixel/float-containing-block-with-margin.html
    108109fast/sub-pixel/float-with-right-margin-zoom.html
     
    111112fast/sub-pixel/inline-block-with-padding.html
    112113fast/sub-pixel/layout-boxes-with-zoom.html
     114fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    113115fast/sub-pixel/size-of-box-with-zoom.html
    114 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    115 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     116fast/sub-pixel/table-rows-no-gaps.html
    116117
    117118# This media test always failed on Lion
  • trunk/LayoutTests/platform/mac-snowleopard/Skipped

    r120357 r122769  
    199199fast/sub-pixel/client-rect-has-subpixel-precision.html
    200200fast/sub-pixel/client-width-height-snapping.html
     201fast/sub-pixel/file-upload-control-at-fractional-offset.html
    201202fast/sub-pixel/float-containing-block-with-margin.html
    202203fast/sub-pixel/float-with-right-margin-zoom.html
     
    205206fast/sub-pixel/inline-block-with-padding.html
    206207fast/sub-pixel/layout-boxes-with-zoom.html
     208fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    207209fast/sub-pixel/size-of-box-with-zoom.html
    208 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    209 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     210fast/sub-pixel/table-rows-no-gaps.html
    210211
    211212# Frame::findString does nothing on pages that prevent selection
  • trunk/LayoutTests/platform/mac-wk2/Skipped

    r121440 r122769  
    205205fast/sub-pixel/client-rect-has-subpixel-precision.html
    206206fast/sub-pixel/client-width-height-snapping.html
     207fast/sub-pixel/file-upload-control-at-fractional-offset.html
    207208fast/sub-pixel/float-containing-block-with-margin.html
    208209fast/sub-pixel/float-with-right-margin-zoom.html
     
    211212fast/sub-pixel/inline-block-with-padding.html
    212213fast/sub-pixel/layout-boxes-with-zoom.html
     214fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    213215fast/sub-pixel/size-of-box-with-zoom.html
    214 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    215 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     216fast/sub-pixel/table-rows-no-gaps.html
    216217
    217218# fast/events/pagehide-timeout.html, pageshow-pagehide-on-back-cached-with-frames.html, and
  • trunk/LayoutTests/platform/mac/Skipped

    r122528 r122769  
    811811fast/sub-pixel/client-rect-has-subpixel-precision.html
    812812fast/sub-pixel/client-width-height-snapping.html
     813fast/sub-pixel/file-upload-control-at-fractional-offset.html
    813814fast/sub-pixel/float-containing-block-with-margin.html
    814815fast/sub-pixel/float-with-right-margin-zoom.html
     
    817818fast/sub-pixel/inline-block-with-padding.html
    818819fast/sub-pixel/layout-boxes-with-zoom.html
     820fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    819821fast/sub-pixel/size-of-box-with-zoom.html
    820 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    821 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     822fast/sub-pixel/table-rows-no-gaps.html
    822823
    823824# No CORS support for media elements is implemented yet.
  • trunk/LayoutTests/platform/qt-4.8/Skipped

    r121971 r122769  
    9292fast/sub-pixel/client-rect-has-subpixel-precision.html
    9393fast/sub-pixel/client-width-height-snapping.html
     94fast/sub-pixel/file-upload-control-at-fractional-offset.html
    9495fast/sub-pixel/float-containing-block-with-margin.html
    9596fast/sub-pixel/float-with-right-margin-zoom.html
     
    9899fast/sub-pixel/inline-block-with-padding.html
    99100fast/sub-pixel/layout-boxes-with-zoom.html
     101fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    100102fast/sub-pixel/size-of-box-with-zoom.html
    101 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    102 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     103fast/sub-pixel/table-rows-no-gaps.html
    103104
    104105# SVG Fonts are only supported when using QRawFont, which is not
  • trunk/LayoutTests/platform/qt/Skipped

    r122724 r122769  
    224224fast/sub-pixel/client-rect-has-subpixel-precision.html
    225225fast/sub-pixel/client-width-height-snapping.html
     226fast/sub-pixel/file-upload-control-at-fractional-offset.html
    226227fast/sub-pixel/float-containing-block-with-margin.html
    227228fast/sub-pixel/float-with-right-margin-zoom.html
     
    230231fast/sub-pixel/inline-block-with-padding.html
    231232fast/sub-pixel/layout-boxes-with-zoom.html
     233fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    232234fast/sub-pixel/size-of-box-with-zoom.html
    233 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    234 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     235fast/sub-pixel/table-rows-no-gaps.html
    235236
    236237# CSS Regions support not yet enabled. http://webkit.org/b/57312
  • trunk/LayoutTests/platform/win-wk2/Skipped

    r121913 r122769  
    938938fast/sub-pixel/client-rect-has-subpixel-precision.html
    939939fast/sub-pixel/client-width-height-snapping.html
     940fast/sub-pixel/file-upload-control-at-fractional-offset.html
    940941fast/sub-pixel/float-containing-block-with-margin.html
    941942fast/sub-pixel/float-with-right-margin-zoom.html
     
    944945fast/sub-pixel/inline-block-with-padding.html
    945946fast/sub-pixel/layout-boxes-with-zoom.html
     947fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    946948fast/sub-pixel/size-of-box-with-zoom.html
    947 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    948 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     949fast/sub-pixel/table-rows-no-gaps.html
    949950
    950951# HiDPI tests require test infrastructure enhancements
  • trunk/LayoutTests/platform/win-xp/Skipped

    r119659 r122769  
    3838fast/sub-pixel/client-rect-has-subpixel-precision.html
    3939fast/sub-pixel/client-width-height-snapping.html
     40fast/sub-pixel/file-upload-control-at-fractional-offset.html
    4041fast/sub-pixel/float-containing-block-with-margin.html
    4142fast/sub-pixel/float-with-right-margin-zoom.html
     
    4445fast/sub-pixel/inline-block-with-padding.html
    4546fast/sub-pixel/layout-boxes-with-zoom.html
     47fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    4648fast/sub-pixel/size-of-box-with-zoom.html
    47 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    48 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     49fast/sub-pixel/table-rows-no-gaps.html
    4950
    5051# REGRESSION (r83928 or before): Some tests failing assertions in MarkStack::internalAppend / MarkStack::drain
  • trunk/LayoutTests/platform/win/Skipped

    r122668 r122769  
    17301730fast/sub-pixel/client-rect-has-subpixel-precision.html
    17311731fast/sub-pixel/client-width-height-snapping.html
     1732fast/sub-pixel/file-upload-control-at-fractional-offset.html
    17321733fast/sub-pixel/float-containing-block-with-margin.html
    17331734fast/sub-pixel/float-with-right-margin-zoom.html
     
    17361737fast/sub-pixel/inline-block-with-padding.html
    17371738fast/sub-pixel/layout-boxes-with-zoom.html
     1739fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    17381740fast/sub-pixel/size-of-box-with-zoom.html
    1739 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    1740 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     1741fast/sub-pixel/table-rows-no-gaps.html
    17411742
    17421743# No CORS support for media elements is implemented yet.
  • trunk/LayoutTests/platform/wincairo/Skipped

    r122668 r122769  
    20952095fast/sub-pixel/client-rect-has-subpixel-precision.html
    20962096fast/sub-pixel/client-width-height-snapping.html
     2097fast/sub-pixel/file-upload-control-at-fractional-offset.html
    20972098fast/sub-pixel/float-containing-block-with-margin.html
    20982099fast/sub-pixel/float-with-right-margin-zoom.html
     
    21012102fast/sub-pixel/inline-block-with-padding.html
    21022103fast/sub-pixel/layout-boxes-with-zoom.html
     2104fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    21032105fast/sub-pixel/size-of-box-with-zoom.html
    2104 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
    2105 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     2106fast/sub-pixel/table-rows-no-gaps.html
    21062107
    21072108#Battery Status API is not implemented.
  • trunk/LayoutTests/platform/wk2/Skipped

    r122668 r122769  
    8888fast/sub-pixel/client-rect-has-subpixel-precision.html
    8989fast/sub-pixel/client-width-height-snapping.html
     90fast/sub-pixel/file-upload-control-at-fractional-offset.html
    9091fast/sub-pixel/float-containing-block-with-margin.html
    9192fast/sub-pixel/float-with-right-margin-zoom.html
     
    9495fast/sub-pixel/inline-block-with-padding.html
    9596fast/sub-pixel/layout-boxes-with-zoom.html
     97fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    9698fast/sub-pixel/size-of-box-with-zoom.html
    97 fast/sub-pixel/selection-gaps-at-fractional-offsets.html
    98 fast/sub-pixel/file-upload-control-at-fractional-offset.html
     99fast/sub-pixel/table-rows-no-gaps.html
    99100
    100101# CONSOLE MESSAGE: line 0: SVG animation pause API missing!
  • trunk/Source/WebCore/ChangeLog

    r122767 r122769  
     12012-07-16  Emil A Eklund  <eae@chromium.org>
     2
     3        Inconsistent rounding in table layout causes background color to bleed through
     4        https://bugs.webkit.org/show_bug.cgi?id=91410
     5
     6        Reviewed by Eric Seidel.
     7
     8        At certain zoom levels a rounding error in the table layout code cases
     9        the table background color to bleed through between cells. Tables layout
     10        happens on pixel bounds however the paint offset wasn't correctly rounded.
     11
     12        Test: fast/sub-pixel/table-rows-no-gaps.html
     13
     14        * rendering/RenderTable.cpp:
     15        (WebCore::RenderTable::paintObject):
     16        Round paintOffset before passing it to the paint method of the children.
     17
    1182012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
    219
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r122636 r122769  
    576576    info.updatePaintingRootForChildren(this);
    577577
     578    IntPoint alignedOffset = roundedIntPoint(paintOffset);
     579
    578580    for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    579581        if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child->isTableCaption())) {
    580             LayoutPoint childPoint = flipForWritingModeForChild(toRenderBox(child), paintOffset);
     582            LayoutPoint childPoint = flipForWritingModeForChild(toRenderBox(child), alignedOffset);
    581583            child->paint(info, childPoint);
    582584        }
Note: See TracChangeset for help on using the changeset viewer.