Changeset 95129 in webkit
- Timestamp:
- Sep 14, 2011, 3:24:23 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95126 r95129 1 2011-09-14 David Hyatt <hyatt@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=52736 4 5 Tiles were not being properly centered within border image sides for the "repeat" 6 keyword. This patch fixes the buggy math behind the pattern tiling to actually get 7 the initial phases correct. 8 9 Reviewed by Sam Weinig. 10 11 * fast/borders/border-image-massive-scale.html: Added. 12 * fast/borders/border-image-scaled-gradient.html: Added. 13 * platform/mac/fast/borders/border-image-massive-scale-expected.png: Added. 14 * platform/mac/fast/borders/border-image-massive-scale-expected.txt: Added. 15 * platform/mac/fast/borders/border-image-outset-expected.png: 16 * platform/mac/fast/borders/border-image-outset-in-shorthand-expected.png: 17 * platform/mac/fast/borders/border-image-outset-split-inline-expected.png: 18 * platform/mac/fast/borders/border-image-outset-split-inline-vertical-lr-expected.png: 19 * platform/mac/fast/borders/border-image-scaled-gradient-expected.png: Added. 20 * platform/mac/fast/borders/border-image-scaled-gradient-expected.txt: Added. 21 * platform/mac/fast/borders/border-image-side-reduction-expected.png: 22 1 23 2011-09-14 Jeremy Apthorp <jeremya@chromium.org> 2 24 -
trunk/Source/WebCore/ChangeLog
r95128 r95129 1 2011-09-14 David Hyatt <hyatt@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=52736 4 5 Tiles were not being properly centered within border image sides for the "repeat" 6 keyword. This patch fixes the buggy math behind the pattern tiling to actually get 7 the initial phases correct. 8 9 Reviewed by Sam Weinig. 10 11 Added new tests in fast/borders and updated broken existing tests. 12 13 * platform/graphics/Image.cpp: 14 (WebCore::Image::drawTiled): 15 1 16 2011-09-14 Anders Carlsson <andersca@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/Image.cpp
r95121 r95129 154 154 float hPhase = tileScaleFactor.width() * srcRect.x(); 155 155 float vPhase = tileScaleFactor.height() * srcRect.y(); 156 float scaledTileWidth = tileScaleFactor.width() * srcRect.width(); 157 float scaledTileHeight = tileScaleFactor.height() * srcRect.height(); 156 158 if (hRule == Image::RepeatTile) 157 hPhase -= fmodf(dstRect.width(), tileScaleFactor.width() * srcRect.width()) / 2.0f;159 hPhase -= (dstRect.width() - scaledTileWidth) / 2; 158 160 if (vRule == Image::RepeatTile) 159 vPhase -= fmodf(dstRect.height(), tileScaleFactor.height() * srcRect.height()) / 2.0f;161 vPhase -= (dstRect.height() - scaledTileHeight) / 2; 160 162 FloatPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase); 161 163
Note:
See TracChangeset
for help on using the changeset viewer.