Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Issue 1812763002: Pseudo and non pseudo elements should return correct computed content value (Closed)

Created:
4 years, 9 months ago by nainar
Modified:
4 years, 8 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pseudo and non pseudo elements should return correct computed content value This patch makes sure that content computes to "normal" for elements (not pseudo elements) and to "none" if the specified value of pseudo elements ::before and ::after is "normal." This patch makes us interoperable with all other browsers for the case of pseudo elements :before and ::after where the specified value is "normal". With regards to non psuedo elements we are now interoperable with IE and the spec and return "normal" for the computed content all all non psuedo elements. Other browsers are inconcistent on this behaviour: 1. Edge returns an empty string for non pseudo elements 2. FF returns none for non pseudo elements. The spec implemented is given here: https://drafts.csswg.org/css2/generate.html#content BUG=597500 Committed: https://crrev.com/aaeefae6c3a945e7fcfef382c3a82002ffae0e19 Cr-Commit-Position: refs/heads/master@{#383949}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Patch Set 5 : #

Total comments: 10

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Total comments: 5

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -122 lines) Patch
M third_party/WebKit/LayoutTests/css3/supports.html View 1 2 3 4 5 6 7 6 chunks +55 lines, -53 lines 0 comments Download
M third_party/WebKit/LayoutTests/css3/supports-expected.txt View 1 2 3 4 5 6 7 1 chunk +48 lines, -48 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/content-property-quote-types.html View 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt View 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt View 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-content.html View 1 2 3 4 5 1 chunk +48 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/nested-at-rules.html View 1 2 3 4 5 6 7 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/nested-at-rules-expected.txt View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/elements/elements-panel-styles-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 39 (14 generated)
nainar
@alancutter, PTAL? Thanks!
4 years, 9 months ago (2016-03-17 06:22:00 UTC) #3
alancutter (OOO until 2018)
Can we assign these values on the ComputedStyle directly? Switching things around in getComputedStyle() doesn't ...
4 years, 9 months ago (2016-03-17 06:40:24 UTC) #4
nainar
From what I can see ComputedStyle stores content information on ContentData which stores information about ...
4 years, 9 months ago (2016-03-17 06:54:24 UTC) #5
alancutter (OOO until 2018)
On 2016/03/17 at 06:54:24, nainar wrote: > From what I can see ComputedStyle stores content ...
4 years, 9 months ago (2016-03-17 10:18:08 UTC) #6
nainar
Hi, I have updated the link to the spec in the description to the most ...
4 years, 9 months ago (2016-03-18 07:59:45 UTC) #8
alancutter (OOO until 2018)
https://codereview.chromium.org/1812763002/diff/20001/third_party/WebKit/Source/core/style/ContentData.h File third_party/WebKit/Source/core/style/ContentData.h (right): https://codereview.chromium.org/1812763002/diff/20001/third_party/WebKit/Source/core/style/ContentData.h#newcode229 third_party/WebKit/Source/core/style/ContentData.h:229: CSSValueID m_cssValueID; How many different CSSValueIDs could be stored ...
4 years, 9 months ago (2016-03-19 08:01:24 UTC) #9
nainar
Hi! PTAL? Thanks! https://codereview.chromium.org/1812763002/diff/20001/third_party/WebKit/Source/core/style/ContentData.h File third_party/WebKit/Source/core/style/ContentData.h (right): https://codereview.chromium.org/1812763002/diff/20001/third_party/WebKit/Source/core/style/ContentData.h#newcode229 third_party/WebKit/Source/core/style/ContentData.h:229: CSSValueID m_cssValueID; Done. https://codereview.chromium.org/1812763002/diff/40001/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp File third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp ...
4 years, 9 months ago (2016-03-21 00:12:08 UTC) #10
nainar
Sorry, seemed to have missed a failing tests :/ PTAL? Thanks!
4 years, 9 months ago (2016-03-22 00:45:33 UTC) #11
alancutter (OOO until 2018)
Summary of in person discussions: - We want to be targeting the CSS2 spec as ...
4 years, 9 months ago (2016-03-22 02:25:03 UTC) #12
nainar
@alancutter, PTAL? Thanks!
4 years, 9 months ago (2016-03-22 03:41:30 UTC) #14
alancutter (OOO until 2018)
https://codereview.chromium.org/1812763002/diff/80001/third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html File third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html (right): https://codereview.chromium.org/1812763002/diff/80001/third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html#newcode103 third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html:103: function checkBlueHoverText(expectedText) This should probably be renamed to checkBlueHoverContent ...
4 years, 9 months ago (2016-03-22 09:35:24 UTC) #16
Timothy Loh
https://codereview.chromium.org/1812763002/diff/80001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1812763002/diff/80001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode2333 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:2333: RefPtrWillBeRawPtr<CSSValue> parsedValue = consumeIdent<CSSValueNone, CSSValueNormal>(range); btw we've been using ...
4 years, 9 months ago (2016-03-22 23:25:27 UTC) #17
nainar
Hi, PTAL? Thanks! https://codereview.chromium.org/1812763002/diff/80001/third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html File third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html (right): https://codereview.chromium.org/1812763002/diff/80001/third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html#newcode103 third_party/WebKit/LayoutTests/fast/dom/hover-after-dom-delete.html:103: function checkBlueHoverText(expectedText) Done. https://codereview.chromium.org/1812763002/diff/80001/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp File third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp ...
4 years, 9 months ago (2016-03-23 02:50:49 UTC) #18
alancutter (OOO until 2018)
lgtm https://codereview.chromium.org/1812763002/diff/100001/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html File third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html (right): https://codereview.chromium.org/1812763002/diff/100001/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html#newcode11 third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html:11: ['content', 'url("chrome:")', 'normal'], Revert changes and just remove ...
4 years, 9 months ago (2016-03-23 03:12:30 UTC) #19
nainar
@timloh PTAL? Thanks! https://codereview.chromium.org/1812763002/diff/100001/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html File third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html (right): https://codereview.chromium.org/1812763002/diff/100001/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html#newcode11 third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html:11: ['content', 'url("chrome:")', 'normal'], Done.
4 years, 9 months ago (2016-03-23 03:19:19 UTC) #21
Timothy Loh
I think the description needs to be clearer. Try to explain *exactly* what the behavior ...
4 years, 9 months ago (2016-03-23 05:07:49 UTC) #23
alancutter (OOO until 2018)
https://codereview.chromium.org/1812763002/diff/120001/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html File third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html (left): https://codereview.chromium.org/1812763002/diff/120001/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html#oldcode11 third_party/WebKit/LayoutTests/fast/css/getComputedStyle/disallowed-url-serialization.html:11: ['content', 'url("chrome:")'], On 2016/03/23 at 05:07:49, Timothy Loh wrote: ...
4 years, 9 months ago (2016-03-23 05:30:30 UTC) #25
nainar
@timloh, Changed the description as well. PTAL? Thanks! https://codereview.chromium.org/1812763002/diff/120001/third_party/WebKit/LayoutTests/css3/supports.html File third_party/WebKit/LayoutTests/css3/supports.html (right): https://codereview.chromium.org/1812763002/diff/120001/third_party/WebKit/LayoutTests/css3/supports.html#newcode254 third_party/WebKit/LayoutTests/css3/supports.html:254: shouldBeEqualToString("getComputedStyle(document.getElementById('t"+i+"')).content", ...
4 years, 9 months ago (2016-03-23 06:50:41 UTC) #26
nainar
@timloh, Pinging to mention that I have updated the patch since I last sent it. ...
4 years, 8 months ago (2016-03-29 08:20:26 UTC) #28
Timothy Loh
On 2016/03/29 08:20:26, nainar wrote: > @timloh, > > Pinging to mention that I have ...
4 years, 8 months ago (2016-03-30 05:59:42 UTC) #29
commit-bot: I haz the power
This CL has an open dependency (Issue 1837413002 Patch 60001). Please resolve the dependency and ...
4 years, 8 months ago (2016-03-30 06:02:26 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1812763002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1812763002/260001
4 years, 8 months ago (2016-03-30 11:42:38 UTC) #35
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 8 months ago (2016-03-30 12:16:01 UTC) #36
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/aaeefae6c3a945e7fcfef382c3a82002ffae0e19 Cr-Commit-Position: refs/heads/master@{#383949}
4 years, 8 months ago (2016-03-30 12:17:34 UTC) #38
nainar
4 years, 7 months ago (2016-05-16 05:31:54 UTC) #39
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:260001) has been created in
https://codereview.chromium.org/1977323002/ by nainar@chromium.org.

The reason for reverting is: BUG=609848

A lot of sites in production are depending on content returning an empty
string..

Powered by Google App Engine
This is Rietveld 408576698