[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:28:52 UTC 2010


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

    2010-07-26  Dominic Mazzoni  <dmazzoni at google.com>
    
            Reviewed by Chris Fleizach.
    
            Add accessor to get the doctype of a WebDocument, needed to
            implement Windows accessibility.
    
            https://bugs.webkit.org/show_bug.cgi?id=43003
    
            * WebKit.gyp:
            * public/WebDocument.h:
            * public/WebDocumentType.h: Added.
            (WebKit::WebDocumentType::WebDocumentType):
            (WebKit::WebDocumentType::operator=):
            (WebKit::WebDocumentType::assign):
            * src/WebDocument.cpp:
            (WebKit::WebDocument::doctype):
            * src/WebDocumentType.cpp: Added.
            (WebKit::WebDocumentType::name):
            (WebKit::WebDocumentType::WebDocumentType):
            (WebKit::WebDocumentType::operator=):
            (WebKit::WebDocumentType::operator PassRefPtr<DocumentType>):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64092 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 0309952..4d6e9dd 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,26 @@
+2010-07-26  Dominic Mazzoni  <dmazzoni at google.com>
+
+        Reviewed by Chris Fleizach.
+
+        Add accessor to get the doctype of a WebDocument, needed to
+        implement Windows accessibility.
+
+        https://bugs.webkit.org/show_bug.cgi?id=43003
+        
+        * WebKit.gyp:
+        * public/WebDocument.h:
+        * public/WebDocumentType.h: Added.
+        (WebKit::WebDocumentType::WebDocumentType):
+        (WebKit::WebDocumentType::operator=):
+        (WebKit::WebDocumentType::assign):
+        * src/WebDocument.cpp:
+        (WebKit::WebDocument::doctype):
+        * src/WebDocumentType.cpp: Added.
+        (WebKit::WebDocumentType::name):
+        (WebKit::WebDocumentType::WebDocumentType):
+        (WebKit::WebDocumentType::operator=):
+        (WebKit::WebDocumentType::operator PassRefPtr<DocumentType>):
+
 2010-07-26  Satish Sampath  <satish at chromium.org>
 
         Reviewed by Steve Block.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 8b1879f..7092c3a 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -144,6 +144,7 @@
                 'public/WebDevToolsMessageData.h',
                 'public/WebDevToolsMessageTransport.h',
                 'public/WebDocument.h',
+                'public/WebDocumentType.h',
                 'public/WebDragData.h',
                 'public/WebEditingAction.h',
                 'public/WebElement.h',
@@ -375,6 +376,7 @@
                 'src/WebDevToolsFrontendImpl.cpp',
                 'src/WebDevToolsFrontendImpl.h',
                 'src/WebDocument.cpp',
+                'src/WebDocumentType.cpp',
                 'src/WebDragData.cpp',
                 'src/WebElement.cpp',
                 'src/WebEntities.cpp',
diff --git a/WebKit/chromium/public/WebDocument.h b/WebKit/chromium/public/WebDocument.h
index c093c58..d9f7386 100644
--- a/WebKit/chromium/public/WebDocument.h
+++ b/WebKit/chromium/public/WebDocument.h
@@ -34,11 +34,15 @@
 #include "WebNode.h"
 
 #if WEBKIT_IMPLEMENTATION
-namespace WebCore { class Document; }
+namespace WebCore {
+class Document;
+class DocumentType;
+}
 namespace WTF { template <typename T> class PassRefPtr; }
 #endif
 
 namespace WebKit {
+class WebDocumentType;
 class WebElement;
 class WebFrame;
 class WebNodeCollection;
@@ -74,6 +78,7 @@ public:
     WEBKIT_API WebURL completeURL(const WebString&) const;
     WEBKIT_API WebElement getElementById(const WebString&) const;
     WEBKIT_API WebNode focusedNode() const;
+    WEBKIT_API WebDocumentType doctype() const;
 
 #if WEBKIT_IMPLEMENTATION
     WebDocument(const WTF::PassRefPtr<WebCore::Document>&);
diff --git a/WebKit/chromium/public/WebDocumentType.h b/WebKit/chromium/public/WebDocumentType.h
new file mode 100644
index 0000000..b339320
--- /dev/null
+++ b/WebKit/chromium/public/WebDocumentType.h
@@ -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.
+ */
+
+#ifndef WebDocumentType_h
+#define WebDocumentType_h
+
+#include "WebNode.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class DocumentType; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebString;
+
+// Provides readonly access to some properties of a DOM document type.
+class WebDocumentType : public WebNode {
+public:
+    WebDocumentType() { }
+    WebDocumentType(const WebDocumentType& e) : WebNode(e) { }
+
+    WebDocumentType& operator=(const WebDocumentType& e)
+    {
+        WebNode::assign(e);
+        return *this;
+    }
+    void assign(const WebDocumentType& e) { WebNode::assign(e); }
+
+    WEBKIT_API WebString name() const;
+
+#if WEBKIT_IMPLEMENTATION
+    WebDocumentType(const WTF::PassRefPtr<WebCore::DocumentType>&);
+    WebDocumentType& operator=(const WTF::PassRefPtr<WebCore::DocumentType>&);
+    operator WTF::PassRefPtr<WebCore::DocumentType>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebDocument.cpp b/WebKit/chromium/src/WebDocument.cpp
index 017716d..a983bf7 100644
--- a/WebKit/chromium/src/WebDocument.cpp
+++ b/WebKit/chromium/src/WebDocument.cpp
@@ -32,6 +32,7 @@
 #include "WebDocument.h"
 
 #include "Document.h"
+#include "DocumentType.h"
 #include "Element.h"
 #include "HTMLAllCollection.h"
 #include "HTMLBodyElement.h"
@@ -40,6 +41,7 @@
 #include "HTMLHeadElement.h"
 #include "NodeList.h"
 
+#include "WebDocumentType.h"
 #include "WebElement.h"
 #include "WebFrameImpl.h"
 #include "WebNodeCollection.h"
@@ -122,6 +124,11 @@ WebNode WebDocument::focusedNode() const
     return WebNode(constUnwrap<Document>()->focusedNode());
 }
 
+WebDocumentType WebDocument::doctype() const
+{
+    return WebDocumentType(constUnwrap<Document>()->doctype());
+}
+
 WebDocument::WebDocument(const PassRefPtr<Document>& elem)
     : WebNode(elem)
 {
diff --git a/WebKit/chromium/src/WebDocumentType.cpp b/WebKit/chromium/src/WebDocumentType.cpp
new file mode 100644
index 0000000..bbf28e7
--- /dev/null
+++ b/WebKit/chromium/src/WebDocumentType.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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 "WebDocumentType.h"
+
+#include "DocumentType.h"
+#include "WebString.h"
+
+#include <wtf/PassRefPtr.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebString WebDocumentType::name() const
+{
+    return WebString(constUnwrap<DocumentType>()->name());
+}
+
+WebDocumentType::WebDocumentType(const PassRefPtr<DocumentType>& elem)
+    : WebNode(elem)
+{
+}
+
+WebDocumentType& WebDocumentType::operator=(const PassRefPtr<DocumentType>& elem)
+{
+    m_private = elem;
+    return *this;
+}
+
+WebDocumentType::operator PassRefPtr<DocumentType>() const
+{
+    return static_cast<DocumentType*>(m_private.get());
+}
+
+} // namespace WebKit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list