Title: [96166] trunk
- Revision
- 96166
- Author
- [email protected]
- Date
- 2011-09-27 16:05:01 -0700 (Tue, 27 Sep 2011)
Log Message
[V8] element.dataset.nonExistingKey should return undefined.
https://bugs.webkit.org/show_bug.cgi?id=68877
Reviewed by Nate Chapin.
Source/WebCore:
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyGetter): Uses v8StringOrUndefined() instead of v8String().
LayoutTests:
* fast/dom/dataset-expected.txt: Updated.
* fast/dom/script-tests/dataset.js: Add a test case.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (96165 => 96166)
--- trunk/LayoutTests/ChangeLog 2011-09-27 22:53:56 UTC (rev 96165)
+++ trunk/LayoutTests/ChangeLog 2011-09-27 23:05:01 UTC (rev 96166)
@@ -1,3 +1,13 @@
+2011-09-27 Kent Tamura <[email protected]>
+
+ [V8] element.dataset.nonExistingKey should return undefined.
+ https://bugs.webkit.org/show_bug.cgi?id=68877
+
+ Reviewed by Nate Chapin.
+
+ * fast/dom/dataset-expected.txt: Updated.
+ * fast/dom/script-tests/dataset.js: Add a test case.
+
2011-09-27 Mihai Parparita <[email protected]>
Chromium rebaseline after r96155.
Modified: trunk/LayoutTests/fast/dom/dataset-expected.txt (96165 => 96166)
--- trunk/LayoutTests/fast/dom/dataset-expected.txt 2011-09-27 22:53:56 UTC (rev 96165)
+++ trunk/LayoutTests/fast/dom/dataset-expected.txt 2011-09-27 23:05:01 UTC (rev 96166)
@@ -15,6 +15,7 @@
PASS testGet('data-Foo', 'foo') is true
PASS testGet('data-', '') is true
PASS testGet('data-à', 'à') is true
+PASS document.body.dataset.nonExisting is undefined.
PASS matchesNothingInDataset('dataFoo') is true
Modified: trunk/LayoutTests/fast/dom/script-tests/dataset.js (96165 => 96166)
--- trunk/LayoutTests/fast/dom/script-tests/dataset.js 2011-09-27 22:53:56 UTC (rev 96165)
+++ trunk/LayoutTests/fast/dom/script-tests/dataset.js 2011-09-27 23:05:01 UTC (rev 96166)
@@ -19,6 +19,7 @@
shouldBeTrue("testGet('data-Foo', 'foo')"); // HTML lowercases all attributes.
shouldBeTrue("testGet('data-', '')");
shouldBeTrue("testGet('data-\xE0', '\xE0')");
+shouldBeUndefined("document.body.dataset.nonExisting");
debug("");
function matchesNothingInDataset(attr)
Modified: trunk/Source/WebCore/ChangeLog (96165 => 96166)
--- trunk/Source/WebCore/ChangeLog 2011-09-27 22:53:56 UTC (rev 96165)
+++ trunk/Source/WebCore/ChangeLog 2011-09-27 23:05:01 UTC (rev 96166)
@@ -1,3 +1,13 @@
+2011-09-27 Kent Tamura <[email protected]>
+
+ [V8] element.dataset.nonExistingKey should return undefined.
+ https://bugs.webkit.org/show_bug.cgi?id=68877
+
+ Reviewed by Nate Chapin.
+
+ * bindings/v8/custom/V8DOMStringMapCustom.cpp:
+ (WebCore::V8DOMStringMap::namedPropertyGetter): Uses v8StringOrUndefined() instead of v8String().
+
2011-09-23 Mark Hahnenberg <[email protected]>
Add static version of JSCell::visitChildren
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp (96165 => 96166)
--- trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp 2011-09-27 22:53:56 UTC (rev 96165)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp 2011-09-27 23:05:01 UTC (rev 96166)
@@ -49,7 +49,7 @@
v8::Handle<v8::Value> V8DOMStringMap::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.DOMStringMap.NamedPropertyGetter");
- return v8String(V8DOMStringMap::toNative(info.Holder())->item(toWebCoreString(name)));
+ return v8StringOrUndefined(V8DOMStringMap::toNative(info.Holder())->item(toWebCoreString(name)));
}
v8::Handle<v8::Array> V8DOMStringMap::namedPropertyEnumerator(const v8::AccessorInfo& info)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes