Skip to content
  • annacc@chromium.org's avatar
    Makes [Reflect] work for constants. · 7cc58fe3
    annacc@chromium.org authored
    This is needed to avoid platform-specific define conflicts, specifically
    TextTrack::ERROR conflicts with a windows define.
    https://bugs.webkit.org/show_bug.cgi?id=70951
    
    Reviewed by Darin Adler.
    
    Source/WebCore:
    
    Test: media/track/track-constants.html
    
    * bindings/scripts/CodeGenerator.pm:
    (GenerateCompileTimeCheckForEnumsIfNeeded):
        Check for [Reflect] and assign name accordingly.
    
    * bindings/scripts/test/CPP/WebDOMTestObj.h:  Update test file.
    * bindings/scripts/test/JS/JSTestObj.cpp:  Update test file.
    (WebCore::jsTestObjCONST_JAVASCRIPT):
    * bindings/scripts/test/JS/JSTestObj.h:  Update test file.
    * bindings/scripts/test/ObjC/DOMTestObj.h:  Update test file.
    * bindings/scripts/test/TestObj.idl:  Update test file.
    * bindings/scripts/test/V8/V8TestObj.cpp:  Update test file.
    
    * html/LoadableTextTrack.cpp: Use new DOM const name.
    (WebCore::LoadableTextTrack::cueLoadingStarted):
    (WebCore::LoadableTextTrack::cueLoadingCompleted):
    * html/TextTrack.cpp:  Use new DOM const name.
    (WebCore::TextTrack::TextTrack):
    (WebCore::TextTrack::setMode):
    * html/TextTrack.h:  Use new DOM const name.
    * html/TextTrack.idl:  Use Reflect for ERROR, but leave other DOM const names.
    
    LayoutTests:
    
    * media/track/track-constants-expected.txt: Added.
    * media/track/track-constants.html: Added.
    * media/track/track-load-error-readyState.html:  Updated with new const name.
    * media/track/track-load-from-element-readyState.html:  Updated with new const name.
    * media/track/track-load-from-src-readyState.html:  Updated with new const name.
    
    VIDEO_TRACK is not enabled on these ports, so skipping this test:
    * platform/mac/Skipped:
    * platform/win/Skipped:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7cc58fe3