From ae7f4f5a5afa9476fadb23e3ac3a77f8fac75209 Mon Sep 17 00:00:00 2001 From: "sky@google.com" Date: Mon, 6 Oct 2008 21:08:36 +0000 Subject: Wires up indexed getter for CSSVariablesDeclaration. BUG=3085 TEST=covered by tests Review URL: http://codereview.chromium.org/6475 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2903 0039d316-1c4b-4281-b951-d872f2087c98 --- .../variable-iteration-test-expected.checksum | 1 + .../variable-iteration-test-expected.png | Bin 0 -> 3453 bytes .../variable-iteration-test-expected.txt | 9 +++++++++ .../variables/variable-iteration-test-expected.checksum | 1 + .../css/variables/variable-iteration-test-expected.png | Bin 0 -> 3453 bytes .../css/variables/variable-iteration-test-expected.txt | 9 +++++++++ webkit/port/bindings/v8/v8_proxy.cpp | 4 ++++ webkit/tools/layout_tests/test_lists/tests_fixable.txt | 6 ------ 8 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.checksum create mode 100644 webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.png create mode 100644 webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.txt create mode 100644 webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.checksum create mode 100644 webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.png create mode 100644 webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.txt (limited to 'webkit') diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.checksum b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.checksum new file mode 100644 index 0000000..f7d4b25 --- /dev/null +++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.checksum @@ -0,0 +1 @@ +36203e562397716f44230cea05b760c9 \ No newline at end of file diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.png b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.png new file mode 100644 index 0000000..408fdcc Binary files /dev/null and b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.png differ diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.txt b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.txt new file mode 100644 index 0000000..af06fcf --- /dev/null +++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test-expected.txt @@ -0,0 +1,9 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x36 + RenderBlock {HTML} at (0,0) size 800x36 + RenderBody {BODY} at (8,8) size 784x20 + RenderBlock {DIV} at (0,0) size 784x20 [color=#008000] [bgcolor=#FFFFFF] + RenderText {#text} at (0,0) size 343x19 + text run at (0,0) width 158: "This text should be green. " + text run at (158,0) width 185: "There should be no red visible." diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.checksum b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.checksum new file mode 100644 index 0000000..f7d4b25 --- /dev/null +++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.checksum @@ -0,0 +1 @@ +36203e562397716f44230cea05b760c9 \ No newline at end of file diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.png b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.png new file mode 100644 index 0000000..408fdcc Binary files /dev/null and b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.png differ diff --git a/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.txt b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.txt new file mode 100644 index 0000000..af06fcf --- /dev/null +++ b/webkit/data/layout_test_results/v8/LayoutTests/fast/css/variables/variable-iteration-test-expected.txt @@ -0,0 +1,9 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x36 + RenderBlock {HTML} at (0,0) size 800x36 + RenderBody {BODY} at (8,8) size 784x20 + RenderBlock {DIV} at (0,0) size 784x20 [color=#008000] [bgcolor=#FFFFFF] + RenderText {#text} at (0,0) size 343x19 + text run at (0,0) width 158: "This text should be green. " + text run at (158,0) width 185: "There should be no red visible." diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 715b5ba..60283ab 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -79,6 +79,7 @@ #include "CSSRule.h" #include "CSSRuleList.h" #include "CSSValueList.h" +#include "CSSVariablesDeclaration.h" #include "FrameLoader.h" #include "FrameTree.h" #include "RangeException.h" @@ -1104,6 +1105,9 @@ v8::Persistent V8Proxy::GetTemplate( case V8ClassIndex::CSSVALUELIST: SetCollectionIndexedGetter(desc, V8ClassIndex::CSSVALUE); break; + case V8ClassIndex::CSSVARIABLESDECLARATION: + SetCollectionStringOrNullIndexedGetter(desc); + break; case V8ClassIndex::UNDETECTABLEHTMLCOLLECTION: desc->InstanceTemplate()->MarkAsUndetectable(); // fall through case V8ClassIndex::HTMLCOLLECTION: diff --git a/webkit/tools/layout_tests/test_lists/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/tests_fixable.txt index abf8ecb..40d9825 100644 --- a/webkit/tools/layout_tests/test_lists/tests_fixable.txt +++ b/webkit/tools/layout_tests/test_lists/tests_fixable.txt @@ -902,12 +902,6 @@ V8 | KJS # LayoutTests/fast/forms/submit-to-url-fragment.html = FAIL V8 | KJS # LayoutTests/fast/images/embed-image.html = FAIL V8 | KJS # LayoutTests/fast/images/object-image.html = FAIL -# This test is failing because we don't support the CSS selector -# @-webkit-variables. -# http://code.google.com/p/chromium/issues/detail?id=3085 -V8 | KJS # LayoutTests/fast/css/variables/alternate-syntax/variable-iteration-test.html = FAIL -V8 | KJS # LayoutTests/fast/css/variables/variable-iteration-test.html = FAIL - # Many of the failures here are because V8 stringifies objects differently than # JSC. However, the missing position and totalSize properties seems genuine. V8 | KJS # SKIP : LayoutTests/fast/dom/xmlhttprequest-get.xhtml = PASS -- cgit v1.1