Changeset 134265 in webkit
- Timestamp:
- Nov 12, 2012 11:20:26 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r134252 r134265 1 2012-11-12 Arpita Bahuguna <arpitabahuguna@gmail.com> 2 3 Specified width CSS tables should not include border and padding as part of that width. 4 https://bugs.webkit.org/show_bug.cgi?id=77028 5 6 Reviewed by Julien Chaffraix. 7 8 * fast/table/css-table-width-with-border-padding-expected.html: Added. 9 * fast/table/css-table-width-with-border-padding.html: Added. 10 Test added for verifying that for specified width css tables, border 11 and padding are not considered as part of the specified table width. 12 13 The test also verifies the width values for the different box-sizing 14 properties viz, content-box, border-box and padding-box. 15 16 Out of these padding-box is currently not supported even though 17 the test verifies against this property as well. 18 The expected width values added for padding-box are thus incorrect 19 and should be lesser by 100px (padding value). 20 21 * fast/table/min-width-css-block-table-expected.txt: 22 * fast/table/min-width-css-inline-table-expected.txt: 23 * fast/table/script-tests/min-width-helpers.js: 24 Existing test values changed for CSS tables that have percent width 25 specified since for both these tests, border and padding has been 26 specified for all the tables. 27 28 As a result of this fix, the specified table width shall no longer 29 include the border and padding values thereby increasing our table 30 width size by exactly 30px (the value of border and padding in these 31 tests). 32 The new values for percent width css tables now match those for FF 33 and Opera. 34 1 35 2012-11-12 David Grogan <dgrogan@chromium.org> 2 36 -
trunk/LayoutTests/fast/table/min-width-css-block-table-expected.txt
r106479 r134265 26 26 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 600px; min-width: 500px;') is '600px' 27 27 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 400px; min-width: 500px;') is '500px' 28 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 500px;') is ' 570px'28 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 500px;') is '600px' 29 29 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 40%; min-width: 500px;') is '500px' 30 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 50%;') is ' 470px'30 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 50%;') is '500px' 31 31 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 15%;') is '250px' 32 32 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 5%;') is '250px' 33 33 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 600px; min-width: 50%;') is '600px' 34 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 400px; min-width: 50%;') is ' 470px'35 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 50%;') is ' 570px'36 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 40%; min-width: 50%;') is ' 470px'34 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 400px; min-width: 50%;') is '500px' 35 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 50%;') is '600px' 36 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 40%; min-width: 50%;') is '500px' 37 37 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: auto;') is '250px' 38 38 … … 44 44 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 600px; min-width: 500px;') is '600px' 45 45 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 400px; min-width: 500px;') is '500px' 46 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 500px;') is ' 570px'46 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 500px;') is '600px' 47 47 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 40%; min-width: 500px;') is '500px' 48 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 50%;') is ' 470px'48 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 50%;') is '500px' 49 49 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 15%;') is '250px' 50 50 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 5%;') is '250px' 51 51 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 600px; min-width: 50%;') is '600px' 52 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 400px; min-width: 50%;') is ' 470px'53 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 50%;') is ' 570px'54 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 40%; min-width: 50%;') is ' 470px'52 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 400px; min-width: 50%;') is '500px' 53 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 50%;') is '600px' 54 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 40%; min-width: 50%;') is '500px' 55 55 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: auto;') is '250px' 56 56 … … 64 64 PASS computeLogicalWidth('vertical', 'ltr', 'height: 600px; min-height: 500px;') is '600px' 65 65 PASS computeLogicalWidth('vertical', 'ltr', 'height: 400px; min-height: 500px;') is '500px' 66 PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 500px;') is ' 570px'66 PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 500px;') is '600px' 67 67 PASS computeLogicalWidth('vertical', 'ltr', 'height: 40%; min-height: 500px;') is '500px' 68 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 50%;') is ' 470px'68 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 50%;') is '500px' 69 69 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 15%;') is '250px' 70 70 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 5%;') is '250px' 71 71 PASS computeLogicalWidth('vertical', 'ltr', 'height: 600px; min-height: 50%;') is '600px' 72 PASS computeLogicalWidth('vertical', 'ltr', 'height: 400px; min-height: 50%;') is ' 470px'73 PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 50%;') is ' 570px'74 PASS computeLogicalWidth('vertical', 'ltr', 'height: 40%; min-height: 50%;') is ' 470px'72 PASS computeLogicalWidth('vertical', 'ltr', 'height: 400px; min-height: 50%;') is '500px' 73 PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 50%;') is '600px' 74 PASS computeLogicalWidth('vertical', 'ltr', 'height: 40%; min-height: 50%;') is '500px' 75 75 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: auto;') is '250px' 76 76 … … 82 82 PASS computeLogicalWidth('vertical', 'rtl', 'height: 600px; min-height: 500px;') is '600px' 83 83 PASS computeLogicalWidth('vertical', 'rtl', 'height: 400px; min-height: 500px;') is '500px' 84 PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 500px;') is ' 570px'84 PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 500px;') is '600px' 85 85 PASS computeLogicalWidth('vertical', 'rtl', 'height: 40%; min-height: 500px;') is '500px' 86 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 50%;') is ' 470px'86 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 50%;') is '500px' 87 87 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 15%;') is '250px' 88 88 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 5%;') is '250px' 89 89 PASS computeLogicalWidth('vertical', 'rtl', 'height: 600px; min-height: 50%;') is '600px' 90 PASS computeLogicalWidth('vertical', 'rtl', 'height: 400px; min-height: 50%;') is ' 470px'91 PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 50%;') is ' 570px'92 PASS computeLogicalWidth('vertical', 'rtl', 'height: 40%; min-height: 50%;') is ' 470px'90 PASS computeLogicalWidth('vertical', 'rtl', 'height: 400px; min-height: 50%;') is '500px' 91 PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 50%;') is '600px' 92 PASS computeLogicalWidth('vertical', 'rtl', 'height: 40%; min-height: 50%;') is '500px' 93 93 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: auto;') is '250px' 94 94 -
trunk/LayoutTests/fast/table/min-width-css-inline-table-expected.txt
r106479 r134265 26 26 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 600px; min-width: 500px;') is '600px' 27 27 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 400px; min-width: 500px;') is '500px' 28 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 500px;') is ' 570px'28 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 500px;') is '600px' 29 29 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 40%; min-width: 500px;') is '500px' 30 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 50%;') is ' 470px'30 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 50%;') is '500px' 31 31 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 15%;') is '250px' 32 32 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: 5%;') is '250px' 33 33 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 600px; min-width: 50%;') is '600px' 34 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 400px; min-width: 50%;') is ' 470px'35 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 50%;') is ' 570px'36 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 40%; min-width: 50%;') is ' 470px'34 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 400px; min-width: 50%;') is '500px' 35 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 60%; min-width: 50%;') is '600px' 36 PASS computeLogicalWidth('horizontal', 'ltr', 'width: 40%; min-width: 50%;') is '500px' 37 37 PASS computeLogicalWidth('horizontal', 'ltr', 'min-width: auto;') is '250px' 38 38 … … 44 44 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 600px; min-width: 500px;') is '600px' 45 45 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 400px; min-width: 500px;') is '500px' 46 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 500px;') is ' 570px'46 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 500px;') is '600px' 47 47 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 40%; min-width: 500px;') is '500px' 48 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 50%;') is ' 470px'48 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 50%;') is '500px' 49 49 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 15%;') is '250px' 50 50 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: 5%;') is '250px' 51 51 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 600px; min-width: 50%;') is '600px' 52 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 400px; min-width: 50%;') is ' 470px'53 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 50%;') is ' 570px'54 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 40%; min-width: 50%;') is ' 470px'52 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 400px; min-width: 50%;') is '500px' 53 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 60%; min-width: 50%;') is '600px' 54 PASS computeLogicalWidth('horizontal', 'rtl', 'width: 40%; min-width: 50%;') is '500px' 55 55 PASS computeLogicalWidth('horizontal', 'rtl', 'min-width: auto;') is '250px' 56 56 … … 64 64 PASS computeLogicalWidth('vertical', 'ltr', 'height: 600px; min-height: 500px;') is '600px' 65 65 PASS computeLogicalWidth('vertical', 'ltr', 'height: 400px; min-height: 500px;') is '500px' 66 PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 500px;') is ' 570px'66 PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 500px;') is '600px' 67 67 PASS computeLogicalWidth('vertical', 'ltr', 'height: 40%; min-height: 500px;') is '500px' 68 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 50%;') is ' 470px'68 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 50%;') is '500px' 69 69 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 15%;') is '250px' 70 70 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: 5%;') is '250px' 71 71 PASS computeLogicalWidth('vertical', 'ltr', 'height: 600px; min-height: 50%;') is '600px' 72 PASS computeLogicalWidth('vertical', 'ltr', 'height: 400px; min-height: 50%;') is ' 470px'73 PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 50%;') is ' 570px'74 PASS computeLogicalWidth('vertical', 'ltr', 'height: 40%; min-height: 50%;') is ' 470px'72 PASS computeLogicalWidth('vertical', 'ltr', 'height: 400px; min-height: 50%;') is '500px' 73 PASS computeLogicalWidth('vertical', 'ltr', 'height: 60%; min-height: 50%;') is '600px' 74 PASS computeLogicalWidth('vertical', 'ltr', 'height: 40%; min-height: 50%;') is '500px' 75 75 PASS computeLogicalWidth('vertical', 'ltr', 'min-height: auto;') is '250px' 76 76 … … 82 82 PASS computeLogicalWidth('vertical', 'rtl', 'height: 600px; min-height: 500px;') is '600px' 83 83 PASS computeLogicalWidth('vertical', 'rtl', 'height: 400px; min-height: 500px;') is '500px' 84 PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 500px;') is ' 570px'84 PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 500px;') is '600px' 85 85 PASS computeLogicalWidth('vertical', 'rtl', 'height: 40%; min-height: 500px;') is '500px' 86 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 50%;') is ' 470px'86 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 50%;') is '500px' 87 87 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 15%;') is '250px' 88 88 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: 5%;') is '250px' 89 89 PASS computeLogicalWidth('vertical', 'rtl', 'height: 600px; min-height: 50%;') is '600px' 90 PASS computeLogicalWidth('vertical', 'rtl', 'height: 400px; min-height: 50%;') is ' 470px'91 PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 50%;') is ' 570px'92 PASS computeLogicalWidth('vertical', 'rtl', 'height: 40%; min-height: 50%;') is ' 470px'90 PASS computeLogicalWidth('vertical', 'rtl', 'height: 400px; min-height: 50%;') is '500px' 91 PASS computeLogicalWidth('vertical', 'rtl', 'height: 60%; min-height: 50%;') is '600px' 92 PASS computeLogicalWidth('vertical', 'rtl', 'height: 40%; min-height: 50%;') is '500px' 93 93 PASS computeLogicalWidth('vertical', 'rtl', 'min-height: auto;') is '250px' 94 94 -
trunk/LayoutTests/fast/table/script-tests/min-width-helpers.js
r106479 r134265 30 30 {"min-width": "500px", "width": "400px", "computed-width": {"css": "500px", "html": "470px"}}, 31 31 /* fixed min-width, percent width */ 32 {"min-width": "500px", "width": "60%", "computed-width": {"css": " 570px", "html": "570px"}},32 {"min-width": "500px", "width": "60%", "computed-width": {"css": "600px", "html": "570px"}}, 33 33 {"min-width": "500px", "width": "40%", "computed-width": {"css": "500px", "html": "470px"}}, 34 34 /* percent min-width, auto width */ 35 {"min-width": "50%", "width": null, "computed-width": {"css": " 470px", "html": "470px"}},35 {"min-width": "50%", "width": null, "computed-width": {"css": "500px", "html": "470px"}}, 36 36 {"min-width": "15%", "width": null, "computed-width": {"css": "250px", "html": "250px"}}, 37 37 {"min-width": "5%", "width": null, "computed-width": {"css": "250px", "html": "250px"}}, 38 38 /* percent min-width, fixed width */ 39 39 {"min-width": "50%", "width": "600px", "computed-width": {"css": "600px", "html": "570px"}}, 40 {"min-width": "50%", "width": "400px", "computed-width": {"css": " 470px", "html": "470px"}},40 {"min-width": "50%", "width": "400px", "computed-width": {"css": "500px", "html": "470px"}}, 41 41 /* percent min-width, percent width */ 42 {"min-width": "50%", "width": "60%", "computed-width": {"css": " 570px", "html": "570px"}},43 {"min-width": "50%", "width": "40%", "computed-width": {"css": " 470px", "html": "470px"}},42 {"min-width": "50%", "width": "60%", "computed-width": {"css": "600px", "html": "570px"}}, 43 {"min-width": "50%", "width": "40%", "computed-width": {"css": "500px", "html": "470px"}}, 44 44 /* auto min-width (shouldn't affect anything), auto width */ 45 45 {"min-width": "auto", "width": null, "computed-width": {"css": "250px", "html": "250px"}}, -
trunk/Source/WebCore/ChangeLog
r134262 r134265 1 2012-11-12 Arpita Bahuguna <arpitabahuguna@gmail.com> 2 3 Specified width CSS tables should not include border and padding as part of that width. 4 https://bugs.webkit.org/show_bug.cgi?id=77028 5 6 Reviewed by Julien Chaffraix. 7 8 CSS table width should not include border and padding even though HTML 9 tables size as though their width includes border/padding. 10 11 This is applicable for all CSS tables with specified widths. 12 13 The change would also make our rendering of CSS tables with specified 14 width similar to that of Opera, IE and FF. 15 16 Test: fast/table/css-table-width-with-border-padding.html 17 18 * rendering/RenderTable.cpp: 19 (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth): 20 Added check for all (positive) specified widths for CSS tables to 21 consider border and padding outside of the specified width. 22 1 23 2012-11-12 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 24 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r133779 r134265 319 319 LayoutUnit borders = 0; 320 320 bool isCSSTable = !node() || !node()->hasTagName(tableTag); 321 if (isCSSTable && styleLogicalWidth.is Fixed() && styleLogicalWidth.isPositive()) {321 if (isCSSTable && styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive()) { 322 322 recalcBordersInRowDirection(); 323 323 if (style()->boxSizing() == CONTENT_BOX)
Note: See TracChangeset
for help on using the changeset viewer.