define how iconUrl is resolved and what happens if that fails; also be clearer that the icon URL concept is not always set
authorAnne van Kesteren <annevk@opera.com>
Tue, 26 Jun 2012 15:27:37 +0200
changeset 24 d12d81df8cf3
parent 23 c385e2d54c8c
child 25 914cfd6e0f75
define how iconUrl is resolved and what happens if that fails; also be clearer that the icon URL concept is not always set
Overview.html
Overview.src.html
--- a/Overview.html	Tue Jun 26 15:12:13 2012 +0200
+++ b/Overview.html	Tue Jun 26 15:27:37 2012 +0200
@@ -340,17 +340,17 @@
 are:
 
 <ol>
- <li><p>If the notification platform supports icons and
- <var title="">notification</var>'s <a href="#icon-url">icon URL</a> has not yet been
- <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetched</a>,
- <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch">fetch</a> it and wait for the resource to be
- fully downloaded.
+ <li>
+  <p>If the notification platform supports icons,
+  <var title="">notification</var>'s <a href="#icon-url">icon URL</a> is set and has not
+  yet been <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetched</a>,
+  <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch">fetch</a> it and wait for the resource to
+  be fully downloaded.
 
- <li><p>If <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetching</a>
- <var title="">notification</var>'s <a href="#icon-url">icon URL</a> finished and the
- image format is supported, set <var title="">notification</var>'s
- <a href="#icon">icon</a> to the decoded resource. (Otherwise
- <var title="">notification</var> has no <a href="#icon">icon</a>.)
+  <p>Once <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetching</a> has
+  finished and the image format is supported, set
+  <var title="">notification</var>'s <a href="#icon">icon</a> to the decoded resource.
+  (Otherwise <var title="">notification</var> has no <a href="#icon">icon</a>.)
 
  <li>
   <p><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">Queue a task</a> to run these substeps:
@@ -381,18 +381,18 @@
 <var title="">new</var> one are:
 
 <ol>
- <li><p>If the notification platform supports icons and
- <var title="">new</var>'s <a href="#icon-url">icon URL</a> has not yet been
- <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetched</a>,
- <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch">fetch</a> it and wait for the resource to be
- fully downloaded.
+  <p>If the notification platform supports icons,
+  <var title="">new</var>'s <a href="#icon-url">icon URL</a> is set and has not
+  yet been <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetched</a>,
+  <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch">fetch</a> it and wait for the resource to
+  be fully downloaded.
 
- <li><p>If <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetching</a>
- <var title="">new</var>'s <a href="#icon-url">icon URL</a> finished and the  image format
- is supported, set <var title="">new</var>'s <a href="#icon">icon</a> to the decoded
- resource. (Otherwise <var title="">new</var> has no <a href="#icon">icon</a>.)
+  <p>Once <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetching</a> has
+  finished and the image format is supported, set
+  <var title="">new</var>'s <a href="#icon">icon</a> to the decoded resource.
+  (Otherwise <var title="">new</var> has no <a href="#icon">icon</a>.)
 
- <li><p>If <var title="">old</var> is in the
+ </p><li><p>If <var title="">old</var> is in the
  <a href="#list-of-pending-notifications">list of pending notifications</a>,
  <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">queue a task</a> to replace
  <var title="">old</var> with <var title="">new</var>, in the same position, in
@@ -493,15 +493,22 @@
  <var title="">notification</var>'s <a href="#tag">tag</a> to <code title="">tag</code>.
 
  <li><p>If <var title="">options</var>'s <code title="">iconUrl</code> is present,
- set <var title="">notification</var>'s <a href="#icon-url">icon URL</a> to
- <code title="">iconUrl</code>.
+ <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#resolve-a-url" title="resolve a URL">resolve</a>
+ <code title="">iconUrl</code> against the
+ <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#entry-script">entry script</a>'s
+ <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#script's-base-url" title="script's base URL">base URL</a>, and
+ if that does not fail, set
+ <var title="">notification</var>'s <a href="#icon-url">icon URL</a> to the resulting
+ <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#absolute-url">absolute URL</a>. (Otherwise
+ <a href="#icon-url">icon URL</a> is not set.)
 
  <li><p>Return <var title="">notification</var>, but continue running these
  steps asynchronouusly.
 
  <li><p>If the notification platform supports icons, the user agent may
  start <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetching</a>
- <var title="">notification</var>'s <a href="#icon-url">icon URL</a> at this point.
+ <var title="">notification</var>'s <a href="#icon-url">icon URL</a> at this point, if
+ <a href="#icon-url">icon URL</a> is set.
 
  <li><p>Run the <a href="#show-steps">show steps</a> for <var title="">notification</var>.
 </ol>
--- a/Overview.src.html	Tue Jun 26 15:12:13 2012 +0200
+++ b/Overview.src.html	Tue Jun 26 15:27:37 2012 +0200
@@ -318,17 +318,17 @@
 are:
 
 <ol>
- <li><p>If the notification platform supports icons and
- <var title>notification</var>'s <span>icon URL</span> has not yet been
- <span data-anolis-spec=html title=fetch>fetched</span>,
- <span data-anolis-spec=html>fetch</span> it and wait for the resource to be
- fully downloaded.
+ <li>
+  <p>If the notification platform supports icons,
+  <var title>notification</var>'s <span>icon URL</span> is set and has not
+  yet been <span data-anolis-spec=html title=fetch>fetched</span>,
+  <span data-anolis-spec=html>fetch</span> it and wait for the resource to
+  be fully downloaded.
 
- <li><p>If <span data-anolis-spec=html title=fetch>fetching</span>
- <var title>notification</var>'s <span>icon URL</span> finished and the
- image format is supported, set <var title>notification</var>'s
- <span>icon</span> to the decoded resource. (Otherwise
- <var title>notification</var> has no <span>icon</span>.)
+  <p>Once <span data-anolis-spec=html title=fetch>fetching</span> has
+  finished and the image format is supported, set
+  <var title>notification</var>'s <span>icon</span> to the decoded resource.
+  (Otherwise <var title>notification</var> has no <span>icon</span>.)
 
  <li>
   <p><span data-anolis-spec=html>Queue a task</span> to run these substeps:
@@ -359,16 +359,16 @@
 <var title>new</var> one are:
 
 <ol>
- <li><p>If the notification platform supports icons and
- <var title>new</var>'s <span>icon URL</span> has not yet been
- <span data-anolis-spec=html title=fetch>fetched</span>,
- <span data-anolis-spec=html>fetch</span> it and wait for the resource to be
- fully downloaded.
+  <p>If the notification platform supports icons,
+  <var title>new</var>'s <span>icon URL</span> is set and has not
+  yet been <span data-anolis-spec=html title=fetch>fetched</span>,
+  <span data-anolis-spec=html>fetch</span> it and wait for the resource to
+  be fully downloaded.
 
- <li><p>If <span data-anolis-spec=html title=fetch>fetching</span>
- <var title>new</var>'s <span>icon URL</span> finished and the  image format
- is supported, set <var title>new</var>'s <span>icon</span> to the decoded
- resource. (Otherwise <var title>new</var> has no <span>icon</span>.)
+  <p>Once <span data-anolis-spec=html title=fetch>fetching</span> has
+  finished and the image format is supported, set
+  <var title>new</var>'s <span>icon</span> to the decoded resource.
+  (Otherwise <var title>new</var> has no <span>icon</span>.)
 
  <li><p>If <var title>old</var> is in the
  <span>list of pending notifications</span>,
@@ -471,15 +471,22 @@
  <var title>notification</var>'s <span>tag</span> to <code title>tag</code>.
 
  <li><p>If <var title>options</var>'s <code title>iconUrl</code> is present,
- set <var title>notification</var>'s <span>icon URL</span> to
- <code title>iconUrl</code>.
+ <span title="resolve a URL" data-anolis-spec=html>resolve</span>
+ <code title>iconUrl</code> against the
+ <span data-anolis-spec=html>entry script</span>'s
+ <span title="script's base URL" data-anolis-spec=html>base URL</span>, and
+ if that does not fail, set
+ <var title>notification</var>'s <span>icon URL</span> to the resulting
+ <span data-anolis-spec=html>absolute URL</span>. (Otherwise
+ <span>icon URL</span> is not set.)
 
  <li><p>Return <var title>notification</var>, but continue running these
  steps asynchronouusly.
 
  <li><p>If the notification platform supports icons, the user agent may
  start <span data-anolis-spec=html title=fetch>fetching</span>
- <var title>notification</var>'s <span>icon URL</span> at this point.
+ <var title>notification</var>'s <span>icon URL</span> at this point, if
+ <span>icon URL</span> is set.
 
  <li><p>Run the <span>show steps</span> for <var title>notification</var>.
 </ol>