Skip to content

Commit

Permalink
Brought back icon density member (closes #118)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Jun 10, 2014
1 parent 8e788f4 commit 9883838
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions index.html
Expand Up @@ -167,8 +167,10 @@ <h2>
[[\GetOwnProperty]]</a></dfn> operation and the abstract operation
<dfn><a href=
"http://people.mozilla.org/~jorendorff/es6-draft.html#sec-hasownproperty">
hasOwnProperty</a></dfn>, and the <a class="external" href=
"http://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-data-types-and-values">
hasOwnProperty</a></dfn>, <dfn title="parseFloat"><a href=
"http://people.mozilla.org/~jorendorff/es6-draft.html#sec-parsefloat-string">
parseFloat(string)</a></dfn> function, and the <a class="external"
href="http://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-data-types-and-values">
<dfn>Type</dfn>(<var>x</var>)</a> notation are defined in
[[!ECMASCRIPT]].
</p>
Expand Down Expand Up @@ -1200,6 +1202,39 @@ <h3>
</pre>
</div>
</section>
<section>
<h3>
<code>density</code> member
</h3>
<p>
The <dfn id="icon-densitiy">density</dfn> member of an icon is the
device pixel density for which this icon was designed. The device
pixel density is expressed as the number of dots per 'px' unit
(equivalent to a dppx as defined in [[!css3-values]]). The value is a
positive number greater than 0. If the developer ommits the value,
the user agent assumes the value <code>1.0</code>.
</p>
<p>
The <dfn id="dfn-steps-for-processing-a-density-of-an-icon">steps for
processing a density of an icon</dfn> are given by the following
algorithm. The algorithm thanks an <var>icon</var> object as an
argument and returns a positive number.
</p>
<ol>
<li>Let <var>value</var> be the result of calling the
[[\GetOwnProperty]] internal method of <var>icon</var> passing
"<code>density</code>" as the argument.
</li>
<li>Let <var>result</var> be the result of
<a>parseFloat</a>(<var>value</var>);
</li>
<li>If <var>result</var> is <code>NaN</code>, +0, −0, +∞, or −∞, or
less than 0, let <var>result</var> be 1.0.
</li>
<li>Return <var>result</var>.
</li>
</ol>
</section>
<section>
<h3>
<code>sizes</code> member
Expand Down

0 comments on commit 9883838

Please sign in to comment.