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

Issue 2607403002: Disallow setting invalid values for registered properties via CSSOM (Closed)

Created:
3 years, 11 months ago by Timothy Loh
Modified:
3 years, 11 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-bindings_chromium.org, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, dglazkov+blink, eae+blinkwatch, Eric Willigers, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, rjwright, rwlbuis, shans, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disallow setting invalid values for registered properties via CSSOM This patch rejects setting invalid values for registered properties via the CSSStyleDeclaration::setProperty function. The behaviour which we decided on is that we will retain any values set prior to registration and compute them as if they were the unset keyword if they are invalid after registration, but disallow setting such values after registration. CSS Typed OM is not yet hooked up aside from the filtered computed map for custom paint, so we don't yet make any changes there. BUG=641877 Committed: https://crrev.com/ed0f6121435448aa316c90be1468398ab2ef71b4 Cr-Commit-Position: refs/heads/master@{#441313}

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -43 lines) Patch
A third_party/WebKit/LayoutTests/custom-properties/registered-property-cssom.html View 1 chunk +77 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/animation/EffectInput.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/animation/StringKeyframe.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/animation/StringKeyframe.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.h View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleDeclaration.h View 4 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleDeclaration.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/DOMWindowCSS.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.h View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.cpp View 3 chunks +13 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySet.h View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySet.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParser.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParser.cpp View 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp View 1 3 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisiblePositionTest.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/RemoveCSSPropertyCommand.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp View 1 chunk +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp View 2 chunks +6 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (11 generated)
Timothy Loh
3 years, 11 months ago (2017-01-04 00:40:08 UTC) #6
alancutter (OOO until 2018)
https://codereview.chromium.org/2607403002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp File third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp (right): https://codereview.chromium.org/2607403002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp#newcode88 third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp:88: // to validate but throw away the result. General ...
3 years, 11 months ago (2017-01-04 01:03:42 UTC) #7
Timothy Loh
https://codereview.chromium.org/2607403002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp File third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp (right): https://codereview.chromium.org/2607403002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp#newcode92 third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp:92: return MutableStylePropertySet::SetResult{didParse, didChange}; On 2017/01/04 01:03:42, alancutter wrote: > ...
3 years, 11 months ago (2017-01-04 02:00:59 UTC) #8
alancutter (OOO until 2018)
lgtm
3 years, 11 months ago (2017-01-04 02:01:17 UTC) #9
haraken
bindings/ LGTM
3 years, 11 months ago (2017-01-04 02:10:07 UTC) #11
alancutter (OOO until 2018)
https://codereview.chromium.org/2607403002/diff/1/third_party/WebKit/Source/core/dom/Document.h File third_party/WebKit/Source/core/dom/Document.h (right): https://codereview.chromium.org/2607403002/diff/1/third_party/WebKit/Source/core/dom/Document.h#newcode1668 third_party/WebKit/Source/core/dom/Document.h:1668: mutable Member<PropertyRegistry> m_propertyRegistry; On 2017/01/04 at 02:00:59, Timothy Loh ...
3 years, 11 months ago (2017-01-04 02:22:10 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2607403002/20001
3 years, 11 months ago (2017-01-04 02:26:10 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
3 years, 11 months ago (2017-01-04 03:47:26 UTC) #18
commit-bot: I haz the power
3 years, 11 months ago (2017-01-04 03:49:53 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ed0f6121435448aa316c90be1468398ab2ef71b4
Cr-Commit-Position: refs/heads/master@{#441313}

Powered by Google App Engine
This is Rietveld 408576698