Commit bd4ae344 authored by tkent@chromium.org's avatar tkent@chromium.org

[V8] Fix incorrect handling of JavaScript properties in DOMStringMap

https://bugs.webkit.org/show_bug.cgi?id=53578

Reviewed by Adam Barth.

Source/WebCore:

Follows a JSC behavior change by r96893.

* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyGetter):
Propagate to the JavaScript object if the DOMStringMap object
doesn't have the requested item.
(WebCore::V8DOMStringMap::namedPropertyDeleter): ditto.
(WebCore::V8DOMStringMap::namedPropertySetter):
Try to set a property to only a DOMStringMap object.

LayoutTests:

* platform/chromium/test_expectations.txt:
Remove failure expectations of fast/dom/dataset.html and
fast/dom/dataset-xhtml.xhtml.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7ac3c2e7
2011-11-15 Kent Tamura <tkent@chromium.org>
[V8] Fix incorrect handling of JavaScript properties in DOMStringMap
https://bugs.webkit.org/show_bug.cgi?id=53578
Reviewed by Adam Barth.
* platform/chromium/test_expectations.txt:
Remove failure expectations of fast/dom/dataset.html and
fast/dom/dataset-xhtml.xhtml.
2011-11-14 Pavel Feldman <pfeldman@google.com>
Web Inspector: Command line $x fails for 3 of 4 types of XPath query
......@@ -3673,10 +3673,6 @@ BUGWK68970 MAC CPU-CG RELEASE : svg/text/selection-background-color.xhtml = IMAG
BUGWK68982 : svg/custom/oversized-pattern-scale.svg = IMAGE PASS
BUGWK68982 : svg/custom/transformed-pattern-clamp-svg-root.svg = IMAGE PASS
// Need to follow a JSC binding change. See webkit.org/b/53752.
BUGWK53578 : fast/dom/dataset.html = TEXT
BUGWK53578 : fast/dom/dataset-xhtml.xhtml = TEXT
BUGWK69060 WIN LINUX : fast/repaint/selection-clear.html = IMAGE+TEXT
BUGWK69062 WIN GPU : compositing/shadows/shadow-drawing.html = IMAGE
......
2011-11-15 Kent Tamura <tkent@chromium.org>
[V8] Fix incorrect handling of JavaScript properties in DOMStringMap
https://bugs.webkit.org/show_bug.cgi?id=53578
Reviewed by Adam Barth.
Follows a JSC behavior change by r96893.
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyGetter):
Propagate to the JavaScript object if the DOMStringMap object
doesn't have the requested item.
(WebCore::V8DOMStringMap::namedPropertyDeleter): ditto.
(WebCore::V8DOMStringMap::namedPropertySetter):
Try to set a property to only a DOMStringMap object.
2011-11-14 Pavel Feldman <pfeldman@google.com>
Web Inspector: Command line $x fails for 3 of 4 types of XPath query
......
......@@ -49,7 +49,10 @@ v8::Handle<v8::Integer> V8DOMStringMap::namedPropertyQuery(v8::Local<v8::String>
v8::Handle<v8::Value> V8DOMStringMap::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.DOMStringMap.NamedPropertyGetter");
return v8StringOrUndefined(V8DOMStringMap::toNative(info.Holder())->item(toWebCoreString(name)));
String value = V8DOMStringMap::toNative(info.Holder())->item(toWebCoreString(name));
if (value.isNull())
return notHandledByInterceptor();
return v8StringOrUndefined(value);
}
v8::Handle<v8::Array> V8DOMStringMap::namedPropertyEnumerator(const v8::AccessorInfo& info)
......@@ -66,28 +69,14 @@ v8::Handle<v8::Array> V8DOMStringMap::namedPropertyEnumerator(const v8::Accessor
v8::Handle<v8::Boolean> V8DOMStringMap::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.DOMStringMap.NamedPropertyDeleter");
if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
return v8::False();
if (info.Holder()->HasRealNamedCallbackProperty(name))
return v8::False();
ExceptionCode ec = 0;
V8DOMStringMap::toNative(info.Holder())->deleteItem(toWebCoreString(name), ec);
if (ec)
throwError(ec);
return v8::True();
return ec ? v8::False() : v8::True();
}
v8::Handle<v8::Value> V8DOMStringMap::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.DOMStringMap.NamedPropertySetter");
if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
return value;
if (info.Holder()->HasRealNamedCallbackProperty(name))
return value;
ExceptionCode ec = 0;
V8DOMStringMap::toNative(info.Holder())->setItem(toWebCoreString(name), toWebCoreString(value), ec);
if (ec)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment