[Bug 12924] New: xml:base interaction with img element

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12924

           Summary: xml:base interaction with img element
           Product: HTML WG
           Version: unspecified
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: alex@milowski.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


In reading the section about the 'img' element [1], I see the statement:

"A user agent that obtains images immediately must synchronously update the
image data of an img element whenever that element is either created with a src
attribute, or has its src attribute set, changed, or removed."

In documents (e.g. XHTML5) where xml:base is allowed, the 'src' attribute will
be resolved against the element's base URI derived from the xml:base attribute.
 The result is that if an xml:base attribute is present in the original markup,
it will affect the resolved URI derived from the 'src' attribute.

If that xml:base attribute is later programmatically changed, it is unclear
what the user agent should do.  The 'src' attribute has not been changed and so
it will not be resolved again.  Unfortunately, the base URI has changed and the
resolved URI is no longer necessarily valid.

This gets even more complicated if the xml:base attribute is on an ancestor of
the 'img' element and causes the base URI to change for a whole subtree.

I believe the specification should be clear one way or the other what the user
agent should do with resolved URI values if the base URI is changed
programmatically via an xml:base attribute change.  It may be the case that a
change to the base URI after resolving URI values should be viewed as "bad
practice."  As such, we shouldn't incur the penalty of resolving all URI values
on all such elements in the affected subtree.  That is, unless someone can show
a valid use case or contradiction that could subsequently be derived (e.g.
consistency).

It should be noted that xml:base's influence on the resolved location works
quite well in browsers that currently support it for content that is added the
DOM programmatically as long as the xml:base attribute exists on an element
before it is added to the DOM.

[1] http://www.w3.org/TR/html5/embedded-content-1.html#the-img-element

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 9 June 2011 12:08:06 UTC