[Webkit-unassigned] [Bug 17760] New: <img> treats empty src as no image at all
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 10 19:41:59 PDT 2008
http://bugs.webkit.org/show_bug.cgi?id=17760
Summary: <img> treats empty src as no image at all
Product: WebKit
Version: 525+ (Nightly build)
Platform: PC
OS/Version: Windows XP
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Images
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: yuzhu.shen at gmail.com
Consider the following example:
<img src="" width="100" height="100" alt="" onerror="processLoadError();">
WebKit treats src="" as no image at all and doesn't try to load. While IE and
Firefox will try to load the image and (in most cases) trigger the onerror
handler. (IE7 and Firefox2/3 are tested.)
The reason why IE and Firefox do so is that src="" should be regarded as a
relative URI and resolved using the base URI. For example, if the base URI is
"http://example.org/images/", the <img> with src="" should try to load this
URI. In most cases, this will trigger onerror handler. (However, if an image
"example.jpg" is set as the default document for this path, the <img> will load
this "example.jpg".)
A real world example is as follows:
1. Go to
http://qun.51.com/category_search.php?type1_name=%C7%E9%B8%D0%C1%BD%D0%D4
2. All missing images should be replaced with a "noclublogo.gif" (as llustrated
in the snapshot).
3. WebKit doesn't do so, while IE and Firefox do.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list