X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Source%2FWebKit2%2FWebProcess%2FWebPage%2Fefl%2FWebPageEfl.cpp;h=412487f67719b437852944267900c19970bd59da;hb=eca8579a62006108aa6a49d8169ea7a3af41df6b;hp=2d480deadc08415714c4547a7dbb4f0b481a3867;hpb=839d65a4f12d602c2b8e1b71df2b8c347912981e;p=framework%2Fweb%2Fwebkit-efl.git diff --git a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp b/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp index 2d480de..412487f 100755 --- a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp +++ b/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp @@ -290,10 +290,12 @@ void WebPage::confirmComposition(const String& compositionString) if (!targetFrame) return; +#if ENABLE(TIZEN_ISF_PORT) if (m_prepareKeyDownEvent) { m_keyPressCommands.append(adoptPtr(new ConfirmCompositionKeyPressCommand(compositionString))); return; } +#endif targetFrame->editor()->confirmComposition(compositionString); @@ -308,12 +310,15 @@ void WebPage::setComposition(const String& compositionString, const Vectoreditor()->hasComposition() && compositionString.isEmpty()) + return; + if (m_prepareKeyDownEvent) { m_keyPressCommands.append(adoptPtr(new SetCompositionKeyPressCommand(compositionString, underlines, cursorPosition))); return; } -#if ENABLE(TIZEN_ISF_PORT) if (targetFrame->selection()->rootEditableElement()) { HTMLTextFormControlElement* textFormControl = toTextFormControl(targetFrame->selection()->rootEditableElement()->shadowAncestorNode()); if (textFormControl && textFormControl->maxLength() >= 0) { @@ -586,6 +591,11 @@ bool WebPage::setCaretPosition(const IntPoint& pos) if (!node || !node->renderer()) return false; + Element* currentRootEditableElement = node->rootEditableElement(); + Element* newRootEditableElement = innerNode->rootEditableElement(); + if (currentRootEditableElement != newRootEditableElement) + return false; + IntRect rect = controller->caretRenderer()->absoluteBoundingBoxRect(true); // The below wirtten code is not correct way to implement. Presntly the is no @@ -889,9 +899,22 @@ static IntRect getNodeRect(Node* node, Node* focusableNode, bool isImage) #if ENABLE(TIZEN_WEBKIT2_HIT_TEST) #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING) +#if ENABLE(TOUCH_ADJUSTMENT) +static IntRect getFocusedRect(HitTestResult hitTestResult, Page* page, const IntSize& area) +#else static IntRect getFocusedRect(HitTestResult hitTestResult, Page* page) +#endif { Node* node = hitTestResult.innerNode(); +#if ENABLE(TOUCH_ADJUSTMENT) + Node* adjustedNode = 0; + IntPoint adustedPoint; + Frame* mainFrame = page->mainFrame(); + mainFrame->eventHandler()->bestClickableNodeForTouchPoint(hitTestResult.roundedPoint(), IntSize(area.width() / 2, area.height() / 2), adustedPoint, adjustedNode); + + if (adjustedNode) + node = adjustedNode; +#endif if (!node) return IntRect(); @@ -925,7 +948,11 @@ static IntRect getFocusedRect(HitTestResult hitTestResult, Page* page) } #endif +#if ENABLE(TOUCH_ADJUSTMENT) +void WebPage::hitTestResultAtPoint(const IntPoint& point, int hitTestMode, const IntSize& area, WebHitTestResult::Data& hitTestResultData) +#else void WebPage::hitTestResultAtPoint(const IntPoint& point, int hitTestMode, WebHitTestResult::Data& hitTestResultData) +#endif { Frame* frame = m_page->mainFrame(); FrameView* frameView = frame->view(); @@ -962,7 +989,11 @@ void WebPage::hitTestResultAtPoint(const IntPoint& point, int hitTestMode, WebHi hitTestResultData.hitTestMode = hitTestMode; #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING) +#if ENABLE(TOUCH_ADJUSTMENT) + hitTestResultData.focusedRect = getFocusedRect(hitTestResult, m_page.get(), area); +#else hitTestResultData.focusedRect = getFocusedRect(hitTestResult, m_page.get()); +#endif if (hitTestResult.innerNode() && hitTestResult.innerNode()->renderer() && hitTestResult.innerNode()->renderer()->style()) { hitTestResultData.focusedColor = hitTestResult.innerNode()->renderer()->style()->tapHighlightColor(); if (!hitTestResultData.focusedColor.hasAlpha()) @@ -1226,7 +1257,7 @@ void WebPage::startOfflinePageSave(String subresourceFolderName) #endif #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) -void WebPage::selectClosestWord(const IntPoint& point, bool isStartedTextSelectionFromOutside, bool& result) +void WebPage::selectClosestWord(const IntPoint& point, bool& result) { result = false; @@ -1245,9 +1276,7 @@ void WebPage::selectClosestWord(const IntPoint& point, bool isStartedTextSelecti focusedFrame = newFocusFrame; } -#if ENABLE(TIZEN_INPUT_TAG_EXTENSION) HTMLInputElement* inputElement = node->toInputElement(); -#endif if (hitTestResult.isContentEditable()) { #if ENABLE(TIZEN_INPUT_TAG_EXTENSION) @@ -1279,14 +1308,16 @@ void WebPage::selectClosestWord(const IntPoint& point, bool isStartedTextSelecti } #endif - if (!isStartedTextSelectionFromOutside) { - for (Node* node = hitTestResult.innerNonSharedNode(); node; node = node->parentNode()) { - if (node->isFocusable()) { - // Text selection shoud not be started when text of