[Webkit-unassigned] [Bug 40915] beforeload event is not sent for first image when @src is specified before @onbeforeload

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 28 14:01:20 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=40915


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darin at apple.com




--- Comment #9 from Darin Adler <darin at apple.com>  2010-06-28 14:01:19 PST ---
(In reply to comment #8)
> In order to fix this it will probably be necessary to move image src updating in the parsing case to finishParsingChildren instead of doing it right when the attribute changes.

We can't use isFinishedParsingChildren() in parseMappedAttribute because we don’t clear that flag until we are done with the attributes and start in on the children. So we might need one of those annoying "created by parser" flags that are used in classes like HTMLScriptElement and HTMLStyleElement.

I think finishParsingChildren is OK, but a bit too late. We could probably do it in beginParsingChildren if we wanted.

Attributes are all set at once. It's only the calls to attributeChanged that are done sequentially in setAttributeMap. So, ironically, the onbeforeload attribute has already been set, it's just that attributeChanged has not been called on it yet. I don’t see any obvious way to know we are inside setAttributeMap without using a createdByParser flag.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list