Commit 871422f8 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[blink] const& return for BlockPropertiesVector()

This is more consistent with other Vectors held in DEFINE_STATIC_LOCAL

R=andruud@chromium.org, yosin@chromium.org

Change-Id: I284527e376c7b7d31d986ca2e6fabdf72f353ac2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645832
Auto-Submit: Gabriel Charette <gab@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666525}
parent b60adc26
......@@ -507,7 +507,7 @@ void MutableCSSPropertyValueSet::Clear() {
property_vector_.clear();
}
inline bool ContainsId(const CSSProperty** set,
inline bool ContainsId(const CSSProperty* const set[],
unsigned length,
CSSPropertyID id) {
for (unsigned i = 0; i < length; ++i) {
......@@ -517,8 +517,9 @@ inline bool ContainsId(const CSSProperty** set,
return false;
}
bool MutableCSSPropertyValueSet::RemovePropertiesInSet(const CSSProperty** set,
unsigned length) {
bool MutableCSSPropertyValueSet::RemovePropertiesInSet(
const CSSProperty* const set[],
unsigned length) {
if (property_vector_.IsEmpty())
return false;
......
......@@ -268,7 +268,7 @@ class CORE_EXPORT MutableCSSPropertyValueSet : public CSSPropertyValueSet {
template <typename T> // CSSPropertyID or AtomicString
bool RemoveProperty(T property, String* return_text = nullptr);
bool RemovePropertiesInSet(const CSSProperty** set, unsigned length);
bool RemovePropertiesInSet(const CSSProperty* const set[], unsigned length);
void RemoveEquivalentProperties(const CSSPropertyValueSet*);
void RemoveEquivalentProperties(const CSSStyleDeclaration*);
......
......@@ -703,7 +703,7 @@ static const CSSPropertyID kStaticBlockProperties[] = {
CSSPropertyID::kTextAlignLast, CSSPropertyID::kTextIndent,
CSSPropertyID::kTextJustify, CSSPropertyID::kWidows};
static Vector<const CSSProperty*>& BlockPropertiesVector() {
static const Vector<const CSSProperty*>& BlockPropertiesVector() {
DEFINE_STATIC_LOCAL(Vector<const CSSProperty*>, properties, ());
if (properties.IsEmpty()) {
CSSProperty::FilterEnabledCSSPropertiesIntoVector(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment