TARGET_LINK_LIBRARIES(${this_target} "-losp-media" )
TARGET_LINK_LIBRARIES(${this_target} "-losp-net" )
TARGET_LINK_LIBRARIES(${this_target} "-lecore" )
+TARGET_LINK_LIBRARIES(${this_target} "-lecore_x" )
TARGET_LINK_LIBRARIES(${this_target} "-lecore_imf" )
TARGET_LINK_LIBRARIES(${this_target} "-lecore_imf_evas" )
TARGET_LINK_LIBRARIES(${this_target} "-lelementary" )
* @final This class is not intended for extension.
*
* The %BookmarkItem class provides access to the WebBookmark class.
-* Each item contains the title, the URL of the page, the item type, and the parent folder ID.
+* Each item contains the title, the URL of a page, the item type, and the parent folder ID.
*/
class _OSP_EXPORT_ BookmarkItem
: public Tizen::Base::Object
*
* @since 2.1
*
- * @param[in] rhs An instance of %BookmarkItem
+ * @param[in] rhs An instance of %BookmarkItem to copy
*/
BookmarkItem(const BookmarkItem& rhs);
* @since 2.1
*
* @return The URL of the current bookmark item @n
- * If the item type is folder, this method will return an empty string.
+ * If the item type is folder, this method returns an empty string.
* @see IsFolder()
*/
Tizen::Base::String GetUrl(void) const;
*
* @return The image
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM Either of the following conditions has occurred: @n
- * - The method cannot proceed due to a severe system error. @n
- * - The method has failed because it does not work on a service application.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Bitmap* GetFaviconN(void) const;
* @since 2.1
*
* @return The parent folder ID of the current bookmark item @n
- * If the current bookmark item is the one in topmost level, this method will return ::ROOT_FOLDER_ID.
+ * If the current bookmark item is the one at the topmost level, this method returns ::ROOT_FOLDER_ID.
*/
RecordId GetParentFolderId(void) const;
* @since 2.1
*
* @return @c true if the type of the current bookmark item is folder, @n
- * else @c false
+ * else @c false
*/
bool IsFolder(void) const;
* @since 2.1
*
* @return @c true if the two instances match, or if and only if the two instances contain the same elements, @n
- * else @c false @n
+ * else @c false
* @param[in] obj The object to compare with the current instance
* @see Tizen::Base::Object::Equals()
*/
*
* @since 2.1
*
- * @param[in] rhs The instance of the %BookmarkItem class to assign from
+ * @param[in] rhs An instance of the %BookmarkItem class to assign
*/
BookmarkItem& operator =(const BookmarkItem& rhs);
* @remarks @b Header @b %file: @b \#include @b <FWeb.h> @n
* @b Library : @b osp-web
*
- * The %Controls namespace allows you to embed the %Web browser as a control within an application, to upload and download content, and retrieve the HyperText Markup Language (HTML) element and history details.
- * @n
+ * The %Controls namespace allows you to embed the %Web browser as a control within an application, upload and download content, and retrieve the HyperText Markup Language (HTML) element and history details.
+ *
* For more information on the %Controls namespace features, see <a href="../org.tizen.native.appprogramming/html/guide/web/controls_namespace.htm">Web Controls Guide</a>.
*
* The following diagram illustrates the relationships between the classes belonging to the %Controls namespace.
/**
*
* @class AuthenticationChallenge
- * @brief This class handles the HyperText Transfer Protocol (HTTP) authentication requests.
+ * @brief This class handles the HyperText Transfer Protocol (HTTP) authentication requests.
*
* @since 2.0
*
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] userId The user ID for authentication
- * @param[in] password The password for authentication
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] userId The user ID for authentication
+ * @param[in] password The password for authentication
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void Process(const UserId& userId, const Tizen::Base::String& password);
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void Cancel(void);
/**\r
* @file FWebCtrlGeolocationPermissionManager.h\r
* @brief This is the header file for the %GeolocationPermissionManager class.\r
- * @privlevel platform\r
*\r
* This header file contains the declarations of the %GeolocationPermissionManager class.\r
*\r
*\r
* @since 2.0\r
*\r
- * The %GeolocationPermissionManager class provides methods to manage geolocation permissions decided by a user from origins using html5 JavaScript geolocation APIs.\r
- * @n\r
+ * The %GeolocationPermissionManager class provides methods to manage geolocation permissions decided by a user from origins using html5 JavaScript geolocation APIs. @n\r
* Origin consists of the scheme, host, and port.\r
*/\r
\r
* @privlevel platform\r
* @privilege %http://tizen.org/privilege/geolocationpermission.read\r
*\r
- * @return A pointer to Tizen::Base::Collection::IList containing origin(Tizen::Base::String) list, @n\r
+ * @return A pointer to Tizen::Base::Collection::IList that contains the origin(Tizen::Base::String) list, @n\r
* else @c null if no geolocation permission data exists\r
- * @exception E_SUCCESS The method is successful.\r
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.\r
+ * @exception E_SUCCESS The method is successful.\r
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.\r
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
* @remarks The specific error code can be accessed using the GetLastResult() method.\r
*/\r
* @privilege %http://tizen.org/privilege/geolocationpermission.read\r
*\r
* @return @c true if geolocation permission is allowed, @n\r
- * else @c false\r
- * @param[in] origin The origin\r
+ * else @c false\r
+ * @param[in] origin The origin\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_DATA_NOT_FOUND There is no permission data for the specified @c origin.\r
* @exception E_SYSTEM The method cannot proceed due to a severe system error.\r
* @privilege %http://tizen.org/privilege/geolocationpermission.write\r
*\r
* @return An error code\r
- * @param[in] origin The origin\r
+ * @param[in] origin The origin\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_DATA_NOT_FOUND There is no permission data for the specified @c origin.\r
* @exception E_SYSTEM The method cannot proceed due to a severe system error.\r
result Remove(const Tizen::Base::String& origin);\r
\r
/**\r
- * Removes all elements in the list.\r
+ * Removes all the elements from the list.\r
* \r
* @since 2.0\r
* @privlevel platform\r
result RemoveAll(void);\r
\r
/**\r
- * Gets the geolocation permission manager instance.\r
+ * Gets a geolocation permission manager instance.\r
*\r
* @since 2.0\r
*\r
* @return A pointer to the %GeolocationPermissionManager instance, @n\r
- * else @c null if it fails\r
+ * else @c null if it fails\r
* @exception E_SUCCESS The method is successful.\r
- * @exception E_OUT_OF_MEMORY The memory is insufficient.\r
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.\r
* @exception E_SYSTEM The method cannot proceed due to a severe system error.\r
* @remarks The specific error code can be accessed using the GetLastResult() method.\r
*/\r
*
* @since 2.0
*
- * The %HitElementResult class provides methods to retrieve information from the HTML element, such as tag name, attributes and content.
+ * The %HitElementResult class provides methods to retrieve information such as tag name, attributes and content from the HTML element.
* @n
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/web/controls_namespace.htm">Web Controls Guide</a>.
*
* @since 2.0
*
* @return The value of the specified attribute
- * @param[in] attributeName The name of attribute
+ * @param[in] attributeName The name of the attribute
*/
Tizen::Base::String GetAttributeValue(const Tizen::Base::String& attributeName) const;
* @since 2.0
*
* @return @c true if there is a URL linked to the element, @n
- * else @c false
+ * else @c false
*/
bool HasUrl(void) const;
/**
* @interface IJavaScriptBridge
- * @brief This interface provides a communication channel between JavaScript and native object.
+ * @brief This interface provides a communication channel between JavaScript and a native object.
*
* @since 2.0
*
- * The %IJavaScriptBridge interface provides a communication channel between JavaScript and native object.
+ * The %IJavaScriptBridge interface provides a communication channel between JavaScript and a native object.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/web/controls_namespace.htm">Web Controls Guide</a>.
*
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual ~IJavaScriptBridge(void) {}
/**
- * Called asynchronously on invocation request from JavaScript side through the requestToNative() method.
+ * Called asynchronously on an invocation request from JavaScript through the requestToNative() method.
*
* @since 2.0
*
{
WEB_NAVIGATION_LINK_CLICKED, /**< The clicking of a link on the page */
WEB_NAVIGATION_FORM_SUBMITTED, /**< The submission of a form */
- WEB_NAVIGATION_BACKFORWARD, /**< The back and forward navigation*/
+ WEB_NAVIGATION_BACKFORWARD, /**< The back and forward navigation */
WEB_NAVIGATION_RELOAD, /**< The reloading of the page */
- WEB_NAVIGATION_FORM_RESUBMITTED, /**< The resubmission of the form */
+ WEB_NAVIGATION_FORM_RESUBMITTED, /**< The resubmission of the form */
WEB_NAVIGATION_OTHER /**< A navigation other than any of the above */
};
*/
enum LoadingErrorType
{
- WEB_ERROR_UNKNOWN, /**< An unknown error*/
- WEB_REQUEST_TIMEOUT, /**< The request timeout */
+ WEB_ERROR_UNKNOWN, /**< An unknown error */
+ WEB_REQUEST_TIMEOUT, /**< The request timeout */
WEB_NO_CONNECTION, /**< The network is not in service */
WEB_MIME_NOT_SUPPORTED, /**< The content type is not supported */
WEB_BAD_URL, /**< The URL is invalid */
- WEB_HTTP_RESPONSE, /**< The hypertext transfer protocol (HTTP) response */
- WEB_OUT_OF_MEMORY, /**< The memory is not enough to load the page */
- WEB_FILE_ACCESS_FAILED, /**< The file access has failed */
- WEB_REQUEST_MAX_EXCEEDED, /**< The request has failed because the total number of requests have exceeded the maximum limit */
- WEB_INVALID_CERTIFICATE /**< The hypertext transfer protocol secure (HTTPS) request has failed due to an invalid certificate or CA */
+ WEB_HTTP_RESPONSE, /**< The hypertext transfer protocol (HTTP) response */
+ WEB_OUT_OF_MEMORY, /**< The memory is not enough to load the page */
+ WEB_FILE_ACCESS_FAILED, /**< The file access has failed */
+ WEB_REQUEST_MAX_EXCEEDED, /**< The request has failed because the total number of requests have exceeded the maximum limit */
+ WEB_INVALID_CERTIFICATE /**< The hypertext transfer protocol secure (HTTPS) request has failed due to an invalid certificate or CA */
};
/**
*/
enum DecisionPolicy
{
- WEB_DECISION_DOWNLOAD, /**< The download policy*/
- WEB_DECISION_CONTINUE, /**< The usage policy*/
- WEB_DECISION_IGNORE, /**< The ignore policy*/
+ WEB_DECISION_DOWNLOAD, /**< The download policy */
+ WEB_DECISION_CONTINUE, /**< The usage policy */
+ WEB_DECISION_IGNORE, /**< The ignore policy */
};
/**
* @since 2.0
*
* The %ILoadingListener interface receives the events that occur during the loading of data.
- * To listen to the events occurred during a data loading operation, implement this listener. If there is no
+ * To listen to the events that occur during a data loading operation, implement this listener. If there is no
* registered load event listener, the browser engine handles these events according to its own settings.
* @n
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/web/controls_namespace.htm">Web Controls Guide</a>.
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* @return @c true if the ownership is taken by the application, @n
* else @c false, and a default dialog for the ID and password is displayed @n
* If this method returns @c true, the application must delete the AuthenticationChallenge instance.
- * @param[in] host The host requiring the authentication
- * @param[in] realm The description to help save the user credentials for future visits
+ * @param[in] host The host requiring the authentication
+ * @param[in] realm The description to help save the user credentials for future visits
* @param[in] authentication The handler to send a user response to the server that requested the authentication
*/
virtual bool OnHttpAuthenticationRequestedN(const Tizen::Base::String& host, const Tizen::Base::String& realm, const Tizen::Web::Controls::AuthenticationChallenge& authentication) = 0;
*
* @since 2.0
*
- * @param[in] error The error that occurred during loading
+ * @param[in] error The error that occurs during loading
* @param[in] reason The reason for the loading failure:
- * - @c WEB_HTTP_RESPONSE: The HTTP state code such as "404"
- * - @c WEB_MIME_NOT_SUPPORTED: The Multipurpose Internet Mail Extensions (MIME) type such as "application/rdf+xml" is not supported.
- * - @c WEB_BAD_URL: The URL is incorrect.
+ * - @c WEB_HTTP_RESPONSE: The HTTP state code such as "404"
+ * - @c WEB_MIME_NOT_SUPPORTED: The Multipurpose Internet Mail Extensions (MIME) type such as "application/rdf+xml" is not supported.
+ * - @c WEB_BAD_URL: The URL is incorrect.
*/
virtual void OnLoadingErrorOccurred(LoadingErrorType error, const Tizen::Base::String& reason) = 0;
*
* @since 2.0
*
- * @return @c true if the application handles the URL after the request is canceled in the browser engine, @n
- * else @c false if the browser engine proceeds with the requested URL
+ * @return @c true if the application handles the URL after the request is cancelled in the browser engine, @n
+ * else @c false if the browser engine proceeds with the requested URL
* @param[in] url The URL that is requested
- * @param[in] type The type indicating how the URL is triggered
+ * @param[in] type The type that indicates how the URL is triggered
*/
virtual bool OnLoadingRequested(const Tizen::Base::String& url, WebNavigationType type) = 0;
*
* @since 2.0
*
- * @return A value of the enumerator DecisionPolicy
+ * @return A value of the enumerator DecisionPolicy
* @param[in] mime The content type of the data that is downloaded
* @param[in] httpHeader The HTTP header string
*/
/**
* Called when the favicon of the new page is received. @n
- * If this callback is received once, an application can get favicon by using Tizen::Web::Controls::Web::GetFaviconN().
+ * If this callback is received once, an application can get the favicon by using Tizen::Web::Controls::Web::GetFaviconN().
*
* @since 2.1
*
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @since 2.0
*
- * @param[in] totalCount The total count of matches
- * @param[in] currentOrdinal The ordinal of currently selected match @n
- * If there is no match, it will be set to zero.
+ * @param[in] totalCount The total count of the matches
+ * @param[in] currentOrdinal The ordinal of the currently selected match @n
+ * If there is no match, it is set to zero.
*/
virtual void OnTextFound(int totalCount, int currentOrdinal) = 0;
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
virtual void OnWebDataDownloadCompleted(void) = 0;
/**
- * Called when an error has occurred while downloading content.
+ * Called when an error occurs while downloading content.
*
* @since 2.0
*
- * @param[in] error The type of error that occurred while downloading data
+ * @param[in] error The type of error that occurs while downloading data
*/
virtual void OnWebDownloadFailed(LoadingErrorType error) = 0;
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
* @since 2.0
*
* @param[in] source The source of the event
- * @remarks When the overlay keypad appears on the screen, the current Form's
- * area is adjusted to account for the space that is taken up by the overlay keypad.
- * @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
*/
virtual void OnWebKeypadWillOpen(Tizen::Web::Controls::Web& source) = 0;
*
* @param[in] source The source of the event
* @remarks When the overlay keypad appears on the screen, the current Form's
- * area is adjusted to account for the space that is taken up by the overlay keypad.
+ * area is adjusted to account for the space that is taken up by the overlay keypad.
* @see Tizen::Ui::Controls::Form::GetClientAreaBounds()
*/
virtual void OnWebKeypadOpened(Tizen::Web::Controls::Web& source) = 0;
virtual void OnWebKeypadClosed(Tizen::Web::Controls::Web& source) = 0;
/**
- * Called when the keypad bounds are changed, for instance when the predictive text window which is located in the upper side of the keypad is shown.
+ * Called when the keypad bounds are changed, for instance when the predictive text window which is located in the upper part of the keypad is shown.
*
* @since 2.0
*
{
public:
/**
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
+ * This polymorphic destructor should be overridden if required. @n
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.
*
* @since 2.0
*/
*
* @since 2.0
*
- * @param[in] source The source of the event
+ * @param[in] source The source of the event
* @param[in] startPoint The starting point of the selected block
* @param[in] endPoint The ending point of the selected block
*/
/**
* Called just after the touch move event to determine whether the preventDefault() method is triggered or not. @n
- * The application that wants to support W3C preventDefault() feature is recommended to use this callback and delay to handle the touch move event until this callback is received.
+ * The application that wants to support the W3C preventDefault() feature is recommended to use this callback and delay the handling of the touch move event until this callback is received.
*
* @since 2.1
*
* @param[in] source The source of the event
* @param[in] trigger Set to @c true if the preventDefault() method is triggered, @n
- * else @c false
- * @remarks This callback is always called just after the touch move event and returns @c true when preventDefault() is triggered on the touch start or touch move event.
+ * else @c false
+ * @remarks This callback is always called just after the touch move event and returns @c true when preventDefault() is triggered on the touch start or touch move event.
*/
virtual void OnWebPreventDefaultTriggered(Tizen::Web::Controls::Web& source, bool trigger) {};
\r
/**\r
* @file FWebCtrlIWebUiEventListenerF.h\r
-* @brief This is the header file for the %IWebUiEventListenerF interface.\r
+* @brief This is the header file for the %IWebUiEventListenerF interface.\r
*\r
* This header file contains the declarations of the %IWebUiEventListenerF interface.\r
*/\r
{\r
public:\r
/**\r
- * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.\r
+ * This polymorphic destructor should be overridden if required. @n\r
+ * This way, the destructors of the derived classes are called when the destructor of this interface is called.\r
*\r
* @since 2.1\r
*/\r
*\r
* @since 2.1\r
*\r
- * @param[in] source The source of the event\r
+ * @param[in] source The source of the event\r
* @param[in] startPoint The starting point of the selected block\r
* @param[in] endPoint The ending point of the selected block\r
*/\r
\r
/**\r
* Called just after the touch move event to determine whether the preventDefault() method is triggered or not. @n\r
- * The application that wants to support W3C preventDefault() feature is recommended to use this callback and delay to handle the touch move event until this callback is received.\r
+ * The application that wants to support the W3C preventDefault() feature is recommended to use this callback and delay the handling of the touch move event until this callback is received.\r
*\r
* @since 2.1\r
*\r
* @param[in] source The source of the event\r
* @param[in] trigger Set to @c true if the preventDefault() method is triggered, @n\r
- * else @c false\r
- * @remarks This callback is always called just after the touch move event and returns @c true when preventDefault() is triggered on the touch start or touch move event.\r
+ * else @c false\r
+ * @remarks This callback is always called just after the touch move event and returns @c true when preventDefault() is triggered on the touch start or touch move event.\r
*/\r
virtual void OnWebPreventDefaultTriggered(Tizen::Web::Controls::Web& source, bool trigger) {};\r
\r
* @since 2.0
*
* @return The current history item, @n
- * else @c null if no history item exists
+ * else @c null if no history item exists
*/
const Tizen::Web::HistoryItem* GetCurrentItem(void) const;
* @since 2.0
*
* @return The index of the currently viewed page in the web page navigation list, @n
- * else @c -1 if no history item exists
+ * else @c -1 if no history item exists
*/
int GetCurrentIndex(void) const;
/**
- * Gets the history item pointed to by the specified @c index.
+ * Gets the history item that the specified @c index points to.
*
* @since 2.0
*
* @return A pointer to the history item at the specified @c index
- * @param[in] index The index of an element @n
- * The value of the index must be greater than or equal to @c 0.
- * @exception E_OUT_OF_RANGE The specified @c index is out of range.
+ * @param[in] index The index of the element @n
+ * The value of the index must be greater than or equal to @c 0.
+ * @exception E_OUT_OF_RANGE The specified @c index is out of the valid range.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
const Tizen::Web::HistoryItem* GetItemAt(int index) const;
/**
- * Gets the total number of the history items.
+ * Gets the total number of history items.
*
* @since 2.0
*
void
WebSample::LoadUrl(void)
{
- Tizen::Base::String url(L"http://www.tizen.org");
+ Tizen::Base::String url(L"http://www.tizen.org/about/");
__pWeb->LoadUrl(url);
}
void
WebSample::LoadUrl(void)
{
- Tizen::Base::String url(L"http://www.tizen.org");
+ Tizen::Base::String url(L"http://www.tizen.org/about/");
__pWeb->LoadUrl(url);
}
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @param[in] rect The rectangle size of the control
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM The method has failed.
- * @exception E_INVALID_ARG The specified @c rect is invalid.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] rect The rectangle size of the control
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM The method has failed.
+ * @exception E_INVALID_ARG The specified @c rect is invalid.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
*/
result Construct(const Tizen::Graphics::Rectangle& rect);
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @param[in] rect The rectangle size of the control
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM The method has failed.
- * @exception E_INVALID_ARG The specified @c rect is invalid.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @param[in] rect The rectangle size of the control
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_SYSTEM The method has failed.
+ * @exception E_INVALID_ARG The specified @c rect is invalid.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect);
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] url The resource to load
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] url The resource to load
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void LoadUrl(const Tizen::Base::String& url);
/**
- * Loads the resource specified by the URL with a given header of HTTP request.
+ * Loads the resource specified by the URL along with the given header of the HTTP request.
*
* @since 2.0
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @param[in] url The resource to load
- * @param[in] header The header of the HTTP request
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_HEADER The header object does not contain any header fields.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] url The resource to load
+ * @param[in] header The header of the HTTP request
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_HEADER The header object does not contain any header fields.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
*/
result LoadUrl(const Tizen::Base::String& url, const Tizen::Net::Http::HttpHeader& header);
/**
- * Loads the resource specified by the URL with a given header and body of HTTP request. @n
- * The header must include content-type entity-header field that is needed to check mime-type of the message body.
+ * Loads the resource specified by the URL along with the given header and body of the HTTP request. @n
+ * The header must include the content-type entity-header field that is needed to check the mime-type of the message body.
*
* @since 2.0
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @param[in] url The resource to load
- * @param[in] header The header of the HTTP request
- * @param[in] body The message body of the HTTP request
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_HEADER The header object does not contain any header fields.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] url The resource to load
+ * @param[in] header The header of the HTTP request
+ * @param[in] body The message body of the HTTP request
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_HEADER The header object does not contain any header fields.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
*/
result LoadUrlWithPostRequest(const Tizen::Base::String& url, const Tizen::Net::Http::HttpHeader& header, const Tizen::Base::ByteBuffer& body);
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] baseUrl The uniform resource locator (URL) of the content
- * @param[in] content The content
- * @param[in] mime The MIME type of the content
- * @param[in] encoding The <a href= "../org.tizen.native.appprogramming/html/guide/web/supported_web_features.htm">text encoding</a> of the content
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The content buffer is empty. @b Since: @b 2.1
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] baseUrl The uniform resource locator (URL) of the content
+ * @param[in] content The content
+ * @param[in] mime The MIME type of the content
+ * @param[in] encoding The <a href= "../org.tizen.native.appprogramming/html/guide/web/supported_web_features.htm">text encoding</a> of the content
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The content buffer is empty. @b Since: @b 2.1
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void LoadData(const Tizen::Base::String& baseUrl, const Tizen::Base::ByteBuffer& content, const Tizen::Base::String& mime, const Tizen::Base::String& encoding = "UTF-8");
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void StopLoading(void);
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void Reload(void);
*
* @since 2.0
*
- * @return @c true if a page is loading, @n
- * else @c false
+ * @return @c true if the page is loading, @n
+ * else @c false
*/
bool IsLoading(void) const;
* @since 2.0
*
* @return @c true if a back history item exists, @n
- * else @c false
+ * else @c false
*/
bool CanGoBack(void) const;
* @since 2.0
*
* @return @c true if a forward history item exists, @n
- * else @c false
+ * else @c false
*/
bool CanGoForward(void) const;
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void GoBack(void);
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void GoForward(void);
*
* @since 2.0
*
- * @return A pointer to PageNavigationList containing the history items of the %Web control
+ * @return A pointer to PageNavigationList that contains the history items of the %Web control
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @since 2.0
*
* @return @c true if the specified @c word is found, @n
- * else @c false
+ * else @c false
* @param[in] word The string to search for
* @param[in] searchForward Set to @c true to search for the word in the forward direction from the current position, @n
- * else @c false to search for the word in the backward direction from the current position
+ * else @c false to search for the word in the backward direction from the current position
*/
bool SearchText(const Tizen::Base::String& word, bool searchForward = true);
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @param[in] setting The setting to update
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] setting The setting to update
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
*/
result SetSetting(const Tizen::Web::Controls::WebSetting& setting);
* @since 2.0
*
* @return A HitElementResult of the pointed element
- * @param[in] point The x and y coordinates
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c point is invalid.
+ * @param[in] point The x and y coordinates
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c point is invalid.
* @exception E_UNSUPPORTED_FORMAT The image format is not supported.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Web::Controls::HitElementResult* GetElementByPointN(const Tizen::Graphics::Point& point) const;
* @since 2.1
*
* @return A HitElementResult of the pointed element
- * @param[in] point The x and y coordinates
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c point is invalid.
+ * @param[in] point The x and y coordinates
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified @c point is invalid.
* @exception E_UNSUPPORTED_FORMAT The image format is not supported.
- * @exception E_SYSTEM The method cannot proceed due to a severe system error.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Web::Controls::HitElementResult* GetElementByPointN(const Tizen::Graphics::FloatPoint& point) const;
* @privilege %http://tizen.org/privilege/web.service
*
* @return The result of the evaluated JavaScript, @n
- * else @c null if an error occurs
- * @param[in] scriptCode The JavaScript code as string
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * else @c null if an error occurs
+ * @param[in] scriptCode The JavaScript code as a string
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::String* EvaluateJavascriptN(const Tizen::Base::String& scriptCode);
* @since 2.0
*
* @return An error code
- * @param[in] level The zoom-out level @n
- * The value ranges between @c 0.3 and @c 2.0. When the page view is at its original size, the level is @c 1.0. @n If the
- * specified level is less than @c 1.0, the page view is reduced. @n If the specified level is greater than @c 1.0, the page view is
- * magnified.
+ * @param[in] level The zoom-out level @n
+ * The value lies between the range @c 0.3 and @c 2.0. When the page view is at its original size, the level is @c 1.0. @n If the
+ * specified level is less than @c 1.0, the page view is reduced. @n If the specified level is greater than @c 1.0, the page view is
+ * magnified.
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c level is less than @c 0.3 or greater than @c 2.0.
+ * @exception E_OUT_OF_RANGE The specified @c level is either less than @c 0.3 or greater than @c 2.0.
*/
result SetZoomLevel(float level);
*
* @since 2.0
*
- * @return The value ranges between @c 0.3 and @c 2.0
+ * @return The value lies between the range @c 0.3 and @c 2.0
*/
float GetZoomLevel(void) const;
* @since 2.0
*
* @return @c true if the specified MIME type is supported, @n
- * else @c false
+ * else @c false
* @param[in] mime The MIME type
*/
bool IsMimeSupported(const Tizen::Base::String& mime) const;
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] pLoadingListener The listener receives the events that occurs while loading the data
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] pLoadingListener The listener receives the events that occur while loading the data
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetLoadingListener(Tizen::Web::Controls::ILoadingListener* pLoadingListener);
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] pDownLoadListener The listener to receive the data from a network incrementally
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] pDownLoadListener The listener to receive the data from a network incrementally
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetDownloadListener(Tizen::Web::Controls::IWebDownloadListener* pDownLoadListener);
* @since 2.0
*
* @return An error code
- * @param[in] startPoint The starting point for the text selection block
+ * @param[in] startPoint The starting point for the text selection block
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG There is nothing to select from the specified starting point.
*/
* @since 2.1
*
* @return An error code
- * @param[in] startPoint The starting point for the text selection block
+ * @param[in] startPoint The starting point for the text selection block
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG There is nothing to select from the specified starting point.
*/
* @since 2.0
*
* @return An error code
- * @param[out] startPoint The starting point of the selected text block
- * @param[out] endPoint The ending point of the selected text block
+ * @param[out] startPoint The starting point of the selected text block
+ * @param[out] endPoint The ending point of the selected text block
* @exception E_SUCCESS The method is successful.
*/
result GetBlockRange(Tizen::Graphics::Point& startPoint, Tizen::Graphics::Point& endPoint) const;
* @since 2.1
*
* @return An error code
- * @param[out] startPoint The starting point of the selected text block
- * @param[out] endPoint The ending point of the selected text block
+ * @param[out] startPoint The starting point of the selected text block
+ * @param[out] endPoint The ending point of the selected text block
* @exception E_SUCCESS The method is successful.
*/
result GetBlockRange(Tizen::Graphics::FloatPoint& startPoint, Tizen::Graphics::FloatPoint& endPoint) const;
* @since 2.0
*
* @return The selected text, @n
- * else an empty string if there is no selection block
+ * else an empty string if there is no selection block
*/
Tizen::Base::String GetTextFromBlock(void) const;
*
* @since 2.0
*
- * @param[in] enable Set to @c true to enable the scrolling of the web page, @n
+ * @param[in] enable Set to @c true to enable the scrolling of the web page, @n
* else @c false
* @exception E_SUCCESS The method is successful.
- * @remarks This method does not affect javascript touch event.
+ * @remarks This method does not affect the JavaScript touch event.
*/
result SetScrollEnabled(bool enable);
* @since 2.0
*
* @return @c true if the web page scroll is enabled, @n
- * else @c false
+ * else @c false
*/
bool IsScrollEnabled(void) const;
* @since 2.0
*
* @return @c true if private browsing is enabled, @n
- * else @c false
+ * else @c false
*/
bool IsPrivateBrowsingEnabled(void) const;
* @privilege %http://tizen.org/privilege/web.service
*
* @return The result of setting the private browsing
- * @param[in] enable Set to @c true to enable private browsing, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] enable Set to @c true to enable private browsing, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
*/
result SetPrivateBrowsingEnabled(bool enable);
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method.
* @see CanGoBack()
* @see CanGoForward()
* @see GoBack()
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
*/
result ClearCache(void);
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
*/
result ClearCookie(void);
/**
- * Clears the application's all stored form datas.
+ * Clears the application's all stored form data.
*
* @since 2.1
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method.
*/
result ClearFormData(void);
/**
- * Clears the application's all stored ID/password datas.
+ * Clears the application's all stored ID/password data.
*
* @since 2.1
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method.
*/
result ClearLoginFormData(void);
/**
- * Checks whether the %Web control allows cookie. @n
- * Returns @c true if cookie is enabled.
+ * Checks whether the %Web control allows cookies. @n
*
* @since 2.0
*
- * @return @c true if cookie is allowed, @n
- * else @c false
+ * @return @c true if the cookie is allowed, @n
+ * else @c false
*/
bool IsCookieEnabled(void) const;
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @return The result of enabling or disabling cookie
- * @param[in] enable Set to @c true if the web control allows a cookie, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @return The result of enabling or disabling a cookie
+ * @param[in] enable Set to @c true if the web control allows a cookie, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
*/
result SetCookieEnabled(bool enable);
/**
- * Saves the current web page as a pdf file. @n The size parameter is used to set size of the pdf file using millimeter.
+ * Saves the current web page as a pdf file. @n
+ * The size parameter is used to set the size of a pdf file using millimeters.
*
* @since 2.0
*
* @return An error code
- * @param[in] filePath The path of the pdf file that is created
- * @param[in] pSize The width and height of the pdf file in millimeter. The width and height must be greater than @c 0. @n
- * If the parameter contains @c null, the method uses the default size of the web page that is shown on the screen.
+ * @param[in] filePath The path of the pdf file that is created
+ * @param[in] pSize The width and height of the pdf file in millimeters. The width and height must be greater than @c 0. @n
+ * If the parameter contains @c null, the method uses the default size of the web page that is shown on the screen.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG Either of the following conditions has occurred: @n
* - The specified path is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] jsBridge The JavaScript bridge to add
+ * @param[in] jsBridge The JavaScript bridge to add
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_ALREADY_EXIST A JavaScript bridge with the same name already exists.
*/
* @since 2.0
*
* @return An error code
- * @param[in] jsBridge The JavaScript bridge to remove
+ * @param[in] jsBridge The JavaScript bridge to remove
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The specified element is not found.
+ * @exception E_OBJ_NOT_FOUND The specified element is not found.
*/
result RemoveJavaScriptBridge(const IJavaScriptBridge& jsBridge);
/**
* Registers a keypad event listener. @n
- * The registered listener is notified when the keypad associated with <input> tag or with <textarea> tag is opened or closed.
+ * The registered listener is notified when the keypad associated with <input> tag or <textarea> tag is opened or closed.
*
* @since 2.0
*
void SetWebKeypadEventListener(IWebKeypadEventListener* pKeypadEventListener);
/**
- * Searches for all instances of the text on the current page and then highlights them. @n
- * The current matched block will indicate the first match.
+ * Searches for all the instances of the text on the current page and then highlights them. @n
+ * The current matched block indicates the first match.
*
* @since 2.0
*
* @return An error code
- * @param[in] text The string to search for
- * @param[in] caseSensitive Set to @c true to search for the text with case-sensitive mode, @n
- * else @c false to search for the text in the backward direction from the current position
+ * @param[in] text The string to search for
+ * @param[in] caseSensitive Set to @c true to search for the text in the case-sensitive mode, @n
+ * else @c false to search for the text in the backward direction from the current position
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c text is invalid.
* @remarks This method operates asynchronously.
* @since 2.0
*
* @return An error code
- * @param[in] searchForward Set to @c true to search for the text in the forward direction from the current position, @n
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The next instance is not found.
+ * @param[in] searchForward Set to @c true to search for the text in the forward direction from the current position, @n
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND The next instance is not found.
* @exception E_INVALID_OPERATION The SearchTextAllAsync() method is not called.
* @remarks This method operates asynchronously.
* @see Tizen::Web::Controls::ITextSearchListener::OnTextFound()
void SetTextSearchListener(ITextSearchListener* pTextSearchListener);
/**
- * Gets the favicon image from current page.
+ * Gets the favicon image from the current page.
*
* @since 2.0
*
void Pause(void);
/**
- * Informs the browser engine to resume the handling of screen operations.
+ * Informs the browser engine to resume the handling of the screen operations.
*
* @since 2.0
*/
*
* @since 2.1
*
- * @return The size of the current web page
- * @remarks If an application want to get the displayed size, the return value should be multiplied by the zoom factor.
+ * @return The size of the current web page
+ * @remarks If an application wants to get the displayed size, the return value should be multiplied by the zoom factor.
* @see GetZoomLevel()
*/
Tizen::Graphics::Dimension GetPageSize(void) const;
enum CertificateErrorHandlingMode
{
WEB_CERTIFICATE_ERROR_HANDLING_MODE_USER_CONFIRM, /**< The web certificate error handling mode: The confirm popup is displayed to get the user confirmation */
- WEB_CERTIFICATE_ERROR_HANDLING_MODE_CANCEL, /**< The web certificate error handling mode: The confirm popup is not displayed and the request is canceled */
- WEB_CERTIFICATE_ERROR_HANDLING_MODE_CONTINUE /**< The web certificate error handling mode: The confirm popup is not displayed and the request proceeds */
+ WEB_CERTIFICATE_ERROR_HANDLING_MODE_CANCEL, /**< The web certificate error handling mode: The confirm popup is not displayed and the request is cancelled */
+ WEB_CERTIFICATE_ERROR_HANDLING_MODE_CONTINUE /**< The web certificate error handling mode: The confirm popup is not displayed and the request proceeds */
};
/**
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] mode A cache mode
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] mode The cache mode
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetCacheControl(CacheMode mode);
* @since 2.0
*
* @param[in] enable Set to @c true if the %Web control uses JavaScript, @n
- * else @c false
+ * else @c false
*/
void SetJavascriptEnabled(bool enable);
*
* @since 2.0
*
- * @param[in] enable Set to @c true if the %Web control must load images included in the content, @n
- * else @c false
+ * @param[in] enable Set to @c true if the %Web control loads images included in the content, @n
+ * else @c false
*/
void SetAutoImageLoadEnabled(bool enable);
*
* @since 2.0
*
- * @param[in] inputStyle The input style of keypad
+ * @param[in] inputStyle The input style of the keypad
* @remarks If an application sets the input style to @c INPUT_STYLE_OVERLAY, the application must implement IWebKeypadEventListener to rearrange the layout of the current Form.
*
*/
/**
* Gets the font size of the content. @n
- * The default size is @c 17.
+ * The default size is @c 16.
*
* @since 2.0
*
* @since 2.0
*
* @return @c true if JavaScript is enabled and used by a %Web control, @n
- * else @c false
+ * else @c false
*/
bool IsJavascriptEnabled(void) const;
* @since 2.0
*
* @return @c true if auto image loading is enabled, @n
- * else @c false
+ * else @c false
*/
bool IsAutoImageLoadEnabled(void) const;
*
* @since 2.0
*
- * @return The input style of keypad
+ * @return The input style of the keypad
*/
Tizen::Ui::Controls::InputStyle GetInputStyle(void) const;
/**
- * Sets a certificate error handling mode for a %Web control.
+ * Sets the certificate error handling mode for a %Web control.
*
* @since 2.0
*
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] mode A certificate error handling mode
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] mode The certificate error handling mode
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetCertificateErrorHandlingMode(CertificateErrorHandlingMode mode);
*
* @since 2.0
*
- * @return A certificate error handling mode
+ * @return The certificate error handling mode
*/
CertificateErrorHandlingMode GetCertificateErrorHandlingMode(void) const;
/**
- * Sets a user agent for a %Web control.
+ * Sets the user agent for a %Web control.
*
* @since 2.0
*
void SetUserAgent(const Tizen::Base::String& agent);
/**
- * Gets a value of user agent for a %Web control.
+ * Gets the value of the user agent for a %Web control.
*
* @since 2.0
*
- * @return The value of user agent
+ * @return The value of the user agent
*/
Tizen::Base::String GetUserAgent(void) const;
/**
- * Decides if a %Web control loads the resized contents to fit width automatically.
+ * Decides if a %Web control loads the resized contents to fit the width automatically.
*
* @since 2.0
*
- * @param[in] enable Set to @c true if the %Web control should load contents to fit width, @n
- * else @c false
+ * @param[in] enable Set to @c true if the %Web control should load contents to fit the width, @n
+ * else @c false
*/
void SetAutoFittingEnabled(bool enable);
/**
- * Checks whether a %Web control loads the resize contents to fit width. @n
+ * Checks whether a %Web control loads the resized contents to fit the width. @n
* The default value is @c true.
*
* @since 2.0
*
* @return @c true if auto fitting is enabled, @n
- * else @c false
+ * else @c false
*/
bool IsAutoFittingEnabled(void) const;
/**
- * Decides if a %Web control allows JavaScript to open new window.
+ * Decides if a %Web control allows JavaScript to open a new window.
*
* @since 2.0
*
- * @param[in] enable Set to @c true if the %Web control should allow JavaScript to open new window, @n
- * else @c false
+ * @param[in] enable Set to @c true if the %Web control should allow JavaScript to open a new window, @n
+ * else @c false
*/
void SetJavaScriptPopupEnabled(bool enable);
/**
- * Checks whether a %Web control allows JavaScript to open new window. @n Returns @c true if opening new window by JavaScript is enabled.
+ * Checks whether a %Web control allows JavaScript to open a new window.
* The default value is @c true.
*
* @since 2.0
*
- * @return @c true if opening new window by JavaScript is enabled, @n
- * else @c false
+ * @return @c true if opening a new window by JavaScript is enabled, @n
+ * else @c false
*/
bool IsJavaScriptPopupEnabled(void) const;
/**
- * Decides if a %Web control supports html5 geolocation feature.
+ * Decides if a %Web control supports the HTML5 geolocation feature.
*
* @since 2.0
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] enable Set to @c true if the %Web control should support html5 geolocation feature, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
+ * @param[in] enable Set to @c true if the %Web control should support the HTML5 geolocation feature, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetGeolocationEnabled(bool enable);
/**
- * Checks whether a %Web control supports html5 geolocation feature. @n Returns @c true if html5 geolocation feature is enabled.
+ * Checks whether a %Web control supports the HTML5 geolocation feature.
* The default value is @c true.
*
* @since 2.0
*
- * @return @c true if html5 geolocation feature is enabled, @n
- * else @c false
+ * @return @c true if the HTML5 geolocation feature is enabled, @n
+ * else @c false
*/
bool IsGeolocationEnabled(void) const;
/**
- * Decides if a %Web control saves form data automatically and supports autocomplete feature.
+ * Decides if a %Web control saves the form data automatically and supports the autocomplete feature.
*
* @since 2.1
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] enable Set to @c true if the %Web control should save form data automatically and supports autocomplete feature, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @param[in] enable Set to @c true if the %Web control should save the form data automatically and supports the autocomplete feature, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetAutoFormDataShowEnabled(bool enable);
/**
- * Checks whether %Web control saves form data automatically and supports autocomplete feature. @n Returns @c true if those are enabled.
+ * Checks whether a %Web control saves the form data automatically and supports the autocomplete feature.
* The default value is @c true.
*
* @since 2.1
*
- * @return @c true if saving form data and autocomplete feature are enabled, @n
- * else @c false
+ * @return @c true if the %Web control saves the form data and enables the autocomplete feature, @n
+ * else @c false
*/
bool IsAutoFormDataShowEnabled(void) const;
/**
- * Decides if a %Web control saves ID/password for login form automatically and supports autofill feature.
+ * Decides if a %Web control saves the ID/password for a login form automatically and supports the autofill feature.
*
* @since 2.1
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
- * @param[in] enable Set to @c true if the %Web control should save login ID/password automatically and supports autofill feature, @n
- * else @c false
- * @exception E_SUCCESS The method is successful.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
+ * @param[in] enable Set to @c true if the %Web control should save the login ID/password automatically and supports the autofill feature, @n
+ * else @c false
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetAutoLoginFormFillEnabled(bool enable);
/**
- * Checks whether %Web control saves ID/password for login form automatically and supports autofill feature. @n Returns @c true if those are enabled.
+ * Checks whether a %Web control saves the ID/password for a login form automatically and supports the autofill feature.
* The default value is @c true.
*
* @since 2.1
*
- * @return @c true if saving ID/password for login form and autofill feature are enabled, @n
- * else @c false
+ * @return @c true if the %Web control saves the ID/password for a login form and enables the autofill feature, @n
+ * else @c false
*/
bool IsAutoLoginFormFillEnabled(void) const;
* @since 2.0
*
* @return @c true if the two instances match, @n
- * else @c false
+ * else @c false
* @param[in] obj The object to compare with the current instance
* @remarks This method returns @c true if and only if the two instances contain the same elements.
* @see Tizen::Base::Object::Equals()
*
* @since 2.0
*
- * @param[in] setting The instance of the %WebSetting class to assign from
+ * @param[in] setting The instance of the %WebSetting class to assign
*/
WebSetting& operator =(const WebSetting& setting);
\r
/**\r
* @file FWebCtrlWebStorageManager.h\r
-* @brief This is the header file for the %WebStorageManager class.\r
+* @brief This is the header file for the %WebStorageManager class.\r
*\r
* This header file contains the declarations of the %WebStorageManager class for a %Web control.\r
*/\r
* @privlevel public\r
* @privilege %http://tizen.org/privilege/web.privacy\r
*\r
- * @return A pointer to IList containing origin(Tizen::Base::String) list, @n\r
- * else @c null if no web storage data exists\r
- * @param[in] storageType The web storage type\r
+ * @return A pointer to Tizen::Base::Collection::IList that contains the origin(Tizen::Base::String) list, @n\r
+ * else @c null if no web storage data exists\r
+ * @param[in] storageType The web storage type\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_UNSUPPORTED_TYPE The specified @c storageType is not supported.\r
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
Tizen::Base::Collection::IList* GetOriginListN(WebStorageType storageType) const;\r
\r
/**\r
- * Sets the default quota for a given origin for a given storage type. @n\r
- * Only the @c WEB_STORAGE_TYPE_WEB_SQL_DATABASE and the @c WEB_STORAGE_TYPE_APPLICATION_CACHE are supported.\r
+ * Sets the default quota for a given origin of a given storage type. @n\r
+ * Only @c WEB_STORAGE_TYPE_WEB_SQL_DATABASE and @c WEB_STORAGE_TYPE_APPLICATION_CACHE are supported.\r
*\r
* @since 2.1\r
* @privlevel public\r
* @privilege %http://tizen.org/privilege/web.privacy\r
*\r
* @return An error code\r
- * @param[in] storageType The web storage type\r
- * @param[in] origin The origin\r
- * @param[in] quota The quota of the web storage to set in bytes\r
+ * @param[in] storageType The web storage type\r
+ * @param[in] origin The origin\r
+ * @param[in] quota The quota of the web storage to set in bytes\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_ARG The specified @c origin is invalid.\r
* @exception E_UNSUPPORTED_TYPE The specified @c storageType is not supported.\r
\r
\r
/**\r
- * Gets the quota for a given origin for a given storage type. @n\r
- * Only the @c WEB_STORAGE_TYPE_WEB_SQL_DATABASE is supported.\r
+ * Gets the quota for a given origin of a given storage type. @n\r
+ * Only @c WEB_STORAGE_TYPE_WEB_SQL_DATABASE is supported.\r
*\r
* @since 2.1\r
* @privlevel public\r
* @privilege %http://tizen.org/privilege/web.privacy\r
*\r
* @return The usage of the web storage in bytes\r
- * @param[in] storageType The web storage type\r
- * @param[in] origin The origin\r
+ * @param[in] storageType The web storage type\r
+ * @param[in] origin The origin\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_ARG The specified @c origin is invalid.\r
* @exception E_UNSUPPORTED_TYPE The specified @c storageType is not supported.\r
long GetQuotaForOrigin(WebStorageType storageType, const Tizen::Base::String& origin);\r
\r
/**\r
- * Gets the usage for a given origin for a given storage type. @n\r
- * The @c WEB_STORAGE_TYPE_INDEXED_DATABASE and the @c WEB_STORAGE_TYPE_FILE_SYSTEM are not supported.\r
+ * Gets the usage for a given origin of a given storage type. @n\r
+ * @c WEB_STORAGE_TYPE_INDEXED_DATABASE and @c WEB_STORAGE_TYPE_FILE_SYSTEM are not supported.\r
*\r
* @since 2.1\r
* @privlevel public\r
* @privilege %http://tizen.org/privilege/web.privacy\r
*\r
* @return The usage of the web storage in bytes\r
- * @param[in] storageType The web storage type\r
- * @param[in] origin The origin\r
+ * @param[in] storageType The web storage type\r
+ * @param[in] origin The origin\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_ARG The specified @c origin is invalid.\r
* @exception E_UNSUPPORTED_TYPE The specified @c storageType is not supported.\r
long GetUsageForOrigin(WebStorageType storageType, const Tizen::Base::String& origin) const;\r
\r
/**\r
- * Removes the data for a given origin for a given storage type. @n\r
- * The @c WEB_STORAGE_TYPE_INDEXED_DATABASE is not supported.\r
+ * Removes the data for a given origin of a given storage type. @n\r
+ * @c WEB_STORAGE_TYPE_INDEXED_DATABASE is not supported.\r
*\r
* @since 2.1\r
* @privlevel public\r
* @privilege %http://tizen.org/privilege/web.privacy\r
*\r
* @return An error code\r
- * @param[in] storageType The web storage type\r
- * @param[in] origin The origin\r
+ * @param[in] storageType The web storage type\r
+ * @param[in] origin The origin\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_ARG The specified @c origin is invalid.\r
* @exception E_UNSUPPORTED_TYPE The specified @c storageType is not supported.\r
result Remove(WebStorageType storageType, const Tizen::Base::String& origin);\r
\r
/**\r
- * Removes all data for a given storage type.\r
+ * Removes all the data of a given storage type.\r
*\r
* @since 2.1\r
* @privlevel public\r
* @privilege %http://tizen.org/privilege/web.privacy\r
*\r
* @return An error code\r
- * @param[in] storageType The web storage type\r
+ * @param[in] storageType The web storage type\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_UNSUPPORTED_TYPE The specified @c storageType is not supported.\r
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
result RemoveAll(WebStorageType storageType);\r
\r
/**\r
- * Gets the web storage manager instance.\r
+ * Gets a web storage manager instance.\r
*\r
* @since 2.1\r
*\r
* @return A pointer to the %WebStorageManager instance, @n\r
- * else @c null if it fails\r
+ * else @c null if it fails\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_OUT_OF_MEMORY The memory is insufficient.\r
* @remarks The specific error code can be accessed using the GetLastResult() method.\r
/**
* @class HistoryItem
- * @brief This class is used for accessing a history item stored in the PageNavigationList class or the %WebHistory class.
+ * @brief This class is used for accessing a history item stored in the %PageNavigationList class or the %WebHistory class.
*
* @since 2.0
*
* The %HistoryItem class provides access to the Controls::PageNavigationList class item and the WebHistory class.
- * Each item contains the title and the URL of the page visited.
+ * Each item contains the title and URL of the page visited.
*/
class _OSP_EXPORT_ HistoryItem
: public Tizen::Base::Object
* @return The image
*
* @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM Either of the following conditions has occurred: @n
- * - The method cannot proceed due to a severe system error. @n
- * - The method has failed because it does not work on a service application.
+ * @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Bitmap* GetFaviconN(void) const;
/**
* @class WebBookmark
- * @brief This class provides methods to manage bookmark items of the browser.
+ * @brief This class provides methods to manage the bookmark items of the browser.
*
* @since 2.1
*
* @final This class is not intended for extension.
*
- * The %WebBookmark class provides methods to get bookmark information of the browser and organize it.
- * The bookmark system has hierarchical structure with the parent folder ID supporting multiple folders and the bookmark items are represented by the BookmarkItem class. @n
+ * The %WebBookmark class provides methods to get the browser's bookmark information and organize it.
+ * The bookmark system has a hierarchical structure with the parent folder ID supporting multiple folders and the bookmark items are represented by the BookmarkItem class. @n
* If you use these APIs to backup and restore the bookmark, add bookmark items and folders recursively from the topmost level.
*/
class _OSP_EXPORT_ WebBookmark
* @privilege %http://tizen.org/privilege/bookmark.write
*
* @return An error code
- * @param[in] title The title of bookmark item
- * @param[out] folderId The current folder ID
- * @param[in] parentId The parent folder ID
+ * @param[in] title The title of a bookmark item
+ * @param[out] folderId The current folder ID
+ * @param[in] parentId The parent folder ID
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG Either of the following conditions has occurred: @n
* - The specified title is an empty string. @n
* @privilege %http://tizen.org/privilege/bookmark.write
*
* @return An error code
- * @param[in] title The title of bookmark item
- * @param[in] url The URL of bookmark item
- * @param[out] bookmarkId The current bookmark ID
- * @param[in] parentId The parent folder ID
+ * @param[in] title The title of a bookmark item
+ * @param[in] url The URL of a bookmark item
+ * @param[out] bookmarkId The current bookmark ID
+ * @param[in] parentId The parent folder ID
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG Either of the following conditions has occurred: @n
* - The specified @c title is an empty string. @n
* @privilege %http://tizen.org/privilege/bookmark.write
*
* @return An error code
- * @param[in] bookmarkId The bookmark ID
- * @param[in] favicon The favicon image
+ * @param[in] bookmarkId The bookmark ID
+ * @param[in] favicon The favicon image
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c bookmarkId is invalid.
* @exception E_INVALID_DATA The specified @c favicon data is invalid.
result SetFavicon(RecordId bookmarkId, const Tizen::Graphics::Bitmap& favicon);
/**
- * Gets the bookmark item pointed to by the specified @c index.
+ * Gets the bookmark item that the specified @c index points to.
*
* @since 2.1
* @privlevel platform
* @privilege %http://tizen.org/privilege/bookmark.read
*
* @return The bookmark item at the specified @c index
- * @param[in] index The index of an element @n
- * The value of the @c index must be greater than or equal to @c 0.
+ * @param[in] index The index of the element @n
+ * The value of the @c index must be greater than or equal to @c 0.
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c index is out of range.
+ * @exception E_OUT_OF_RANGE The specified @c index is out of the valid range.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
int GetItemCount(void) const;
/**
- * Removes all elements.
+ * Removes all the elements.
*
* @since 2.1
* @privlevel platform
result Construct(void);
/**
- * Gets the history item pointed to by the specified @c index.
+ * Gets the history item that the specified @c index points to.
*
* @since 2.0
* @privlevel public
* @privilege %http://tizen.org/privilege/web.privacy
*
* @return The history item at the specified @c index
- * @param[in] index The index of an element @n
- * The value of the index must be greater than or equal to @c 0.
+ * @param[in] index The index of the element @n
+ * The value of the index must be greater than or equal to @c 0.
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified @c index is out of range.
+ * @exception E_OUT_OF_RANGE The specified @c index is out of the valid range.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
%setup -q
%build
+%if 0%{?tizen_build_binary_release_type_eng}
+CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
+%endif
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%ifarch %{ix86}
-CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%if 0%{?simulator}
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%else
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%endif
%else
+
+%if 0%{?tizen_build_binary_release_type_eng}
CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%else
+CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%endif
+%endif
# Call make instruction with smp support
make %{?jobs:-j%jobs}
Rectangle rect(0, 0, 0, 0);
rect.width = pPopupData->popupDim.width;
- rect.height = (2*pPopupData->spacePad) + (pPopupData->editDim.height*2) + pPopupData->btnDim.height + (2*pPopupData->labelDim.height);
+ rect.height = (2*pPopupData->spacePad) + (pPopupData->editDim.height*2) + pPopupData->panelHeight + (2*pPopupData->labelDim.height);
r = _WebPopup::Construct(true, Dimension(rect.width, rect.height));
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
String hostRealm(host);
hostRealm.Append(L": \n ");
hostRealm.Append(realm);
- hostRealm.Append(L"\"");
r = pLabel->Construct(rect, hostRealm);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pLayout->SetHorizontalAlignment(*pHostLabel, LAYOUT_HORIZONTAL_ALIGN_CENTER);
pLayout->SetHorizontalAlignment(*__pIdEditField, LAYOUT_HORIZONTAL_ALIGN_CENTER);
pLayout->SetHorizontalAlignment(*__pPwdEditField, LAYOUT_HORIZONTAL_ALIGN_CENTER);
- pLayout->SetHorizontalAlignment(*pButtonPanel, LAYOUT_HORIZONTAL_ALIGN_CENTER);
pLayout->SetSpacing(*__pPwdEditField, pPopupData->spacePad);
pLayout->SetSpacing(*pButtonPanel, pPopupData->spacePad);
{
result r = E_SUCCESS;
+ r = HidePopup();
+ SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
switch (actionId)
{
case ID_BUTTON_AUTH_PROCESS:
default:
break;
}
-
- r = HidePopup();
- SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
bool
#include <FUi_ControlManager.h>
#include <FUi_ResourceManager.h>
#include "FWebCtrl_CertificateConfirmPopup.h"
-#include "FWebCtrl_EflWebkit.h"
+#include "FWebCtrl_WebManager.h"
#include "FWebCtrl_Utility.h"
#include "FWebCtrl_WebImpl.h"
, __pCertificatePolicyData(null)
, __pParent(null)
, __pCertificatePopup(null)
+ , __reaction(false)
{
}
{
HandleUserAction(false);
}
+ if (__pCertificatePopup.get())
+ {
+ __pCertificatePopup.reset();
+ }
}
if( __certPopupMode == CERTIFICATE_POPUP_MODE_VIEW )
{
titleText = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SECURITY_CERTIFICATE_ABB");
- popupMaxHeight = 4*pPopupData->labelDim.height + pPopupData->btnDim.height + 2*pPopupData->sideMargin;
+ popupMaxHeight = 4*pPopupData->labelDim.height + pPopupData->panelHeight;
rect.height = 4*pPopupData->labelDim.height;
rect.width = pPopupData->labelDim.width;
idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_CLOSE)));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
}
else // CERTIFICATE_POPUP_MODE_CONFIRM
{
titleText = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SECURITY_WARNING_ABB");
- popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->btnDim.height + 2*pPopupData->sideMargin;
+ popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->panelHeight;
rect.height = 2*pPopupData->labelDim.height;
rect.width = pPopupData->labelDim.width;
r = CreateAndAddButtons(idList, titleList, pButtonPanel);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- pLayout->SetHorizontalFitPolicy(*pButtonPanel, FIT_POLICY_PARENT);
- pLayout->SetHorizontalAlignment(*pButtonPanel, LAYOUT_HORIZONTAL_ALIGN_CENTER);
-
- pLayout->SetSpacing(*pButtonPanel, 2*pPopupData->sideMargin);
-
SetPropagatedKeyEventListener(this);
return E_SUCCESS;
switch (actionId)
{
case ID_BUTTON_CERTIFICATE_ALLOW:
+ {
+ if (__reaction)
+ {
+ return;
+ }
+
HandleUserAction(true);
break;
+ }
case ID_BUTTON_CERTIFICATE_VIEW:
{
+ if (__reaction)
+ {
+ return;
+ }
+
+ __reaction = true;
std::unique_ptr<_CertificateConfirmPopup> pCertificatePopup(new (std::nothrow) _CertificateConfirmPopup());
SysTryReturnVoidResult(NID_WEB_CTRL, pCertificatePopup.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
r = __pCertificatePopup->ShowPopup();
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- __pCertificatePopup.release();
return;
}
case ID_BUTTON_CERTIFICATE_CANCEL:
+ {
+ if (__reaction)
+ {
+ return;
+ }
+
HandleUserAction(false);
break;
+ }
case ID_BUTTON_CERTIFICATE_CLOSE:
+ {
+ if (__reaction)
+ {
+ return;
+ }
+
break;
+ }
default:
SysAssert(false);
switch (requestId)
{
case ID_CERTIFICATE_CONFIRM_POPUP_CLOSE:
+ {
__pCertificatePopup.reset();
+
+ if (__reaction)
+ {
+ __reaction = false;
+ }
+
break;
+ }
default:
break;
}
certString.Append(GetStringOfToken(subject, L"/OU=") + L"\n");
certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_SERIAL_NUMBER_C"));
- certString.Append(L":\n");
+ certString.Append(L"\n");
certString.Append(certificate.GetSerialNumber() + L"\n\n\n");
//Issued by
//FingerPrints
certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_FINGERPRINTS_C"));
- certString.Append(L":\n\n");
+ certString.Append(L"\n\n");
certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_SIGNATURE_ALGORITHM_VODA"));
certString.Append(L":\n");
certString.Append(certificate.GetSignatureAlgorithm() + L"\n\n");
{
String fingerPrint;
StringUtil::Utf8ToString((const char*)pFingerPrint->GetPointer(), fingerPrint);
+ fingerPrint.SetLength(pFingerPrint->GetLimit());
certString.Append(fingerPrint + L"\n\n");
}
#include <FAppApp.h>
#include <FGrpPoint.h>
#include <FGrpRectangle.h>
-#include <FIoDbEnumerator.h>
#include <FSysVibrator.h>
#include <FUiAnimVisualElement.h>
-#include <FApp_AppInfo.h>
#include <FBaseSysLog.h>
#include <FBase_StringConverter.h>
#include <FGrp_CoordinateSystem.h>
-#include <FIo_DirectoryImpl.h>
-#include <FIo_DatabaseImpl.h>
-#include <FIo_FileImpl.h>
#include <FSecCert_CertService.h>
-#include <FSys_VibratorImpl.h>
#include <FUi_Control.h>
#include <FUi_Window.h>
#include "FUiAnim_EflNode.h"
static const char PLUGIN_DIRECTORY_PATH[] = "/usr/lib/osp/browser-plugin/";
-
-extern const wchar_t CUSTOM_DB_DIRECTORY_PATH[] = L"data/.webkit/customDatabase/";
-extern const wchar_t USER_CONFIRM_DB_NAME[] = L"userConfirm.db";
-extern const wchar_t GEOLOCATION_TABLE_NAME[] = L"geolocationPermission";
-extern const wchar_t CUSTOM_PROTOCOL_TABLE_NAME[] = L"customProtocol";
-extern const wchar_t CUSTOM_CONTENT_TABLE_NAME[] = L"customContent";
-extern const wchar_t CERTIFICATE_TABLE_NAME[] = L"certificate";
-
-
-static const int CUSTOM_DB_TABLE_COUNT= 4;
+static const wchar_t ICON_DB_DIRECTORY_PATH[] = L"data/.webkit/iconDatabase/";
+static const wchar_t ICON_DB_FILE_NAME[] = L"icon.db";
_EflWebkit::_EflWebkit(void)
{
__pContainerVisualElement->SetSurface(null);
}
+
delete __pSurface;
-// evas_object_smart_member_del(__pWebFrame);
- evas_object_del(__pWebFrame);
- __pWebFrame = null;
+ __pSurface = null;
+
+ if (__pWebFrame)
+ {
+ evas_object_del(__pWebFrame);
+ __pWebFrame = null;
+ }
}
ewk_context_additional_plugin_path_set(pContext, PLUGIN_DIRECTORY_PATH);
String certPath(_CertService::GetCertificateCrtFilePath());
- std::unique_ptr<char[]> pcertPath(_StringConverter::CopyToCharArrayN(certPath));
- SysTryReturn(NID_WEB_CTRL, pcertPath.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ std::unique_ptr<char[]> pCertPath(_StringConverter::CopyToCharArrayN(certPath));
+ SysTryReturn(NID_WEB_CTRL, pCertPath.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- ewk_context_certificate_file_set(pContext, pcertPath.get());
+ ewk_context_certificate_file_set(pContext, pCertPath.get());
- r = CreateResourceDirectory();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ String iconPath(App::App::GetInstance()->GetAppRootPath() + ICON_DB_DIRECTORY_PATH + ICON_DB_FILE_NAME);
+ std::unique_ptr<char[]> pIconPath(_StringConverter::CopyToCharArrayN(iconPath));
+ SysTryReturn(NID_WEB_CTRL, pIconPath.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- r = InitializeCustomDb();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = SetProxyAddress();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ ewk_context_icon_database_path_set(pContext, pIconPath.get());
InitializeCustomHeader();
result
-_EflWebkit::CreateResourceDirectory(void) const
+_EflWebkit::SetProxyAddress(char* pProxy) const
{
- String html5FeaturesPath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH);
-
- if (!_FileImpl::IsFileExist(html5FeaturesPath))
- {
- result r = E_SUCCESS;
-
- r = _DirectoryImpl::Create(html5FeaturesPath, true);
- SysTryReturnResult(NID_WEB_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. create html5 features directory.");
- }
-
- return E_SUCCESS;
-}
-
-
-result
-_EflWebkit::InitializeCustomDb(void) const
-{
- result r = E_SUCCESS;
-
- _DatabaseImpl db;
- String path(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
- String geolocationTable(GEOLOCATION_TABLE_NAME);
- String protocolTable(CUSTOM_PROTOCOL_TABLE_NAME);
- String contentTable(CUSTOM_CONTENT_TABLE_NAME);
- String certificateTable(CERTIFICATE_TABLE_NAME);
-
- r = db.Construct(path, "a+", null);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- std::unique_ptr<DbEnumerator> pEnum(db.QueryN(L"Select count(name) from sqlite_master Where type='table' And name in ('" + geolocationTable + L"', '" + protocolTable + L"', '" + contentTable + L"', '" + certificateTable + L"')"));
- if (pEnum.get())
- {
- int count = 0;
-
- r = pEnum->MoveNext();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = pEnum->GetIntAt(0, count);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
-
- if (count == CUSTOM_DB_TABLE_COUNT)
- {
- return E_SUCCESS;
- }
- }
-
- pEnum.reset();
- pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + geolocationTable + L"'"));
- if (!pEnum.get())
- {
- r = db.ExecuteSql(
- L"CREATE TABLE IF NOT EXISTS " + geolocationTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, origin TEXT, permission INTEGER)",
- true);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- }
-
- pEnum.reset();
- pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + protocolTable + L"'"));
- if (!pEnum.get())
- {
- r = db.ExecuteSql(
- L"CREATE TABLE IF NOT EXISTS " + protocolTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, baseUrl TEXT, url TEXT, mime TEXT, allow INTEGER)",
- true);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- }
-
- pEnum.reset();
- pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + contentTable + L"'"));
- if (!pEnum.get())
- {
- r = db.ExecuteSql(
- L"CREATE TABLE IF NOT EXISTS " + contentTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, baseUrl TEXT, url TEXT, mime TEXT, allow INTEGER)",
- true);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- }
-
- pEnum.reset();
- pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + certificateTable + L"'"));
- if (!pEnum.get())
- {
- r = db.ExecuteSql(
- L"CREATE TABLE IF NOT EXISTS " + certificateTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, pem TEXT, allow INTEGER)",
- true);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- }
-
- return E_SUCCESS;
-}
-
-
-result
-_EflWebkit::SetProxyAddress(void) const
-{
- int ret = -1;
- connection_h handle = null;
-
- ret = connection_create(&handle);
- SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to create connection.");
-
- char* pProxy = null;
- connection_address_family_e family = CONNECTION_ADDRESS_FAMILY_IPV4;
-
- ret = connection_get_proxy(handle, family, &pProxy);
- SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to get proxy address.");
-
- ret = connection_destroy(handle);
- SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to destroy connection.");
-
Ewk_Context* pContext = ewk_view_context_get(__pWebFrame);
SysAssertf(pContext, "Failed to get context.");
SysLog(NID_WEB_CTRL, "The current value of proxy is %s", pProxy);
- if (pProxy)
- {
- free(pProxy);
- }
-
return E_SUCCESS;
}
void
_EflWebkit::InitializeCustomHeader(void) const
{
- std::unique_ptr<char[]> pLang(vconf_get_str(VCONFKEY_LANGSET));
- std::unique_ptr<char[]> pRegion(vconf_get_str(VCONFKEY_LANGSET));
+ char pAcceptLang[6] = {0, };
+ char* pLangSet = vconf_get_str(VCONFKEY_LANGSET);
const char name[] = "Accept-Language";
- String value(L"");
- if (pLang.get())
+ if (pLangSet && strlen(pLangSet))
{
- if (pRegion.get())
- {
- value.Append(pLang.get());
- value.Append(L"_");
- value.Append(pRegion.get());
- }
- else
+ strncpy(pAcceptLang, pLangSet, 2);
+
+ char *pRawData = strchr(pLangSet, '_');
+ if (pRawData && strlen(pLangSet) >= 5)
{
- value.Append(pLang.get());
+ strcat(pAcceptLang, "-");
+ strncat(pAcceptLang, pRawData + 1, 2);
}
}
else
{
- value = L"en";
+ strcat(pAcceptLang, "en");
}
+ free(pLangSet);
- std::unique_ptr<char[]> pValue(_StringConverter::CopyToCharArrayN(value));
- SysTryReturnVoidResult(NID_WEB_CTRL, pValue.get(), E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
-
- ewk_view_custom_header_add(__pWebFrame, name, pValue.get());
+ ewk_view_custom_header_add(__pWebFrame, name, pAcceptLang);
}
namespace Tizen { namespace Web { namespace Controls
{
-_OSP_EXPORT_ extern const wchar_t CUSTOM_DB_DIRECTORY_PATH[];
-_OSP_EXPORT_ extern const wchar_t USER_CONFIRM_DB_NAME[];
-_OSP_EXPORT_ extern const wchar_t GEOLOCATION_TABLE_NAME[];
-_OSP_EXPORT_ extern const wchar_t CUSTOM_PROTOCOL_TABLE_NAME[];
-_OSP_EXPORT_ extern const wchar_t CUSTOM_CONTENT_TABLE_NAME[];
-_OSP_EXPORT_ extern const wchar_t CERTIFICATE_TABLE_NAME[];
-
class _EflWebkit
: public Tizen::Base::Object
{
Evas_Object* GetWebEvasObject(void) const;
+ result SetProxyAddress(char* pProxy) const;
+
// result GetPixelBufferFromEvasObject(const Evas_Object* source, Tizen::Graphics::BufferInfo& bufferInfo);
private:
result SetWebConfiguration(void) const;
- result SetProxyAddress(void) const;
-
- result CreateResourceDirectory(void) const;
-
- result InitializeCustomDb(void) const;
-
void InitializeCustomHeader(void) const;
_EflWebkit& operator =(const _EflWebkit&);
#include <FIoDbEnumerator.h>
#include <FWebCtrlGeolocationPermissionManager.h>
#include <FIo_DatabaseImpl.h>
-#include "FWebCtrl_EflWebkit.h"
+#include "FWebCtrl_WebManager.h"
#include "FWebCtrl_GeolocationPermissionManagerImpl.h"
SysAssertf(pSmartData, "Failed to get webkit smart data.");
pSmartData->api->gesture_move(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
- //To delete magnifier
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- SysAssertf(pTouchManager, "Failed to get touch manager.");
-
- Point absPoint(_CoordinateSystemUtils::ConvertToInteger(pTouchManager->GetPosition(pTouchManager->GetCurrentPointId())));
-
- Ewk_Touch_Point* pPoint = static_cast< Ewk_Touch_Point* >(calloc(1, sizeof(Ewk_Touch_Point)));
- pPoint->id = 0;
- pPoint->x = absPoint.x;
- pPoint->y = absPoint.y;
- pPoint->state = EVAS_TOUCH_POINT_CANCEL;
-
- Eina_List* pPointList = null;
- pPointList = eina_list_append(pPointList, pPoint);
-
- ewk_view_feed_touch_event(__pWebCore->GetWebNativeNode(), EWK_TOUCH_CANCEL, pPointList, null);
-
- void* pData = null;
- EINA_LIST_FREE(pPointList, pData)
- free(pData);
-
__longPressed = true;
return true;
__pWebCore->ChangeGesture(WEB_GESTURE_TYPE_PANNING);
+ if (!_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsScrollEnabled())
+ {
+ return false;
+ }
+
return true;
}
bool
_TapGestureState::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
{
- if (__pWebCore->Contains(__pressedPosition))
+ if (!__pWebCore->Contains(__pressedPosition))
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(__pressedPosition)));
-
- if (__longPressed)
- {
- Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pView, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
- SysTryReturn(NID_WEB_CTRL, pEwkHitTest, true, E_SYSTEM, "Failed to get hit test.");
-
- String tagName(ewk_hit_test_tag_name_get(pEwkHitTest));
-
- Eina_Hash* pAttrHash = ewk_hit_test_attribute_hash_get(pEwkHitTest);
- char* pValue = reinterpret_cast< char* >(eina_hash_find(pAttrHash, "contenteditable"));
- if (tagName.Equals(L"INPUT", false) || tagName.Equals(L"TEXTAREA", false) || pValue)
- {
- Eina_Rectangle leftHandle;
- Eina_Rectangle rightHandle;
+ return OnTouchCanceled(source, touchInfo);
+ }
+
+ Evas_Object* pView = __pWebCore->GetWebNativeNode();
+ Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(__pressedPosition)));
- ewk_view_text_selection_range_get(pView, &leftHandle, &rightHandle);
- if (((rightHandle.x + rightHandle.w) == 0) && ((rightHandle.y + rightHandle.h) == 0))
- {
- Ewk_Event_Gesture gestureEvent;
+ if (__longPressed)
+ {
+ Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pView, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
+ SysTryReturn(NID_WEB_CTRL, pEwkHitTest, true, E_SYSTEM, "Failed to get hit test.");
- SetGestureEvent(gestureEvent, EWK_GESTURE_LONG_PRESS, absPoint, Point(0, 0), 0.0, 1);
+ String tagName(ewk_hit_test_tag_name_get(pEwkHitTest));
- const Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(__pWebCore->GetWebNativeNode()));
- SysAssertf(pSmartData, "Failed to get webkit smart data.");
- pSmartData->api->gesture_end(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
- }
- }
- }
- else
+ Eina_Hash* pAttrHash = ewk_hit_test_attribute_hash_get(pEwkHitTest);
+ char* pValue = reinterpret_cast< char* >(eina_hash_find(pAttrHash, "contenteditable"));
+ if (tagName.Equals(L"INPUT", false) || tagName.Equals(L"TEXTAREA", false) || pValue)
{
- Ewk_Event_Gesture gestureEvent;
- int touchCount = 1;
- if (__doubleTapped)
- {
- touchCount = 2;
- }
+ Eina_Rectangle leftHandle;
+ Eina_Rectangle rightHandle;
- SetGestureEvent(gestureEvent, EWK_GESTURE_TAP, absPoint, Point(0, 0), 0.0, touchCount);
+ ewk_view_text_selection_range_get(pView, &leftHandle, &rightHandle);
+ if (((rightHandle.x + rightHandle.w) == 0) && ((rightHandle.y + rightHandle.h) == 0))
+ {
+ Ewk_Event_Gesture gestureEvent;
- const Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(__pWebCore->GetWebNativeNode()));
- SysAssertf(pSmartData, "Failed to get webkit smart data.");
- pSmartData->api->gesture_end(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
- }
+ SetGestureEvent(gestureEvent, EWK_GESTURE_LONG_PRESS, absPoint, Point(0, 0), 0.0, 1);
- String selectedText(ewk_view_text_selection_text_get(pView));
- if (selectedText.GetLength() > 0)
- {
- evas_object_smart_callback_call(pView, "text,selected", NULL);
+ const Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(pView));
+ SysAssertf(pSmartData, "Failed to get webkit smart data.");
+ pSmartData->api->gesture_end(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
+ }
}
}
else
{
- OnTouchCanceled(source, touchInfo);
+ Ewk_Event_Gesture gestureEvent;
+ int touchCount = 1;
+ if (__doubleTapped)
+ {
+ touchCount = 2;
+ }
+
+ SetGestureEvent(gestureEvent, EWK_GESTURE_TAP, absPoint, Point(0, 0), 0.0, touchCount);
+
+ const Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(pView));
+ SysAssertf(pSmartData, "Failed to get webkit smart data.");
+ pSmartData->api->gesture_end(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
}
return true;
_PanningGestureState::_PanningGestureState(_Web* pWeb)
: __pWebCore(pWeb)
- , __textSelected(false)
- , __textChanged(false)
- , __selectedText(L"")
{
}
}
-void
-_PanningGestureState::InitializeTextSelectionStatus(void)
-{
- __selectedText = String(ewk_view_text_selection_text_get(__pWebCore->GetWebNativeNode()));
- if (__selectedText.GetLength() > 0)
- {
- __textSelected = true;
- }
- else
- {
- __textSelected = false;
- }
- __textChanged = false;
-}
-
-
bool
_PanningGestureState::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
bool
_PanningGestureState::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- if (_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsScrollEnabled())
+ if (!_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsScrollEnabled())
{
- Ewk_Event_Gesture gestureEvent;
- Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(touchInfo.GetCurrentPosition())));
+ return false;
+ }
- SetGestureEvent(gestureEvent, EWK_GESTURE_PAN, absPoint, Point(0, 0), 0.0, 0);
+ Ewk_Event_Gesture gestureEvent;
+ Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(touchInfo.GetCurrentPosition())));
- const Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(pView));
- SysAssertf(pSmartData, "Failed to get webkit smart data.");
- pSmartData->api->gesture_move(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
- }
+ SetGestureEvent(gestureEvent, EWK_GESTURE_PAN, absPoint, Point(0, 0), 0.0, 0);
- if (__textSelected && !__textChanged)
- {
- if (!__selectedText.Equals(String(ewk_view_text_selection_text_get(pView))))
- {
- __textChanged = true;
- }
- }
+ const Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(__pWebCore->GetWebNativeNode()));
+ SysAssertf(pSmartData, "Failed to get webkit smart data.");
+ pSmartData->api->gesture_move(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
return true;
}
SetGestureEvent(gestureEvent, EWK_GESTURE_PAN, absPoint, Point(0, 0), 0.0, 0);
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- const Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(pView));
+ const Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(__pWebCore->GetWebNativeNode()));
SysAssertf(pSmartData, "Failed to get webkit smart data.");
pSmartData->api->gesture_end(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
- if (__textChanged)
- {
- evas_object_smart_callback_call(pView, "text,selected", NULL);
- }
-
__pWebCore->ChangeGesture(WEB_GESTURE_TYPE_TAP);
return true;
{
__pWebCore->ChangeGesture(WEB_GESTURE_TYPE_FLICK);
- int duration = gesture.GetDuration();
- gesture.GetDistance(__velocity.x, __velocity.y);
+ if (_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsScrollEnabled())
+ {
+ int duration = gesture.GetDuration();
+ gesture.GetDistance(__velocity.x, __velocity.y);
- __velocity.x = (__velocity.x * FLICK_SCROLL_WEIGHT) / duration;
- __velocity.y = (__velocity.y * FLICK_SCROLL_WEIGHT) / duration;
+ __velocity.x = (__velocity.x * FLICK_SCROLL_WEIGHT) / duration;
+ __velocity.y = (__velocity.y * FLICK_SCROLL_WEIGHT) / duration;
+ }
return true;
}
SysAssertf(pSmartData, "Failed to get webkit smart data.");
pSmartData->api->gesture_end(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
- SetGestureEvent(gestureEvent, EWK_GESTURE_FLICK, absPoint, __velocity, 0.0, 0);
+ if (_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsScrollEnabled())
+ {
+ SetGestureEvent(gestureEvent, EWK_GESTURE_FLICK, absPoint, __velocity, 0.0, 0);
- pSmartData->api->gesture_start(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
+ pSmartData->api->gesture_start(const_cast< Ewk_View_Smart_Data* >(pSmartData), &gestureEvent);
+ }
__pWebCore->ChangeGesture(WEB_GESTURE_TYPE_TAP);
virtual ~_PanningGestureState(void);
- void InitializeTextSelectionStatus(void);
-
virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
private:
_Web* __pWebCore;
-
- bool __textSelected;
-
- bool __textChanged;
-
- Tizen::Base::String __selectedText;
};
class _FlickGestureState
#include <FUiCtrlEditDate.h>
#include <FUiCtrlEditTime.h>
#include <FUiCtrlLabel.h>
+#include <FUiCtrlPanel.h>
#include <FUiIActionEventListener.h>
#include <FUiKeyEventInfo.h>
#include <FUiLayout.h>
#include <FUiVerticalBoxLayout.h>
#include <FWebCtrlAuthenticationChallenge.h>
#include <FSys_SystemResource.h>
+#include <FUi_ControlManager.h>
#include <FUi_ResourceManager.h>
#include "FWebCtrl_WebImpl.h"
#include "FWebCtrl_InputPickerPopup.h"
using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
using namespace Tizen::Graphics;
using namespace Tizen::Locales;
using namespace Tizen::System;
_InputPickerPopup::_InputPickerPopup(void)
- : __pPopup(null)
- , __pEditDate(null)
+ : __pEditDate(null)
, __pEditTime(null)
, __pSelectionBtn(null)
- , __modal(0)
- , __isModal(false)
+ , __pColorPicker(null)
+ , __pButtonPanel(null)
, __popupHeight(0)
, __popupWidth(0)
- , __btnHeight(0)
+ , __panelHeight(0)
, __inputType(EWK_INPUT_TYPE_TIME)
{
}
_InputPickerPopup::~_InputPickerPopup(void)
{
- if (__isModal == true)
+ if (IsModalPopup())
{
HidePopup();
}
int dateHeight = 0;
int dateWidth = 0;
int sideMargin = 0;
+ int internalGap = 0;
DateTime inputDateTime;
__inputPickerMode = INPUT_MODE_DATE;
_ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
+ _WebPopupData* pPopupData = _WebPopup::GetPopupData();
+ SysTryReturn(NID_WEB_CTRL, pPopupData, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
+
GET_SHAPE_CONFIG(EDITDATE::WIDTH, orientation, dateWidth);
GET_SHAPE_CONFIG(EDITDATE::HEIGHT, orientation, dateHeight);
GET_SHAPE_CONFIG(POPUP::SIDE_BORDER, orientation, sideMargin);
GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, __popupWidth);
GET_SHAPE_CONFIG(MESSAGEBOX::MIN_HEIGHT, orientation, __popupHeight);
- GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, orientation, __btnHeight);
+ GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_INTERNAL_GAP, orientation, internalGap);
+
+ __panelHeight = pPopupData->panelHeight;
- __popupWidth -= 2*sideMargin;
+ __popupWidth += sideMargin;
std::unique_ptr<EditDate> pEditDate(new (std::nothrow) EditDate());
SysTryReturnResult(NID_WEB_CTRL, pEditDate.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
std::unique_ptr<EditTime> pEditTime(new (std::nothrow) EditTime());
SysTryReturnResult(NID_WEB_CTRL, pEditTime.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
+ int space = dateHeight/4;
+
+ _SystemResource* pSysResource = _SystemResource::GetInstance();
+ SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
+
switch (__inputType)
{
case EWK_INPUT_TYPE_TIME :
- __popupHeight = __popupHeight + dateHeight + __btnHeight;
+ __popupHeight = dateHeight + space + __panelHeight;
r = CreatePopup();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pPopup->SetTitleText("Select time");
+ SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SET_TIME"));
r = pEditTime->Construct(Point(0, 0), L"Time (Default format) :");
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pPopup->AddControl(*pEditTime);
+ r = AddControl(*pEditTime);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pEditTime->SetTime(inputDateTime);
__pEditTime = pEditTime.release();
case EWK_INPUT_TYPE_DATETIMELOCAL :
- __popupHeight = __popupHeight + 2*dateHeight + __btnHeight;
+ __popupHeight = 2*dateHeight + space + __panelHeight + internalGap;
r = CreatePopup();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pPopup->SetTitleText("Select datetime");
+ SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SET_DATE_AND_TIME_ABB"));
r = pEditDate->Construct(Point(0, 0), L"Date (Default format) :");
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = pEditTime->Construct(Point(0, 0), L"Time (Default format) :");
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pPopup->AddControl(*pEditTime);
+ r = AddControl(*pEditTime);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pEditTime->SetTime(inputDateTime);
__pEditTime = pEditTime.release();
- r = __pPopup->AddControl(*pEditDate);
+ r = AddControl(*pEditDate);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pEditDate->SetDate(inputDateTime);
//fall through
case EWK_INPUT_TYPE_MONTH :
- __popupHeight = __popupHeight + dateHeight + __btnHeight;
+ __popupHeight = dateHeight + space + __panelHeight;
r = CreatePopup();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pPopup->SetTitleText("Select date");
+ SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SET_DATE"));
r = pEditDate->Construct(Point(0, 0), L"Date (Default format) :");
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = __pPopup->AddControl(*pEditDate);
+ r = AddControl(*pEditDate);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pEditDate->SetDate(inputDateTime);
return r;
}
- r = AddButton(ID_BUTTON_INPUT_DATE_SELECTION);
+ __pButtonPanel = CreateAndAddPanel();
+ SysTryReturn(NID_WEB_CTRL, __pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ ArrayList idList;
+ r = idList.Construct();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ ArrayList titleList;
+ r = titleList.Construct();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ idList.Add(*(new Integer(ID_BUTTON_INPUT_DATE_SELECTION)));
+
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
+
+ r = CreateAndAddButtons(idList, titleList, __pButtonPanel);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pPopup->SetPropagatedKeyEventListener(this);
-
- std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(__pPopup->GetLayoutN()));
+ SetPropagatedKeyEventListener(this);
+
+ std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(GetLayoutN()));
SysTryReturnResult(NID_WEB_CTRL, pLayout.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
if (__pEditDate)
{
+ __pEditDate->SetSize(__popupWidth,__pEditDate->GetSize().height);
pLayout->SetHorizontalAlignment(*__pEditDate, LAYOUT_HORIZONTAL_ALIGN_LEFT);
pLayout->SetSpacing(*__pEditDate, sideMargin);
}
if (__pEditTime)
{
+ __pEditTime->SetSize(__popupWidth,__pEditTime->GetSize().height);
pLayout->SetHorizontalAlignment(*__pEditTime, LAYOUT_HORIZONTAL_ALIGN_LEFT);
pLayout->SetSpacing(*__pEditTime, sideMargin);
}
- pLayout->SetHorizontalAlignment(*__pSelectionBtn, LAYOUT_HORIZONTAL_ALIGN_CENTER);
- pLayout->SetSpacing(*__pSelectionBtn, sideMargin);
+ if (__pButtonPanel)
+ {
+ pLayout->SetSpacing(*__pButtonPanel, space);
+ }
return E_SUCCESS;
}
_ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
- CalculateColorPickerPopupSize(orientation);
-
- r = CreatePopup();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ _SystemResource* pSysResource = _SystemResource::GetInstance();
+ SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- __pPopup->SetTitleText("Select color");
+ _WebPopupData* pPopupData = _WebPopup::GetPopupData();
+ SysTryReturn(NID_WEB_CTRL, pPopupData, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
std::unique_ptr<ColorPicker> pColorPicker(new (std::nothrow) ColorPicker());
SysTryReturnResult(NID_WEB_CTRL, pColorPicker.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
pColorPicker->SetColor(color);
- __pPopup->SetPropagatedKeyEventListener(this);
- r = __pPopup->AddControl(*pColorPicker);
+ CalculateColorPickerPopupSize(orientation);
+
+ r = CreatePopup();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SET_COLOUR"));
+
+ SetPropagatedKeyEventListener(this);
+
+ r = AddControl(*pColorPicker);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pColorPicker = pColorPicker.release();
- r = AddButton(ID_BUTTON_INPUT_COLOR_SELECTION);
+
+ __pButtonPanel = CreateAndAddPanel();
+ SysTryReturn(NID_WEB_CTRL, __pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ ArrayList idList;
+ r = idList.Construct();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ ArrayList titleList;
+ r = titleList.Construct();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ idList.Add(*(new Integer(ID_BUTTON_INPUT_COLOR_SELECTION)));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
+
+ r = CreateAndAddButtons(idList, titleList, __pButtonPanel);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(__pPopup->GetLayoutN()));
+ std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(GetLayoutN()));
SysTryReturnResult(NID_WEB_CTRL, pLayout.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
pLayout->SetHorizontalAlignment(*__pColorPicker, LAYOUT_HORIZONTAL_ALIGN_LEFT);
- pLayout->SetHorizontalAlignment(*__pSelectionBtn, LAYOUT_HORIZONTAL_ALIGN_CENTER);
int sideMargin = 0;
GET_SHAPE_CONFIG(POPUP::SIDE_BORDER, orientation, sideMargin);
pLayout->SetSpacing(*__pColorPicker, sideMargin);
- pLayout->SetSpacing(*__pSelectionBtn, sideMargin);
return E_SUCCESS;
{
int sideMargin = 0;
Dimension dim;
+ _WebPopupData* pPopupData = _WebPopup::GetPopupData();
GET_SHAPE_CONFIG(POPUP::SIDE_BORDER, orientation, sideMargin);
- GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, __popupWidth);
- GET_SHAPE_CONFIG(MESSAGEBOX::MIN_HEIGHT, orientation, __popupHeight);
- GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, orientation, __btnHeight);
+ __panelHeight = pPopupData->panelHeight;
GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, orientation, dim);
dim.width += sideMargin;
__popupWidth = dim.width;
- __popupHeight = __popupHeight + dim.height + __btnHeight;
+ __popupHeight = dim.height + __panelHeight;
}
_InputPickerPopup::CreatePopup(void)
{
result r = E_SUCCESS;
+ bool hasTitle = true;
- VerticalBoxLayout layout;
- r = layout.Construct(VERTICAL_DIRECTION_DOWNWARD);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- std::unique_ptr<Popup> pPopup(new (std::nothrow) Popup());
- SysTryReturnResult(NID_WEB_CTRL, pPopup.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
-
- r = pPopup->Construct(layout, layout, true, Dimension(__popupWidth, __popupHeight));
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pPopup = std::move(pPopup);
-
- return E_SUCCESS;
-}
-
-
-result
-_InputPickerPopup::AddButton(_InputPickerButtonId buttonId)
-{
- result r = E_SUCCESS;
-
- String buttonStr;
-
- _SystemResource* pSysResource = _SystemResource::GetInstance();
- SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
-
- buttonStr = pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK");
-
- std::unique_ptr<Button> pSelectionBtn(new (std::nothrow) Button());
- SysTryReturnResult(NID_WEB_CTRL, pSelectionBtn.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
-
- r = pSelectionBtn->Construct(Rectangle(0, 0, DATE_POPUP_BUTTON_WIDTH, __btnHeight), buttonStr);
+ r = _WebPopup::Construct(hasTitle, Dimension(__popupWidth, __popupHeight));
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- pSelectionBtn->SetActionId(buttonId);
- __pPopup->AddControl(*pSelectionBtn);
- pSelectionBtn->AddActionEventListener(*this);
-
- __pSelectionBtn = pSelectionBtn.release();
-
return E_SUCCESS;
}
-
void
_InputPickerPopup::OnActionPerformed(const Control& source, int actionId)
{
int x = 0;
int y = 0;
+ _WebPopupData* __pWebPopupData = _WebPopup::GetPopupData();
Dimension screenRect = _ControlManager::GetInstance()->GetScreenSize();
CalculateColorPickerPopupSize(orientation);
+ __popupHeight += __pWebPopupData->titleHeight;
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
y = (screenRect.width - __popupHeight) / 2;
}
- r = __pPopup->SetBounds(Rectangle(x, y, __popupWidth, __popupHeight));
+ r = SetBounds(Rectangle(x, y, __popupWidth, __popupHeight));
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = __pButtonPanel->SetSize(__popupWidth, __popupHeight);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ int buttonMargin;
+ int idCount = 1;
+ GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_01, _CONTROL_ORIENTATION_PORTRAIT, buttonMargin);
+
+ int buttonWidth = (__popupWidth - buttonMargin*(idCount+1)) / idCount;
+ int buttonTopMargin = (__pWebPopupData->panelHeight - __pWebPopupData->btnDim.height)/2;
+
+ if (__pButtonPanel->GetControl(0))
+ {
+ r = (__pButtonPanel->GetControl(0))->SetBounds(Rectangle(buttonMargin, buttonTopMargin, buttonWidth, __pWebPopupData->btnDim.height));
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
return E_SUCCESS;
}
}
-result
-_InputPickerPopup::ShowPopup(void)
-{
- result r = E_SUCCESS;
-
- r = __pPopup->SetShowState(true);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- __isModal = true;
-
- r = __pPopup->DoModal(__modal);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return E_SUCCESS;
-}
-
-
-result
-_InputPickerPopup::HidePopup(void)
-{
- result r = E_SUCCESS;
-
- r = __pPopup->SetShowState(false);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- __isModal = false;
-
- r = __pPopup->EndModal(__modal);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return E_SUCCESS;
-}
-
bool
_InputPickerPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
{
#include <FUiIActionEventListener.h>
#include <FUiIPropagatedKeyEventListener.h>
#include <FUi_ControlManager.h>
+#include "FWebCtrl_WebPopup.h"
namespace Tizen { namespace Ui
{
class _InputPickerPopup
- : public Tizen::Base::Object
- , virtual public Tizen::Ui::IActionEventListener
+ : public _WebPopup
, public Tizen::Ui::IPropagatedKeyEventListener
{
Tizen::Base::String GetDate(void) const;
Tizen::Graphics::Color GetColor(void) const;
- result ShowPopup(void);
- result HidePopup(void);
-
virtual bool OnKeyPressed (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
virtual bool OnKeyReleased (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
virtual bool OnPreviewKeyPressed (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
result CreatePopup(void);
- result AddButton(_InputPickerButtonId buttonId);
-
void CalculateColorPickerPopupSize(Tizen::Ui::_ControlOrientation orientation);
result UpdateDate(void);
private:
- std::unique_ptr<Tizen::Ui::Controls::Popup> __pPopup;
Tizen::Ui::Controls::EditDate* __pEditDate;
Tizen::Ui::Controls::EditTime* __pEditTime;
Tizen::Ui::Controls::Button* __pSelectionBtn;
Tizen::Ui::Controls::ColorPicker* __pColorPicker;
-
- int __modal;
- bool __isModal;
+ Tizen::Ui::Controls::Panel* __pButtonPanel;
int __popupHeight;
int __popupWidth;
- int __btnHeight;
+ int __panelHeight;
Ewk_Input_Type __inputType;
Tizen::Base::String __dateStr;
_WebPopupData* pPopupData = _WebPopup::GetPopupData();
SysTryReturn(NID_WEB_CTRL, pPopupData, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
- popupHeight = pPopupData->editDim.height + pPopupData->labelDim.height + pPopupData->btnDim.height + (2 * pPopupData->spacePad);
+ popupHeight = pPopupData->editDim.height + pPopupData->labelDim.height + pPopupData->panelHeight + (2 * pPopupData->spacePad);
r = _WebPopup::Construct(true, Dimension(pPopupData->popupDim.width, popupHeight));
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
ArrayList titleList;
r = titleList.Construct();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
r = CreateAndAddButtons(idList, titleList, pButtonPanel);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pLayout->SetHorizontalAlignment(*pTmpTextBox, LAYOUT_HORIZONTAL_ALIGN_CENTER);
pLayout->SetHorizontalAlignment(*__pEditField, LAYOUT_HORIZONTAL_ALIGN_CENTER);
- pLayout->SetHorizontalAlignment(*pButtonPanel, LAYOUT_HORIZONTAL_ALIGN_CENTER);
pLayout->SetSpacing(*__pEditField, pPopupData->spacePad);
pLayout->SetSpacing(*pButtonPanel, pPopupData->spacePad);
#include <FSys_SystemResource.h>
#include <FUi_ResourceManager.h>
#include "FWebCtrl_SelectBox.h"
+#include "FWebCtrl_WebImpl.h"
using namespace Tizen::Base;
, __pWebView(null)
, __pToggledArray(null)
, __url(L"")
+ , __pImpl(null)
{
}
result
-_SelectBox::Construct(bool isMultiSelect, const String& title, int listCount, Evas_Object* pWebView, const String& url)
+_SelectBox::Construct(Tizen::Web::Controls::_WebImpl* pImpl, bool isMultiSelect, const String& title, int listCount, Evas_Object* pWebView, const String& url)
{
result r = E_SUCCESS;
Rectangle rect;
__pWebView = pWebView;
__url = const_cast< String& >(url);
+ __pImpl = pImpl;
GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_HEIGHT, __orientation, listItemHeight);
_WebPopupData* pPopupData = _WebPopup::GetPopupData();
SysTryReturn(NID_WEB_CTRL, pPopupData, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
- listMaxHeihgt = listCount * listItemHeight + pPopupData->btnDim.height + pPopupData->spacePad;
+ listMaxHeihgt = listCount * listItemHeight;
rect.height = listMaxHeihgt;
rect.width = pPopupData->popupDim.width;
__pListView = pListView.release();
- Panel* pButtonPanel = CreateAndAddPanel();
- SysTryReturn(NID_WEB_CTRL, pButtonPanel, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
+ if (__multiSelection)
+ {
+ Panel* pButtonPanel = CreateAndAddPanel();
+ SysTryReturn(NID_WEB_CTRL, pButtonPanel, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
- _SystemResource* pSysResource = _SystemResource::GetInstance();
- SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
+ _SystemResource* pSysResource = _SystemResource::GetInstance();
+ SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- ArrayList idList;
- r = idList.Construct();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ ArrayList idList;
+ r = idList.Construct();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- idList.Add(*(new Integer(ID_BUTTON_CANCEL)));
- if (__multiSelection)
- {
idList.Add(*(new Integer(ID_BUTTON_SELECTION)));
- }
- ArrayList titleList;
- r = titleList.Construct();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ ArrayList titleList;
+ r = titleList.Construct();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
- if (__multiSelection)
- {
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
__pToggledArray = eina_inarray_new(sizeof(int), 0);
SysTryReturnResult(NID_WEB_CTRL, __pToggledArray, E_OUT_OF_MEMORY, "Memory Allocation failed.");
- }
-
- r = CreateAndAddButtons(idList, titleList, pButtonPanel);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(GetLayoutN()));
- SysTryReturn(NID_WEB_CTRL, pLayout.get(), r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
- pLayout->SetSpacing(*pButtonPanel, pPopupData->spacePad);
+ r = CreateAndAddButtons(idList, titleList, pButtonPanel);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
SetPropagatedKeyEventListener(this);
result r = HidePopup();
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pImpl->SendUserEvent(ID_USER_SCRIPT_SELECTBOX_CLOSE, null);
}
}
SysAssertf(false, "Invalid Action ID");
}
}
+
+ __pImpl->SendUserEvent(ID_USER_SCRIPT_SELECTBOX_CLOSE, null);
}
bool
{
ewk_view_popup_menu_select(__pWebView, __prevIndex);
}
- }
+ }
+
+ __pImpl->SendUserEvent(ID_USER_SCRIPT_SELECTBOX_CLOSE, null);
}
return false;
#include <FUiIPropagatedKeyEventListener.h>
#include <FUi_ControlManager.h>
#include "FWebCtrl_WebPopup.h"
+#include "FWebCtrl_WebImpl.h"
namespace Tizen { namespace Graphics
{
*/
virtual ~_SelectBox(void);
- result Construct(bool isMultiSelect, const Tizen::Base::String& title, int listItemCnt, Evas_Object* pWebView = null, const Tizen::Base::String& url = L"");
+ result Construct(Tizen::Web::Controls::_WebImpl* pImpl, bool isMultiSelect, const Tizen::Base::String& title, int listItemCnt, Evas_Object* pWebView = null, const Tizen::Base::String& url = L"");
Tizen::Base::Collection::IList* GetSelectedListN(void) const;
//IListViewItemProvider
private:
Tizen::Base::Collection::ArrayList __listElementArray;
Tizen::Ui::Controls::ListView* __pListView;
+ Tizen::Web::Controls::_WebImpl* __pImpl;
bool __multiSelection;
int __SelectedIndex;
int __prevIndex;
#include <FBaseSysLog.h>
#include <FBaseUtilUri.h>
#include <FGrpDimension.h>
+#include <FGrpFont.h>
#include <FGrpRectangle.h>
#include <FIoDbEnumerator.h>
#include <FIoDbStatement.h>
#include <FUiCtrlButton.h>
#include <FUiCtrlLabel.h>
#include <FUiCtrlPanel.h>
+#include <FUiCtrlScrollPanel.h>
#include <FUiKeyEventInfo.h>
#include <FUiLayout.h>
#include <FUiVerticalBoxLayout.h>
+#include <FGrp_TextTextObject.h>
+#include <FGrp_TextTextSimple.h>
#include <FIo_DatabaseImpl.h>
#include <FSys_SystemResource.h>
#include <FUi_ControlManager.h>
#include <FUi_ResourceManager.h>
-#include "FWebCtrl_EflWebkit.h"
+#include "FWebCtrl_WebManager.h"
#include "FWebCtrl_UserConfirmPopup.h"
#include "FWebCtrl_Utility.h"
#include "FWebCtrl_WebImpl.h"
using namespace Tizen::Base::Collection;
using namespace Tizen::Base::Utility;
using namespace Tizen::Graphics;
+using namespace Tizen::Graphics::_Text;
using namespace Tizen::Io;
using namespace Tizen::Security::Cert;
using namespace Tizen::System;
{
+static const int TEXT_SIZE_ADJUST = 1;
+
+
_UserConfirmPopup::_UserConfirmPopup(void)
: __pUserPolicyData(null)
, __userConfirmMode(USER_CONFIRM_USERMEDIA)
, __pCheckButton(null)
+ , __isUserActionNeeded(false)
, __sync(false)
, __pImpl(null)
{
_UserConfirmPopup::~_UserConfirmPopup(void)
{
-
- if (IsModalPopup())
+ if (__isUserActionNeeded == true)
{
HandleUserAction(EINA_FALSE);
+ __isUserActionNeeded = false;
}
}
__userConfirmMode = userConfirmMode;
__sync = sync;
+ __isUserActionNeeded = true;
+
bool hasTitle = true;
- int popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->btnDim.height + 2*pPopupData->sideMargin;
+ int popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->panelHeight;
__pImpl = pImpl;
SysAssertf(__pImpl != null, "Failed to get _WebImpl");
if (__userConfirmMode == USER_SCRIPT_ALERT)
{
- popupMaxHeight -= 2*pPopupData->sideMargin;
hasTitle = false;
}
SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SECURITY_WARNING_ABB"));
}
- Rectangle rect(0, 0, 0, 0);
-
- //label
- rect.height = 2*pPopupData->labelDim.height;
- rect.width = pPopupData->labelDim.width;
-
- std::unique_ptr<Label> pLabel(new (std::nothrow) Label());
- SysTryReturnResult(NID_WEB_CTRL, pLabel.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
-
String message = L"";
if (userConfirmMode >= USER_SCRIPT_ALERT && userConfirmMode <= USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED)
{
{
message = GetMessageFromPolicy();
}
+
+ Rectangle rect(0, 0, 0, 0);
+
+ //label
+ rect.height = 2*pPopupData->labelDim.height;
+ rect.width = pPopupData->labelDim.width;
+
+ //With the font of label and width of label, required height is calculated
+ // using textobject. TEXT_SIZE_ADJUST is used to increase font size and get bigger height
+ // as the accurate height is not fitting text in some cases.
+ Font font;
+ r = font.Construct(FONT_STYLE_PLAIN, pPopupData->labelFontSize + TEXT_SIZE_ADJUST);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ std::unique_ptr<TextObject> pTextObject(new (std::nothrow) TextObject());
+ SysTryReturnResult(NID_WEB_CTRL, pTextObject.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
+
+ r = pTextObject->Construct();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ std::unique_ptr<TextSimple> pSimpleText(new (std::nothrow) TextSimple(message.GetPointer(), message.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, &font));
+ SysTryReturnResult(NID_WEB_CTRL, pSimpleText.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
+
+ r = pTextObject->AppendElement(*pSimpleText);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pSimpleText.release();
+
+ r = pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pTextObject->SetBounds(rect);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pTextObject->SetFont(&font, 0, message.GetLength());
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pTextObject->Compose();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ int labelHeight = pTextObject->GetTotalHeight();
+
+ std::unique_ptr<Label> pLabel(new (std::nothrow) Label());
+ SysTryReturnResult(NID_WEB_CTRL, pLabel.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
+
r = pLabel->Construct(rect, message);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pLabel->SetTextConfig(pPopupData->labelFontSize, LABEL_TEXT_STYLE_NORMAL);
- r = AddControl(*pLabel);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ Control* pInfoLabel = null;
+
+ if (rect.height < labelHeight)
+ {
+ //message text is bigger than label, scroll is created to accomodate it.
+ std::unique_ptr<ScrollPanel> pScrollPanel(new (std::nothrow) ScrollPanel());
+ SysTryReturnResult(NID_WEB_CTRL, pScrollPanel.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
+
+ r = pScrollPanel->Construct(rect);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = AddControl(*pScrollPanel);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ ScrollPanel* pSPanel = pScrollPanel.release();
+
+ r = pLabel->SetSize(Dimension(rect.width, labelHeight));
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pSPanel->AddControl(*pLabel);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pLabel.release();
+ pInfoLabel = pSPanel;
+ }
+ else
+ {
+ r = AddControl(*pLabel);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pInfoLabel = pLabel.release();
+ }
- Label* pInfoLabel = pLabel.release();
//checkbutton
if (__userConfirmMode == USER_CONFIRM_GEOLOCATION)
{
idList.Add(*(new Integer(ID_BUTTON_USER_ALLOW)));
titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
}
+ else if (userConfirmMode == USER_BEFORE_UNLOAD_CONFIRM)
+ {
+ idList.Add(*(new Integer(ID_BUTTON_USER_CANCEL)));
+ idList.Add(*(new Integer(ID_BUTTON_USER_ALLOW)));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_LEAVE"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_STAY"))));
+ }
else
{
idList.Add(*(new Integer(ID_BUTTON_USER_CANCEL)));
{
pLayout->SetHorizontalAlignment(*__pCheckButton, LAYOUT_HORIZONTAL_ALIGN_CENTER);
}
- pLayout->SetHorizontalAlignment(*pButtonPanel, LAYOUT_HORIZONTAL_ALIGN_CENTER);
-
- if ( __userConfirmMode != USER_SCRIPT_ALERT )
- {
- pLayout->SetSpacing(*pButtonPanel, 2*pPopupData->sideMargin);
- }
SetPropagatedKeyEventListener(this);
return E_SUCCESS;
__pImpl->SendUserEvent(ID_USER_SCRIPT_CONFIRM_CLOSE, null);
break;
}
+ case USER_BEFORE_UNLOAD_CONFIRM:
+ {
+ __pImpl->SendUserEvent(ID_USER_BEFORE_UNLOAD_CONFIRM_CLOSE, null);
+ break;
+ }
default:
SysAssert(false);
}
ewk_view_javascript_confirm_reply(pView, allow);
break;
}
+ case USER_BEFORE_UNLOAD_CONFIRM:
+ {
+ Evas_Object* pView = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
+ ewk_view_before_unload_confirm_panel_reply(pView, !allow);
+ break;
+ }
case USER_CONFIRM_APP_CACHE:
{
Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
default:
SysAssert(false);
}
+ __isUserActionNeeded = false;
}
__pImpl->SendUserEvent(ID_USER_SCRIPT_CONFIRM_CLOSE, null);
break;
}
+ case USER_BEFORE_UNLOAD_CONFIRM:
+ {
+ __pImpl->SendUserEvent(ID_USER_BEFORE_UNLOAD_CONFIRM_CLOSE, null);
+ break;
+ }
case USER_PROTOCOL_HANDLER:
case USER_CONTENT_HANDLER:
case USER_CONFIRM_APP_CACHE:
*
* The file contains the definition of _Web class.
*/
+#include <Ecore_X.h>
#include <Elementary.h>
#include <memory>
#include <FBaseByteBuffer.h>
using namespace Tizen::Ui::Animations;
-namespace
+namespace Tizen { namespace Web { namespace Controls
{
}
-}
-
-
-namespace Tizen { namespace Web { namespace Controls
-{
-
-
void
OnEdgeLeft(void* pUserData, Evas_Object* pView, void* pEventInfo)
{
, __pPanningGestureHandler(null)
, __pFlickGestureHandler(null)
, __pPinchGestureHandler(null)
+ , __pWebAccessibilityListener(null)
+ , __pWebAccessibilityFocusHandler(null)
, __gestureType(WEB_GESTURE_TYPE_TAP)
, __edgeType(WEB_EDGE_NONE)
+ , __focus(false)
, __pTextElement(null)
, __previousTouchedPosition(0.0f, 0.0f)
, __isFullScreenEntered(false)
+ , __isRotated(false)
+ , __touchPressed(false)
{
SetBackgroundColor(Color(0, 0, 0, 0));
}
_Web::~_Web(void)
{
- _UiEventManager* pManager = _UiEventManager::GetInstance();
- SysAssertf(pManager, "Failed to get ui evnet manager.");
-
- pManager->RemoveKeyEventListener(*this);
-
RemoveGestureListener();
+
+ _AccessibilityContainer* pContainer = GetAccessibilityContainer();
+ if (pContainer)
+ {
+ pContainer->RemoveListener(*dynamic_cast<_IAccessibilityListener*>(__pWebAccessibilityListener.get()));
+ pContainer->SetFocusHandler(null);
+ }
}
r = pWeb->InitializeGestureStates();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
- _UiEventManager* pManager = _UiEventManager::GetInstance();
- SysAssertf(pManager, "Failed to get ui evnet manager.");
-
- pManager->AddKeyEventListener(*pWeb.get());
-
return pWeb.release();
}
pContainer->AddElement(*__pTextElement);
pContainer->Activate(true);
- _WebAccessibilityListener* pListener = new (std::nothrow) _WebAccessibilityListener(GetWebNativeNode());
+ std::unique_ptr<_WebAccessibilityListener> pListener(new (std::nothrow) _WebAccessibilityListener(GetWebNativeNode()));
SysTryReturn(NID_WEB_CTRL, pListener, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory Allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- pContainer->AddListener(*dynamic_cast<_IAccessibilityListener*>(pListener));
+ __pWebAccessibilityListener = std::move(pListener);
- _WebAccessibilityFocusHandler* pFocusHandler = new (std::nothrow) _WebAccessibilityFocusHandler(GetWebNativeNode());
+ pContainer->AddListener(*dynamic_cast<_IAccessibilityListener*>(__pWebAccessibilityListener.get()));
+
+ std::unique_ptr<_WebAccessibilityFocusHandler> pFocusHandler(new (std::nothrow) _WebAccessibilityFocusHandler(GetWebNativeNode()));
SysTryReturn(NID_WEB_CTRL, pFocusHandler, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory Allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- pContainer->SetFocusHandler(dynamic_cast<_IAccessibilityFocusHandler*>(pFocusHandler));
+ __pWebAccessibilityFocusHandler = std::move(pFocusHandler);
+
+ pContainer->SetFocusHandler(dynamic_cast<_IAccessibilityFocusHandler*>(__pWebAccessibilityFocusHandler.get()));
return E_SUCCESS;
}
}
+_EflWebkit*
+_Web::GetEflWebkit(void) const
+{
+ return __pEflWebkit.get();
+}
+
+
+FloatPoint
+_Web::GetTouchPosition(void) const
+{
+ return __previousTouchedPosition;
+}
+
+
result
_Web::OnAttaching(const _Control* pParent)
{
_ICoordinateSystemTransformer* pXformer = _CoordinateSystem::GetInstance()->GetTransformer();
SysTryReturnResult(NID_WEB_CTRL, pXformer, E_SYSTEM, "[%s] A system error has been occurred. Failed to get coordinate transformer.", GetErrorMessage(E_SYSTEM));
- if (__pEflWebkit.get())
+ if (__pEflWebkit.get() && __isRotated == false)
{
evas_object_move(__pEflWebkit->GetWebEvasObject(), pXformer->TransformHorizontal(absoluteBounds.x - webBounds.x + bounds.x), pXformer->TransformVertical(absoluteBounds.y - webBounds.y + bounds.y));
evas_object_resize(__pEflWebkit->GetWebEvasObject(), pXformer->TransformHorizontal(bounds.width), pXformer->TransformVertical(bounds.height));
void
+_Web::OnBoundsChanged(void)
+{
+ __isRotated = false;
+}
+
+
+void
+_Web::OnChangeLayout(_ControlOrientation orientation)
+{
+ __isRotated = true;
+}
+
+
+void
_Web::ChangeGesture(_WebGestureType type)
{
switch (type)
bool
_Web::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
- evas_object_focus_set(GetWebNativeNode(), EINA_TRUE);
+ __touchPressed = true;
if (__pEflWebkit.get())
{
bool
-_Web::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
+_Web::CanOutOfEdgeLeft(float scrollDistanceX, int pageDistance)
{
- if (__pEflWebkit.get())
+ if (scrollDistanceX < 0.0f)
{
- if (__gestureType == WEB_GESTURE_TYPE_TAP)
- {
- __pPanningGestureHandler->InitializeTextSelectionStatus();
- }
+ __edgeType &= ~WEB_EDGE_RIGHT;
- SendTouchEventForJavaScript(touchInfo);
+ return false;
+ }
+ else if (scrollDistanceX > 0.0f && pageDistance != 0)
+ {
+ __edgeType &= ~WEB_EDGE_LEFT;
+ }
- __pGestureHandler->OnTouchMoved(source, touchInfo);
+ return true;
+}
- float scrollDistanceX = __previousTouchedPosition.x - touchInfo.GetCurrentPosition().x;
- float scrollDistanceY = __previousTouchedPosition.y - touchInfo.GetCurrentPosition().y;
- __previousTouchedPosition = touchInfo.GetCurrentPosition();
- if (__edgeType != WEB_EDGE_NONE && __gestureType == WEB_GESTURE_TYPE_PANNING)
+bool
+_Web::CanOutOfEdgeRight(float scrollDistanceX, int pageDistance)
+{
+ if (scrollDistanceX > 0.0f)
+ {
+ __edgeType &= ~WEB_EDGE_LEFT;
+
+ return false;
+ }
+ else if (scrollDistanceX < 0.0f && pageDistance != 0)
+ {
+ __edgeType &= ~WEB_EDGE_RIGHT;
+ }
+
+ return true;
+}
+
+
+bool
+_Web::CanOutOfEdgeTop(float scrollDistanceY, int pageDistance)
+{
+ if (scrollDistanceY < 0.0f)
+ {
+ __edgeType &= ~WEB_EDGE_BOTTOM;
+
+ return false;
+ }
+ else if (scrollDistanceY > 0.0f && pageDistance != 0)
+ {
+ __edgeType &= ~WEB_EDGE_TOP;
+ }
+
+ return true;
+}
+
+
+bool
+_Web::CanOutOfEdgeBottom(float scrollDistanceY, int pageDistance)
+{
+ if (scrollDistanceY > 0.0f)
+ {
+ __edgeType &= ~WEB_EDGE_TOP;
+
+ return false;
+ }
+ else if (scrollDistanceY < 0.0f && pageDistance != 0)
+ {
+ __edgeType &= ~WEB_EDGE_BOTTOM;
+ }
+
+ return true;
+}
+
+
+bool
+_Web::CanConsumeTouchMoved(float scrollDistanceX, float scrollDistanceY)
+{
+ if (__edgeType == WEB_EDGE_NONE)
+ {
+ return true;
+ }
+
+ bool ret = true;
+
+ int scrollWidth = 0;
+ int scrollHeight = 0;
+ ewk_view_scroll_size_get(GetWebNativeNode(), &scrollWidth, &scrollHeight);
+
+ int scrollX = 0;
+ int scrollY = 0;
+ ewk_view_scroll_pos_get(GetWebNativeNode(), &scrollX, &scrollY);
+
+ if (scrollWidth == 0)
+ {
+ if (__edgeType & WEB_EDGE_TOP)
{
- if (_Abs(scrollDistanceY) < _Abs(scrollDistanceX))
+ if (!CanOutOfEdgeTop(scrollDistanceY, scrollY - 0))
{
- if (__edgeType & WEB_EDGE_LEFT)
- {
- if (scrollDistanceX < 0)
- {
- __edgeType &= ~WEB_EDGE_RIGHT;
-
- return false;
- }
- else
- {
- __edgeType &= ~WEB_EDGE_LEFT;
- }
- }
- else if (__edgeType & WEB_EDGE_RIGHT)
- {
- if (scrollDistanceX > 0)
- {
- __edgeType &= ~WEB_EDGE_LEFT;
-
- return false;
- }
- else
- {
- __edgeType &= ~WEB_EDGE_RIGHT;
- }
- }
+ return false;
}
- else if (_Abs(scrollDistanceY) > _Abs(scrollDistanceX))
+ }
+ else if (__edgeType & WEB_EDGE_BOTTOM)
+ {
+ if (!CanOutOfEdgeBottom(scrollDistanceY, scrollY - scrollHeight))
{
- if (__edgeType & WEB_EDGE_TOP)
- {
- if (scrollDistanceY < 0)
- {
- __edgeType &= ~WEB_EDGE_BOTTOM;
-
- return false;
- }
- else
- {
- __edgeType &= ~WEB_EDGE_TOP;
- }
- }
- else if (__edgeType & WEB_EDGE_BOTTOM)
- {
- if (scrollDistanceY > 0)
- {
- __edgeType &= ~WEB_EDGE_TOP;
-
- return false;
- }
- else
- {
- __edgeType &= ~WEB_EDGE_BOTTOM;
- }
- }
+ return false;
}
}
+ }
- return true;
+ if (scrollHeight == 0)
+ {
+ if (__edgeType & WEB_EDGE_LEFT)
+ {
+ if (!CanOutOfEdgeLeft(scrollDistanceX, scrollX - 0))
+ {
+ return false;
+ }
+ }
+ else if (__edgeType & WEB_EDGE_RIGHT)
+ {
+ if (!CanOutOfEdgeRight(scrollDistanceX, scrollX - scrollWidth))
+ {
+ return false;
+ }
+ }
+ }
+
+ if (scrollWidth > 0 && scrollHeight > 0)
+ {
+ if ((__edgeType & WEB_EDGE_LEFT) && (__edgeType & WEB_EDGE_TOP))
+ {
+ if (!CanOutOfEdgeLeft(scrollDistanceX, scrollX - 0) || !CanOutOfEdgeTop(scrollDistanceY, scrollY - 0))
+ {
+ return false;
+ }
+ }
+ else if ((__edgeType & WEB_EDGE_LEFT) && (__edgeType & WEB_EDGE_BOTTOM))
+ {
+ if (!CanOutOfEdgeLeft(scrollDistanceX, scrollX - 0) || !CanOutOfEdgeBottom(scrollDistanceY, scrollY - scrollHeight))
+ {
+ return false;
+ }
+ }
+ else if ((__edgeType & WEB_EDGE_RIGHT) && (__edgeType & WEB_EDGE_TOP))
+ {
+ if (!CanOutOfEdgeRight(scrollDistanceX, scrollX - scrollWidth) || !CanOutOfEdgeTop(scrollDistanceY, scrollY - 0))
+ {
+ return false;
+ }
+ }
+ else if ((__edgeType & WEB_EDGE_RIGHT) && (__edgeType & WEB_EDGE_BOTTOM))
+ {
+ if (!CanOutOfEdgeRight(scrollDistanceX, scrollX - scrollWidth) || !CanOutOfEdgeBottom(scrollDistanceY, scrollY - scrollHeight))
+ {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+
+bool
+_Web::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
+{
+ if (__pEflWebkit.get())
+ {
+ SendTouchEventForJavaScript(touchInfo);
+
+ float scrollDistanceX = __previousTouchedPosition.x - touchInfo.GetCurrentPosition().x;
+ float scrollDistanceY = __previousTouchedPosition.y - touchInfo.GetCurrentPosition().y;
+ __previousTouchedPosition = touchInfo.GetCurrentPosition();
+
+ if (CanConsumeTouchMoved(scrollDistanceX, scrollDistanceY))
+ {
+ return __pGestureHandler->OnTouchMoved(source, touchInfo);
+ }
}
return false;
bool
_Web::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
{
+ __touchPressed = false;
+
SetFocused();
if (__pEflWebkit.get())
}
-void
-_Web::OnTouchPressHandled(const _Control& control)
-{
-}
-
-
-void
-_Web::OnTouchReleaseHandled(const _Control& control)
-{
-}
-
-
-void
-_Web::OnTouchMoveHandled(const _Control& control)
-{
-}
-
-
-void
-_Web::OnTouchCancelHandled(const _Control& control)
-{
-}
-
-
bool
_Web::OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture)
{
return __pTapGestureHandler->OnLongPressGestureDetected(gesture);
}
- return true;
+ return false;
}
bool
_Web::OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture)
{
- return true;
+ return false;
}
return __pTapGestureHandler->OnTapGestureDetected(gesture);
}
- return true;
+ return false;
}
bool
_Web::OnTapGestureCanceled(_TouchTapGestureDetector& gesture)
{
- return true;
+ return false;
}
bool
_Web::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture)
{
- if (__pEflWebkit.get() && _WebSettingImpl::GetInstance(__pWebSetting.get())->IsScrollEnabled())
+ if (__pEflWebkit.get())
{
return __pFlickGestureHandler->OnFlickGestureDetected(gesture);
}
- return true;
+ return false;
}
bool
_Web::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture)
{
- return true;
+ return false;
}
return __pPinchGestureHandler->OnPinchGestureStarted(gesture);
}
- return true;
+ return false;
}
return __pPinchGestureHandler->OnPinchGestureChanged(gesture);
}
- return true;
+ return false;
}
return __pPinchGestureHandler->OnPinchGestureFinished(gesture);
}
- return true;
+ return false;
}
bool
_Web::OnPinchGestureCanceled(Tizen::Ui::_TouchPinchGestureDetector& gesture)
{
- return true;
+ return false;
}
}
+void
+_Web::SetFocusEnd(bool focus)
+{
+ __focus = focus;
+}
+
+
+bool
+_Web::IsFocusEnd(void) const
+{
+ return __focus;
+}
+
+
+bool
+_Web::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
+{
+ Ecore_X_Window rootWindow = ecore_x_window_root_first_get();
+ Ecore_X_Atom keyboardExist = ecore_x_atom_get("X External Keyboard Exist");
+ unsigned int keyboardNumber = 0;
+ int ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1);
+ if (keyboardNumber == 0)
+ {
+ return false;
+ }
+
+ _KeyCode keyCode = keyInfo.GetKeyCode();
+
+ if (IsFocusEnd() == true)
+ {
+ SetFocusEnd(false);
+ evas_object_focus_set(GetWebNativeNode(), EINA_FALSE);
+ return false;
+ }
+
+ switch(keyCode)
+ {
+ case _KEY_UP:
+ case _KEY_DOWN:
+ evas_object_focus_set(GetWebNativeNode(), EINA_FALSE);
+ return false;
+ break;
+ default:
+ break;
+ }
+
+ evas_object_focus_set(GetWebNativeNode(), EINA_TRUE);
+
+ return true;
+}
+
+
bool
_Web::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
}
+void
+_Web::OnDrawFocus(void)
+{
+}
+
+
+bool
+_Web::OnFocusLost(const _Control& source)
+{
+ _Control::OnFocusLost(*this);
+
+ if (__touchPressed == true)
+ {
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+ SysAssertf(pTouchManager, "Failed to get touch manager.");
+
+ Point absPoint(_CoordinateSystemUtils::ConvertToInteger(pTouchManager->GetPosition(pTouchManager->GetCurrentPointId())));
+
+ Ewk_Touch_Point* pPoint = static_cast< Ewk_Touch_Point* >(calloc(1, sizeof(Ewk_Touch_Point)));
+ pPoint->id = 0;
+ pPoint->x = absPoint.x;
+ pPoint->y = absPoint.y;
+ pPoint->state = EVAS_TOUCH_POINT_CANCEL;
+
+ Eina_List* pPointList = null;
+ pPointList = eina_list_append(pPointList, pPoint);
+
+ ewk_view_feed_touch_event(GetWebNativeNode(), EWK_TOUCH_CANCEL, pPointList, null);
+
+ void* pData = null;
+ EINA_LIST_FREE(pPointList, pData)
+ free(pData);
+
+ __touchPressed = false;
+ }
+
+ return false;
+}
+
+
}}} // Tizen::Web::Controls
class _PanningGestureState;
class _FlickGestureState;
class _PinchGestureState;
+class _WebAccessibilityListener;
+class _WebAccessibilityFocusHandler;
class WebSetting;
enum _WebGestureType
WebSetting* GetSetting(void) const;
+ _EflWebkit* GetEflWebkit(void) const;
+
+ Tizen::Graphics::FloatPoint GetTouchPosition(void) const;
+
void SetEdgeReachedEvent(_WebEdgeType type);
void SetFullScreenEntered(bool isFullScreenEntered);
+ void SetFocusEnd(bool focus);
+
+ bool IsFocusEnd(void) const;
+
+ bool CanOutOfEdgeLeft(float scrollDistanceX, int pageDistance);
+ bool CanOutOfEdgeRight(float scrollDistanceX, int pageDistance);
+ bool CanOutOfEdgeTop(float scrollDistanceY, int pageDistance);
+ bool CanOutOfEdgeBottom(float scrollDistanceY, int pageDistance);
+ bool CanConsumeTouchMoved(float scrollDistanceX, float scrollDistanceY);
virtual result OnAttaching(const _Control* pParent);
virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds);
+ virtual void OnBoundsChanged(void);
+ virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
- virtual void OnTouchPressHandled(const Tizen::Ui::_Control& control);
- virtual void OnTouchReleaseHandled(const Tizen::Ui::_Control& control);
- virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control);
- virtual void OnTouchCancelHandled(const Tizen::Ui::_Control& control);
-
virtual bool OnPinchGestureStarted(Tizen::Ui::_TouchPinchGestureDetector& gesture);
virtual bool OnPinchGestureChanged(Tizen::Ui::_TouchPinchGestureDetector& gesture);
virtual bool OnPinchGestureFinished(Tizen::Ui::_TouchPinchGestureDetector& gesture);
virtual bool OnCaptureAcquire(Tizen::Graphics::BufferInfo& output);
virtual void OnCaptureReleased(void) {};
+ virtual bool OnKeyPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo);
virtual bool OnKeyReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo);
+ virtual void OnDrawFocus(void);
+ virtual bool OnFocusLost(const Tizen::Ui::_Control& source);
private:
_Web(const _Web& value);
std::unique_ptr<_PinchGestureState> __pPinchGestureHandler;
+ std::unique_ptr<_WebAccessibilityListener> __pWebAccessibilityListener;
+
+ std::unique_ptr<_WebAccessibilityFocusHandler> __pWebAccessibilityFocusHandler;
+
_WebGestureType __gestureType;
int __edgeType;
+ bool __focus;
+
Tizen::Ui::_AccessibilityElement* __pTextElement;
Tizen::Graphics::FloatPoint __previousTouchedPosition;
bool __isFullScreenEntered;
+
+ bool __isRotated;
+
+ bool __touchPressed;
}; // _Web
}}} // Tizen::Web::Controls
#include <FBaseRtMutexGuard.h>
#include <FBaseSysLog.h>
#include <FBaseUtilUri.h>
-#include <FCntDownloadRequest.h>
#include <FGrpColor.h>
#include <FGrpPoint.h>
#include <FGrpRectangle.h>
#include <FApp_AppInfo.h>
#include <FApp_AppManagerImpl.h>
#include <FBase_StringConverter.h>
-#include <FCnt_DownloadManagerImpl.h>
-#include <FCnt_ContentManagerImpl.h>
#include <FGrp_CoordinateSystem.h>
#include <FGrp_Screen.h>
#include <FIo_DatabaseImpl.h>
#include <FIo_NormalFile.h>
+#include <FSys_SettingInfoImpl.h>
#include <FSys_SystemResource.h>
-#include <FSys_VibratorImpl.h>
#include <FUi_Control.h>
#include <FUi_CoordinateSystemUtils.h>
#include <FUi_EcoreEvasMgr.h>
#include <FUi_EcoreEvas.h>
+#include <FUi_ResourceManager.h>
#include <FUi_ResourceSizeInfo.h>
#include <FUi_Window.h>
#include <FUiAnim_EflNode.h>
static const int PORTRAIT_KEYPAD_HEIGHT = 444;
static const int LANDSCAPE_KEYPAD_HEIGHT = 316;
-static const int DEFAULT_LIST_ITEM_COUNT = 4;
-
-
-Eina_Bool
-AddHttpHeaderData(const Eina_Hash* pHash, const void* pKey, void* pValue, void* pUserData)
-{
- result r = E_SUCCESS;
-
- String key(reinterpret_cast< const char* >(pKey));
- String value(reinterpret_cast< char* >(pValue));
-
- SysLog(NID_WEB_CTRL, "The current value of key is %ls, value is %ls", key.GetPointer(), value.GetPointer());
-
- r = reinterpret_cast< HttpHeader* >(pUserData)->AddField(key, value);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
-
- return EINA_TRUE;
-}
+static const int DEFAULT_LIST_ITEM_COUNT = 5;
Eina_Bool
std::unique_ptr<String> pAttrValue(new (std::nothrow) String(reinterpret_cast< char* >(pValue)));
SysTryReturn(NID_WEB_CTRL, pAttrKey.get() && pAttrValue.get(), EINA_FALSE, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- SysLog(NID_WEB_CTRL, "The current value of key is %ls, value is %ls", pAttrKey->GetPointer(), pAttrValue->GetPointer());
+ SysSecureLog(NID_WEB_CTRL, "The current value of key is %ls, value is %ls", pAttrKey->GetPointer(), pAttrValue->GetPointer());
r = reinterpret_cast< HashMap* >(pUserData)->Add(*pAttrKey, *pAttrValue);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
CATCH:
ewk_view_javascript_prompt_reply(pView, null);
- return EINA_FALSE;
+ return EINA_TRUE;
+}
+
+
+Eina_Bool
+_WebImpl::OnBeforeUnloadConfirmRequested(Evas_Object* pView, const char* pMessage, void* pUserData)
+{
+ _WebImpl* pWebImpl = reinterpret_cast< _WebImpl* >(pUserData);
+ SysAssertf(pWebImpl, "Failed to request");
+ result r = E_SUCCESS;
+
+ String msg(pMessage);
+
+ r = pWebImpl->ShowUserConfirmPopupAsync(USER_BEFORE_UNLOAD_CONFIRM, pView, msg);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ return EINA_TRUE;
+
+CATCH:
+ ewk_view_javascript_confirm_reply(pView, EINA_FALSE);
+ return EINA_TRUE;
}
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
SysAssertf(pImpl , "Failed to request");
- const char* pHostName = ewk_security_origin_host_get(pSecOrigin);
- String msg;
- result r = msg.Format(256, L"Allow %s to use offline application cache?", pHostName);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
+ _SystemResource* pSysResource = _SystemResource::GetInstance();
+ SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_APP_CACHE, pView, msg);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
+ result r = E_SUCCESS;
+
+ String message(L"");
+ r = message.Format(512,
+ pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_STORE_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE").GetPointer(),
+ _StringConverter::CopyToCharArrayN(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_THIS_WEBPAGE")),
+ ewk_security_origin_host_get(pSecOrigin));
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_APP_CACHE, pView, message);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return EINA_TRUE;
+
+CATCH:
+ ewk_view_application_cache_permission_reply(pView, EINA_FALSE);
return EINA_TRUE;
}
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
SysAssertf(pImpl , "Failed to request");
- const char* pHostName = ewk_security_origin_host_get(pSecOrigin);
- String msg;
- result r = msg.Format(512, L"%s Used %lld of storage. Allow %s to use upto 2GB of indexed db?", pHostName, currentQuota, pHostName);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
+ _SystemResource* pSysResource = _SystemResource::GetInstance();
+ SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED, pView, msg);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
+ result r = E_SUCCESS;
+
+ String message(L"");
+ r = message.Format(512,
+ pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_P1SS_HP2SS_IS_ATTEMPTING_TO_STORE_A_LARGE_AMOUNT_OF_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE").GetPointer(),
+ _StringConverter::CopyToCharArrayN(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_THIS_WEBPAGE")),
+ ewk_security_origin_host_get(pSecOrigin));
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED, pView, message);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return EINA_TRUE;
+CATCH:
+ ewk_view_exceeded_indexed_database_quota_reply(pView, EINA_FALSE);
return EINA_TRUE;
}
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
SysAssertf(pImpl , "Failed to request");
- const char* pHostName = ewk_security_origin_host_get(pSecOrigin);
- String msg;
- result r = msg.Format(512, L"Allow %s to open %s use upto %lld of web database?", pHostName, database_name, expectedQuota);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
+ _SystemResource* pSysResource = _SystemResource::GetInstance();
+ SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_DB_QUOTA_EXCEDED, pView, msg);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
+ result r = E_SUCCESS;
+
+ String message(L"");
+ r = message.Format(512,
+ pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_P1SS_HP2SS_IS_ATTEMPTING_TO_STORE_A_LARGE_AMOUNT_OF_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE").GetPointer(),
+ _StringConverter::CopyToCharArrayN(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_THIS_WEBPAGE")),
+ ewk_security_origin_host_get(pSecOrigin));
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_DB_QUOTA_EXCEDED, pView, message);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
return EINA_TRUE;
+
+CATCH:
+ ewk_view_exceeded_database_quota_reply(pView, EINA_FALSE);
+ return EINA_TRUE;
}
-Eina_Bool OnLocalFileSystemQuotaExceeded(Evas_Object* pView, Ewk_Security_Origin* pSecOrigin, long long currentQuota, void* pUserData)
+Eina_Bool
+OnLocalFileSystemQuotaExceeded(Evas_Object* pView, Ewk_Security_Origin* pSecOrigin, long long currentQuota, void* pUserData)
{
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
SysAssertf(pImpl , "Failed to request");
- const char* pHostName = ewk_security_origin_host_get(pSecOrigin);
- String msg;
- result r = msg.Format(512, L"%s Used %lld of storgae. Allow %s to use upto 2GB of file system?", pHostName, currentQuota, pHostName);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
+ _SystemResource* pSysResource = _SystemResource::GetInstance();
+ SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED, pView, msg);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
+ result r = E_SUCCESS;
+ String message(L"");
+ r = message.Format(512,
+ pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_P1SS_HP2SS_IS_ATTEMPTING_TO_STORE_A_LARGE_AMOUNT_OF_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE").GetPointer(),
+ _StringConverter::CopyToCharArrayN(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_THIS_WEBPAGE")),
+ ewk_security_origin_host_get(pSecOrigin));
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pImpl->ShowUserConfirmPopup(USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED, pView, message);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return EINA_TRUE;
+
+CATCH:
+ ewk_view_exceeded_local_file_system_quota_reply(pView, EINA_FALSE);
return EINA_TRUE;
}
OnFullScreenEntered(void* pUserData, Evas_Object* pView, void* pEventInfo)
{
_WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData);
- bool* pIsHandleNeeded = reinterpret_cast< bool* >(pEventInfo);
SysAssertf(pImpl, "Failed to request");
_Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
SysAssertf(pWebCore, "Failed to get Web core object");
- if (pIsHandleNeeded && *pIsHandleNeeded)
- {
- pWebCore->SetFullScreenEntered(true);
- }
+ pWebCore->SetFullScreenEntered(true);
}
void
+OnFocusDownRequested(void* pUserData, Evas_Object* pView, void* pEventInfo)
+{
+ _WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData);
+ SysAssertf(pImpl, "Failed to request");
+
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ pWebCore->SetFocusEnd(true);
+}
+
+
+void
+OnFocusUpRequested(void* pUserData, Evas_Object* pView, void* pEventInfo)
+{
+ _WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData);
+ SysAssertf(pImpl, "Failed to request");
+
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ pWebCore->SetFocusEnd(true);
+}
+
+
+void
OnVibrationRequested(uint64_t duration, void* pUserData)
{
result r = E_SUCCESS;
String url(ewk_policy_decision_url_get(pPolicy));
SysSecureLog(NID_WEB_CTRL, "The current value of url is %ls", url.GetPointer());
- if (url == L"about:blank")
- {
- ewk_policy_decision_use(pPolicy);
- return;
- }
-
- if (pImpl->GetLoadingListener() && ewk_frame_is_main_frame(ewk_policy_decision_frame_get(pPolicy))
+ if (ewk_frame_is_main_frame(ewk_policy_decision_frame_get(pPolicy))
&& !pImpl->IsRedirectRequested())
{
_Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
{
pImpl->DisableAsyncSearch();
}
-
- WebNavigationType navigationType = WEB_NAVIGATION_OTHER;
- Ewk_Policy_Navigation_Type ewkNavigationType = ewk_policy_decision_navigation_type_get(pPolicy);
- switch (ewkNavigationType)
+ ILoadingListener* pLoadingListener = pImpl->GetLoadingListener();
+ if (pLoadingListener)
{
- case EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED:
- navigationType = WEB_NAVIGATION_LINK_CLICKED;
- break;
- case EWK_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED:
- navigationType = WEB_NAVIGATION_FORM_SUBMITTED;
- break;
- case EWK_POLICY_NAVIGATION_TYPE_BACK_FORWARD:
- navigationType = WEB_NAVIGATION_BACKFORWARD;
- break;
- case EWK_POLICY_NAVIGATION_TYPE_RELOAD:
- navigationType = WEB_NAVIGATION_RELOAD;
- break;
- case EWK_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED:
- navigationType = WEB_NAVIGATION_FORM_RESUBMITTED;
- break;
- case EWK_POLICY_NAVIGATION_TYPE_OTHER:
- navigationType = WEB_NAVIGATION_OTHER;
- break;
- default:
- SysAssert(false);
- }
+ WebNavigationType navigationType = WEB_NAVIGATION_OTHER;
+ Ewk_Policy_Navigation_Type ewkNavigationType = ewk_policy_decision_navigation_type_get(pPolicy);
- if (pImpl->GetLoadingListener()->OnLoadingRequested(url, navigationType))
- {
- ewk_policy_decision_ignore(pPolicy);
+ switch (ewkNavigationType)
+ {
+ case EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED:
+ navigationType = WEB_NAVIGATION_LINK_CLICKED;
+ break;
+ case EWK_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED:
+ navigationType = WEB_NAVIGATION_FORM_SUBMITTED;
+ break;
+ case EWK_POLICY_NAVIGATION_TYPE_BACK_FORWARD:
+ navigationType = WEB_NAVIGATION_BACKFORWARD;
+ break;
+ case EWK_POLICY_NAVIGATION_TYPE_RELOAD:
+ navigationType = WEB_NAVIGATION_RELOAD;
+ break;
+ case EWK_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED:
+ navigationType = WEB_NAVIGATION_FORM_RESUBMITTED;
+ break;
+ case EWK_POLICY_NAVIGATION_TYPE_OTHER:
+ navigationType = WEB_NAVIGATION_OTHER;
+ break;
+ default:
+ SysAssert(false);
+ }
- return;
+ if (pLoadingListener->OnLoadingRequested(url, navigationType))
+ {
+ ewk_policy_decision_ignore(pPolicy);
+
+ return;
+ }
}
}
+ if (url == L"about:blank")
+ {
+ ewk_policy_decision_use(pPolicy);
+
+ return;
+ }
+
String currentUrl(pImpl->GetUrl());
String redirectUrl(pImpl->GetProtocolFromUri(url, currentUrl));
if (redirectUrl != L"")
{
- pImpl->LoadUrl(redirectUrl);
ewk_policy_decision_ignore(pPolicy);
+ pImpl->LoadUrl(redirectUrl);
+
return;
}
uri.SetUri(url);
String uriScheme(uri.GetScheme());
- SysLog(NID_WEB_CTRL, "The current value of scheme is %ls", uriScheme.GetPointer());
+ SysSecureLog(NID_WEB_CTRL, "The current value of scheme is %ls", uriScheme.GetPointer());
- if ((uriScheme != L"http") && (uriScheme != L"https") && (uriScheme != L"file"))
+ if ((uriScheme != L"http") && (uriScheme != L"https") && (uriScheme != L"file") && (uriScheme != L""))
{
- ewk_policy_decision_ignore(pPolicy);
-
- if (uriScheme == L"")
- {
- return;
- }
-
result r = E_SUCCESS;
if (uriScheme == L"tel")
String operationId(L"http://tizen.org/appcontrol/operation/view");
r = _AppControlImpl::FindAndStart(operationId, &url, null, null, null, null);
}
- SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- return;
+ if (r == E_SUCCESS)
+ {
+ ewk_policy_decision_ignore(pPolicy);
+
+ return;
+ }
}
ewk_policy_decision_use(pPolicy);
result r = E_SUCCESS;
- _SystemResource* pSysResource = _SystemResource::GetInstance();
- SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
-
- const char* pUrl = ewk_policy_decision_url_get(pPolicy);
int code = ewk_policy_decision_response_status_code_get(pPolicy);
- String mime(ewk_policy_decision_response_mime_get(pPolicy));
- SysSecureLog(NID_WEB_CTRL, "url : %s, mime : %ls, code : %d", pUrl, mime.GetPointer(), code);
-
- ILoadingListener* pLoadingListener = pImpl->GetLoadingListener();
-
String url(ewk_policy_decision_url_get(pPolicy));
+ String mime(ewk_policy_decision_response_mime_get(pPolicy));
+ SysSecureLog(NID_WEB_CTRL, "code : %d, url : %ls, mime : %ls", code, url.GetPointer(), mime.GetPointer());
- if (pLoadingListener && ewk_frame_is_main_frame(ewk_policy_decision_frame_get(pPolicy)))
+ if (ewk_frame_is_main_frame(ewk_policy_decision_frame_get(pPolicy)))
{
- const Eina_Hash* pHeader = ewk_policy_decision_response_headers_get(pPolicy);
-
- DecisionPolicy policy;
- HttpHeader httpHeader;
-
if (code >= REDIRECTION_HEADER_GROUP && code < REDIRECTION_HEADER_GROUP + 100)
{
pImpl->SetRedirectRequested(true);
- mime = L"";
}
- eina_hash_foreach(pHeader, AddHttpHeaderData, &httpHeader);
- SysTryCatch(NID_WEB_CTRL, GetLastResult() == E_SUCCESS, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ ILoadingListener* pLoadingListener = pImpl->GetLoadingListener();
+ if (pLoadingListener)
+ {
+ HttpHeader httpHeader;
+
+ Eina_Iterator* iterator = eina_hash_iterator_tuple_new(ewk_policy_decision_response_headers_get(pPolicy));
+ if (iterator)
+ {
+ Eina_Hash_Tuple *tuple = null;
+
+ EINA_ITERATOR_FOREACH(iterator, tuple)
+ {
+ String key(reinterpret_cast< const char* >(tuple->key));
+ String value(reinterpret_cast< char* >(tuple->data));
+
+ SysSecureLog(NID_WEB_CTRL, "The current value of key is %ls, value is %ls", key.GetPointer(), value.GetPointer());
+
+ r = httpHeader.AddField(key, value);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, eina_iterator_free(iterator), r, "[%s] Propagating.", GetErrorMessage(r));
+ }
- policy = pLoadingListener->OnWebDataReceived(mime, httpHeader);
- pImpl->SetPolicyDecision(policy);
+ eina_iterator_free(iterator);
+ }
+
+ pImpl->SetPolicyDecision(pLoadingListener->OnWebDataReceived(mime, httpHeader));
+ }
+ else
+ {
+ pImpl->SetPolicyDecision(WEB_DECISION_CONTINUE);
+ }
}
switch (pImpl->GetPolicyDecision())
String redirectUrl(pImpl->GetRedirectUri(url, currentUrl, mime));
if (redirectUrl != L"")
{
- pImpl->LoadUrl(redirectUrl);
ewk_policy_decision_ignore(pPolicy);
+ pImpl->LoadUrl(redirectUrl);
+
return;
}
- if (pImpl->IsMimeSupported(mime) || mime == L"")
+ if (ewk_policy_decision_type_get(pPolicy) == EWK_POLICY_DECISION_USE)
{
break;
}
-
else
{
ewk_policy_decision_ignore(pPolicy);
r = _AppControlImpl::FindAndStart(operationId, &url, &mime, null, null, null);
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS || r == E_OBJ_NOT_FOUND, r, "[%s] Propagating.", GetErrorMessage(r));
-
if (r == E_OBJ_NOT_FOUND)
{
- _SelectBox* pSelectBox = new (std::nothrow) _SelectBox;
- SysTryReturnVoidResult(NID_WEB_CTRL, pSelectBox, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
-
- r = pSelectBox->Construct(false, L"Select application", 1, null, url);
- SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ String operationId(L"http://tizen.org/appcontrol/operation/download");
- pSelectBox->AddListItem(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_DOWNLOAD_ABB"), _SelectBox::LIST_ITEM_TYPE_NORMAL, false);
- r = pSelectBox->ShowPopup();
+ r = _AppControlImpl::FindAndStart(operationId, &url, null, null, null, null);
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
break;
}
+
case WEB_DECISION_DOWNLOAD:
{
ewk_policy_decision_ignore(pPolicy);
Ewk_Context* pContext = ewk_view_context_get(pView);
SysAssertf(pContext, "Failed to get webkit instance.");
- pDownloadHandler->StartDownload(pUrl);
+ pDownloadHandler->StartDownload(url);
return;
}
+
case WEB_DECISION_IGNORE:
{
ewk_policy_decision_ignore(pPolicy);
return;
}
+
default:
{
SysAssert(false);
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
pEventArg.release();
}
+}
+
+void
+OnLoadingCommitted(void* pUserData, Evas_Object* pView, void* pEventInfo)
+{
+ evas_object_focus_set(pView, EINA_FALSE);
}
SysTryReturnResult(NID_WEB_CTRL, startPoint.get() && endPoint.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
pImpl->GetBlockRange(*startPoint.get(), *endPoint.get());
-
if ((endPoint->x != 0.0f) && (endPoint->y != 0.0f))
{
std::unique_ptr<_WebUiEventArg> pEventArg(new (std::nothrow) _WebUiEventArg(WEB_EVENT_WEBUIEVENTLISTENER_PAGE_BLOCK_SELECTED_FLOAT));
Eina_Rectangle* pEinaRect = reinterpret_cast< Eina_Rectangle* >(pEventInfo);
SysAssertf(pImpl && pEinaRect, "Failed to request");
- if (pImpl->IsVisible() == false)
- {
- evas_object_focus_set(pView, EINA_FALSE);
- }
-
if (pImpl->GetSetting().GetInputStyle() == INPUT_STYLE_OVERLAY)
{
_ICoordinateSystemTransformer* pXformer = _CoordinateSystem::GetInstance()->GetInverseTransformer();
{
pFormImpl->DeflateClientRectHeight(pXformer->TransformVertical(rect.height));
- if (pFormImpl->HasFooter())
- {
- pFormImpl->GetCore().SetKeypadShowState(true);
- pFormImpl->Draw();
- }
+ pFormImpl->Invalidate(false);
}
if (pImpl->GetWebKeypadEventListener())
pImpl->GetWebKeypadEventListener()->OnWebKeypadWillOpen(*dynamic_cast< Web* >(&pImpl->GetPublic()));
}
}
- pImpl->SetKeypadVisibleState(true);
+
pImpl->SetPreviousKeypadBounds(rect);
}
else
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
SysAssertf(pImpl, "Failed to request");
+ pImpl->SetKeypadVisibleState(true);
+
+ _FormImpl* pFormImpl = pImpl->GetParentFormImpl(dynamic_cast< _ControlImpl* >(pImpl));
+ if (pFormImpl)
+ {
+ _ICoordinateSystemTransformer* pXformer = _CoordinateSystem::GetInstance()->GetInverseTransformer();
+ SysAssertf(pXformer, "Failed to get CoordinateTransformer");
+
+ pFormImpl->DeflateClientRectHeight(pXformer->TransformVertical(pImpl->GetPreviousKeypadBounds().height));
+
+ if (pFormImpl->HasFooter())
+ {
+ pFormImpl->GetCore().SetKeypadShowState(true);
+ pFormImpl->Draw();
+ }
+ }
+
if (pImpl->GetWebKeypadEventListener())
{
pImpl->GetWebKeypadEventListener()->OnWebKeypadOpened(*static_cast< Web* >(&pImpl->GetPublic()));
{
pFormImpl->DeflateClientRectHeight(0);
+ pFormImpl->Invalidate(false);
+
if (pFormImpl->HasFooter())
{
pFormImpl->GetCore().SetKeypadShowState(false);
void
+OnWindowObjectFocusLost(void* pUserData, Evas_Object* pWin, void* pEvent_info)
+{
+ _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
+ SysAssertf(pImpl, "Failed to request");
+
+ pImpl->SetWinFocusLost(true);
+}
+
+
+void
OnWindowObjectFocusGained(void* pUserData, Evas_Object* pWin, void* pEvent_info)
{
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
SysAssertf(pImpl, "Failed to request");
- if (pImpl->IsKeypadOpened() == true && pImpl->IsVisible() == true && pImpl->IsFocused() == true)
+ if (pImpl->IsVisible() == true && pImpl->IsFocused() == true)
{
_Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
SysAssertf(pWebCore, "Failed to get Web core object");
- evas_object_focus_set(pWebCore->GetWebNativeNode(), EINA_TRUE);
+ if (pImpl->IsWinFocusLost() == true)
+ {
+ Ewk_Settings* pSettings = ewk_view_settings_get(pWebCore->GetWebNativeNode());
+ SysAssertf(pSettings, "Failed to get settings instance.");
- pImpl->SetKeypadVisibleState(true);
+ if (ewk_settings_clear_text_selection_automatically_get(pSettings) == EINA_FALSE)
+ {
+ ewk_settings_clear_text_selection_automatically_set(pSettings, EINA_TRUE);
+
+ evas_object_focus_set(pWebCore->GetWebNativeNode(), EINA_TRUE);
+ }
+ else if (pImpl->IsKeypadOpened() == true)
+ {
+ evas_object_focus_set(pWebCore->GetWebNativeNode(), EINA_TRUE);
+ }
+ }
}
+
+ pImpl->SetWinFocusLost(false);
}
{
pImpl->SetKeypadOpened(false);
}
+ else if (pImpl->IsWinFocusLost() == true && pImpl->IsFocused() == false)
+ {
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ SysAssertf(pWebCore, "Failed to get Web core object");
+
+ evas_object_focus_set(pWebCore->GetWebNativeNode(), EINA_FALSE);
+ }
+}
+
+
+void
+OnWebNativeNodeFocusLost(void* pUserData, Evas* pCanvas, Evas_Object* pView, void* pEventInfo)
+{
+ _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
+ SysAssertf(pImpl, "Failed to request");
+
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ SysAssertf(pWebCore, "Failed to get Web core object");
+
+ Eina_Rectangle leftHandle;
+ Eina_Rectangle rightHandle;
+
+ EINA_RECTANGLE_SET(&leftHandle, 0, 0, 0, 0);
+ EINA_RECTANGLE_SET(&rightHandle, 0, 0, 0, 0);
+
+ if (pImpl->IsWinFocusLost() == true && ewk_view_text_selection_range_get(pWebCore->GetWebNativeNode(), &leftHandle, &rightHandle))
+ {
+ Ewk_Settings* pSettings = ewk_view_settings_get(pWebCore->GetWebNativeNode());
+ SysAssertf(pSettings, "Failed to get settings instance.");
+
+ ewk_settings_clear_text_selection_automatically_set(pSettings, EINA_FALSE);
+ }
}
, __isFooterVisible(false)
, __isKeypadVisible(false)
, __isKeypadOpened(false)
+ , __isWinFocusLost(false)
, __isLoadingErrorOccurred(false)
, __isRedirectRequested(false)
, __isCertificateRequested(false)
, __pNotificationConfirmPopup(null)
, __pScriptAlertConfirmPopup(null)
, __pScriptConfirmPopup(null)
+ , __pBeforeUnloadConfirmPopup(null)
, __pAppCacheConfirmPopup(null)
, __pDbQuotaConfirmPopup(null)
, __pLocalFsQuotaConfirmPopup(null)
_WebImpl::~_WebImpl()
{
- _DownloadManagerImpl* pManagerImpl = _DownloadManagerImpl::GetInstance();
- pManagerImpl->SetDownloadListener(null);
-
_WebManager* pWebManager = _WebManager::GetInstance();
+ SysTryCatch(NID_WEB_CTRL, pWebManager, , E_SYSTEM, "[%s] Failed to get the _ControlManager instance.", GetErrorMessage(E_SYSTEM));
pWebManager->RemoveWeb(reinterpret_cast< int >(this));
+CATCH:
+ _SettingInfoImpl::RemoveSettingEventListener(*this);
RemoveEventListenerCallback();
-
- ClearCertificateDb();
}
r = InitWebEvent();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- _DownloadManagerImpl* pManagerImpl = _DownloadManagerImpl::GetInstance();
- SysTryReturn(NID_WEB_CTRL, pManagerImpl, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- pManagerImpl->SetDownloadListener(this);
-
__pWebCore = dynamic_cast< _Web* >(&(GetCore()));
SysTryReturnResult(NID_WEB_CTRL, __pWebCore, E_SYSTEM, "A system error has been occurred. Failed to get web control");
result
_WebImpl::LoadUrl(const String& url) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return E_SUCCESS;
+ }
+
std::unique_ptr<char[]> pUrl(_StringConverter::CopyToCharArrayN(url));
SysTryReturn(NID_WEB_CTRL, pUrl.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- ewk_view_url_set(__pWebCore->GetWebNativeNode(), pUrl.get());
+ ewk_view_url_set(pWebview, pUrl.get());
return E_SUCCESS;
}
result
_WebImpl::LoadUrl(const String& url, const HttpHeader& header)
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return E_SUCCESS;
+ }
+
std::unique_ptr<char[]> pUrl(_StringConverter::CopyToCharArrayN(url));
SysTryReturn(NID_WEB_CTRL, pUrl.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
+
Eina_Hash* pHttpHeader = ConvertToSlpHeaderN(header);
- ewk_view_url_request_set(__pWebCore->GetWebNativeNode(), pUrl.get(), EWK_HTTP_METHOD_GET, pHttpHeader, null);
+ ewk_view_url_request_set(pWebview, pUrl.get(), EWK_HTTP_METHOD_GET, pHttpHeader, null);
eina_hash_free(pHttpHeader);
result
_WebImpl::LoadUrlWithPostRequest(const String& url, const HttpHeader& header, const ByteBuffer& body) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return E_SUCCESS;
+ }
+
std::unique_ptr<char[]> pUrl(_StringConverter::CopyToCharArrayN(url));
SysTryReturn(NID_WEB_CTRL, pUrl.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
Eina_Hash* pHttpHeader = ConvertToSlpHeaderN(header);
- ewk_view_url_request_set(__pWebCore->GetWebNativeNode(), pUrl.get(), EWK_HTTP_METHOD_POST, pHttpHeader, reinterpret_cast< const char* >(body.GetPointer()));
+ ewk_view_url_request_set(pWebview, pUrl.get(), EWK_HTTP_METHOD_POST, pHttpHeader, reinterpret_cast< const char* >(body.GetPointer()));
eina_hash_free(pHttpHeader);
result
_WebImpl::LoadData(const String& baseUrl, const ByteBuffer& content, const String& mime, const String& encoding) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return E_SUCCESS;
+ }
+
SysTryReturnResult(NID_WEB_CTRL, content.GetLimit() > 0, E_INVALID_ARG, "The content buffer is empty.");
std::unique_ptr<char[]> pUrl(_StringConverter::CopyToCharArrayN(baseUrl));
std::unique_ptr<char[]> pEncoding(_StringConverter::CopyToCharArrayN(encoding));
SysTryReturn(NID_WEB_CTRL, pUrl.get() && pMime.get() && pEncoding.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- ewk_view_contents_set(__pWebCore->GetWebNativeNode(), reinterpret_cast< const char* >(content.GetPointer()), content.GetLimit(), pMime.get(), pEncoding.get(), pUrl.get());
+ ewk_view_contents_set(pWebview, reinterpret_cast< const char* >(content.GetPointer()), content.GetLimit(), pMime.get(), pEncoding.get(), pUrl.get());
return E_SUCCESS;
}
void
_WebImpl::Pause(void)
{
- ewk_view_suspend(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_suspend(pWebview);
}
void
_WebImpl::Resume(void)
{
- ewk_view_resume(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_resume(pWebview);
}
std::unique_ptr<_SelectBox> pSelectBox(new (std::nothrow) _SelectBox());
SysTryReturnResult(NID_WEB_CTRL, pSelectBox.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
- r = pSelectBox->Construct(isMultiSelect, title, DEFAULT_LIST_ITEM_COUNT, pWebView);
+ if (isMultiSelect)
+ {
+ r = pSelectBox->Construct(this, isMultiSelect, title, DEFAULT_LIST_ITEM_COUNT - 1, pWebView);
+ }
+ else
+ {
+ r = pSelectBox->Construct(this, isMultiSelect, title, DEFAULT_LIST_ITEM_COUNT, pWebView);
+ }
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = pSelectBox->UpdateList(pItems, selectedIndex, false, false);
bool
_WebImpl::CanGoBack(void) const
{
- return static_cast< bool >(ewk_view_back_possible(__pWebCore->GetWebNativeNode()));
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return false;
+ }
+
+ return static_cast< bool >(ewk_view_back_possible(pWebview));
}
bool
_WebImpl::CanGoForward(void) const
{
- return static_cast< bool >(ewk_view_forward_possible(__pWebCore->GetWebNativeNode()));
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return false;
+ }
+
+ return static_cast< bool >(ewk_view_forward_possible(pWebview));
}
void
_WebImpl::GoBack(void) const
{
- ewk_view_back(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_back(pWebview);
}
void
_WebImpl::GoForward(void) const
{
- ewk_view_forward(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_forward(pWebview);
}
Tizen::Base::String
_WebImpl::GetUrl(void) const
{
- return ewk_view_url_get(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return L"";
+ }
+
+ return ewk_view_url_get(pWebview);
}
Tizen::Base::String
_WebImpl::GetTitle(void) const
{
- return ewk_view_title_get(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return L"";
+ }
+
+ return ewk_view_title_get(pWebview);
}
void
_WebImpl::StopLoading(void) const
{
- ewk_view_stop(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_stop(pWebview);
}
void
_WebImpl::Reload(void) const
{
- ewk_view_reload(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_reload(pWebview);
}
String*
_WebImpl::EvaluateJavascriptN(const String& scriptCode)
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- if (!pView)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
return null;
}
std::unique_ptr<_WebPresenter> pPresenter(new (std::nothrow) _WebPresenter(this));
SysTryReturn(NID_WEB_CTRL, pPresenter.get(), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- ewk_view_script_execute(pView, pScript.get(), OnScriptExecuted, pPresenter.get());
+ ewk_view_script_execute(pWebview, pScript.get(), OnScriptExecuted, pPresenter.get());
String* pResult = new (std::nothrow) String(L"");
SysTryReturn(NID_WEB_CTRL, pResult, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result
_WebImpl::SetZoomLevel(float level)
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return E_SUCCESS;
+ }
+
SysTryReturnResult(NID_WEB_CTRL, level >= MIN_ZOOM_LEVEL && level <= MAX_ZOOM_LEVEL, E_OUT_OF_RANGE, "The level(%f) must be between 0.3 and 2.0(%f).", level, level);
- ewk_view_scale_set(__pWebCore->GetWebNativeNode(), static_cast< double >(level), 0, 0);
+ ewk_view_scale_set(pWebview, static_cast< double >(level), 0, 0);
return E_SUCCESS;
}
float
_WebImpl::GetZoomLevel(void) const
{
- return static_cast< float >(ewk_view_scale_get(__pWebCore->GetWebNativeNode()));
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return -1.0f;
+ }
+
+ return static_cast< float >(ewk_view_scale_get(pWebview));
}
const PageNavigationList*
_WebImpl::GetBackForwardListN(void) const
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- if (!pView)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
return null;
}
String url(L"");
String title(L"");
- Ewk_History* pEwkHistoryList = ewk_view_history_get(pView);
+ Ewk_History* pEwkHistoryList = ewk_view_history_get(pWebview);
SysTryReturn(NID_WEB_CTRL, pEwkHistoryList, null, E_SYSTEM, "[%s] A system error has been occurred. Failed to get full history.", GetErrorMessage(E_SYSTEM));
Ewk_History_Item* pEwkItem = ewk_history_nth_item_get(pEwkHistoryList, 0);
bool
_WebImpl::SearchText(const String& text, bool searchForward)
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- if (!pView)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
return false;
}
std::unique_ptr<_WebPresenter> pPresenter(new (std::nothrow) _WebPresenter(this));
SysTryReturn(NID_WEB_CTRL, pPresenter.get(), false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- r = SynchronizeSearch(SEARCH_SYNC, pView, condition, text, searchForward, false, pPresenter.get());
+ r = SynchronizeSearch(SEARCH_SYNC, pWebview, condition, text, searchForward, false, pPresenter.get());
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
int result = 0;
result
_WebImpl::SearchTextAllAsync(const Tizen::Base::String& text, bool caseSensitive)
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- if (!pView)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
return E_SUCCESS;
}
condition = static_cast <Ewk_Find_Options>(condition | EWK_FIND_OPTIONS_CASE_INSENSITIVE);
}
- r = SynchronizeSearch(SEARCH_ALL_ASYNC, pView, condition, text, true, caseSensitive);
+ r = SynchronizeSearch(SEARCH_ALL_ASYNC, pWebview, condition, text, true, caseSensitive);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
result
_WebImpl::SearchNextAsync(bool searchForward)
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- if (!pView)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
return E_SUCCESS;
}
condition = static_cast <Ewk_Find_Options>(condition | EWK_FIND_OPTIONS_BACKWARDS);
}
- r = SynchronizeSearch(SEARCH_NEXT_ASYNC, pView, condition, __textSearch.__text, searchForward);
+ r = SynchronizeSearch(SEARCH_NEXT_ASYNC, pWebview, condition, __textSearch.__text, searchForward);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
std::unique_ptr<char[]> pText(_StringConverter::CopyToCharArrayN(text));
SysTryReturn(NID_WEB_CTRL, pText.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
- SysAssertf(pSettings, "Failed to get webkit instance.");
- ewk_settings_clear_text_selection_automatically_set(pSettings, true);
-
switch (type)
{
case SEARCH_SYNC:
const HitElementResult*
_WebImpl::GetElementByPointN(const FloatPoint& point) const
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- if (!pView)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
return null;
}
Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(point)));
- Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pView, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
+ Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pWebview, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
SysTryReturn(NID_WEB_CTRL, pEwkHitTest, null, E_SYSTEM, "[%s] Failed to get hit test.", GetErrorMessage(E_SYSTEM));
Eina_Hash* pAttrHash = ewk_hit_test_attribute_hash_get(pEwkHitTest);
bool
_WebImpl::IsLoading(void) const
{
- double percent = ewk_view_load_progress_get(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return false;
+ }
+
+ double percent = ewk_view_load_progress_get(pWebview);
if (Double::Compare(percent, 0.0) > 0 && Double::Compare(percent, 1.0) < 0)
{
String
_WebImpl::GetTextFromBlock(void) const
{
- return ewk_view_text_selection_text_get(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return L"";
+ }
+
+ return ewk_view_text_selection_text_get(pWebview);
}
bool
_WebImpl::IsPrivateBrowsingEnabled(void) const
{
- if (__pWebCore->GetWebNativeNode() == null)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
return _WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsPrivateBrowsingEnabled();
}
- Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
+ Ewk_Settings* pSettings = ewk_view_settings_get(pWebview);
SysAssertf(pSettings, "Failed to get webkit instance.");
return static_cast< bool >(ewk_settings_private_browsing_enabled_get(pSettings));
void
_WebImpl::SetPrivateBrowsingEnabled(bool enable)
{
- if (__pWebCore->GetWebNativeNode() == null)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->SetPrivateBrowsingEnabled(enable);
+
return;
}
- Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
+ Ewk_Settings* pSettings = ewk_view_settings_get(pWebview);
SysAssertf(pSettings, "Failed to get webkit instance.");
ewk_settings_private_browsing_enabled_set(pSettings, static_cast< Eina_Bool >(enable));
void
_WebImpl::ClearHistory(void)
{
- ewk_view_back_forward_list_clear(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_back_forward_list_clear(pWebview);
}
void
_WebImpl::ClearCache(void)
{
- Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ Ewk_Context* pContext = ewk_view_context_get(pWebview);
ewk_context_cache_clear(pContext);
}
void
_WebImpl::ClearCookie(void)
{
- Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ Ewk_Context* pContext = ewk_view_context_get(pWebview);
Ewk_Cookie_Manager* pCookieManager = ewk_context_cookie_manager_get(pContext);
ewk_cookie_manager_cookies_clear(pCookieManager);
void
_WebImpl::ClearFormData(void)
{
- Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ Ewk_Context* pContext = ewk_view_context_get(pWebview);
ewk_context_form_candidate_data_clear(pContext);
}
void
_WebImpl::ClearLoginFormData(void)
{
- Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ Ewk_Context* pContext = ewk_view_context_get(pWebview);
ewk_context_form_password_data_clear(pContext);
}
bool
_WebImpl::IsCookieEnabled(void) const
{
- if (__pWebCore->GetWebNativeNode() == null)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
return _WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsCookieEnabled();
}
- Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
+ Ewk_Context* pContext = ewk_view_context_get(pWebview);
Ewk_Cookie_Manager* pCookieManager = ewk_context_cookie_manager_get(pContext);
SysAssertf(pCookieManager, "Failed to get webkit instance.");
void
_WebImpl::SetCookieEnabled(bool enable)
{
- if (__pWebCore->GetWebNativeNode() == null)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->SetCookiEnabled(enable);
return;
}
- Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
+ Ewk_Context* pContext = ewk_view_context_get(pWebview);
Ewk_Cookie_Manager* pCookieManager = ewk_context_cookie_manager_get(pContext);
SysAssertf(pCookieManager, "Failed to get webkit instance.");
result
_WebImpl::SavePageAsPdf(const String& filePath, const Dimension* pSize) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return E_SUCCESS;
+ }
+
result r = E_SUCCESS;
std::unique_ptr<char[]> pFilePath(_StringConverter::CopyToCharArrayN(filePath));
{
SysTryReturnResult(NID_WEB_CTRL, pSize->width > 0 && pSize->height > 0, E_INVALID_ARG, "Invalid argument(s) is used. Size of pdf file is invalid.");
- ewk_view_contents_pdf_get(__pWebCore->GetWebNativeNode(), pSize->width, pSize->height, pFilePath.get());
+ ewk_view_contents_pdf_get(pWebview, pSize->width, pSize->height, pFilePath.get());
}
else
{
Evas_Coord contentsWidth;
Evas_Coord contentsHeight;
- ewk_view_contents_size_get(__pWebCore->GetWebNativeNode(), &contentsWidth, &contentsHeight);
- ewk_view_contents_pdf_get(__pWebCore->GetWebNativeNode(), contentsWidth, contentsHeight, pFilePath.get());
+ ewk_view_contents_size_get(pWebview, &contentsWidth, &contentsHeight);
+ ewk_view_contents_pdf_get(pWebview, contentsWidth, contentsHeight, pFilePath.get());
}
return E_SUCCESS;
bool
_WebImpl::IsMimeSupported(const String& mime) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return false;
+ }
+
std::unique_ptr<char[]> pMime(_StringConverter::CopyToCharArrayN(mime));
SysTryReturn(NID_WEB_CTRL, pMime.get(), false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- return static_cast< bool >(ewk_frame_can_show_mime_type(ewk_view_main_frame_get(__pWebCore->GetWebNativeNode()), pMime.get()));
+ return static_cast< bool >(ewk_frame_can_show_mime_type(ewk_view_main_frame_get(pWebview), pMime.get()));
}
evas_object_smart_callback_add(pWebNativeNode, "load,stop", OnLoadingCanceled, this);
evas_object_smart_callback_add(pWebNativeNode, "load,error", OnLoadingErrorOccurred, this);
evas_object_smart_callback_add(pWebNativeNode, "title,changed", OnPageTitleReceived, this);
+ evas_object_smart_callback_add(pWebNativeNode, "load,committed", OnLoadingCommitted, this);
evas_object_smart_callback_add(pWebNativeNode, "requestToNative,json", OnHandleJavaScriptRequest, this);
evas_object_smart_callback_add(pWinObject, "focus,in", OnWindowObjectFocusGained, this);
+ evas_object_smart_callback_add(pWinObject, "focus,out", OnWindowObjectFocusLost, this);
evas_object_smart_callback_add(pWebNativeNode, "inputmethod,changed", OnWebKeypadStateChanged, this);
evas_object_smart_callback_add(pWebNativeNode, "editorclient,ime,opened", OnWebKeypadOpened, this);
ewk_view_javascript_alert_callback_set(pWebNativeNode, OnScriptAlertRequested, const_cast< _WebImpl* >(this));
ewk_view_javascript_prompt_callback_set(pWebNativeNode, OnScriptPromptRequested, const_cast< _WebImpl* >(this));
ewk_view_javascript_confirm_callback_set(pWebNativeNode, OnScriptConfirmRequested, const_cast< _WebImpl* >(this));
+ ewk_view_before_unload_confirm_panel_callback_set(pWebNativeNode, OnBeforeUnloadConfirmRequested, const_cast< _WebImpl* >(this));
evas_object_smart_callback_add(pWebNativeNode, "policy,response,decide", OnWebDataReceived, this);
evas_object_smart_callback_add(pWebNativeNode, "touchmove,handled", OnWebPreventDefaultTriggered, this);
evas_object_smart_callback_add(pWebNativeNode, "icon,received", OnFaviconReceived, this);
- evas_object_smart_callback_add(pWebNativeNode, "text,selected", OnWebPageBlockSelected, this);
+ evas_object_smart_callback_add(pWebNativeNode, "magnifier,hide", OnWebPageBlockSelected, this);
evas_object_smart_callback_add(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered, this);
evas_object_smart_callback_add(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited, this);
+ evas_object_smart_callback_add(pWebNativeNode, "keyevent,down,not,handled", OnFocusDownRequested, this);
+ evas_object_smart_callback_add(pWebNativeNode, "keyevent,up,not,handled", OnFocusUpRequested, this);
+
Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_did_start_download_callback_set(pContext, OnDidStartDownloadCallback, const_cast< _WebImpl* >(this));
ewk_view_exceeded_local_file_system_quota_callback_set(pWebNativeNode, OnLocalFileSystemQuotaExceeded, const_cast< _WebImpl* >(this));
evas_object_event_callback_add(pWebNativeNode, EVAS_CALLBACK_FOCUS_IN, OnWebNativeNodeFocusGained, this);
+ evas_object_event_callback_add(pWebNativeNode, EVAS_CALLBACK_FOCUS_OUT, OnWebNativeNodeFocusLost, this);
}
}
evas_object_smart_callback_del(pWebNativeNode, "load,stop", OnLoadingCanceled);
evas_object_smart_callback_del(pWebNativeNode, "load,error", OnLoadingErrorOccurred);
evas_object_smart_callback_del(pWebNativeNode, "title,changed", OnPageTitleReceived);
+ evas_object_smart_callback_del(pWebNativeNode, "load,committed", OnLoadingCommitted);
evas_object_smart_callback_del(pWebNativeNode, "requestToNative,json", OnHandleJavaScriptRequest);
evas_object_smart_callback_del_full(pWinObject, "focus,in", OnWindowObjectFocusGained, this);
+ evas_object_smart_callback_del_full(pWinObject, "focus,out", OnWindowObjectFocusLost, this);
evas_object_smart_callback_del(pWebNativeNode, "inputmethod,changed", OnWebKeypadStateChanged);
evas_object_smart_callback_del(pWebNativeNode, "editorclient,ime,opened", OnWebKeypadOpened);
ewk_view_javascript_alert_callback_set(pWebNativeNode, null, null);
ewk_view_javascript_prompt_callback_set(pWebNativeNode, null, null);
ewk_view_javascript_confirm_callback_set(pWebNativeNode, null, null);
+ ewk_view_before_unload_confirm_panel_callback_set(pWebNativeNode, null, null);
evas_object_smart_callback_del(pWebNativeNode, "policy,response,decide", OnWebDataReceived);
evas_object_smart_callback_del(pWebNativeNode, "touchmove,handled", OnWebPreventDefaultTriggered);
evas_object_smart_callback_del(pWebNativeNode, "icon,received", OnFaviconReceived);
- evas_object_smart_callback_del(pWebNativeNode, "text,selected", OnWebPageBlockSelected);
+ evas_object_smart_callback_del(pWebNativeNode, "magnifier,hide", OnWebPageBlockSelected);
evas_object_smart_callback_del(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered);
evas_object_smart_callback_del(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited);
+ evas_object_smart_callback_del(pWebNativeNode, "keyevent,down,not,handled", OnFocusDownRequested);
+ evas_object_smart_callback_del(pWebNativeNode, "keyevent,up,not,handled", OnFocusUpRequested);
+
Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_vibration_client_callbacks_set(pContext, null, null, null);
ewk_view_exceeded_local_file_system_quota_callback_set(pWebNativeNode, null, null);
evas_object_event_callback_del(pWebNativeNode, EVAS_CALLBACK_FOCUS_IN, OnWebNativeNodeFocusGained);
+ evas_object_event_callback_del(pWebNativeNode, EVAS_CALLBACK_FOCUS_OUT, OnWebNativeNodeFocusLost);
}
}
-void
-_WebImpl::ClearCertificateDb(void)
-{
- result r = E_SUCCESS;
-
- String certificatePath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
- String table(CERTIFICATE_TABLE_NAME);
- _DatabaseImpl db;
-
- r = db.Construct(certificatePath, "r+", null);
- SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-
- db.BeginTransaction();
-
- r = db.ExecuteSql(L"Delete From " + table, true);
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- db.CommitTransaction();
-
- return;
-
-CATCH:
- db.RollbackTransaction();
-}
-
-
result
_WebImpl::SetBlockSelectionPosition(const Point& startPoint)
{
result
_WebImpl::SetBlockSelectionPosition(const FloatPoint& startPoint)
{
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- Ewk_View_Smart_Data* pSmartData = (Ewk_View_Smart_Data*) evas_object_smart_data_get(pView);
- if (pSmartData && pSmartData->api)
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
{
- Point absPoint( _CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(startPoint)));
+ return E_SUCCESS;
+ }
- Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
- SysAssertf(pSettings, "Failed to get webkit instance.");
- ewk_settings_clear_text_selection_automatically_set(pSettings, true);
+ Ewk_View_Smart_Data* pSmartData = reinterpret_cast< Ewk_View_Smart_Data* >(evas_object_smart_data_get(pWebview));
+ SysAssertf(pSmartData && pSmartData->api, "Failed to get webkit instance.");
+ Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(startPoint)));
- Eina_Bool ret = pSmartData->api->text_selection_down(pSmartData, absPoint.x, absPoint.y);
- if (ret)
- {
- pSmartData->api->text_selection_up(pSmartData, absPoint.x, absPoint.y);
+ Eina_Bool ret = pSmartData->api->text_selection_down(pSmartData, absPoint.x, absPoint.y);
+ if (ret)
+ {
+ pSmartData->api->text_selection_up(pSmartData, absPoint.x, absPoint.y);
- Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pView, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
- SysTryReturnResult(NID_WEB_CTRL, pEwkHitTest, E_SYSTEM, "Failed to get hit test.");
+ Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pWebview, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
+ SysTryReturnResult(NID_WEB_CTRL, pEwkHitTest, E_SYSTEM, "Failed to get hit test.");
- String tagName(ewk_hit_test_tag_name_get(pEwkHitTest));
+ String tagName(ewk_hit_test_tag_name_get(pEwkHitTest));
- if (tagName.Equals(L"INPUT", false) || tagName.Equals(L"TEXTAREA", false))
- {
- ewk_view_command_execute(pView, "SelectWord", 0);
- }
- else
- {
- Eina_Hash* pAttrHash = ewk_hit_test_attribute_hash_get(pEwkHitTest);
- char* pValue = reinterpret_cast< char* >(eina_hash_find(pAttrHash, "contenteditable"));
- if(pValue)
- {
- ewk_view_command_execute(pView, "SelectWord", 0);
- }
- }
+ Eina_Hash* pAttrHash = ewk_hit_test_attribute_hash_get(pEwkHitTest);
+ char* pValue = reinterpret_cast< char* >(eina_hash_find(pAttrHash, "contenteditable"));
+ if (tagName.Equals(L"INPUT", false) || tagName.Equals(L"TEXTAREA", false) || pValue)
+ {
+ ewk_view_command_execute(pWebview, "SelectWord", null);
+ evas_object_smart_callback_call(pWebview, "magnifier,hide", NULL);
}
}
SysTryReturnResult(NID_WEB_CTRL, GetTextFromBlock().GetLength() > 0, E_INVALID_ARG, "Failed to set text selection up.");
- evas_object_smart_callback_call(pView, "text,selected", NULL);
-
return E_SUCCESS;
}
void
_WebImpl::ReleaseBlock(void)
{
- ewk_view_text_selection_range_clear(__pWebCore->GetWebNativeNode());
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_text_selection_range_clear(pWebview);
}
void
_WebImpl::GetBlockRange(FloatPoint& startPoint, FloatPoint& endPoint) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ startPoint.x = startPoint.y = endPoint.x = endPoint.y = 0.0f;
+
+ }
+
Eina_Rectangle leftHandle;
Eina_Rectangle rightHandle;
Bitmap*
_WebImpl::GetFaviconN(void) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return null;
+ }
+
result r = E_SUCCESS;
- Evas_Object* pView = __pWebCore->GetWebNativeNode();
- Ewk_Context* pContext = ewk_view_context_get(pView);
- const char* pUrl = ewk_view_url_get(pView);
- Evas* pEvas = evas_object_evas_get(pView);
+ Ewk_Context* pContext = ewk_view_context_get(pWebview);
+ const char* pUrl = ewk_view_url_get(pWebview);
+ Evas* pEvas = evas_object_evas_get(pWebview);
Evas_Object* pFavicon = ewk_context_icon_database_icon_object_add(pContext, pUrl, pEvas);
if (!pFavicon)
void
_WebImpl::ScrollBy(const Tizen::Graphics::Point& diff)
{
- ewk_view_scroll_by(__pWebCore->GetWebNativeNode(), diff.x, diff.y);
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_scroll_by(pWebview, diff.x, diff.y);
}
void
_WebImpl::ScrollTo(const Tizen::Graphics::Point& dest)
{
- ewk_view_scroll_set(__pWebCore->GetWebNativeNode(), dest.x, dest.y);
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ ewk_view_scroll_set(pWebview, dest.x, dest.y);
}
Point
_WebImpl::GetScrollPosition(void) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return Point(0, 0);
+ }
+
Point position;
- ewk_view_scroll_pos_get(__pWebCore->GetWebNativeNode(), &position.x, &position.y);
+ ewk_view_scroll_pos_get(pWebview, &position.x, &position.y);
return position;
}
Dimension
_WebImpl::GetPageSize(void) const
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return Dimension(0, 0);
+ }
+
Evas_Coord width = 0;
Evas_Coord height = 0;
- ewk_view_contents_size_get(__pWebCore->GetWebNativeNode(), &width, &height);
+ ewk_view_contents_size_get(pWebview, &width, &height);
Dimension size(static_cast< int >(width), static_cast< int >(height));
}
-result
-_WebImpl::AddHttpHeaderField(const String& name, const String& value)
-{
- SysTryReturnResult(NID_WEB_CTRL, name.GetLength() > 0, E_INVALID_ARG, "Invalid argument(s) is used. name key is missing.");
-
- std::unique_ptr<char[]> pName(_StringConverter::CopyToCharArrayN(name));
- SysTryReturn(NID_WEB_CTRL, pName.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- std::unique_ptr<char[]> pValue(_StringConverter::CopyToCharArrayN(value));
-
- ewk_view_custom_header_add(__pWebCore->GetWebNativeNode(), pName.get(), pValue.get());
-
- return E_SUCCESS;
-}
-
-
-result
-_WebImpl::RemoveHttpHeaderField(const String& name)
-{
- SysTryReturnResult(NID_WEB_CTRL, name.GetLength() > 0, E_INVALID_ARG, "Invalid argument(s) is used. name key is missing.");
-
- std::unique_ptr<char[]> pName(_StringConverter::CopyToCharArrayN(name));
- SysTryReturn(NID_WEB_CTRL, pName.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- ewk_view_custom_header_remove(__pWebCore->GetWebNativeNode(), pName.get());
-
- return E_SUCCESS;
-}
-
-
void
_WebImpl::SetLoadingErrorOccurred(bool arg)
{
result
_WebImpl::SetFullScreenKeypad(void)
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return E_SUCCESS;
+ }
+
result r = E_SUCCESS;
std::unique_ptr<Keypad> pKeypad(new (std::nothrow) Keypad());
r = pKeypad->Construct(KEYPAD_STYLE_NORMAL, 100);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- String text(ewk_view_focused_input_element_value_get(__pWebCore->GetWebNativeNode()));
- pKeypad->SetText(text);
+ Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(__pWebCore->GetTouchPosition())));
+
+ Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pWebview, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
+ SysTryReturnResult(NID_WEB_CTRL, pEwkHitTest, E_SYSTEM, "Failed to get hit test.");
+
+ String tagName(ewk_hit_test_tag_name_get(pEwkHitTest));
+ if (tagName.Equals(L"INPUT", false))
+ {
+ String text(ewk_view_focused_input_element_value_get(pWebview));
+ pKeypad->SetText(text);
+ }
+ else
+ {
+ String* pText = EvaluateJavascriptN(L"document.activeElement.value");
+ SysTryReturnResult(NID_WEB_CTRL, pText, E_OUT_OF_MEMORY, "Memory allocation failed.");
+ pKeypad->SetText(*pText);
+ }
r = pKeypad->SetShowState(true);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
+bool
+_WebImpl::IsWinFocusLost(void) const
+{
+ return __isWinFocusLost;
+}
+
+
+void
+_WebImpl::SetWinFocusLost(bool isWinFocusLost)
+{
+ __isWinFocusLost = isWinFocusLost;
+}
+
+
Rectangle
_WebImpl::GetPreviousKeypadBounds(void) const
{
void
_WebImpl::OnTextValueChanged(const Control& source)
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
std::unique_ptr<char[]> pText(_StringConverter::CopyToCharArrayN(__pKeypad->GetText()));
+ SysTryReturnVoidResult(NID_WEB_CTRL, pText.get(), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(__pWebCore->GetTouchPosition())));
+
+ Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pWebview, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
+ SysTryReturnVoidResult(NID_WEB_CTRL, pEwkHitTest, E_SYSTEM, "[E_SYSTEM] Failed to get hit test.");
- ewk_view_focused_input_element_value_set(__pWebCore->GetWebNativeNode(), pText.get());
+ String tagName(ewk_hit_test_tag_name_get(pEwkHitTest));
+ if (tagName.Equals(L"INPUT", false))
+ {
+ ewk_view_focused_input_element_value_set(__pWebCore->GetWebNativeNode(), pText.get());
+ }
+ else
+ {
+ ewk_view_command_execute(pWebview, "SelectAll", null);
+ ewk_view_command_execute(pWebview, "Delete", null);
+ ewk_view_command_execute(pWebview, "InsertText", pText.get());
+ }
RemoveFullScreenKeypad();
}
__pVibrator.reset();
- std::unique_ptr<_VibratorImpl> pVibrator(new (std::nothrow) _VibratorImpl);
+ std::unique_ptr<Vibrator> pVibrator(new (std::nothrow) Vibrator());
SysTryReturnResult(NID_WEB_CTRL, pVibrator.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
r = pVibrator->Construct();
IntensityDurationVibrationPattern pattern = {static_cast< int >(duration), -1};
- r = __pVibrator->Start(&pattern, 1, 1);
+ r = __pVibrator->Start(&pattern, 1);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
r = pAuthPopup->Construct(host, realm, pAuthChallenge);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pAuthPopup.reset();
__pAuthPopup = std::move(pAuthPopup);
- int modalResult = 0;
-
- r = __pAuthPopup->ShowAndWait(modalResult);
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
-CATCH:
- if (__pAuthPopup)
- {
- __pAuthPopup.reset();
- }
+ r = __pAuthPopup->ShowPopup();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
}
{
case USER_CONFIRM_USERMEDIA:
{
- __pUserMediaConfirmPopup.reset();
+ __pUserMediaConfirmPopup.reset();
__pUserMediaConfirmPopup = std::move(pUserConfirmPopup);
r = __pUserMediaConfirmPopup->ShowPopup();
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pUserMediaConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
- __pUserMediaConfirmPopup.release();
break;
}
case USER_CONFIRM_GEOLOCATION:
r = __pGeolocationConfirmPopup->ShowPopup();
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pGeolocationConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
- __pGeolocationConfirmPopup.release();
break;
}
case USER_CONFIRM_NOTIFICATION:
r = __pNotificationConfirmPopup->ShowPopup();
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pNotificationConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
- __pNotificationConfirmPopup.release();
break;
}
case USER_SCRIPT_ALERT:
r = __pScriptAlertConfirmPopup->ShowPopup();
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pScriptAlertConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
- __pScriptAlertConfirmPopup.release();
break;
}
case USER_SCRIPT_CONFIRM:
r = __pScriptConfirmPopup->ShowPopup();
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pScriptConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
- __pScriptConfirmPopup.release();
+ break;
+ }
+ case USER_BEFORE_UNLOAD_CONFIRM:
+ {
+ __pBeforeUnloadConfirmPopup.reset();
+
+ __pBeforeUnloadConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pBeforeUnloadConfirmPopup->ShowPopup();
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pBeforeUnloadConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
break;
}
bool
_WebImpl::OnFocusGained(const _ControlImpl& source)
{
- Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
- SysAssertf(pSettings, "Failed to get webkit instance.");
- ewk_settings_clear_text_selection_automatically_set(pSettings, true);
-
return false;
}
bool
_WebImpl::OnFocusLost(const _ControlImpl& source)
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return false;
+ }
+
if(IsKeypadVisible() == true)
{
SetKeypadOpened(true);
-
- SetKeypadVisibleState(false);
}
- Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
- SysAssertf(pSettings, "Failed to get webkit instance.");
- ewk_settings_clear_text_selection_automatically_set(pSettings, false);
-
- evas_object_focus_set(__pWebCore->GetWebNativeNode(), EINA_FALSE);
-
return false;
}
{
result r = E_SUCCESS;
- if (IsVisible() == true)
- {
- _WebManager* pWebManager = _WebManager::GetInstance();
- pWebManager->SetActiveWeb(this);
- }
-
r = _ContainerImpl::OnPreAttachedToMainTree();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
_ControlManager* pControlManager = _ControlManager::GetInstance();
- SysTryReturnResult(NID_WEB_CTRL, pControlManager, E_SYSTEM, "Failed to get the ControlManager instance.");
+ SysTryReturnResult(NID_WEB_CTRL, pControlManager, E_SYSTEM, "Failed to get the _ControlManager instance.");
OnChangeLayout(pControlManager->GetScreenRotation());
r = InitializeSetting();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ _SettingInfoImpl::AddSettingEventListener(*this);
+
_WebManager* pWebManager = _WebManager::GetInstance();
+ SysTryReturnResult(NID_WEB_CTRL, pWebManager, E_SYSTEM, "Failed to get the _WebManager instance.");
pWebManager->AddWeb(reinterpret_cast< int >(this));
}
+ if (IsVisible() == true)
+ {
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ SysTryReturnResult(NID_WEB_CTRL, pWebManager, E_SYSTEM, "Failed to get the _WebManager instance.");
+ pWebManager->SetActiveWeb(this);
+ }
+
return E_SUCCESS;
}
{
result r = E_SUCCESS;
- _WebManager* pWebManager = _WebManager::GetInstance();
- pWebManager->RemoveActiveWeb(this);
-
r = _ContainerImpl::OnDetachingFromMainTree();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ SysTryReturnResult(NID_WEB_CTRL, pWebManager, E_SYSTEM, "Failed to get the _WebManager instance.");
+ pWebManager->RemoveActiveWeb(this);
+
return E_SUCCESS;
}
void
+_WebImpl::OnSettingChanged(String& key)
+{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
+ if (key == L"http://tizen.org/setting/font.type")
+ {
+ ewk_view_use_settings_font(pWebview);
+ }
+}
+
+
+void
_WebImpl::OnChangeLayout(_ControlRotation rotation)
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
int degree = 0;
switch (rotation)
degree = 0;
break;
case _CONTROL_ROTATION_90:
- degree = 90;
+ degree = -90;
break;
case _CONTROL_ROTATION_180:
degree = 180;
break;
case _CONTROL_ROTATION_270:
- degree = -90;
+ degree = 90;
break;
default:
SysAssert(false);
}
- ewk_view_orientation_send(__pWebCore->GetWebNativeNode(), degree);
+ ewk_view_orientation_send(pWebview, degree);
}
pWebNotification = static_cast< _WebNotification* >(pEnum->GetCurrent());
pWebNotification->OnChangeLayout();
}
+
+ if (IsKeypadVisible())
+ {
+ _ICoordinateSystemTransformer* pXformer = _CoordinateSystem::GetInstance()->GetInverseTransformer();
+ SysAssertf(pXformer, "Failed to get CoordinateTransformer");
+
+ _FormImpl* pFormImpl = GetParentFormImpl(dynamic_cast< _ControlImpl* >(this));
+ pFormImpl->DeflateClientRectHeight(pXformer->TransformVertical(GetPreviousKeypadBounds().height));
+ }
}
void
_WebImpl::OnAncestorVisibleStateChanged(const _Control& control)
{
+ Evas_Object* pWebview = __pWebCore->GetWebNativeNode();
+ if (!pWebview)
+ {
+ return;
+ }
+
_WebManager* pWebManager = _WebManager::GetInstance();
+ SysTryReturnVoidResult(NID_WEB_CTRL, pWebManager, E_SYSTEM, "[E_SYSTEM] Failed to get the _WebManager instance.");
if (IsVisible() == true)
{
pWebManager->SetActiveWeb(this);
- ewk_view_page_visibility_state_set(__pWebCore->GetWebNativeNode(), EWK_PAGE_VISIBILITY_STATE_VISIBLE, false);
+ if (IsLoading())
+ {
+// ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_VISIBLE, true);
+ }
+ else
+ {
+// ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_VISIBLE, false);
+ }
}
else
{
pWebManager->RemoveActiveWeb(this);
- ewk_view_page_visibility_state_set(__pWebCore->GetWebNativeNode(), EWK_PAGE_VISIBILITY_STATE_HIDDEN, false);
+ if (IsLoading())
+ {
+// ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_HIDDEN, true);
+ }
+ else
+ {
+// ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_HIDDEN, false);
+ }
}
}
case ID_USER_SCRIPT_CONFIRM_CLOSE:
__pScriptConfirmPopup.reset();
break;
+
+ case ID_USER_BEFORE_UNLOAD_CONFIRM_CLOSE:
+ __pBeforeUnloadConfirmPopup.reset();
+ break;
+
+ case ID_USER_SCRIPT_SELECTBOX_CLOSE:
+ __pSelectBox.reset();
+ break;
default:
break;
}
__pColorPicker = std::move(pColorHadler);
- r = __pColorPicker->ShowPopup();
+ int modalResult = 0;
+ r = __pColorPicker->ShowAndWait(modalResult);
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (__pColorPicker)
__pDatePicker = std::move(pInputPicker);
- r = __pDatePicker->ShowPopup();
+ int modalResult = 0;
+ r = __pDatePicker->ShowAndWait(modalResult);
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (__pDatePicker)
}
-void
-_WebImpl::OnDownloadCompleted(RequestId reqId, const String &path)
-{
- _ContentManagerImpl::ScanFile(path);
-}
-
-
}}} // Tizen::Web::Controls
*\r
* The file contains the definition of _WebManager class.\r
*/\r
-\r
+#include <pthread.h>\r
+#include <net_connection.h>\r
+#include <FAppApp.h>\r
#include <FBaseSysLog.h>\r
+#include <FIoDbEnumerator.h>\r
#include <FUiControl.h>\r
+#include <FIo_DirectoryImpl.h>
+#include <FIo_DatabaseImpl.h>
+#include <FIo_FileImpl.h>\r
#include <FUiCtrl_FormImpl.h>\r
+#include <FIo_DirectoryImpl.h>
+#include <FIo_DatabaseImpl.h>
+#include <FIo_FileImpl.h>
+#include "FWebCtrl_EflWebkit.h"\r
+#include "FWebCtrl_Web.h"\r
#include "FWebCtrl_WebImpl.h"\r
#include "FWebCtrl_WebManager.h"\r
#include "FWebCtrl_WebPopup.h"\r
\r
using namespace Tizen::Base;\r
using namespace Tizen::Base::Collection;\r
+using namespace Tizen::Io;\r
using namespace Tizen::Ui;\r
using namespace Tizen::Ui::Controls;\r
\r
namespace Tizen { namespace Web { namespace Controls\r
{\r
\r
+\r
+_WebManager* _WebManager::__pInstance = null;\r
+\r
+\r
+extern const wchar_t CUSTOM_DB_DIRECTORY_PATH[] = L"data/.webkit/customDatabase/";
+extern const wchar_t USER_CONFIRM_DB_NAME[] = L"userConfirm.db";
+extern const wchar_t GEOLOCATION_TABLE_NAME[] = L"geolocationPermission";
+extern const wchar_t CUSTOM_PROTOCOL_TABLE_NAME[] = L"customProtocol";
+extern const wchar_t CUSTOM_CONTENT_TABLE_NAME[] = L"customContent";
+extern const wchar_t CERTIFICATE_TABLE_NAME[] = L"certificate";
+
+
+static const int CUSTOM_DB_TABLE_COUNT= 4;\r
+\r
+\r
_WebManager::_WebManager(void)\r
: __pWebList(null)\r
, __pCallbackList(null)\r
, __pActiveWeb(null)\r
, __pActivePopup(null)\r
+ , __pProxy(null)\r
{\r
}\r
\r
_WebManager::~_WebManager(void)\r
{\r
+ free(__pProxy);\r
+ ClearCertificateDb();\r
}\r
\r
-_WebManager*\r
-_WebManager::GetInstance(void)\r
+\r
+void\r
+_WebManager::InitWebManager(void)\r
{\r
result r = E_SUCCESS;\r
- static _WebManager* pWebMgr = null;\r
\r
- if (pWebMgr == null)\r
- {\r
- pWebMgr = new (std::nothrow) _WebManager();\r
- SysTryReturn(NID_WEB_CTRL, pWebMgr != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] _WebManager allocation failed.");\r
+ std::unique_ptr<_WebManager> pInstance(new (std::nothrow) _WebManager());\r
+ SysTryReturnVoidResult(NID_WEB_CTRL, pInstance.get(), E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));\r
\r
- r = pWebMgr->Construct();\r
- SysTryCatch(NID_WEB_CTRL, !IsFailed(r), , r, "[%s] _WebManager construction failed.", GetErrorMessage(r));\r
- }\r
+ r = pInstance->Construct();\r
+ SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
+ __pInstance = pInstance.release();\r
+ std::atexit(DestroyWebManager);\r
+}\r
+\r
+\r
+void\r
+_WebManager::DestroyWebManager(void)\r
+{\r
+ delete __pInstance;\r
+ __pInstance = null;\r
+}\r
\r
- return pWebMgr;\r
\r
-CATCH:\r
- delete pWebMgr;\r
- pWebMgr = null;\r
+_WebManager*\r
+_WebManager::GetInstance(void)\r
+{\r
+ static pthread_once_t onceBlock = PTHREAD_ONCE_INIT;\r
+ if (__pInstance== null)\r
+ {\r
+ ClearLastResult();\r
+ pthread_once(&onceBlock, InitWebManager);\r
+ result r = GetLastResult();\r
+ if (IsFailed(r))\r
+ {\r
+ onceBlock = PTHREAD_ONCE_INIT;\r
+ }\r
+ }\r
\r
- return null;\r
+ return __pInstance;\r
}\r
\r
+\r
result\r
_WebManager::Construct(void)\r
{\r
r = pCallbackList->Construct();\r
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
\r
+ r = InitializeProxyAddress();\r
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
+ r = CreateResourceDirectory();\r
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
+ r = InitializeCustomDb();\r
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
__pWebList = std::move(pWebList);\r
__pCallbackList = std::move(pCallbackList);\r
\r
return E_SUCCESS;\r
}\r
\r
+\r
+void
+_WebManager::ClearCertificateDb(void)\r
+{
+ result r = E_SUCCESS;
+
+ String certificatePath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
+ String table(CERTIFICATE_TABLE_NAME);
+ _DatabaseImpl db;
+
+ r = db.Construct(certificatePath, "r+", null);
+ SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ db.BeginTransaction();
+
+ r = db.ExecuteSql(L"Delete From " + table, true);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ db.CommitTransaction();
+
+ return;
+
+CATCH:
+ db.RollbackTransaction();
+}\r
+\r
+\r
+result\r
+_WebManager::InitializeProxyAddress(void)\r
+{\r
+ int ret = -1;\r
+ connection_h handle = null;\r
+ char* pProxy = null;\r
+\r
+ ret = connection_create(&handle);
+ SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to create connection.");
+\r
+ connection_address_family_e family = CONNECTION_ADDRESS_FAMILY_IPV4;
+
+ ret = connection_get_proxy(handle, family, &pProxy);
+ SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to get proxy address.");\r
+\r
+ ret = connection_destroy(handle);
+ SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to destroy connection.");\r
+\r
+ __pProxy = pProxy;\r
+\r
+ return E_SUCCESS;\r
+}\r
+\r
+\r
+result
+_WebManager::CreateResourceDirectory(void) const\r
+{
+ String html5FeaturesPath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH);
+
+ if (!_FileImpl::IsFileExist(html5FeaturesPath))
+ {
+ result r = E_SUCCESS;
+
+ r = _DirectoryImpl::Create(html5FeaturesPath, true);
+ SysTryReturnResult(NID_WEB_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. create html5 features directory.");
+ }
+
+ return E_SUCCESS;
+}
+
+
+result
+_WebManager::InitializeCustomDb(void) const\r
+{
+ result r = E_SUCCESS;
+
+ _DatabaseImpl db;
+ String path(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
+ String geolocationTable(GEOLOCATION_TABLE_NAME);
+ String protocolTable(CUSTOM_PROTOCOL_TABLE_NAME);
+ String contentTable(CUSTOM_CONTENT_TABLE_NAME);
+ String certificateTable(CERTIFICATE_TABLE_NAME);
+
+ r = db.Construct(path, "a+", null);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ std::unique_ptr<DbEnumerator> pEnum(db.QueryN(L"Select count(name) from sqlite_master Where type='table' And name in ('" + geolocationTable + L"', '" + protocolTable + L"', '" + contentTable + L"', '" + certificateTable + L"')"));
+ if (pEnum.get())
+ {
+ int count = 0;
+
+ r = pEnum->MoveNext();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ r = pEnum->GetIntAt(0, count);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ if (count == CUSTOM_DB_TABLE_COUNT)
+ {
+ return E_SUCCESS;
+ }
+ }
+
+ pEnum.reset();
+ pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + geolocationTable + L"'"));
+ if (!pEnum.get())
+ {
+ r = db.ExecuteSql(
+ L"CREATE TABLE IF NOT EXISTS " + geolocationTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, origin TEXT, permission INTEGER)",
+ true);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ pEnum.reset();
+ pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + protocolTable + L"'"));
+ if (!pEnum.get())
+ {
+ r = db.ExecuteSql(
+ L"CREATE TABLE IF NOT EXISTS " + protocolTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, baseUrl TEXT, url TEXT, mime TEXT, allow INTEGER)",
+ true);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ pEnum.reset();
+ pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + contentTable + L"'"));
+ if (!pEnum.get())
+ {
+ r = db.ExecuteSql(
+ L"CREATE TABLE IF NOT EXISTS " + contentTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, baseUrl TEXT, url TEXT, mime TEXT, allow INTEGER)",
+ true);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ pEnum.reset();
+ pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + certificateTable + L"'"));
+ if (!pEnum.get())
+ {
+ r = db.ExecuteSql(
+ L"CREATE TABLE IF NOT EXISTS " + certificateTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, pem TEXT, allow INTEGER)",
+ true);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ return E_SUCCESS;
+}
+\r
+\r
result\r
_WebManager::AddWeb(int webAdress)\r
{\r
result r = E_SUCCESS;\r
\r
+ _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(webAdress);\r
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));\r
+\r
+ r = pWebCore->GetEflWebkit()->SetProxyAddress(__pProxy);\r
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
+\r
r = __pWebList->Add(webAdress);\r
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
\r
return E_SUCCESS;\r
}\r
\r
+\r
result\r
_WebManager::RemoveWeb(int webAdress)\r
{\r
r = __pWebList->Remove(webAdress);\r
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
\r
- r = __pCallbackList->Remove(webAdress);\r
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
+ __pCallbackList->Remove(webAdress);\r
\r
return E_SUCCESS;\r
}\r
\r
+\r
bool\r
_WebManager::IsValidWeb(int webAdress) const\r
{\r
return E_SUCCESS;\r
}\r
\r
+\r
result\r
_WebManager::RemoveCallback(int callerAdress, int callbackAdress)\r
{\r
return E_SUCCESS;\r
}\r
\r
+\r
bool\r
_WebManager::IsValidCallback(int callerAdress, int callbackAdress) const\r
{\r
return ret;\r
}\r
\r
+\r
void\r
_WebManager::SetActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress)\r
{\r
}\r
}\r
\r
+\r
void\r
_WebManager::RemoveActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress)\r
{\r
}\r
}\r
\r
+\r
void\r
_WebManager::SetActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress)\r
{\r
__pActivePopup = pPopupAddress;\r
}\r
\r
+\r
void\r
_WebManager::RemoveActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress)\r
{\r
}\r
}\r
\r
+\r
} } }\r
\r
namespace Tizen { namespace Web { namespace Controls\r
{\r
+\r
+_OSP_EXPORT_ extern const wchar_t CUSTOM_DB_DIRECTORY_PATH[];
+_OSP_EXPORT_ extern const wchar_t USER_CONFIRM_DB_NAME[];
+_OSP_EXPORT_ extern const wchar_t GEOLOCATION_TABLE_NAME[];
+_OSP_EXPORT_ extern const wchar_t CUSTOM_PROTOCOL_TABLE_NAME[];
+_OSP_EXPORT_ extern const wchar_t CUSTOM_CONTENT_TABLE_NAME[];
+_OSP_EXPORT_ extern const wchar_t CERTIFICATE_TABLE_NAME[];\r
+\r
class _WebImpl;\r
class _WebPopup;\r
\r
: public Tizen::Base::Object\r
{\r
public:\r
- static _WebManager* GetInstance(void);\r
+ virtual ~_WebManager(void);\r
\r
result AddWeb(int webAdress);\r
result RemoveWeb(int webAdress);\r
void SetActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress);\r
void RemoveActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress);\r
\r
+ static _WebManager* GetInstance(void);\r
+\r
private:\r
_WebManager(void);\r
_WebManager(const _WebManager& rhs);\r
- virtual ~_WebManager(void);\r
+\r
result Construct(void);\r
+\r
+ static void InitWebManager(void);\r
+ static void DestroyWebManager(void);\r
+\r
+ void ClearCertificateDb(void);\r
+ result InitializeProxyAddress(void);\r
+ result CreateResourceDirectory(void) const;
+ result InitializeCustomDb(void) const;\r
+\r
_WebManager& operator=(const _WebManager& rhs);\r
\r
private:\r
\r
_WebImpl* __pActiveWeb;\r
_WebPopup* __pActivePopup;\r
+ char* __pProxy;\r
+\r
+ static _WebManager* __pInstance;\r
};\r
\r
} } }\r
#include <FUiAnimPointAnimation.h>
#include <FUiAnimFloatAnimation.h>
#include <FUiAnimAnimationTransaction.h>
+#include <FUiAnimVisualElementPropertyAnimation.h>
#include <FUiCtrlButton.h>
#include "FWebCtrl_WebImpl.h"
#include "FWebCtrl_WebNotificationHandler.h"
r = Window::Show();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Error Propogating.", GetErrorMessage(r));
- Point start(0,-200),end;
- PointAnimation pointAnimation(Point(0, 0), Point(0, 0), 0, ANIMATION_INTERPOLATOR_LINEAR);
+ FloatRectangle rect(static_cast< float >(NOTIFCATION_RECT_AREA.x),static_cast< float >(NOTIFCATION_RECT_AREA.y),static_cast< float >(NOTIFCATION_RECT_AREA.width),static_cast< float >(NOTIFCATION_RECT_AREA.height));
- end = Point(0,0);
+ FloatRectangle __endRect = rect;
+ FloatRectangle __startRect = FloatRectangle(rect.x, rect.height - 200, rect.width, rect.height);
- pointAnimation.SetStartValue(start);
- pointAnimation.SetEndValue(end);
- pointAnimation.SetDuration(2000);
- pointAnimation.SetAutoReverseEnabled(false);
+ std::unique_ptr<VisualElementPropertyAnimation> pAnimation(new (std::nothrow) VisualElementPropertyAnimation());
+ SysTryReturnResult(NID_WEB_CTRL, pAnimation.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
- ControlAnimator *pAnimator = this->GetControlAnimator();
- r = pAnimator->StartUserAnimation(ANIMATION_TARGET_POSITION, pointAnimation);
- SysTryReturnResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Error Propagated.", GetErrorMessage(r));
+ pAnimation->SetPropertyName(L"bounds");
+ pAnimation->SetStartValue(Variant(__startRect));
+ pAnimation->SetEndValue(Variant(__endRect));
+ pAnimation->SetDuration(2000);
+ this->GetVisualElement()->AddAnimation(L"bounds", *pAnimation);
__pTimer->Start(15000);
return E_SUCCESS;
void
_WebNotification::OnTimerExpired(Timer& timer)
{
- int transactionId = 0;
- int duration = 1000;
float start = 1.0f;
float end = 0.0f;
- ParallelAnimationGroup showAnim;
- FloatAnimation floatAnim(start, end, duration, ANIMATION_INTERPOLATOR_LINEAR);
- showAnim.AddAnimation(ANIMATION_TARGET_ALPHA, floatAnim);
+ std::unique_ptr<VisualElementPropertyAnimation> pAnimation(new (std::nothrow) VisualElementPropertyAnimation());
+ SysTryReturnVoidResult(NID_WEB_CTRL, pAnimation.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
- AnimationTransaction::Begin(transactionId);
-
- ControlAnimator *pAnimator = this->GetControlAnimator();
- pAnimator->SetAnimation(ANIMATION_TRIGGER_SHOW_STATE_CHANGE, &showAnim);
- pAnimator->SetShowState(static_cast< int >(start));
-
- AnimationTransaction::Commit();
- __pWebImpl->ClearWebNotification(this);
-
- delete this;
+ pAnimation->SetPropertyName(L"opacity");
+ pAnimation->SetStartValue(Variant(start));
+ pAnimation->SetEndValue(Variant(end));
+ pAnimation->SetDuration(2000);
+ this->GetVisualElement()->AddAnimation(L"opacity", *pAnimation);
}
*/
#include <FBaseColIList.h>
#include <FBaseSysLog.h>
+#include <FGrpColor.h>
#include <FUiCtrlButton.h>
#include <FUiCtrlPanel.h>
#include <FUiVerticalBoxLayout.h>
_WebPopup::~_WebPopup(void)
{
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->RemoveActivePopup(this);
+
if (IsModalPopup())
{
HidePopup();
VerticalBoxLayout layout;
Dimension dim(popupDim);
- dim.height += __pWebPopupData->bottomMargin;
if (hasTitle)
{
r = SetShowState(false);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- _WebManager* pWebManager = _WebManager::GetInstance();
- pWebManager->RemoveActivePopup(this);
-
if (__isModal)
{
__modal = modalResult;
__isModal = false;
- return EndModal(__modal);
+ r = EndModal(__modal);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
return E_SUCCESS;
std::unique_ptr<Panel> pPanel(new (std::nothrow) Panel());
SysTryReturn(NID_WEB_CTRL, pPanel.get(), null, E_OUT_OF_MEMORY, "[%s] Memory Allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- Rectangle panelRect(0, 0, __pWebPopupData->popupDim.width, __pWebPopupData->btnDim.height);
+ Rectangle panelRect(0, 0, GetSize().width, __pWebPopupData->panelHeight);
- result r = pPanel->Construct(panelRect);
+ result r = pPanel->Construct(panelRect, GROUP_STYLE_BOTTOM);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+ Color buttonBgColor(0x00000000);
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BG_NORMAL, buttonBgColor);
+ pPanel->SetBackgroundColor(buttonBgColor);
+
r = AddControl(*pPanel);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturnResult(NID_WEB_CTRL, idCount > 0 && titleCount > 0 && idCount == titleCount, E_INVALID_DATA, "[E_INVALID_DATA] mismatch in count of Ids and Ttitles.");
int buttonMargin = __pWebPopupData->spacePad/2;
- int buttonWidth = (__pWebPopupData->popupDim.width - buttonMargin*(idCount+1)) / idCount;
+ if (idCount == 1)
+ {
+ GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_01, _CONTROL_ORIENTATION_PORTRAIT, buttonMargin);
+ }
+ int buttonWidth = (GetSize().width - buttonMargin*(idCount+1)) / idCount;
+ int buttonTopMargin = (__pWebPopupData->panelHeight - __pWebPopupData->btnDim.height)/2;
result r = E_SUCCESS;
+
+ //Button Colors
+ Color buttonColorNormal(0x00000000);
+ Color buttonColorPressed(0x00000000);
+ Color buttonColorDisabled(0x00000000);
+ Color buttonColorHighlighted(0x00000000);
+ Color buttonTextNormal(0x00000000);
+ Color buttonTextPressed(0x00000000);
+ Color buttonTextDisabled(0x00000000);
+ Color buttonTextHighlighted(0x00000000);
+
+ Bitmap* pComposedButtonBgNormal = null;
+ Bitmap* pComposedButtonBgPressed = null;
+ Bitmap* pComposedButtonBgDisabled = null;
+ Bitmap* pComposedButtonBgHighlighted = null;
+
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, buttonColorNormal);
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, buttonColorPressed);
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, buttonColorDisabled);
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, buttonColorHighlighted);
+
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_NORMAL, buttonTextNormal);
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_PRESSED, buttonTextPressed);
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED, buttonTextDisabled);
+ GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED, buttonTextHighlighted);
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorNormal, pComposedButtonBgNormal);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ std::unique_ptr< Bitmap > pComposedBtnBgNormal(pComposedButtonBgNormal);
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorPressed, pComposedButtonBgPressed);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ std::unique_ptr< Bitmap > pComposedBtnBgPressed(pComposedButtonBgPressed);
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorDisabled, pComposedButtonBgDisabled);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ std::unique_ptr< Bitmap > pComposedBtnBgDisabled(pComposedButtonBgDisabled);
+
+ r = GET_REPLACED_BITMAP_CONFIG_N(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, buttonColorHighlighted, pComposedButtonBgHighlighted);
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ std::unique_ptr< Bitmap > pComposedBtnBgHighlighted(pComposedButtonBgHighlighted);
+
for (int i = 0; i < idCount; i++)
{
const Integer* pButtonId = static_cast<const Integer*>(buttonIds.GetAt(i));
std::unique_ptr<Button> pButton(new (std::nothrow) Button());
SysTryReturnResult(NID_WEB_CTRL, pButton.get(), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory Allocation failed.");
- r = pButton->Construct(Rectangle((buttonMargin*(i+1))+(buttonWidth*i), 0, buttonWidth, __pWebPopupData->btnDim.height), *pButtonTitle);
+ r = pButton->Construct(Rectangle((buttonMargin*(i+1))+(buttonWidth*i), buttonTopMargin, buttonWidth, __pWebPopupData->btnDim.height), *pButtonTitle);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
pButton->SetActionId(pButtonId->ToInt());
+ pButton->SetNormalBackgroundBitmap(*pComposedBtnBgNormal);
+ pButton->SetPressedBackgroundBitmap(*pComposedBtnBgPressed);
+ pButton->SetDisabledBackgroundBitmap(*pComposedBtnBgDisabled);
+ pButton->SetHighlightedBackgroundBitmap(*pComposedBtnBgHighlighted);
+ pButton->SetTextColor(buttonTextNormal);
+ pButton->SetPressedTextColor(buttonTextPressed);
+ pButton->SetDisabledTextColor(buttonTextDisabled);
+ pButton->SetHighlightedTextColor(buttonTextHighlighted);
+
//Add button to panel
r = pPanel->AddControl(*pButton);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, orientation, __pWebPopupData->btnDim.height);
GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_02, orientation, __pWebPopupData->spacePad);
+ GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, __pWebPopupData->panelHeight);
GET_SHAPE_CONFIG(LABEL::TEXT_FONT_SIZE, orientation, __pWebPopupData->labelFontSize);
GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION, orientation, __pWebPopupData->checkDim);
static const wchar_t* DEFAULT_ENCODING_MODE = L"UTF-8";
-static const int DEFAULT_FONT_SIZE = 17;
+static const int DEFAULT_FONT_SIZE = 16;
static const float DEFAULT_ZOOM_LEVEL = 2.0f;
-static const wchar_t* DEFAULT_USER_AGENT = L"Mozilla/5.0 (Linux; Tizen 2.1; sdk) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.1 Mobile Safari/537.3";
+static const wchar_t* DEFAULT_USER_AGENT = L"Mozilla/5.0 (Linux; Tizen 2.2; sdk) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.2 Mobile Safari/537.3";
_WebSettingImpl::_WebSettingImpl(void)
private:
_CertificatePopupMode __certPopupMode;
bool __confirm;
+ bool __reaction;
Ewk_Certificate_Policy_Decision* __pCertificatePolicyData;
_CertificateConfirmPopup* __pParent;
{
ID_BUTTON_USER_ALLOW,
ID_BUTTON_USER_CANCEL,
- ID_BUTTON_USER_CERT_VIEW
+ ID_BUTTON_USER_NEVER
};
enum _UserConfirmMode
USER_CONFIRM_NOTIFICATION,
USER_SCRIPT_ALERT,
USER_SCRIPT_CONFIRM,
+ USER_BEFORE_UNLOAD_CONFIRM,
USER_CONFIRM_APP_CACHE,
USER_CONFIRM_DB_QUOTA_EXCEDED,
USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED,
void* __pUserPolicyData;
_UserConfirmMode __userConfirmMode;
Tizen::Ui::Controls::CheckButton* __pCheckButton;
+ bool __isUserActionNeeded;
bool __sync;
Tizen::Web::Controls::_WebImpl* __pImpl;
#include <EWebKit2.h>
#include <FBaseColArrayList.h>
#include <FBaseString.h>
-#include <FCntIDownloadListener.h>
+#include <FSysISettingEventListener.h>
#include <FUiIActionEventListener.h>
#include <FUiIOrientationEventListener.h>
#include <FUiITextEventListener.h>
namespace Tizen { namespace System
{
-class _VibratorImpl;
+class Vibrator;
}} // Tizen::Sytem
namespace Tizen { namespace Ui
ID_USER_CONFIRM_GEOLOCATION_CLOSE,
ID_USER_CONFIRM_NOTIFICATION_CLOSE,
ID_USER_SCRIPT_ALERT_CLOSE,
- ID_USER_SCRIPT_CONFIRM_CLOSE
+ ID_USER_SCRIPT_CONFIRM_CLOSE,
+ ID_USER_BEFORE_UNLOAD_CONFIRM_CLOSE,
+ ID_USER_SCRIPT_SELECTBOX_CLOSE
};
class _OSP_EXPORT_ _WebImpl
: public Tizen::Ui::_ContainerImpl
, public Tizen::Ui::ITextEventListener
, public Tizen::Web::Controls::_IWebEventListener
- , public Tizen::Content::IDownloadListener
+ , public Tizen::System::ISettingEventListener
{
public:
_WebImpl(Web* pWeb, Tizen::Ui::_Control* pCore);
Tizen::Graphics::Dimension GetPageSize(void) const;
- result AddHttpHeaderField(const Tizen::Base::String& name, const Tizen::Base::String& value);
-
- result RemoveHttpHeaderField(const Tizen::Base::String& name);
-
virtual bool IsLayoutable(void) const;
void SetEventListenerCallback(void) const;
bool IsCertificateRequested(void) const;
void SetCertificateConfirmed(bool arg);
bool IsCertificateConfirmed(void) const;
- void ClearCertificateDb(void);
void SetOrientationChanged(bool arg);
bool IsOrientationChanged(void) const;
void SetKeypadOpened(bool isKeypadOpened);
+ bool IsWinFocusLost(void) const;
+
+ void SetWinFocusLost(bool isWinFocusLost);
+
Tizen::Graphics::Rectangle GetPreviousKeypadBounds(void) const;
void SetPreviousKeypadBounds(Tizen::Graphics::Rectangle& bounds);
result OnHandleWebUiEventF(const Tizen::Base::Runtime::IEventArg& arg);
result OnHandleTextSearchEvent(const Tizen::Base::Runtime::IEventArg& arg);
- virtual void OnDownloadCanceled(RequestId reqId) {}
- virtual void OnDownloadCompleted(RequestId reqId, const Tizen::Base::String &path);
- virtual void OnDownloadFailed(RequestId reqId, result r, const Tizen::Base::String &errorCode) {}
- virtual void OnDownloadInProgress(RequestId reqId, unsigned long long receivedSize, unsigned long long totalSize) {}
- virtual void OnDownloadPaused(RequestId reqId) {}
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+ static Eina_Bool OnBeforeUnloadConfirmRequested(Evas_Object* pView, const char* pMessage, void* pUserData);
private:
bool __isFooterVisible;
bool __isKeypadVisible;
bool __isKeypadOpened;
+ bool __isWinFocusLost;
bool __isLoadingErrorOccurred;
bool __isRedirectRequested;
bool __isCertificateRequested;
std::unique_ptr<_UserConfirmPopup> __pNotificationConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pScriptAlertConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pScriptConfirmPopup;
+ std::unique_ptr<_UserConfirmPopup> __pBeforeUnloadConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pAppCacheConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pDbQuotaConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pLocalFsQuotaConfirmPopup;
std::unique_ptr<_InputPickerPopup> __pColorPicker;
std::unique_ptr<_FormDataWindow> __pFormDataWindow;
- std::unique_ptr<Tizen::System::_VibratorImpl> __pVibrator;
+ std::unique_ptr<Tizen::System::Vibrator> __pVibrator;
Tizen::Base::Runtime::Mutex __mutex;
int sideMargin;
int titleHeight;
int bottomMargin;
+ int panelHeight;
};
class _WebPopup