Changeset 245768 in webkit
- Timestamp:
- May 24, 2019 6:42:17 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245759 r245768 1 2019-05-24 Joonghun Park <jh718.park@samsung.com> 2 3 Make computed width of non-replaced inline return computed style. 4 https://bugs.webkit.org/show_bug.cgi?id=197814 5 6 Reviewed by Antti Koivisto. 7 8 Currently, Computed width of non-replaced inline incorrectly returns "auto" 9 instead of the computed value. 10 This patch changes the behavior according to 11 https://drafts.csswg.org/cssom/#resolved-value as below. 12 13 'If the property applies to the element or pseudo-element 14 and the resolved value of the display property is not none or contents, 15 then the resolved value is the used value. 16 Otherwise the resolved value is the computed value.' 17 18 * fast/css/getComputedStyle/getComputedStyle-resolved-values-expected.txt: 19 * fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt: 20 * fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html: 21 * legacy-animation-engine/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt: 22 * legacy-animation-engine/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html: 23 1 24 2019-05-24 Myles C. Maxfield <mmaxfield@apple.com> 2 25 -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-resolved-values-expected.txt
r155253 r245768 17 17 Resolved values for element "fixed" with display "inline": 18 18 line-height: 30px 19 width: auto20 height: auto19 width: 150px 20 height: 100px 21 21 margin-top: 15px 22 22 margin-right: 30px … … 70 70 Resolved values for element "percents" with display "inline": 71 71 line-height: 36px 72 width: auto73 height: auto72 width: 50% 73 height: 25% 74 74 margin-top: 10% 75 75 margin-right: 5% … … 123 123 Resolved values for element "ems" with display "inline": 124 124 line-height: 24px 125 width: auto 125 width: 240px 126 height: 120px 127 margin-top: 24px 128 margin-right: 12px 129 margin-bottom: 36px 130 margin-left: 48px 131 padding-top: 18px 132 padding-right: 18px 133 padding-bottom: 18px 134 padding-left: 18px 135 136 Resolved values for element "ems" with display "inline-block": 137 line-height: 24px 138 width: 240px 139 height: 120px 140 margin-top: 24px 141 margin-right: 12px 142 margin-bottom: 36px 143 margin-left: 48px 144 padding-top: 18px 145 padding-right: 18px 146 padding-bottom: 18px 147 padding-left: 18px 148 149 Resolved values for element "ems" with display "none": 150 line-height: 24px 151 width: 240px 152 height: 120px 153 margin-top: 24px 154 margin-right: 12px 155 margin-bottom: 36px 156 margin-left: 48px 157 padding-top: 18px 158 padding-right: 18px 159 padding-bottom: 18px 160 padding-left: 18px 161 162 163 Resolved values for element "auto" with display "block": 164 line-height: 30px 165 width: 200px 166 height: 30px 167 margin-top: 0px 168 margin-right: 126px 169 margin-bottom: 0px 170 margin-left: 126px 171 padding-top: 0px 172 padding-right: 0px 173 padding-bottom: 0px 174 padding-left: 0px 175 176 Resolved values for element "auto" with display "inline": 177 line-height: 30px 178 width: 200px 126 179 height: auto 127 margin-top: 24px 128 margin-right: 12px 129 margin-bottom: 36px 130 margin-left: 48px 131 padding-top: 18px 132 padding-right: 18px 133 padding-bottom: 18px 134 padding-left: 18px 135 136 Resolved values for element "ems" with display "inline-block": 137 line-height: 24px 138 width: 240px 139 height: 120px 140 margin-top: 24px 141 margin-right: 12px 142 margin-bottom: 36px 143 margin-left: 48px 144 padding-top: 18px 145 padding-right: 18px 146 padding-bottom: 18px 147 padding-left: 18px 148 149 Resolved values for element "ems" with display "none": 150 line-height: 24px 151 width: 240px 152 height: 120px 153 margin-top: 24px 154 margin-right: 12px 155 margin-bottom: 36px 156 margin-left: 48px 157 padding-top: 18px 158 padding-right: 18px 159 padding-bottom: 18px 160 padding-left: 18px 161 162 163 Resolved values for element "auto" with display "block": 180 margin-top: 0px 181 margin-right: auto 182 margin-bottom: 0px 183 margin-left: auto 184 padding-top: 0px 185 padding-right: 0px 186 padding-bottom: 0px 187 padding-left: 0px 188 189 Resolved values for element "auto" with display "inline-block": 164 190 line-height: 30px 165 191 width: 200px 166 192 height: 30px 167 193 margin-top: 0px 168 margin-right: 126px169 margin-bottom: 0px 170 margin-left: 126px171 padding-top: 0px 172 padding-right: 0px 173 padding-bottom: 0px 174 padding-left: 0px 175 176 Resolved values for element "auto" with display " inline":177 line-height: 30px 178 width: auto194 margin-right: 0px 195 margin-bottom: 0px 196 margin-left: 0px 197 padding-top: 0px 198 padding-right: 0px 199 padding-bottom: 0px 200 padding-left: 0px 201 202 Resolved values for element "auto" with display "none": 203 line-height: 30px 204 width: 200px 179 205 height: auto 180 206 margin-top: 0px … … 187 213 padding-left: 0px 188 214 189 Resolved values for element "auto" with display "inline-block":190 line-height: 30px191 width: 200px192 height: 30px193 margin-top: 0px194 margin-right: 0px195 margin-bottom: 0px196 margin-left: 0px197 padding-top: 0px198 padding-right: 0px199 padding-bottom: 0px200 padding-left: 0px201 202 Resolved values for element "auto" with display "none":203 line-height: 30px204 width: 200px205 height: auto206 margin-top: 0px207 margin-right: auto208 margin-bottom: 0px209 margin-left: auto210 padding-top: 0px211 padding-right: 0px212 padding-bottom: 0px213 padding-left: 0px214 215 215 216 216 Resolved values for element "mixed" with display "block": … … 229 229 Resolved values for element "mixed" with display "inline": 230 230 line-height: 48px 231 width: auto232 height: auto231 width: 30% 232 height: 20% 233 233 margin-top: 72px 234 234 margin-right: 0px -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt
r221542 r245768 44 44 PASS Expected '5px solid rgb(255, 0, 0)' for border in the computed style for element with id testBeforeAfterTable and pseudo-element :before and got '5px solid rgb(255, 0, 0)' 45 45 PASS Expected '10px dotted rgb(0, 0, 255)' for border in the computed style for element with id testBeforeAfterTable and pseudo-element :after and got '10px dotted rgb(0, 0, 255)' 46 PASS Expected ' auto' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got 'auto'47 PASS Expected ' auto' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got 'auto'48 PASS Expected ' auto' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got 'auto'49 PASS Expected ' auto' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got 'auto'46 PASS Expected '250px' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '250px' 47 PASS Expected '350px' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '350px' 48 PASS Expected '200px' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got '200px' 49 PASS Expected '300px' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got '300px' 50 50 PASS Expected '10px 20px 30px 40px' for margin in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '10px 20px 30px 40px' 51 51 PASS Expected '0px' for padding in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '0px' -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html
r221542 r245768 161 161 { 'elementId' : 'testBeforeAfterTable', 'pseudoElement' : ':before', 'property' : 'border', 'expectedValue' : '5px solid rgb(255, 0, 0)' }, 162 162 { 'elementId' : 'testBeforeAfterTable', 'pseudoElement' : ':after', 'property' : 'border', 'expectedValue' : '10px dotted rgb(0, 0, 255)' }, 163 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'height', 'expectedValue' : ' auto' },164 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'width', 'expectedValue' : ' auto' },165 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'height', 'expectedValue' : ' auto' },166 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'width', 'expectedValue' : ' auto' },163 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'height', 'expectedValue' : '250px' }, 164 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'width', 'expectedValue' : '350px' }, 165 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'height', 'expectedValue' : '200px' }, 166 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'width', 'expectedValue' : '300px' }, 167 167 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'margin', 'expectedValue' : '10px 20px 30px 40px' }, 168 168 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'padding', 'expectedValue' : '0px' }, -
trunk/LayoutTests/imported/w3c/ChangeLog
r245642 r245768 1 2019-05-24 Joonghun Park <jh718.park@samsung.com> 2 3 Make computed width of non-replaced inline return computed style. 4 https://bugs.webkit.org/show_bug.cgi?id=197814 5 6 Reviewed by Antti Koivisto. 7 8 Currently, Computed width of non-replaced inline incorrectly returns "auto" 9 instead of the computed value. 10 This patch changes the behavior according to 11 https://drafts.csswg.org/cssom/#resolved-value as below. 12 13 'If the property applies to the element or pseudo-element 14 and the resolved value of the display property is not none or contents, 15 then the resolved value is the used value. 16 Otherwise the resolved value is the computed value.' 17 18 * web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt: 19 1 20 2019-05-22 Ali Juma <ajuma@chromium.org> 2 21 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt
r243638 r245768 1 1 2 2 FAIL object.contentWindow assert_equals: The contentWindow's name of the object element should be 'o1'. expected "o1" but got "o" 3 FAIL object.width assert_equals: The width should be 100px. expected "100px" but got "auto" 4 FAIL object.height assert_equals: The height should be 50px. expected "50px" but got "auto" 3 PASS object.width 4 PASS object.height 5 5 -
trunk/LayoutTests/legacy-animation-engine/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt
r230471 r245768 44 44 PASS Expected '5px solid rgb(255, 0, 0)' for border in the computed style for element with id testBeforeAfterTable and pseudo-element :before and got '5px solid rgb(255, 0, 0)' 45 45 PASS Expected '10px dotted rgb(0, 0, 255)' for border in the computed style for element with id testBeforeAfterTable and pseudo-element :after and got '10px dotted rgb(0, 0, 255)' 46 PASS Expected ' auto' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got 'auto'47 PASS Expected ' auto' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got 'auto'48 PASS Expected ' auto' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got 'auto'49 PASS Expected ' auto' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got 'auto'46 PASS Expected '250px' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '250px' 47 PASS Expected '350px' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '350px' 48 PASS Expected '200px' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got '200px' 49 PASS Expected '300px' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got '300px' 50 50 PASS Expected '10px 20px 30px 40px' for margin in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '10px 20px 30px 40px' 51 51 PASS Expected '0px' for padding in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '0px' -
trunk/LayoutTests/legacy-animation-engine/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html
r235960 r245768 161 161 { 'elementId' : 'testBeforeAfterTable', 'pseudoElement' : ':before', 'property' : 'border', 'expectedValue' : '5px solid rgb(255, 0, 0)' }, 162 162 { 'elementId' : 'testBeforeAfterTable', 'pseudoElement' : ':after', 'property' : 'border', 'expectedValue' : '10px dotted rgb(0, 0, 255)' }, 163 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'height', 'expectedValue' : ' auto' },164 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'width', 'expectedValue' : ' auto' },165 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'height', 'expectedValue' : ' auto' },166 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'width', 'expectedValue' : ' auto' },163 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'height', 'expectedValue' : '250px' }, 164 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'width', 'expectedValue' : '350px' }, 165 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'height', 'expectedValue' : '200px' }, 166 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'width', 'expectedValue' : '300px' }, 167 167 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'margin', 'expectedValue' : '10px 20px 30px 40px' }, 168 168 { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'padding', 'expectedValue' : '0px' }, -
trunk/Source/WebCore/ChangeLog
r245759 r245768 1 2019-05-24 Joonghun Park <jh718.park@samsung.com> 2 3 Make computed width of non-replaced inline return computed style. 4 https://bugs.webkit.org/show_bug.cgi?id=197814 5 6 Reviewed by Antti Koivisto. 7 8 Currently, Computed width of non-replaced inline incorrectly returns "auto" 9 instead of the computed value. 10 This patch changes the behavior according to 11 https://drafts.csswg.org/cssom/#resolved-value as below. 12 13 'If the property applies to the element or pseudo-element 14 and the resolved value of the display property is not none or contents, 15 then the resolved value is the used value. 16 Otherwise the resolved value is the computed value.' 17 18 * css/CSSComputedStyleDeclaration.cpp: 19 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): 20 1 21 2019-05-24 Myles C. Maxfield <mmaxfield@apple.com> 2 22 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r244906 r245768 3191 3191 // According to http://www.w3.org/TR/CSS2/visudet.html#the-height-property, 3192 3192 // the "height" property does not apply for non-replaced inline elements. 3193 if (isNonReplacedInline(*renderer)) 3194 return cssValuePool.createIdentifierValue(CSSValueAuto); 3195 return zoomAdjustedPixelValue(sizingBox(*renderer).height(), style); 3193 if (!isNonReplacedInline(*renderer)) 3194 return zoomAdjustedPixelValue(sizingBox(*renderer).height(), style); 3196 3195 } 3197 3196 return zoomAdjustedPixelValueForLength(style.height(), style); … … 3514 3513 // According to http://www.w3.org/TR/CSS2/visudet.html#the-width-property, 3515 3514 // the "width" property does not apply for non-replaced inline elements. 3516 if (isNonReplacedInline(*renderer)) 3517 return cssValuePool.createIdentifierValue(CSSValueAuto); 3518 return zoomAdjustedPixelValue(sizingBox(*renderer).width(), style); 3515 if (!isNonReplacedInline(*renderer)) 3516 return zoomAdjustedPixelValue(sizingBox(*renderer).width(), style); 3519 3517 } 3520 3518 return zoomAdjustedPixelValueForLength(style.width(), style);
Note: See TracChangeset
for help on using the changeset viewer.