summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/public
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/public')
-rw-r--r--WebKit/chromium/public/WebAccessibilityObject.h7
-rw-r--r--WebKit/chromium/public/WebAttribute.h74
-rw-r--r--WebKit/chromium/public/WebDOMStringList.h2
-rw-r--r--WebKit/chromium/public/WebDocument.h7
-rw-r--r--WebKit/chromium/public/WebDocumentType.h68
-rw-r--r--WebKit/chromium/public/WebElement.h3
-rw-r--r--WebKit/chromium/public/WebFloatPoint.h91
-rw-r--r--WebKit/chromium/public/WebFloatRect.h103
-rw-r--r--WebKit/chromium/public/WebFont.h100
-rw-r--r--WebKit/chromium/public/WebFontDescription.h106
-rw-r--r--WebKit/chromium/public/WebInputEvent.h4
-rw-r--r--WebKit/chromium/public/WebNamedNodeMap.h74
-rw-r--r--WebKit/chromium/public/WebSettings.h1
-rw-r--r--WebKit/chromium/public/WebSpeechInputController.h67
-rw-r--r--WebKit/chromium/public/WebSpeechInputListener.h70
-rw-r--r--WebKit/chromium/public/WebTextRun.h68
-rw-r--r--WebKit/chromium/public/WebView.h2
-rw-r--r--WebKit/chromium/public/WebViewClient.h10
18 files changed, 853 insertions, 4 deletions
diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h
index f1b2474..ddb9bda 100644
--- a/WebKit/chromium/public/WebAccessibilityObject.h
+++ b/WebKit/chromium/public/WebAccessibilityObject.h
@@ -42,6 +42,8 @@ namespace WTF { template <typename T> class PassRefPtr; }
namespace WebKit {
class WebAccessibilityObjectPrivate;
+class WebNode;
+class WebDocument;
class WebString;
struct WebPoint;
struct WebRect;
@@ -103,6 +105,11 @@ public:
WEBKIT_API WebString stringValue() const;
WEBKIT_API WebString title() const;
+ WEBKIT_API WebNode node() const;
+ WEBKIT_API WebDocument document() const;
+ WEBKIT_API bool hasComputedStyle() const;
+ WEBKIT_API WebString computedStyleDisplay() const;
+
#if WEBKIT_IMPLEMENTATION
WebAccessibilityObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>&);
WebAccessibilityObject& operator=(const WTF::PassRefPtr<WebCore::AccessibilityObject>&);
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/WebDOMStringList.h b/WebKit/chromium/public/WebDOMStringList.h
index b3fb533..d88fcee 100644
--- a/WebKit/chromium/public/WebDOMStringList.h
+++ b/WebKit/chromium/public/WebDOMStringList.h
@@ -46,7 +46,7 @@ class WebDOMStringList {
public:
~WebDOMStringList() { reset(); }
- WebDOMStringList() { }
+ WebDOMStringList();
WebDOMStringList(const WebDOMStringList& l) { assign(l); }
WebDOMStringList& operator=(const WebDOMStringList& l)
{
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/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/WebFloatPoint.h b/WebKit/chromium/public/WebFloatPoint.h
new file mode 100644
index 0000000..c053ed6
--- /dev/null
+++ b/WebKit/chromium/public/WebFloatPoint.h
@@ -0,0 +1,91 @@
+/*
+ * 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 WebFloatPoint_h
+#define WebFloatPoint_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "IntPoint.h"
+#endif
+
+namespace WebKit {
+
+struct WebFloatPoint {
+ float x;
+ float y;
+
+ WebFloatPoint()
+ : x(0.0f)
+ , y(0.0f)
+ {
+ }
+
+ WebFloatPoint(float x, float y)
+ : x(x)
+ , y(y)
+ {
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebFloatPoint(const WebCore::FloatPoint& p)
+ : x(p.x())
+ , y(p.y())
+ {
+ }
+
+ WebFloatPoint& operator=(const WebCore::FloatPoint& p)
+ {
+ x = p.x();
+ y = p.y();
+ return *this;
+ }
+
+ operator WebCore::FloatPoint() const
+ {
+ return WebCore::FloatPoint(x, y);
+ }
+#endif
+};
+
+inline bool operator==(const WebFloatPoint& a, const WebFloatPoint& b)
+{
+ return a.x == b.x && a.y == b.y;
+}
+
+inline bool operator!=(const WebFloatPoint& a, const WebFloatPoint& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFloatRect.h b/WebKit/chromium/public/WebFloatRect.h
new file mode 100644
index 0000000..a883513
--- /dev/null
+++ b/WebKit/chromium/public/WebFloatRect.h
@@ -0,0 +1,103 @@
+/*
+ * 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 WebFloatRect_h
+#define WebFloatRect_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "FloatRect.h"
+#endif
+
+namespace WebKit {
+
+struct WebFloatRect {
+ float x;
+ float y;
+ float width;
+ float height;
+
+ bool isEmpty() const { return width <= 0 || height <= 0; }
+
+ WebFloatRect()
+ : x(0.0f)
+ , y(0.0f)
+ , width(0.0f)
+ , height(0.0f)
+ {
+ }
+
+ WebFloatRect(float x, float y, float width, float height)
+ : x(x)
+ , y(y)
+ , width(width)
+ , height(height)
+ {
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebFloatRect(const WebCore::FloatRect& r)
+ : x(r.x())
+ , y(r.y())
+ , width(r.width())
+ , height(r.height())
+ {
+ }
+
+ WebFloatRect& operator=(const WebCore::FloatRect& r)
+ {
+ x = r.x();
+ y = r.y();
+ width = r.width();
+ height = r.height();
+ return *this;
+ }
+
+ operator WebCore::FloatRect() const
+ {
+ return WebCore::FloatRect(x, y, width, height);
+ }
+#endif
+};
+
+inline bool operator==(const WebFloatRect& a, const WebFloatRect& b)
+{
+ return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;
+}
+
+inline bool operator!=(const WebFloatRect& a, const WebFloatRect& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFont.h b/WebKit/chromium/public/WebFont.h
new file mode 100644
index 0000000..a20d52f
--- /dev/null
+++ b/WebKit/chromium/public/WebFont.h
@@ -0,0 +1,100 @@
+/*
+ * 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 WebFont_h
+#define WebFont_h
+
+#include "WebCanvas.h"
+#include "WebColor.h"
+#include "WebCommon.h"
+
+namespace WebKit {
+
+struct WebFontDescription;
+struct WebFloatPoint;
+struct WebFloatRect;
+struct WebPoint;
+struct WebRect;
+struct WebTextRun;
+
+class WebFont {
+public:
+ virtual ~WebFont() { }
+
+ WEBKIT_API static WebFont* create(const WebFontDescription&);
+
+ virtual WebFontDescription fontDescription() const = 0;
+
+ virtual int ascent() const = 0;
+ virtual int descent() const = 0;
+ virtual int height() const = 0;
+ virtual int lineSpacing() const = 0;
+ virtual float xHeight() const = 0;
+
+ // Draws the text run to the given canvas. The text is positioned at the
+ // given left-hand point at the baseline.
+ //
+ // The text will be clipped to the given clip rect. |canvasIsOpaque| is
+ // used to control whether subpixel antialiasing is possible. If there is a
+ // possibility the area drawn could be semi-transparent, subpixel
+ // antialiasing will be disabled.
+ //
+ // |from| and |to| allow the caller to specify a subrange of the given text
+ // run to draw. If |to| is -1, the entire run will be drawn.
+ virtual void drawText(WebCanvas*, const WebTextRun&, const WebFloatPoint& leftBaseline, WebColor,
+ const WebRect& clip, bool canvasIsOpaque,
+ int from = 0, int to = -1) const = 0;
+
+ // Measures the width in pixels of the given text run.
+ virtual int calculateWidth(const WebTextRun&) const = 0;
+
+ // Returns the character offset corresponding to the given horizontal pixel
+ // position as measured from from the left of the run.
+ virtual int offsetForPosition(const WebTextRun&, float position) const = 0;
+
+ // Returns the rectangle representing the selection rect for the subrange
+ // |from| -> |to| of the given text run. You can use -1 for |to| to specify
+ // the entire run (this will do something similar to calling width()).
+ //
+ // The rect will be positioned as if the text was drawn at the given
+ // |leftBaseline| position. |height| indicates the height of the selection
+ // rect you want, typically this will just be the height() of this font.
+ //
+ // To get the pixel offset of some character (the opposite of
+ // offsetForPosition()), pass in a |leftBaseline| = (0, 0), |from| = 0, and
+ // |to| = the character you want. The right edge of the resulting selection
+ // rect will tell you the right side of the character.
+ virtual WebFloatRect selectionRectForText(const WebTextRun&, const WebFloatPoint& leftBaseline,
+ int height, int from = 0, int to = -1) const = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFontDescription.h b/WebKit/chromium/public/WebFontDescription.h
new file mode 100644
index 0000000..d4bb07e
--- /dev/null
+++ b/WebKit/chromium/public/WebFontDescription.h
@@ -0,0 +1,106 @@
+/*
+ * 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 WebFontDescription_h
+#define WebFontDescription_h
+
+#include "WebString.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class FontDescription; }
+#endif
+
+namespace WebKit {
+
+struct WebFontDescription {
+ enum GenericFamily {
+ GenericFamilyNone,
+ GenericFamilyStandard,
+ GenericFamilySerif,
+ GenericFamilySansSerif,
+ GenericFamilyMonospace,
+ GenericFamilyCursive,
+ GenericFamilyFantasy
+ };
+
+ enum Smoothing {
+ SmoothingAuto,
+ SmoothingNone,
+ SmoothingGrayscale,
+ SmoothingSubpixel
+ };
+
+ enum Weight {
+ Weight100,
+ Weight200,
+ Weight300,
+ Weight400,
+ Weight500,
+ Weight600,
+ Weight700,
+ Weight800,
+ Weight900,
+ WeightNormal = Weight400,
+ WeightBold = Weight700
+ };
+
+ WebFontDescription()
+ : genericFamily(GenericFamilyNone)
+ , size(0)
+ , italic(false)
+ , smallCaps(false)
+ , weight(WeightNormal)
+ , smoothing(SmoothingAuto)
+ , letterSpacing(0)
+ , wordSpacing(0)
+ {
+ }
+
+ WebString family;
+ GenericFamily genericFamily;
+ float size;
+ bool italic;
+ bool smallCaps;
+ Weight weight;
+ Smoothing smoothing;
+
+ short letterSpacing;
+ short wordSpacing;
+
+#if WEBKIT_IMPLEMENTATION
+ WebFontDescription(const WebCore::FontDescription&, short fontLetterSpacing, short fontWordSpacing);
+
+ operator WebCore::FontDescription() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebInputEvent.h b/WebKit/chromium/public/WebInputEvent.h
index 2ac7475..f8b057b 100644
--- a/WebKit/chromium/public/WebInputEvent.h
+++ b/WebKit/chromium/public/WebInputEvent.h
@@ -89,6 +89,7 @@ public:
MouseMove,
MouseEnter,
MouseLeave,
+ ContextMenu,
// WebMouseWheelEvent
MouseWheel,
@@ -135,7 +136,8 @@ public:
|| type == MouseUp
|| type == MouseMove
|| type == MouseEnter
- || type == MouseLeave;
+ || type == MouseLeave
+ || type == ContextMenu;
}
// Returns true if the WebInputEvent |type| is a keyboard event.
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/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index 32cefa1..90b8553 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -91,6 +91,7 @@ public:
virtual void setShowDebugBorders(bool) = 0;
virtual void setEditingBehavior(EditingBehavior) = 0;
virtual void setAcceleratedCompositingEnabled(bool) = 0;
+ virtual void setAccelerated2dCanvasEnabled(bool) = 0;
virtual void setHTML5ParserEnabled(bool) = 0;
virtual void setMemoryInfoEnabled(bool) = 0;
diff --git a/WebKit/chromium/public/WebSpeechInputController.h b/WebKit/chromium/public/WebSpeechInputController.h
new file mode 100644
index 0000000..3dba5fb
--- /dev/null
+++ b/WebKit/chromium/public/WebSpeechInputController.h
@@ -0,0 +1,67 @@
+/*
+ * 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 WebSpeechInputController_h
+#define WebSpeechInputController_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// Provides an embedder API called by WebKit.
+class WebSpeechInputController {
+public:
+ // Starts speech recognition. Speech will get recorded until the endpointer detects silence,
+ // runs to the limit or stopRecording is called. Progress indications and the recognized
+ // text are returned via the listener interface.
+ virtual bool startRecognition()
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return false;
+ }
+
+ // Cancels an ongoing recognition and discards any audio recorded so far. No partial
+ // recognition results are returned to the listener.
+ virtual void cancelRecognition() { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Stops audio recording and performs recognition with the audio recorded until now
+ // (does not discard audio). This is an optional call and is typically invoked if the user
+ // wants to stop recording audio as soon as they finished speaking. Otherwise, the speech
+ // recording 'endpointer' should detect silence in the input and stop recording automatically.
+ // Call startRecognition() to record audio and recognize speech again.
+ virtual void stopRecording() { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ virtual ~WebSpeechInputController() { }
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechInputController_h
diff --git a/WebKit/chromium/public/WebSpeechInputListener.h b/WebKit/chromium/public/WebSpeechInputListener.h
new file mode 100644
index 0000000..f1756af
--- /dev/null
+++ b/WebKit/chromium/public/WebSpeechInputListener.h
@@ -0,0 +1,70 @@
+/*
+ * 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 WebSpeechInputListener_h
+#define WebSpeechInputListener_h
+
+namespace WebKit {
+
+class WebString;
+
+// Provides a WebKit API called by the embedder.
+// A typical sequence of calls to the listener would be
+// 1 call to didCompleteRecording
+// 0 or more calls to setRecognitionResult
+// 1 call to didCompleteRecognition
+class WebSpeechInputListener {
+public:
+ // Informs that audio recording has completed and recognition is underway. This gets invoked
+ // irrespective of whether recording was stopped automatically by the 'endpointer' or if
+ // WebSpeechInputController::stopRecording() was called.
+ // Typically after this call the listener would update the UI to reflect that recognition is
+ // in progress.
+ virtual void didCompleteRecording() = 0;
+
+ // Gives results from speech recognition, either partial or the final results.
+ // This method can potentially get called multiple times if there are partial results
+ // available as the user keeps speaking. If the speech could not be recognized properly
+ // or if there was any other errors in the process, this method may never be called.
+ virtual void setRecognitionResult(const WebString&) = 0;
+
+ // Informs that speech recognition has completed. This gets invoked irrespective of whether
+ // recognition was succesful or not, whether setRecognitionResult() was invoked or not. The
+ // handler typically frees up any temporary resources allocated and waits for the next speech
+ // recognition request.
+ virtual void didCompleteRecognition() = 0;
+
+protected:
+ ~WebSpeechInputListener() { }
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechInputListener_h
diff --git a/WebKit/chromium/public/WebTextRun.h b/WebKit/chromium/public/WebTextRun.h
new file mode 100644
index 0000000..cb1373a
--- /dev/null
+++ b/WebKit/chromium/public/WebTextRun.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 WebTextRun_h
+#define WebTextRun_h
+
+#include "WebString.h"
+
+#ifdef WEBKIT_IMPLEMENTATION
+namespace WebCore { class TextRun; }
+#endif
+
+namespace WebKit {
+
+struct WebTextRun {
+ WebTextRun(const WebString& t, bool isRTL, bool hasDirectionalOverride)
+ : text(t)
+ , rtl(isRTL)
+ , directionalOverride(hasDirectionalOverride)
+ {
+ }
+ WebTextRun()
+ : rtl(false)
+ , directionalOverride(false)
+ {
+ }
+
+ WebString text;
+ bool rtl;
+ bool directionalOverride;
+
+#ifdef WEBKIT_IMPLEMENTATION
+ // The resulting WebCore::TextRun will refer to the text in this
+ // struct, so "this" must outlive the WebCore text run.
+ operator WebCore::TextRun() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 26d7269..1b94da2 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -253,6 +253,7 @@ public:
const WebNode&,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
+ const WebVector<int>& uniqueIDs,
int separatorIndex) = 0;
// Notifies the WebView that AutoFill suggestions are available for a node.
@@ -262,6 +263,7 @@ public:
const WebNode&,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
+ const WebVector<WebString>& icons,
const WebVector<int>& uniqueIDs,
int separatorIndex) = 0;
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 11fb233..4628c2f 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -55,6 +55,8 @@ class WebKeyboardEvent;
class WebNode;
class WebNotificationPresenter;
class WebRange;
+class WebSpeechInputController;
+class WebSpeechInputListener;
class WebStorageNamespace;
class WebURL;
class WebView;
@@ -331,7 +333,13 @@ public:
// Geolocation ---------------------------------------------------------
// Access the embedder API for geolocation services.
- virtual WebKit::WebGeolocationService* geolocationService() { return 0; }
+ virtual WebGeolocationService* geolocationService() { return 0; }
+
+ // Speech --------------------------------------------------------------
+
+ // Access the embedder API for speech input services.
+ virtual WebSpeechInputController* speechInputController(
+ WebSpeechInputListener*) { return 0; }
protected:
~WebViewClient() { }