| Differences between
and this patch
- a/Source/WebCore/ChangeLog +32 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-11-01  Anna Cavender  <annacc@chromium.org>
2
3
        Makes [Reflect] work for constants.
4
        This is needed to avoid platform-specific define conflicts, specifically
5
        TextTrack::ERROR conflicts with a windows define.
6
        https://bugs.webkit.org/show_bug.cgi?id=70951
7
8
        Reviewed by Darin Adler.
9
10
        Test: media/track/track-constants.html
11
12
        * bindings/scripts/CodeGenerator.pm:
13
        (GenerateCompileTimeCheckForEnumsIfNeeded):
14
            Check for [Reflect] and assign name accordingly.
15
16
        * bindings/scripts/test/CPP/WebDOMTestObj.h:  Update test file.
17
        * bindings/scripts/test/JS/JSTestObj.cpp:  Update test file.
18
        (WebCore::jsTestObjCONST_JAVASCRIPT):
19
        * bindings/scripts/test/JS/JSTestObj.h:  Update test file.
20
        * bindings/scripts/test/ObjC/DOMTestObj.h:  Update test file.
21
        * bindings/scripts/test/TestObj.idl:  Update test file.
22
        * bindings/scripts/test/V8/V8TestObj.cpp:  Update test file.
23
24
        * html/LoadableTextTrack.cpp: Use new DOM const name.
25
        (WebCore::LoadableTextTrack::cueLoadingStarted):
26
        (WebCore::LoadableTextTrack::cueLoadingCompleted):
27
        * html/TextTrack.cpp:  Use new DOM const name.
28
        (WebCore::TextTrack::TextTrack):
29
        (WebCore::TextTrack::setMode):
30
        * html/TextTrack.h:  Use new DOM const name.
31
        * html/TextTrack.idl:  Use Reflect for ERROR, but leave other DOM const names.
32
1
2011-11-01  Emil A Eklund  <eae@chromium.org>
33
2011-11-01  Emil A Eklund  <eae@chromium.org>
2
34
3
        Switch PopupMenuClient to layout abstraction
35
        Switch PopupMenuClient to layout abstraction
- a/Source/WebCore/bindings/scripts/CodeGenerator.pm -1 / +2 lines
Lines 568-574 sub GenerateCompileTimeCheckForEnumsIfNeeded a/Source/WebCore/bindings/scripts/CodeGenerator.pm_sec1
568
    if (ShouldCheckEnums($dataNode) && @{$dataNode->constants}) {
568
    if (ShouldCheckEnums($dataNode) && @{$dataNode->constants}) {
569
        push(@checks, "\n");
569
        push(@checks, "\n");
570
        foreach my $constant (@{$dataNode->constants}) {
570
        foreach my $constant (@{$dataNode->constants}) {
571
            my $name = $constant->name;
571
            my $reflect = $constant->extendedAttributes->{"Reflect"};
572
            my $name = $reflect ? $reflect : $constant->name;
572
            my $value = $constant->value;
573
            my $value = $constant->value;
573
            push(@checks, "COMPILE_ASSERT($value == ${interfaceName}::$name, ${interfaceName}Enum${name}IsWrongUseDontCheckEnums);\n");
574
            push(@checks, "COMPILE_ASSERT($value == ${interfaceName}::$name, ${interfaceName}Enum${name}IsWrongUseDontCheckEnums);\n");
574
        }
575
        }
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h -1 / +2 lines
Lines 58-64 public: a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h_sec1
58
        WEBDOM_CONST_VALUE_11 = 0xffffffff,
58
        WEBDOM_CONST_VALUE_11 = 0xffffffff,
59
        WEBDOM_CONST_VALUE_12 = 0x01,
59
        WEBDOM_CONST_VALUE_12 = 0x01,
60
        WEBDOM_CONST_VALUE_13 = 0X20,
60
        WEBDOM_CONST_VALUE_13 = 0X20,
61
        WEBDOM_CONST_VALUE_14 = 0x1abc
61
        WEBDOM_CONST_VALUE_14 = 0x1abc,
62
        WEBDOM_CONST_JAVASCRIPT = 15
62
    };
63
    };
63
64
64
    int readOnlyIntAttr() const;
65
    int readOnlyIntAttr() const;
- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp +9 lines
Lines 158-163 static const HashTableValue JSTestObjConstructorTableValues[] = a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec1
158
    { "CONST_VALUE_12", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
158
    { "CONST_VALUE_12", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
159
    { "CONST_VALUE_13", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
159
    { "CONST_VALUE_13", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
160
    { "CONST_VALUE_14", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
160
    { "CONST_VALUE_14", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
161
    { "CONST_JAVASCRIPT", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
161
    { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
162
    { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
162
};
163
};
163
164
Lines 175-180 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11I a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec2
175
COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDontCheckEnums);
176
COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDontCheckEnums);
176
COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDontCheckEnums);
177
COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDontCheckEnums);
177
COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDontCheckEnums);
178
COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDontCheckEnums);
179
COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDontCheckEnums);
178
180
179
const ClassInfo JSTestObjConstructor::s_info = { "TestObjConstructor", &DOMConstructorObject::s_info, &JSTestObjConstructorTable, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) };
181
const ClassInfo JSTestObjConstructor::s_info = { "TestObjConstructor", &DOMConstructorObject::s_info, &JSTestObjConstructorTable, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) };
180
182
Lines 225-230 static const HashTableValue JSTestObjPrototypeTableValues[] = a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec3
225
    { "CONST_VALUE_12", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
227
    { "CONST_VALUE_12", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
226
    { "CONST_VALUE_13", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
228
    { "CONST_VALUE_13", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
227
    { "CONST_VALUE_14", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
229
    { "CONST_VALUE_14", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
230
    { "CONST_JAVASCRIPT", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
228
    { "voidMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
231
    { "voidMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
229
    { "voidMethodWithArgs", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
232
    { "voidMethodWithArgs", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
230
    { "intMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
233
    { "intMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
Lines 1929-1934 JSValue jsTestObjCONST_VALUE_14(ExecState* exec, JSValue, const Identifier&) a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec4
1929
    return jsNumber(static_cast<int>(0x1abc));
1932
    return jsNumber(static_cast<int>(0x1abc));
1930
}
1933
}
1931
1934
1935
JSValue jsTestObjCONST_JAVASCRIPT(ExecState* exec, JSValue, const Identifier&)
1936
{
1937
    UNUSED_PARAM(exec);
1938
    return jsNumber(static_cast<int>(15));
1939
}
1940
1932
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* impl)
1941
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* impl)
1933
{
1942
{
1934
    return wrap<JSTestObj>(exec, globalObject, impl);
1943
    return wrap<JSTestObj>(exec, globalObject, impl);
- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h +1 lines
Lines 255-260 JSC::JSValue jsTestObjCONST_VALUE_11(JSC::ExecState*, JSC::JSValue, const JSC::I a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h_sec1
255
JSC::JSValue jsTestObjCONST_VALUE_12(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
255
JSC::JSValue jsTestObjCONST_VALUE_12(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
256
JSC::JSValue jsTestObjCONST_VALUE_13(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
256
JSC::JSValue jsTestObjCONST_VALUE_13(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
257
JSC::JSValue jsTestObjCONST_VALUE_14(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
257
JSC::JSValue jsTestObjCONST_VALUE_14(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
258
JSC::JSValue jsTestObjCONST_JAVASCRIPT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
258
259
259
} // namespace WebCore
260
} // namespace WebCore
260
261
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h -1 / +2 lines
Lines 49-55 enum { a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h_sec1
49
    DOM_CONST_VALUE_11 = 0xffffffff,
49
    DOM_CONST_VALUE_11 = 0xffffffff,
50
    DOM_CONST_VALUE_12 = 0x01,
50
    DOM_CONST_VALUE_12 = 0x01,
51
    DOM_CONST_VALUE_13 = 0X20,
51
    DOM_CONST_VALUE_13 = 0X20,
52
    DOM_CONST_VALUE_14 = 0x1abc
52
    DOM_CONST_VALUE_14 = 0x1abc,
53
    DOM_CONST_JAVASCRIPT = 15
53
};
54
};
54
55
55
@interface DOMTestObj : DOMObject
56
@interface DOMTestObj : DOMObject
- a/Source/WebCore/bindings/scripts/test/TestObj.idl +1 lines
Lines 190-194 module test { a/Source/WebCore/bindings/scripts/test/TestObj.idl_sec1
190
        const unsigned short CONST_VALUE_12 = 0x01;
190
        const unsigned short CONST_VALUE_12 = 0x01;
191
        const unsigned short CONST_VALUE_13 = 0X20;
191
        const unsigned short CONST_VALUE_13 = 0X20;
192
        const unsigned short CONST_VALUE_14 = 0x1abc;
192
        const unsigned short CONST_VALUE_14 = 0x1abc;
193
        const [Reflect=CONST_IMPL] unsigned short CONST_JAVASCRIPT = 15;
193
    };
194
    };
194
}
195
}
- a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp +2 lines
Lines 1387-1392 static const BatchedConstant TestObjConsts[] = { a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp_sec1
1387
    {"CONST_VALUE_12", static_cast<signed int>(0x01)},
1387
    {"CONST_VALUE_12", static_cast<signed int>(0x01)},
1388
    {"CONST_VALUE_13", static_cast<signed int>(0X20)},
1388
    {"CONST_VALUE_13", static_cast<signed int>(0X20)},
1389
    {"CONST_VALUE_14", static_cast<signed int>(0x1abc)},
1389
    {"CONST_VALUE_14", static_cast<signed int>(0x1abc)},
1390
    {"CONST_JAVASCRIPT", static_cast<signed int>(15)},
1390
};
1391
};
1391
1392
1392
1393
Lines 1401-1406 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11I a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp_sec2
1401
COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDontCheckEnums);
1402
COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDontCheckEnums);
1402
COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDontCheckEnums);
1403
COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDontCheckEnums);
1403
COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDontCheckEnums);
1404
COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDontCheckEnums);
1405
COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDontCheckEnums);
1404
1406
1405
static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persistent<v8::FunctionTemplate> desc)
1407
static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persistent<v8::FunctionTemplate> desc)
1406
{
1408
{
- a/Source/WebCore/html/LoadableTextTrack.cpp -2 / +2 lines
Lines 60-73 void LoadableTextTrack::cueLoadingStarted(TextTrackLoader* loader) a/Source/WebCore/html/LoadableTextTrack.cpp_sec1
60
{
60
{
61
    ASSERT_UNUSED(loader, m_loader == loader);
61
    ASSERT_UNUSED(loader, m_loader == loader);
62
    
62
    
63
    setReadyState(TextTrack::Loading);
63
    setReadyState(TextTrack::LOADING);
64
}
64
}
65
65
66
void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadingFailed)
66
void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadingFailed)
67
{
67
{
68
    ASSERT_UNUSED(loader, m_loader == loader);
68
    ASSERT_UNUSED(loader, m_loader == loader);
69
69
70
    loadingFailed ? setReadyState(TextTrack::Error) : setReadyState(TextTrack::Loaded);
70
    loadingFailed ? setReadyState(TextTrack::HTML_ERROR) : setReadyState(TextTrack::LOADED);
71
71
72
    if (m_loadingClient)
72
    if (m_loadingClient)
73
        m_loadingClient->textTrackLoadingCompleted(this, loadingFailed);
73
        m_loadingClient->textTrackLoadingCompleted(this, loadingFailed);
- a/Source/WebCore/html/TextTrack.cpp -3 / +3 lines
Lines 42-49 TextTrack::TextTrack(TextTrackClient* client, const String& kind, const String& a/Source/WebCore/html/TextTrack.cpp_sec1
42
    : m_kind(kind)
42
    : m_kind(kind)
43
    , m_label(label)
43
    , m_label(label)
44
    , m_language(language)
44
    , m_language(language)
45
    , m_readyState(TextTrack::None)
45
    , m_readyState(TextTrack::NONE)
46
    , m_mode(TextTrack::Showing)
46
    , m_mode(TextTrack::SHOWING)
47
    , m_client(client)
47
    , m_client(client)
48
{
48
{
49
}
49
}
Lines 91-97 void TextTrack::setMode(unsigned short mode, ExceptionCode& ec) a/Source/WebCore/html/TextTrack.cpp_sec2
91
{
91
{
92
    // 4.8.10.12.5 On setting the mode, if the new value is not either 0, 1, or 2,
92
    // 4.8.10.12.5 On setting the mode, if the new value is not either 0, 1, or 2,
93
    // the user agent must throw an INVALID_ACCESS_ERR exception.
93
    // the user agent must throw an INVALID_ACCESS_ERR exception.
94
    if (mode == TextTrack::Disabled || mode == TextTrack::Hidden || mode == TextTrack::Showing) {
94
    if (mode == TextTrack::DISABLED || mode == TextTrack::HIDDEN || mode == TextTrack::SHOWING) {
95
        m_mode = static_cast<Mode>(mode);
95
        m_mode = static_cast<Mode>(mode);
96
        if (m_client)
96
        if (m_client)
97
            m_client->textTrackModeChanged(this);
97
            m_client->textTrackModeChanged(this);
- a/Source/WebCore/html/TextTrack.h -2 / +2 lines
Lines 63-72 public: a/Source/WebCore/html/TextTrack.h_sec1
63
    String label() const;
63
    String label() const;
64
    String language() const;
64
    String language() const;
65
65
66
    enum ReadyState { None = 0, Loading = 1, Loaded = 2, Error = 3 };
66
    enum ReadyState { NONE = 0, LOADING = 1, LOADED = 2, HTML_ERROR = 3 };
67
    ReadyState readyState() const;
67
    ReadyState readyState() const;
68
68
69
    enum Mode { Disabled = 0, Hidden = 1, Showing = 2 };
69
    enum Mode { DISABLED = 0, HIDDEN = 1, SHOWING = 2 };
70
    Mode mode() const;
70
    Mode mode() const;
71
    void setMode(unsigned short, ExceptionCode&);
71
    void setMode(unsigned short, ExceptionCode&);
72
72
- a/Source/WebCore/html/TextTrack.idl -7 / +8 lines
Lines 33-47 module html { a/Source/WebCore/html/TextTrack.idl_sec1
33
        readonly attribute DOMString label;
33
        readonly attribute DOMString label;
34
        readonly attribute DOMString language;
34
        readonly attribute DOMString language;
35
35
36
        const [Reflect=NONE] unsigned short None = 0;
36
        const unsigned short NONE = 0;
37
        const [Reflect=LOADING] unsigned short Loading = 1;
37
        const unsigned short LOADING = 1;
38
        const [Reflect=LOADED] unsigned short Loaded = 2;
38
        const unsigned short LOADED = 2;
39
        const [Reflect=ERROR] unsigned short Error = 3;
39
        // Reflect is used for TextTrack::ERROR because it conflicts with a windows define.
40
        const [Reflect=HTML_ERROR] unsigned short ERROR = 3;
40
        readonly attribute unsigned short readyState;
41
        readonly attribute unsigned short readyState;
41
42
42
        const [Reflect=DISABLED] unsigned short Disabled = 0;
43
        const unsigned short DISABLED = 0;
43
        const [Reflect=HIDDEN] unsigned short Hidden = 1;
44
        const unsigned short HIDDEN = 1;
44
        const [Reflect=SHOWING] unsigned short Showing = 2;
45
        const unsigned short SHOWING = 2;
45
        attribute unsigned short mode
46
        attribute unsigned short mode
46
            setter raises (DOMException);
47
            setter raises (DOMException);
47
48
- a/LayoutTests/ChangeLog +19 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2011-11-01  Anna Cavender  <annacc@chromium.org>
2
3
        Makes [Reflect] work for constants.
4
        This is needed to avoid platform-specific define conflicts, specifically
5
        TextTrack::ERROR conflicts with a windows define.
6
        https://bugs.webkit.org/show_bug.cgi?id=70951
7
8
        Reviewed by Darin Adler.
9
10
        * media/track/track-constants-expected.txt: Added.
11
        * media/track/track-constants.html: Added.
12
        * media/track/track-load-error-readyState.html:  Updated with new const name.
13
        * media/track/track-load-from-element-readyState.html:  Updated with new const name.
14
        * media/track/track-load-from-src-readyState.html:  Updated with new const name.
15
        
16
        VIDEO_TRACK is not enabled on these ports, so skipping this test:
17
        * platform/mac/Skipped:
18
        * platform/win/Skipped:
19
1
2011-11-01  John Gregg  <johnnyg@google.com>
20
2011-11-01  John Gregg  <johnnyg@google.com>
2
21
3
        Rebaseline getter-on-window-object2.html after r99005.
22
        Rebaseline getter-on-window-object2.html after r99005.
- a/LayoutTests/media/track/track-constants-expected.txt +12 lines
Line 0 a/LayoutTests/media/track/track-constants-expected.txt_sec1
1
Test TextTrack constants.
2
3
EXPECTED (TextTrack.NONE == '0') OK
4
EXPECTED (TextTrack.LOADING == '1') OK
5
EXPECTED (TextTrack.LOADED == '2') OK
6
EXPECTED (TextTrack.ERROR == '3') OK
7
8
EXPECTED (TextTrack.DISABLED == '0') OK
9
EXPECTED (TextTrack.HIDDEN == '1') OK
10
EXPECTED (TextTrack.SHOWING == '2') OK
11
END OF TEST
12
- a/LayoutTests/media/track/track-constants.html +25 lines
Line 0 a/LayoutTests/media/track/track-constants.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <script src=../video-test.js></script>
5
    <script type="text/javascript">
6
        function doTest () 
7
        {
8
            testExpected("TextTrack.NONE", 0);
9
            testExpected("TextTrack.LOADING", 1);
10
            testExpected("TextTrack.LOADED", 2);
11
            testExpected("TextTrack.ERROR", 3);
12
            consoleWrite("");
13
14
            testExpected("TextTrack.DISABLED", 0);
15
            testExpected("TextTrack.HIDDEN", 1);
16
            testExpected("TextTrack.SHOWING", 2);
17
        
18
            endTest();
19
        }
20
    </script>
21
</head>
22
<body onload="doTest()">
23
    <p>Test TextTrack constants.</p>
24
</body>
25
</html>
- a/LayoutTests/media/track/track-load-error-readyState.html -1 / +1 lines
Lines 11-17 a/LayoutTests/media/track/track-load-error-readyState.html_sec1
11
            {
11
            {
12
                consoleWrite("EVENT(error)");
12
                consoleWrite("EVENT(error)");
13
                track = document.getElementById('testTrackError'); 
13
                track = document.getElementById('testTrackError'); 
14
                testExpected("track.track.readyState", TextTrack.Error);
14
                testExpected("track.track.readyState", TextTrack.ERROR);
15
                endTest();
15
                endTest();
16
            }
16
            }
17
17
- a/LayoutTests/media/track/track-load-from-element-readyState.html -1 / +1 lines
Lines 11-17 a/LayoutTests/media/track/track-load-from-element-readyState.html_sec1
11
            {
11
            {
12
                consoleWrite("EVENT(load)");
12
                consoleWrite("EVENT(load)");
13
                track = document.getElementById('testTrackSrc'); 
13
                track = document.getElementById('testTrackSrc'); 
14
                testExpected("track.track.readyState", TextTrack.Loaded);
14
                testExpected("track.track.readyState", TextTrack.LOADED);
15
                endTest();
15
                endTest();
16
            }
16
            }
17
17
- a/LayoutTests/media/track/track-load-from-src-readyState.html -2 / +2 lines
Lines 16-27 a/LayoutTests/media/track/track-load-from-src-readyState.html_sec1
16
            function trackLoaded()
16
            function trackLoaded()
17
            {
17
            {
18
                consoleWrite("EVENT(load)");
18
                consoleWrite("EVENT(load)");
19
                testExpected("track.track.readyState", TextTrack.Loaded);
19
                testExpected("track.track.readyState", TextTrack.LOADED);
20
                endTest();
20
                endTest();
21
            }
21
            }
22
22
23
            track = document.getElementById('testTrackEmpty');
23
            track = document.getElementById('testTrackEmpty');
24
            testExpected("track.track.readyState", TextTrack.None);
24
            testExpected("track.track.readyState", TextTrack.NONE);
25
            track.addEventListener("load", function () { trackLoaded(); }, true);
25
            track.addEventListener("load", function () { trackLoaded(); }, true);
26
            track.src = "captions-webvtt/tc004-webvtt-file.vtt";   
26
            track.src = "captions-webvtt/tc004-webvtt-file.vtt";   
27
27
- a/LayoutTests/platform/mac/Skipped +1 lines
Lines 421-426 fast/dom/MicroData a/LayoutTests/platform/mac/Skipped_sec1
421
421
422
# Tests for <track>.  Feature is not yet functional.
422
# Tests for <track>.  Feature is not yet functional.
423
# https://bugs.webkit.org/show_bug.cgi?id=43668
423
# https://bugs.webkit.org/show_bug.cgi?id=43668
424
media/track/track-constants.html
424
media/track/track-load-error-readyState.html
425
media/track/track-load-error-readyState.html
425
media/track/track-load-from-element-readyState.html
426
media/track/track-load-from-element-readyState.html
426
media/track/track-load-from-src-readyState.html
427
media/track/track-load-from-src-readyState.html
- a/LayoutTests/platform/win/Skipped +1 lines
Lines 1405-1410 fast/mutation a/LayoutTests/platform/win/Skipped_sec1
1405
1405
1406
# Tests for <track>.  Feature is not yet functional.
1406
# Tests for <track>.  Feature is not yet functional.
1407
# https://bugs.webkit.org/show_bug.cgi?id=43668
1407
# https://bugs.webkit.org/show_bug.cgi?id=43668
1408
media/track/track-constants.html
1408
media/track/track-load-error-readyState.html
1409
media/track/track-load-error-readyState.html
1409
media/track/track-load-from-element-readyState.html
1410
media/track/track-load-from-element-readyState.html
1410
media/track/track-load-from-src-readyState.html
1411
media/track/track-load-from-src-readyState.html

Return to Bug 70951