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

Changeset 106303 in webkit


Ignore:
Timestamp:
Jan 30, 2012, 5:07:00 PM (15 years ago)
Author:
eae@chromium.org
Message:

Change computed style calculations to round/truncate values at query as opposed to computation time to avoid loosing precision when adjusting values for zoom.

Location:
branches/subpixellayout/Source/WebCore/css
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/subpixellayout/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r105563 r106303  
    505505}
    506506
    507 inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(int value, const RenderStyle* style, CSSValuePool* cssValuePool)
    508 {
    509     return cssValuePool->createValue(adjustForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX);
     507inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(double value, const RenderStyle* style, CSSValuePool* cssValuePool)
     508{
     509    return cssValuePool->createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX);
    510510}
    511511
  • branches/subpixellayout/Source/WebCore/css/CSSPrimitiveValue.cpp

    r105830 r106303  
    741741            break;
    742742        case CSS_PX:
    743             text = formatNumber(m_value.num) + "px";
     743            text = formatNumber(static_cast<int>(m_value.num)) + "px";
    744744            break;
    745745        case CSS_CM:
Note: See TracChangeset for help on using the changeset viewer.