Changeset 140192 in webkit
- Timestamp:
- Jan 18, 2013 12:21:57 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140187 r140192 1 2013-01-18 Levi Weintraub <leviw@chromium.org> 2 3 LayoutUnit should round half consistently, not away from zero 4 https://bugs.webkit.org/show_bug.cgi?id=107208 5 6 Reviewed by Eric Seidel. 7 8 * fast/sub-pixel/sub-pixel-root-layer-expected.html: Added. 9 * fast/sub-pixel/sub-pixel-root-layer.html: Added. 10 * platform/chromium-linux/fast/regions/overflow-moving-below-floats-in-variable-width-regions-expected.png: 11 * platform/chromium-linux/fast/regions/overflow-size-change-in-variable-width-regions-expected.png: 12 * platform/chromium-linux/fast/regions/overflow-size-change-with-stacking-context-expected.png: 13 * platform/chromium-win/fast/regions/overflow-moving-below-floats-in-variable-width-regions-expected.txt: 14 * platform/chromium-win/fast/regions/overflow-size-change-in-variable-width-regions-expected.txt: 15 * platform/chromium-win/fast/regions/overflow-size-change-with-stacking-context-expected.txt: 16 * platform/chromium/TestExpectations: 17 * platform/mac/TestExpectations: 18 1 19 2013-01-18 Martin Robinson <mrobinson@igalia.com> 2 20 -
trunk/LayoutTests/platform/chromium-win/fast/regions/overflow-moving-below-floats-in-variable-width-regions-expected.txt
r117821 r140192 23 23 RenderBlock {DIV} at (48,51) size 294x245 [border: (1px solid #008000)] 24 24 RenderBlock {DIV} at (1,1) size 500x20 25 RenderText {#text} at (-1 3,0) size 270x1926 text run at (-1 3,0) width 270: "Clipped line of text that should not be visible."25 RenderText {#text} at (-12,0) size 270x19 26 text run at (-12,0) width 270: "Clipped line of text that should not be visible." 27 27 RenderBlock {P} at (1,44) size 291x80 28 28 RenderText {#text} at (0,0) size 291x79 … … 38 38 text run at (0,60) width 252: "These lines will not spill out of the regions." 39 39 RenderBlock {DIV} at (1,224) size 500x20 40 RenderText {#text} at (-2 3,0) size 270x1941 text run at (-2 3,0) width 270: "Clipped line of text that should not be visible."40 RenderText {#text} at (-22,0) size 270x19 41 text run at (-22,0) width 270: "Clipped line of text that should not be visible." 42 42 Regions for flow 'flow1' 43 43 RenderRegion {DIV} #region1 -
trunk/LayoutTests/platform/chromium-win/fast/regions/overflow-size-change-in-variable-width-regions-expected.txt
r112709 r140192 21 21 RenderBlock {DIV} at (36,1) size 218x391 [border: (1px solid #008000)] 22 22 RenderBlock {DIV} at (1,1) size 500x20 23 RenderText {#text} at (-1 3,0) size 270x1924 text run at (-1 3,0) width 270: "Clipped line of text that should not be visible."23 RenderText {#text} at (-12,0) size 270x19 24 text run at (-12,0) width 270: "Clipped line of text that should not be visible." 25 25 RenderBlock {P} at (1,37) size 216x137 26 RenderText {#text} at (-1 3,0) size 229x13627 text run at (-1 3,0) width 141: "These lines will not spill"28 text run at (-1 3,20) width 141: "out of the regions."26 RenderText {#text} at (-12,0) size 228x136 27 text run at (-12,0) width 140: "These lines will not spill" 28 text run at (-12,20) width 140: "out of the regions." 29 29 text run at (0,57) width 216: "These lines will not spill out of the" 30 30 text run at (0,77) width 51: "regions. " … … 33 33 text run at (0,117) width 135: "spill out of the regions." 34 34 RenderBlock {P} at (1,190) size 216x144 35 RenderText {#text} at (0,0) size 23 9x14335 RenderText {#text} at (0,0) size 238x143 36 36 text run at (0,0) width 216: "These lines will not spill out of the" 37 37 text run at (0,20) width 216: "regions. These lines will not spill out" … … 39 39 text run at (96,40) width 120: "These lines will not" 40 40 text run at (0,60) width 216: "spill out of the regions. These lines" 41 text run at (-2 3,84) width 81: "will not spill"42 text run at (-2 3,104) width 81: "out of the"43 text run at (-2 3,124) width 47: "regions."41 text run at (-22,84) width 80: "will not spill" 42 text run at (-22,104) width 80: "out of the" 43 text run at (-22,124) width 47: "regions." 44 44 RenderBlock {DIV} at (1,350) size 500x20 45 RenderText {#text} at (-2 3,0) size 270x1946 text run at (-2 3,0) width 270: "Clipped line of text that should not be visible."45 RenderText {#text} at (-22,0) size 270x19 46 text run at (-22,0) width 270: "Clipped line of text that should not be visible." 47 47 Regions for flow 'flow1' 48 48 RenderRegion {DIV} #region1 -
trunk/LayoutTests/platform/chromium-win/fast/regions/overflow-size-change-with-stacking-context-expected.txt
r112709 r140192 21 21 RenderBlock (relative positioned) {DIV} at (36,1) size 218x371 [border: (1px solid #008000)] 22 22 RenderBlock {P} at (1,37) size 216x137 23 RenderText {#text} at (-1 3,0) size 229x13624 text run at (-1 3,0) width 141: "These lines will not spill"25 text run at (-1 3,20) width 141: "out of the regions."23 RenderText {#text} at (-12,0) size 228x136 24 text run at (-12,0) width 140: "These lines will not spill" 25 text run at (-12,20) width 140: "out of the regions." 26 26 text run at (0,57) width 216: "These lines will not spill out of the" 27 27 text run at (0,77) width 51: "regions. " … … 30 30 text run at (0,117) width 135: "spill out of the regions." 31 31 RenderBlock {P} at (1,190) size 216x144 32 RenderText {#text} at (0,0) size 23 9x14332 RenderText {#text} at (0,0) size 238x143 33 33 text run at (0,0) width 216: "These lines will not spill out of the" 34 34 text run at (0,20) width 216: "regions. These lines will not spill out" … … 36 36 text run at (96,40) width 120: "These lines will not" 37 37 text run at (0,60) width 216: "spill out of the regions. These lines" 38 text run at (-2 3,84) width 81: "will not spill"39 text run at (-2 3,104) width 81: "out of the"40 text run at (-2 3,124) width 47: "regions."38 text run at (-22,84) width 80: "will not spill" 39 text run at (-22,104) width 80: "out of the" 40 text run at (-22,124) width 47: "regions." 41 41 layer at (42,356) size 500x20 backgroundClip at (51,80) size 216x369 clip at (51,80) size 216x369 outlineClip at (51,80) size 216x369 42 42 RenderBlock (positioned) {DIV} at (1,350) size 500x20 43 RenderText {#text} at (-2 3,0) size 270x1944 text run at (-2 3,0) width 270: "Clipped line of text that should not be visible."43 RenderText {#text} at (-22,0) size 270x19 44 text run at (-22,0) width 270: "Clipped line of text that should not be visible." 45 45 Regions for flow 'flow1' 46 46 RenderRegion {DIV} #region1 -
trunk/LayoutTests/platform/chromium/TestExpectations
r140181 r140192 3911 3911 webkit.org/b/11645 [ Mac Android ] fast/table/025.html [ Failure ] 3912 3912 3913 # Rebaseline required after https://webkit.org/b/107208 3914 Bug(leviw) [ Mac Android Win ] fast/regions/overflow-moving-below-floats-in-variable-width-regions.html [ Pass Failure ImageOnlyFailure ] 3915 Bug(leviw) [ Mac Android Win ] fast/regions/overflow-size-change-in-variable-width-regions.html [ Pass Failure ImageOnlyFailure ] 3916 Bug(leviw) [ Mac Android Win ] fast/regions/overflow-size-change-with-stacking-context.html [ Pass Failure ImageOnlyFailure ] 3917 3913 3918 # Rebaseline required after https://bugs.webkit.org/show_bug.cgi?id=101177 3914 3919 webkit.org/b/101177 svg/dynamic-updates/SVGUseElement-dom-requiredFeatures.html [ ImageOnlyFailure Pass ] -
trunk/LayoutTests/platform/mac/TestExpectations
r140174 r140192 1280 1280 webkit.org/b/103955 fast/repaint/selection-rl.html [ ImageOnlyFailure ] 1281 1281 webkit.org/b/103955 fast/repaint/caret-with-transformation.html [ Missing ] 1282 1283 # Rebaseline required after https://webkit.org/b/107208 1284 webkit.org/b/107208 fast/regions/overflow-moving-below-floats-in-variable-width-regions.html [ Pass Failure ImageOnlyFailure ] 1285 webkit.org/b/107208 fast/regions/overflow-size-change-in-variable-width-regions.html [ Pass Failure ImageOnlyFailure ] 1286 webkit.org/b/107208 fast/regions/overflow-size-change-with-stacking-context.html [ Pass Failure ImageOnlyFailure ] 1287 -
trunk/Source/WebCore/ChangeLog
r140185 r140192 1 2013-01-18 Levi Weintraub <leviw@chromium.org> 2 3 LayoutUnit should round half consistently, not away from zero 4 https://bugs.webkit.org/show_bug.cgi?id=107208 5 6 Reviewed by Eric Seidel. 7 8 The current implementation of LayoutUnit::round() always rounds half away from zero. This can result in 9 a shift of 1 pixel moving an element aligned at a half-pixel by 2. This problem is particularly common with 10 RenderLayers, which pass the sub-pixel accumulation into their renderers after translating the graphics 11 context passed in by their rounded location. This changes round() to always round 0.5 up. 12 13 Test: fast/sub-pixel/sub-pixel-root-layer.html 14 15 * platform/LayoutUnit.h: 16 (WebCore::LayoutUnit::round): Always round 0.5 up. 17 * rendering/RenderLayer.cpp: 18 (WebCore::RenderLayer::paintLayerContents): We no longer need to prevent rootLayers from passing in a 19 sub-pixel offset. This eliminates the shifting of elements when applying translateZ(0) or similar. 20 1 21 2013-01-18 Kentaro Hara <haraken@chromium.org> 2 22 -
trunk/Source/WebCore/platform/LayoutUnit.h
r138978 r140192 229 229 if (m_value > 0) 230 230 return saturatedAddition(rawValue(), kEffectiveFixedPointDenominator / 2) / kEffectiveFixedPointDenominator; 231 return saturatedSubtraction(rawValue(), kEffectiveFixedPointDenominator / 2) / kEffectiveFixedPointDenominator;231 return saturatedSubtraction(rawValue(), (kEffectiveFixedPointDenominator / 2) - 1) / kEffectiveFixedPointDenominator; 232 232 #elif ENABLE(SUBPIXEL_LAYOUT) 233 233 if (m_value > 0) 234 234 return (m_value + (kEffectiveFixedPointDenominator / 2)) / kEffectiveFixedPointDenominator; 235 return (m_value - ( kEffectiveFixedPointDenominator / 2)) / kEffectiveFixedPointDenominator;235 return (m_value - ((kEffectiveFixedPointDenominator / 2) - 1)) / kEffectiveFixedPointDenominator; 236 236 #else 237 237 return m_value; -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r140177 r140192 3665 3665 calculateRects(clipRectsContext, localPaintingInfo.paintDirtyRect, layerBounds, damageRect, clipRectToApply, outlineRect, &offsetFromRoot); 3666 3666 paintOffset = toPoint(layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation); 3667 if (this == localPaintingInfo.rootLayer)3668 paintOffset = roundedIntPoint(paintOffset);3669 3667 } 3670 3668 -
trunk/Tools/ChangeLog
r140189 r140192 1 2013-01-18 Levi Weintraub <leviw@chromium.org> 2 3 LayoutUnit should round half consistently, not away from zero 4 https://bugs.webkit.org/show_bug.cgi?id=107208 5 6 Reviewed by Eric Seidel. 7 8 * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp: Updating to reflect and 9 cover this change in rounding behavior. 10 1 11 2013-01-18 Tim Horton <timothy_horton@apple.com> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
r138952 r140192 82 82 TEST(WebCoreLayoutUnit, LayoutUnitRounding) 83 83 { 84 ASSERT_EQ(LayoutUnit(-1.5f).round(), -2); 84 ASSERT_EQ(LayoutUnit(-1.9f).round(), -2); 85 ASSERT_EQ(LayoutUnit(-1.6f).round(), -2); 86 ASSERT_EQ(LayoutUnit(-1.52f).round(), -2); 87 ASSERT_EQ(LayoutUnit(-1.5f).round(), -1); 85 88 ASSERT_EQ(LayoutUnit(-1.49f).round(), -1); 86 89 ASSERT_EQ(LayoutUnit(-1.0f).round(), -1); 87 90 ASSERT_EQ(LayoutUnit(-0.99f).round(), -1); 88 ASSERT_EQ(LayoutUnit(-0.50f).round(), -1); 91 ASSERT_EQ(LayoutUnit(-0.51f).round(), 0); 92 ASSERT_EQ(LayoutUnit(-0.50f).round(), 0); 89 93 ASSERT_EQ(LayoutUnit(-0.49f).round(), 0); 90 94 ASSERT_EQ(LayoutUnit(-0.1f).round(), 0);
Note: See TracChangeset
for help on using the changeset viewer.