Skip to content
  • alexis@webkit.org's avatar
    Add ontransitionend attribute on HTML elements. · 5c595e16
    alexis@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=107134
    
    Reviewed by Simon Fraser.
    
    Source/WebCore:
    
    Add ontransitionend attribute on HTML elements to match the prefixed
    attribute onwebkittransitionend. As it uses the same plumbing as a
    regular event listener, it behaves the same which means that if
    ontransitionend only is defined then only the code attached to this
    attribute will be called, if only onwebkittransitionend is defined then
    only the code attached to this attribute will be called and finally if
    both attributes are defined then only the code attached to the
    unprefixed attribute will be called.
    
    Tests: transitions/transition-end-event-unprefixed-03.html
           transitions/transition-end-event-unprefixed-04.html
    
    * html/HTMLAttributeNames.in:
    * html/HTMLElement.cpp:
    (WebCore::HTMLElement::parseAttribute):
    * page/DOMWindow.h:
    (DOMWindow):
    * page/DOMWindow.idl: only define the property if the unprefixing is
    turn on.
    
    LayoutTests:
    
    Add tests to cover the new attribute. It also make sure that event if
    we use the old attribute and the new one at the same time only the new
    event handler will be called.
    
    * transitions/transition-end-event-unprefixed-03-expected.txt: Added.
    * transitions/transition-end-event-unprefixed-03.html: Added.
    * transitions/transition-end-event-unprefixed-04-expected.txt: Added.
    * transitions/transition-end-event-unprefixed-04.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5c595e16