Changeset 121917 in webkit
- Timestamp:
- Jul 5, 2012 11:20:42 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/platform/chromium-linux/fast/html/details-marker-style-expected.txt
r117821 r121917 16 16 RenderText {#text} at (100,79) size 27x92 17 17 text run at (100,79) width 91: "Summary" 18 RenderBlock {DIV} at (0,25 7) size 784x4718 RenderBlock {DIV} at (0,256) size 784x48 19 19 RenderBlock {DETAILS} at (0,0) size 784x47 20 20 RenderBlock {SUMMARY} at (0,0) size 784x47 … … 22 22 RenderText {#text} at (73,19) size 92x27 23 23 text run at (73,19) width 92: "Summary" 24 RenderBlock {DIV} at (0,30 4) size 80x13124 RenderBlock {DIV} at (0,303) size 80x132 25 25 RenderBlock {DETAILS} at (0,0) size 80x131 26 26 RenderBlock {SUMMARY} at (0,0) size 80x131 -
trunk/LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
r120403 r121917 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]45 RenderTableCell {td} at (245,92) size 244x82 [r=2 c=1 rs=1 cs=1] 46 46 RenderImage {img} at (5,5) size 138x69 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
r120403 r121917 4 4 RenderBlock {html} at (0,0) size 800x379 5 5 RenderBody {body} at (5,5) size 790x368 6 RenderTable {table} at (4 1,0) size 706x3677 RenderTableSection (anonymous) at (0,0) size 70 5x3678 RenderTableRow {tr} at (0,0) size 70 5x3679 RenderTableCell {td} at (0,0) size 70 5x367 [r=0 c=0 rs=1 cs=3]10 RenderTable {table} at (7,6) size 69 3x35511 RenderTableSection (anonymous) at (0,0) size 69 2x35512 RenderTableRow {tr} at (0,1) size 69 2x6513 RenderTableCell {td} at (1,1) size 6 90x66 [r=0 c=0 rs=1 cs=2]14 RenderBlock {h1} at (5,19) size 68 1x2715 RenderText {#text} at (101,0) size 47 8x2516 text run at (101,0) width 47 8: "Both sides should have identical size after zooming"17 RenderTableRow {tr} at (0,67) size 69 2x2418 RenderTableCell {td} at (1,67) size 34 5x24 [r=1 c=0 rs=1 cs=1]19 RenderText {#text} at (147,5) size 5 1x1420 text run at (147,5) width 5 1: "SVG Image"21 RenderTableCell {td} at (34 7,67) size 344x24 [r=1 c=1 rs=1 cs=1]6 RenderTable {table} at (42,0) size 705x367 7 RenderTableSection (anonymous) at (0,0) size 704x367 8 RenderTableRow {tr} at (0,0) size 704x367 9 RenderTableCell {td} at (0,0) size 704x367 [r=0 c=0 rs=1 cs=3] 10 RenderTable {table} at (7,6) size 692x355 11 RenderTableSection (anonymous) at (0,0) size 691x355 12 RenderTableRow {tr} at (0,1) size 691x65 13 RenderTableCell {td} at (1,1) size 689x66 [r=0 c=0 rs=1 cs=2] 14 RenderBlock {h1} at (5,19) size 680x27 15 RenderText {#text} at (101,0) size 477x25 16 text run at (101,0) width 477: "Both sides should have identical size after zooming" 17 RenderTableRow {tr} at (0,67) size 691x24 18 RenderTableCell {td} at (1,67) size 344x24 [r=1 c=0 rs=1 cs=1] 19 RenderText {#text} at (147,5) size 50x14 20 text run at (147,5) width 50: "SVG Image" 21 RenderTableCell {td} at (346,67) size 344x24 [r=1 c=1 rs=1 cs=1] 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 69 2x26225 RenderTableCell {td} at (1,92) size 34 5x262 [r=2 c=0 rs=1 cs=1]26 RenderEmbeddedObject {object} at ( 6,4) size 334x25024 RenderTableRow {tr} at (0,92) size 691x262 25 RenderTableCell {td} at (1,92) size 344x262 [r=2 c=0 rs=1 cs=1] 26 RenderEmbeddedObject {object} at (5,4) size 334x250 27 27 layer at (0,0) size 333x250 28 28 RenderView at (0,0) size 333x250 … … 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 (34 7,92) size 344x262 [r=2 c=1 rs=1 cs=1]45 RenderTableCell {td} at (346,92) size 344x262 [r=2 c=1 rs=1 cs=1] 46 46 RenderImage {img} at (5,5) size 333x249 47 47 RenderText {#text} at (0,0) size 0x0 -
trunk/Source/WebCore/ChangeLog
r121912 r121917 1 2012-07-05 Behdad Esfahbod <behdad@behdad.org> 2 3 Subpixel layout broken with spans with CSS position other than static 4 https://bugs.webkit.org/show_bug.cgi?id=90097 5 6 Reviewed by Eric Seidel. 7 8 In InlineBox, don't truncate size to integers when returning. 9 10 In RenderBlock, don't round-up width to next integer. Round-up to 11 next LayoutUnit instead. 12 13 Test: Added fast/sub-pixel/size-of-span-with-different-positions.html 14 Adjust expected outputs affected by the rounding changes. 15 16 * platform/FractionalLayoutUnit.h: 17 (WebCore::FractionalLayoutUnit::fromFloatCeil): 18 (FractionalLayoutUnit): 19 * rendering/InlineBox.h: 20 (WebCore::InlineBox::size): 21 * rendering/RenderBlock.cpp: 22 (WebCore::updatePreferredWidth): 23 1 24 2012-07-05 Nate Chapin <japhet@chromium.org> 2 25 -
trunk/Source/WebCore/platform/FractionalLayoutUnit.h
r121709 r121917 87 87 FractionalLayoutUnit(const FractionalLayoutUnit& value) { m_value = value.rawValue(); } 88 88 89 static FractionalLayoutUnit fromFloatCeil(float value) 90 { 91 REPORT_OVERFLOW(isInBounds(value)); 92 FractionalLayoutUnit v; 93 v.m_value = ceilf(value * kFixedPointDenominator); 94 return v; 95 } 96 89 97 #if ENABLE(SUBPIXEL_LAYOUT) 90 98 int toInt() const { return m_value / kFixedPointDenominator; } … … 169 177 170 178 private: 171 bool isInBounds(int value)179 static bool isInBounds(int value) 172 180 { 173 181 return ::abs(value) <= std::numeric_limits<int>::max() / kFixedPointDenominator; 174 182 } 175 bool isInBounds(unsigned value)183 static bool isInBounds(unsigned value) 176 184 { 177 185 return value <= static_cast<unsigned>(std::numeric_limits<int>::max()) / kFixedPointDenominator; 178 186 } 179 bool isInBounds(double value)187 static bool isInBounds(double value) 180 188 { 181 189 return ::fabs(value) <= std::numeric_limits<int>::max() / kFixedPointDenominator; -
trunk/Source/WebCore/rendering/InlineBox.h
r121085 r121917 208 208 float width() const { return isHorizontal() ? logicalWidth() : logicalHeight(); } 209 209 float height() const { return isHorizontal() ? logicalHeight() : logicalWidth(); } 210 FloatSize size() const { return IntSize(width(), height()); }210 FloatSize size() const { return FloatSize(width(), height()); } 211 211 float right() const { return left() + width(); } 212 212 float bottom() const { return top() + height(); } -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r121789 r121917 5521 5521 static inline void updatePreferredWidth(LayoutUnit& preferredWidth, float& result) 5522 5522 { 5523 LayoutUnit snappedResult = ceilf(result);5523 LayoutUnit snappedResult = LayoutUnit::fromFloatCeil(result); 5524 5524 preferredWidth = max(snappedResult, preferredWidth); 5525 5525 }
Note: See TracChangeset
for help on using the changeset viewer.