Changeset 116069 in webkit


Ignore:
Timestamp:
May 3, 2012 10:52:37 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Antialias single-edge solid borders
https://bugs.webkit.org/show_bug.cgi?id=85031

Patch by David Barr <davidbarr@chromium.org> on 2012-05-03
Reviewed by Simon Fraser.

Source/WebCore:

Antialiasing is avoided for adjacent edges due to artifacts at the seam.
There are no such artifacts for single-edge borders so enable antialiasing.

Test: fast/css/border-solid-single-edge-antialias.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintBorder):

LayoutTests:

  • fast/css/border-solid-single-edge-antialias-expected.png: Added.
  • fast/css/border-solid-single-edge-antialias-expected.txt: Added.
  • fast/css/border-solid-single-edge-antialias.html: Added.
  • platform/chromium/test_expectations.txt:
  • platform/efl/test_expectations.txt:
  • platform/gtk/test_expectations.txt:
  • platform/mac/test_expectations.txt:
  • platform/qt/test_expectations.txt:
  • platform/win/test_expectations.txt:
Location:
trunk
Files:
3 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116068 r116069  
     12012-05-03  David Barr  <davidbarr@chromium.org>
     2
     3        Antialias single-edge solid borders
     4        https://bugs.webkit.org/show_bug.cgi?id=85031
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/css/border-solid-single-edge-antialias-expected.png: Added.
     9        * fast/css/border-solid-single-edge-antialias-expected.txt: Added.
     10        * fast/css/border-solid-single-edge-antialias.html: Added.
     11        * platform/chromium/test_expectations.txt:
     12        * platform/efl/test_expectations.txt:
     13        * platform/gtk/test_expectations.txt:
     14        * platform/mac/test_expectations.txt:
     15        * platform/qt/test_expectations.txt:
     16        * platform/win/test_expectations.txt:
     17
    1182012-05-03  Raphael Kubo da Costa  <rakuco@webkit.org>
    219
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r116047 r116069  
    38843884BUGWK85212 : ietestcenter/css3/flexbox/flexbox-layout-002.htm = IMAGE
    38853885BUGWK85213 : ietestcenter/css3/flexbox/flexbox-ordinal-group-001.htm = CRASH IMAGE
     3886
     3887// Requires rebaseline after bug 85031
     3888BUGWK85565 : fast/block/float/016.html = IMAGE
     3889BUGWK85565 WIN LINUX: fast/css/border-solid-single-edge-antialias.html = IMAGE
  • trunk/LayoutTests/platform/efl/test_expectations.txt

    r116037 r116069  
    267267BUGWK85212 : ietestcenter/css3/flexbox/flexbox-layout-002.htm = IMAGE
    268268BUGWK85213 : ietestcenter/css3/flexbox/flexbox-ordinal-group-001.htm = CRASH IMAGE
     269
     270// Requires rebaseline after bug 85031
     271BUGWK85565 : fast/block/float/016.html = IMAGE
     272BUGWK85565 : fast/css/border-solid-single-edge-antialias.html = IMAGE
  • trunk/LayoutTests/platform/gtk/test_expectations.txt

    r116037 r116069  
    15281528// End of Tests failing
    15291529//////////////////////////////////////////////////////////////////////////////////////////
     1530
     1531// Requires rebaseline after bug 85031
     1532BUGWK85565 : fast/block/float/016.html = IMAGE
     1533BUGWK85565 : fast/css/border-solid-single-edge-antialias.html = IMAGE
  • trunk/LayoutTests/platform/mac/test_expectations.txt

    r116063 r116069  
    202202BUGWK85212 : ietestcenter/css3/flexbox/flexbox-layout-002.htm = IMAGE
    203203BUGWK85213 : ietestcenter/css3/flexbox/flexbox-ordinal-group-001.htm = CRASH IMAGE
     204
     205// Requires rebaseline after bug 85031
     206BUGWK85565 : fast/block/float/016.html = IMAGE
     207BUGWK85565 : fast/css/border-solid-single-edge-antialias.html = IMAGE
  • trunk/LayoutTests/platform/qt/test_expectations.txt

    r116037 r116069  
    6565BUGWK85212 : ietestcenter/css3/flexbox/flexbox-layout-002.htm = IMAGE
    6666BUGWK85213 : ietestcenter/css3/flexbox/flexbox-ordinal-group-001.htm = CRASH IMAGE
     67
     68// Requires rebaseline after bug 85031
     69BUGWK85565 : fast/block/float/016.html = IMAGE
     70BUGWK85565 : fast/css/border-solid-single-edge-antialias.html = IMAGE
  • trunk/LayoutTests/platform/win/test_expectations.txt

    r113785 r116069  
    11// This file is intentionally left blank. Until the Apple win port supports new-run-webkit-tests (https://bugs.webkit.org/show_bug.cgi?id=38756)
    22// this file does nothing.
     3
     4// Requires rebaseline after bug 85031
     5BUGWK85565 : fast/block/float/016.html = IMAGE
     6BUGWK85565 : fast/css/border-solid-single-edge-antialias.html = IMAGE
  • trunk/Source/WebCore/ChangeLog

    r116066 r116069  
     12012-05-03  David Barr  <davidbarr@chromium.org>
     2
     3        Antialias single-edge solid borders
     4        https://bugs.webkit.org/show_bug.cgi?id=85031
     5
     6        Reviewed by Simon Fraser.
     7
     8        Antialiasing is avoided for adjacent edges due to artifacts at the seam.
     9        There are no such artifacts for single-edge borders so enable antialiasing.
     10
     11        Test: fast/css/border-solid-single-edge-antialias.html
     12
     13        * rendering/RenderBoxModelObject.cpp:
     14        (WebCore::RenderBoxModelObject::paintBorder):
     15
    1162012-05-03  Adam Barth  <abarth@webkit.org>
    217
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r115846 r116069  
    18511851    bool haveAllSolidEdges = true;
    18521852    bool haveAllDoubleEdges = true;
    1853     bool allEdgesVisible = true;
     1853    int numEdgesVisible = 4;
    18541854    bool allEdgesShareColor = true;
    18551855    int firstVisibleEdge = -1;
     
    18581858        const BorderEdge& currEdge = edges[i];
    18591859        if (currEdge.presentButInvisible()) {
    1860             allEdgesVisible = false;
     1860            --numEdgesVisible;
    18611861            allEdgesShareColor = false;
    18621862            continue;
     
    18641864       
    18651865        if (!currEdge.width) {
    1866             allEdgesVisible = false;
     1866            --numEdgesVisible;
    18671867            continue;
    18681868        }
     
    18911891    if ((haveAllSolidEdges || haveAllDoubleEdges) && allEdgesShareColor && innerBorder.isRenderable()) {
    18921892        // Fast path for drawing all solid edges and all unrounded double edges
    1893         if (allEdgesVisible && (outerBorder.isRounded() || haveAlphaColor)
     1893        if (numEdgesVisible == 4 && (outerBorder.isRounded() || haveAlphaColor)
    18941894            && (haveAllSolidEdges || (!outerBorder.isRounded() && !innerBorder.isRounded()))) {
    18951895            Path path;
     
    19501950        }
    19511951        // Avoid creating transparent layers
    1952         if (haveAllSolidEdges && !allEdgesVisible && !outerBorder.isRounded() && haveAlphaColor) {
     1952        if (haveAllSolidEdges && numEdgesVisible != 4 && !outerBorder.isRounded() && haveAlphaColor) {
    19531953            Path path;
    19541954
     
    19801980    }
    19811981
    1982     bool antialias = shouldAntialiasLines(graphicsContext);   
     1982    // If only one edge visible antialiasing doesn't create seams
     1983    bool antialias = shouldAntialiasLines(graphicsContext) || numEdgesVisible == 1;
    19831984    if (haveAlphaColor)
    19841985        paintTranslucentBorderSides(graphicsContext, style, outerBorder, innerBorder, edges, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias);
Note: See TracChangeset for help on using the changeset viewer.