Changeset 130329 in webkit
- Timestamp:
- Oct 3, 2012, 3:07:59 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r130328 r130329 1 2012-10-03 Emil A Eklund <eae@chromium.org> 2 3 Round image sizes when zooming 4 https://bugs.webkit.org/show_bug.cgi?id=98205 5 6 Reviewed by Eric Seidel. 7 8 Add test for zoomed large image tiles. 9 10 * fast/images/zoomed-img-size.html: 11 * fast/sub-pixel/zoomed-image-tiles-expected.html: Added. 12 * fast/sub-pixel/zoomed-image-tiles.html: Added. 13 * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png: 14 * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt: 15 * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png: 16 * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt: 17 * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png: 18 * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt: 19 * platform/chromium/fast/images/zoomed-img-size-expected.txt: Added. 20 * platform/gtk/TestExpectations: 21 * platform/mac-lion/TestExpectations: 22 * platform/mac-snowleopard/TestExpectations: 23 * platform/mac-wk2/TestExpectations: 24 * platform/mac/TestExpectations: 25 * platform/qt-4.8/TestExpectations: 26 * platform/qt/TestExpectations: 27 * platform/win-wk2/TestExpectations: 28 * platform/win-xp/TestExpectations: 29 * platform/win/TestExpectations: 30 * platform/wincairo/TestExpectations: 31 * platform/wk2/TestExpectations: 32 1 33 2012-10-03 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> 2 34 -
trunk/LayoutTests/fast/images/zoomed-img-size.html
r121012 r130329 7 7 8 8 function update() { 9 var el = document.getElementById('subpixel-test'); 10 var hasSubpixelSupport = el.getBoundingClientRect().width == 4.5; 11 el.parentNode.removeChild(el); 12 9 13 // These arrays will become unnecessary if we fix the rounding issues that make us not always report "37x33". 10 var expectedWidths = [100, 50, 33, 25, 20, 36, 36, 36, 35, 37, 37, 37, 37, 37, 37]; 11 var expectedHeights = [100, 50, 33, 25, 20, 30, 30, 32, 32, 33, 33, 33, 33, 33, 33]; 14 var expectedWidths, expectedHeights; 15 if (hasSubpixelSupport) { 16 expectedWidths = [100, 50, 33, 25, 40, 36, 36, 38, 37, 37, 37, 38, 37, 37, 37]; 17 expectedHeights = [100, 50, 33, 25, 40, 33, 33, 34, 32, 33, 34, 34, 33, 33, 33]; 18 } else { 19 expectedWidths = [100, 50, 33, 25, 20, 36, 36, 36, 35, 37, 37, 37, 37, 37, 37]; 20 expectedHeights = [100, 50, 33, 25, 20, 30, 30, 32, 32, 33, 33, 33, 33, 33, 33]; 21 } 12 22 for (i = 0; i < 15; ++i) { 13 23 var oval = document.getElementById('oval' + i); … … 60 70 <img id="oval14" src="resources/oval.png" style="zoom: 1234%"> 61 71 <p>Zoom 1234% <span id="status14"></span>: <span id="sizes14"></span></p> 72 <div id="subpixel-test" style="width: 4.5px; height: 10px;"></div> 62 73 </body> 63 74 </html> -
trunk/LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt
r129656 r130329 16 16 text run at (0,0) width 478: "Both sides should have identical size after zooming" 17 17 RenderTableRow {tr} at (0,67) size 490x24 18 RenderTableCell {td} at (1,67) size 24 3x24 [r=1 c=0 rs=1 cs=1]19 RenderText {#text} at (96,5) size 5 1x1420 text run at (96,5) width 5 1: "SVG Image"21 RenderTableCell {td} at (24 5,67) size 244x24 [r=1 c=1 rs=1 cs=1]22 RenderText {#text} at (9 5,5) size 54x1423 text run at (9 5,5) width 54: "PNG Image"18 RenderTableCell {td} at (1,67) size 242x24 [r=1 c=0 rs=1 cs=1] 19 RenderText {#text} at (96,5) size 50x14 20 text run at (96,5) width 50: "SVG Image" 21 RenderTableCell {td} at (244,67) size 245x24 [r=1 c=1 rs=1 cs=1] 22 RenderText {#text} at (96,5) size 53x14 23 text run at (96,5) width 53: "PNG Image" 24 24 RenderTableRow {tr} at (0,92) size 490x82 25 RenderTableCell {td} at (1,92) size 24 3x82 [r=2 c=0 rs=1 cs=1]26 RenderEmbeddedObject {object} at ( 100,5) size 138x6925 RenderTableCell {td} at (1,92) size 242x82 [r=2 c=0 rs=1 cs=1] 26 RenderEmbeddedObject {object} at (99,5) size 138x69 27 27 layer at (0,0) size 139x69 28 28 RenderView at (0,0) size 138x69 … … 43 43 RenderSVGRect {rect} at (23,0) size 93x69 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00] 44 44 RenderText {#text} at (0,0) size 0x0 45 RenderTableCell {td} at (24 5,92) size 244x82 [r=2 c=1 rs=1 cs=1]46 RenderImage {img} at (5,5) size 13 8x6945 RenderTableCell {td} at (244,92) size 245x82 [r=2 c=1 rs=1 cs=1] 46 RenderImage {img} at (5,5) size 139x69 47 47 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
r129656 r130329 16 16 text run at (0,0) width 478: "Both sides should have identical size after zooming" 17 17 RenderTableRow {tr} at (0,67) size 490x24 18 RenderTableCell {td} at (1,67) size 24 4x24 [r=1 c=0 rs=1 cs=1]19 RenderText {#text} at (9 7,5) size 50x1420 text run at (9 7,5) width 50: "SVG Image"21 RenderTableCell {td} at (24 6,67) size 243x24 [r=1 c=1 rs=1 cs=1]22 RenderText {#text} at (95,5) size 5 3x1423 text run at (95,5) width 5 3: "PNG Image"18 RenderTableCell {td} at (1,67) size 243x24 [r=1 c=0 rs=1 cs=1] 19 RenderText {#text} at (96,5) size 51x14 20 text run at (96,5) width 51: "SVG Image" 21 RenderTableCell {td} at (245,67) size 244x24 [r=1 c=1 rs=1 cs=1] 22 RenderText {#text} at (95,5) size 54x14 23 text run at (95,5) width 54: "PNG Image" 24 24 RenderTableRow {tr} at (0,92) size 490x82 25 RenderTableCell {td} at (1,92) size 24 4x82 [r=2 c=0 rs=1 cs=1]26 RenderEmbeddedObject {object} at ( 100,4) size 139x7025 RenderTableCell {td} at (1,92) size 243x82 [r=2 c=0 rs=1 cs=1] 26 RenderEmbeddedObject {object} at (99,4) size 139x70 27 27 layer at (0,0) size 139x69 28 28 RenderView at (0,0) size 139x69 … … 43 43 RenderSVGRect {rect} at (23,0) size 93x69 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00] 44 44 RenderText {#text} at (0,0) size 0x0 45 RenderTableCell {td} at (24 6,92) size 243x82 [r=2 c=1 rs=1 cs=1]46 RenderImage {img} at (5,5) size 13 8x6945 RenderTableCell {td} at (245,92) size 244x82 [r=2 c=1 rs=1 cs=1] 46 RenderImage {img} at (5,5) size 139x69 47 47 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
r129763 r130329 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x37 84 RenderBlock {html} at (0,0) size 800x3 795 RenderBody {body} at (5,5) size 790x36 86 RenderTable {table} at (41,0) size 706x36 77 RenderTableSection (anonymous) at (0,0) size 705x36 78 RenderTableRow {tr} at (0,0) size 705x36 79 RenderTableCell {td} at (0,0) size 705x36 7[r=0 c=0 rs=1 cs=3]10 RenderTable {table} at (7,6) size 693x35 511 RenderTableSection (anonymous) at (0,0) size 692x35 53 layer at (0,0) size 800x379 4 RenderBlock {html} at (0,0) size 800x380 5 RenderBody {body} at (5,5) size 790x369 6 RenderTable {table} at (41,0) size 706x368 7 RenderTableSection (anonymous) at (0,0) size 705x368 8 RenderTableRow {tr} at (0,0) size 705x368 9 RenderTableCell {td} at (0,0) size 705x368 [r=0 c=0 rs=1 cs=3] 10 RenderTable {table} at (7,6) size 693x356 11 RenderTableSection (anonymous) at (0,0) size 692x356 12 12 RenderTableRow {tr} at (0,1) size 692x65 13 13 RenderTableCell {td} at (1,1) size 690x66 [r=0 c=0 rs=1 cs=2] … … 22 22 RenderText {#text} at (145,5) size 54x14 23 23 text run at (145,5) width 54: "PNG Image" 24 RenderTableRow {tr} at (0,92) size 692x26 224 RenderTableRow {tr} at (0,92) size 692x263 25 25 RenderTableCell {td} at (1,92) size 345x262 [r=2 c=0 rs=1 cs=1] 26 26 RenderEmbeddedObject {object} at (6,4) size 334x250 … … 43 43 RenderSVGRect {rect} at (0,0) size 333x250 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00] 44 44 RenderText {#text} at (0,0) size 0x0 45 RenderTableCell {td} at (347,92) size 344x26 2[r=2 c=1 rs=1 cs=1]46 RenderImage {img} at (5,5) size 333x2 4945 RenderTableCell {td} at (347,92) size 344x263 [r=2 c=1 rs=1 cs=1] 46 RenderImage {img} at (5,5) size 333x250 47 47 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/gtk/TestExpectations
r130200 r130329 385 385 webkit.org/b/85532 fast/sub-pixel/vertical-align-middle-overflow.html [ Pass ] 386 386 webkit.org/b/85532 fast/sub-pixel/sub-pixel-accumulates-to-layers.html [ Pass ] 387 webkit.org/b/85532 fast/sub-pixel/zoomed-image-tiles.html [ Skip ] 387 388 388 389 # Mediastream implementation is not complete yet. -
trunk/LayoutTests/platform/mac-lion/TestExpectations
r129788 r130329 121 121 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 122 122 fast/sub-pixel/snap-negative-location.html 123 fast/sub-pixel/zoomed-image-tiles.html 123 124 124 125 # This media test always failed on Lion -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r130325 r130329 193 193 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 194 194 fast/sub-pixel/snap-negative-location.html 195 fast/sub-pixel/zoomed-image-tiles.html 195 196 196 197 # fast/events/pagehide-timeout.html, pageshow-pagehide-on-back-cached-with-frames.html, and -
trunk/LayoutTests/platform/mac/TestExpectations
r130107 r130329 701 701 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 702 702 fast/sub-pixel/snap-negative-location.html 703 fast/sub-pixel/zoomed-image-tiles.html 703 704 704 705 # No CORS support for media elements is implemented yet. -
trunk/LayoutTests/platform/qt-4.8/TestExpectations
r129788 r130329 116 116 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 117 117 fast/sub-pixel/snap-negative-location.html 118 fast/sub-pixel/zoomed-image-tiles.html 118 119 119 120 # SVG Fonts are only supported when using QRawFont, which is not -
trunk/LayoutTests/platform/qt/TestExpectations
r130323 r130329 324 324 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 325 325 fast/sub-pixel/snap-negative-location.html 326 fast/sub-pixel/zoomed-image-tiles.html 326 327 327 328 # USE(V8) -
trunk/LayoutTests/platform/win-wk2/TestExpectations
r129788 r130329 955 955 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 956 956 fast/sub-pixel/snap-negative-location.html 957 fast/sub-pixel/zoomed-image-tiles.html 957 958 958 959 # HiDPI tests require test infrastructure enhancements -
trunk/LayoutTests/platform/win-xp/TestExpectations
r129788 r130329 54 54 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 55 55 fast/sub-pixel/snap-negative-location.html 56 fast/sub-pixel/zoomed-image-tiles.html 56 57 57 58 # REGRESSION (r83928 or before): Some tests failing assertions in MarkStack::internalAppend / MarkStack::drain -
trunk/LayoutTests/platform/win/TestExpectations
r130227 r130329 1755 1755 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 1756 1756 fast/sub-pixel/snap-negative-location.html 1757 fast/sub-pixel/zoomed-image-tiles.html 1757 1758 1758 1759 # No CORS support for media elements is implemented yet. -
trunk/LayoutTests/platform/wk2/TestExpectations
r130325 r130329 107 107 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html 108 108 fast/sub-pixel/snap-negative-location.html 109 fast/sub-pixel/zoomed-image-tiles.html 109 110 110 111 # [WK2][WTR] svg/animations/animate-text-nested-transforms.html fails -
trunk/Source/WebCore/ChangeLog
r130327 r130329 1 2012-10-03 Emil A Eklund <eae@chromium.org> 2 3 Round image sizes when zooming 4 https://bugs.webkit.org/show_bug.cgi?id=98205 5 6 Reviewed by Eric Seidel. 7 8 We currently floor image sizes when zooming which can result in 9 images being rendered at one pixel less than the actual size. 10 This is especially likely to happen for very large images. 11 12 Test: fast/sub-pixel/zoomed-image-tiles.html 13 14 * loader/cache/CachedImage.cpp: 15 (WebCore::CachedImage::imageSizeForRenderer): 16 1 17 2012-10-03 Hugo Parente Lima <hugo.lima@openbossa.org> 2 18 -
trunk/Source/WebCore/loader/cache/CachedImage.cpp
r129462 r130329 264 264 float heightScale = m_image->hasRelativeHeight() ? 1.0f : multiplier; 265 265 IntSize minimumSize(imageSize.width() > 0 ? 1 : 0, imageSize.height() > 0 ? 1 : 0); 266 #if ENABLE(SUBPIXEL_LAYOUT) 267 imageSize.setWidth(lroundf(imageSize.width() * widthScale)); 268 imageSize.setHeight(lroundf(imageSize.height() * heightScale)); 269 #else 266 270 imageSize.scale(widthScale, heightScale); 271 #endif 267 272 imageSize.clampToMinimumSize(minimumSize); 268 273 return imageSize;
Note:
See TracChangeset
for help on using the changeset viewer.