W3C home > Mailing lists > Public > public-bpwg@w3.org > May 2008

ISSUE-251 (mobileOK Algorithms): Differences between the algorithms in OBJECTS_OR_SCRIPT and PAGE_SIZE_LIMIT [mobileOK Basic tests]

From: Mobile Web Best Practices Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Thu, 22 May 2008 13:49:13 +0000 (GMT)
To: public-bpwg@w3.org
Message-Id: <20080522134913.F2894C6DB9@barney.w3.org>

ISSUE-251 (mobileOK Algorithms): Differences between the algorithms in OBJECTS_OR_SCRIPT and PAGE_SIZE_LIMIT [mobileOK Basic tests]

http://www.w3.org/2005/MWI/BPWG/Group/track/issues/

Raised by: Jo Rabin
On product: mobileOK Basic tests

This in response to my ACTION-758 Raise an Issue on the differences between the algorithms in OBJECTS_OR_SCRIPT and PAGE_SIZE_LIMIT

Please see also the excellent post by Francois [1] whi9ch relates to this:
[1] http://lists.w3.org/Archives/Public/public-bpwg/2008May/0018.html

The issue is this - in OBJECTS_OR_SCRIPT we say that the checker should check every object, irrespective of whether the Object element has a type attribute. This is because some browsers ignore the type attribute.

On the other hand, in PAGE_SIZE_LIMIT, we say that if the type attribute is specified and the content is irrelevant then, because some browsers take account of the type attribute, it's not fair to count that resource.

The logic is to be both safe and generous. I think, modulo FD's comments, that the logic is OK, but a little bit more word-smithing may be needed to make the document completely consistent.

Additionally, the latest OBJECTS_OR_SCRIPT algorithm needs careful checking, it's not the one we agreed as the new one, as that was broken, as was the one we originally published. This is obviously something that is hard to get right, and ideally we need a resolution that the new one is correct. 

OBJECTS_OR_SCRIPT

3.15.1 Object Element Processing Rule
   
For each object element that has no object element ancestor in this context (excepting the context node itself):

  Retrieve the object (ignoring the type attribute)

  If the content type of the retrieved object is not "image/jpeg" or "image/gif"

    If the object element is empty, warn

    If the content of the object element consists only of white space, FAIL

    For each img element that has no object element ancestor in this context:

      If the content type of the img element is not "image/jpeg" or "image/gif", FAIL

    Reapply this rule using the current object element as the context


PAGE_SIZE_LIMIT

For each included resource, as defined in 2.4.6 Included Resources:

  Request the referenced resource

  Add the size of the response body to the running total (for object elements count the size of objects retrieved under the "Object Element Processing Rule" whose type attribute is not specified, and those whose content type is either "image/jpeg" or "image/gif" irrespective of whether the type attribute is specified)

If the total exceeds 20 kilobytes, FAIL 
Received on Thursday, 22 May 2008 13:50:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:42:58 UTC