[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:27:07 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 8aca683bdc9dc8c2953d039116d78355ec58e6cb
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 19:18:42 2009 +0000

    2009-11-09  Yaar Schnitman  <yaar at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            Upstreaming the Chromium WebKit API: WebNode.h and friends are thin wrappers around WebCore::Nodes
    
            https://bugs.webkit.org/show_bug.cgi?id=28394
    
            * public/WebElement.h: Added.
            (WebKit::WebElement::WebElement):
            (WebKit::WebElement::operator=):
            (WebKit::WebElement::assign):
            * public/WebFormElement.h: Added.
            (WebKit::WebFormElement::~WebFormElement):
            (WebKit::WebFormElement::WebFormElement):
            (WebKit::WebFormElement::operator=):
            (WebKit::WebFormElement::assign):
            * public/WebInputElement.h: Added.
            (WebKit::WebInputElement::WebInputElement):
            (WebKit::WebInputElement::operator=):
            (WebKit::WebInputElement::assign):
            * public/WebNode.h: Added.
            (WebKit::WebNode::~WebNode):
            (WebKit::WebNode::WebNode):
            (WebKit::WebNode::operator=):
            (WebKit::WebNode::isNull):
            (WebKit::WebNode::toElement):
            (WebKit::WebNode::unwrap):
            (WebKit::WebNode::constUnwrap):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50669 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 2226fff..d559ca3 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,33 @@
+2009-11-09  Yaar Schnitman  <yaar at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Upstreaming the Chromium WebKit API: WebNode.h and friends are thin wrappers around WebCore::Nodes
+
+        https://bugs.webkit.org/show_bug.cgi?id=28394
+
+        * public/WebElement.h: Added.
+        (WebKit::WebElement::WebElement):
+        (WebKit::WebElement::operator=):
+        (WebKit::WebElement::assign):
+        * public/WebFormElement.h: Added.
+        (WebKit::WebFormElement::~WebFormElement):
+        (WebKit::WebFormElement::WebFormElement):
+        (WebKit::WebFormElement::operator=):
+        (WebKit::WebFormElement::assign):
+        * public/WebInputElement.h: Added.
+        (WebKit::WebInputElement::WebInputElement):
+        (WebKit::WebInputElement::operator=):
+        (WebKit::WebInputElement::assign):
+        * public/WebNode.h: Added.
+        (WebKit::WebNode::~WebNode):
+        (WebKit::WebNode::WebNode):
+        (WebKit::WebNode::operator=):
+        (WebKit::WebNode::isNull):
+        (WebKit::WebNode::toElement):
+        (WebKit::WebNode::unwrap):
+        (WebKit::WebNode::constUnwrap):
+
 2009-11-09  Nate Chapin  <japhet at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h
new file mode 100644
index 0000000..bfdc081
--- /dev/null
+++ b/WebKit/chromium/public/WebElement.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebElement_h
+#define WebElement_h
+
+#include "WebNode.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Element; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+    // Provides readonly access to some properties of a DOM element node.
+    class WebElement : public WebNode {
+    public:
+        WebElement() : WebNode() { }
+        WebElement(const WebElement& e) : WebNode(e) { }
+
+        WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; }
+        WEBKIT_API void assign(const WebElement& e) { WebNode::assign(e); }
+
+#if WEBKIT_IMPLEMENTATION
+        WebElement(const WTF::PassRefPtr<WebCore::Element>&);
+        WebElement& operator=(const WTF::PassRefPtr<WebCore::Element>&);
+        operator WTF::PassRefPtr<WebCore::Element>() const;
+#endif
+
+    };
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h
new file mode 100644
index 0000000..693a1e9
--- /dev/null
+++ b/WebKit/chromium/public/WebFormElement.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebFormElement_h
+#define WebFormElement_h
+
+#include "WebElement.h"
+#include "WebVector.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLFormElement; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+    // A container for passing around a reference to a form element.  Provides
+    // some information about the form.
+    class WebFormElement : public WebElement {
+    public:
+        ~WebFormElement() { reset(); }
+
+        WebFormElement() : WebElement() { }
+        WebFormElement(const WebFormElement& e) : WebElement(e) { }
+
+        WebElement& operator=(const WebFormElement& e) { WebElement::assign(e); return *this; }
+        WEBKIT_API void assign(const WebFormElement& e) { WebElement::assign(e); }
+
+#if WEBKIT_IMPLEMENTATION
+        WebFormElement(const WTF::PassRefPtr<WebCore::HTMLFormElement>&);
+        WebFormElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormElement>&);
+        operator WTF::PassRefPtr<WebCore::HTMLFormElement>() const;
+#endif
+
+        bool autoComplete() const;
+        WebString action();
+        void submit();
+        void getNamedElements(const WebString&, WebVector<WebNode>&);
+    };
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
new file mode 100644
index 0000000..5d86a39
--- /dev/null
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebInputElement_h
+#define WebInputElement_h
+
+#include "WebElement.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLInputElement; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+    // Provides readonly access to some properties of a DOM input element node.
+    class WebInputElement : public WebElement {
+    public:
+        WebInputElement() : WebElement() { }
+        WebInputElement(const WebInputElement& n) : WebElement(n) { }
+
+        WebInputElement& operator=(const WebInputElement& n) { WebElement::assign(n); return *this; }
+        WEBKIT_API void assign(const WebInputElement& n) { WebElement::assign(n); }
+
+#if WEBKIT_IMPLEMENTATION
+        WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
+        WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
+        operator WTF::PassRefPtr<WebCore::HTMLInputElement>() const;
+#endif
+
+        void setActivatedSubmit(bool);
+        void setValue(const WebString& value);
+        WebString value();
+        void setAutofilled(bool);
+        void dispatchFormControlChangeEvent();
+        void setSelectionRange(size_t, size_t);
+    };
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h
new file mode 100644
index 0000000..4c48915
--- /dev/null
+++ b/WebKit/chromium/public/WebNode.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebNode_h
+#define WebNode_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace WebCore { class Node; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebFrame;
+
+// Provides readonly access to some properties of a DOM node.
+class WebNode {
+public:
+    virtual ~WebNode() { reset(); }
+
+    WebNode() : m_private(0) { }
+    WebNode(const WebNode& n) : m_private(0) { assign(n); }
+    WebNode& operator=(const WebNode& n)
+    {
+        assign(n);
+        return *this;
+    }
+
+    WEBKIT_API void reset();
+    WEBKIT_API void assign(const WebNode&);
+
+    bool isNull() const { return !m_private; }
+
+#if WEBKIT_IMPLEMENTATION
+    WebNode(const WTF::PassRefPtr<WebCore::Node>&);
+    WebNode& operator=(const WTF::PassRefPtr<WebCore::Node>&);
+    operator WTF::PassRefPtr<WebCore::Node>() const;
+#endif
+
+    WEBKIT_API WebNode parentNode() const;
+    WEBKIT_API WebString nodeName() const;
+    WebFrame* frame();
+
+    template<typename T> T toElement()
+    {
+        T res;
+        res.m_private = m_private;
+        return res;
+    }
+
+protected:
+    typedef WebCore::Node WebNodePrivate;
+    void assign(WebNodePrivate*);
+    WebNodePrivate* m_private;
+    
+    template<typename T> T* unwrap()
+    {
+        return static_cast<T*>(m_private);
+    }
+
+    template<typename T> const T* constUnwrap() const
+    {
+        return static_cast<const T*>(m_private);
+    }
+};
+
+} // namespace WebKit
+
+#endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list