X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Source%2FWebKit2%2FWebProcess%2FWebPage%2FWebPage.h;h=8c69ad3a26c7009a541b5b3ca2715ed0811e4484;hb=b8bed2469cb69146c1b048442418e82b9214f8bc;hp=73299276693b9af46dd69972529c5f734769932c;hpb=93636ed9f10b7ce4ae4a4c5e2771aa6d42d0057a;p=framework%2Fweb%2Fwebkit-efl.git diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.h b/Source/WebKit2/WebProcess/WebPage/WebPage.h index 7329927..8c69ad3 100755 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.h +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.h @@ -195,6 +195,42 @@ class WebUserMediaClient; #if ENABLE(TIZEN_ISF_PORT) class NativeWebKeyboardEvent; + +enum { + KeyPressCommandSetComposition, + KeyPressCommandConfirmComposition, + KeyPressCommandDeleteText +}; + +struct KeyPressCommand { + KeyPressCommand(int type) : type(type) { } + + int type; +}; + +struct SetCompositionKeyPressCommand : public KeyPressCommand { + SetCompositionKeyPressCommand(const String& compositionString, const Vector& underlines, uint64_t cursorPosition) + : KeyPressCommand(KeyPressCommandSetComposition), compositionString(compositionString), underlines(underlines), cursorPosition(cursorPosition) { } + + String compositionString; + Vector underlines; + uint64_t cursorPosition; +}; + +struct ConfirmCompositionKeyPressCommand : public KeyPressCommand { + ConfirmCompositionKeyPressCommand(const String& compositionString) + : KeyPressCommand(KeyPressCommandConfirmComposition), compositionString(compositionString) { } + + String compositionString; +}; + +struct DeleteTextKeyPressCommand : public KeyPressCommand { + DeleteTextKeyPressCommand(int offset, int count) + : KeyPressCommand(KeyPressCommandDeleteText), offset(offset), count(count) { } + + int offset; + int count; +}; #endif class WebPage : public APIObject, public CoreIPC::MessageSender { @@ -229,16 +265,16 @@ public: void centerSelectionInVisibleArea(); #if PLATFORM(EFL) - void confirmComposition(const String& compositionString); - void setComposition(const WTF::String& compositionString, const WTF::Vector& underlines, uint64_t cursorPosition); #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2) bool setCaretPosition(const WebCore::IntPoint&); void getCaretPosition(WebCore::IntRect&); #endif #if ENABLE(TIZEN_ISF_PORT) - void updateCursorOffset(); void didCancelComposition(WebCore::Node*); + void prepareKeyDownEvent(); + void swapKeyPressCommands(Vector >&); + void getCursorOffset(int&); void getSurroundingTextAndCursorOffset(String&, int&); void getSelectionRect(bool, WebCore::IntRect&); @@ -267,6 +303,10 @@ public: void suspendJavaScriptAndResources(); void resumeJavaScriptAndResources(); + + void suspendAnimations(); + void resumeAnimations(); + #if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME) void suspendAnimationController(); void resumeAnimationController(); @@ -276,7 +316,7 @@ public: void resumePlugin(); #endif #endif -#if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR) +#if ENABLE(TIZEN_REMOTE_WEB_INSPECTOR) void startInspectorServer(uint32_t port, uint32_t& assignedPort); void stopInspectorServer(bool& result); #endif @@ -296,13 +336,20 @@ public: // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial? void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&); #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) - void selectClosestWord(const WebCore::IntPoint&, bool isStartedTextSelectionFromOutside, bool& result); - void setLeftSelection(const WebCore::IntPoint&, bool& result); - void setRightSelection(const WebCore::IntPoint&, bool& result); + enum HandleMovingDirection { + HandleMovingDirectionNone = 0, + HandleMovingDirectionNormal, + HandleMovingDirectionReverse, + }; + void selectClosestWord(const WebCore::IntPoint&, bool& result); + void setLeftSelection(const WebCore::IntPoint&, const int direction, int& result); + void setRightSelection(const WebCore::IntPoint&, const int direction, int& result); void getSelectionHandlers(WebCore::IntRect& leftRect, WebCore::IntRect& rightRect); void getSelectionText(String& result); void selectionRangeClear(bool& result); void selectionClearAllSelection(WebCore::Frame* frame); + void scrollContentByCharacter(const WebCore::IntPoint&, int direction, bool& result); + void scrollContentByLine(const WebCore::IntPoint&, int direction, bool& result); #endif #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE) @@ -315,18 +362,6 @@ public: void drawPageOverlay(WebCore::GraphicsContext&, const WebCore::IntRect&); void layoutIfNeeded(); -#if ENABLE(TIZEN_RECORDING_SURFACE_SET) - void recordingSurfaceSetEnableSet(bool enable); - void recordingSurfaceSetEnableURL(const String&); - - bool recordingSurfaceEnabled() { return m_recordingSurfaceSetEnable; } - - void setRecordingSurfaceLoadStart(bool enable) { m_recordingSurfaceSetLoadStart = enable; } - bool recordingSurfaceLoadStart() { return m_recordingSurfaceSetLoadStart; } - - void setRecordingSurfaceLoadFinish(bool enable) { m_recordingSurfaceSetLoadFinished = enable; } - bool recordingSurfaceLoadFinish() { return m_recordingSurfaceSetLoadFinished; } -#endif // -- Called from WebCore clients. #if PLATFORM(MAC) @@ -356,6 +391,9 @@ public: WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); } void setActiveOpenPanelResultListener(PassRefPtr); +#if OS(TIZEN) + void cancelForOpenPanel(); +#endif // -- Called from WebProcess. void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); @@ -592,7 +630,10 @@ public: void gestureWillBegin(const WebCore::IntPoint&, bool& canBeginPanning); void gestureDidScroll(const WebCore::IntSize&); void gestureDidEnd(); - +#elif PLATFORM(EFL) + void confirmComposition(const String& compositionString); + void setComposition(const WTF::String& compositionString, const WTF::Vector& underlines, uint64_t cursorPosition); + void cancelComposition(); #elif PLATFORM(GTK) void updateAccessibilityTree(); bool handleMousePressedEvent(const WebCore::PlatformMouseEvent&); @@ -743,10 +784,6 @@ public: WebCore::HTTPHeaderMap customHeaders(); #endif -#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION) - void getTextStyleStateForSelection(); -#endif - #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL) uint64_t nativeWindowHandle() { return m_nativeWindowHandle; } #endif @@ -760,14 +797,20 @@ public: #endif #if ENABLE(TIZEN_SCREEN_READER) - void raiseTapEvent(const WebCore::IntPoint&, const WebCore::IntPoint&); void moveScreenReaderFocus(bool, bool&); void moveScreenReaderFocusByPoint(const WebCore::IntPoint&); + void clearScreenReaderFocus(); + void raiseTapEvent(const WebCore::IntPoint&, const WebCore::IntPoint&, bool&); + void adjustScreenReaderFocusedObjectValue(bool); void recalcScreenReaderFocusRect(); void updateScreenReaderFocus(WebCore::RenderObject*); void clearScreenReader(); #endif +#if ENABLE(TIZEN_SCREEN_READER) || ENABLE(TIZEN_FOCUS_UI) || ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) + WebCore::IntRect nodeRect(WebCore::Node*) const; +#endif + #if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL) void notifyTransitionToCommitted(bool); #endif @@ -784,6 +827,14 @@ public: void setLocalStorageDirectory(const String& path); #endif +#if ENABLE(TIZEN_USE_SETTINGS_FONT) + void useSettingsFont(); +#endif + +#if OS(TIZEN) + void didChangeContents(const WebCore::IntRect&); +#endif + private: WebPage(uint64_t pageID, const WebPageCreationParameters&); @@ -1128,12 +1179,6 @@ private: #if ENABLE(PAGE_VISIBILITY_API) WebCore::PageVisibilityState m_visibilityState; #endif -#if ENABLE(TIZEN_RECORDING_SURFACE_SET) - bool m_recordingSurfaceSetEnable; - bool m_recordingSurfaceSetLoadStart; - bool m_recordingSurfaceSetLoadFinished; - bool m_recordingSurfaceSetSettings; -#endif #if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME) bool m_suspendedAnimationController; #endif @@ -1144,13 +1189,14 @@ private: OwnPtr m_screenReader; #endif -#if ENABLE(TIZEN_ISF_PORT) - bool m_isSettingComposition; -#endif - #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) EditorState m_editorState; #endif + +#if ENABLE(TIZEN_ISF_PORT) + bool m_prepareKeyDownEvent; + Vector > m_keyPressCommands; +#endif }; #if ENABLE(TIZEN_NATIVE_MEMORY_SNAPSHOT)