Fix warning about adjacent overload methods in TtmlStyle

PiperOrigin-RevId: 290610936
This commit is contained in:
ibaker 2020-01-20 14:59:21 +00:00 committed by Ian Baker
parent f7470c5126
commit 9cfc75ff8a

View File

@ -166,19 +166,8 @@ import java.lang.annotation.RetentionPolicy;
}
/**
* Inherits from an ancestor style. Properties like <i>tts:backgroundColor</i> which
* are not inheritable are not inherited as well as properties which are already set locally
* are never overridden.
*
* @param ancestor the ancestor style to inherit from
*/
public TtmlStyle inherit(TtmlStyle ancestor) {
return inherit(ancestor, false);
}
/**
* Chains this style to referential style. Local properties which are already set
* are never overridden.
* Chains this style to referential style. Local properties which are already set are never
* overridden.
*
* @param ancestor the referential style to inherit from
*/
@ -186,6 +175,17 @@ import java.lang.annotation.RetentionPolicy;
return inherit(ancestor, true);
}
/**
* Inherits from an ancestor style. Properties like <i>tts:backgroundColor</i> which are not
* inheritable are not inherited as well as properties which are already set locally are never
* overridden.
*
* @param ancestor the ancestor style to inherit from
*/
public TtmlStyle inherit(TtmlStyle ancestor) {
return inherit(ancestor, false);
}
private TtmlStyle inherit(TtmlStyle ancestor, boolean chaining) {
if (ancestor != null) {
if (!hasFontColor && ancestor.hasFontColor) {