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

Issue 2034013002: Make CSSComputedStyledeclaration::getPropertyCSSValue return const (Closed)

Created:
4 years, 6 months ago by sashab
Modified:
4 years, 6 months ago
Reviewers:
haraken, Timothy Loh, Yuki
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-css, blink-reviews-style_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, dglazkov+blink, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, rwlbuis, sergeyv+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@_make_cssproperty_store_const
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make CSSComputedStyledeclaration::getPropertyCSSValue return const Make CSSComputedStyledeclaration::getPropertyCSSValue() return a const CSSValue* instead of a regular CSSValue*. This required changing CSSStyleDeclaration::getPropertyCSSValueInternal() return a const CSSValue* as well, and marking CSSValueList::copy() as a const method (which it already was, it was just missing the const modifier). This is pre-work for making CSSValueList store const CSSValues. This patch is mostly mechanical changes, but does contain one logic change: the static method mergeTextDecorationValues in EditingStyle needs to be changed since it modifies a CSSValueList that points inside the mutable style. Instead, the function is changed to take two CSSValueLists and return a new one, and the callsite is changed to replace the old CSSValueList with the new one in the style rather than modifying the old CSSValueList in-place. BUG=526586 Committed: https://crrev.com/5896ec297d9240b691e7f70a239498b795531dc1 Cr-Commit-Position: refs/heads/master@{#398151}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -75 lines) Patch
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/css/CSSComputedStyleDeclaration.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 8 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleDeclaration.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSValueList.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSValueList.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/EditingStyle.cpp View 29 chunks +53 lines, -49 lines 2 comments Download
M third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/LayoutEditor.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/LayoutEditor.cpp View 3 chunks +5 lines, -5 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 15 (6 generated)
sashab
4 years, 6 months ago (2016-06-06 03:52:45 UTC) #2
Yuki
bindings/ LGTM.
4 years, 6 months ago (2016-06-06 05:49:56 UTC) #4
sashab
Everything is a mechanical change (adding consts) except what's marked https://codereview.chromium.org/2034013002/diff/40001/third_party/WebKit/Source/core/editing/EditingStyle.cpp File third_party/WebKit/Source/core/editing/EditingStyle.cpp (right): https://codereview.chromium.org/2034013002/diff/40001/third_party/WebKit/Source/core/editing/EditingStyle.cpp#newcode1191 ...
4 years, 6 months ago (2016-06-06 05:50:33 UTC) #6
haraken
LGTM
4 years, 6 months ago (2016-06-06 05:51:04 UTC) #7
sashab
4 years, 6 months ago (2016-06-06 06:37:35 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034013002/40001
4 years, 6 months ago (2016-06-06 22:49:47 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-06 22:54:55 UTC) #12
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/5896ec297d9240b691e7f70a239498b795531dc1 Cr-Commit-Position: refs/heads/master@{#398151}
4 years, 6 months ago (2016-06-06 22:56:44 UTC) #14
erikchen
4 years, 6 months ago (2016-06-06 23:11:14 UTC) #15
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/2042113002/ by erikchen@chromium.org.

The reason for reverting is: """
../../third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp:14:15:
error: cannot initialize a variable of type 'blink::CSSValue *' with an rvalue
of type 'const blink::CSSValue *'
    CSSValue* cssValue =
m_computedStyleDeclaration->getPropertyCSSValueInternal(propertyID);
"""

https://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Linux%20....

Powered by Google App Engine
This is Rietveld 408576698