Change setProperty to take in nullable |value|

IDL allows |value| to be nullable.

Change-Id: I1db4a7929f0a83c4772e1a11384afb70ead53501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136722
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
This commit is contained in:
Srujan Gaddam 2020-02-22 02:22:21 +00:00 committed by commit-bot@chromium.org
parent d41e419904
commit 55f4b1294e
3 changed files with 9 additions and 9 deletions

View file

@ -4096,7 +4096,7 @@ class CssStyleDeclaration extends Interceptor with CssStyleDeclarationBase {
return JS('bool', '# in #', propertyName, this);
}
void setProperty(String propertyName, String value, [String? priority]) {
void setProperty(String propertyName, String? value, [String? priority]) {
return _setPropertyHelper(
_browserPropertyName(propertyName), value, priority);
}
@ -5275,7 +5275,7 @@ class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
_elementCssStyleDeclarationSetIterable!.first
.getPropertyValue(propertyName);
void setProperty(String propertyName, String value, [String? priority]) {
void setProperty(String propertyName, String? value, [String? priority]) {
_elementCssStyleDeclarationSetIterable!
.forEach((e) => e.setProperty(propertyName, value, priority));
}
@ -5746,7 +5746,7 @@ class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
abstract class CssStyleDeclarationBase {
String getPropertyValue(String propertyName);
void setProperty(String propertyName, String value, [String? priority]);
void setProperty(String propertyName, String? value, [String? priority]);
/** Gets the value of "align-content" */
String get alignContent => getPropertyValue('align-content');

View file

@ -150,7 +150,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME $EXTENDS with
}
void setProperty(String propertyName, String value,
void setProperty(String propertyName, String$NULLABLE value,
[String$NULLABLE priority]) {
return _setPropertyHelper(_browserPropertyName(propertyName),
value, priority);
@ -240,7 +240,7 @@ class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
_elementCssStyleDeclarationSetIterable$NULLASSERT.first.getPropertyValue(
propertyName);
void setProperty(String propertyName, String value,
void setProperty(String propertyName, String$NULLABLE value,
[String$NULLABLE priority]) {
_elementCssStyleDeclarationSetIterable$NULLASSERT.forEach((e) =>
e.setProperty(propertyName, value, priority));
@ -277,7 +277,7 @@ class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
abstract class CssStyleDeclarationBase {
String getPropertyValue(String propertyName);
void setProperty(String propertyName, String value,
void setProperty(String propertyName, String$NULLABLE value,
[String$NULLABLE priority]);
""")

View file

@ -52,7 +52,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME $EXTENDS with
}
void setProperty(String propertyName, String value,
void setProperty(String propertyName, String$NULLABLE value,
[String$NULLABLE priority]) {
return _setPropertyHelper(_browserPropertyName(propertyName),
value, priority);
@ -1114,7 +1114,7 @@ class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
_elementCssStyleDeclarationSetIterable$NULLASSERT.first.getPropertyValue(
propertyName);
void setProperty(String propertyName, String value,
void setProperty(String propertyName, String$NULLABLE value,
[String$NULLABLE priority]) {
_elementCssStyleDeclarationSetIterable$NULLASSERT.forEach((e) =>
e.setProperty(propertyName, value, priority));
@ -1588,7 +1588,7 @@ class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
abstract class CssStyleDeclarationBase {
String getPropertyValue(String propertyName);
void setProperty(String propertyName, String value,
void setProperty(String propertyName, String$NULLABLE value,
[String$NULLABLE priority]);
/** Gets the value of "align-content" */