diff options
Diffstat (limited to 'WebCore/bindings/v8/custom/V8NodeCustom.cpp')
-rw-r--r-- | WebCore/bindings/v8/custom/V8NodeCustom.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/WebCore/bindings/v8/custom/V8NodeCustom.cpp b/WebCore/bindings/v8/custom/V8NodeCustom.cpp index 0a7198a..1f0c79b 100644 --- a/WebCore/bindings/v8/custom/V8NodeCustom.cpp +++ b/WebCore/bindings/v8/custom/V8NodeCustom.cpp @@ -57,57 +57,12 @@ namespace WebCore { -static inline bool isFrameSrc(Element *element, const String& name) -{ - return element && (element->hasTagName(HTMLNames::iframeTag) || element->hasTagName(HTMLNames::frameTag)) && equalIgnoringCase(name, "src"); -} - -void V8Node::textContentAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) -{ - Node* imp = V8Node::toNative(info.Holder()); - String nodeValue = toWebCoreStringWithNullCheck(value); - - if (imp->nodeType() == Node::ATTRIBUTE_NODE) { - Element * ownerElement = V8Attr::toNative(info.Holder())->ownerElement(); - if (ownerElement && !V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), ownerElement, imp->nodeName(), nodeValue)) - return; - } - - ExceptionCode ec = 0; - imp->setTextContent(nodeValue, ec); - if (ec) - throwError(ec); -} - -void V8Node::nodeValueAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) -{ - Node* imp = V8Node::toNative(info.Holder()); - String nodeValue = toWebCoreStringWithNullCheck(value); - - if (imp->nodeType() == Node::ATTRIBUTE_NODE) { - Element * ownerElement = V8Attr::toNative(info.Holder())->ownerElement(); - if (ownerElement && !V8BindingSecurity::allowSettingSrcToJavascriptURL(V8BindingState::Only(), ownerElement, imp->nodeName(), nodeValue)) - return; - } - - ExceptionCode ec = 0; - imp->setNodeValue(nodeValue, ec); - if (ec) - throwError(ec); -} - // This function is customized to take advantage of the optional 4th argument: shouldLazyAttach v8::Handle<v8::Value> V8Node::insertBeforeCallback(const v8::Arguments& args) { INC_STATS("DOM.Node.insertBefore"); v8::Handle<v8::Object> holder = args.Holder(); Node* imp = V8Node::toNative(holder); - - if (imp->nodeType() == Node::ATTRIBUTE_NODE && isFrameSrc(V8Attr::toNative(holder)->ownerElement(), imp->nodeName())) { - V8Proxy::setDOMException(NOT_SUPPORTED_ERR); - return v8::Handle<v8::Value>(); - } - ExceptionCode ec = 0; Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0; Node* refChild = V8Node::HasInstance(args[1]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0; @@ -127,12 +82,6 @@ v8::Handle<v8::Value> V8Node::replaceChildCallback(const v8::Arguments& args) INC_STATS("DOM.Node.replaceChild"); v8::Handle<v8::Object> holder = args.Holder(); Node* imp = V8Node::toNative(holder); - - if (imp->nodeType() == Node::ATTRIBUTE_NODE && isFrameSrc(V8Attr::toNative(holder)->ownerElement(), imp->nodeName())) { - V8Proxy::setDOMException(NOT_SUPPORTED_ERR); - return v8::Handle<v8::Value>(); - } - ExceptionCode ec = 0; Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0; Node* oldChild = V8Node::HasInstance(args[1]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0; @@ -151,12 +100,6 @@ v8::Handle<v8::Value> V8Node::removeChildCallback(const v8::Arguments& args) INC_STATS("DOM.Node.removeChild"); v8::Handle<v8::Object> holder = args.Holder(); Node* imp = V8Node::toNative(holder); - - if (imp->nodeType() == Node::ATTRIBUTE_NODE && isFrameSrc(V8Attr::toNative(holder)->ownerElement(), imp->nodeName())) { - V8Proxy::setDOMException(NOT_SUPPORTED_ERR); - return v8::Handle<v8::Value>(); - } - ExceptionCode ec = 0; Node* oldChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0; bool success = imp->removeChild(oldChild, ec); @@ -175,12 +118,6 @@ v8::Handle<v8::Value> V8Node::appendChildCallback(const v8::Arguments& args) INC_STATS("DOM.Node.appendChild"); v8::Handle<v8::Object> holder = args.Holder(); Node* imp = V8Node::toNative(holder); - - if (imp->nodeType() == Node::ATTRIBUTE_NODE && isFrameSrc(V8Attr::toNative(holder)->ownerElement(), imp->nodeName())) { - V8Proxy::setDOMException(NOT_SUPPORTED_ERR); - return v8::Handle<v8::Value>(); - } - ExceptionCode ec = 0; Node* newChild = V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0; bool success = imp->appendChild(newChild, ec, true ); |