summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/cpp')
-rw-r--r--WebCore/bindings/cpp/WebDOMCustomVoidCallback.cpp48
-rw-r--r--WebCore/bindings/cpp/WebDOMCustomVoidCallback.h55
-rw-r--r--WebCore/bindings/cpp/WebDOMEventTarget.cpp7
-rw-r--r--WebCore/bindings/cpp/WebDOMEventTarget.h1
-rw-r--r--WebCore/bindings/cpp/WebDOMHTMLCollectionCustom.cpp2
-rw-r--r--WebCore/bindings/cpp/WebDOMHTMLDocumentCustom.cpp4
-rw-r--r--WebCore/bindings/cpp/WebDOMString.cpp2
7 files changed, 116 insertions, 3 deletions
diff --git a/WebCore/bindings/cpp/WebDOMCustomVoidCallback.cpp b/WebCore/bindings/cpp/WebDOMCustomVoidCallback.cpp
new file mode 100644
index 0000000..d79eaae
--- /dev/null
+++ b/WebCore/bindings/cpp/WebDOMCustomVoidCallback.cpp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 Kevin Ollivier <kevino@theolliviers.com>. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebDOMCustomVoidCallback.h"
+
+WebDOMCustomVoidCallback::WebDOMCustomVoidCallback()
+{
+}
+
+WebDOMCustomVoidCallback::~WebDOMCustomVoidCallback()
+{
+}
+
+void WebDOMCustomVoidCallback::handleEvent()
+{
+
+}
+
+WebCore::VoidCallback* toWebCore(const WebDOMCustomVoidCallback& callback)
+{
+ return const_cast<WebCore::VoidCallback*>((WebCore::VoidCallback*)&callback);
+} \ No newline at end of file
diff --git a/WebCore/bindings/cpp/WebDOMCustomVoidCallback.h b/WebCore/bindings/cpp/WebDOMCustomVoidCallback.h
new file mode 100644
index 0000000..0fd8f96
--- /dev/null
+++ b/WebCore/bindings/cpp/WebDOMCustomVoidCallback.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) Kevin Ollivier <kevino@theolliviers.com>. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebDOMCustomVoidCallback_h
+#define WebDOMCustomVoidCallback_h
+
+#include "VoidCallback.h"
+#include <wtf/PassRefPtr.h>
+
+// FIXME: This is just a stub to keep compilation working. We need to revisit
+// this when we add support for these callbacks to the WebDOM bindings.
+
+class WebDOMCustomVoidCallback : public WebCore::VoidCallback {
+public:
+ static PassRefPtr<WebDOMCustomVoidCallback> create()
+ {
+ return adoptRef(new WebDOMCustomVoidCallback());
+ }
+
+ virtual ~WebDOMCustomVoidCallback();
+
+ virtual void handleEvent();
+
+private:
+ WebDOMCustomVoidCallback();
+};
+
+WebCore::VoidCallback* toWebCore(const WebDOMCustomVoidCallback&);
+
+#endif // WebDOMCustomVoidCallback_h
diff --git a/WebCore/bindings/cpp/WebDOMEventTarget.cpp b/WebCore/bindings/cpp/WebDOMEventTarget.cpp
index b24bc84..7dee138 100644
--- a/WebCore/bindings/cpp/WebDOMEventTarget.cpp
+++ b/WebCore/bindings/cpp/WebDOMEventTarget.cpp
@@ -197,3 +197,10 @@ WebDOMEventTarget toWebKit(WebCore::EventTarget* value)
ASSERT_NOT_REACHED();
return WebDOMEventTarget();
}
+
+WebDOMEventTarget& WebDOMEventTarget::operator=(const WebDOMEventTarget& copy)
+{
+ delete m_impl;
+ m_impl = copy.impl() ? new WebDOMEventTargetPrivate(copy.impl()) : 0;
+ return *this;
+}
diff --git a/WebCore/bindings/cpp/WebDOMEventTarget.h b/WebCore/bindings/cpp/WebDOMEventTarget.h
index d514372..4548a8b 100644
--- a/WebCore/bindings/cpp/WebDOMEventTarget.h
+++ b/WebCore/bindings/cpp/WebDOMEventTarget.h
@@ -64,6 +64,7 @@ public:
WebDOMNotification toNotification();
WebDOMWebSocket toWebSocket();
+ WebDOMEventTarget& operator=(const WebDOMEventTarget&);
protected:
struct WebDOMEventTargetPrivate;
WebDOMEventTargetPrivate* m_impl;
diff --git a/WebCore/bindings/cpp/WebDOMHTMLCollectionCustom.cpp b/WebCore/bindings/cpp/WebDOMHTMLCollectionCustom.cpp
index 3f3378c..a16a329 100644
--- a/WebCore/bindings/cpp/WebDOMHTMLCollectionCustom.cpp
+++ b/WebCore/bindings/cpp/WebDOMHTMLCollectionCustom.cpp
@@ -20,10 +20,10 @@
#include "config.h"
#include "WebDOMHTMLCollection.h"
-#include "AtomicString.h"
#include "HTMLCollection.h"
#include "WebDOMNode.h"
#include <wtf/GetPtr.h>
+#include <wtf/text/AtomicString.h>
WebDOMNode WebDOMHTMLCollection::item(unsigned index)
{
diff --git a/WebCore/bindings/cpp/WebDOMHTMLDocumentCustom.cpp b/WebCore/bindings/cpp/WebDOMHTMLDocumentCustom.cpp
index 3bab0c1..d608b0f 100644
--- a/WebCore/bindings/cpp/WebDOMHTMLDocumentCustom.cpp
+++ b/WebCore/bindings/cpp/WebDOMHTMLDocumentCustom.cpp
@@ -25,11 +25,13 @@
#include "SegmentedString.h"
#include "WebExceptionHandler.h"
+#include <wtf/Forward.h>
+
static inline void documentWrite(const WebDOMString& text, WebCore::HTMLDocument* document, bool addNewline)
{
WebCore::SegmentedString segmentedString = WTF::String(text);
if (addNewline)
- segmentedString.append(WebCore::SegmentedString(&WebCore::newlineCharacter, 1));
+ segmentedString.append(WebCore::SegmentedString(WTF::String(&WebCore::newlineCharacter)));
document->write(segmentedString);
}
diff --git a/WebCore/bindings/cpp/WebDOMString.cpp b/WebCore/bindings/cpp/WebDOMString.cpp
index 59d98f7..debd4f4 100644
--- a/WebCore/bindings/cpp/WebDOMString.cpp
+++ b/WebCore/bindings/cpp/WebDOMString.cpp
@@ -110,7 +110,7 @@ WebDOMString::operator WTF::AtomicString() const
bool WebDOMString::equals(const char* string) const
{
- return WebCore::equal(m_private, string);
+ return WTF::equal(m_private, string);
}
void WebDOMString::assign(WebDOMStringPrivate* p)