From 299aa9694b6d5de6efb26d24978bb6f395654abe Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Mon, 27 Apr 2015 16:51:24 -0400 Subject: [PATCH] Added background color for image object (close #366) --- index.html | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/index.html b/index.html index 07bc6302..94d4a901 100644 --- a/index.html +++ b/index.html @@ -1331,6 +1331,14 @@

icon's density property to be value. +
  • Let bgcolor be the result of running the + steps for processing the background_color + member of an image with potential icon. +
  • +
  • If bgcolor is not undefined, set + icon's background property to be + bgcolor. +
  • Append icon to icons.
  • @@ -1869,6 +1877,59 @@

    +
    +

    + background_color member +

    +

    + The background_color member of an image + object is a color, expressed as a [[!CSS3-Color]] value, that + represents a color on which a user agent SHOULD render an image + object. For example, this color can be used when the dimensions + of the display context exceeds those of the image object - + and/or when the image contains transparent regions. +

    +

    + The steps for processing the background_color + member of an image are given by the following algorithm. The + algorithm takes an image object as an argument, and + returns either a string or undefined. +

    +
      +
    1. Let value be the result of calling the + [[\GetOwnProperty]] internal method of image with + argument "background_color". +
    2. +
    3. If Type( value) is not "string": +
        +
      1. If Type( value) is not "undefined", + optionally issue a developer warning that the type is not + supported. +
      2. +
      3. Return undefined. +
      4. +
      +
    4. +
    5. Otherwise, let potential color be the result of + running [[!CSS-SYNTAX-3]]'s parse a component value algorithm + with value as input. If parsing returns a syntax error, + return undefined. +
    6. +
    7. Let color be the result of attempting to parse + potential color as a CSS color, as per [[!CSS-SYNTAX-3]]. + If parsing fails: +
        +
      1. + Issue a developer warning. +
      2. +
      3. Return undefined. +
      4. +
      +
    8. +
    9. Return color. +
    10. +
    +

    density member