From 814bf047db5ccd46225bdf7b5a7a99d8c7c76ff7 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Thu, 10 May 2018 09:05:08 +1000 Subject: [PATCH] Bug 1460456 part 1 - Change the semantics of 'auto' color value. r=heycam MozReview-Commit-ID: CRkhO35MoB8 --HG-- extra : rebase_source : ad4e88365c428fe081ec55897ec8260e6102595c --- layout/style/StyleComplexColor.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/layout/style/StyleComplexColor.h b/layout/style/StyleComplexColor.h index fb1370d653cb..1bbc7a4bc93e 100644 --- a/layout/style/StyleComplexColor.h +++ b/layout/style/StyleComplexColor.h @@ -23,15 +23,19 @@ class ComputedStyle; * Conceptually, the formula is "color * (1 - p) + currentcolor * p" * where p is mForegroundRatio. See mozilla::LinearBlendColors for * the actual algorithm. + * + * It can also represent an "auto" value, which is valid for some + * properties. See comment of mIsAuto. */ struct StyleComplexColor { nscolor mColor; uint8_t mForegroundRatio; // Whether the complex color represents a computed-value time auto - // value. This is only a flag indicating that this value should not - // be interpolatable with other colors, while other fields still - // represents the actual used color of this value. + // value. This is a flag indicating that this value should not be + // interpolatable with other colors. When this flag is set, other + // fields represent a currentcolor. Properties can decide whether + // that should be used. bool mIsAuto; static StyleComplexColor FromColor(nscolor aColor) {