Commit 7af65ec1 authored by Zhuoyu Qian's avatar Zhuoyu Qian Committed by Commit Bot

[css-typed-om] StylePropertyMapOnly.size changed to unsigned

StylePropertyMapOnly.size should be unsigned:
https://github.com/w3c/css-houdini-drafts/commit/2da28139b2f817e241fc55a35f8c4b2825835308

Bug: 815040
Signed-off-by: default avatarZhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ib72d13ab5ee90936ca54829fd1f230223ddef7b5
Reviewed-on: https://chromium-review.googlesource.com/936941Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539062}
parent edc181d9
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
namespace blink { namespace blink {
int ComputedStylePropertyMap::size() { unsigned int ComputedStylePropertyMap::size() {
const ComputedStyle* style = UpdateStyle(); const ComputedStyle* style = UpdateStyle();
if (!style) if (!style)
return 0; return 0;
......
...@@ -32,7 +32,7 @@ class CORE_EXPORT ComputedStylePropertyMap : public StylePropertyMapReadOnly { ...@@ -32,7 +32,7 @@ class CORE_EXPORT ComputedStylePropertyMap : public StylePropertyMapReadOnly {
StylePropertyMapReadOnly::Trace(visitor); StylePropertyMapReadOnly::Trace(visitor);
} }
int size() override; unsigned int size() override;
protected: protected:
ComputedStylePropertyMap(Node* node, const String& pseudo_element = String()) ComputedStylePropertyMap(Node* node, const String& pseudo_element = String())
......
...@@ -16,7 +16,7 @@ namespace blink { ...@@ -16,7 +16,7 @@ namespace blink {
DeclaredStylePropertyMap::DeclaredStylePropertyMap(CSSStyleRule* owner_rule) DeclaredStylePropertyMap::DeclaredStylePropertyMap(CSSStyleRule* owner_rule)
: StylePropertyMap(), owner_rule_(owner_rule) {} : StylePropertyMap(), owner_rule_(owner_rule) {}
int DeclaredStylePropertyMap::size() { unsigned int DeclaredStylePropertyMap::size() {
if (!GetStyleRule()) if (!GetStyleRule())
return 0; return 0;
return GetStyleRule()->Properties().PropertyCount(); return GetStyleRule()->Properties().PropertyCount();
......
...@@ -31,7 +31,7 @@ class CORE_EXPORT DeclaredStylePropertyMap final : public StylePropertyMap { ...@@ -31,7 +31,7 @@ class CORE_EXPORT DeclaredStylePropertyMap final : public StylePropertyMap {
StylePropertyMap::Trace(visitor); StylePropertyMap::Trace(visitor);
} }
int size() final; unsigned int size() final;
protected: protected:
const CSSValue* GetProperty(CSSPropertyID) override; const CSSValue* GetProperty(CSSPropertyID) override;
......
...@@ -28,7 +28,7 @@ FilteredComputedStylePropertyMap::FilteredComputedStylePropertyMap( ...@@ -28,7 +28,7 @@ FilteredComputedStylePropertyMap::FilteredComputedStylePropertyMap(
} }
} }
int FilteredComputedStylePropertyMap::size() { unsigned int FilteredComputedStylePropertyMap::size() {
return native_properties_.size() + custom_properties_.size(); return native_properties_.size() + custom_properties_.size();
} }
......
...@@ -23,7 +23,7 @@ class CORE_EXPORT FilteredComputedStylePropertyMap ...@@ -23,7 +23,7 @@ class CORE_EXPORT FilteredComputedStylePropertyMap
custom_properties); custom_properties);
} }
int size() final; unsigned int size() final;
private: private:
FilteredComputedStylePropertyMap( FilteredComputedStylePropertyMap(
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
namespace blink { namespace blink {
int InlineStylePropertyMap::size() { unsigned int InlineStylePropertyMap::size() {
const CSSPropertyValueSet* inline_style = owner_element_->InlineStyle(); const CSSPropertyValueSet* inline_style = owner_element_->InlineStyle();
return inline_style ? inline_style->PropertyCount() : 0; return inline_style ? inline_style->PropertyCount() : 0;
} }
......
...@@ -21,7 +21,7 @@ class CORE_EXPORT InlineStylePropertyMap final : public StylePropertyMap { ...@@ -21,7 +21,7 @@ class CORE_EXPORT InlineStylePropertyMap final : public StylePropertyMap {
StylePropertyMap::Trace(visitor); StylePropertyMap::Trace(visitor);
} }
int size() final; unsigned int size() final;
protected: protected:
const CSSValue* GetProperty(CSSPropertyID) override; const CSSValue* GetProperty(CSSPropertyID) override;
......
...@@ -28,7 +28,7 @@ class CORE_EXPORT StylePropertyMapReadOnly ...@@ -28,7 +28,7 @@ class CORE_EXPORT StylePropertyMapReadOnly
CSSStyleValueVector getAll(const String& property_name, ExceptionState&); CSSStyleValueVector getAll(const String& property_name, ExceptionState&);
bool has(const String& property_name, ExceptionState&); bool has(const String& property_name, ExceptionState&);
virtual int size() = 0; virtual unsigned int size() = 0;
protected: protected:
StylePropertyMapReadOnly() = default; StylePropertyMapReadOnly() = default;
......
...@@ -13,5 +13,5 @@ ...@@ -13,5 +13,5 @@
[RaisesException] CSSStyleValue? get(DOMString property); [RaisesException] CSSStyleValue? get(DOMString property);
[RaisesException] sequence<CSSStyleValue> getAll(DOMString property); [RaisesException] sequence<CSSStyleValue> getAll(DOMString property);
[RaisesException] boolean has(DOMString property); [RaisesException] boolean has(DOMString property);
readonly attribute long size; readonly attribute unsigned long size;
}; };
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