⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 170646 in webkit


Ignore:
Timestamp:
Jul 1, 2014, 10:25:10 AM (12 years ago)
Author:
Alan Bujtas
Message:

Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
​https://bugs.webkit.org/show_bug.cgi?id=134491

Reviewed by Simon Fraser.

Do not early round geometry values, while computing background image position. It changes the final
subpixel values and that could lead to wrong snap positions.
pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.

Source/WebCore:
Test: fast/backgrounds/background-image-size-double-rounding.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

LayoutTests:

  • fast/backgrounds/background-image-size-double-rounding-expected.html: Added.
  • fast/backgrounds/background-image-size-double-rounding.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r170619 r170646  
     12014-07-01  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
     4        https://bugs.webkit.org/show_bug.cgi?id=134491
     5
     6        Reviewed by Simon Fraser.
     7
     8        Do not early round geometry values, while computing background image position. It changes the final
     9        subpixel values and that could lead to wrong snap positions.
     10        pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.
     11
     12        * fast/backgrounds/background-image-size-double-rounding-expected.html: Added.
     13        * fast/backgrounds/background-image-size-double-rounding.html: Added.
     14
    1152014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r170642 r170646  
     12014-07-01  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
     4        https://bugs.webkit.org/show_bug.cgi?id=134491
     5
     6        Reviewed by Simon Fraser.
     7
     8        Do not early round geometry values, while computing background image position. It changes the final
     9        subpixel values and that could lead to wrong snap positions.
     10        pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.
     11
     12        Test: fast/backgrounds/background-image-size-double-rounding.html
     13
     14        * rendering/RenderBoxModelObject.cpp:
     15        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
     16
    1172014-07-01  Pratik Solanki  <psolanki@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r169534 r170646  
    11501150    LayoutUnit availableHeight = positioningAreaSize.height() - geometry.tileSize().height();
    11511151
    1152     LayoutUnit computedXPosition = minimumValueForLength(fillLayer->xPosition(), availableWidth, true);
     1152    LayoutUnit computedXPosition = minimumValueForLength(fillLayer->xPosition(), availableWidth, false);
    11531153    if (backgroundRepeatX == RoundFill && positioningAreaSize.width() > 0 && fillTileSize.width() > 0) {
    11541154        int numTiles = std::max(1, roundToInt(positioningAreaSize.width() / fillTileSize.width()));
    … …  
    11621162    }
    11631163
    1164     LayoutUnit computedYPosition = minimumValueForLength(fillLayer->yPosition(), availableHeight, true);
     1164    LayoutUnit computedYPosition = minimumValueForLength(fillLayer->yPosition(), availableHeight, false);
    11651165    if (backgroundRepeatY == RoundFill && positioningAreaSize.height() > 0 && fillTileSize.height() > 0) {
    11661166        int numTiles = std::max(1, roundToInt(positioningAreaSize.height() / fillTileSize.height()));
    … …  
    11821182
    11831183        if (space >= 0) {
    1184             computedXPosition = minimumValueForLength(Length(), availableWidth, true);
     1184            computedXPosition = minimumValueForLength(Length(), availableWidth, false);
    11851185            geometry.setSpaceSize(LayoutSize(space, 0));
    11861186            geometry.setPhaseX(actualWidth ? actualWidth - fmodf((computedXPosition + left), actualWidth) : 0);
    … …  
    12021202
    12031203        if (space >= 0) {
    1204             computedYPosition = minimumValueForLength(Length(), availableHeight, true);
     1204            computedYPosition = minimumValueForLength(Length(), availableHeight, false);
    12051205            geometry.setSpaceSize(LayoutSize(geometry.spaceSize().width(), space));
    12061206            geometry.setPhaseY(actualHeight ? actualHeight - fmodf((computedYPosition + top), actualHeight) : 0);
Note: See TracChangeset for help on using the changeset viewer.