[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 11:55:21 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b8762d55e0edbf4b3dcd052612fa76742e4958bf
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 11 12:30:43 2010 +0000
2010-08-11 Kevin Ollivier <kevino at theolliviers.com>
Reviewed by Adam Barth.
Override operator= for C++ DOM binding classes with private structs
and update C++ DOM bindings test results.
https://bugs.webkit.org/show_bug.cgi?id=43735
* bindings/cpp/WebDOMEventTarget.cpp:
(WebDOMEventTarget::operator=):
* bindings/cpp/WebDOMEventTarget.h:
* bindings/scripts/CodeGeneratorCPP.pm:
* bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
(WebDOMTestCallback::operator=):
* bindings/scripts/test/CPP/WebDOMTestCallback.h:
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
(WebDOMTestInterface::operator=):
* bindings/scripts/test/CPP/WebDOMTestInterface.h:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::operator=):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8ebfc35..7df5db0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-08-11 Kevin Ollivier <kevino at theolliviers.com>
+
+ Reviewed by Adam Barth.
+
+ Override operator= for C++ DOM binding classes with private structs
+ and update C++ DOM bindings test results.
+ https://bugs.webkit.org/show_bug.cgi?id=43735
+
+ * bindings/cpp/WebDOMEventTarget.cpp:
+ (WebDOMEventTarget::operator=):
+ * bindings/cpp/WebDOMEventTarget.h:
+ * bindings/scripts/CodeGeneratorCPP.pm:
+ * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
+ (WebDOMTestCallback::operator=):
+ * bindings/scripts/test/CPP/WebDOMTestCallback.h:
+ * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
+ (WebDOMTestInterface::operator=):
+ * bindings/scripts/test/CPP/WebDOMTestInterface.h:
+ * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
+ (WebDOMTestObj::operator=):
+ * bindings/scripts/test/CPP/WebDOMTestObj.h:
+
2010-08-11 Julie Parent <jparent at chromium.org>
Reviewed by Justin Garcia.
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/scripts/CodeGeneratorCPP.pm b/WebCore/bindings/scripts/CodeGeneratorCPP.pm
index 7f44d94..98fdfe2 100644
--- a/WebCore/bindings/scripts/CodeGeneratorCPP.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorCPP.pm
@@ -379,9 +379,10 @@ sub GenerateHeader
push(@headerContent, " $className();\n");
push(@headerContent, " explicit $className($implClassNameWithNamespace*);\n");
- # Copy constructor on classes which have the d-ptr
+ # Copy constructor and assignment operator on classes which have the d-ptr
if ($parentName eq "WebDOMObject") {
push(@headerContent, " $className(const $className&);\n");
+ push(@headerContent, " ${className}& operator=(const $className&);\n");
}
# Destructor
@@ -634,6 +635,13 @@ sub GenerateImplementation
push(@implContent, " m_impl = copy.impl() ? new ${className}Private(copy.impl()) : 0;\n");
push(@implContent, "}\n\n");
+ push(@implContent, "${className}& ${className}::operator\=(const ${className}& copy)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " delete m_impl;\n");
+ push(@implContent, " m_impl = copy.impl() ? new ${className}Private(copy.impl()) : 0;\n");
+ push(@implContent, " return *this;\n");
+ push(@implContent, "}\n\n");
+
push(@implContent, "$implClassNameWithNamespace* ${className}::impl() const\n");
push(@implContent, "{\n");
push(@implContent, " return m_impl ? m_impl->impl.get() : 0;\n");
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp b/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp
index ab364fc..122971c 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp
@@ -65,6 +65,13 @@ WebDOMTestCallback::WebDOMTestCallback(const WebDOMTestCallback& copy)
m_impl = copy.impl() ? new WebDOMTestCallbackPrivate(copy.impl()) : 0;
}
+WebDOMTestCallback& WebDOMTestCallback::operator=(const WebDOMTestCallback& copy)
+{
+ delete m_impl;
+ m_impl = copy.impl() ? new WebDOMTestCallbackPrivate(copy.impl()) : 0;
+ return *this;
+}
+
WebCore::TestCallback* WebDOMTestCallback::impl() const
{
return m_impl ? m_impl->impl.get() : 0;
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
index 3fe6837..a4d130e 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
@@ -43,6 +43,7 @@ public:
WebDOMTestCallback();
explicit WebDOMTestCallback(WebCore::TestCallback*);
WebDOMTestCallback(const WebDOMTestCallback&);
+ WebDOMTestCallback& operator=(const WebDOMTestCallback&);
~WebDOMTestCallback();
bool callbackWithClass1Param(const WebDOMClass1& class1Param);
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.cpp b/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.cpp
index 0436e13..7fa4af3 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.cpp
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.cpp
@@ -56,6 +56,13 @@ WebDOMTestInterface::WebDOMTestInterface(const WebDOMTestInterface& copy)
m_impl = copy.impl() ? new WebDOMTestInterfacePrivate(copy.impl()) : 0;
}
+WebDOMTestInterface& WebDOMTestInterface::operator=(const WebDOMTestInterface& copy)
+{
+ delete m_impl;
+ m_impl = copy.impl() ? new WebDOMTestInterfacePrivate(copy.impl()) : 0;
+ return *this;
+}
+
WebCore::TestInterface* WebDOMTestInterface::impl() const
{
return m_impl ? m_impl->impl.get() : 0;
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h
index 4e7af6d..ca20c4e 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h
@@ -38,6 +38,7 @@ public:
WebDOMTestInterface();
explicit WebDOMTestInterface(WebCore::TestInterface*);
WebDOMTestInterface(const WebDOMTestInterface&);
+ WebDOMTestInterface& operator=(const WebDOMTestInterface&);
~WebDOMTestInterface();
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
index bfe2ec4..f1d9fe1 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
@@ -61,6 +61,13 @@ WebDOMTestObj::WebDOMTestObj(const WebDOMTestObj& copy)
m_impl = copy.impl() ? new WebDOMTestObjPrivate(copy.impl()) : 0;
}
+WebDOMTestObj& WebDOMTestObj::operator=(const WebDOMTestObj& copy)
+{
+ delete m_impl;
+ m_impl = copy.impl() ? new WebDOMTestObjPrivate(copy.impl()) : 0;
+ return *this;
+}
+
WebCore::TestObj* WebDOMTestObj::impl() const
{
return m_impl ? m_impl->impl.get() : 0;
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
index c3b65ca..2fedf41 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
@@ -40,6 +40,7 @@ public:
WebDOMTestObj();
explicit WebDOMTestObj(WebCore::TestObj*);
WebDOMTestObj(const WebDOMTestObj&);
+ WebDOMTestObj& operator=(const WebDOMTestObj&);
~WebDOMTestObj();
enum {
@@ -104,12 +105,18 @@ public:
int customAttr() const;
void setCustomAttr(int);
WebDOMString scriptStringAttr() const;
+#if ENABLE(Condition1)
int conditionalAttr1() const;
void setConditionalAttr1(int);
+#endif
+#if ENABLE(Condition1) && ENABLE(Condition2)
int conditionalAttr2() const;
void setConditionalAttr2(int);
+#endif
+#if ENABLE(Condition1) || ENABLE(Condition2)
int conditionalAttr3() const;
void setConditionalAttr3(int);
+#endif
int description() const;
int id() const;
void setId(int);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list