[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:29:24 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f1f223c13f86c175b7ef59fc4fa220d554d437fb
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 27 08:07:50 2010 +0000

    2010-07-27  Dominic Mazzoni  <dmazzoni at google.com>
    
            Reviewed by Chris Fleizach.
    
            For Windows accessibility, have WebElement provide access
            to its attributes.
    
            https://bugs.webkit.org/show_bug.cgi?id=43004
    
            * WebKit.gyp:
            * public/WebAttribute.h: Added.
            (WebKit::WebAttribute::~WebAttribute):
            (WebKit::WebAttribute::WebAttribute):
            (WebKit::WebAttribute::operator=):
            * public/WebElement.h:
            * public/WebNamedNodeMap.h: Added.
            (WebKit::WebNamedNodeMap::~WebNamedNodeMap):
            (WebKit::WebNamedNodeMap::WebNamedNodeMap):
            (WebKit::WebNamedNodeMap::operator=):
            * src/WebAttribute.cpp: Added.
            (WebKit::WebAttribute::reset):
            (WebKit::WebAttribute::assign):
            (WebKit::WebAttribute::WebAttribute):
            (WebKit::WebAttribute::localName):
            (WebKit::WebAttribute::value):
            * src/WebElement.cpp:
            (WebKit::WebElement::attributes):
            * src/WebNamedNodeMap.cpp: Added.
            (WebKit::WebNamedNodeMap::reset):
            (WebKit::WebNamedNodeMap::assign):
            (WebKit::WebNamedNodeMap::WebNamedNodeMap):
            (WebKit::WebNamedNodeMap::length):
            (WebKit::WebNamedNodeMap::attributeItem):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64112 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index fc5c7a3..ce1e71e 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,37 @@
+2010-07-27  Dominic Mazzoni  <dmazzoni at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        For Windows accessibility, have WebElement provide access
+        to its attributes.
+
+        https://bugs.webkit.org/show_bug.cgi?id=43004
+
+        * WebKit.gyp:
+        * public/WebAttribute.h: Added.
+        (WebKit::WebAttribute::~WebAttribute):
+        (WebKit::WebAttribute::WebAttribute):
+        (WebKit::WebAttribute::operator=):
+        * public/WebElement.h:
+        * public/WebNamedNodeMap.h: Added.
+        (WebKit::WebNamedNodeMap::~WebNamedNodeMap):
+        (WebKit::WebNamedNodeMap::WebNamedNodeMap):
+        (WebKit::WebNamedNodeMap::operator=):
+        * src/WebAttribute.cpp: Added.
+        (WebKit::WebAttribute::reset):
+        (WebKit::WebAttribute::assign):
+        (WebKit::WebAttribute::WebAttribute):
+        (WebKit::WebAttribute::localName):
+        (WebKit::WebAttribute::value):
+        * src/WebElement.cpp:
+        (WebKit::WebElement::attributes):
+        * src/WebNamedNodeMap.cpp: Added.
+        (WebKit::WebNamedNodeMap::reset):
+        (WebKit::WebNamedNodeMap::assign):
+        (WebKit::WebNamedNodeMap::WebNamedNodeMap):
+        (WebKit::WebNamedNodeMap::length):
+        (WebKit::WebNamedNodeMap::attributeItem):
+
 2010-07-27  Satish Sampath  <satish at chromium.org>
 
         Reviewed by Kent Tamura.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 7092c3a..795abbb 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -116,6 +116,7 @@
                 'public/WebAnimationController.h',
                 'public/WebApplicationCacheHost.h',
                 'public/WebApplicationCacheHostClient.h',
+                'public/WebAttribute.h',
                 'public/WebBindings.h',
                 'public/WebCache.h',
                 'public/WebCanvas.h',
@@ -192,6 +193,7 @@
                 'public/WebMessagePortChannelClient.h',
                 'public/WebMimeRegistry.h',
                 'public/WebMutationEvent.h',
+                'public/WebNamedNodeMap.h',
                 'public/WebNavigationType.h',
                 'public/WebNode.h',
                 'public/WebNodeCollection.h',
@@ -359,6 +361,7 @@
                 'src/WebAccessibilityObject.cpp',
                 'src/WebAnimationControllerImpl.cpp',
                 'src/WebAnimationControllerImpl.h',
+                'src/WebAttribute.cpp',
                 'src/WebBindings.cpp',
                 'src/WebCache.cpp',
                 'src/WebColor.cpp',
@@ -426,6 +429,7 @@
                 'src/WebMediaPlayerClientImpl.cpp',
                 'src/WebMediaPlayerClientImpl.h',
                 'src/WebMutationEvent.cpp',
+                'src/WebNamedNodeMap.cpp',
                 'src/WebNode.cpp',
                 'src/WebNodeCollection.cpp',
                 'src/WebNodeList.cpp',
diff --git a/WebKit/chromium/public/WebAttribute.h b/WebKit/chromium/public/WebAttribute.h
new file mode 100644
index 0000000..56e140b
--- /dev/null
+++ b/WebKit/chromium/public/WebAttribute.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 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 WebAttribute_h
+#define WebAttribute_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class Attribute; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebString;
+
+// Provides readonly access to some properties of a DOM attribute.
+class WebAttribute {
+public:
+    ~WebAttribute() { reset(); }
+
+    WebAttribute() { }
+    WebAttribute(const WebAttribute& n) { assign(n); }
+    WebAttribute& operator=(const WebAttribute& n)
+    {
+        assign(n);
+        return *this;
+    }
+
+    WEBKIT_API void reset();
+    WEBKIT_API void assign(const WebAttribute&);
+
+    WEBKIT_API WebString localName() const;
+    WEBKIT_API WebString value() const;
+
+#if WEBKIT_IMPLEMENTATION
+    WebAttribute(const WTF::PassRefPtr<WebCore::Attribute>&);
+#endif
+
+private:
+    WebPrivatePtr<WebCore::Attribute> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h
index 1be40bc..16a82d8 100644
--- a/WebKit/chromium/public/WebElement.h
+++ b/WebKit/chromium/public/WebElement.h
@@ -38,6 +38,8 @@ namespace WebCore { class Element; }
 #endif
 
 namespace WebKit {
+class WebNamedNodeMap;
+
     // Provides access to some properties of a DOM element node.
     class WebElement : public WebNode {
     public:
@@ -53,6 +55,7 @@ namespace WebKit {
         WEBKIT_API bool hasAttribute(const WebString&) const;
         WEBKIT_API WebString getAttribute(const WebString&) const;
         WEBKIT_API bool setAttribute(const WebString& name, const WebString& value);
+        WEBKIT_API WebNamedNodeMap attributes() const;
         WEBKIT_API WebString innerText() const;
 
 #if WEBKIT_IMPLEMENTATION
diff --git a/WebKit/chromium/public/WebNamedNodeMap.h b/WebKit/chromium/public/WebNamedNodeMap.h
new file mode 100644
index 0000000..0b7e296
--- /dev/null
+++ b/WebKit/chromium/public/WebNamedNodeMap.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 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 WebNamedNodeMap_h
+#define WebNamedNodeMap_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class NamedNodeMap; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebAttribute;
+
+// Provides readonly access to some properties of a DOM attribute map.
+class WebNamedNodeMap {
+public:
+    ~WebNamedNodeMap() { reset(); }
+
+    WebNamedNodeMap() { }
+    WebNamedNodeMap(const WebNamedNodeMap& n) { assign(n); }
+    WebNamedNodeMap& operator=(const WebNamedNodeMap& n)
+    {
+        assign(n);
+        return *this;
+    }
+
+    WEBKIT_API void reset();
+    WEBKIT_API void assign(const WebNamedNodeMap&);
+
+    WEBKIT_API unsigned length() const;
+    WEBKIT_API WebAttribute attributeItem(unsigned) const;
+
+#if WEBKIT_IMPLEMENTATION
+    WebNamedNodeMap(const WTF::PassRefPtr<WebCore::NamedNodeMap>&);
+#endif
+
+private:
+    WebPrivatePtr<WebCore::NamedNodeMap> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebAttribute.cpp b/WebKit/chromium/src/WebAttribute.cpp
new file mode 100644
index 0000000..0bc3b91
--- /dev/null
+++ b/WebKit/chromium/src/WebAttribute.cpp
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#include "config.h"
+#include "WebAttribute.h"
+
+#include "Attribute.h"
+#include <wtf/PassRefPtr.h>
+
+#include "WebString.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebAttribute::reset()
+{
+    m_private.reset();
+}
+
+void WebAttribute::assign(const WebAttribute& other)
+{
+    m_private = other.m_private;
+}
+
+WebAttribute::WebAttribute(const PassRefPtr<Attribute>& other)
+    : m_private(other)
+{
+}
+
+WebString WebAttribute::localName() const
+{
+    return WebString(m_private->localName());
+}
+
+WebString WebAttribute::value() const
+{
+    return WebString(m_private->value());
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp
index 25a396e..f45cba9 100644
--- a/WebKit/chromium/src/WebElement.cpp
+++ b/WebKit/chromium/src/WebElement.cpp
@@ -36,6 +36,8 @@
 #include "RenderObject.h"
 #include <wtf/PassRefPtr.h>
 
+#include "WebNamedNodeMap.h"
+
 using namespace WebCore;
 
 namespace WebKit {
@@ -73,6 +75,11 @@ bool WebElement::setAttribute(const WebString& attrName, const WebString& attrVa
     return !exceptionCode;
 }
 
+WebNamedNodeMap WebElement::attributes() const
+{
+    return WebNamedNodeMap(m_private->attributes());
+}
+
 WebString WebElement::innerText() const
 {
     return constUnwrap<Element>()->innerText();
diff --git a/WebKit/chromium/src/WebNamedNodeMap.cpp b/WebKit/chromium/src/WebNamedNodeMap.cpp
new file mode 100644
index 0000000..e2455e6
--- /dev/null
+++ b/WebKit/chromium/src/WebNamedNodeMap.cpp
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#include "config.h"
+#include "WebNamedNodeMap.h"
+
+#include "NamedNodeMap.h"
+#include "Node.h"
+#include "WebAttribute.h"
+#include "WebNode.h"
+#include <wtf/PassRefPtr.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebNamedNodeMap::reset()
+{
+    m_private.reset();
+}
+
+void WebNamedNodeMap::assign(const WebNamedNodeMap& other)
+{
+    m_private = other.m_private;
+}
+
+WebNamedNodeMap::WebNamedNodeMap(const PassRefPtr<NamedNodeMap>& other)
+    : m_private(other)
+{
+}
+
+unsigned WebNamedNodeMap::length() const
+{
+    return m_private->length();
+}
+
+WebAttribute WebNamedNodeMap::attributeItem(unsigned index) const
+{
+    return WebAttribute(m_private->attributeItem(index));
+}
+
+} // namespace WebKit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list