haikuwebkit/LayoutTests/fast/sub-pixel/layout-boxes-with-zoom-expe...

44 lines
2.7 KiB
HTML
Raw Permalink Normal View History

[meta] Switch away from integers representing pixels for layout/event handling/rendering https://bugs.webkit.org/show_bug.cgi?id=60318 Source/WebCore: Patch by Levi Weintraub <leviw@chromium.org> and Emil A Eklund <eae@chromium.org> on 2012-04-23 Reviewed by Eric Seidel. Swapping the LayoutUnit backend to FractionalLayoutUnit from int. FractionalLayoutUnit is a new type that uses an integer to represent a fraction of a pixel. We're also adding a feature flag -- ENABLE_SUBPIXEL_LAYOUT -- that toggles this fraction between 1/1 and 1/60. Initially, all platforms will default to subpixel layout being off, so FractionalLayoutUnits will effectively continue to act as integers. With ENABLE_SUBPIXEL_LAYOUT turned on, FractionalLayoutUnits accumulate error from sub-pixel CSS values and applied zooming, and painting uses pixel-snapping to align these values to pixels. See http://trac.webkit.org/wiki/LayoutUnit for details. In a number of previous patches, LayoutUnits were plumbed throughout the rendering tree to prepare for this change. This included a number of functions in LayoutTypes.h and the IntRect/Point/Size classes that were effectively no-ops while LayoutUnits were integers. Subsequent patches will remove unnecessary versions of these functions; see http://webkit.org/b/84616 for tracking these changes. Tests: fast/sub-pixel/client-width-height-snapping.html fast/sub-pixel/layout-boxes-with-zoom.html fast/sub-pixel/size-of-box-with-zoom.html * WebCore.exp.in: Updating function signatures that expose FractionalLayoutUnits. * WebCore.xcodeproj/project.pbxproj: Adding missing FractionalLayoutPoint.h header. * css/CSSComputedStyleDeclaration.cpp: (WebCore::zoomAdjustedPixelValue): Using adjustFloatForAbsoluteZoom instead of int to make use of extra precision before returning the pixel value. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): No longer rounds for imprecise conversion when sub-pixel layout is enabled. (WebCore::CSSPrimitiveValue::customCssText): Returning integer values for pixels. * dom/Element.cpp: (WebCore::adjustForLocalZoom): Using rounding instead of incrementing the value before adjusting to account for truncation when sub-pixel layout is enabled. * page/SpatialNavigation.cpp: (WebCore::distanceDataForNode): Using FractionalLayoutUnit::abs instead of std::abs. * platform/FractionalLayoutUnit.h: Adding some missing operators and a flag around the constant denominator to switch it between 1/1 and 1/60 depending on the feature flag. * platform/Length.h: Changing the default type for value to float, and adding intValue since this more closely matches usage in a sub-pixel layout world. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): Using minimumIntValueForLength in this platform code instead of LayoutUnits. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): * rendering/LayoutTypes.h: This file contains the actual switch for changing LayoutUnits to be FractionalLayoutUnits. Also updating stub methods with their proper implementations. * rendering/PaintInfo.h: (WebCore::PaintInfo::infiniteRect): Ensuring the infiniteRect doesn't overflow the FractionalLayoutUnit bounds. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Switch to FractionalLayoutUnit's abs function instead of std::abs. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Add rounding for setting the phase of the background geometry before applying modulo from the tile size. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Stop applying flex when we have less than a pixel to distribute. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::backgroundClipRect): Replace PaintInfo::infiniteRect with the LayoutRect equivalent. * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::rangeIntersectsRect): Using FractionalLayoutUnit::abs instead of std::abs. * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Ditto. * rendering/RenderObject.h: (WebCore): Removing unnecessary adjustForAbsoluteZoom function. (WebCore::RenderObject::outlineSize): Outlines remain ints. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleOrColLogicalWidth): Build fix. Using floats because colWidthSum is a Length which uses floats. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): Explicit templatization for max. * rendering/RenderTreeAsText.cpp: Adding code to minimize test expectation churn. It may be worth outputting float values in test expectations, but this isn't done with the inline box tree yet, either. * rendering/RenderTreeAsText.h: (WebCore): Adding a FractionalLayoutPoint operator. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::updateWidgetGeometry): Adding missing pixel snapping, and switching absoluteContentBox to an IntRect, as this is what boundingBox returns. * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writePositionAndStyle): Adding an enclosingIntRect for consistency with old results. LayoutTests: Reviewed by Eric Seidel. * fast/sub-pixel: Added. * fast/sub-pixel/client-width-height-snapping-expected.txt: Added. * fast/sub-pixel/client-width-height-snapping.html: Added. * fast/sub-pixel/size-of-box-with-zoom-expected.html: Added. * fast/sub-pixel/size-of-box-with-zoom.html: Added. * fast/sub-pixel/layout-boxes-with-zoom-expected.html: Added. * fast/sub-pixel/layout-boxes-with-zoom.html: Added. Canonical link: https://commits.webkit.org/103083@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-03 21:07:32 +00:00
<!DOCTYPE html>
<html>
<head>
<title>layout zoom test</title>
<style>
#test {
width: 500px;
height: 1500px;
background: navy;
Change FractionalLayoutUnit denominator to 64 to reduce precision loss when converting to floating point https://bugs.webkit.org/show_bug.cgi?id=96139 Reviewed by Eric Seidel. Source/WebCore: We currently use a denominator of 60 in FractionalLayoutUnit, this causes a loss of precision when converting to floating point. By changing the denominator to 64 the values can better be represented as floating point (without loosing any precision for many values), this in turn allows us to remove the tolerance hack in the line break logic and avoids problems caused by this precision for web sites that do their own layout based on element measurements. Test: fast/sub-pixel/float-precision.html * platform/FractionalLayoutUnit.h: Change denominator to 64. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::fitsOnLine): Remove epsilon tolerance hack. LayoutTests: Add new precision test and adjust expectations for existing tests as needed. * fast/sub-pixel/float-precision-expected.html: Added. * fast/sub-pixel/float-precision.html: Added. * fast/sub-pixel/float-wrap-with-subpixel-top-expected.html: * fast/sub-pixel/float-wrap-with-subpixel-top.html: * fast/sub-pixel/layout-boxes-with-zoom-expected.html: * fast/sub-pixel/layout-boxes-with-zoom.html: * fast/sub-pixel/size-of-box-with-zoom-expected.html: * fast/sub-pixel/size-of-box-with-zoom.html: * platform/chromium-linux/css1/formatting_model/inline_elements-expected.txt: * platform/chromium-linux/css2.1/t090501-c414-flt-03-b-g-expected.txt: * platform/chromium-linux/fast/backgrounds/background-position-parsing-expected.txt: * platform/chromium-linux/fast/block/margin-collapse/103-expected.txt: * platform/chromium-linux/fast/borders/border-antialiasing-expected.png: * platform/chromium-linux/fast/borders/border-radius-huge-assert-expected.png: * platform/chromium-linux/fast/box-sizing/box-sizing-expected.png: * platform/chromium-linux/fast/css/bidi-override-in-anonymous-block-expected.txt: * platform/chromium-linux/fast/css/hsl-color-expected.png: * platform/chromium-linux/fast/dom/HTMLMeterElement/meter-styles-expected.png: * platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.txt: * platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.txt: * platform/chromium-linux/fast/forms/date/date-appearance-expected.png: * platform/chromium-linux/fast/forms/form-element-geometry-expected.txt: * platform/chromium-linux/fast/html/details-add-summary-1-expected.png: * platform/chromium-linux/fast/html/details-add-summary-10-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-2-expected.png: * platform/chromium-linux/fast/html/details-add-summary-3-expected.png: * platform/chromium-linux/fast/html/details-add-summary-4-expected.png: * platform/chromium-linux/fast/html/details-add-summary-5-expected.png: * platform/chromium-linux/fast/html/details-add-summary-6-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-7-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-8-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-9-and-click-expected.png: * platform/chromium-linux/fast/html/details-marker-style-expected.png: * platform/chromium-linux/fast/html/details-no-summary1-expected.png: * platform/chromium-linux/fast/html/details-no-summary3-expected.png: * platform/chromium-linux/fast/html/details-open-javascript-expected.png: * platform/chromium-linux/fast/html/details-open1-expected.png: * platform/chromium-linux/fast/html/details-open3-expected.png: * platform/chromium-linux/fast/html/details-open5-expected.png: * platform/chromium-linux/fast/html/details-position-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-1-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-2-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-3-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-4-and-click-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-5-and-click-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-6-and-click-expected.png: * platform/chromium-linux/fast/html/details-writing-mode-expected.png: * platform/chromium-linux/fast/multicol/vertical-rl/float-multicol-expected.png: * platform/chromium-linux/fast/parser/style-script-head-test-expected.txt: * platform/chromium-linux/fast/text/line-breaks-expected.txt: * platform/chromium-linux/svg/custom/use-css-no-effect-on-shadow-tree-expected.png: * platform/chromium-linux/svg/custom/viewBox-hit-expected.png: * platform/chromium-linux/svg/wicd/rightsizing-grid-expected.png: * platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.png: * platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.txt: * platform/chromium-linux/svg/zoom/page/zoom-background-images-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-hixie-mixed-009-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-mask-with-percentages-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-svg-float-border-padding-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-2-expected.txt: * 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-absolute-size-expected.txt: * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png: * platform/chromium-linux/svg/zoom/text/zoom-svg-float-border-padding-expected.png: * platform/chromium-linux/tables/mozilla/bugs/bug2479-4-expected.txt: * platform/chromium-linux/tables/mozilla/bugs/bug46480-1-expected.png: * platform/chromium-linux/tables/mozilla/bugs/bug46480-2-expected.png: * platform/chromium-win/compositing/visibility/visibility-image-layers-dynamic-expected.txt: * platform/chromium-win/css1/formatting_model/vertical_formatting-expected.txt: * platform/chromium-win/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt: * platform/chromium-win/fast/block/float/shrink-to-avoid-float-complexity-expected.txt: * platform/chromium-win/fast/css/hsl-color-expected.txt: * platform/chromium-win/fast/dom/HTMLMeterElement/meter-optimums-expected.txt: * platform/chromium-win/fast/dom/HTMLMeterElement/meter-styles-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-columns-child-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-nested-columns-child-expected.txt: * platform/chromium-win/fast/multicol/span/span-margin-collapsing-expected.txt: * platform/chromium-win/fast/text/whitespace/024-expected.txt: * platform/chromium-win/svg/wicd/rightsizing-grid-expected.txt: * platform/chromium-win/svg/zoom/page/zoom-hixie-mixed-009-expected.txt: * platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt: * platform/chromium-win/tables/mozilla/bugs/bug2479-1-expected.txt: * platform/chromium-win/tables/mozilla/other/test3-expected.txt: * platform/chromium-win/tables/mozilla_expected_failures/bugs/bug91057-expected.txt: * platform/chromium/fast/css/getComputedStyle/getComputedStyle-margin-percentage-expected.txt: Canonical link: https://commits.webkit.org/115672@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-09-26 16:25:41 +00:00
zoom: 0.05;
[meta] Switch away from integers representing pixels for layout/event handling/rendering https://bugs.webkit.org/show_bug.cgi?id=60318 Source/WebCore: Patch by Levi Weintraub <leviw@chromium.org> and Emil A Eklund <eae@chromium.org> on 2012-04-23 Reviewed by Eric Seidel. Swapping the LayoutUnit backend to FractionalLayoutUnit from int. FractionalLayoutUnit is a new type that uses an integer to represent a fraction of a pixel. We're also adding a feature flag -- ENABLE_SUBPIXEL_LAYOUT -- that toggles this fraction between 1/1 and 1/60. Initially, all platforms will default to subpixel layout being off, so FractionalLayoutUnits will effectively continue to act as integers. With ENABLE_SUBPIXEL_LAYOUT turned on, FractionalLayoutUnits accumulate error from sub-pixel CSS values and applied zooming, and painting uses pixel-snapping to align these values to pixels. See http://trac.webkit.org/wiki/LayoutUnit for details. In a number of previous patches, LayoutUnits were plumbed throughout the rendering tree to prepare for this change. This included a number of functions in LayoutTypes.h and the IntRect/Point/Size classes that were effectively no-ops while LayoutUnits were integers. Subsequent patches will remove unnecessary versions of these functions; see http://webkit.org/b/84616 for tracking these changes. Tests: fast/sub-pixel/client-width-height-snapping.html fast/sub-pixel/layout-boxes-with-zoom.html fast/sub-pixel/size-of-box-with-zoom.html * WebCore.exp.in: Updating function signatures that expose FractionalLayoutUnits. * WebCore.xcodeproj/project.pbxproj: Adding missing FractionalLayoutPoint.h header. * css/CSSComputedStyleDeclaration.cpp: (WebCore::zoomAdjustedPixelValue): Using adjustFloatForAbsoluteZoom instead of int to make use of extra precision before returning the pixel value. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): No longer rounds for imprecise conversion when sub-pixel layout is enabled. (WebCore::CSSPrimitiveValue::customCssText): Returning integer values for pixels. * dom/Element.cpp: (WebCore::adjustForLocalZoom): Using rounding instead of incrementing the value before adjusting to account for truncation when sub-pixel layout is enabled. * page/SpatialNavigation.cpp: (WebCore::distanceDataForNode): Using FractionalLayoutUnit::abs instead of std::abs. * platform/FractionalLayoutUnit.h: Adding some missing operators and a flag around the constant denominator to switch it between 1/1 and 1/60 depending on the feature flag. * platform/Length.h: Changing the default type for value to float, and adding intValue since this more closely matches usage in a sub-pixel layout world. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): Using minimumIntValueForLength in this platform code instead of LayoutUnits. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): * rendering/LayoutTypes.h: This file contains the actual switch for changing LayoutUnits to be FractionalLayoutUnits. Also updating stub methods with their proper implementations. * rendering/PaintInfo.h: (WebCore::PaintInfo::infiniteRect): Ensuring the infiniteRect doesn't overflow the FractionalLayoutUnit bounds. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Switch to FractionalLayoutUnit's abs function instead of std::abs. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Add rounding for setting the phase of the background geometry before applying modulo from the tile size. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Stop applying flex when we have less than a pixel to distribute. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::backgroundClipRect): Replace PaintInfo::infiniteRect with the LayoutRect equivalent. * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::rangeIntersectsRect): Using FractionalLayoutUnit::abs instead of std::abs. * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Ditto. * rendering/RenderObject.h: (WebCore): Removing unnecessary adjustForAbsoluteZoom function. (WebCore::RenderObject::outlineSize): Outlines remain ints. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleOrColLogicalWidth): Build fix. Using floats because colWidthSum is a Length which uses floats. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): Explicit templatization for max. * rendering/RenderTreeAsText.cpp: Adding code to minimize test expectation churn. It may be worth outputting float values in test expectations, but this isn't done with the inline box tree yet, either. * rendering/RenderTreeAsText.h: (WebCore): Adding a FractionalLayoutPoint operator. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::updateWidgetGeometry): Adding missing pixel snapping, and switching absoluteContentBox to an IntRect, as this is what boundingBox returns. * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writePositionAndStyle): Adding an enclosingIntRect for consistency with old results. LayoutTests: Reviewed by Eric Seidel. * fast/sub-pixel: Added. * fast/sub-pixel/client-width-height-snapping-expected.txt: Added. * fast/sub-pixel/client-width-height-snapping.html: Added. * fast/sub-pixel/size-of-box-with-zoom-expected.html: Added. * fast/sub-pixel/size-of-box-with-zoom.html: Added. * fast/sub-pixel/layout-boxes-with-zoom-expected.html: Added. * fast/sub-pixel/layout-boxes-with-zoom.html: Added. Canonical link: https://commits.webkit.org/103083@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-03 21:07:32 +00:00
}
</style>
</head>
<body>
<div id="test"></div>
<div id="console">
The box above should be navy blue with no banding effects.<br>
PASS: With zoom of 100% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 110% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 125% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 133% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 150% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 166% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 175% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 200% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 250% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 300% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 400% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 500% bottom edge of last child lines up with bottom edge of container.<br>
Change FractionalLayoutUnit denominator to 64 to reduce precision loss when converting to floating point https://bugs.webkit.org/show_bug.cgi?id=96139 Reviewed by Eric Seidel. Source/WebCore: We currently use a denominator of 60 in FractionalLayoutUnit, this causes a loss of precision when converting to floating point. By changing the denominator to 64 the values can better be represented as floating point (without loosing any precision for many values), this in turn allows us to remove the tolerance hack in the line break logic and avoids problems caused by this precision for web sites that do their own layout based on element measurements. Test: fast/sub-pixel/float-precision.html * platform/FractionalLayoutUnit.h: Change denominator to 64. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::fitsOnLine): Remove epsilon tolerance hack. LayoutTests: Add new precision test and adjust expectations for existing tests as needed. * fast/sub-pixel/float-precision-expected.html: Added. * fast/sub-pixel/float-precision.html: Added. * fast/sub-pixel/float-wrap-with-subpixel-top-expected.html: * fast/sub-pixel/float-wrap-with-subpixel-top.html: * fast/sub-pixel/layout-boxes-with-zoom-expected.html: * fast/sub-pixel/layout-boxes-with-zoom.html: * fast/sub-pixel/size-of-box-with-zoom-expected.html: * fast/sub-pixel/size-of-box-with-zoom.html: * platform/chromium-linux/css1/formatting_model/inline_elements-expected.txt: * platform/chromium-linux/css2.1/t090501-c414-flt-03-b-g-expected.txt: * platform/chromium-linux/fast/backgrounds/background-position-parsing-expected.txt: * platform/chromium-linux/fast/block/margin-collapse/103-expected.txt: * platform/chromium-linux/fast/borders/border-antialiasing-expected.png: * platform/chromium-linux/fast/borders/border-radius-huge-assert-expected.png: * platform/chromium-linux/fast/box-sizing/box-sizing-expected.png: * platform/chromium-linux/fast/css/bidi-override-in-anonymous-block-expected.txt: * platform/chromium-linux/fast/css/hsl-color-expected.png: * platform/chromium-linux/fast/dom/HTMLMeterElement/meter-styles-expected.png: * platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.txt: * platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.txt: * platform/chromium-linux/fast/forms/date/date-appearance-expected.png: * platform/chromium-linux/fast/forms/form-element-geometry-expected.txt: * platform/chromium-linux/fast/html/details-add-summary-1-expected.png: * platform/chromium-linux/fast/html/details-add-summary-10-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-2-expected.png: * platform/chromium-linux/fast/html/details-add-summary-3-expected.png: * platform/chromium-linux/fast/html/details-add-summary-4-expected.png: * platform/chromium-linux/fast/html/details-add-summary-5-expected.png: * platform/chromium-linux/fast/html/details-add-summary-6-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-7-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-8-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-9-and-click-expected.png: * platform/chromium-linux/fast/html/details-marker-style-expected.png: * platform/chromium-linux/fast/html/details-no-summary1-expected.png: * platform/chromium-linux/fast/html/details-no-summary3-expected.png: * platform/chromium-linux/fast/html/details-open-javascript-expected.png: * platform/chromium-linux/fast/html/details-open1-expected.png: * platform/chromium-linux/fast/html/details-open3-expected.png: * platform/chromium-linux/fast/html/details-open5-expected.png: * platform/chromium-linux/fast/html/details-position-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-1-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-2-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-3-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-4-and-click-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-5-and-click-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-6-and-click-expected.png: * platform/chromium-linux/fast/html/details-writing-mode-expected.png: * platform/chromium-linux/fast/multicol/vertical-rl/float-multicol-expected.png: * platform/chromium-linux/fast/parser/style-script-head-test-expected.txt: * platform/chromium-linux/fast/text/line-breaks-expected.txt: * platform/chromium-linux/svg/custom/use-css-no-effect-on-shadow-tree-expected.png: * platform/chromium-linux/svg/custom/viewBox-hit-expected.png: * platform/chromium-linux/svg/wicd/rightsizing-grid-expected.png: * platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.png: * platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.txt: * platform/chromium-linux/svg/zoom/page/zoom-background-images-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-hixie-mixed-009-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-mask-with-percentages-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-svg-float-border-padding-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-2-expected.txt: * 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-absolute-size-expected.txt: * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png: * platform/chromium-linux/svg/zoom/text/zoom-svg-float-border-padding-expected.png: * platform/chromium-linux/tables/mozilla/bugs/bug2479-4-expected.txt: * platform/chromium-linux/tables/mozilla/bugs/bug46480-1-expected.png: * platform/chromium-linux/tables/mozilla/bugs/bug46480-2-expected.png: * platform/chromium-win/compositing/visibility/visibility-image-layers-dynamic-expected.txt: * platform/chromium-win/css1/formatting_model/vertical_formatting-expected.txt: * platform/chromium-win/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt: * platform/chromium-win/fast/block/float/shrink-to-avoid-float-complexity-expected.txt: * platform/chromium-win/fast/css/hsl-color-expected.txt: * platform/chromium-win/fast/dom/HTMLMeterElement/meter-optimums-expected.txt: * platform/chromium-win/fast/dom/HTMLMeterElement/meter-styles-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-columns-child-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-nested-columns-child-expected.txt: * platform/chromium-win/fast/multicol/span/span-margin-collapsing-expected.txt: * platform/chromium-win/fast/text/whitespace/024-expected.txt: * platform/chromium-win/svg/wicd/rightsizing-grid-expected.txt: * platform/chromium-win/svg/zoom/page/zoom-hixie-mixed-009-expected.txt: * platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt: * platform/chromium-win/tables/mozilla/bugs/bug2479-1-expected.txt: * platform/chromium-win/tables/mozilla/other/test3-expected.txt: * platform/chromium-win/tables/mozilla_expected_failures/bugs/bug91057-expected.txt: * platform/chromium/fast/css/getComputedStyle/getComputedStyle-margin-percentage-expected.txt: Canonical link: https://commits.webkit.org/115672@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-09-26 16:25:41 +00:00
PASS: With zoom of 750% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 1000% bottom edge of last child lines up with bottom edge of container.<br>
[meta] Switch away from integers representing pixels for layout/event handling/rendering https://bugs.webkit.org/show_bug.cgi?id=60318 Source/WebCore: Patch by Levi Weintraub <leviw@chromium.org> and Emil A Eklund <eae@chromium.org> on 2012-04-23 Reviewed by Eric Seidel. Swapping the LayoutUnit backend to FractionalLayoutUnit from int. FractionalLayoutUnit is a new type that uses an integer to represent a fraction of a pixel. We're also adding a feature flag -- ENABLE_SUBPIXEL_LAYOUT -- that toggles this fraction between 1/1 and 1/60. Initially, all platforms will default to subpixel layout being off, so FractionalLayoutUnits will effectively continue to act as integers. With ENABLE_SUBPIXEL_LAYOUT turned on, FractionalLayoutUnits accumulate error from sub-pixel CSS values and applied zooming, and painting uses pixel-snapping to align these values to pixels. See http://trac.webkit.org/wiki/LayoutUnit for details. In a number of previous patches, LayoutUnits were plumbed throughout the rendering tree to prepare for this change. This included a number of functions in LayoutTypes.h and the IntRect/Point/Size classes that were effectively no-ops while LayoutUnits were integers. Subsequent patches will remove unnecessary versions of these functions; see http://webkit.org/b/84616 for tracking these changes. Tests: fast/sub-pixel/client-width-height-snapping.html fast/sub-pixel/layout-boxes-with-zoom.html fast/sub-pixel/size-of-box-with-zoom.html * WebCore.exp.in: Updating function signatures that expose FractionalLayoutUnits. * WebCore.xcodeproj/project.pbxproj: Adding missing FractionalLayoutPoint.h header. * css/CSSComputedStyleDeclaration.cpp: (WebCore::zoomAdjustedPixelValue): Using adjustFloatForAbsoluteZoom instead of int to make use of extra precision before returning the pixel value. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): No longer rounds for imprecise conversion when sub-pixel layout is enabled. (WebCore::CSSPrimitiveValue::customCssText): Returning integer values for pixels. * dom/Element.cpp: (WebCore::adjustForLocalZoom): Using rounding instead of incrementing the value before adjusting to account for truncation when sub-pixel layout is enabled. * page/SpatialNavigation.cpp: (WebCore::distanceDataForNode): Using FractionalLayoutUnit::abs instead of std::abs. * platform/FractionalLayoutUnit.h: Adding some missing operators and a flag around the constant denominator to switch it between 1/1 and 1/60 depending on the feature flag. * platform/Length.h: Changing the default type for value to float, and adding intValue since this more closely matches usage in a sub-pixel layout world. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): Using minimumIntValueForLength in this platform code instead of LayoutUnits. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): * rendering/LayoutTypes.h: This file contains the actual switch for changing LayoutUnits to be FractionalLayoutUnits. Also updating stub methods with their proper implementations. * rendering/PaintInfo.h: (WebCore::PaintInfo::infiniteRect): Ensuring the infiniteRect doesn't overflow the FractionalLayoutUnit bounds. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Switch to FractionalLayoutUnit's abs function instead of std::abs. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Add rounding for setting the phase of the background geometry before applying modulo from the tile size. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Stop applying flex when we have less than a pixel to distribute. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::backgroundClipRect): Replace PaintInfo::infiniteRect with the LayoutRect equivalent. * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::rangeIntersectsRect): Using FractionalLayoutUnit::abs instead of std::abs. * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Ditto. * rendering/RenderObject.h: (WebCore): Removing unnecessary adjustForAbsoluteZoom function. (WebCore::RenderObject::outlineSize): Outlines remain ints. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleOrColLogicalWidth): Build fix. Using floats because colWidthSum is a Length which uses floats. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): Explicit templatization for max. * rendering/RenderTreeAsText.cpp: Adding code to minimize test expectation churn. It may be worth outputting float values in test expectations, but this isn't done with the inline box tree yet, either. * rendering/RenderTreeAsText.h: (WebCore): Adding a FractionalLayoutPoint operator. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::updateWidgetGeometry): Adding missing pixel snapping, and switching absoluteContentBox to an IntRect, as this is what boundingBox returns. * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writePositionAndStyle): Adding an enclosingIntRect for consistency with old results. LayoutTests: Reviewed by Eric Seidel. * fast/sub-pixel: Added. * fast/sub-pixel/client-width-height-snapping-expected.txt: Added. * fast/sub-pixel/client-width-height-snapping.html: Added. * fast/sub-pixel/size-of-box-with-zoom-expected.html: Added. * fast/sub-pixel/size-of-box-with-zoom.html: Added. * fast/sub-pixel/layout-boxes-with-zoom-expected.html: Added. * fast/sub-pixel/layout-boxes-with-zoom.html: Added. Canonical link: https://commits.webkit.org/103083@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-03 21:07:32 +00:00
PASS: With zoom of 90% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 80% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 75% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 66% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 50% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 33% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 25% bottom edge of last child lines up with bottom edge of container.<br>
Change FractionalLayoutUnit denominator to 64 to reduce precision loss when converting to floating point https://bugs.webkit.org/show_bug.cgi?id=96139 Reviewed by Eric Seidel. Source/WebCore: We currently use a denominator of 60 in FractionalLayoutUnit, this causes a loss of precision when converting to floating point. By changing the denominator to 64 the values can better be represented as floating point (without loosing any precision for many values), this in turn allows us to remove the tolerance hack in the line break logic and avoids problems caused by this precision for web sites that do their own layout based on element measurements. Test: fast/sub-pixel/float-precision.html * platform/FractionalLayoutUnit.h: Change denominator to 64. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::fitsOnLine): Remove epsilon tolerance hack. LayoutTests: Add new precision test and adjust expectations for existing tests as needed. * fast/sub-pixel/float-precision-expected.html: Added. * fast/sub-pixel/float-precision.html: Added. * fast/sub-pixel/float-wrap-with-subpixel-top-expected.html: * fast/sub-pixel/float-wrap-with-subpixel-top.html: * fast/sub-pixel/layout-boxes-with-zoom-expected.html: * fast/sub-pixel/layout-boxes-with-zoom.html: * fast/sub-pixel/size-of-box-with-zoom-expected.html: * fast/sub-pixel/size-of-box-with-zoom.html: * platform/chromium-linux/css1/formatting_model/inline_elements-expected.txt: * platform/chromium-linux/css2.1/t090501-c414-flt-03-b-g-expected.txt: * platform/chromium-linux/fast/backgrounds/background-position-parsing-expected.txt: * platform/chromium-linux/fast/block/margin-collapse/103-expected.txt: * platform/chromium-linux/fast/borders/border-antialiasing-expected.png: * platform/chromium-linux/fast/borders/border-radius-huge-assert-expected.png: * platform/chromium-linux/fast/box-sizing/box-sizing-expected.png: * platform/chromium-linux/fast/css/bidi-override-in-anonymous-block-expected.txt: * platform/chromium-linux/fast/css/hsl-color-expected.png: * platform/chromium-linux/fast/dom/HTMLMeterElement/meter-styles-expected.png: * platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.txt: * platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.txt: * platform/chromium-linux/fast/forms/date/date-appearance-expected.png: * platform/chromium-linux/fast/forms/form-element-geometry-expected.txt: * platform/chromium-linux/fast/html/details-add-summary-1-expected.png: * platform/chromium-linux/fast/html/details-add-summary-10-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-2-expected.png: * platform/chromium-linux/fast/html/details-add-summary-3-expected.png: * platform/chromium-linux/fast/html/details-add-summary-4-expected.png: * platform/chromium-linux/fast/html/details-add-summary-5-expected.png: * platform/chromium-linux/fast/html/details-add-summary-6-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-7-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-8-and-click-expected.png: * platform/chromium-linux/fast/html/details-add-summary-9-and-click-expected.png: * platform/chromium-linux/fast/html/details-marker-style-expected.png: * platform/chromium-linux/fast/html/details-no-summary1-expected.png: * platform/chromium-linux/fast/html/details-no-summary3-expected.png: * platform/chromium-linux/fast/html/details-open-javascript-expected.png: * platform/chromium-linux/fast/html/details-open1-expected.png: * platform/chromium-linux/fast/html/details-open3-expected.png: * platform/chromium-linux/fast/html/details-open5-expected.png: * platform/chromium-linux/fast/html/details-position-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-1-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-2-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-3-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-4-and-click-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-5-and-click-expected.png: * platform/chromium-linux/fast/html/details-remove-summary-6-and-click-expected.png: * platform/chromium-linux/fast/html/details-writing-mode-expected.png: * platform/chromium-linux/fast/multicol/vertical-rl/float-multicol-expected.png: * platform/chromium-linux/fast/parser/style-script-head-test-expected.txt: * platform/chromium-linux/fast/text/line-breaks-expected.txt: * platform/chromium-linux/svg/custom/use-css-no-effect-on-shadow-tree-expected.png: * platform/chromium-linux/svg/custom/viewBox-hit-expected.png: * platform/chromium-linux/svg/wicd/rightsizing-grid-expected.png: * platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.png: * platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.txt: * platform/chromium-linux/svg/zoom/page/zoom-background-images-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-hixie-mixed-009-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-mask-with-percentages-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-svg-float-border-padding-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-2-expected.txt: * 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-absolute-size-expected.txt: * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png: * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png: * platform/chromium-linux/svg/zoom/text/zoom-svg-float-border-padding-expected.png: * platform/chromium-linux/tables/mozilla/bugs/bug2479-4-expected.txt: * platform/chromium-linux/tables/mozilla/bugs/bug46480-1-expected.png: * platform/chromium-linux/tables/mozilla/bugs/bug46480-2-expected.png: * platform/chromium-win/compositing/visibility/visibility-image-layers-dynamic-expected.txt: * platform/chromium-win/css1/formatting_model/vertical_formatting-expected.txt: * platform/chromium-win/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt: * platform/chromium-win/fast/block/float/shrink-to-avoid-float-complexity-expected.txt: * platform/chromium-win/fast/css/hsl-color-expected.txt: * platform/chromium-win/fast/dom/HTMLMeterElement/meter-optimums-expected.txt: * platform/chromium-win/fast/dom/HTMLMeterElement/meter-styles-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-immediate-columns-child-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt: * platform/chromium-win/fast/multicol/span/span-as-nested-columns-child-expected.txt: * platform/chromium-win/fast/multicol/span/span-margin-collapsing-expected.txt: * platform/chromium-win/fast/text/whitespace/024-expected.txt: * platform/chromium-win/svg/wicd/rightsizing-grid-expected.txt: * platform/chromium-win/svg/zoom/page/zoom-hixie-mixed-009-expected.txt: * platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt: * platform/chromium-win/tables/mozilla/bugs/bug2479-1-expected.txt: * platform/chromium-win/tables/mozilla/other/test3-expected.txt: * platform/chromium-win/tables/mozilla_expected_failures/bugs/bug91057-expected.txt: * platform/chromium/fast/css/getComputedStyle/getComputedStyle-margin-percentage-expected.txt: Canonical link: https://commits.webkit.org/115672@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-09-26 16:25:41 +00:00
PASS: With zoom of 10% bottom edge of last child lines up with bottom edge of container.<br>
PASS: With zoom of 5% bottom edge of last child lines up with bottom edge of container.
[meta] Switch away from integers representing pixels for layout/event handling/rendering https://bugs.webkit.org/show_bug.cgi?id=60318 Source/WebCore: Patch by Levi Weintraub <leviw@chromium.org> and Emil A Eklund <eae@chromium.org> on 2012-04-23 Reviewed by Eric Seidel. Swapping the LayoutUnit backend to FractionalLayoutUnit from int. FractionalLayoutUnit is a new type that uses an integer to represent a fraction of a pixel. We're also adding a feature flag -- ENABLE_SUBPIXEL_LAYOUT -- that toggles this fraction between 1/1 and 1/60. Initially, all platforms will default to subpixel layout being off, so FractionalLayoutUnits will effectively continue to act as integers. With ENABLE_SUBPIXEL_LAYOUT turned on, FractionalLayoutUnits accumulate error from sub-pixel CSS values and applied zooming, and painting uses pixel-snapping to align these values to pixels. See http://trac.webkit.org/wiki/LayoutUnit for details. In a number of previous patches, LayoutUnits were plumbed throughout the rendering tree to prepare for this change. This included a number of functions in LayoutTypes.h and the IntRect/Point/Size classes that were effectively no-ops while LayoutUnits were integers. Subsequent patches will remove unnecessary versions of these functions; see http://webkit.org/b/84616 for tracking these changes. Tests: fast/sub-pixel/client-width-height-snapping.html fast/sub-pixel/layout-boxes-with-zoom.html fast/sub-pixel/size-of-box-with-zoom.html * WebCore.exp.in: Updating function signatures that expose FractionalLayoutUnits. * WebCore.xcodeproj/project.pbxproj: Adding missing FractionalLayoutPoint.h header. * css/CSSComputedStyleDeclaration.cpp: (WebCore::zoomAdjustedPixelValue): Using adjustFloatForAbsoluteZoom instead of int to make use of extra precision before returning the pixel value. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): No longer rounds for imprecise conversion when sub-pixel layout is enabled. (WebCore::CSSPrimitiveValue::customCssText): Returning integer values for pixels. * dom/Element.cpp: (WebCore::adjustForLocalZoom): Using rounding instead of incrementing the value before adjusting to account for truncation when sub-pixel layout is enabled. * page/SpatialNavigation.cpp: (WebCore::distanceDataForNode): Using FractionalLayoutUnit::abs instead of std::abs. * platform/FractionalLayoutUnit.h: Adding some missing operators and a flag around the constant denominator to switch it between 1/1 and 1/60 depending on the feature flag. * platform/Length.h: Changing the default type for value to float, and adding intValue since this more closely matches usage in a sub-pixel layout world. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): Using minimumIntValueForLength in this platform code instead of LayoutUnits. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): * rendering/LayoutTypes.h: This file contains the actual switch for changing LayoutUnits to be FractionalLayoutUnits. Also updating stub methods with their proper implementations. * rendering/PaintInfo.h: (WebCore::PaintInfo::infiniteRect): Ensuring the infiniteRect doesn't overflow the FractionalLayoutUnit bounds. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Switch to FractionalLayoutUnit's abs function instead of std::abs. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Add rounding for setting the phase of the background geometry before applying modulo from the tile size. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Stop applying flex when we have less than a pixel to distribute. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::backgroundClipRect): Replace PaintInfo::infiniteRect with the LayoutRect equivalent. * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::rangeIntersectsRect): Using FractionalLayoutUnit::abs instead of std::abs. * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Ditto. * rendering/RenderObject.h: (WebCore): Removing unnecessary adjustForAbsoluteZoom function. (WebCore::RenderObject::outlineSize): Outlines remain ints. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleOrColLogicalWidth): Build fix. Using floats because colWidthSum is a Length which uses floats. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): Explicit templatization for max. * rendering/RenderTreeAsText.cpp: Adding code to minimize test expectation churn. It may be worth outputting float values in test expectations, but this isn't done with the inline box tree yet, either. * rendering/RenderTreeAsText.h: (WebCore): Adding a FractionalLayoutPoint operator. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::updateWidgetGeometry): Adding missing pixel snapping, and switching absoluteContentBox to an IntRect, as this is what boundingBox returns. * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writePositionAndStyle): Adding an enclosingIntRect for consistency with old results. LayoutTests: Reviewed by Eric Seidel. * fast/sub-pixel: Added. * fast/sub-pixel/client-width-height-snapping-expected.txt: Added. * fast/sub-pixel/client-width-height-snapping.html: Added. * fast/sub-pixel/size-of-box-with-zoom-expected.html: Added. * fast/sub-pixel/size-of-box-with-zoom.html: Added. * fast/sub-pixel/layout-boxes-with-zoom-expected.html: Added. * fast/sub-pixel/layout-boxes-with-zoom.html: Added. Canonical link: https://commits.webkit.org/103083@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-03 21:07:32 +00:00
</div>
</body>
</html>