diff options
Diffstat (limited to 'Source/WebKit/chromium/public')
28 files changed, 167 insertions, 661 deletions
diff --git a/Source/WebKit/chromium/public/WebFileChooserParams.h b/Source/WebKit/chromium/public/WebFileChooserParams.h index 31e37b55e..90dee7036 100644 --- a/Source/WebKit/chromium/public/WebFileChooserParams.h +++ b/Source/WebKit/chromium/public/WebFileChooserParams.h @@ -50,11 +50,14 @@ struct WebFileChooserParams { // |initialValue| is a filename which the dialog should select by default. // It can be an empty string. WebString initialValue; - // This contains MIME type strings such as "audio/*" "text/plain". - // The dialog may restrict selectable files to the specified MIME types. + // This contains MIME type strings such as "audio/*" "text/plain" or file + // extensions beginning with a period (.) such as ".mp3" ".txt". + // The dialog may restrict selectable files to files with the specified MIME + // types or file extensions. // This list comes from an 'accept' attribute value of an INPUT element, and - // it contains only lower-cased MIME type strings of which format is valid. - WebVector<WebString> acceptMIMETypes; + // it contains only lower-cased MIME type strings and file extensions. + WebVector<WebString> acceptTypes; + WebVector<WebString> acceptMIMETypes; // FIXME: Remove this once https://chromiumcodereview.appspot.com/10414085 lands. // |selectedFiles| has filenames which a file upload control already selected. // A WebViewClient implementation may ask a user to select // - removing a file from the selected files, diff --git a/Source/WebKit/chromium/public/WebFileInfo.h b/Source/WebKit/chromium/public/WebFileInfo.h index bf152fe75..a8c1bba70 100644 --- a/Source/WebKit/chromium/public/WebFileInfo.h +++ b/Source/WebKit/chromium/public/WebFileInfo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Google Inc. All rights reserved. + * Copyright (C) 2012 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 @@ -28,35 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebFileInfo_h -#define WebFileInfo_h - -#include "platform/WebString.h" - -namespace WebKit { - -struct WebFileInfo { - // The last modification time of the file, in seconds. - // The value 0.0 means that the time is not set. - double modificationTime; - - // The length of the file in bytes. - // The value -1 means that the length is not set. - long long length; - - enum Type { - TypeUnknown = 0, - TypeFile, - TypeDirectory - }; - - Type type; - - WebString platformPath; - - WebFileInfo() : modificationTime(0.0), length(-1), type(TypeUnknown) { } -}; - -} // namespace WebKit - -#endif +#include "../../../Platform/chromium/public/WebFileInfo.h" diff --git a/Source/WebKit/chromium/public/WebFrame.h b/Source/WebKit/chromium/public/WebFrame.h index 87659ee99..6f76ef9e8 100644 --- a/Source/WebKit/chromium/public/WebFrame.h +++ b/Source/WebKit/chromium/public/WebFrame.h @@ -455,23 +455,6 @@ public: // Printing ------------------------------------------------------------ - // Reformats the WebFrame for printing. printContentSize is the print - // content size in points (a point is 1/72 of an inch). If constrainToNode - // node is specified, then only the given node is printed (for now only - // plugins are supported), instead of the entire frame. printerDPI is the - // user selected, DPI for the printer. Returns the number of pages that can - // be printed at the given page size. The out param useBrowserOverlays - // specifies whether the browser process should use its overlays (header, - // footer, margins etc) or whether the renderer controls this. - // - // FIXME: This is a temporary interface to avoid the compile errors. Remove - // this interface after fixing crbug.com/85132. We will use the overloaded - // printBegin function. - virtual int printBegin(const WebSize& printContentSize, - const WebNode& constrainToNode = WebNode(), - int printerDPI = 72, - bool* useBrowserOverlays = 0) = 0; - // Reformats the WebFrame for printing. WebPrintParams specifies the printable // content size, paper size, printable area size, printer DPI and print // scaling option. If constrainToNode node is specified, then only the given node diff --git a/Source/WebKit/chromium/public/WebIDBDatabase.h b/Source/WebKit/chromium/public/WebIDBDatabase.h index f53b02e39..b39853416 100644 --- a/Source/WebKit/chromium/public/WebIDBDatabase.h +++ b/Source/WebKit/chromium/public/WebIDBDatabase.h @@ -28,7 +28,6 @@ #include "WebDOMStringList.h" #include "WebExceptionCode.h" -#include "WebIDBKeyPath.h" #include "platform/WebCommon.h" namespace WebKit { @@ -36,6 +35,7 @@ namespace WebKit { class WebFrame; class WebIDBCallbacks; class WebIDBDatabaseCallbacks; +class WebIDBKeyPath; class WebIDBObjectStore; class WebIDBTransaction; @@ -59,12 +59,6 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return WebDOMStringList(); } - // FIXME: Remove WebString keyPath overload once callers are updated. - // http://webkit.org/b/84207 - virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction& transaction, WebExceptionCode& ec) - { - return createObjectStore(name, WebIDBKeyPath(keyPath), autoIncrement, transaction, ec); - } virtual WebIDBObjectStore* createObjectStore(const WebString&, const WebIDBKeyPath&, bool, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); diff --git a/Source/WebKit/chromium/public/WebIDBIndex.h b/Source/WebKit/chromium/public/WebIDBIndex.h index 8c3df193e..b10080842 100644 --- a/Source/WebKit/chromium/public/WebIDBIndex.h +++ b/Source/WebKit/chromium/public/WebIDBIndex.h @@ -47,22 +47,10 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return WebString(); } - // FIXME: Remove method once callers are updated. - virtual WebString storeName() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); - } virtual WebIDBKeyPath keyPath() const { - return WebIDBKeyPath(keyPathString()); - } - // FIXME: Remove method once callers are updated. - // http://webkit.org/b/84207 - virtual WebString keyPathString() const - { WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); + return WebIDBKeyPath::createNull(); } virtual bool unique() const { diff --git a/Source/WebKit/chromium/public/WebIDBKeyPath.h b/Source/WebKit/chromium/public/WebIDBKeyPath.h index 97bac06ff..beb1fa22d 100644 --- a/Source/WebKit/chromium/public/WebIDBKeyPath.h +++ b/Source/WebKit/chromium/public/WebIDBKeyPath.h @@ -36,6 +36,8 @@ template<typename T, size_t inlineCapacity> class Vector; class String; } +namespace WebCore { class IDBKeyPath; } + namespace WebKit { class WebIDBKeyPath { @@ -44,7 +46,7 @@ public: WEBKIT_EXPORT static WebIDBKeyPath create(const WebVector<WebString>&); WEBKIT_EXPORT static WebIDBKeyPath createNull(); WEBKIT_EXPORT WebIDBKeyPath(const WebIDBKeyPath&); - ~WebIDBKeyPath() { reset(); } + WEBKIT_EXPORT ~WebIDBKeyPath(); enum Type { NullType = 0, @@ -54,30 +56,17 @@ public: WEBKIT_EXPORT bool isValid() const; WEBKIT_EXPORT Type type() const; - // FIXME: Array-type key paths not yet supported. http://webkit.org/b/84207 - WebVector<WebString> array() const { WEBKIT_ASSERT_NOT_REACHED(); return WebVector<WebString>(); } - WEBKIT_EXPORT WebString string() const; - - // FIXME: Remove these once callers are updated. http://webkit.org/b/84207 - WEBKIT_EXPORT WebIDBKeyPath(const WebString&); - operator const WebString () const { return string(); } - WEBKIT_EXPORT int parseError() const; - WEBKIT_EXPORT void assign(const WebIDBKeyPath&); - WEBKIT_EXPORT void reset(); + WEBKIT_EXPORT WebVector<WebString> array() const; // Only valid for ArrayType. + WEBKIT_EXPORT WebString string() const; // Only valid for StringType. #if WEBKIT_IMPLEMENTATION - operator const WTF::Vector<WTF::String, 0>& () const; + WebIDBKeyPath(const WebCore::IDBKeyPath&); + WebIDBKeyPath& operator=(const WebCore::IDBKeyPath&); + operator const WebCore::IDBKeyPath&() const; #endif private: - WebIDBKeyPath(); - -#if WEBKIT_IMPLEMENTATION - WebIDBKeyPath(const WTF::Vector<WTF::String, 0>&, int parseError); -#endif - - WebPrivateOwnPtr<WTF::Vector<WTF::String, 0> > m_private; - int m_parseError; + WebPrivateOwnPtr<WebCore::IDBKeyPath> m_private; }; } // namespace WebKit diff --git a/Source/WebKit/chromium/public/WebIDBObjectStore.h b/Source/WebKit/chromium/public/WebIDBObjectStore.h index 4008e1d2e..0af426e50 100644 --- a/Source/WebKit/chromium/public/WebIDBObjectStore.h +++ b/Source/WebKit/chromium/public/WebIDBObjectStore.h @@ -30,7 +30,6 @@ #include "WebDOMStringList.h" #include "WebIDBCallbacks.h" #include "WebIDBKeyPath.h" -#include "WebIDBTransaction.h" #include "platform/WebCommon.h" #include "platform/WebString.h" @@ -51,12 +50,8 @@ public: } virtual WebIDBKeyPath keyPath() const { - return WebIDBKeyPath(keyPathString()); - } - virtual WebString keyPathString() const - { WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); + return WebIDBKeyPath::createNull(); } virtual WebDOMStringList indexNames() const { @@ -81,13 +76,6 @@ public: virtual void deleteFunction(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void deleteFunction(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void clear(WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - - // FIXME: Remove WebString keyPath overload once callers are updated. - // http://webkit.org/b/84207 - virtual WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, bool multiEntry, const WebIDBTransaction& transaction, WebExceptionCode& ec) - { - return createIndex(name, WebIDBKeyPath(keyPath), unique, multiEntry, transaction, ec); - } virtual WebIDBIndex* createIndex(const WebString&, const WebIDBKeyPath&, bool, bool, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); diff --git a/Source/WebKit/chromium/public/WebIntent.h b/Source/WebKit/chromium/public/WebIntent.h index aefc3ebb3..cfaddc38d 100644 --- a/Source/WebKit/chromium/public/WebIntent.h +++ b/Source/WebKit/chromium/public/WebIntent.h @@ -66,6 +66,7 @@ public: WEBKIT_EXPORT WebString type() const; WEBKIT_EXPORT WebString data() const; WEBKIT_EXPORT WebURL service() const; + WEBKIT_EXPORT WebVector<WebURL> suggestions() const; // Retrieve a list of the names of extra metadata associated with the // intent. diff --git a/Source/WebKit/chromium/public/WebMediaPlayer.h b/Source/WebKit/chromium/public/WebMediaPlayer.h index 670630f95..3312f5f21 100644 --- a/Source/WebKit/chromium/public/WebMediaPlayer.h +++ b/Source/WebKit/chromium/public/WebMediaPlayer.h @@ -173,9 +173,12 @@ public: virtual WebAudioSourceProvider* audioSourceProvider() { return 0; } - virtual AddIdStatus sourceAddId(const WebString& id, const WebString& type) { return AddIdStatusNotSupported; } + virtual AddIdStatus sourceAddId(const WebString& id, const WebString& type, + const WebVector<WebString>& codecs) { return AddIdStatusNotSupported; } virtual bool sourceRemoveId(const WebString& id) { return false; } - virtual bool sourceAppend(const unsigned char* data, unsigned length) { return false; } + virtual WebTimeRanges sourceBuffered(const WebString& id) { return WebTimeRanges(); }; + virtual bool sourceAppend(const WebString& id, const unsigned char* data, unsigned length) { return false; } + virtual bool sourceAbort(const WebString& id) { return false; } virtual void sourceEndOfStream(EndOfStreamStatus) { } // Returns whether keySystem is supported. If true, the result will be diff --git a/Source/WebKit/chromium/public/WebMenuItemInfo.h b/Source/WebKit/chromium/public/WebMenuItemInfo.h index ae284e7b3..d90049d22 100644 --- a/Source/WebKit/chromium/public/WebMenuItemInfo.h +++ b/Source/WebKit/chromium/public/WebMenuItemInfo.h @@ -44,6 +44,7 @@ struct WebMenuItemInfo { CheckableOption, Group, Separator, + SubMenu }; WebMenuItemInfo() @@ -61,6 +62,7 @@ struct WebMenuItemInfo { Type type; unsigned action; WebTextDirection textDirection; + WebVector<WebMenuItemInfo> subMenuItems; bool hasTextDirectionOverride; bool enabled; bool checked; diff --git a/Source/WebKit/chromium/public/WebPermissionClient.h b/Source/WebKit/chromium/public/WebPermissionClient.h index bc251825c..116a383ca 100644 --- a/Source/WebKit/chromium/public/WebPermissionClient.h +++ b/Source/WebKit/chromium/public/WebPermissionClient.h @@ -89,6 +89,9 @@ public: // Controls whether access to write the clipboard is allowed for this frame. virtual bool allowWriteToClipboard(WebFrame*, bool defaultValue) { return defaultValue; } + // Controls whether enabling Web Components API for this frame. + virtual bool allowWebComponents(WebFrame*, bool defaultValue) { return defaultValue; } + // Notifies the client that the frame would have instantiated a plug-in if plug-ins were enabled. virtual void didNotAllowPlugins(WebFrame*) { } diff --git a/Source/WebKit/chromium/public/WebPlugin.h b/Source/WebKit/chromium/public/WebPlugin.h index 717f6a7e1..5b911d0b8 100644 --- a/Source/WebKit/chromium/public/WebPlugin.h +++ b/Source/WebKit/chromium/public/WebPlugin.h @@ -98,12 +98,6 @@ public: // the printer's printable area. virtual bool isPrintScalingDisabled() { return false; } - // Sets up printing at the given print rect and printer DPI. - // printContentArea is in points ( a point is 1/72 of an inch). Returns the - // number of pages to be printed at these settings. - // FIXME: Remove this function after fixing crbug.com/85132. For detailed - // information, please refer to the comments in WebFrame.h - virtual int printBegin(const WebRect& printContentArea, int printerDPI) { return 0; } // Sets up printing with the specified printParams. Returns the number of // pages to be printed at these settings. virtual int printBegin(const WebPrintParams& printParams) { return 0; } diff --git a/Source/WebKit/chromium/public/WebPrintParams.h b/Source/WebKit/chromium/public/WebPrintParams.h index d2d25bdad..bd117c313 100644 --- a/Source/WebKit/chromium/public/WebPrintParams.h +++ b/Source/WebKit/chromium/public/WebPrintParams.h @@ -59,6 +59,13 @@ struct WebPrintParams { : printerDPI(72) , printScalingOption(WebPrintScalingOptionFitToPrintableArea) { } + WebPrintParams(const WebSize& paperSize) + : printContentArea(WebRect(0, 0, paperSize.width, paperSize.height)) + , printableArea(WebRect(0, 0, paperSize.width, paperSize.height)) + , paperSize(paperSize) + , printerDPI(72) + , printScalingOption(WebPrintScalingOptionSourceSize) { } + WebPrintParams(const WebRect& printContentArea, const WebRect& printableArea, const WebSize& paperSize, int printerDPI, WebPrintScalingOption printScalingOption) : printContentArea(printContentArea) , printableArea(printableArea) diff --git a/Source/WebKit/chromium/public/WebSettings.h b/Source/WebKit/chromium/public/WebSettings.h index 7e11141ea..3089b0bdc 100644 --- a/Source/WebKit/chromium/public/WebSettings.h +++ b/Source/WebKit/chromium/public/WebSettings.h @@ -65,6 +65,7 @@ public: virtual void setMinimumLogicalFontSize(int) = 0; virtual void setDefaultDeviceScaleFactor(int) = 0; virtual void setApplyDefaultDeviceScaleFactorInCompositor(bool) = 0; + virtual void setFontBoostingEnabled(bool) = 0; virtual void setDefaultTextEncodingName(const WebString&) = 0; virtual void setJavaScriptEnabled(bool) = 0; virtual void setWebSecurityEnabled(bool) = 0; @@ -100,6 +101,7 @@ public: virtual void setWebAudioEnabled(bool) = 0; virtual void setExperimentalWebGLEnabled(bool) = 0; virtual void setExperimentalCSSRegionsEnabled(bool) = 0; + virtual void setExperimentalCSSGridLayoutEnabled(bool) = 0; virtual void setExperimentalCSSCustomFilterEnabled(bool) = 0; virtual void setOpenGLMultisamplingEnabled(bool) = 0; virtual void setPrivilegedWebGLExtensionsEnabled(bool) = 0; @@ -146,9 +148,11 @@ public: virtual void setPartialSwapEnabled(bool) = 0; virtual void setThreadedAnimationEnabled(bool) = 0; virtual void setViewportEnabled(bool) = 0; + virtual void setMediaPlaybackRequiresUserGesture(bool) = 0; virtual bool viewportEnabled() const = 0; virtual void setDefaultTileSize(WebSize) = 0; virtual void setMaxUntiledLayerSize(WebSize) = 0; + virtual void setFixedPositionCreatesStackingContext(bool) = 0; protected: diff --git a/Source/WebKit/chromium/public/WebStorageArea.h b/Source/WebKit/chromium/public/WebStorageArea.h index cb5ee8d36..89c5cfe7e 100644 --- a/Source/WebKit/chromium/public/WebStorageArea.h +++ b/Source/WebKit/chromium/public/WebStorageArea.h @@ -38,9 +38,6 @@ namespace WebKit { class WebURL; -// In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This -// class wraps a StorageArea. All the methods have obvious connections to the spec: -// http://dev.w3.org/html5/webstorage/ class WebStorageArea { public: virtual ~WebStorageArea() { } @@ -63,16 +60,34 @@ public: virtual WebString getItem(const WebString& key) = 0; // Set the value that corresponds to a specific key. Result will either be ResultOK - // or some particular error. The value is NOT set when there's an error. url is the + // or some particular error. The value is NOT set when there's an error. |pageUrl| is the // url that should be used if a storage event fires. - virtual void setItem(const WebString& key, const WebString& newValue, const WebURL&, Result&, WebString& oldValue) = 0; + virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& pageUrl, Result& result) + { + WebString unused; + setItem(key, newValue, pageUrl, result, unused); + } - // Remove the value associated with a particular key. url is the url that should be used + + // Remove the value associated with a particular key. |pageUrl| is the url that should be used // if a storage event fires. - virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue) = 0; + virtual void removeItem(const WebString& key, const WebURL& pageUrl) + { + WebString unused; + removeItem(key, pageUrl, unused); + } + + // Clear all key/value pairs. |pageUrl| is the url that should be used if a storage event fires. + virtual void clear(const WebURL& pageUrl) + { + bool unused; + clear(pageUrl, unused); + } - // Clear all key/value pairs. url is the url that should be used if a storage event fires. - virtual void clear(const WebURL& url, bool& somethingCleared) = 0; + // DEPRECATED - being replaced by the async variants above which do not return oldValues or block until completion. + virtual void setItem(const WebString& key, const WebString& newValue, const WebURL&, Result&, WebString& oldValue) { } + virtual void removeItem(const WebString& key, const WebURL& pageUrl, WebString& oldValue) { } + virtual void clear(const WebURL& pageUrl, bool& somethingCleared) { } }; } // namespace WebKit diff --git a/Source/WebKit/chromium/public/WebStorageEventDispatcher.h b/Source/WebKit/chromium/public/WebStorageEventDispatcher.h index 4fbc596b2..b321bf0e9 100644 --- a/Source/WebKit/chromium/public/WebStorageEventDispatcher.h +++ b/Source/WebKit/chromium/public/WebStorageEventDispatcher.h @@ -55,13 +55,8 @@ public: const WebURL& pageUrl, const WebStorageNamespace&, WebStorageArea* sourceAreaInstance, bool originatedInProcess); - // DEPRECATED - The instance methods are going away soon in favor - // of the two static dispatch methods above. - WEBKIT_EXPORT static WebStorageEventDispatcher* create(); - virtual ~WebStorageEventDispatcher() { } - virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue, - const WebString& newValue, const WebString& origin, - const WebURL& url, bool isLocalStorage) = 0; + private: + WebStorageEventDispatcher() { } }; } // namespace WebKit diff --git a/Source/WebKit/chromium/public/WebStorageNamespace.h b/Source/WebKit/chromium/public/WebStorageNamespace.h index 894330717..dd4a8fd44 100644 --- a/Source/WebKit/chromium/public/WebStorageNamespace.h +++ b/Source/WebKit/chromium/public/WebStorageNamespace.h @@ -55,9 +55,6 @@ public: // Returns true of the two instances represent the same storage namespace. virtual bool isSameNamespace(const WebStorageNamespace&) const { return false; } - - // DEPRECATED - virtual void close() { } }; } // namespace WebKit diff --git a/Source/WebKit/chromium/public/WebTextInputInfo.h b/Source/WebKit/chromium/public/WebTextInputInfo.h new file mode 100644 index 000000000..30edbb3f9 --- /dev/null +++ b/Source/WebKit/chromium/public/WebTextInputInfo.h @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2011 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: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 WebTextInputInfo_h +#define WebTextInputInfo_h + +#include "WebTextInputType.h" +#include "platform/WebString.h" + +namespace WebKit { + +struct WebTextInputInfo { + WebTextInputType type; + + // The value of the currently focused input field. + WebString value; + + // The cursor position of the current selection start, or the caret position + // if nothing is selected. + int selectionStart; + + // The cursor position of the current selection end, or the caret position + // if nothing is selected. + int selectionEnd; + + // The start position of the current composition, or -1 if there is none. + int compositionStart; + + // The end position of the current composition, or -1 if there is none. + int compositionEnd; + + WEBKIT_EXPORT bool equals(const WebTextInputInfo&) const; + + WebTextInputInfo() + : type(WebTextInputTypeNone) + , selectionStart(0) + , selectionEnd(0) + , compositionStart(-1) + , compositionEnd(-1) + { + } +}; + +inline bool operator==(const WebTextInputInfo& a, const WebTextInputInfo& b) +{ + return a.equals(b); +} + +inline bool operator!=(const WebTextInputInfo& a, const WebTextInputInfo& b) +{ + return !(a == b); +} + +} // namespace WebKit + +#endif diff --git a/Source/WebKit/chromium/public/WebViewClient.h b/Source/WebKit/chromium/public/WebViewClient.h index 21dc250a9..9a8ad05b2 100644 --- a/Source/WebKit/chromium/public/WebViewClient.h +++ b/Source/WebKit/chromium/public/WebViewClient.h @@ -250,10 +250,7 @@ public: virtual void showContextMenu(WebFrame*, const WebContextMenuData&) { } // Called when a drag-n-drop operation should begin. - virtual void startDragging(WebFrame*, const WebDragData& dragData, WebDragOperationsMask mask, const WebImage& dragImage, const WebPoint& dragImageOffset) { startDragging(dragData, mask, dragImage, dragImageOffset); } - // FIXME: Remove once the chromium side has landed. - virtual void startDragging( - const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint&) { } + virtual void startDragging(WebFrame*, const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint& dragImageOffset) { } // Called to determine if drag-n-drop operations may initiate a page // navigation. diff --git a/Source/WebKit/chromium/public/WebWidget.h b/Source/WebKit/chromium/public/WebWidget.h index c756eb2a6..08b2cd05a 100644 --- a/Source/WebKit/chromium/public/WebWidget.h +++ b/Source/WebKit/chromium/public/WebWidget.h @@ -32,8 +32,8 @@ #define WebWidget_h #include "WebCompositionUnderline.h" -#include "WebTextInputType.h" #include "WebTextDirection.h" +#include "WebTextInputInfo.h" #include "platform/WebCanvas.h" #include "platform/WebCommon.h" #include "platform/WebRect.h" @@ -170,8 +170,12 @@ public: // returns false on failure. virtual bool compositionRange(size_t* location, size_t* length) { return false; } + // Returns information about the current text input of this WebWidget. + virtual WebTextInputInfo textInputInfo() { return WebTextInputInfo(); } + // Returns the current text input type of this WebWidget. - virtual WebTextInputType textInputType() { return WebKit::WebTextInputTypeNone; } + // FIXME: Remove this method. It's redundant with textInputInfo(). + virtual WebTextInputType textInputType() { return WebTextInputTypeNone; } // Returns the start and end bounds of the current selection. // If the selection range is empty, it returns the caret bounds. diff --git a/Source/WebKit/chromium/public/platform/WebCookie.h b/Source/WebKit/chromium/public/platform/WebCookie.h index 318b0e3e3..200f8eeaa 100644 --- a/Source/WebKit/chromium/public/platform/WebCookie.h +++ b/Source/WebKit/chromium/public/platform/WebCookie.h @@ -28,48 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebCookie_h -#define WebCookie_h - -#include "WebCommon.h" -#include "WebString.h" - -namespace WebKit { - -// A cookie. -// -struct WebCookie { - WebCookie() - : expires(0) - , httpOnly(false) - , secure(false) - , session(false) - { - } - - WebCookie(const WebString& name, const WebString& value, const WebString& domain, - const WebString& path, double expires, bool httpOnly, bool secure, bool session) - : name(name) - , value(value) - , domain(domain) - , path(path) - , expires(expires) - , httpOnly(httpOnly) - , secure(secure) - , session(session) - { - } - - WebString name; - WebString value; - WebString domain; - WebString path; - double expires; - bool httpOnly; - bool secure; - bool session; -}; - -} // namespace WebKit - -#endif +#include "../../../../Platform/chromium/public/WebCookie.h" diff --git a/Source/WebKit/chromium/public/platform/WebCookieJar.h b/Source/WebKit/chromium/public/platform/WebCookieJar.h index 6daba6bc4..b396e2f88 100644 --- a/Source/WebKit/chromium/public/platform/WebCookieJar.h +++ b/Source/WebKit/chromium/public/platform/WebCookieJar.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Google Inc. All rights reserved. + * 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 @@ -28,29 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebCookieJar_h -#define WebCookieJar_h - -#include "WebString.h" - -namespace WebKit { -class WebURL; -struct WebCookie; -template <typename T> class WebVector; - -class WebCookieJar { -public: - virtual void setCookie(const WebURL&, const WebURL& firstPartyForCookies, const WebString& cookie) { } - virtual WebString cookies(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); } - virtual WebString cookieRequestHeaderFieldValue(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); } - virtual void rawCookies(const WebURL&, const WebURL& firstPartyForCookies, WebVector<WebCookie>&) { } - virtual void deleteCookie(const WebURL&, const WebString& cookieName) { } - virtual bool cookiesEnabled(const WebURL&, const WebURL& firstPartyForCookies) { return true; } - -protected: - ~WebCookieJar() { } -}; - -} // namespace WebKit - -#endif +#include "../../../../Platform/chromium/public/WebCookieJar.h" diff --git a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h index 43282315f..3e916d373 100644 --- a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h +++ b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h @@ -31,10 +31,8 @@ #ifndef WebKitPlatformSupport_h #define WebKitPlatformSupport_h -#include "../WebIDBKeyPath.h" // FIXME: Remove with: http://webkit.org/b/84207 #include "WebCommon.h" #include "WebGraphicsContext3D.h" -#include "WebLocalizedString.h" #include "WebSerializedScriptValue.h" #include "WebString.h" #include "WebURL.h" @@ -50,15 +48,14 @@ namespace WebKit { class WebApplicationCacheHost; // FIXME: Does this belong in platform? class WebApplicationCacheHostClient; // FIXME: Does this belong in platform? -class WebCookieJar; class WebIDBFactory; // FIXME: Does this belong in platform? class WebIDBKey; // FIXME: Does this belong in platform? +class WebIDBKeyPath; // FIXME: Does this belong in platform? class WebMessagePortChannel; // FIXME: Does this belong in platform? class WebPluginListBuilder; // FIXME: Does this belong in platform? class WebSandboxSupport; class WebSharedWorkerRepository; // FIXME: Does this belong in platform? class WebStorageNamespace; // FIXME: Does this belong in platform? -class WebThemeEngine; // FIXME: Eventually all these API will need to move to WebKit::Platform. class WebKitPlatformSupport : public Platform { @@ -66,22 +63,11 @@ public: // May return null if sandbox support is not necessary virtual WebSandboxSupport* sandboxSupport() { return 0; } - // May return null on some platforms. - virtual WebThemeEngine* themeEngine() { return 0; } - - // May return null. - virtual WebCookieJar* cookieJar() { return 0; } - // DOM Storage -------------------------------------------------- // Return a LocalStorage namespace that corresponds to the following path. virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; } - // DEPRECATED - virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue, - const WebString& newValue, const WebString& origin, - const WebURL& url, bool isLocalStorage) { } - // HTML5 Database ------------------------------------------------------ @@ -111,13 +97,7 @@ public: // Indexed Database ---------------------------------------------------- virtual WebIDBFactory* idbFactory() { return 0; } - // FIXME: Remove WebString keyPath overload once callers are updated. - // http://webkit.org/b/84207 - virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebString& keyPath, WebVector<WebIDBKey>& keys) { createIDBKeysFromSerializedValuesAndKeyPath(values, WebIDBKeyPath(keyPath), keys); } virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebIDBKeyPath& keyPath, WebVector<WebIDBKey>& keys) { } - // FIXME: Remove WebString keyPath overload once callers are updated. - // http://webkit.org/b/84207 - virtual WebSerializedScriptValue injectIDBKeyIntoSerializedValue(const WebIDBKey& key, const WebSerializedScriptValue& value, const WebString& keyPath) { return injectIDBKeyIntoSerializedValue(key, value, WebIDBKeyPath(keyPath)); } virtual WebSerializedScriptValue injectIDBKeyIntoSerializedValue(const WebIDBKey& key, const WebSerializedScriptValue& value, const WebIDBKeyPath& keyPath) { return WebSerializedScriptValue(); } @@ -135,27 +115,14 @@ public: virtual void getPluginList(bool refresh, WebPluginListBuilder*) { } - // Resources ----------------------------------------------------------- - - // Returns a localized string resource (with substitution parameters). - virtual WebString queryLocalizedString(WebLocalizedString::Name) { return WebString(); } - virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter) { return WebString(); } - virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter1, const WebString& parameter2) { return WebString(); } - - // Shared Workers ------------------------------------------------------ virtual WebSharedWorkerRepository* sharedWorkerRepository() { return 0; } - // GPU ---------------------------------------------------------------- - - // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas. - // This will return false if the platform cannot promise that contexts will be preserved across operations like - // locking the screen or if the platform cannot provide a context with suitable performance characteristics. - // - // This value must be checked again after a context loss event as the platform's capabilities may have changed. - virtual bool canAccelerate2dCanvas() { return false; } - + // Returns private and shared usage, in bytes. Private bytes is the amount of + // memory currently allocated to this process that cannot be shared. Returns + // false on platform specific error conditions. + virtual bool getProcessMemorySize(size_t* privateBytes, size_t* sharedBytes) { return false; } protected: ~WebKitPlatformSupport() { } diff --git a/Source/WebKit/chromium/public/platform/WebLocalizedString.h b/Source/WebKit/chromium/public/platform/WebLocalizedString.h index 5e7748ec6..81ac52186 100644 --- a/Source/WebKit/chromium/public/platform/WebLocalizedString.h +++ b/Source/WebKit/chromium/public/platform/WebLocalizedString.h @@ -28,62 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebLocalizedString_h -#define WebLocalizedString_h - -namespace WebKit { - -struct WebLocalizedString { - enum Name { - AXButtonActionVerb, - AXCheckedCheckBoxActionVerb, - AXHeadingText, - AXImageMapText, - AXLinkActionVerb, - AXLinkText, - AXListMarkerText, - AXRadioButtonActionVerb, - AXTextFieldActionVerb, - AXUncheckedCheckBoxActionVerb, - AXWebAreaText, - CalendarClear, - CalendarToday, - DateFormatDayInMonthLabel, - DateFormatMonthLabel, - DateFormatYearLabel, - DetailsLabel, - FileButtonChooseFileLabel, - FileButtonChooseMultipleFilesLabel, - FileButtonNoFileSelectedLabel, - InputElementAltText, - KeygenMenuHighGradeKeySize, - KeygenMenuMediumGradeKeySize, - MissingPluginText, - MultipleFileUploadText, - ResetButtonDefaultLabel, - SearchableIndexIntroduction, - SearchMenuClearRecentSearchesText, - SearchMenuNoRecentSearchesText, - SearchMenuRecentSearchesText, - SubmitButtonDefaultLabel, - ValidationPatternMismatch, - ValidationRangeOverflow, - ValidationRangeUnderflow, - ValidationStepMismatch, - ValidationTooLong, - ValidationTypeMismatch, - ValidationTypeMismatchForEmail, - ValidationTypeMismatchForMultipleEmail, - ValidationTypeMismatchForURL, - ValidationValueMissing, - ValidationValueMissingForCheckbox, - ValidationValueMissingForFile, - ValidationValueMissingForMultipleFile, - ValidationValueMissingForRadio, - ValidationValueMissingForSelect, - }; -}; - -} // namespace WebKit - -#endif +#include "../../../../Platform/chromium/public/WebLocalizedString.h" diff --git a/Source/WebKit/chromium/public/platform/android/WebThemeEngine.h b/Source/WebKit/chromium/public/platform/android/WebThemeEngine.h index 35dd82e8d..1d6a185f3 100644 --- a/Source/WebKit/chromium/public/platform/android/WebThemeEngine.h +++ b/Source/WebKit/chromium/public/platform/android/WebThemeEngine.h @@ -28,125 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebThemeEngine_h -#define WebThemeEngine_h - -#include "../WebCanvas.h" -#include "../WebColor.h" -#include "../WebSize.h" - -namespace WebKit { - -struct WebRect; - -class WebThemeEngine { -public: - // The UI part which is being accessed. - enum Part { - // ScrollbarTheme parts - PartScrollbarDownArrow, - PartScrollbarLeftArrow, - PartScrollbarRightArrow, - PartScrollbarUpArrow, - PartScrollbarHorizontalThumb, - PartScrollbarVerticalThumb, - PartScrollbarHorizontalTrack, - PartScrollbarVerticalTrack, - - // RenderTheme parts - PartCheckbox, - PartRadio, - PartButton, - PartTextField, - PartMenuList, - PartSliderTrack, - PartSliderThumb, - PartInnerSpinButton, - PartProgressBar - }; - - // The current state of the associated Part. - enum State { - StateDisabled, - StateHover, - StateNormal, - StatePressed, - }; - - // Extra parameters for drawing the PartScrollbarHorizontalTrack and - // PartScrollbarVerticalTrack. - struct ScrollbarTrackExtraParams { - // The bounds of the entire track, as opposed to the part being painted. - int trackX; - int trackY; - int trackWidth; - int trackHeight; - }; - - // Extra parameters for PartCheckbox, PartPushButton and PartRadio. - struct ButtonExtraParams { - bool checked; - bool indeterminate; // Whether the button state is indeterminate. - bool isDefault; // Whether the button is default button. - bool hasBorder; - WebColor backgroundColor; - }; - - // Extra parameters for PartTextField - struct TextFieldExtraParams { - bool isTextArea; - bool isListbox; - WebColor backgroundColor; - }; - - // Extra parameters for PartMenuList - struct MenuListExtraParams { - bool hasBorder; - bool hasBorderRadius; - int arrowX; - int arrowY; - WebColor backgroundColor; - }; - - // Extra parameters for PartSliderTrack and PartSliderThumb - struct SliderExtraParams { - bool vertical; - bool inDrag; - }; - - // Extra parameters for PartInnerSpinButton - struct InnerSpinButtonExtraParams { - bool spinUp; - bool readOnly; - }; - - // Extra parameters for PartProgressBar - struct ProgressBarExtraParams { - bool determinate; - int valueRectX; - int valueRectY; - int valueRectWidth; - int valueRectHeight; - }; - - union ExtraParams { - ScrollbarTrackExtraParams scrollbarTrack; - ButtonExtraParams button; - TextFieldExtraParams textField; - MenuListExtraParams menuList; - SliderExtraParams slider; - InnerSpinButtonExtraParams innerSpin; - ProgressBarExtraParams progressBar; - }; - - // Gets the size of the given theme part. For variable sized items - // like vertical scrollbar thumbs, the width will be the required width of - // the track while the height will be the minimum height. - virtual WebSize getSize(Part) { return WebSize(); } - // Paint the given the given theme part. - virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParams*) { } -}; - -} // namespace WebKit - -#endif +#include "../../../../../Platform/chromium/public/android/WebThemeEngine.h" diff --git a/Source/WebKit/chromium/public/platform/linux/WebThemeEngine.h b/Source/WebKit/chromium/public/platform/linux/WebThemeEngine.h index f84f292d7..d77ae5ceb 100644 --- a/Source/WebKit/chromium/public/platform/linux/WebThemeEngine.h +++ b/Source/WebKit/chromium/public/platform/linux/WebThemeEngine.h @@ -28,125 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebThemeEngine_h -#define WebThemeEngine_h - -#include "../WebCanvas.h" -#include "../WebColor.h" -#include "../WebSize.h" - -namespace WebKit { - -struct WebRect; - -class WebThemeEngine { -public: - // The UI part which is being accessed. - enum Part { - // ScrollbarTheme parts - PartScrollbarDownArrow, - PartScrollbarLeftArrow, - PartScrollbarRightArrow, - PartScrollbarUpArrow, - PartScrollbarHorizontalThumb, - PartScrollbarVerticalThumb, - PartScrollbarHorizontalTrack, - PartScrollbarVerticalTrack, - - // RenderTheme parts - PartCheckbox, - PartRadio, - PartButton, - PartTextField, - PartMenuList, - PartSliderTrack, - PartSliderThumb, - PartInnerSpinButton, - PartProgressBar - }; - - // The current state of the associated Part. - enum State { - StateDisabled, - StateHover, - StateNormal, - StatePressed, - }; - - // Extra parameters for drawing the PartScrollbarHorizontalTrack and - // PartScrollbarVerticalTrack. - struct ScrollbarTrackExtraParams { - // The bounds of the entire track, as opposed to the part being painted. - int trackX; - int trackY; - int trackWidth; - int trackHeight; - }; - - // Extra parameters for PartCheckbox, PartPushButton and PartRadio. - struct ButtonExtraParams { - bool checked; - bool indeterminate; // Whether the button state is indeterminate. - bool isDefault; // Whether the button is default button. - bool hasBorder; - WebColor backgroundColor; - }; - - // Extra parameters for PartTextField - struct TextFieldExtraParams { - bool isTextArea; - bool isListbox; - WebColor backgroundColor; - }; - - // Extra parameters for PartMenuList - struct MenuListExtraParams { - bool hasBorder; - bool hasBorderRadius; - int arrowX; - int arrowY; - WebColor backgroundColor; - }; - - // Extra parameters for PartSliderTrack and PartSliderThumb - struct SliderExtraParams { - bool vertical; - bool inDrag; - }; - - // Extra parameters for PartInnerSpinButton - struct InnerSpinButtonExtraParams { - bool spinUp; - bool readOnly; - }; - - // Extra parameters for PartProgressBar - struct ProgressBarExtraParams { - bool determinate; - int valueRectX; - int valueRectY; - int valueRectWidth; - int valueRectHeight; - }; - - union ExtraParams { - ScrollbarTrackExtraParams scrollbarTrack; - ButtonExtraParams button; - TextFieldExtraParams textField; - MenuListExtraParams menuList; - SliderExtraParams slider; - InnerSpinButtonExtraParams innerSpin; - ProgressBarExtraParams progressBar; - }; - - // Gets the size of the given theme part. For variable sized items - // like vertical scrollbar thumbs, the width will be the required width of - // the track while the height will be the minimum height. - virtual WebSize getSize(Part) { return WebSize(); } - // Paint the given the given theme part. - virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParams*) { } -}; - -} // namespace WebKit - -#endif +#include "../../../../../Platform/chromium/public/linux/WebThemeEngine.h" diff --git a/Source/WebKit/chromium/public/platform/mac/WebThemeEngine.h b/Source/WebKit/chromium/public/platform/mac/WebThemeEngine.h index c7857022f..2c32ed676 100644 --- a/Source/WebKit/chromium/public/platform/mac/WebThemeEngine.h +++ b/Source/WebKit/chromium/public/platform/mac/WebThemeEngine.h @@ -28,51 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebThemeEngine_h -#define WebThemeEngine_h - -#include "../WebCanvas.h" - -namespace WebKit { - -struct WebRect; - -class WebThemeEngine { -public: - enum State { - StateDisabled, - StateInactive, - StateActive, - StatePressed, - }; - - enum Size { - SizeRegular, - SizeSmall, - }; - - enum ScrollbarOrientation { - ScrollbarOrientationHorizontal, - ScrollbarOrientationVertical, - }; - - enum ScrollbarParent { - ScrollbarParentScrollView, - ScrollbarParentRenderLayer, - }; - - struct ScrollbarInfo { - ScrollbarOrientation orientation; - ScrollbarParent parent; - int maxValue; - int currentValue; - int visibleSize; - int totalSize; - }; - - virtual void paintScrollbarThumb(WebCanvas*, State, Size, const WebRect&, const ScrollbarInfo&) { } -}; - -} // namespace WebKit - -#endif +#include "../../../../../Platform/chromium/public/mac/WebThemeEngine.h" diff --git a/Source/WebKit/chromium/public/platform/win/WebThemeEngine.h b/Source/WebKit/chromium/public/platform/win/WebThemeEngine.h index 1890db6ea..1d14b2ab5 100644 --- a/Source/WebKit/chromium/public/platform/win/WebThemeEngine.h +++ b/Source/WebKit/chromium/public/platform/win/WebThemeEngine.h @@ -28,63 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebThemeEngine_h -#define WebThemeEngine_h - -#include "../WebCanvas.h" -#include "../WebColor.h" -#include "../WebSize.h" - -namespace WebKit { - -struct WebRect; -struct WebSize; - -class WebThemeEngine { -public: -// The part and state parameters correspond to values defined by the -// Windows Theme API (see -// http://msdn.microsoft.com/en-us/library/bb773187(VS.85).aspx ). -// The classicState parameter corresponds to the uState -// parameter of the Windows DrawFrameControl() function. -// See the definitions in <vsstyle.h> and <winuser.h>. - virtual void paintButton( - WebCanvas*, int part, int state, int classicState, - const WebRect&) = 0; - - virtual void paintMenuList( - WebCanvas*, int part, int state, int classicState, - const WebRect&) = 0; - - virtual void paintScrollbarArrow( - WebCanvas*, int state, int classicState, - const WebRect&) = 0; - - virtual void paintScrollbarThumb( - WebCanvas*, int part, int state, int classicState, - const WebRect&) = 0; - - virtual void paintScrollbarTrack( - WebCanvas*, int part, int state, int classicState, - const WebRect&, const WebRect& alignRect) = 0; - - virtual void paintSpinButton( - WebCanvas*, int part, int state, int classicState, - const WebRect&) {} - - virtual void paintTextField( - WebCanvas*, int part, int state, int classicState, - const WebRect&, WebColor, bool fillContentArea, bool drawEdges) = 0; - - virtual void paintTrackbar( - WebCanvas*, int part, int state, int classicState, - const WebRect&) = 0; - - virtual void paintProgressBar( - WebCanvas*, const WebRect& barRect, const WebRect& valueRect, - bool determinate, double animatedSeconds) {} -}; - -} // namespace WebKit - -#endif +#include "../../../../../Platform/chromium/public/win/WebThemeEngine.h" |
