WebKit Bugzilla
Attachment 370213 Details for
Bug 197814
: Computed width of non-replaced inline incorrectly returns "auto" instead of the computed value.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197814-20190519110116.patch (text/plain), 13.15 KB, created by
Joonghun Park
on 2019-05-18 19:01:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Joonghun Park
Created:
2019-05-18 19:01:17 PDT
Size:
13.15 KB
patch
obsolete
>Subversion Revision: 245499 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 571497342240f02fbf2324b49c75c68f57e010e2..cc9c0842ba6cda4ec999fd15095a080477d71b22 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2019-05-18 Joonghun Park <jh718.park@samsung.com> >+ >+ Make computed width of non-replaced inline return computed style. >+ https://bugs.webkit.org/show_bug.cgi?id=197814 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Currently, Computed width of non-replaced inline incorrectly returns "auto" >+ instead of the computed value. >+ This patch changes the behavior according to >+ https://drafts.csswg.org/cssom/#resolved-value as below. >+ >+ 'If the property applies to the element or pseudo-element >+ and the resolved value of the display property is not none or contents, >+ then the resolved value is the used value. >+ Otherwise the resolved value is the computed value.' >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): >+ > 2019-05-17 Joonghun Park <pjh0718@gmail.com> > > Implement CSS `display: flow-root` (modern clearfix) >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index f2dc6b7bd26c55972f83597191f6fb9b9b75a8bd..745c1348957934f3292701217b2ddc2f7d6544b5 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -3190,9 +3190,8 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty > if (renderer && !renderer->isRenderSVGModelObject()) { > // According to http://www.w3.org/TR/CSS2/visudet.html#the-height-property, > // the "height" property does not apply for non-replaced inline elements. >- if (isNonReplacedInline(*renderer)) >- return cssValuePool.createIdentifierValue(CSSValueAuto); >- return zoomAdjustedPixelValue(sizingBox(*renderer).height(), style); >+ if (!isNonReplacedInline(*renderer)) >+ return zoomAdjustedPixelValue(sizingBox(*renderer).height(), style); > } > return zoomAdjustedPixelValueForLength(style.height(), style); > case CSSPropertyWebkitHyphens: >@@ -3513,9 +3512,8 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty > if (renderer && !renderer->isRenderSVGModelObject()) { > // According to http://www.w3.org/TR/CSS2/visudet.html#the-width-property, > // the "width" property does not apply for non-replaced inline elements. >- if (isNonReplacedInline(*renderer)) >- return cssValuePool.createIdentifierValue(CSSValueAuto); >- return zoomAdjustedPixelValue(sizingBox(*renderer).width(), style); >+ if (!isNonReplacedInline(*renderer)) >+ return zoomAdjustedPixelValue(sizingBox(*renderer).width(), style); > } > return zoomAdjustedPixelValueForLength(style.width(), style); > case CSSPropertyWillChange: >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 60a6b0287a30be8951b073278b63679113dd8c7a..df776ce42a578ad7907d0bc9accf9a1673c62486 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,26 @@ >+2019-05-18 Joonghun Park <jh718.park@samsung.com> >+ >+ Make computed width of non-replaced inline return computed style. >+ https://bugs.webkit.org/show_bug.cgi?id=197814 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Currently, Computed width of non-replaced inline incorrectly returns "auto" >+ instead of the computed value. >+ This patch changes the behavior according to >+ https://drafts.csswg.org/cssom/#resolved-value as below. >+ >+ 'If the property applies to the element or pseudo-element >+ and the resolved value of the display property is not none or contents, >+ then the resolved value is the used value. >+ Otherwise the resolved value is the computed value.' >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/css/getComputedStyle/getComputedStyle-resolved-values-expected.txt: >+ * fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt: >+ * fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html: >+ > 2019-05-17 Joonghun Park <pjh0718@gmail.com> > > Implement CSS `display: flow-root` (modern clearfix) >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index b9152e70ec7431af4639ac248704d180f93bffd1..4d3155a9285c6dc1261709f12ccba0d95d8112e1 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,22 @@ >+2019-05-18 Joonghun Park <jh718.park@samsung.com> >+ >+ Make computed width of non-replaced inline return computed style. >+ https://bugs.webkit.org/show_bug.cgi?id=197814 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Currently, Computed width of non-replaced inline incorrectly returns "auto" >+ instead of the computed value. >+ This patch changes the behavior according to >+ https://drafts.csswg.org/cssom/#resolved-value as below. >+ >+ 'If the property applies to the element or pseudo-element >+ and the resolved value of the display property is not none or contents, >+ then the resolved value is the used value. >+ Otherwise the resolved value is the computed value.' >+ >+ * web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt: >+ > 2019-05-17 Rob Buis <rbuis@igalia.com> > > Implement imagesrcset and imagesizes attributes on link rel=preload >diff --git a/LayoutTests/fast/css/getComputedStyle/getComputedStyle-resolved-values-expected.txt b/LayoutTests/fast/css/getComputedStyle/getComputedStyle-resolved-values-expected.txt >index 051be33a611164da3788a837cc551c637ac85a0a..f282f6093231e8842888ea68d69833a1112c7c94 100644 >--- a/LayoutTests/fast/css/getComputedStyle/getComputedStyle-resolved-values-expected.txt >+++ b/LayoutTests/fast/css/getComputedStyle/getComputedStyle-resolved-values-expected.txt >@@ -16,8 +16,8 @@ padding-left: 20px > > Resolved values for element "fixed" with display "inline": > line-height: 30px >-width: auto >-height: auto >+width: 150px >+height: 100px > margin-top: 15px > margin-right: 30px > margin-bottom: 20px >@@ -69,8 +69,8 @@ padding-left: 25px > > Resolved values for element "percents" with display "inline": > line-height: 36px >-width: auto >-height: auto >+width: 50% >+height: 25% > margin-top: 10% > margin-right: 5% > margin-bottom: 10% >@@ -122,8 +122,8 @@ padding-left: 18px > > Resolved values for element "ems" with display "inline": > line-height: 24px >-width: auto >-height: auto >+width: 240px >+height: 120px > margin-top: 24px > margin-right: 12px > margin-bottom: 36px >@@ -175,7 +175,7 @@ padding-left: 0px > > Resolved values for element "auto" with display "inline": > line-height: 30px >-width: auto >+width: 200px > height: auto > margin-top: 0px > margin-right: auto >@@ -228,8 +228,8 @@ padding-left: 0px > > Resolved values for element "mixed" with display "inline": > line-height: 48px >-width: auto >-height: auto >+width: 30% >+height: 20% > margin-top: 72px > margin-right: 0px > margin-bottom: 0px >diff --git a/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt b/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt >index 012c6bbfe8ddfdce536ccc3917456a7d3bed1a14..a24e4f31280ccfa7da7385e9d86f71d2c1be7a3b 100644 >--- a/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt >+++ b/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt >@@ -43,10 +43,10 @@ PASS Expected '0px' for margin in the computed style for element with id testBef > PASS Expected '10px 20px 30px 40px' for padding in the computed style for element with id testBeforeAfterTable and pseudo-element :after and got '10px 20px 30px 40px' > 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)' > 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)' >-PASS Expected 'auto' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got 'auto' >-PASS Expected 'auto' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got 'auto' >-PASS Expected 'auto' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got 'auto' >-PASS Expected 'auto' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got 'auto' >+PASS Expected '250px' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '250px' >+PASS Expected '350px' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '350px' >+PASS Expected '200px' for height in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got '200px' >+PASS Expected '300px' for width in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got '300px' > 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' > PASS Expected '0px' for padding in the computed style for element with id testBeforeAfterInline and pseudo-element :before and got '0px' > PASS Expected '0px' for margin in the computed style for element with id testBeforeAfterInline and pseudo-element :after and got '0px' >diff --git a/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html b/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html >index abdacd9945a5ed7bc699e362dfddbbfea2ea59ca..33ea429c0e698ea1978e269cf983c6d52c125b53 100644 >--- a/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html >+++ b/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html >@@ -160,10 +160,10 @@ > { 'elementId' : 'testBeforeAfterTable', 'pseudoElement' : ':after', 'property' : 'padding', 'expectedValue' : '10px 20px 30px 40px' }, > { 'elementId' : 'testBeforeAfterTable', 'pseudoElement' : ':before', 'property' : 'border', 'expectedValue' : '5px solid rgb(255, 0, 0)' }, > { 'elementId' : 'testBeforeAfterTable', 'pseudoElement' : ':after', 'property' : 'border', 'expectedValue' : '10px dotted rgb(0, 0, 255)' }, >- { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'height', 'expectedValue' : 'auto' }, >- { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'width', 'expectedValue' : 'auto' }, >- { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'height', 'expectedValue' : 'auto' }, >- { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'width', 'expectedValue' : 'auto' }, >+ { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'height', 'expectedValue' : '250px' }, >+ { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'width', 'expectedValue' : '350px' }, >+ { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'height', 'expectedValue' : '200px' }, >+ { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'width', 'expectedValue' : '300px' }, > { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'margin', 'expectedValue' : '10px 20px 30px 40px' }, > { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':before', 'property' : 'padding', 'expectedValue' : '0px' }, > { 'elementId' : 'testBeforeAfterInline', 'pseudoElement' : ':after', 'property' : 'margin', 'expectedValue' : '0px' }, >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt >index e9f22e17ccc57c0731f0fb1f975006805bc7cd26..af6912126d451124ac73357fff0d98ff2aecbeda 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes-expected.txt >@@ -1,5 +1,5 @@ > > FAIL object.contentWindow assert_equals: The contentWindow's name of the object element should be 'o1'. expected "o1" but got "o" >-FAIL object.width assert_equals: The width should be 100px. expected "100px" but got "auto" >-FAIL object.height assert_equals: The height should be 50px. expected "50px" but got "auto" >+PASS object.width >+PASS object.height >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197814
:
370191
|
370192
|
370193
|
370194
|
370195
|
370196
|
370205
|
370210
|
370211
|
370212
|
370213
|
370214
|
370217
|
370221
|
370585