MutationEvent

View: New views
3 Messages — Rating Filter:   Alert me  

MutationEvent

by Yong Li-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, All,
 
Why there are #if 0 here? First, I'm told "#if 0" is not webkit style. Second, the disabled code seems useful.
 
void Element::dispatchAttrRemovalEvent(Attribute*)
{
    ASSERT(!eventDispatchForbidden());
#if 0
    if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER))
        return;
    ExceptionCode ec = 0;
    dispatchEvent(new MutationEvent(DOMAttrModifiedEvent, true, false, attr, attr->value(),
        attr->value(), document()->attrName(attr->id()), MutationEvent::REMOVAL), ec);
#endif
}
void Element::dispatchAttrAdditionEvent(Attribute*)
{
    ASSERT(!eventDispatchForbidden());
#if 0
    if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER))
        return;
    ExceptionCode ec = 0;
    dispatchEvent(new MutationEvent(DOMAttrModifiedEvent, true, false, attr, attr->value(),
        attr->value(), document()->attrName(attr->id()), MutationEvent::ADDITION), ec);
#endif
}
 
Best regards,
-Yong

_______________________________________________
webkit-dev mailing list
webkit-dev@...
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Re: MutationEvent

by Jeremy Orlow-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Did try svn blaming it and looking at the corresponding changelog entry?

On Mon, Nov 2, 2009 at 2:56 PM, Yong Li <yong.li.webkit@...> wrote:
Hi, All,
 
Why there are #if 0 here? First, I'm told "#if 0" is not webkit style. Second, the disabled code seems useful.
 
void Element::dispatchAttrRemovalEvent(Attribute*)
{
    ASSERT(!eventDispatchForbidden());
#if 0
    if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER))
        return;
    ExceptionCode ec = 0;
    dispatchEvent(new MutationEvent(DOMAttrModifiedEvent, true, false, attr, attr->value(),
        attr->value(), document()->attrName(attr->id()), MutationEvent::REMOVAL), ec);
#endif
}
void Element::dispatchAttrAdditionEvent(Attribute*)
{
    ASSERT(!eventDispatchForbidden());
#if 0
    if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER))
        return;
    ExceptionCode ec = 0;
    dispatchEvent(new MutationEvent(DOMAttrModifiedEvent, true, false, attr, attr->value(),
        attr->value(), document()->attrName(attr->id()), MutationEvent::ADDITION), ec);
#endif
}
 
Best regards,
-Yong

_______________________________________________
webkit-dev mailing list
webkit-dev@...
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



_______________________________________________
webkit-dev mailing list
webkit-dev@...
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Re: DOMAttrModified event

by Darin Adler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov 2, 2009, at 1:56 PM, Yong Li wrote:

> Why there are #if 0 here? First, I'm told "#if 0" is not webkit style.

This code predates that rule.

> Second, the disabled code seems useful.

Someone who wants to get the DOMAttrModified event working in WebKit  
might start by enabling that code, but we would also need testing to  
make sure the code works properly in a way that matches other browsers  
and doesn’t create a dramatic slowdown for existing web pages.

     -- Darin

_______________________________________________
webkit-dev mailing list
webkit-dev@...
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev